Program: 32102
Project: 32102
Buggy source:
@Override public void load(GuaguaWritableAdapter<LongWritable> currentKey,GuaguaWritableAdapter<Text> currentValue,WorkerContext<NNParams,NNParams> workerContext){
  super.count+=1;
  if ((super.count) % 100000 == 0) {
    LOG.info("String_Node_Str",super.count);
  }
  double baggingSampleRate=super.modelConfig.getBaggingSampleRate();
  if (!super.modelConfig.isFixInitialInput() && Double.compare(Math.random(),baggingSampleRate) >= 0) {
    return;
  }
  double[] inputs=new double[super.inputNodeCount];
  double[] ideal=new double[super.outputNodeCount];
  if (super.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 == super.columnConfigList.size()) {
      significance=NumberFormatUtils.getDouble(input,NNConstants.DEFAULT_SIGNIFICANCE_VALUE);
      break;
    }
 else {
      ColumnConfig columnConfig=super.columnConfigList.get(index);
      if (columnConfig != null && columnConfig.isTarget()) {
        ideal[outputIndex++]=doubleValue;
      }
 else {
        if (super.inputNodeCount == super.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+=1;
  }
  long longBaggingSampleRate=Double.valueOf(baggingSampleRate * 100).longValue();
  if (super.modelConfig.isFixInitialInput() && hashcode % 100 >= longBaggingSampleRate) {
    return;
  }
  super.sampleCount+=1;
  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){
  super.count+=1;
  if ((super.count) % 100000 == 0) {
    LOG.info("String_Node_Str",super.count);
  }
  double baggingSampleRate=super.modelConfig.getBaggingSampleRate();
  if (!super.modelConfig.isFixInitialInput() && Double.compare(Math.random(),baggingSampleRate) >= 0) {
    return;
  }
  double[] inputs=new double[super.inputNodeCount];
  double[] ideal=new double[super.outputNodeCount];
  if (super.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 == super.columnConfigList.size()) {
      significance=NumberFormatUtils.getDouble(input,NNConstants.DEFAULT_SIGNIFICANCE_VALUE);
      break;
    }
 else {
      ColumnConfig columnConfig=super.columnConfigList.get(index);
      if (columnConfig != null && columnConfig.isTarget()) {
        ideal[outputIndex++]=doubleValue;
      }
 else {
        if (super.inputNodeCount == super.candidateCount) {
          if (!columnConfig.isMeta() && !columnConfig.isTarget() && 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+=1;
  }
  long longBaggingSampleRate=Double.valueOf(baggingSampleRate * 100).longValue();
  if (super.modelConfig.isFixInitialInput() && hashcode % 100 >= longBaggingSampleRate) {
    return;
  }
  super.sampleCount+=1;
  MLDataPair pair=new BasicMLDataPair(new BasicMLData(inputs),new BasicMLData(ideal));
  pair.setSignificance(significance);
  addDataPairToDataSet(hashcode,pair);
}