[Demonstration 1]

[Buggy Method]
public static SourceStream FromFile(String filename) throws EmjInterExceptionBase {
    String contents = SourceLoader.Load(filename);
    return new SourceStream(contents);
}

[Buggy Hunk]
String contents = SourceLoader.Load(filename);

[Patch]
byte[] contents = SourceLoader.Load(filename);

[Demonstration 2]

[Buggy Method]
private static List<Map<String, String>> getSheetValues(XSSFSheet sheet) {
    List<Map<String, String>> sheetValues = new ArrayList<Map<String, String>>();
    List<String> attributes = getCellValues(sheet.getRow(1));
    for (int rowNum = 2; rowNum <= sheet.getLastRowNum(); rowNum++) {
        XSSFRow row = sheet.getRow(rowNum);
        if (row != null) {
            Map<String, String> data = new HashMap<String, String>();
            int minCell = row.getFirstCellNum();
            int maxCell = row.getLastCellNum();
            for (int num = minCell; num < maxCell; num++) {
                XSSFCell xssfCell = row.getCell(num);
                if (xssfCell == null) {
                    data.put(attributes.get(num), "");
                } else {
                    data.put(attributes.get(num), xssfCell.toString());
                }
            }
            sheetValues.add(data);
        }
    }
    return sheetValues;
}

[Buggy Hunk]
data.put(attributes.get(num), xssfCell.toString());

[Patch]
data.put(attributes.get(num), getStringValInExcel(xssfCell));

[Demonstration 3]

[Buggy Method]
public HashMap<String, String> getItems(Session session) {
    ResultSet resultSet = session.execute("Select * from item");
    HashMap<String, String> data = new HashMap();
    for (Row row : resultSet) {
        data.put(row.getString("item"), row.getString("price"));
    }
    return data;
}

[Buggy Hunk]
data.put(row.getString("item"), row.getString("price"));

[Patch]
data.put(row.getString("item"), row.getString("price") + STRING_SEPARATOR + row.getString("trend"));