[Demonstration 1]

[Buggy Method]
public boolean isDivert() {
    return text.contains(Symbol.DIVERT) && !isVariable();
}

[Buggy Hunk]
return text.contains(Symbol.DIVERT) && !isVariable();

[Patch]
return text.contains(Symbol.DIVERT) && !isVariable() && !isChoice();

[Demonstration 2]

[Buggy Method]
@RequestMapping(value = "/advanceSearch", method = RequestMethod.GET)
@ResponseBody
public String advanceSearch(@RequestParam("searchString") String queryString) throws IOException, InterruptedException {
    System.out.println("advanceSearch");
    String filePath = this.webServices.queryHadoop(queryString);
    String result = this.webServices.convertToJSON(filePath);
    return result;
}

[Buggy Hunk]
String result = this.webServices.convertToJSON(filePath);

[Patch]
String result = this.webServices.convertToJSON(queryString,filePath);

[Demonstration 3]

[Buggy Method]
public static final String decodeToString(final String value) {
    if (StringUtils.isEmpty(value))
        throw new IllegalArgumentException("Invalid incoming data");
    String decrypted;
    // Just to avoid IllegalArgs inside!
    try {
        decrypted = crypt.decryptFromHex(value).trim();
    } catch (IllegalArgumentException e) {
        if (LOG.isDebugEnabled())
            LOG.debug(e.getMessage(), e);
        throw new IllegalArgumentException("encrypted id[" + value + "] - is not valid!");
    }
    String[] tokens = StringUtils.tokenize(decrypted, DELIMITER);
    if (!(tokens.length == 3)) {
        LOG.debug("Wrong number of tokens - " + tokens.length);
        throw new IllegalArgumentException("encrypted id[" + value + "] - is not valid!");
    }
    if (!tokens[0].equals(SECRET_CONSTANT)) {
        LOG.debug("Secret mismatch");
        throw new IllegalArgumentException("encrypted id[" + value + "] - is not valid!");
    }
    try {
        int randomPart = Integer.parseInt(tokens[2]);
        if (randomPart < 0 || randomPart > RANDOM_BASE) {
            LOG.debug("Random part has an illegal value");
            throw new IllegalArgumentException("encrypted id[" + value + "] - is not valid!");
        }
    } catch (NumberFormatException e) {
        LOG.debug("Random part is not numeric: " + e.getMessage());
        throw new IllegalArgumentException("encrypted id[" + value + "] - is not valid!");
    }
    return tokens[1];
}

[Buggy Hunk]
public static final String decodeToString(final String value) {

[Patch]
public static synchronized String decodeToString(final String value) {