nus-yam/ex-repair huggingface dataset:
Program: 22105
Project: 22105
Buggy source:
public Hit(int position,int startOffset,int endOffset,float weight,int source){
  this.position=position;
  this.startOffset=startOffset;
  this.endOffset=endOffset;
  this.weight=weight;
  this.source=source;
}

Fixed version (ground truth):
public Hit(int position,int startOffset,int endOffset,float queryWeight,float corpusWeight,int source){
  this.position=position;
  this.startOffset=startOffset;
  this.endOffset=endOffset;
  this.queryWeight=queryWeight;
  this.corpusWeight=corpusWeight;
  this.source=source;
}
Program: 22106
Project: 22106
Buggy source:
/** 
 * Record a list of enums.
 * @param positionGap positions between enums
 * @param offsetGap offsets between enums
 */
public void record(Iterator<HitEnumAndLength> enums,int positionGap,int offsetGap){
  int relativePosition=0;
  int relativeOffset=0;
  while (enums.hasNext()) {
    HitEnumAndLength e=enums.next();
    int position=0;
    int endOffset=0;
    while (e.delegate().next()) {
      position=e.delegate().position();
      endOffset=e.delegate().endOffset();
      record(position + relativePosition,e.delegate().startOffset() + relativeOffset,endOffset + relativeOffset,e.delegate().weight(),e.delegate().source());
    }
    relativePosition+=position + positionGap;
    relativeOffset+=e.length + offsetGap;
  }
}

Fixed version (ground truth):
/** 
 * Record a list of enums.
 * @param positionGap positions between enums
 * @param offsetGap offsets between enums
 */
public void record(Iterator<HitEnumAndLength> enums,int positionGap,int offsetGap){
  int relativePosition=0;
  int relativeOffset=0;
  while (enums.hasNext()) {
    HitEnumAndLength e=enums.next();
    int position=0;
    int endOffset=0;
    while (e.delegate().next()) {
      position=e.delegate().position();
      endOffset=e.delegate().endOffset();
      record(position + relativePosition,e.delegate().startOffset() + relativeOffset,endOffset + relativeOffset,e.delegate().queryWeight(),e.delegate().corpusWeight(),e.delegate().source());
    }
    relativePosition+=position + positionGap;
    relativeOffset+=e.length + offsetGap;
  }
}
Program: 22107
Project: 22107
Buggy source:
@Override public String toString(){
  return String.format(Locale.ENGLISH,"String_Node_Str",weight,position);
}

Fixed version (ground truth):
@Override public String toString(){
  return String.format(Locale.ENGLISH,"String_Node_Str",queryWeight * corpusWeight,position);
}
Program: 22108
Project: 22108
Buggy source:
@Override protected boolean keep(){
  return wrapped().weight() > cutoff;
}

Fixed version (ground truth):
@Override protected boolean keep(){
  return wrapped().queryWeight() * wrapped().corpusWeight() > cutoff;
}
Program: 22109
Project: 22109
Buggy source:
private PhraseCandidate(){
  matchedPositions=new int[phrase.length];
  matchedPositions[0]=wrapped.position();
  matchedSources=new int[phrase.length];
  matchedSources[0]=wrapped.source();
  phrasePosition=1;
}

Fixed version (ground truth):
private PhraseCandidate(){
  matchedPositions=new int[phrase.length];
  matchedPositions[0]=wrapped.position();
  matchedSources=new int[phrase.length];
  matchedSources[0]=wrapped.source();
  horizon=matchedPositions[0] + phrase.length + phraseSlop - 1;
  phrasePosition=1;
}
Program: 22110
Project: 22110
Buggy source:
private boolean acceptsCurrent(){
  int index=Arrays.binarySearch(phrase[phrasePosition],wrapped.source());
  if (index >= 0) {
    lastIndex++;
    matchedPositions[lastIndex]=wrapped.position();
    matchedSources[lastIndex]=wrapped.source();
    phrasePosition++;
    return true;
  }
  return wrapped.position() <= matchedPositions[lastIndex] + phraseSlop;
}

Fixed version (ground truth):
private boolean acceptsCurrent(){
  int distanceLeft=horizon - wrapped.position();
  if (distanceLeft < 0) {
    return false;
  }
  int index=Arrays.binarySearch(phrase[phrasePosition],wrapped.source());
  if (index >= 0) {
    lastIndex++;
    matchedPositions[lastIndex]=wrapped.position();
    matchedSources[lastIndex]=wrapped.source();
    phrasePosition++;
    return true;
  }
  return distanceLeft >= 1;
}
Program: 22111
Project: 22111
Buggy source:
/** 
 * Copies the contents of the queue in heap order. If you need them in any particular order, you should sort them.
 */
public List<ProtoSnippet> contents(){
  List<ProtoSnippet> snippets=new ArrayList<ProtoSnippet>(size());
  Object[] heapArray=getHeapArray();
  for (int i=0; i < heapArray.length; i++) {
    Object o=heapArray[i];
    if (o == null) {
      continue;
    }
    snippets.add((ProtoSnippet)o);
  }
  return snippets;
}

Fixed version (ground truth):
/** 
 * Copies the contents of the queue in heap order. If you need them in any particular order, you should sort them.
 */
public ProtoSnippet[] contents(){
  ProtoSnippet[] snippets=new ProtoSnippet[size()];
  Object[] heapArray=getHeapArray();
  int s=0;
  for (int i=0; i < heapArray.length; i++) {
    Object o=heapArray[i];
    if (o == null) {
      continue;
    }
    snippets[s++]=(ProtoSnippet)o;
  }
  return snippets;
}
Program: 22112
Project: 22112
Buggy source:
@Override protected List<Snippet> results(State state){
  ProtoSnippet[] protos=state.results.contents().toArray(new ProtoSnippet[state.results.contents().size()]);
  Arrays.sort(protos,ProtoSnippetComparators.OFFSETS);
  int lastSnippetEnd=0;
  for (  ProtoSnippet proto : protos) {
    proto.pickedBounds=proto.memo.pickBounds(lastSnippetEnd,Integer.MAX_VALUE);
    lastSnippetEnd=proto.pickedBounds.endOffset();
  }
  if (scoreOrdered) {
    Arrays.sort(protos,ProtoSnippetComparators.WEIGHT);
  }
  List<Snippet> results=new ArrayList<Snippet>(protos.length);
  for (  ProtoSnippet proto : protos) {
    results.add(new Snippet(proto.pickedBounds.startOffset(),proto.pickedBounds.endOffset(),proto.hits));
  }
  return results;
}

