[Demonstration 1]

[Buggy Method]
public void addBookData(String title, String author, String url, int flag) {
    String id = IdCreator.createIdFromText(title + author);
    String sqlBook = "INSERT INTO Books(idBook, title, author, language, url, flag) VALUES('" + String.join("','", id, title, author, "EN", url, "0") + "');\n";
    System.out.println(sqlBook);
    try {
        executeSQLUpdate(sqlBook);
    } catch (SQLException e1) {
        e1.printStackTrace();
    }
}

[Buggy Hunk]
+ String.join("','", id, title, author, "EN",url,"0") + "');\n";

[Patch]
+ String.join("\",\"", id, title, author, "EN",url,"0") + "\");\n";

[Demonstration 2]

[Buggy Method]
public Graph add(Integer node1, Integer node2) {
    Graph toReturn = new Graph();
    HashMap<Integer, ArrayList<Integer>> vals = new HashMap<Integer, ArrayList<Integer>>();
    for (Entry<Integer, ArrayList<Integer>> entry : this.getEdges().entrySet()) {
        //kljlkj
        vals.put(entry.getKey(), entry.getValue());
    }
    toReturn.setEdges(vals);
    ArrayList<Integer> vals1 = toReturn.getEdges().get(node1);
    vals1.add(node2);
    toReturn.edges.put(node1, vals1);
    ArrayList<Integer> vals2 = toReturn.getEdges().get(node2);
    vals2.add(node1);
    toReturn.edges.put(node2, vals2);
    int edges = this.getNumEdges();
    toReturn.setNumEdges(edges + 1);
    int vertices = this.getNumVertices();
    toReturn.setNumVertices(vertices);
    return toReturn;
}

[Buggy Hunk]
vals.put(entry.getKey(), entry.getValue()); //kljlkj

[Patch]
vals.put(entry.getKey(), (ArrayList<Integer>)entry.getValue().clone());

[Demonstration 3]

[Buggy Method]
@RequestMapping("/all/{classification}/between/{from}/{to}")
public List<Supplier> getAllSuppliersClassificationDate(@PathVariable(value = "classification") String classification, @PathVariable(value = "from") String from, @PathVariable(value = "to") String to) {
    logger.debug("getAllSuppliersClassificationDate({}, {}, {})", classification, from, to);
    DateFormat format = new SimpleDateFormat("ddMMyyyy");
    Date fromDate;
    Date toDate;
    Classification c;
    try {
        fromDate = new Date(format.parse(from).getTime());
        toDate = new Date(format.parse(to).getTime());
        c = Classification.valueOf(classification);
    } catch (Exception e) {
        throw new IllegalArgumentException();
    }
    return allDao.getAllSuppliersClassificationDate(c, fromDate, toDate);
}

[Buggy Hunk]
c = Classification.valueOf(classification);

[Patch]
c = Classification.valueOf(classification.toUpperCase());