[Demonstration 1]

[Buggy Method]
public void setFault(Fault fault) {
    this.fault = fault;
}

[Buggy Hunk]
public void setFault(Fault fault) {

[Patch]
public void setFault(final Fault fault) {

[Demonstration 2]

[Buggy Method]
@Override
public void copy(int slot, int doc) {
    int ord = termsIndex.getOrd(doc);
    if (ord == -1) {
        ords[slot] = NULL_ORD;
        values[slot] = null;
    } else {
        ords[slot] = ord;
        assert ord >= 0;
        if (values[slot] == null) {
            values[slot] = new BytesRef();
        }
        termsIndex.lookupOrd(ord, values[slot]);
    }
    readerGen[slot] = currentReaderGen;
}

[Buggy Hunk]
termsIndex.lookupOrd(ord, values[slot]);

[Patch]
termsIndex.lookupOrd(ord);

[Demonstration 3]

[Buggy Method]
public String getFieldContent(int docId, String field) throws IOException {
    BytesRef bytes = new BytesRef(NumericUtils.BUF_SIZE_INT);
    NumericUtils.intToPrefixCoded(docId, 0, bytes);
    Term dt = new Term(FIELD_DOC_ID, bytes);
    IndexReader reader = null;
    try {
        reader = index.getReader();
        List<AtomicReaderContext> leaves = reader.leaves();
        for (AtomicReaderContext context : leaves) {
            DocsEnum docs = context.reader().termDocsEnum(dt);
            if (docs.nextDoc() != DocsEnum.NO_MORE_DOCS) {
                Document doc = reader.document(docs.docID());
                return doc.get(field);
            }
        }
    } finally {
        index.releaseReader(reader);
    }
    return null;
}

[Buggy Hunk]
if (docs.nextDoc() != DocsEnum.NO_MORE_DOCS) {

[Patch]
if (docs != null && docs.nextDoc() != DocsEnum.NO_MORE_DOCS) {