Fixed version (ground truth):
@Override protected List<Snippet> results(State state){
  ProtoSnippet[] protos=state.results.contents();
  Arrays.sort(protos,ProtoSnippetComparators.OFFSETS);
  int lastSnippetEnd=0;
  for (  ProtoSnippet proto : protos) {
    proto.pickedBounds=proto.memo.pickBounds(lastSnippetEnd,Integer.MAX_VALUE);
    lastSnippetEnd=proto.pickedBounds.endOffset();
  }
  if (scoreOrdered) {
    Arrays.sort(protos,ProtoSnippetComparators.WEIGHT);
  }
  List<Snippet> results=new ArrayList<Snippet>(protos.length);
  for (  ProtoSnippet proto : protos) {
    results.add(new Snippet(proto.pickedBounds.startOffset(),proto.pickedBounds.endOffset(),proto.hits));
  }
  return results;
}
Program: 22113
Project: 22113
Buggy source:
@Test public void moreSlop(){
  slop(3);
  phrase(0,1,2,4,5,2);
  inputs(0,1,2,2,2,4,4,4,4,5,1);
  result(2,2,2,1,1,2,1,1,1,2,1);
}

Fixed version (ground truth):
@Test public void moreSlop(){
  slop(3);
  phrase(0,1,2,4,5,2);
  inputs(0,1,2,2,2,4,4,5,1);
  result(2,2,2,1,1,2,1,2,1);
  slop(4);
  inputs(0,1,2,2,2,4,4,5,1);
  result(2,2,2,1,1,2,1,2,1);
  slop(2);
  inputs(0,1,2,2,2,4,4,5,1);
  result(1,1,1,1,1,1,1,1,1);
}
Program: 22114
Project: 22114
Buggy source:
public HitEnum buildHitEnum() throws IOException {
  HitEnum e=buildHitEnumForSource();
  e=weigher.wrap(e);
  FieldOptions options=context.field.fieldOptions();
  if (!options.scoreOrdered()) {
    Boolean topScoring=(Boolean)executionContext.getOption("String_Node_Str");
    if (topScoring == null || !topScoring) {
      e=new WeightFilteredHitEnumWrapper(e,0f);
      return e;
    }
  }
  @SuppressWarnings("String_Node_Str") Map<String,Object> boostBefore=(Map<String,Object>)executionContext.getOption("String_Node_Str");
  if (boostBefore != null) {
    TreeMap<Integer,Float> ordered=new TreeMap<Integer,Float>();
    for (    Map.Entry<String,Object> entry : boostBefore.entrySet()) {
      if (!(entry.getValue() instanceof Number)) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      ordered.put(Integer.valueOf(entry.getKey()),((Number)entry.getValue()).floatValue());
    }
    PositionBoostingHitEnumWrapper boosting=new PositionBoostingHitEnumWrapper(e);
    e=boosting;
    for (    Map.Entry<Integer,Float> entry : ordered.entrySet()) {
      boosting.add(entry.getKey(),entry.getValue());
    }
  }
  e=new WeightFilteredHitEnumWrapper(e,0f);
  return e;
}

Fixed version (ground truth):
public HitEnum buildHitEnum() throws IOException {
  HitEnum e=buildHitEnumForSource();
  e=weigher.wrap(context.fieldName,e);
  FieldOptions options=context.field.fieldOptions();
  if (!options.scoreOrdered()) {
    Boolean topScoring=(Boolean)executionContext.getOption("String_Node_Str");
    if (topScoring == null || !topScoring) {
      e=new WeightFilteredHitEnumWrapper(e,0f);
      return e;
    }
  }
  @SuppressWarnings("String_Node_Str") Map<String,Object> boostBefore=(Map<String,Object>)executionContext.getOption("String_Node_Str");
  if (boostBefore != null) {
    TreeMap<Integer,Float> ordered=new TreeMap<Integer,Float>();
    for (    Map.Entry<String,Object> entry : boostBefore.entrySet()) {
      if (!(entry.getValue() instanceof Number)) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      ordered.put(Integer.valueOf(entry.getKey()),((Number)entry.getValue()).floatValue());
    }
    PositionBoostingHitEnumWrapper boosting=new PositionBoostingHitEnumWrapper(e);
    e=boosting;
    for (    Map.Entry<Integer,Float> entry : ordered.entrySet()) {
      boosting.add(entry.getKey(),entry.getValue());
    }
  }
  e=new WeightFilteredHitEnumWrapper(e,0f);
  return e;
}
Program: 22115
Project: 22115
Buggy source:
protected void flattenQuery(MultiPhrasePrefixQuery query,float pathBoost,Object sourceOverride,IndexReader reader,Callback callback){
  List<Term[]> termArrays=query.getTermArrays();
  float boost=pathBoost * query.getBoost();
  if (termArrays.isEmpty()) {
    return;
  }
  int sizeMinus1=termArrays.size() - 1;
  if (phraseAsTerms()) {
    for (int i=0; i < sizeMinus1; i++) {
      Term[] termArray=termArrays.get(i);
      for (int t=0; t < termArray.length; t++) {
        callback.flattened(termArray[t].bytes(),boost,sourceOverride);
      }
    }
    for (    Term term : termArrays.get(sizeMinus1)) {
      flattenPrefixQuery(term.bytes(),boost,sourceOverride,callback);
    }
  }
 else {
    callback.startPhrase(termArrays.size());
    for (int i=0; i < sizeMinus1; i++) {
      Term[] termArray=termArrays.get(i);
      callback.startPhrasePosition(termArray.length);
      for (int t=0; t < termArray.length; t++) {
        callback.flattened(termArray[t].bytes(),0,sourceOverride);
      }
      callback.endPhrasePosition();
    }
    callback.startPhrasePosition(termArrays.get(sizeMinus1).length);
    for (    Term term : termArrays.get(sizeMinus1)) {
      flattenPrefixQuery(term.bytes(),0,sourceOverride,callback);
    }
    callback.endPhrasePosition();
    callback.endPhrase(query.getSlop(),boost);
  }
}

Fixed version (ground truth):
protected void flattenQuery(MultiPhrasePrefixQuery query,float pathBoost,Object sourceOverride,IndexReader reader,Callback callback){
  List<Term[]> termArrays=query.getTermArrays();
  float boost=pathBoost * query.getBoost();
  if (termArrays.isEmpty()) {
    return;
  }
  int sizeMinus1=termArrays.size() - 1;
  if (phraseAsTerms()) {
    for (int i=0; i < sizeMinus1; i++) {
      Term[] termArray=termArrays.get(i);
      for (int t=0; t < termArray.length; t++) {
        callback.flattened(termArray[t].bytes(),boost,sourceOverride);
      }
    }
    for (    Term term : termArrays.get(sizeMinus1)) {
      flattenPrefixQuery(term.bytes(),boost,sourceOverride,callback);
    }
  }
 else {
    callback.startPhrase(termArrays.size());
    for (int i=0; i < sizeMinus1; i++) {
      Term[] termArray=termArrays.get(i);
      callback.startPhrasePosition(termArray.length);
      for (int t=0; t < termArray.length; t++) {
        callback.flattened(termArray[t].bytes(),0,sourceOverride);
      }
      callback.endPhrasePosition();
    }
    callback.startPhrasePosition(termArrays.get(sizeMinus1).length);
    for (    Term term : termArrays.get(sizeMinus1)) {
      flattenPrefixQuery(term.bytes(),0,sourceOverride,callback);
    }
    callback.endPhrasePosition();
    callback.endPhrase(query.getField(),query.getSlop(),boost);
  }
}
Program: 22117
Project: 22117
Buggy source:
/** 
 * Called to mark the end of a phrase.
 */
