[Demonstration 1]

[Buggy Method]
public static void create(DataStore store, final SimpleFeature simpleFeature) {
    new InTransaction(store, simpleFeature.getFeatureType().getTypeName(), "create") {

        @Override
        public void doWork(FeatureStore<SimpleFeatureType, SimpleFeature> featureStore) throws Exception {
            featureStore.addFeatures(DataUtilities.collection(simpleFeature));
        }
    };
}

[Buggy Hunk]
featureStore.addFeatures(DataUtilities.collection(simpleFeature));

[Patch]
featureStore.addFeatures(DataUtilities.collection(encodeId(simpleFeature, false)));

[Demonstration 2]

[Buggy Method]
@Override
public Set<String> getSupportedAnnotationTypes() {
    Set<String> result = new HashSet<>();
    result.add(TableModelSpec.class.getName());
    result.add(ViewModelSpec.class.getName());
    result.add(InheritedModelSpec.class.getName());
    return result;
}

[Buggy Hunk]
Set<String> result = new HashSet<>();

[Patch]
Set<String> result = new HashSet<String>();

[Demonstration 3]

[Buggy Method]
protected BatchGenerator getNext() {
    int sum = 0;
    for (BatchRepetitionWrapper bg : this.bgs) {
        sum += bg.getCount();
        if (sum >= this.index) {
            return bg.getBg();
        }
    }
    return null;
}

[Buggy Hunk]
if (sum >= this.index) {

[Patch]
if (sum > this.index) {