﻿# ManySStuBs4J: study small edit patterns with commit context

Interpret ManySStuBs4J statement edits with pattern multiplicity, AST offsets, fixing-commit context, and separate mined-label and executable-test evidence.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/data-guide-manysstubs-edit-patterns/
Language: en

## Select the artifact and project cohort

The [university deposit](https://datashare.ed.ac.uk/items/78a4b4b9-4ed3-4de1-b907-e248f0acbd74) describes separate Maven-project and broader Java-project variants, with general bug files and SStuB-specific files. The [author mining repository](https://github.com/mast-group/mineSStuBs) links a later archived deposit and documents the corresponding exports. Identify the exact archive and file, rather than merging differently named releases by assumption. These are historically selected project cohorts; their selection procedure is not a current ranking of Java projects or a representative sample of every kind of software maintenance.

## Count statements separately from pattern matches

The [original paper](https://arxiv.org/html/1905.13334) distinguishes all retained single-statement changes from the subset fitting predefined syntactic patterns. One statement may satisfy multiple patterns and appear as multiple pattern instances. A sum across `bugType` rows can therefore exceed the number of distinct edited statements. Deduplicate by an explicit event-and-location identity when that is the intended denominator. Do not remove overlapping labels if the question instead concerns which repair templates can express the same change.

## Retain offsets and the surrounding commit

The documented schema includes `commitSHA1`, `fixCommitParentSHA1`, `commitFile`, `bugLineNum`, and AST node start/length fields. `sourceBeforeFix` and `sourceAfterFix` can represent a subtree rather than a complete method. The `patch` contains the file's fixing changes, potentially beyond one local example. Preserve those scopes in [provenance records](/journal/document-markdown-json-provenance/). Applying a node offset to a reformatted or different revision of the file can point at unrelated text even when its line number looks plausible.

## Interpret mining rules as label evidence

The paper describes commit-message heuristics, single-statement filtering, and attempts to exclude clear renamings. A single statement may span several physical lines; a commit may contain several separately localized statement edits. Neither property makes it a one-line-only dataset. The collection also does not require every retained bug to have a failing test. Template agreement and a developer change are useful supervision, but they are not automatically an executable oracle demonstrating a candidate repair's correctness.

## Build an evaluation with a declared denominator

For an editorial repair study, keep all instances from a fixing event together and check related text across partitions using [leakage controls](/journal/document-level-data-split-leakage/). Report whether success means producing a reference subtree, matching a template, compiling the reconstructed project, or passing independently executed tests. These outcomes answer different questions. ManySStuBs4J is useful for analyzing small edit patterns and their historical context; its frequencies should not be generalized to all bugs, all projects, or current repair-tool performance.
