Program: 32037
Project: 32037
Buggy source:
private NeuralInputs getNeuralInputs(final NeuralNetwork model){
  NeuralInputs nnInputs=new NeuralInputs();
  HashMap<FieldName,FieldName> miningTransformMap=new HashMap<FieldName,FieldName>();
  for (  DerivedField dField : model.getLocalTransformations().getDerivedFields()) {
    if (dField.getExpression() instanceof NormContinuous) {
      miningTransformMap.put(((NormContinuous)dField.getExpression()).getField(),dField.getName());
    }
 else     if (dField.getExpression() instanceof MapValues) {
      miningTransformMap.put(((MapValues)dField.getExpression()).getFieldColumnPairs().get(0).getField(),dField.getName());
    }
 else     if (dField.getExpression() instanceof Discretize) {
      miningTransformMap.put(((Discretize)dField.getExpression()).getField(),dField.getName());
    }
  }
  List<MiningField> miningList=model.getMiningSchema().getMiningFields();
  int index=0;
  for (int i=0; i < miningList.size(); i++) {
    MiningField mField=miningList.get(i);
    if (mField.getUsageType() != FieldUsageType.ACTIVE)     continue;
    FieldName mFieldName=mField.getName();
    FieldName fName=(miningTransformMap.containsKey(mFieldName)) ? miningTransformMap.get(mFieldName) : mFieldName;
    DerivedField field=new DerivedField(OpType.CONTINUOUS,DataType.DOUBLE).withName(fName).withExpression(new FieldRef(fName));
    nnInputs.withNeuralInputs(new NeuralInput(field,"String_Node_Str" + (index++)));
  }
  DerivedField field=new DerivedField(OpType.CONTINUOUS,DataType.DOUBLE).withName(new FieldName(PluginConstants.biasValue)).withExpression(new FieldRef(new FieldName(PluginConstants.biasValue)));
  nnInputs.withNeuralInputs(new NeuralInput(field,PluginConstants.biasValue));
  return nnInputs;
}

Fixed version (ground truth):
private NeuralInputs getNeuralInputs(final NeuralNetwork model){
  NeuralInputs nnInputs=new NeuralInputs();
  HashMap<FieldName,FieldName> miningTransformMap=new HashMap<FieldName,FieldName>();
  for (  DerivedField dField : model.getLocalTransformations().getDerivedFields()) {
    if (dField.getExpression() instanceof NormContinuous) {
      miningTransformMap.put(((NormContinuous)dField.getExpression()).getField(),dField.getName());
    }
 else     if (dField.getExpression() instanceof MapValues) {
      miningTransformMap.put(((MapValues)dField.getExpression()).getFieldColumnPairs().get(0).getField(),dField.getName());
    }
 else     if (dField.getExpression() instanceof Discretize) {
      miningTransformMap.put(((Discretize)dField.getExpression()).getField(),dField.getName());
    }
  }
  List<MiningField> miningList=model.getMiningSchema().getMiningFields();
  int index=0;
  for (int i=0; i < miningList.size(); i++) {
    MiningField mField=miningList.get(i);
    if (mField.getUsageType() != FieldUsageType.ACTIVE)     continue;
    FieldName mFieldName=mField.getName();
    FieldName fName=mFieldName;
    while (miningTransformMap.containsKey(fName)) {
      fName=miningTransformMap.get(fName);
    }
    DerivedField field=new DerivedField(OpType.CONTINUOUS,DataType.DOUBLE).withName(fName).withExpression(new FieldRef(fName));
    nnInputs.withNeuralInputs(new NeuralInput(field,"String_Node_Str" + (index++)));
  }
  DerivedField field=new DerivedField(OpType.CONTINUOUS,DataType.DOUBLE).withName(new FieldName(PluginConstants.biasValue)).withExpression(new FieldRef(new FieldName(PluginConstants.biasValue)));
  nnInputs.withNeuralInputs(new NeuralInput(field,PluginConstants.biasValue));
  return nnInputs;
}