Program: 31757
Project: 31757
Buggy source:
@Override protected void reduce(IntWritable key,Iterable<CorrelationWritable> values,Context context) throws IOException, InterruptedException {
  CorrelationWritable finalCw=new CorrelationWritable();
  finalCw.setColumnIndex(key.get());
  finalCw.setXySum(new double[this.columnConfigList.size()]);
  finalCw.setXxSum(new double[this.columnConfigList.size()]);
  finalCw.setYySum(new double[this.columnConfigList.size()]);
  finalCw.setAdjustCount(new double[this.columnConfigList.size()]);
  finalCw.setAdjustSum(new double[this.columnConfigList.size()]);
  finalCw.setAdjustSumSquare(new double[this.columnConfigList.size()]);
  Iterator<CorrelationWritable> cwIt=values.iterator();
  while (cwIt.hasNext()) {
    CorrelationWritable cw=cwIt.next();
    finalCw.setCount(finalCw.getCount() + cw.getCount());
    finalCw.setSum(finalCw.getSum() + cw.getSum());
    finalCw.setSumSquare(finalCw.getSumSquare() + cw.getSumSquare());
    double[] finalXySum=finalCw.getXySum();
    double[] xySum=cw.getXySum();
    for (int i=0; i < finalXySum.length; i++) {
      finalXySum[i]+=xySum[i];
    }
    double[] finalXxSum=finalCw.getXxSum();
    double[] xxSum=cw.getXxSum();
    for (int i=0; i < finalXxSum.length; i++) {
      finalXxSum[i]+=xxSum[i];
    }
    double[] finalYySum=finalCw.getYySum();
    double[] yySum=cw.getYySum();
    for (int i=0; i < finalYySum.length; i++) {
      finalYySum[i]+=yySum[i];
    }
    double[] finalAdjustCount=finalCw.getAdjustCount();
    double[] adjustCount=cw.getAdjustCount();
    for (int i=0; i < finalAdjustCount.length; i++) {
      finalAdjustCount[i]+=adjustCount[i];
    }
    double[] finalAdjustSum=finalCw.getAdjustSum();
    double[] adjustSum=cw.getAdjustSum();
    for (int i=0; i < finalAdjustSum.length; i++) {
      finalAdjustSum[i]+=adjustSum[i];
    }
    double[] finalAdjustSumSquare=finalCw.getAdjustSumSquare();
    double[] adjustSumSquare=cw.getAdjustSumSquare();
    for (int i=0; i < finalAdjustSumSquare.length; i++) {
      finalAdjustSumSquare[i]+=adjustSumSquare[i];
    }
  }
  this.outputKey.set(key.get());
  Base64.encodeBase64(objectToBytes(finalCw));
  this.outputValue.set(new String(Base64.encodeBase64(objectToBytes(finalCw)),"String_Node_Str"));
  context.write(outputKey,outputValue);
}

Fixed version (ground truth):
@Override protected void reduce(IntWritable key,Iterable<CorrelationWritable> values,Context context) throws IOException, InterruptedException {
  CorrelationWritable finalCw=new CorrelationWritable();
  finalCw.setColumnIndex(key.get());
  finalCw.setXySum(new double[this.columnConfigList.size()]);
  finalCw.setXxSum(new double[this.columnConfigList.size()]);
  finalCw.setYySum(new double[this.columnConfigList.size()]);
  finalCw.setAdjustCount(new double[this.columnConfigList.size()]);
  finalCw.setAdjustSum(new double[this.columnConfigList.size()]);
  finalCw.setAdjustSumSquare(new double[this.columnConfigList.size()]);
  Iterator<CorrelationWritable> cwIt=values.iterator();
  while (cwIt.hasNext()) {
    CorrelationWritable cw=cwIt.next();
    finalCw.setCount(finalCw.getCount() + cw.getCount());
    finalCw.setSum(finalCw.getSum() + cw.getSum());
    finalCw.setSumSquare(finalCw.getSumSquare() + cw.getSumSquare());
    double[] finalXySum=finalCw.getXySum();
    double[] xySum=cw.getXySum();
    for (int i=0; i < finalXySum.length; i++) {
      finalXySum[i]+=xySum[i];
    }
    double[] finalXxSum=finalCw.getXxSum();
    double[] xxSum=cw.getXxSum();
    for (int i=0; i < finalXxSum.length; i++) {
      finalXxSum[i]+=xxSum[i];
    }
    double[] finalYySum=finalCw.getYySum();
    double[] yySum=cw.getYySum();
    for (int i=0; i < finalYySum.length; i++) {
      finalYySum[i]+=yySum[i];
    }
    double[] finalAdjustCount=finalCw.getAdjustCount();
    double[] adjustCount=cw.getAdjustCount();
    for (int i=0; i < finalAdjustCount.length; i++) {
      finalAdjustCount[i]+=adjustCount[i];
    }
    double[] finalAdjustSum=finalCw.getAdjustSum();
    double[] adjustSum=cw.getAdjustSum();
    for (int i=0; i < finalAdjustSum.length; i++) {
      finalAdjustSum[i]+=adjustSum[i];
    }
    double[] finalAdjustSumSquare=finalCw.getAdjustSumSquare();
    double[] adjustSumSquare=cw.getAdjustSumSquare();
    for (int i=0; i < finalAdjustSumSquare.length; i++) {
      finalAdjustSumSquare[i]+=adjustSumSquare[i];
    }
  }
  this.outputKey.set(key.get());
  this.outputValue.set(new String(Base64.encodeBase64(objectToBytes(finalCw)),"String_Node_Str"));
  context.write(outputKey,outputValue);
}