[Demonstration 1]

[Buggy Method]
@Override
public void start(Stage primaryStage) throws Exception {
    this.primaryStage = primaryStage;
    FXMLLoader loader = new FXMLLoader();
    loader.setLocation(Main.class.getResource("view/Root.fxml"));
    Parent root = loader.load();
    this.primaryStage.setTitle("LA Rotate Tool 1.0.0");
    this.primaryStage.getIcons().add(new Image("file:resources/images/AppIcon.png"));
    this.primaryStage.setScene(new Scene(root));
    this.primaryStage.show();
    controller = loader.getController();
    controller.setMainApp(this);
    loadSetting();
}

[Buggy Hunk]
new Image("file:resources/images/AppIcon.png"));

[Patch]
new Image(Main.class.getResourceAsStream("/images/AppIcon.png")));

[Demonstration 2]

[Buggy Method]
@Override
@Test
public void actionPerformed(ActionEvent e) {
    if (e.getSource() == this._cancel || e.getSource() == this._exit) {
        Init.closeAll();
    } else if (e.getSource() == this._ok) {
        if (_serverAddr.getText().equals("")) {
            Fehlermeldung err = new Fehlermeldung(0, "Eine Verbindung ist nicht m\u00F6glich, denn die Adresse des Zielservers fehlt.");
        } else if (_userID.getText().equals("")) {
            Fehlermeldung err = new Fehlermeldung(0, "Eine Verbindung ist nicht m\u00F6glich, denn die Benutzer-ID fehlt.");
        } else if (_userPW.getText().equals("")) {
            Fehlermeldung err = new Fehlermeldung(0, "Eine Verbindung ist nicht m\u00F6glich, denn das Passwort fehlt.");
        } else {
            if (Com._loginUser(this._serverAddr.getText(), this._userID.getText(), String.valueOf(this._userPW.getText().hashCode()))) {
                Student.init(this._userID.getText(), this._serverAddr.getText());
                //Student.
                if (!this._userID.getText().equals("root")) {
                    this.root.setVisible(false);
                    Init.gruppenzuteilung_einleiten();
                } else {
                    Dozentensicht _do = new Dozentensicht();
                }
            } else {
                Fehlermeldung err = new Fehlermeldung(0, "ID oder Passwort stimmt nicht.");
            }
        }
    } else if (e.getSource() == this._ueber) {
        Ueber ueberUns = new Ueber();
    } else if (e.getSource() == this._testConnect) {
        Com._connect("localhost");
    } else if (e.getSource() == this._addUser) {
        _new = new AccountErstellen(this);
    } else if (e.getSource() == this._serverBeenden) {
        Com._serverClose();
    } else if (e.getSource() == this._addAufgabe) {
        _addAufgabe add = new _addAufgabe();
    } else if (e.getSource() == this._editorStartn) {
        Student.init("dummy", "localhost");
        this.root.setVisible(false);
        Init.aufgabenblatt_initialisieren();
        Editor edit = new Editor();
    } else if (e.getSource() == this._aktiveNutzer) {
        String[] s = Com._getAktiveNutzer("localhost");
        int n = s.length;
        while (n > 0) {
            System.out.println(s[n - 1]);
            n--;
        }
    } else if (e.getSource() == this._dNutzer) {
        Com._dNutzer("localhost", "Dummy");
    } else if (e.getSource() == this._getAufgaben) {
        Com._getAufgabenblatt("localhost", "jan");
    } else if (e.getSource() == this._getAllUser) {
        String[] _n = Com._getAllUser("localhost");
        for (String elem : _n) {
            System.out.println(elem);
        }
    } else if (e.getSource() == this._diagrammErstellen) {
        System.out.println(Com._einzeldiagrammErstellen("localhost", "jan", "1"));
    } else if (e.getSource() == this._neueKlasse) {
        System.out.println(Com._neueKlasse("localhost", "0"));
    } else if (e.getSource() == this._getDiagramm) {
        Com._getDiagramm("192.168.178.63", "jan", "1");
    } else if (e.getSource() == this._new._submit) {
        if (this._new._check()) {
            Com._addUser("#new", this._new._ip.getText(), this._new._id.getText(), this._new._email.getText(), this._new._pw.getText().hashCode());
            this._new.setVisible(false);
        }
    }
}

[Buggy Hunk]
Com._addUser("#new", this._new._ip.getText(), this._new._id.getText(), this._new._email.getText(), this._new._pw.getText().hashCode());

[Patch]
Com._addUser("#new", this._new._ip.getText(), this._new._id.getText(), this._new._email.getText(), this._new._pwfield.getText().hashCode());

[Demonstration 3]

[Buggy Method]
public static Result service(String ownerName, String projectName, String service, boolean isAdvertise) throws IOException, UnsupportedOperationException, ServletException {
    if (!isSupportedService(service)) {
        return forbidden(String.format("Unsupported service: '%s'", service));
    }
    Project project = Project.findByOwnerAndProjectName(ownerName, projectName);
    if (project == null) {
        return notFound();
    }
    models.User user = UserApp.currentUser();
    if (!isAllowed(project, service)) {
        if (user.isAnonymous()) {
            return BasicAuthAction.unauthorized(response());
        } else {
            // If you want the Git client showing your custom message to
            // the user, the Content-Type should be exact "text/plain"
            // without any parameter. For more details, see the code at
            // https://github.com/git/git/commit/426e70d4a11ce3b4f70636d57c6a0ab16ae08a00#diff-eea0ad565ec5903a11b6023755d491cfR154
            response().setHeader("Content-Type", "text/plain");
            return forbidden(String.format("'%s' has no permission to '%s/%s'.", user.name, ownerName, projectName));
        }
    }
    if (isAdvertise) {
        return ok(RepositoryService.gitAdvertise(project, service, response()));
    } else {
        if (request().body().isMaxSizeExceeded()) {
            return status(REQUEST_ENTITY_TOO_LARGE);
        } else {
            user.visits(project);
            return ok(RepositoryService.gitRpc(project, service, request(), response()));
        }
    }
}

[Buggy Hunk]
user.name, ownerName, projectName));

[Patch]
user.loginId, ownerName, projectName));