[Demonstration 1]

[Buggy Method]
public Map<String, String> getPrefixMappings() throws IOException {
    URL prefixMappingsURL = new URL(zoomaServicesBase + "prefixMappings");
    ObjectMapper mapper = new ObjectMapper();
    Map<String, String> results = mapper.readValue(prefixMappingsURL, new TypeReference<Map<String, String>>() {
    });
    getLog().trace(results.toString());
    return results;
}

[Buggy Hunk]
getLog().trace(results.toString());

[Patch]
log.trace(results.toString());

[Demonstration 2]

[Buggy Method]
private void processSpeechRecognitionResults(List<String> matches) {
    view.getLog().info(TAG, "Checking speech recognition results");
    view.setSpeechProgress(STATUS_ANALYSIS);
    view.showMessage("You said: " + matches.get(0), false);
    for (String match : matches) {
        view.getLog().info(TAG, "Match: " + match);
        for (String word : match.split(" ")) {
            word = StringUtils.removeAccents(word);
            if (currentActions.containsKey(word)) {
                UIAction action = currentActions.get(word);
                if (action.isActive) {
                    view.getLog().info(TAG, "Word '" + word + "' matches active action!");
                    stopSpeechRecognition();
                    action.doAction();
                    return;
                }
            }
        }
    }
    view.getLog().info(TAG, "Did not recognize a usable match: starting to listen again!");
    startSpeechRecognition();
}

[Buggy Hunk]
view.showMessage("You said: " + matches.get(0), false);

[Patch]
view.showMessage(view.getIString(YOU_SAID) + " " + matches.get(0), false);

[Demonstration 3]

[Buggy Method]
private void stopWriter() {
    Logger.getLogger(this.getClass().getName()).info("Stopping writer");
    //stop dummy threads if needed
    if (n_user > 1) {
        for (int i = 0; i < n_user - 1; i++) {
            dummies[i].cancel();
        }
        if (n_user > threshold) {
            for (int i = 0; i < n_user - threshold; i++) {
                remoteDummies[i].cancel();
            }
        }
    }
    //after reader finish, stop writer
    writer.cancel();
}

[Buggy Hunk]
for (int i = 0; i < n_user - 1; i++) {

[Patch]
for (int i = 0; i < n_LocalThread - 1; i++) {