[Demonstration 1]

[Buggy Method]
public static void main(String[] args) throws IOException {
    ApplicationContext applicationContext = new ClassPathXmlApplicationContext("application-context.xml");
    CyberCalculator cyberCalculator = applicationContext.getBean("cyber-calculator", CyberCalculator.class);
    IOUtil.printToConsole("Please, enter an expression to evaluate: ");
    String expression = IOUtil.getExpression();
    IOUtil.printToConsole(expression);
    IOUtil.printToConsole(IOUtil.getEqualSign());
    IOUtil.printToConsole(cyberCalculator.evaluate(expression));
}

[Buggy Hunk]
IOUtil.printToConsole(cyberCalculator.evaluate(expression));

[Patch]
IOUtil.printToConsole(cyberCalculator.getResult(expression));

[Demonstration 2]

[Buggy Method]
private ArrayList<String> readFile(String name) throws IOException {
    ArrayList<String> vhdl = new ArrayList<>();
    InputStream inputStream = getClass().getClassLoader().getResourceAsStream(createFileName(name));
    if (inputStream == null)
        throw new IOException("file not present: " + createFileName(name));
    try (BufferedReader in = new BufferedReader(new InputStreamReader(inputStream))) {
        String line;
        while ((line = in.readLine()) != null) vhdl.add(line);
    }
    return vhdl;
}

[Buggy Hunk]
try (BufferedReader in = new BufferedReader(new InputStreamReader(inputStream))) {

[Patch]
try (BufferedReader in = new BufferedReader(new InputStreamReader(inputStream, "utf-8"))) {

[Demonstration 3]

[Buggy Method]
protected static String escapeAndConvertToSQLWildcards(String value, boolean alwaysWildcard) {
    String ret = // escape 'sql escape'
    value.replaceAll("\\\\", "\\\\\\\\").// char
    replaceAll("_", "\\\\_").replaceAll("%", // escape sql
    "\\\\%").// wildcards
    replaceAll("\\*", "%").replaceAll("\\?", // replace rql
    "_");
    // wildcard with
    // sql wildcard
    return alwaysWildcard ? "%" + ret + "%" : ret;
}

[Buggy Hunk]
protected static String escapeAndConvertToSQLWildcards(String value, boolean alwaysWildcard) {

[Patch]
public static String escapeAndConvertToSQLWildcards(String value, boolean alwaysWildcard) {