void endPhrase(int slop,float weight);

Fixed version (ground truth):
/** 
 * Called to mark the end of a phrase.
 */
void endPhrase(String field,int slop,float weight);
Program: 22118
Project: 22118
Buggy source:
private PhraseCandidate(){
  matchedPositions=new int[phrase.length];
  matchedPositions[0]=wrapped.position();
  matchedSources=new int[phrase.length];
  matchedSources[0]=wrapped.source();
  phrasePosition=1;
}

Fixed version (ground truth):
private PhraseCandidate(){
  matchedPositions=new int[phrase.length];
  matchedPositions[0]=wrapped.position();
  matchedSources=new int[phrase.length];
  matchedSources[0]=wrapped.source();
  horizon=matchedPositions[0] + phrase.length + phraseSlop - 1;
  phrasePosition=1;
}
Program: 22119
Project: 22119
Buggy source:
private boolean acceptsCurrent(){
  int index=Arrays.binarySearch(phrase[phrasePosition],wrapped.source());
  if (index >= 0) {
    lastIndex++;
    matchedPositions[lastIndex]=wrapped.position();
    matchedSources[lastIndex]=wrapped.source();
    phrasePosition++;
    return true;
  }
  return wrapped.position() <= matchedPositions[lastIndex] + phraseSlop;
}

Fixed version (ground truth):
private boolean acceptsCurrent(){
  int distanceLeft=horizon - wrapped.position();
  if (distanceLeft < 0) {
    return false;
  }
  int index=Arrays.binarySearch(phrase[phrasePosition],wrapped.source());
  if (index >= 0) {
    lastIndex++;
    matchedPositions[lastIndex]=wrapped.position();
    matchedSources[lastIndex]=wrapped.source();
    phrasePosition++;
    return true;
  }
  return distanceLeft >= 1;
}
Program: 22120
Project: 22120
Buggy source:
/** 
 * Copies the contents of the queue in heap order. If you need them in any particular order, you should sort them.
 */
public List<ProtoSnippet> contents(){
  List<ProtoSnippet> snippets=new ArrayList<ProtoSnippet>(size());
  Object[] heapArray=getHeapArray();
  for (int i=0; i < heapArray.length; i++) {
    Object o=heapArray[i];
    if (o == null) {
      continue;
    }
    snippets.add((ProtoSnippet)o);
  }
  return snippets;
}

Fixed version (ground truth):
/** 
 * Copies the contents of the queue in heap order. If you need them in any particular order, you should sort them.
 */
public ProtoSnippet[] contents(){
  ProtoSnippet[] snippets=new ProtoSnippet[size()];
  Object[] heapArray=getHeapArray();
  int s=0;
  for (int i=0; i < heapArray.length; i++) {
    Object o=heapArray[i];
    if (o == null) {
      continue;
    }
    snippets[s++]=(ProtoSnippet)o;
  }
  return snippets;
}
Program: 22121
Project: 22121
Buggy source:
@Override protected List<Snippet> results(State state){
  ProtoSnippet[] protos=state.results.contents().toArray(new ProtoSnippet[state.results.contents().size()]);
  Arrays.sort(protos,ProtoSnippetComparators.OFFSETS);
  int lastSnippetEnd=0;
  for (  ProtoSnippet proto : protos) {
    proto.pickedBounds=proto.memo.pickBounds(lastSnippetEnd,Integer.MAX_VALUE);
    lastSnippetEnd=proto.pickedBounds.endOffset();
  }
  if (scoreOrdered) {
    Arrays.sort(protos,ProtoSnippetComparators.WEIGHT);
  }
  List<Snippet> results=new ArrayList<Snippet>(protos.length);
  for (  ProtoSnippet proto : protos) {
    results.add(new Snippet(proto.pickedBounds.startOffset(),proto.pickedBounds.endOffset(),proto.hits));
  }
  return results;
}

Fixed version (ground truth):
@Override protected List<Snippet> results(State state){
  ProtoSnippet[] protos=state.results.contents();
  Arrays.sort(protos,ProtoSnippetComparators.OFFSETS);
  int lastSnippetEnd=0;
  for (  ProtoSnippet proto : protos) {
    proto.pickedBounds=proto.memo.pickBounds(lastSnippetEnd,Integer.MAX_VALUE);
    lastSnippetEnd=proto.pickedBounds.endOffset();
  }
  if (scoreOrdered) {
    Arrays.sort(protos,ProtoSnippetComparators.WEIGHT);
  }
  List<Snippet> results=new ArrayList<Snippet>(protos.length);
  for (  ProtoSnippet proto : protos) {
    results.add(new Snippet(proto.pickedBounds.startOffset(),proto.pickedBounds.endOffset(),proto.hits));
  }
  return results;
}
Program: 22122
Project: 22122
Buggy source:
@Test public void moreSlop(){
  slop(3);
  phrase(0,1,2,4,5,2);
  inputs(0,1,2,2,2,4,4,4,4,5,1);
  result(2,2,2,1,1,2,1,1,1,2,1);
}

Fixed version (ground truth):
@Test public void moreSlop(){
  slop(3);
  phrase(0,1,2,4,5,2);
  inputs(0,1,2,2,2,4,4,5,1);
  result(2,2,2,1,1,2,1,2,1);
  slop(4);
  inputs(0,1,2,2,2,4,4,5,1);
  result(2,2,2,1,1,2,1,2,1);
  slop(2);
  inputs(0,1,2,2,2,4,4,5,1);
  result(1,1,1,1,1,1,1,1,1);
}
Program: 22123
Project: 22123
Buggy source:
public HitEnum buildHitEnum() throws IOException {
  HitEnum e=buildHitEnumForSource();
  e=weigher.wrap(e);
  FieldOptions options=context.field.fieldOptions();
  if (!options.scoreOrdered()) {
    Boolean topScoring=(Boolean)executionContext.getOption("String_Node_Str");
    if (topScoring == null || !topScoring) {
      e=new WeightFilteredHitEnumWrapper(e,0f);
      return e;
    }
  }
  @SuppressWarnings("String_Node_Str") Map<String,Object> boostBefore=(Map<String,Object>)executionContext.getOption("String_Node_Str");
  if (boostBefore != null) {
    TreeMap<Integer,Float> ordered=new TreeMap<Integer,Float>();
    for (    Map.Entry<String,Object> entry : boostBefore.entrySet()) {
      if (!(entry.getValue() instanceof Number)) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      ordered.put(Integer.valueOf(entry.getKey()),((Number)entry.getValue()).floatValue());
    }
    PositionBoostingHitEnumWrapper boosting=new PositionBoostingHitEnumWrapper(e);
    e=boosting;
    for (    Map.Entry<Integer,Float> entry : ordered.entrySet()) {
      boosting.add(entry.getKey(),entry.getValue());
    }
  }
  e=new WeightFilteredHitEnumWrapper(e,0f);
  return e;
}

