[Demonstration 1]

[Buggy Method]
public static void main(String[] args) {
    try {
        String hostname = "test-exch-deletefromstocks";
        if (args.length >= 1) {
            hostname = args[0];
        }
        int port = 20000;
        if (args.length >= 2) {
            port = Integer.parseInt(args[2]);
        }
        System.out.println(args.length);
        System.out.println("HOST: " + hostname);
        Interface.init(hostname, port);
        Interface.run();
    } catch (Exception e) {
        e.printStackTrace(System.out);
    }
}

[Buggy Hunk]
port = Integer.parseInt(args[2]);

[Patch]
port = Integer.parseInt(args[1]);

[Demonstration 2]

[Buggy Method]
@Override
public void sessionRemoved(ServerSession session, boolean timedout) {
    SpringrollUser user = websocketSessionToUserMap.get(session.getId());
    logger.debug("Web Socket Session removed {}", session.getId(), user == null ? "Unknown Session" : user.getUsername());
    websocketSessionToUserMap.remove(session.getId());
}

[Buggy Hunk]
logger.debug("Web Socket Session removed {}", session.getId(), user == null ? "Unknown Session" : user.getUsername() );

[Patch]
logger.trace("Web Socket Session removed {} for user {}", session.getId(), user == null ? "Unknown Session" : user.getUsername() );

[Demonstration 3]

[Buggy Method]
public File LoadFromFile() {
    String filename = File.separator + "tmp";
    JFileChooser fc = new JFileChooser(new File(filename));
    try {
        // Create a File object containing the canonical path of the
        // desired directory
        File f = new File(new File(".").getCanonicalPath());
        // Set the current directory
        fc.setCurrentDirectory(f);
    } catch (IOException e) {
    }
    // Show open dialog; this method does not return until the dialog is closed
    fc.showOpenDialog(this);
    File selFile = fc.getSelectedFile();
    return selFile;
}

[Buggy Hunk]
File f = new File(new File(".").getCanonicalPath());

[Patch]
File f = new File(new File(".").getCanonicalPath()+"/ressources/motifs/");