[Demonstration 1]

[Buggy Method]
public void loadFrom(File dir) throws IOException {
    File file = new File(dir, "data.gz");
    if (!file.exists()) {
        return;
    }
    InputStream fin = null;
    InputStream gzin = null;
    String data;
    try {
        fin = new FileInputStream(file);
        gzin = new GzipCompressorInputStream(fin);
        data = IOUtils.toString(gzin, Charsets.UTF_8);
    } finally {
        IOUtils.closeQuietly(fin);
        IOUtils.closeQuietly(gzin);
    }
    clearMessages();
    allChannels.clear();
    allPms.clear();
    JsonObject root = gson.fromJson(data, JsonObject.class);
    Type type = TypeUtils.parameterize(List.class, ChatMessage.class);
    List<Message> def = gson.fromJson(root.get("default"), type);
    ChatChannel.DEFAULT_CHANNEL.getMessages().addAll(def);
    JsonObject chans = root.get("chans").getAsJsonObject();
    readJson(chans, false);
    JsonObject pms = root.get("pms").getAsJsonObject();
    readJson(pms, true);
    // active channels
    JsonObject active = root.get("active").getAsJsonObject();
    JsonArray achans = active.get("chans").getAsJsonArray();
    for (JsonElement e : achans) {
        addChannel(getChannel(e.getAsString(), false));
    }
    JsonArray apms = active.get("pms").getAsJsonArray();
    for (JsonElement e : apms) {
        addChannel(getChannel(e.getAsString(), true));
    }
}

[Buggy Hunk]
public void loadFrom(File dir) throws IOException {

[Patch]
void loadFrom(File dir) throws IOException {

[Demonstration 2]

[Buggy Method]
public void forceInform() {
    dirs.values().forEach(d -> d.forceInform());
}

[Buggy Hunk]
dirs.values().forEach(d -> d.forceInform());

[Patch]
dirs.values().forEach(Directory::forceInform);

[Demonstration 3]

[Buggy Method]
public void initialize() throws IOException {
    readFromFeatureTxt();
    for (int i = FEAT_INDIVIDUAL_FEAT; i <= FEAT_RESTAURANT_NAME_SPL; ++i) createFeatures(i);
}

[Buggy Hunk]
for(int i = FEAT_INDIVIDUAL_FEAT; i <= FEAT_RESTAURANT_NAME_SPL; ++i)

[Patch]
for(int i = FEAT_INDIVIDUAL_NAME; i <= FEAT_RESTAURANT_FEAT; ++i)