Program: 31629
Project: 31629
Buggy source:
@Override protected void map(LongWritable key,Text value,Context context) throws IOException, InterruptedException {
  String valueStr=value.toString();
  if (valueStr == null || valueStr.length() == 0 || valueStr.trim().length() == 0) {
    LOG.warn("String_Node_Str");
    return;
  }
  double[] dValues=null;
  if (!this.dataPurifier.isFilter(valueStr)) {
    return;
  }
  context.getCounter(Constants.SHIFU_GROUP_COUNTER,"String_Node_Str").increment(1L);
  if (Math.random() >= this.modelConfig.getStats().getSampleRate()) {
    return;
  }
  context.getCounter(Constants.SHIFU_GROUP_COUNTER,"String_Node_Str").increment(1L);
  dValues=getDoubleArrayByRawArray(CommonUtils.split(valueStr,this.dataSetDelimiter));
  count+=1L;
  if (count % 2000L == 0) {
    LOG.info("String_Node_Str",count,Thread.currentThread().getName());
  }
  long startO=System.currentTimeMillis();
  for (int i=0; i < this.columnConfigList.size(); i++) {
    long start=System.currentTimeMillis();
    ColumnConfig columnConfig=this.columnConfigList.get(i);
    if (columnConfig.getColumnFlag() == ColumnFlag.Meta) {
      continue;
    }
    CorrelationWritable cw=this.correlationMap.get(i);
    if (cw == null) {
      cw=new CorrelationWritable();
      this.correlationMap.put(i,cw);
    }
    cw.setColumnIndex(i);
    cw.setCount(cw.getCount() + 1d);
    cw.setSum(cw.getSum() + dValues[i]);
    double squaredSum=dValues[i] * dValues[i];
    cw.setSumSquare(cw.getSumSquare() + squaredSum);
    double[] xySum=cw.getXySum();
    if (xySum == null) {
      xySum=new double[this.columnConfigList.size()];
      cw.setXySum(xySum);
    }
    double[] xxSum=cw.getXxSum();
    if (xxSum == null) {
      xxSum=new double[this.columnConfigList.size()];
      cw.setXxSum(xxSum);
    }
    double[] yySum=cw.getYySum();
    if (yySum == null) {
      yySum=new double[this.columnConfigList.size()];
      cw.setYySum(yySum);
    }
    double[] adjustCount=cw.getAdjustCount();
    if (adjustCount == null) {
      adjustCount=new double[this.columnConfigList.size()];
      cw.setAdjustCount(adjustCount);
    }
    double[] adjustSumX=cw.getAdjustSumX();
    if (adjustSumX == null) {
      adjustSumX=new double[this.columnConfigList.size()];
      cw.setAdjustSumX(adjustSumX);
    }
    double[] adjustSumY=cw.getAdjustSumY();
    if (adjustSumY == null) {
      adjustSumY=new double[this.columnConfigList.size()];
      cw.setAdjustSumY(adjustSumY);
    }
    if (i % 1000 == 0) {
      LOG.debug("String_Node_Str",(System.currentTimeMillis() - start),Thread.currentThread().getName());
    }
    start=System.currentTimeMillis();
    for (int j=0; j < this.columnConfigList.size(); j++) {
      ColumnConfig otherColumnConfig=this.columnConfigList.get(j);
      if (otherColumnConfig.getColumnFlag() == ColumnFlag.Meta) {
        continue;
      }
      if (i > j && !this.isComputeAll) {
        continue;
      }
      if (dValues[i] != Double.MIN_VALUE && dValues[j] != Double.MIN_VALUE) {
        xySum[j]+=dValues[i] * dValues[j];
        xxSum[j]+=squaredSum;
        yySum[j]+=dValues[j] * dValues[j];
        adjustCount[j]+=1d;
        adjustSumX[j]+=dValues[i];
        adjustSumY[j]+=dValues[j];
      }
    }
    if (i % 1000 == 0) {
      LOG.debug("String_Node_Str",(System.currentTimeMillis() - start),Thread.currentThread().getName());
    }
  }
  LOG.debug("String_Node_Str",(System.currentTimeMillis() - startO),Thread.currentThread().getName());
}

