[Demonstration 1]

[Buggy Method]
public String[] decodificaAccount(String userEpw) {
    try {
        String origi = decrypt(userEpw);
        String[] parts = origi.split(accountSeperator);
        if (parts.length == 2 && !parts[0].equals("") && !parts[1].equals("")) {
            return parts;
        }
    } catch (Exception e) {
        e.printStackTrace();
        log.warning(e.getMessage());
    }
    return null;
}

[Buggy Hunk]
String[] parts = origi.split(accountSeperator);

[Patch]
String[] parts = origi.split(Criptazione.accountSeperator);

[Demonstration 2]

[Buggy Method]
public static Map<String, Node> loadNodesFromFile(String filename) {
    try {
        Path path = Paths.get(NodeLoader.class.getResource("/" + filename).toURI());
        List<String> stringList = Files.readAllLines(path);
        String[] values = stringList.get(0).split(" ");
        return Stream.of(values).map(value -> {
            String[] parts = value.split(":");
            return new Pair<>(parts[0], new Node(Double.parseDouble(parts[1])));
        }).collect(Collectors.toMap(Pair::getKey, Pair::getValue));
    } catch (IOException | URISyntaxException e) {
        throw new RuntimeException(e);
    }
}

[Buggy Hunk]
return new Pair<>(parts[0], new Node(Double.parseDouble(parts[1])));

[Patch]
return new Pair<>(parts[0], new Node(parts[0], Double.parseDouble(parts[1])));

[Demonstration 3]

[Buggy Method]
private void parseExperience(Iterator<IBodyElement> iter) {
    while (iter.hasNext()) {
        IBodyElement element = iter.next();
        if (element instanceof XWPFTable) {
            // we've hit the next title. We are finished with experience
            break;
        } else if (element instanceof XWPFParagraph) {
            resume.getExperiences().add((XWPFParagraph) element);
            iter.remove();
        }
    }
}

[Buggy Hunk]
resume.getExperiences().add((XWPFParagraph) element);

[Patch]
resume.addExperience((XWPFParagraph) element);