Fixed version (ground truth):
public HitEnum buildHitEnum() throws IOException {
  HitEnum e=buildHitEnumForSource();
  e=weigher.wrap(context.fieldName,e);
  FieldOptions options=context.field.fieldOptions();
  if (!options.scoreOrdered()) {
    Boolean topScoring=(Boolean)executionContext.getOption("String_Node_Str");
    if (topScoring == null || !topScoring) {
      e=new WeightFilteredHitEnumWrapper(e,0f);
      return e;
    }
  }
  @SuppressWarnings("String_Node_Str") Map<String,Object> boostBefore=(Map<String,Object>)executionContext.getOption("String_Node_Str");
  if (boostBefore != null) {
    TreeMap<Integer,Float> ordered=new TreeMap<Integer,Float>();
    for (    Map.Entry<String,Object> entry : boostBefore.entrySet()) {
      if (!(entry.getValue() instanceof Number)) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      ordered.put(Integer.valueOf(entry.getKey()),((Number)entry.getValue()).floatValue());
    }
    PositionBoostingHitEnumWrapper boosting=new PositionBoostingHitEnumWrapper(e);
    e=boosting;
    for (    Map.Entry<Integer,Float> entry : ordered.entrySet()) {
      boosting.add(entry.getKey(),entry.getValue());
    }
  }
  e=new WeightFilteredHitEnumWrapper(e,0f);
  return e;
}
Program: 22124
Project: 22124
Buggy source:
protected void flattenQuery(MultiPhrasePrefixQuery query,float pathBoost,Object sourceOverride,IndexReader reader,Callback callback){
  List<Term[]> termArrays=query.getTermArrays();
  float boost=pathBoost * query.getBoost();
  if (termArrays.isEmpty()) {
    return;
  }
  int sizeMinus1=termArrays.size() - 1;
  if (phraseAsTerms()) {
    for (int i=0; i < sizeMinus1; i++) {
      Term[] termArray=termArrays.get(i);
      for (int t=0; t < termArray.length; t++) {
        callback.flattened(termArray[t].bytes(),boost,sourceOverride);
      }
    }
    for (    Term term : termArrays.get(sizeMinus1)) {
      flattenPrefixQuery(term.bytes(),boost,sourceOverride,callback);
    }
  }
 else {
    callback.startPhrase(termArrays.size());
    for (int i=0; i < sizeMinus1; i++) {
      Term[] termArray=termArrays.get(i);
      callback.startPhrasePosition(termArray.length);
      for (int t=0; t < termArray.length; t++) {
        callback.flattened(termArray[t].bytes(),0,sourceOverride);
      }
      callback.endPhrasePosition();
    }
    callback.startPhrasePosition(termArrays.get(sizeMinus1).length);
    for (    Term term : termArrays.get(sizeMinus1)) {
      flattenPrefixQuery(term.bytes(),0,sourceOverride,callback);
    }
    callback.endPhrasePosition();
    callback.endPhrase(query.getSlop(),boost);
  }
}

Fixed version (ground truth):
protected void flattenQuery(MultiPhrasePrefixQuery query,float pathBoost,Object sourceOverride,IndexReader reader,Callback callback){
  List<Term[]> termArrays=query.getTermArrays();
  float boost=pathBoost * query.getBoost();
  if (termArrays.isEmpty()) {
    return;
  }
  int sizeMinus1=termArrays.size() - 1;
  if (phraseAsTerms()) {
    for (int i=0; i < sizeMinus1; i++) {
      Term[] termArray=termArrays.get(i);
      for (int t=0; t < termArray.length; t++) {
        callback.flattened(termArray[t].bytes(),boost,sourceOverride);
      }
    }
    for (    Term term : termArrays.get(sizeMinus1)) {
      flattenPrefixQuery(term.bytes(),boost,sourceOverride,callback);
    }
  }
 else {
    callback.startPhrase(termArrays.size());
    for (int i=0; i < sizeMinus1; i++) {
      Term[] termArray=termArrays.get(i);
      callback.startPhrasePosition(termArray.length);
      for (int t=0; t < termArray.length; t++) {
        callback.flattened(termArray[t].bytes(),0,sourceOverride);
      }
      callback.endPhrasePosition();
    }
    callback.startPhrasePosition(termArrays.get(sizeMinus1).length);
    for (    Term term : termArrays.get(sizeMinus1)) {
      flattenPrefixQuery(term.bytes(),0,sourceOverride,callback);
    }
    callback.endPhrasePosition();
    callback.endPhrase(query.getField(),query.getSlop(),boost);
  }
}
Program: 22126
Project: 22126
Buggy source:
/** 
 * Called to mark the end of a phrase.
 */
void endPhrase(int slop,float weight);

Fixed version (ground truth):
/** 
 * Called to mark the end of a phrase.
 */
void endPhrase(String field,int slop,float weight);
Program: 22127
Project: 22127
Buggy source:
@Override public boolean next(){
  if (position == -1) {
    endOffset=itr.next();
  }
 else {
    startOffset=endOffset;
    endOffset=itr.next();
  }
  position++;
  if (endOffset == BreakIterator.DONE) {
    return false;
  }
 else {
    weight=weigher.weight(position,startOffset,endOffset);
    return true;
  }
}

Fixed version (ground truth):
@Override public boolean next(){
  if (position == -1) {
    endOffset=itr.next();
  }
 else {
    startOffset=endOffset;
    endOffset=itr.next();
  }
  position++;
  if (endOffset == BreakIterator.DONE) {
    return false;
  }
 else {
    queryWeight=queryWeigher.weight(position,startOffset,endOffset);
    corpusWeight=corpusWeigher.weight(position,startOffset,endOffset);
    return true;
  }
}
Program: 22128
Project: 22128
Buggy source:
public BreakIteratorHitEnum(BreakIterator itr,HitWeigher weigher){
  this.itr=itr;
  this.weigher=weigher;
  startOffset=itr.first();
}

Fixed version (ground truth):
public BreakIteratorHitEnum(BreakIterator itr,HitWeigher queryWeigher,HitWeigher corpusWeigher){
  this.itr=itr;
  this.queryWeigher=queryWeigher;
  this.corpusWeigher=corpusWeigher;
  startOffset=itr.first();
}
Program: 22129
Project: 22129
Buggy source:
/** 
 * Record the current position of e.
 */
public void recordCurrent(HitEnum e){
  record(e.position(),e.startOffset(),e.endOffset(),e.weight(),e.source());
}

Fixed version (ground truth):
/** 
 * Record the current position of e.
 */
public void recordCurrent(HitEnum e){
  record(e.position(),e.startOffset(),e.endOffset(),e.queryWeight(),e.corpusWeight(),e.source());
}
Program: 22130
Project: 22130
Buggy source:
public Hit(int position,int startOffset,int endOffset,float weight,int source){
  this.position=position;
  this.startOffset=startOffset;
  this.endOffset=endOffset;
  this.weight=weight;
  this.source=source;
}

