[Demonstration 1]

[Buggy Method]
private void updateReltable(final Element elem) {
    final String hrefValue = elem.getAttribute(ATTRIBUTE_NAME_HREF);
    if (hrefValue.length() != 0) {
        if (changeTable.containsKey(inputFile.resolve(hrefValue).getPath())) {
            URI resulthrefValue = getRelativePath(inputFile.resolve(FILE_NAME_STUB_DITAMAP), inputFile.resolve(hrefValue));
            final String fragment = getFragment(hrefValue);
            if (fragment != null) {
                resulthrefValue = setFragment(resulthrefValue, fragment);
            }
            elem.setAttribute(ATTRIBUTE_NAME_HREF, resulthrefValue.toString());
        }
    }
    final NodeList children = elem.getChildNodes();
    for (int i = 0; i < children.getLength(); i++) {
        final Node current = children.item(i);
        if (current.getNodeType() == Node.ELEMENT_NODE) {
            final Element currentElem = (Element) current;
            final String classValue = currentElem.getAttribute(ATTRIBUTE_NAME_CLASS);
            if (MAP_TOPICREF.matches(classValue)) {
                // FIXME: What should happen here?
            }
        }
    }
}

[Buggy Hunk]
if (changeTable.containsKey(inputFile.resolve(hrefValue).getPath())) {

[Patch]
if (changeTable.containsKey(inputFile.resolve(hrefValue))) {

[Demonstration 2]

[Buggy Method]
int getPoolSize() {
    return sumOfSizes(poolEntryies);
}

[Buggy Hunk]
return sumOfSizes(poolEntryies);

[Patch]
return sumOfSizes(this.poolEntryies);

[Demonstration 3]

[Buggy Method]
private NStack handleDyad(Dyad d) {
    Object b = stack.pop();
    Object a = stack.pop();
    if (d instanceof VectorisableDyadIntInt && (b instanceof IntList || a instanceof IntList)) {
        IntList bList, aList;
        if (b instanceof IntList) {
            bList = (IntList) b;
            if (a instanceof IntList) {
                aList = (IntList) a;
            } else {
                aList = ((VarInteger) a).repeat(bList.size());
            }
        } else {
            aList = (IntList) a;
            bList = ((VarInteger) b).repeat(aList.size());
        }
        IntList list = new IntList();
        for (int i = 0; i < bList.size(); i++) {
            VarInteger bInt = bList.get(i);
            VarInteger aInt = aList.get(i);
            for (Object elem : d.dyad(aInt, bInt)) {
                list.addInt(((VarInteger) elem).getValue());
            }
        }
        return new NStackBuilder(list).build();
    } else if (d instanceof VectorisableDyadListInt && b instanceof IntList) {
        IntList bList, aList = (IntList) a;
        if (b instanceof IntList) {
            bList = (IntList) b;
        } else {
            bList = Util.createSingletonList((VarInteger) b);
        }
        IntList result = new IntList();
        for (int i = 0; i < bList.size(); i++) {
            VarInteger bInt = bList.get(i);
            NStack run = d.dyad(aList, bInt);
            for (Object o : run) {
                result.add((VarInteger) o);
            }
        }
        return new NStackBuilder(result).build();
    } else if (d instanceof VectorisableDyadIntList && a instanceof IntList && b instanceof IntList) {
        IntList aList, bList = (IntList) b;
        if (a instanceof IntList) {
            aList = (IntList) a;
        } else {
            aList = Util.createSingletonList((VarInteger) a);
        }
        IntList result = new IntList();
        for (int i = 0; i < aList.size(); i++) {
            VarInteger aInt = aList.get(i);
            NStack run = d.dyad(aInt, bList);
            for (Object o : run) {
                result.add((VarInteger) o);
            }
        }
        return new NStackBuilder(result).build();
    }
    return d.dyad(a, b);
}

[Buggy Hunk]
list.addInt(((VarInteger) elem).getValue());

[Patch]
list.add(((VarInteger) elem));