[Demonstration 1]

[Buggy Method]
@Override
public int compareTo(Attribute obj) {
    return attribute.compareTo(obj.getAttribute());
}

[Buggy Hunk]
return attribute.compareTo(obj.getAttribute());

[Patch]
return attr.compareTo(obj.getAttribute());

[Demonstration 2]

[Buggy Method]
double calculatePrice() {
    double final_price = basePrice * quantity * 1.1;
    double shipping_price = 20 * weight * quantity;
    final_price = roundCents(final_price + shipping_price);
    return final_price;
}

[Buggy Hunk]
double final_price = basePrice * quantity * 1.1;

[Patch]
double final_price = basePrice * quantity * salesTax;

[Demonstration 3]

[Buggy Method]
private void populateConfiguredAttributes() {
    configuredAttributes = new HashMap<>();
    queries = new ArrayList<>();
    for (GLQuery glQuery : queryConfig.getQueries()) {
        Query.Builder queryBuilder = Query.builder().setObj(glQuery.getObject());
        for (GLAttribute attribute : glQuery.getAttributes()) {
            queryBuilder.addAttr(attribute.getName());
            String mapKey = glQuery.getObject() + attribute.getName();
            if (attribute.getKey() != null) {
                mapKey += attribute.getKey();
            }
            configuredAttributes.put(mapKey, attribute);
        }
        queries.add(queryBuilder.build());
    }
}

[Buggy Hunk]
String mapKey = glQuery.getObject() + attribute.getName();

[Patch]
String mapKey = attribute.getName();