Fixed version (ground truth):
public Hit(int position,int startOffset,int endOffset,float queryWeight,float corpusWeight,int source){
  this.position=position;
  this.startOffset=startOffset;
  this.endOffset=endOffset;
  this.queryWeight=queryWeight;
  this.corpusWeight=corpusWeight;
  this.source=source;
}
Program: 22131
Project: 22131
Buggy source:
/** 
 * Record a list of enums.
 * @param positionGap positions between enums
 * @param offsetGap offsets between enums
 */
public void record(Iterator<HitEnumAndLength> enums,int positionGap,int offsetGap){
  int relativePosition=0;
  int relativeOffset=0;
  while (enums.hasNext()) {
    HitEnumAndLength e=enums.next();
    int position=0;
    int endOffset=0;
    while (e.delegate().next()) {
      position=e.delegate().position();
      endOffset=e.delegate().endOffset();
      record(position + relativePosition,e.delegate().startOffset() + relativeOffset,endOffset + relativeOffset,e.delegate().weight(),e.delegate().source());
    }
    relativePosition+=position + positionGap;
    relativeOffset+=e.length + offsetGap;
  }
}

Fixed version (ground truth):
/** 
 * Record a list of enums.
 * @param positionGap positions between enums
 * @param offsetGap offsets between enums
 */
public void record(Iterator<HitEnumAndLength> enums,int positionGap,int offsetGap){
  int relativePosition=0;
  int relativeOffset=0;
  while (enums.hasNext()) {
    HitEnumAndLength e=enums.next();
    int position=0;
    int endOffset=0;
    while (e.delegate().next()) {
      position=e.delegate().position();
      endOffset=e.delegate().endOffset();
      record(position + relativePosition,e.delegate().startOffset() + relativeOffset,endOffset + relativeOffset,e.delegate().queryWeight(),e.delegate().corpusWeight(),e.delegate().source());
    }
    relativePosition+=position + positionGap;
    relativeOffset+=e.length + offsetGap;
  }
}
Program: 22132
Project: 22132
Buggy source:
@Override public String toString(){
  return String.format(Locale.ENGLISH,"String_Node_Str",weight,position);
}

Fixed version (ground truth):
@Override public String toString(){
  return String.format(Locale.ENGLISH,"String_Node_Str",queryWeight * corpusWeight,position);
}
Program: 22133
Project: 22133
Buggy source:
@Override protected boolean keep(){
  return wrapped().weight() > cutoff;
}

Fixed version (ground truth):
@Override protected boolean keep(){
  return wrapped().queryWeight() * wrapped().corpusWeight() > cutoff;
}
Program: 22134
Project: 22134
Buggy source:
public Hit(int startOffset,int endOffset,float weight){
  this.startOffset=startOffset;
  this.endOffset=endOffset;
  this.weight=weight;
}

