Program: 144008
Project: 144008
Buggy source:
@Test public void testFastEndToEnd(){
  String experimentName="String_Node_Str";
  LogicManager<Integer,Double> logicManager=new LogicManager<>(new LukasiewiczLogic());
  VariableType<Integer> personType=logicManager.addVariableType("String_Node_Str",Integer.class);
  Set<Integer> personValues=new HashSet<>();
  try {
    Stream<String> lines=Files.lines(Paths.get(LogicRuleParserTest.class.getResource("String_Node_Str" + experimentName + "String_Node_Str").getPath()));
    lines.forEach(line -> {
      String[] lineParts=line.split("String_Node_Str");
      for (      String linePart : lineParts)       personValues.add(Integer.parseInt(linePart.trim()));
    }
);
    lines=Files.lines(Paths.get(LogicRuleParserTest.class.getResource("String_Node_Str" + experimentName + "String_Node_Str").getPath()));
    lines.forEach(line -> {
      String[] lineParts=line.split("String_Node_Str");
      for (int partIndex=0; partIndex < lineParts.length - 1; partIndex++)       personValues.add(Integer.parseInt(lineParts[partIndex].trim()));
    }
);
  }
 catch (  IOException ignored) {
  }
  logicManager.addVariable("String_Node_Str",new ArrayList<>(personValues),personType);
  logicManager.addVariable("String_Node_Str",new ArrayList<>(personValues),personType);
  logicManager.addVariable("String_Node_Str",new ArrayList<>(personValues),personType);
  logicManager.addVariable("String_Node_Str",new ArrayList<>(personValues),personType);
  logicManager.addVariable("String_Node_Str",new ArrayList<>(personValues),personType);
  List<VariableType<Integer>> argumentTypes=new ArrayList<>(2);
  argumentTypes.add(personType);
  argumentTypes.add(personType);
  logicManager.addPredicate("String_Node_Str",argumentTypes,false);
  logicManager.addPredicate("String_Node_Str",argumentTypes,false);
  InputStream modelStream=LogicRuleParserTest.class.getResourceAsStream("String_Node_Str" + experimentName + "String_Node_Str");
  InputStream knowsStream=LogicRuleParserTest.class.getResourceAsStream("String_Node_Str" + experimentName + "String_Node_Str");
  InputStream trustTrainStream=LogicRuleParserTest.class.getResourceAsStream("String_Node_Str" + experimentName + "String_Node_Str");
  InputStream trustTestStream=LogicRuleParserTest.class.getResourceAsStream("String_Node_Str" + experimentName + "String_Node_Str");
  List<FastProbabilisticSoftLogicProblem.Rule> rules=null;
  try (BufferedReader modelReader=new BufferedReader(new InputStreamReader(modelStream));BufferedReader knowsReader=new BufferedReader(new InputStreamReader(knowsStream));BufferedReader trustTrainReader=new BufferedReader(new InputStreamReader(trustTrainStream));BufferedReader trustTestReader=trustTestStream == null ? null : new BufferedReader(new InputStreamReader(trustTestStream))){
    rules=ProbabilisticSoftLogicReader.readFastRules(modelReader,logicManager);
    ProbabilisticSoftLogicReader.readGroundingsAndAddToFastManager(logicManager,"String_Node_Str",true,knowsReader);
    ProbabilisticSoftLogicReader.readGroundingsAndAddToFastManager(logicManager,"String_Node_Str",false,trustTrainReader);
  }
 catch (  IOException|DataFormatException e) {
    fail(e.getMessage());
    System.out.println(e.getMessage());
    e.printStackTrace();
  }
  int[] observedIndexes=new int[logicManager.getNumberOfGroundedPredicates()];
  double[] observedWeights=new double[logicManager.getNumberOfGroundedPredicates()];
  for (int index=0; index < logicManager.getNumberOfGroundedPredicates(); index++) {
    observedIndexes[index]=(int)logicManager.getGroundedPredicates().get(index).getIdentifier();
    observedWeights[index]=(double)logicManager.getGroundedPredicates().get(index).getValue();
  }
  FastProbabilisticSoftLogicProblem.Builder problemBuilder=new FastProbabilisticSoftLogicProblem.Builder(observedIndexes,observedWeights,logicManager.getNumberOfVariables());
  FastProbabilisticSoftLogicProblem.Rule.addGroundingsToBuilder(rules,problemBuilder,logicManager);
  FastProbabilisticSoftLogicProblem problem=problemBuilder.build();
  Map<Integer,Double> result=problem.solve();
  Map<String,Double> filteredResults=new HashMap<>();
  result.keySet().stream().filter(key -> result.get(key) > Math.sqrt(Double.MIN_VALUE)).forEach(key -> filteredResults.put(logicManager.getGroundedPredicate(key).toString(),result.get(key)));
  long numberOfActivatedGroundings=result.keySet().stream().filter(key -> result.get(key) > 0.01).count();
  result.keySet().stream().filter(key -> result.get(key) > 0.01).forEach(key -> logicManager.getGroundedPredicate(key).setValue(result.get(key)));
  System.out.println(result.get(0));
  System.out.println(result.get(1));
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
@Test public void testFastEndToEnd(){
  String experimentName="String_Node_Str";
  LogicManager<Integer,Double> logicManager=new LogicManager<>(new LukasiewiczLogic());
  VariableType<Integer> personType=logicManager.addVariableType("String_Node_Str",Integer.class);
  Set<Integer> personValues=new HashSet<>();
  try {
    Stream<String> lines=Files.lines(Paths.get(LogicRuleParserTest.class.getResource("String_Node_Str" + experimentName + "String_Node_Str").getPath()));
    lines.forEach(line -> {
      String[] lineParts=line.split("String_Node_Str");
      for (      String linePart : lineParts)       personValues.add(Integer.parseInt(linePart.trim()));
    }
);
    lines=Files.lines(Paths.get(LogicRuleParserTest.class.getResource("String_Node_Str" + experimentName + "String_Node_Str").getPath()));
    lines.forEach(line -> {
      String[] lineParts=line.split("String_Node_Str");
      for (int partIndex=0; partIndex < lineParts.length - 1; partIndex++)       personValues.add(Integer.parseInt(lineParts[partIndex].trim()));
    }
);
  }
 catch (  IOException ignored) {
  }
  logicManager.addVariable("String_Node_Str",new ArrayList<>(personValues),personType);
  logicManager.addVariable("String_Node_Str",new ArrayList<>(personValues),personType);
  logicManager.addVariable("String_Node_Str",new ArrayList<>(personValues),personType);
  logicManager.addVariable("String_Node_Str",new ArrayList<>(personValues),personType);
  logicManager.addVariable("String_Node_Str",new ArrayList<>(personValues),personType);
  List<VariableType<Integer>> argumentTypes=new ArrayList<>(2);
  argumentTypes.add(personType);
  argumentTypes.add(personType);
  logicManager.addPredicate("String_Node_Str",argumentTypes,false);
  logicManager.addPredicate("String_Node_Str",argumentTypes,false);
  InputStream modelStream=LogicRuleParserTest.class.getResourceAsStream("String_Node_Str" + experimentName + "String_Node_Str");
  InputStream knowsStream=LogicRuleParserTest.class.getResourceAsStream("String_Node_Str" + experimentName + "String_Node_Str");
  InputStream trustTrainStream=LogicRuleParserTest.class.getResourceAsStream("String_Node_Str" + experimentName + "String_Node_Str");
  InputStream trustTestStream=LogicRuleParserTest.class.getResourceAsStream("String_Node_Str" + experimentName + "String_Node_Str");
  List<FastProbabilisticSoftLogicProblem.Rule> rules=null;
  try (BufferedReader modelReader=new BufferedReader(new InputStreamReader(modelStream));BufferedReader knowsReader=new BufferedReader(new InputStreamReader(knowsStream));BufferedReader trustTrainReader=new BufferedReader(new InputStreamReader(trustTrainStream));BufferedReader trustTestReader=trustTestStream == null ? null : new BufferedReader(new InputStreamReader(trustTestStream))){
    rules=ProbabilisticSoftLogicReader.readFastRules(modelReader,logicManager);
    ProbabilisticSoftLogicReader.readGroundingsAndAddToFastManager(logicManager,"String_Node_Str",true,knowsReader);
    ProbabilisticSoftLogicReader.readGroundingsAndAddToFastManager(logicManager,"String_Node_Str",false,trustTrainReader);
  }
 catch (  IOException|DataFormatException e) {
    fail(e.getMessage());
    System.out.println(e.getMessage());
    e.printStackTrace();
  }
  int[] observedIndexes=new int[logicManager.getNumberOfGroundedPredicates()];
  double[] observedWeights=new double[logicManager.getNumberOfGroundedPredicates()];
  for (int index=0; index < logicManager.getNumberOfGroundedPredicates(); index++) {
    observedIndexes[index]=(int)logicManager.getGroundedPredicates().get(index).getIdentifier();
    observedWeights[index]=(double)logicManager.getGroundedPredicates().get(index).getValue();
  }
  FastProbabilisticSoftLogicProblem.Builder problemBuilder=new FastProbabilisticSoftLogicProblem.Builder(logicManager);
  FastProbabilisticSoftLogicProblem.Rule.addGroundingsToBuilder(rules,problemBuilder,logicManager);
  FastProbabilisticSoftLogicProblem problem=problemBuilder.build();
  Map<Integer,Double> result=problem.solve();
  Map<String,Double> filteredResults=new HashMap<>();
  result.keySet().stream().filter(key -> result.get(key) > Math.sqrt(Double.MIN_VALUE)).forEach(key -> filteredResults.put(logicManager.getGroundedPredicate(key).toString(),result.get(key)));
  long numberOfActivatedGroundings=result.keySet().stream().filter(key -> result.get(key) > 0.01).count();
  result.keySet().stream().filter(key -> result.get(key) > 0.01).forEach(key -> logicManager.getGroundedPredicate(key).setValue(result.get(key)));
  System.out.println(result.get(0));
  System.out.println(result.get(1));
  System.out.println("String_Node_Str");
}