Fixed version (ground truth):
@Override protected void map(LongWritable key,Text value,Context context) throws IOException, InterruptedException {
  String valueStr=value.toString();
  if (valueStr == null || valueStr.length() == 0 || valueStr.trim().length() == 0) {
    LOG.warn("String_Node_Str");
    return;
  }
  double[] dValues=null;
  if (!this.dataPurifier.isFilter(valueStr)) {
    return;
  }
  context.getCounter(Constants.SHIFU_GROUP_COUNTER,"String_Node_Str").increment(1L);
  if (Math.random() >= this.modelConfig.getStats().getSampleRate()) {
    return;
  }
  context.getCounter(Constants.SHIFU_GROUP_COUNTER,"String_Node_Str").increment(1L);
  dValues=getDoubleArrayByRawArray(CommonUtils.split(valueStr,this.dataSetDelimiter));
  count+=1L;
  if (count % 2000L == 0) {
    LOG.info("String_Node_Str",count,Thread.currentThread().getName());
  }
  long startO=System.currentTimeMillis();
  for (int i=0; i < this.columnConfigList.size(); i++) {
    long start=System.currentTimeMillis();
    ColumnConfig columnConfig=this.columnConfigList.get(i);
    if (columnConfig.getColumnFlag() == ColumnFlag.Meta || (this.hasCandidates && !ColumnFlag.Candidate.equals(columnConfig.getColumnFlag()))) {
      continue;
    }
    CorrelationWritable cw=this.correlationMap.get(i);
    if (cw == null) {
      cw=new CorrelationWritable();
      this.correlationMap.put(i,cw);
    }
    cw.setColumnIndex(i);
    cw.setCount(cw.getCount() + 1d);
    cw.setSum(cw.getSum() + dValues[i]);
    double squaredSum=dValues[i] * dValues[i];
    cw.setSumSquare(cw.getSumSquare() + squaredSum);
    double[] xySum=cw.getXySum();
    if (xySum == null) {
      xySum=new double[this.columnConfigList.size()];
      cw.setXySum(xySum);
    }
    double[] xxSum=cw.getXxSum();
    if (xxSum == null) {
      xxSum=new double[this.columnConfigList.size()];
      cw.setXxSum(xxSum);
    }
    double[] yySum=cw.getYySum();
    if (yySum == null) {
      yySum=new double[this.columnConfigList.size()];
      cw.setYySum(yySum);
    }
    double[] adjustCount=cw.getAdjustCount();
    if (adjustCount == null) {
      adjustCount=new double[this.columnConfigList.size()];
      cw.setAdjustCount(adjustCount);
    }
    double[] adjustSumX=cw.getAdjustSumX();
    if (adjustSumX == null) {
      adjustSumX=new double[this.columnConfigList.size()];
      cw.setAdjustSumX(adjustSumX);
    }
    double[] adjustSumY=cw.getAdjustSumY();
    if (adjustSumY == null) {
      adjustSumY=new double[this.columnConfigList.size()];
      cw.setAdjustSumY(adjustSumY);
    }
    if (i % 1000 == 0) {
      LOG.debug("String_Node_Str",(System.currentTimeMillis() - start),Thread.currentThread().getName());
    }
    start=System.currentTimeMillis();
    for (int j=0; j < this.columnConfigList.size(); j++) {
      ColumnConfig otherColumnConfig=this.columnConfigList.get(j);
      if (otherColumnConfig.getColumnFlag() == ColumnFlag.Meta) {
        continue;
      }
      if (i > j && !this.isComputeAll) {
        continue;
      }
      if (dValues[i] != Double.MIN_VALUE && dValues[j] != Double.MIN_VALUE) {
        xySum[j]+=dValues[i] * dValues[j];
        xxSum[j]+=squaredSum;
        yySum[j]+=dValues[j] * dValues[j];
        adjustCount[j]+=1d;
        adjustSumX[j]+=dValues[i];
        adjustSumY[j]+=dValues[j];
      }
    }
    if (i % 1000 == 0) {
      LOG.debug("String_Node_Str",(System.currentTimeMillis() - start),Thread.currentThread().getName());
    }
  }
  LOG.debug("String_Node_Str",(System.currentTimeMillis() - startO),Thread.currentThread().getName());
}