[Demonstration 1]

[Buggy Method]
public static String getActualName(String name) {
    if (nameSuffixed()) {
        String suffix = props.getProperty(S_NAME_SUFFIX, getDefaultNameSuffix(3));
        if (name.indexOf(suffix) > 0)
            return name;
        else
            return name + "-" + suffix;
    }
    return name;
}

[Buggy Hunk]
if (name.indexOf(suffix) > 0)

[Patch]
if (name.endsWith(suffix))

[Demonstration 2]

[Buggy Method]
public static double[][] product(double[][] a, double[][] b) {
    double[][] prod = new double[a.length][b[0].length];
    for (int i = 0; i < prod.length; i++) for (int j = 0; j < prod[0].length; j++) for (int k = 0; k < a[0].length; k++) prod[i][j] += a[i][k] * b[k][j];
    return prod;
}

[Buggy Hunk]
double prod[][] = new double[a.length][b[0].length];

[Patch]
final double prod[][] = new double[a.length][b[0].length];

[Demonstration 3]

[Buggy Method]
public boolean isScopeState(final String stateId) {
    return stateId.startsWith(getScopePrefix());
}

[Buggy Hunk]
return stateId.startsWith(getScopePrefix());

[Patch]
return stateId.charAt(preffix.length()) == Constants.STATE_ID_SEPARATOR && stateId.startsWith(preffix);