Fixed version (ground truth):
public Hit(int startOffset,int endOffset,float weight){
}
Program: 22135
Project: 22135
Buggy source:
@Override public boolean next(){
  if (delegate == null) {
    return false;
  }
  position=delegate.position();
  startOffset=delegate.startOffset();
  endOffset=delegate.endOffset();
  weight=delegate.weight();
  while (true) {
    if (!delegate.next()) {
      delegate=null;
      break;
    }
    if (delegate.startOffset() >= endOffset) {
      break;
    }
    endOffset=delegate.endOffset();
    weight=Math.max(weight,delegate.weight());
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean next(){
}
Program: 22136
Project: 22136
Buggy source:
/** 
 * Updates all mutable member variables to point at the segmenter that can segment starting at startOffset.
 * @return did we find a segmenter?
 */
private boolean updateSegmenter(int startOffset){
  if (segmenterIndex == -1) {
    inSegmenterStartOffset=startOffset;
    lastStartOffset=0;
    return findSegmenterForwards();
  }
  inSegmenterStartOffset=startOffset - lastStartOffset;
  if (inSegmenterStartOffset < 0) {
    return findSegmenterBackwards();
  }
  if (inSegmenterStartOffset >= segmenter.length) {
    inSegmenterStartOffset-=segmenter.length + offsetGap;
    lastStartOffset+=segmenter.length + offsetGap;
    return findSegmenterForwards();
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Updates all mutable member variables to point at the segmenter that can segment starting at startOffset.
 * @return did we find a segmenter?
 */
private boolean updateSegmenter(int startOffset){
}
Program: 22137
Project: 22137
Buggy source:
Text[] highlight() throws IOException {
  return formatSnippets(buildChooser().choose(defaultField.buildSegmenter(),buildHitEnum(),context.field.fieldOptions().numberOfFragments()));
}

Fixed version (ground truth):
HighlightField highlight() throws IOException {
  List<Snippet> snippets=buildChooser().choose(defaultField.buildSegmenter(),buildHitEnum(),context.field.fieldOptions().numberOfFragments());
  if (snippets.size() == 0) {
    return null;
  }
  return new HighlightField(context.fieldName,formatSnippets(snippets));
}
Program: 22138
Project: 22138
Buggy source:
private static HitEnum fromTerms(Terms terms,CompiledAutomaton acceptable,IndexReader reader,int docId,TermWeigher<BytesRef> weigher) throws IOException {
  if (terms == null) {
    return EmptyHitEnum.INSTANCE;
  }
  TermsEnum termsEnum=acceptable.getTermsEnum(terms);
  BytesRef term;
  List<HitEnum> enums=new ArrayList<HitEnum>();
  while ((term=termsEnum.next()) != null) {
    DocsAndPositionsEnum dp=termsEnum.docsAndPositions(null,null);
    if (dp == null) {
      continue;
    }
    int advanceResult=docId >= 0 ? dp.advance(docId) : dp.nextDoc();
    if (advanceResult == DocIdSetIterator.NO_MORE_DOCS) {
      continue;
    }
    enums.add(new DocsAndPositionsHitEnum(dp,weigher.weigh(term)));
  }
  return new MergingHitEnum(enums,HitEnum.LessThans.POSITION);
}

Fixed version (ground truth):
private static HitEnum fromTerms(Terms terms,CompiledAutomaton acceptable,IndexReader reader,int docId,TermWeigher<BytesRef> weigher) throws IOException {
  if (terms == null) {
    return EmptyHitEnum.INSTANCE;
  }
  TermsEnum termsEnum=acceptable.getTermsEnum(terms);
  BytesRef term;
  List<HitEnum> enums=new ArrayList<HitEnum>();
  while ((term=termsEnum.next()) != null) {
    DocsAndPositionsEnum dp=termsEnum.docsAndPositions(null,null,DocsAndPositionsEnum.FLAG_OFFSETS);
    if (dp == null) {
      continue;
    }
    if (docId < 0) {
      if (dp.nextDoc() == DocIdSetIterator.NO_MORE_DOCS) {
        continue;
      }
    }
 else {
      if (dp.advance(docId) != docId) {
        continue;
      }
    }
    HitEnum e=new DocsAndPositionsHitEnum(dp,weigher.weigh(term));
    enums.add(e);
  }
  return new MergingHitEnum(enums,HitEnum.LessThans.POSITION);
}
Program: 22139
Project: 22139
Buggy source:
@Override public boolean next(){
  if (current >= freq) {
    return false;
  }
  current++;
  try {
    position=dp.nextPosition();
    return true;
  }
 catch (  IOException e) {
    throw new WrappedExceptionFromLucene(e);
  }
}

Fixed version (ground truth):
@Override public boolean next(){
}
Program: 22140
Project: 22140
Buggy source:
public static HitEnum fromPostings(IndexReader reader,int docId,String fieldName,CompiledAutomaton acceptable,TermWeigher<BytesRef> weigher) throws IOException {
  List<AtomicReaderContext> leaves=reader.getContext().leaves();
  int leaf=ReaderUtil.subIndex(docId,leaves);
  AtomicReader atomicReader=leaves.get(leaf).reader();
  return fromTerms(atomicReader.terms(fieldName),acceptable,reader,docId,weigher);
}

Fixed version (ground truth):
public static HitEnum fromPostings(IndexReader reader,int docId,String fieldName,CompiledAutomaton acceptable,TermWeigher<BytesRef> weigher) throws IOException {
  List<AtomicReaderContext> leaves=reader.getContext().leaves();
  int leaf=ReaderUtil.subIndex(docId,leaves);
  AtomicReaderContext subcontext=leaves.get(leaf);
  AtomicReader atomicReader=subcontext.reader();
  docId-=subcontext.docBase;
  return fromTerms(atomicReader.terms(fieldName),acceptable,reader,docId,weigher);
}
Program: 22141
Project: 22141
Buggy source:
@Override protected void drawGuiContainerBackgroundLayer(float partialTicks,int mouseX,int mouseY){
  super.drawDefaultBackground();
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  mc.getTextureManager().bindTexture(BOILER_TEXTURES);
  int k=(width - xSize) / 2;
  int l=(height - ySize) / 2;
  GL11.glEnable(3042);
  drawTexturedModalRect(k,l,0,0,xSize,ySize);
  int i1;
  i1=tileEntity.getBurnTimeRemainingScaled(14);
  drawTexturedModalRect(k + 58,l + 15 + 14 - i1,176,14 - i1,14,i1);
  GL11.glDisable(3042);
  FluidTank tank=tileEntity.getTank();
  if (tank == null) {
    return;
  }
  FluidStack fluidStack=tank.getFluid();
  if (fluidStack == null) {
    return;
  }
  float fill=fluidStack.amount / (float)tank.getCapacity();
  drawFluid(new FluidStack(FluidHelper.getWaterFluid(),1),(int)(fill * 58.0F),k + 81,l + 14,16,58,false);
  mc.getTextureManager().bindTexture(BOILER_TEXTURES);
  drawTexturedModalRect(k + 80,l + 13,190,0,18,60);
  fill=Math.min(tileEntity.getPressure(),1F);
  FluidStack stack=new FluidStack(FluidHelper.getWaterFluid(),1);
  if (FluidRegistry.isFluidRegistered("String_Node_Str")) {
    stack=new FluidStack(FluidRegistry.getFluid("String_Node_Str"),1);
  }
  drawFluid(stack,(int)(fill * 58.0F),k + 104,l + 14,16,58,true);
  mc.getTextureManager().bindTexture(BOILER_TEXTURES);
  drawTexturedModalRect(k + 103,l + 13,190,0,18,60);
  GL11.glDisable(3042);
}

Fixed version (ground truth):
@Override protected void drawGuiContainerBackgroundLayer(float partialTicks,int mouseX,int mouseY){
  GlStateManager.color(1F,1F,1F,1F);
  mc.getTextureManager().bindTexture(BOILER_TEXTURES);
  int k=(width - xSize) / 2;
  int l=(height - ySize) / 2;
  GlStateManager.enableBlend();
  drawTexturedModalRect(k,l,0,0,xSize,ySize);
  int i1;
  i1=tileEntity.getBurnTimeRemainingScaled(14);
  drawTexturedModalRect(k + 58,l + 15 + 14 - i1,176,14 - i1,14,i1);
  GlStateManager.disableBlend();
  FluidTank tank=tileEntity.getTank();
  if (tank == null) {
    return;
  }
  FluidStack fluidStack=tank.getFluid();
  if (fluidStack == null) {
    return;
  }
  float fill=fluidStack.amount / (float)tank.getCapacity();
  drawFluid(new FluidStack(FluidHelper.getWaterFluid(),1),(int)(fill * 58.0F),k + 81,l + 14,16,58,false);
  mc.getTextureManager().bindTexture(BOILER_TEXTURES);
  drawTexturedModalRect(k + 80,l + 13,190,0,18,60);
  fill=Math.min(tileEntity.getPressure(),1F);
  FluidStack stack=new FluidStack(FluidHelper.getWaterFluid(),1);
  if (FluidRegistry.isFluidRegistered("String_Node_Str")) {
    stack=new FluidStack(FluidRegistry.getFluid("String_Node_Str"),1);
  }
  drawFluid(stack,(int)(fill * 58.0F),k + 104,l + 14,16,58,true);
  mc.getTextureManager().bindTexture(BOILER_TEXTURES);
  drawTexturedModalRect(k + 103,l + 13,190,0,18,60);
  GlStateManager.disableBlend();
}
Program: 22144
Project: 22144
Buggy source:
public static void addRecipe(String key,ItemStack output,Object... params){
  ShapedOreRecipe recipe=new ShapedOreRecipe(output,params);
  addRecipe(key,recipe);
}

Fixed version (ground truth):
public static void addRecipe(String key,ItemStack output,Object... params){
  ShapedOreRecipe recipe=new ShapedOreRecipe(null,output,params);
  addRecipe(key,recipe);
}
Program: 22145
Project: 22145
Buggy source:
@Override public TileEntity createTileEntity(World world,IBlockState state){
  return new TileEntityEngineeringTable();
}

Fixed version (ground truth):
@Override public TileEntity createTileEntity(@Nonnull World world,@Nonnull IBlockState state){
  return new TileEntityEngineeringTable();
}
Program: 22146
Project: 22146
Buggy source:
@Override public boolean onBlockActivated(World world,BlockPos pos,IBlockState state,EntityPlayer player,EnumHand hand,EnumFacing side,float hitX,float hitY,float hitZ){
  if (world.isRemote) {
    return true;
  }
 else {
    TileEntity tileentity=world.getTileEntity(pos);
    if (tileentity instanceof TileEntityEngineeringTable) {
      player.openGui(EsteemedInnovation.instance,2,world,pos.getX(),pos.getY(),pos.getZ());
    }
    return true;
  }
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(World world,BlockPos pos,IBlockState state,EntityPlayer player,EnumHand hand,EnumFacing side,float hitX,float hitY,float hitZ){
  TileEntity tileentity=world.getTileEntity(pos);
  if (tileentity instanceof TileEntityEngineeringTable) {
    player.openGui(EsteemedInnovation.instance,2,world,pos.getX(),pos.getY(),pos.getZ());
  }
  return true;
}
Program: 22147
Project: 22147
Buggy source:
public BlockEngineeringTable(){
  super(Material.ROCK);
  setHardness(3.5F);
  setCreativeTab(EsteemedInnovation.tab);
}

Fixed version (ground truth):
BlockEngineeringTable(){
  super(Material.ROCK);
  setHardness(3.5F);
  setCreativeTab(EsteemedInnovation.tab);
}
Program: 22148
Project: 22148
Buggy source:
@Override public ItemStack transferStackInSlot(EntityPlayer player,int index){
  return null;
}

Fixed version (ground truth):
@Nonnull @Override public ItemStack transferStackInSlot(EntityPlayer player,int index){
  return ItemStack.EMPTY;
}
Program: 22149
Project: 22149
Buggy source:
private void updateSlots(){
  boolean hasEngineer=false;
  ItemStack stackInSlotZero=tileEntity.getStackInSlot(0);
  if (stackInSlotZero != null) {
    if (stackInSlotZero.getItem() instanceof Engineerable) {
      Engineerable item=(Engineerable)stackInSlotZero.getItem();
      hasEngineer=true;
      int i=1;
      for (      Pair<Integer,Integer> pair : item.engineerCoordinates()) {
        int x=pair.getLeft();
        int y=pair.getRight();
        ((SlotLimitedStackSize)getSlot(i)).setSlotStackLimit(1);
        getSlot(i).xPos=x + 53;
        getSlot(i).yPos=y + 9;
        i++;
      }
    }
  }
  if (!hasEngineer) {
    for (int i=1; i < 10; i++) {
      getSlot(i).xPos=-1000;
      getSlot(i).yPos=-1000;
    }
  }
}

Fixed version (ground truth):
private void updateSlots(){
  ItemStack stackInSlotZero=tileEntity.getStackInSlot(0);
  Item itemInSlotZero=stackInSlotZero.getItem();
  if (itemInSlotZero instanceof Engineerable) {
    Engineerable item=(Engineerable)itemInSlotZero;
    int i=1;
    for (    Pair<Integer,Integer> pair : item.engineerCoordinates()) {
      int x=pair.getLeft();
      int y=pair.getRight();
      ((SlotLimitedStackSize)getSlot(i)).setSlotStackLimit(1);
      getSlot(i).xPos=x + 53;
      getSlot(i).yPos=y + 9;
      i++;
    }
  }
 else {
    for (int i=1; i < 10; i++) {
      getSlot(i).xPos=-1000;
      getSlot(i).yPos=-1000;
    }
  }
}
Program: 22150
Project: 22150
Buggy source:
public ContainerEngineeringTable(InventoryPlayer inventoryPlayer,TileEntityEngineeringTable tileEntityEngineeringTable){
  tileEntity=tileEntityEngineeringTable;
  final InventoryPlayer inv=inventoryPlayer;
  addSlotToContainer(new Slot(tileEntityEngineeringTable,0,30,35));
  for (int i=1; i < 10; i++) {
    addSlotToContainer(new SlotLimitedStackSize(tileEntityEngineeringTable,i,-1000,-1000));
  }
  updateSlots();
  int i;
  for (i=0; i < 3; ++i) {
    for (int j=0; j < 9; ++j) {
      addSlotToContainer(new Slot(inventoryPlayer,j + i * 9 + 9,8 + j * 18,84 + i * 18));
    }
  }
  for (i=0; i < 4; ++i) {
    final EntityEquipmentSlot equipmentSlot=ARMOR_SLOTS[i];
    addSlotToContainer(new Slot(inventoryPlayer,inventoryPlayer.getSizeInventory() - 2 - i,8,8 + i * 18){
      private EntityPlayer player=inv.player;
      @Override public int getSlotStackLimit(){
        return 1;
      }
      @Override public boolean isItemValid(      ItemStack stack){
        return stack != null && stack.getItem().isValidArmor(stack,equipmentSlot,player);
      }
      @SideOnly(Side.CLIENT) public String getSlotTexture(){
        return ItemArmor.EMPTY_SLOT_NAMES[equipmentSlot.getIndex()];
      }
    }
);
  }
  addSlotToContainer(new Slot(inventoryPlayer,40,30,62){
    @SideOnly(Side.CLIENT) public String getSlotTexture(){
      return "String_Node_Str";
    }
  }
);
  for (i=0; i < 9; ++i) {
    addSlotToContainer(new Slot(inventoryPlayer,i,8 + i * 18,142));
  }
}

Fixed version (ground truth):
public ContainerEngineeringTable(InventoryPlayer inventoryPlayer,TileEntityEngineeringTable tileEntityEngineeringTable){
  tileEntity=tileEntityEngineeringTable;
  addSlotToContainer(new Slot(tileEntityEngineeringTable,0,30,35));
  for (int i=1; i < 10; i++) {
    addSlotToContainer(new SlotLimitedStackSize(tileEntityEngineeringTable,i,-1000,-1000));
  }
  updateSlots();
  int i;
  for (i=0; i < 3; ++i) {
    for (int j=0; j < 9; ++j) {
      addSlotToContainer(new Slot(inventoryPlayer,j + i * 9 + 9,8 + j * 18,84 + i * 18));
    }
  }
  for (i=0; i < 4; ++i) {
    EntityEquipmentSlot equipmentSlot=ARMOR_SLOTS[i];
    addSlotToContainer(new Slot(inventoryPlayer,inventoryPlayer.getSizeInventory() - 2 - i,8,8 + i * 18){
      private EntityPlayer player=inventoryPlayer.player;
      @Override public int getSlotStackLimit(){
        return 1;
      }
      @Override public boolean isItemValid(      ItemStack stack){
        return stack != null && stack.getItem().isValidArmor(stack,equipmentSlot,player);
      }
      @Override @SideOnly(Side.CLIENT) public String getSlotTexture(){
        return ItemArmor.EMPTY_SLOT_NAMES[equipmentSlot.getIndex()];
      }
    }
);
  }
  addSlotToContainer(new Slot(inventoryPlayer,40,30,62){
    @Override @SideOnly(Side.CLIENT) public String getSlotTexture(){
      return "String_Node_Str";
    }
  }
);
  for (i=0; i < 9; ++i) {
    addSlotToContainer(new Slot(inventoryPlayer,i,8 + i * 18,142));
  }
}
Program: 22151
Project: 22151
Buggy source:
@SideOnly(Side.CLIENT) public String getSlotTexture(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override @SideOnly(Side.CLIENT) public String getSlotTexture(){
  return "String_Node_Str";
}
Program: 22152
Project: 22152
Buggy source:
@Override public boolean canInteractWith(EntityPlayer par1EntityPlayer){
  return true;
}

Fixed version (ground truth):
@Override public boolean canInteractWith(@Nonnull EntityPlayer player){
  return true;
}
Program: 22153
Project: 22153
Buggy source:
@Override public ItemStack slotClick(int slotID,int dragType,ClickType clickType,EntityPlayer player){
  ItemStack toReturn=super.slotClick(slotID,dragType,clickType,player);
  updateSlots();
  detectAndSendChanges();
  tileEntity.markForResync();
  return toReturn;
}

Fixed version (ground truth):
@Nonnull @Override public ItemStack slotClick(int slotID,int dragType,ClickType clickType,EntityPlayer player){
  ItemStack toReturn=super.slotClick(slotID,dragType,clickType,player);
  updateSlots();
  detectAndSendChanges();
  tileEntity.markForResync();
  return toReturn;
}
Program: 22154
Project: 22154
Buggy source:
@Override protected void drawGuiContainerBackgroundLayer(float partialTicks,int mouseX,int mouseY){
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  mc.getTextureManager().bindTexture(Constants.ENG_GUI_TEXTURES);
  int k=(width - xSize) / 2;
  int l=(height - ySize) / 2;
  GL11.glEnable(3042);
  drawTexturedModalRect(k,l,0,0,xSize,ySize);
  if (tileEntity.getStackInSlot(0) != null) {
    if (tileEntity.getStackInSlot(0).getItem() instanceof Engineerable) {
      Engineerable item=(Engineerable)tileEntity.getStackInSlot(0).getItem();
      item.drawBackground(this,0,k + 52,l + 8);
      int i=0;
      for (      Pair<Integer,Integer> pair : item.engineerCoordinates()) {
        int x=pair.getLeft();
        int y=pair.getRight();
        item.drawSlot(this,i,k + x + 52,l + y + 8);
        i++;
      }
    }
  }
}

Fixed version (ground truth):
@Override protected void drawGuiContainerBackgroundLayer(float partialTicks,int mouseX,int mouseY){
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  mc.getTextureManager().bindTexture(Constants.ENG_GUI_TEXTURES);
  int k=(width - xSize) / 2;
  int l=(height - ySize) / 2;
  GL11.glEnable(3042);
  drawTexturedModalRect(k,l,0,0,xSize,ySize);
  Item engineeringItem=tileEntity.getStackInSlot(0).getItem();
  if (engineeringItem instanceof Engineerable) {
    Engineerable item=(Engineerable)engineeringItem;
    item.drawBackground(this,0,k + 52,l + 8);
    int i=0;
    for (    Pair<Integer,Integer> pair : item.engineerCoordinates()) {
      int x=pair.getLeft();
      int y=pair.getRight();
      item.drawSlot(this,i,k + x + 52,l + y + 8);
      i++;
    }
  }
}
Program: 22155
Project: 22155
Buggy source:
public BlockSteamHeater(){
  super();
  setHardness(3.625F);
  setResistance(7.5F);
}

Fixed version (ground truth):
public BlockSteamHeater(){
  setHardness(3.625F);
  setResistance(7.5F);
}
Program: 22156
Project: 22156
Buggy source:
@Override public IBlockState withMirror(IBlockState state,Mirror mirrorIn){
  return state.withRotation(mirrorIn.toRotation(state.getValue(FACING)));
}

Fixed version (ground truth):
@Nonnull @Override public IBlockState withMirror(@Nonnull IBlockState state,Mirror mirrorIn){
  return state.withRotation(mirrorIn.toRotation(state.getValue(FACING)));
}
Program: 22157
Project: 22157
Buggy source:
@Override public boolean onWrench(ItemStack stack,EntityPlayer player,World world,BlockPos pos,EnumHand hand,EnumFacing facing,IBlockState state,float hitX,float hitY,float hitZ){
  WorldHelper.rotateProperly(FACING,world,state,pos,facing);
  return true;
}

Fixed version (ground truth):
@Override public boolean onWrench(@Nonnull ItemStack stack,EntityPlayer player,World world,BlockPos pos,EnumHand hand,EnumFacing facing,IBlockState state,float hitX,float hitY,float hitZ){
  WorldHelper.rotateProperly(FACING,world,state,pos,facing);
  return true;
}
Program: 22158
Project: 22158
Buggy source:
@Override public IBlockState getStateFromMeta(int meta){
  return getDefaultState().withProperty(FACING,EnumFacing.getFront(meta));
}

Fixed version (ground truth):
@Nonnull @Override public IBlockState getStateFromMeta(int meta){
  return getDefaultState().withProperty(FACING,EnumFacing.getFront(meta));
}
Program: 22159
Project: 22159
Buggy source:
@Override public IBlockState withRotation(IBlockState state,Rotation rot){
  return state.withProperty(FACING,rot.rotate(state.getValue(FACING)));
}

Fixed version (ground truth):
@Nonnull @Override public IBlockState withRotation(@Nonnull IBlockState state,Rotation rot){
  return state.withProperty(FACING,rot.rotate(state.getValue(FACING)));
}
Program: 22161
Project: 22161
Buggy source:
public boolean canSmelt(){
  ItemStack slot0=getStackInSlot(0);
  if (slot0 == null) {
    return false;
  }
 else {
    ItemStack output=SteamingRegistry.getSteamingResult(slot0);
    if (output == null) {
      return false;
    }
    ItemStack slot2=getStackInSlot(2);
    if (slot2 == null) {
      return true;
    }
    if (!slot2.isItemEqual(output)) {
      return false;
    }
    int result=slot2.getCount() + output.getCount();
    return result <= getInventoryStackLimit() && result <= slot2.getMaxStackSize();
  }
}

Fixed version (ground truth):
public boolean canSmelt(){
  ItemStack slot0=getStackInSlot(0);
  if (slot0.isEmpty()) {
    return false;
  }
 else {
    ItemStack output=SteamingRegistry.getSteamingResult(slot0);
    if (output == null) {
      return false;
    }
    ItemStack slot2=getStackInSlot(2);
    if (slot2.isEmpty()) {
      return true;
    }
    if (!slot2.isItemEqual(output)) {
      return false;
    }
    int result=slot2.getCount() + output.getCount();
    return result <= getInventoryStackLimit() && result <= slot2.getMaxStackSize();
  }
}
Program: 22162
Project: 22162
Buggy source:
@Override public void readFromNBT(NBTTagCompound nbt){
  super.superReadFromNBT(nbt);
}

Fixed version (ground truth):
@Override public void readFromNBT(NBTTagCompound nbt){
  superReadFromNBT(nbt);
}
Program: 22164
Project: 22164
Buggy source:
public TileEntitySteamHeater(){
  super();
  addSidesToGaugeBlacklist(EnumFacing.VALUES);
}

Fixed version (ground truth):
public TileEntitySteamHeater(){
  addSidesToGaugeBlacklist(EnumFacing.VALUES);
}
Program: 22165
Project: 22165
Buggy source:
@Override public NBTTagCompound writeToNBT(NBTTagCompound nbt){
  super.superWriteToNBT(nbt);
  return nbt;
}

Fixed version (ground truth):
@Nonnull @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt){
  superWriteToNBT(nbt);
  return nbt;
}
Program: 22166
Project: 22166
Buggy source:
@Override public BlockStateContainer createBlockState(){
  return new BlockStateContainer(this,VARIANT);
}

Fixed version (ground truth):
@Nonnull @Override public BlockStateContainer createBlockState(){
  return new BlockStateContainer(this,VARIANT);
}