[Demonstration 1]

[Buggy Method]
public void deserialize(MapDataDeserializer s) throws IOException {
    int arrayLevel = s.expectArrayStart();
    while (s.hasMoreArrayItems(arrayLevel)) {
        Shape shape = Shape.deserialize(s);
        if (s != null) {
            this.mLines.add(shape);
            if (shape.shouldDrawBelowGrid()) {
                mBelowGridLines.add(shape);
            } else {
                mAboveGridLines.add(shape);
            }
        }
    }
    s.expectArrayEnd();
}

[Buggy Hunk]
if (s != null) {

[Patch]
if (shape != null) {

[Demonstration 2]

[Buggy Method]
public static String getGroundingID(BioPAXElement pe) {
    if (pe instanceof Protein || pe instanceof ProteinReference) {
        String s = getUniProtName((Named) pe);
        if (s != null)
            return s;
    } else if (pe instanceof SmallMolecule) {
        String s = getPubChemID((XReferrable) pe);
        if (s != null)
            return s;
    }
    return getHGNCSymbol((XReferrable) pe);
}

[Buggy Hunk]
else if (pe instanceof SmallMolecule)

[Patch]
else if (pe instanceof SmallMolecule || pe instanceof SmallMoleculeReference)

[Demonstration 3]

[Buggy Method]
public Authentication getAuthentication() {
    return new Authentication(authenticationHolder.getEmail());
}

[Buggy Hunk]
return new Authentication(authenticationHolder.getEmail());

[Patch]
return new Authentication(authenticationHolder.getEmail(), authenticationHolder.getToken());