Program: 31669
Project: 31669
Buggy source:
private double[] convertDataMapToDoubleArray(Map<String,Object> dataMap){
  double[] data=new double[this.columnNumIndexMap.size()];
  for (  Entry<Integer,Integer> entry : this.columnNumIndexMap.entrySet()) {
    double value=0d;
    Integer columnNum=entry.getKey();
    String columnName=this.numNameMap.get(columnNum);
    Object obj=dataMap.get(columnName);
    if (this.cateCateMap.containsKey(columnNum)) {
switch (this.normType) {
case WOE:
case HYBRID:
        value=getCategoricalWoeValue(columnNum,obj,false);
      break;
case WEIGHT_WOE:
case WEIGHT_HYBRID:
    value=getCategoricalWoeValue(columnNum,obj,true);
  break;
case WOE_ZSCORE:
case WOE_ZSCALE:
value=getCategoricalWoeZScoreValue(columnNum,obj,false);
break;
case WEIGHT_WOE_ZSCORE:
case WEIGHT_WOE_ZSCALE:
value=getCategoricalWoeZScoreValue(columnNum,obj,true);
break;
case OLD_ZSCALE:
case OLD_ZSCORE:
case ZSCALE:
case ZSCORE:
default :
value=getCategoricalPosRateValue(columnNum,obj);
break;
}
}
 else {
switch (this.normType) {
case WOE:
value=getNumericalWoeValue(columnNum,obj,false);
break;
case WEIGHT_WOE:
value=getNumericalWoeValue(columnNum,obj,false);
break;
case WOE_ZSCORE:
case WOE_ZSCALE:
value=getNumericalWoeZScoreValue(columnNum,obj,false);
break;
case WEIGHT_WOE_ZSCORE:
case WEIGHT_WOE_ZSCALE:
value=getNumericalWoeZScoreValue(columnNum,obj,true);
break;
case OLD_ZSCALE:
case OLD_ZSCORE:
case ZSCALE:
case ZSCORE:
case HYBRID:
case WEIGHT_HYBRID:
default :
value=getNumericalZScoreValue(columnNum,obj);
break;
}
}
Integer index=entry.getValue();
if (index != null && index < data.length) {
data[index]=value;
}
}
return data;
}

Fixed version (ground truth):
private double[] convertDataMapToDoubleArray(Map<String,Object> dataMap){
  double[] data=new double[this.columnNumIndexMap.size()];
  for (  Entry<Integer,Integer> entry : this.columnNumIndexMap.entrySet()) {
    double value=0d;
    Integer columnNum=entry.getKey();
    String columnName=this.numNameMap.get(columnNum);
    Object obj=dataMap.get(columnName);
    if (this.cateCateMap.containsKey(columnNum)) {
switch (this.normType) {
case WOE:
case HYBRID:
        value=getCategoricalWoeValue(columnNum,obj,false);
      break;
case WEIGHT_WOE:
case WEIGHT_HYBRID:
    value=getCategoricalWoeValue(columnNum,obj,true);
  break;
case WOE_ZSCORE:
case WOE_ZSCALE:
value=getCategoricalWoeZScoreValue(columnNum,obj,false);
break;
case WEIGHT_WOE_ZSCORE:
case WEIGHT_WOE_ZSCALE:
value=getCategoricalWoeZScoreValue(columnNum,obj,true);
break;
case OLD_ZSCALE:
case OLD_ZSCORE:
case ZSCALE:
case ZSCORE:
default :
value=getCategoricalPosRateZScoreValue(columnNum,obj);
break;
}
}
 else {
switch (this.normType) {
case WOE:
value=getNumericalWoeValue(columnNum,obj,false);
break;
case WEIGHT_WOE:
value=getNumericalWoeValue(columnNum,obj,false);
break;
case WOE_ZSCORE:
case WOE_ZSCALE:
value=getNumericalWoeZScoreValue(columnNum,obj,false);
break;
case WEIGHT_WOE_ZSCORE:
case WEIGHT_WOE_ZSCALE:
value=getNumericalWoeZScoreValue(columnNum,obj,true);
break;
case OLD_ZSCALE:
case OLD_ZSCORE:
case ZSCALE:
case ZSCORE:
case HYBRID:
case WEIGHT_HYBRID:
default :
value=getNumericalZScoreValue(columnNum,obj);
break;
}
}
Integer index=entry.getValue();
if (index != null && index < data.length) {
data[index]=value;
}
}
return data;
}