Program: 32148
Project: 32148
Buggy source:
public Tuple exec(Tuple input) throws IOException {
  if (input == null || input.size() == 0) {
    return null;
  }
  int size=input.size();
  JexlContext jc=new MapContext();
  Tuple tuple=TupleFactory.getInstance().newTuple();
  String tag=input.get(tagColumnNum).toString();
  if (!(posTags.contains(tag) || negTags.contains(tag))) {
    if (System.currentTimeMillis() % 100 == 0) {
      log.warn("String_Node_Str" + tag);
    }
    return null;
  }
  boolean isNotSampled=DataSampler.isNotSampled(modelConfig.getPosTags(),modelConfig.getNegTags(),modelConfig.getNormalizeSampleRate(),modelConfig.isNormalizeSampleNegOnly(),tag);
  if (isNotSampled) {
    return null;
  }
  Double cutoff=modelConfig.getNormalizeStdDevCutOff();
  for (int i=0; i < size; i++) {
    ColumnConfig config=columnConfigList.get(i);
    if (weightExpr != null) {
      jc.set(config.getColumnName(),((input.get(i) == null) ? "String_Node_Str" : input.get(i).toString()));
    }
    if (super.tagColumnNum == i) {
      if (modelConfig.getPosTags().contains(tag)) {
        tuple.append(df.format(Double.valueOf(1)));
      }
 else       if (modelConfig.getNegTags().contains(tag)) {
        tuple.append(df.format(Double.valueOf(0)));
      }
 else {
        log.error("String_Node_Str" + tag);
        return null;
      }
      continue;
    }
    if (!CommonUtils.isGoodCandidate(config)) {
      tuple.append(null);
    }
 else {
      String val=((input.get(i) == null) ? "String_Node_Str" : input.get(i).toString());
switch (super.modelConfig.getNormalize().getNormType()) {
case WOE:
        List<Double> binWoe;
      if (super.modelConfig.getNormalize().getIsWeightNorm()) {
        binWoe=config.getColumnBinning().getBinWeightedWoe();
      }
 else {
        binWoe=config.getColumnBinning().getBinCountWoe();
      }
    if (StringUtils.isEmpty(val)) {
      tuple.append(binWoe.get(binWoe.size() - 1));
    }
 else {
      try {
        int binNum=CommonUtils.getBinNum(config,val);
        binNum=binNum == -1 ? binWoe.size() - 1 : binNum;
        tuple.append(binWoe.get(binNum));
      }
 catch (      NumberFormatException e) {
        tuple.append(binWoe.get(binWoe.size() - 1));
      }
    }
  break;
case ZSCALE:
Double z=Normalizer.normalize(config,val,cutoff);
tuple.append(df.format(z));
default :
break;
}
}
}
double weight=1.0d;
if (weightExpr != null) {
Object result=weightExpr.evaluate(jc);
if (result instanceof Integer) {
weight=((Integer)result).doubleValue();
}
 else if (result instanceof Double) {
weight=((Double)result).doubleValue();
}
 else if (result instanceof String) {
try {
weight=Double.parseDouble((String)result);
}
 catch (NumberFormatException e) {
if (System.currentTimeMillis() % 100 == 0) {
log.warn("String_Node_Str" + result + "String_Node_Str");
}
weight=1.0d;
}
}
}
tuple.append(weight);
return tuple;
}

Fixed version (ground truth):
public Tuple exec(Tuple input) throws IOException {
  if (input == null || input.size() == 0) {
    return null;
  }
  int size=input.size();
  JexlContext jc=new MapContext();
  Tuple tuple=TupleFactory.getInstance().newTuple();
  String tag=input.get(tagColumnNum).toString();
  if (!(posTags.contains(tag) || negTags.contains(tag))) {
    if (System.currentTimeMillis() % 100 == 0) {
      log.warn("String_Node_Str" + tag);
    }
    return null;
  }
  boolean isNotSampled=DataSampler.isNotSampled(modelConfig.getPosTags(),modelConfig.getNegTags(),modelConfig.getNormalizeSampleRate(),modelConfig.isNormalizeSampleNegOnly(),tag);
  if (isNotSampled) {
    return null;
  }
  Double cutoff=modelConfig.getNormalizeStdDevCutOff();
  for (int i=0; i < size; i++) {
    ColumnConfig config=columnConfigList.get(i);
    if (weightExpr != null) {
      jc.set(config.getColumnName(),((input.get(i) == null) ? "String_Node_Str" : input.get(i).toString()));
    }
    if (super.tagColumnNum == i) {
      if (modelConfig.getPosTags().contains(tag)) {
        tuple.append(df.format(Double.valueOf(1)));
      }
 else       if (modelConfig.getNegTags().contains(tag)) {
        tuple.append(df.format(Double.valueOf(0)));
      }
 else {
        log.error("String_Node_Str" + tag);
        return null;
      }
      continue;
    }
    if (!CommonUtils.isGoodCandidate(config)) {
      tuple.append(null);
    }
 else {
      String val=((input.get(i) == null) ? "String_Node_Str" : input.get(i).toString());
switch (super.modelConfig.getNormalize().getNormType()) {
case WOE:
        List<Double> binWoe;
      if (super.modelConfig.getNormalize().getIsWeightNorm()) {
        binWoe=config.getColumnBinning().getBinWeightedWoe();
      }
 else {
        binWoe=config.getColumnBinning().getBinCountWoe();
      }
    if (StringUtils.isEmpty(val)) {
      tuple.append(df.format(binWoe.get(binWoe.size() - 1)));
    }
 else {
      try {
        int binNum=CommonUtils.getBinNum(config,val);
        binNum=binNum == -1 ? binWoe.size() - 1 : binNum;
        tuple.append(df.format(binWoe.get(binNum)));
      }
 catch (      NumberFormatException e) {
        tuple.append(df.format(binWoe.get(binWoe.size() - 1)));
      }
    }
  break;
case ZSCALE:
default :
Double z=Normalizer.normalize(config,val,cutoff);
tuple.append(df.format(z));
break;
}
}
}
double weight=1.0d;
if (weightExpr != null) {
Object result=weightExpr.evaluate(jc);
if (result instanceof Integer) {
weight=((Integer)result).doubleValue();
}
 else if (result instanceof Double) {
weight=((Double)result).doubleValue();
}
 else if (result instanceof String) {
try {
weight=Double.parseDouble((String)result);
}
 catch (NumberFormatException e) {
if (System.currentTimeMillis() % 100 == 0) {
log.warn("String_Node_Str" + result + "String_Node_Str");
}
weight=1.0d;
}
}
}
tuple.append(weight);
return tuple;
}