Program: 32136
Project: 32136
Buggy source:
@Override public void load(GuaguaWritableAdapter<LongWritable> currentKey,GuaguaWritableAdapter<Text> currentValue,WorkerContext<NNParams,NNParams> workerContext){
  ++this.count;
  if ((this.count) % 100000 == 0) {
    LOG.info("String_Node_Str",this.count);
  }
  double baggingSampleRate=this.modelConfig.getBaggingSampleRate();
  if (!this.modelConfig.isFixInitialInput() && Double.valueOf(Math.random()).compareTo(baggingSampleRate) >= 0) {
    return;
  }
  double[] inputs=new double[this.inputNodeCount];
  double[] ideal=new double[this.outputNodeCount];
  if (this.isDry) {
    addDataPairToDataSet(0,new BasicMLDataPair(new BasicMLData(inputs),new BasicMLData(ideal)));
    return;
  }
  long hashcode=0;
  double significance=NNConstants.DEFAULT_SIGNIFICANCE_VALUE;
  int index=0, inputsIndex=0, outputIndex=0;
  for (  String input : DEFAULT_SPLITTER.split(currentValue.getWritable().toString())) {
    double doubleValue=NumberFormatUtils.getDouble(input.trim(),0.0d);
    if (index == this.columnConfigList.size()) {
      significance=NumberFormatUtils.getDouble(input,NNConstants.DEFAULT_SIGNIFICANCE_VALUE);
      break;
    }
 else {
      ColumnConfig columnConfig=this.columnConfigList.get(index);
      if (columnConfig != null && columnConfig.isTarget()) {
        ideal[outputIndex++]=doubleValue;
      }
 else {
        if (this.inputNodeCount == this.candidateCount) {
          if (CommonUtils.isGoodCandidate(columnConfig)) {
            inputs[inputsIndex++]=doubleValue;
            hashcode=hashcode * 31 + Double.valueOf(doubleValue).hashCode();
          }
        }
 else {
          if (columnConfig != null && !columnConfig.isMeta() && !columnConfig.isTarget() && columnConfig.isFinalSelect()) {
            inputs[inputsIndex++]=doubleValue;
            hashcode=hashcode * 31 + Double.valueOf(doubleValue).hashCode();
          }
        }
      }
    }
    index++;
  }
  long longBaggingSampleRate=Double.valueOf(baggingSampleRate * 100).longValue();
  if (this.modelConfig.isFixInitialInput() && hashcode % 100 >= longBaggingSampleRate) {
    return;
  }
  ++this.sampleCount;
  MLDataPair pair=new BasicMLDataPair(new BasicMLData(inputs),new BasicMLData(ideal));
  pair.setSignificance(significance);
  addDataPairToDataSet(hashcode,pair);
}

Fixed version (ground truth):
@Override public void load(GuaguaWritableAdapter<LongWritable> currentKey,GuaguaWritableAdapter<Text> currentValue,WorkerContext<NNParams,NNParams> workerContext){
  ++this.count;
  if ((this.count) % 100000 == 0) {
    LOG.info("String_Node_Str",this.count);
  }
  double baggingSampleRate=this.modelConfig.getBaggingSampleRate();
  if (!this.modelConfig.isFixInitialInput() && Double.compare(Math.random(),baggingSampleRate) >= 0) {
    return;
  }
  double[] inputs=new double[this.inputNodeCount];
  double[] ideal=new double[this.outputNodeCount];
  if (this.isDry) {
    addDataPairToDataSet(0,new BasicMLDataPair(new BasicMLData(inputs),new BasicMLData(ideal)));
    return;
  }
  long hashcode=0;
  double significance=NNConstants.DEFAULT_SIGNIFICANCE_VALUE;
  int index=0, inputsIndex=0, outputIndex=0;
  for (  String input : DEFAULT_SPLITTER.split(currentValue.getWritable().toString())) {
    double doubleValue=NumberFormatUtils.getDouble(input.trim(),0.0d);
    if (index == this.columnConfigList.size()) {
      significance=NumberFormatUtils.getDouble(input,NNConstants.DEFAULT_SIGNIFICANCE_VALUE);
      break;
    }
 else {
      ColumnConfig columnConfig=this.columnConfigList.get(index);
      if (columnConfig != null && columnConfig.isTarget()) {
        ideal[outputIndex++]=doubleValue;
      }
 else {
        if (this.inputNodeCount == this.candidateCount) {
          if (CommonUtils.isGoodCandidate(columnConfig)) {
            inputs[inputsIndex++]=doubleValue;
            hashcode=hashcode * 31 + Double.valueOf(doubleValue).hashCode();
          }
        }
 else {
          if (columnConfig != null && !columnConfig.isMeta() && !columnConfig.isTarget() && columnConfig.isFinalSelect()) {
            inputs[inputsIndex++]=doubleValue;
            hashcode=hashcode * 31 + Double.valueOf(doubleValue).hashCode();
          }
        }
      }
    }
    index++;
  }
  long longBaggingSampleRate=Double.valueOf(baggingSampleRate * 100).longValue();
  if (this.modelConfig.isFixInitialInput() && hashcode % 100 >= longBaggingSampleRate) {
    return;
  }
  ++this.sampleCount;
  MLDataPair pair=new BasicMLDataPair(new BasicMLData(inputs),new BasicMLData(ideal));
  pair.setSignificance(significance);
  addDataPairToDataSet(hashcode,pair);
}