[Demonstration 1]

[Buggy Method]
private String removePunctuation(String currentString) {
    String punctuation = ".,'?!:;\"(){}^[]<>- ";
    String scrubbedString = "";
    for (int i = 0; i < currentString.length(); i++) ;
    {
        if (punctuation.indexOf(currentString.charAt(i)) == -1) {
            scrubbedString += currentString.charAt(i);
        }
    }
    return scrubbedString;
}

[Buggy Hunk]
for (int i = 0; i < currentString.length(); i++);

[Patch]
for (int i = 0; i < currentString.length(); i++)

[Demonstration 2]

[Buggy Method]
public boolean knowMap(int tileX, int tileY) {
    if (tileX < 0 || tileX >= width || tileY < 0 || tileY >= height)
        return false;
    int mapX = tileX / DISCOVER_DIVIDER;
    int mapY = tileY / DISCOVER_DIVIDER;
    int index = mapX + mapY * (width / DISCOVER_DIVIDER);
    return mapLoaded[index];
}

[Buggy Hunk]
int index = mapX + mapY * (width / DISCOVER_DIVIDER);

[Patch]
int index = mapX + mapY * getLoadedWidth(this);

[Demonstration 3]

[Buggy Method]
public Object require(String path) throws ScriptException {
    String originalPath = path;
    if (!entityPathContext.entityExist(path + ".js")) {
        String[] components = PathUtil.splitComponents(path);
        String[] newComponents = new String[components.length + 1];
        for (int i = 0; i < components.length; i++) {
            newComponents[i] = components[i];
        }
        newComponents[components.length] = "index";
        boolean isRoot = true;
        path = PathUtil.pathFromComponents(newComponents, isRoot);
        if (!entityPathContext.entityExist(path + ".js")) {
            throw new ScriptException("require not found `" + originalPath + "`");
        }
    }
    EntityPathContext.ContextResult result = entityPathContext.findFileAndParentContext(path);
    Object requiredObject = rootScriptContext.requiredCache.get(result);
    if (requiredObject == null) {
        ScriptContext subcontext = new ScriptContext(rootScriptContext, result.getContext(), runtimeContext);
        InputStream inputStream = entityPathContext.inputStreamOfFile(path);
        requiredObject = subcontext.loadScriptFile(inputStream);
        rootScriptContext.requiredCache.put(result, requiredObject);
    }
    return requiredObject;
}

[Buggy Hunk]
InputStream inputStream = entityPathContext.inputStreamOfFile(path);

[Patch]
InputStream inputStream = entityPathContext.inputStreamOfFile(path + ".js");