[Demonstration 1]

[Buggy Method]
/*private-package*/
void highlightMe(SuggestionEntry se) {
    setHighlighted(se);
    ((SearchPanel) getParent().getParent().getParent()).updateHighlight(se.getSubstance().getFormula());
}

[Buggy Hunk]
((SearchPanel)getParent().getParent().getParent())

[Patch]
((SearchPanel)getParent())

[Demonstration 2]

[Buggy Method]
private boolean save() {
    try {
        final Configuration iCurrentConfiguration = this.view.getController().getConfiguration();
        final Configuration iConfiguration = new Configuration();
        // Update Home URL
        iConfiguration.setHome(new Home());
        iConfiguration.setHome(iCurrentConfiguration.getHome());
        iConfiguration.getHome().setUrl(this.homeUrl.getText());
        iConfiguration.getHome().setAutoLoad(this.autoLoad.isSelected());
        // Get All current History
        iConfiguration.setHistoryUrl(iCurrentConfiguration.getHistoryUrl());
        // Update Authentication server
        iConfiguration.setAuthentication(new Authentication());
        if ((this.authenticationServer.getText() != null) && !this.authenticationServer.getText().endsWith("/")) {
            this.authenticationServer.setText(this.authenticationServer.getText() + "/");
        }
        iConfiguration.getAuthentication().setServer(this.authenticationServer.getText());
        // Update Console
        iConfiguration.setConsole(new Configuration.Console());
        if (this.consoleMaxLines.getText().isEmpty()) {
            iConfiguration.getConsole().setMaxLines(Integer.parseInt(this.consoleMaxLines.getText()));
        }
        // Update Console.System
        iConfiguration.getConsole().setSystem(new Configuration.Console.System());
        iConfiguration.getConsole().getSystem().setMaxLines(Integer.parseInt(this.consoleSystemMaxLines.getText()));
        iConfiguration.getConsole().getSystem().setEnableOnStartup(this.consoleSystemEnable.isSelected());
        // Save
        return this.view.getController().save(iConfiguration);
    } catch (final Exception aException) {
        aException.printStackTrace(System.err);
        this.view.displayException(aException);
        return false;
    }
}

[Buggy Hunk]
if ((this.authenticationServer.getText() != null) && !this.authenticationServer.getText().endsWith("/")) {

[Patch]
if ((this.authenticationServer.getText() != null) && !this.authenticationServer.getText().isEmpty() && !this.authenticationServer.getText().endsWith("/")) {

[Demonstration 3]

[Buggy Method]
@Override
protected void configure(HttpSecurity http) throws Exception {
    http.authorizeRequests().antMatchers("/", "/home", "/assets/css/**", "/logout").permitAll().anyRequest().authenticated().and().formLogin().loginPage("/login").permitAll().and().logout().logoutSuccessHandler(new LogoutHandler()).permitAll();
}

[Buggy Hunk]
.logout().logoutSuccessHandler(new LogoutHandler()).permitAll();

[Patch]
.logout().logoutSuccessHandler(logoutHandler).permitAll();