Program: 141228
Project: 141228
Buggy source:
/** 
 * Reducer
 * @param key input key of the reducer
 * @param values values for the key
 * @param output list of output values of the reducer
 * @param reporter reporter
 * @throws IOException if an error occurs while executing the reducer
 */
public void reduce(final String key,Iterator<String> values,final List<String> output,final Reporter reporter) throws IOException {
  geneExpr.clear();
  reporter.incrCounter(this.counterGroup,PARENTS_COUNTER.counterName(),1);
  final String parentId=key;
  boolean first=true;
  String chr=null;
  int count=0;
  while (values.hasNext()) {
    count++;
    StringUtils.fastSplit(values.next().toString(),this.fields);
    final String exonChr=this.fields[0];
    final int exonStart=Integer.parseInt(this.fields[1]);
    final int exonEnd=Integer.parseInt(this.fields[2]);
    final String alignementChr=this.fields[6];
    final int alignmentStart=Integer.parseInt(this.fields[7]);
    final int alignementEnd=Integer.parseInt(this.fields[8]);
    if (first) {
      chr=exonChr;
      first=false;
    }
    if (!exonChr.equals(alignementChr) || !chr.equals(alignementChr)) {
      reporter.incrCounter(this.counterGroup,INVALID_CHROMOSOME_COUNTER.counterName(),1);
      continue;
    }
    geneExpr.addAlignement(exonStart,exonEnd,alignmentStart,alignementEnd,true);
  }
  if (count == 0)   return;
  final Transcript transcript=tef.getTranscript(parentId);
  if (transcript == null) {
    reporter.incrCounter(this.counterGroup,PARENT_ID_NOT_FOUND_COUNTER.counterName(),1);
    return;
  }
  final int geneLength=transcript.getLength();
  final int notCovered=geneExpr.getNotCovered(geneLength);
  final String result=key + "String_Node_Str" + notCovered+ "String_Node_Str"+ geneExpr.getAlignementCount();
  output.add(result);
}

Fixed version (ground truth):
/** 
 * Reducer
 * @param key input key of the reducer
 * @param values values for the key
 * @param output list of output values of the reducer
 * @param reporter reporter
 * @throws IOException if an error occurs while executing the reducer
 */
public void reduce(final String key,Iterator<String> values,final List<String> output,final Reporter reporter) throws IOException {
  geneExpr.clear();
  reporter.incrCounter(this.counterGroup,PARENTS_COUNTER.counterName(),1);
  final String parentId=key;
  boolean first=true;
  String chr=null;
  int count=0;
  while (values.hasNext()) {
    count++;
    StringUtils.fastSplit(values.next(),this.fields);
    final String exonChr=this.fields[0];
    final int exonStart=Integer.parseInt(this.fields[1]);
    final int exonEnd=Integer.parseInt(this.fields[2]);
    final String alignementChr=this.fields[6];
    final int alignmentStart=Integer.parseInt(this.fields[7]);
    final int alignementEnd=Integer.parseInt(this.fields[8]);
    if (first) {
      chr=exonChr;
      first=false;
    }
    if (!exonChr.equals(alignementChr) || !chr.equals(alignementChr)) {
      reporter.incrCounter(this.counterGroup,INVALID_CHROMOSOME_COUNTER.counterName(),1);
      continue;
    }
    geneExpr.addAlignement(exonStart,exonEnd,alignmentStart,alignementEnd,true);
  }
  if (count == 0)   return;
  final Transcript transcript=tef.getTranscript(parentId);
  if (transcript == null) {
    reporter.incrCounter(this.counterGroup,PARENT_ID_NOT_FOUND_COUNTER.counterName(),1);
    return;
  }
  final int geneLength=transcript.getLength();
  final int notCovered=geneExpr.getNotCovered(geneLength);
  final String result=key + "String_Node_Str" + notCovered+ "String_Node_Str"+ geneExpr.getAlignementCount();
  output.add(result);
}