[Demonstration 1]

[Buggy Method]
public static String encode(String value) {
    if (StringUtils.isEmpty(value))
        throw new IllegalArgumentException("value is not valid");
    String toEncrypt = SECRET_CONSTANT + DELIMITER + value + DELIMITER + NumberUtils.itoa(rnd.nextInt(RANDOM_BASE), 3);
    return crypt.encryptToHex(toEncrypt);
}

[Buggy Hunk]
public static String encode(String value) {

[Patch]
public static synchronized String encode(String value) {

[Demonstration 2]

[Buggy Method]
@Override
public void visit(PlaceHolder placeHolder) {
    //currently handling on the literal type
    assert PlaceHolder.LITERAL_TYPE.equals(placeHolder.getType());
    String literal = placeHolder.getLiteral(dbName);
    if (literal != null) {
        buffer.append(literal).append(" ");
    }
}

[Buggy Hunk]
public void visit(PlaceHolder placeHolder)

[Patch]
public final void visit(PlaceHolder placeHolder)

[Demonstration 3]

[Buggy Method]
protected ArrayList<String> listCorrector(ArrayList<String> list, String start, String end) {
    ArrayList<String> correctedList = list;
    System.out.println("Start " + start.length());
    System.out.println("End " + end.length());
    if ((start.length() > 0) && (Integer.parseInt(start) < 0)) {
        start = "1";
    }
    if ((start.length() > 0) && (Integer.parseInt(end) > list.size())) {
        end = "" + (list.size());
    }
    if (start.length() >= 1) {
        if (end.length() >= 1) {
            correctedList = new ArrayList<String>(list.subList(Integer.parseInt(start) - 1, Integer.parseInt(end)));
            return correctedList;
        }
        correctedList = new ArrayList<String>(list.subList(Integer.parseInt(start) - 1, list.size()));
        return correctedList;
    }
    if (end.length() >= 1) {
        correctedList = new ArrayList<String>(list.subList(list.size() - Integer.parseInt(end), list.size()));
        return correctedList;
    }
    return correctedList;
}

[Buggy Hunk]
if((start.length() > 0) && (Integer.parseInt(end) > list.size())){

[Patch]
if((end.length() > 0) && (Integer.parseInt(end) > list.size())){