Program: 143963
Project: 143963
Buggy source:
public static void main(String[] args){
  boolean softPredictions=!args[1].equals("String_Node_Str");
  InputData data=null;
  Set<Constraint> constraints=new HashSet<>();
switch (args[2]) {
case "String_Node_Str":
    double threshold=Double.parseDouble(args[4]);
  constraints=Integrator.loadConstraints(args[3] + "String_Node_Str");
DataSets.NELLData nellData=DataSets.importNELLData(args[3]);
BiMap<String,Integer> instanceIds=HashBiMap.create();
BiMap<String,Integer> componentIds=HashBiMap.create();
List<Integrator.Data.ObservedInstance> observedInstances=new ArrayList<>();
List<Integrator.Data.PredictedInstance> predictedInstances=new ArrayList<>();
for (DataSets.NELLData.Instance instance : nellData) {
int instanceID=instanceIds.computeIfAbsent(instance.nounPhrase(),key -> instanceIds.size());
int componentID=componentIds.computeIfAbsent(instance.component(),key -> componentIds.size());
if (instance.component().equals("String_Node_Str")) observedInstances.add(new Integrator.Data.ObservedInstance(instanceID,new Label(instance.category()),instance.probability() >= threshold));
 else predictedInstances.add(new Integrator.Data.PredictedInstance(instanceID,new Label(instance.category()),componentID,softPredictions ? instance.probability() : (instance.probability() >= 0.5 ? 1.0 : 0.0)));
}
data=new InputData(new Integrator.Data<>(predictedInstances),new Integrator.Data<>(observedInstances),instanceIds,componentIds);
break;
case "String_Node_Str":
data=parseLabeledDataFromCSVFile(new File(args[3]),"String_Node_Str",softPredictions ? null : new double[]{Double.parseDouble(args[4])});
break;
}
if (data != null) {
IntegratorExperiment experiment=new IntegratorExperiment(data.observedData,data.predictedData,constraints,data.instanceIds,data.componentIds);
String[] methodNames=args[0].split("String_Node_Str");
if (methodNames.length > 1) logger.info("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
for (String methodName : methodNames) experiment.runExperiment(methodName,methodNames.length == 1);
}
}

Fixed version (ground truth):
public static void main(String[] args){
  boolean softPredictions=!args[1].equals("String_Node_Str");
  InputData data=null;
  Set<Constraint> constraints=new HashSet<>();
switch (args[2]) {
case "String_Node_Str":
    double threshold=Double.parseDouble(args[4]);
  constraints=Integrator.loadConstraints(args[3] + "String_Node_Str");
DataSets.NELLData nellData=DataSets.importNELLData(args[3]);
BiMap<String,Integer> instanceIds=HashBiMap.create();
BiMap<String,Integer> componentIds=HashBiMap.create();
List<Integrator.Data.ObservedInstance> observedInstances=new ArrayList<>();
List<Integrator.Data.PredictedInstance> predictedInstances=new ArrayList<>();
for (DataSets.NELLData.Instance instance : nellData) {
int instanceID=instanceIds.computeIfAbsent(instance.nounPhrase(),key -> instanceIds.size());
if (instance.component().equals("String_Node_Str")) observedInstances.add(new Integrator.Data.ObservedInstance(instanceID,new Label(instance.category()),instance.probability() >= threshold));
 else predictedInstances.add(new Integrator.Data.PredictedInstance(instanceID,new Label(instance.category()),componentIds.computeIfAbsent(instance.component(),key -> componentIds.size()),softPredictions ? instance.probability() : (instance.probability() >= 0.5 ? 1.0 : 0.0)));
}
data=new InputData(new Integrator.Data<>(predictedInstances),new Integrator.Data<>(observedInstances),instanceIds,componentIds);
break;
case "String_Node_Str":
data=parseLabeledDataFromCSVFile(new File(args[3]),"String_Node_Str",softPredictions ? null : new double[]{Double.parseDouble(args[4])});
break;
}
if (data != null) {
IntegratorExperiment experiment=new IntegratorExperiment(data.observedData,data.predictedData,constraints,data.instanceIds,data.componentIds);
String[] methodNames=args[0].split("String_Node_Str");
if (methodNames.length > 1) logger.info("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
for (String methodName : methodNames) experiment.runExperiment(methodName,methodNames.length == 1);
}
}