[Demonstration 1]

[Buggy Method]
public void removeSelected() {
    //remove the building from the placed building list and re-index the grid segments that the building took up
    for (int i = 0; i < selectedList.size(); i++) {
        int xRef = selectedList.get(i)[0];
        int yRef = selectedList.get(i)[1];
        //set the value of the squares to that of an empty square (0)
        settlementGrid[xRef][yRef].setValue(0);
        //set the building index of the segment to -1 to ensure it is not found as a removeable building
        settlementGrid[xRef][yRef].setBuildingID(-1);
    }
    //clear the selected list and remove the building
    selectedList.clear();
    //alter the income to reflect the lost building
    alterIncome(currentBuilding.getName());
    placedBuildingList.remove(selectedBuilding);
}

[Buggy Hunk]
alterIncome(currentBuilding.getName());

[Patch]
alterIncome(currentBuilding.getName(), -1);

[Demonstration 2]

[Buggy Method]
private void handleBlobStoreNotifyOptimizations(NotifyTemplateHolder template, boolean register) {
    if (!_cacheManager.isOffHeapCachePolicy() || !(template.containsNotifyType(NotifyActionType.NOTIFY_TAKE)))
        return;
    if (!register) {
        if (!anyDurableNotifyTakeTemplates() && !anyDurableNotifyTakeTemplates())
            _unallowedClearTakeOptimizationsBlobStore.clear();
    } else
        setBlobStoreClearTakeOptimizationNotAllowed(template.getClassName());
}

[Buggy Hunk]
if (!anyDurableNotifyTakeTemplates() && !anyDurableNotifyTakeTemplates())

[Patch]
if (!anyDurableNotifyTakeTemplates())

[Demonstration 3]

[Buggy Method]
public void handle(Socket socket) throws IOException {
    BufferedReader reader = null;
    PrintStream output = null;
    try {
        String route = null;
        // Read HTTP headers and parse out the route.
        reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
        String line;
        while (!TextUtils.isEmpty(line = reader.readLine())) {
            if (line.startsWith("GET /")) {
                int start = line.indexOf('/') + 1;
                int end = line.indexOf(' ', start);
                route = line.substring(start, end);
                break;
            }
        }
        // Output stream that we send the response to
        output = new PrintStream(socket.getOutputStream());
        final byte[] bytes;
        if (route == null) {
            bytes = null;
        } else if (route.startsWith("getLogList")) {
            final String response = getLogListResponse();
            bytes = response != null ? response.getBytes() : null;
        } else if (route.startsWith("getListByLev")) {
            final String response = getLogListByLev(route);
            bytes = response != null ? response.getBytes() : null;
        } else {
            bytes = NetUtil.loadContent(route, mAssets);
        }
        if (null == bytes) {
            writeServerError(output);
            return;
        }
        // Send out the content.
        output.println("HTTP/1.0 200 OK");
        output.println("Content-Type: " + NetUtil.detectMimeType(route));
        output.println("Content-Length: " + bytes.length);
        output.println();
        output.write(bytes);
        output.flush();
    } finally {
        try {
            if (null != output) {
                output.close();
            }
            if (null != reader) {
                reader.close();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

[Buggy Hunk]
bytes = NetUtil.loadContent(route, mAssets);

[Patch]
bytes = NetUtil.loadContent("logcat/" + route, mAssets);