Program: 144017
Project: 144017
Buggy source:
public static void readGroundingsAndAddToManager(ProbabilisticSoftLogicPredicateManager predicateManager,LogicManager<Integer,Double> logicManager,VariableType<Integer> variableType,String predicateName,boolean isClosedPredicate,boolean isIgnoreValues,BufferedReader reader) throws DataFormatException, IOException {
  String line;
  int lineNumber=0;
  boolean hasValues=false;
  while ((line=reader.readLine()) != null) {
    String[] lineFields=line.split("String_Node_Str");
    if (lineNumber == 0 && lineFields.length == 3) {
      hasValues=true;
    }
    double value=1;
    if (hasValues) {
      if (lineFields.length != 3) {
        throw new DataFormatException("String_Node_Str" + (lineNumber + 1));
      }
      value=Double.parseDouble(lineFields[2]);
    }
 else     if (lineFields.length != 2) {
      throw new DataFormatException("String_Node_Str" + (lineNumber + 1));
    }
    ImmutableList.Builder<String> currentGrounding=ImmutableList.builder();
    for (int indexEntity=0; indexEntity < 2; ++indexEntity) {
      String entity=lineFields[indexEntity];
      entity=entity.trim();
      if (entity.isEmpty()) {
        throw new DataFormatException("String_Node_Str" + (lineNumber + 1));
      }
      currentGrounding.add(entity);
    }
    ProbabilisticSoftLogicProblem.Predicate groundedPredicate=new ProbabilisticSoftLogicProblem.Predicate(predicateName,currentGrounding.build(),false);
    if (isIgnoreValues) {
      predicateManager.getOrAddPredicate(groundedPredicate);
    }
 else {
      predicateManager.getOrAddPredicate(groundedPredicate,value);
    }
    Predicate<Integer> predicate=logicManager.getPredicate(predicateName);
    logicManager.addGroundedPredicate(predicate,currentGrounding.build().stream().map(Integer::parseInt).collect(Collectors.toList()));
    ++lineNumber;
  }
  if (isClosedPredicate) {
    predicateManager.closePredicate(predicateName);
  }
}

Fixed version (ground truth):
public static void readGroundingsAndAddToManager(ProbabilisticSoftLogicPredicateManager predicateManager,LogicManager<Integer,Double> logicManager,VariableType<Integer> variableType,String predicateName,boolean isClosedPredicate,boolean isIgnoreValues,BufferedReader reader) throws DataFormatException, IOException {
  String line;
  int lineNumber=0;
  boolean hasValues=false;
  while ((line=reader.readLine()) != null) {
    String[] lineFields=line.split("String_Node_Str");
    if (lineNumber == 0 && lineFields.length == 3) {
      hasValues=true;
    }
    double value=1;
    if (hasValues) {
      if (lineFields.length != 3) {
        throw new DataFormatException("String_Node_Str" + (lineNumber + 1));
      }
      value=Double.parseDouble(lineFields[2]);
    }
 else     if (lineFields.length != 2) {
      throw new DataFormatException("String_Node_Str" + (lineNumber + 1));
    }
    ImmutableList.Builder<String> currentGrounding=ImmutableList.builder();
    for (int indexEntity=0; indexEntity < 2; ++indexEntity) {
      String entity=lineFields[indexEntity];
      entity=entity.trim();
      if (entity.isEmpty()) {
        throw new DataFormatException("String_Node_Str" + (lineNumber + 1));
      }
      currentGrounding.add(entity);
    }
    ProbabilisticSoftLogicProblem.Predicate groundedPredicate=new ProbabilisticSoftLogicProblem.Predicate(predicateName,currentGrounding.build(),false);
    if (isIgnoreValues) {
      predicateManager.getOrAddPredicate(groundedPredicate);
    }
 else {
      predicateManager.getOrAddPredicate(groundedPredicate,value);
    }
    Predicate<Integer> predicate=logicManager.getPredicate(predicateName);
    if (isIgnoreValues) {
      logicManager.addGroundedPredicate(predicate,currentGrounding.build().stream().map(Integer::parseInt).collect(Collectors.toList()));
    }
 else {
      logicManager.addGroundedPredicate(predicate,currentGrounding.build().stream().map(Integer::parseInt).collect(Collectors.toList()),value);
    }
    ++lineNumber;
  }
  if (isClosedPredicate) {
    predicateManager.closePredicate(predicateName);
  }
}