Program: 63058
Project: 63058
Buggy source:
/** 
 * @param inputData All sentences to predict annotations for.
 * @param < T >
 * @return Predicted sentence.Outer list: Represents a document Middle list: Represents a sentence Inner list: Represents a token (predictions for each token)
 */
@Override public <T extends TokenObject>List<List<List<AnnotationObject>>> predictSentences(List<List<T>> inputData){
  List<List<List<AnnotationObject>>> result=new ArrayList<>();
  for (  List<T> sentence : inputData) {
    List<List<AnnotationObject>> annotatedSentence=new ArrayList<>();
    int sentenceIndex=0;
    while (sentenceIndex < sentence.size() - 1) {
      TokenObject token=sentence.get(sentenceIndex);
      List<AnnotationObject> word;
      if (isNamedEntity(token)) {
        StringBuilder coveredText=new StringBuilder(token.getCoveredText());
        int endCharacter=token.getOffset().getEndCharacter();
        int endToken=token.getOffset().getEndToken();
        TokenObject nextTokenObject=sentence.get(sentenceIndex + 1);
        while (isNamedEntity(nextTokenObject) && sentenceIndex + 1 < sentence.size() - 1) {
          coveredText.append("String_Node_Str").append(nextTokenObject.getCoveredText());
          endCharacter=nextTokenObject.getOffset().getEndCharacter();
          endToken=nextTokenObject.getOffset().getEndToken();
          sentenceIndex++;
          nextTokenObject=sentence.get(sentenceIndex + 1);
        }
        token.setCoveredText(coveredText.toString());
        token.setOffset(new Offset(token.getOffset().getBeginCharacter(),endCharacter,token.getOffset().getBeginToken(),endToken));
        word=predictToken(token);
        annotatedSentence.add(word);
      }
      sentenceIndex++;
    }
    result.add(annotatedSentence);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @param inputData All sentences to predict annotations for.
 * @param < T >
 * @return Predicted sentence.Outer list: Represents a document Middle list: Represents a sentence Inner list: Represents a token (predictions for each token)
 */
@Override public <T extends TokenObject>List<List<List<AnnotationObject>>> predictSentences(List<List<T>> inputData){
  List<List<List<AnnotationObject>>> result=new ArrayList<>();
  inputData.parallelStream().forEach(sentence -> {
    List<List<AnnotationObject>> annotatedSentence=new ArrayList<>();
    int sentenceIndex=0;
    while (sentenceIndex < sentence.size() - 1) {
      TokenObject token=sentence.get(sentenceIndex);
      List<AnnotationObject> word;
      if (isNamedEntity(token)) {
        StringBuilder coveredText=new StringBuilder(token.getCoveredText());
        int endCharacter=token.getOffset().getEndCharacter();
        int endToken=token.getOffset().getEndToken();
        TokenObject nextTokenObject=sentence.get(sentenceIndex + 1);
        while (isNamedEntity(nextTokenObject) && sentenceIndex + 1 < sentence.size() - 1) {
          coveredText.append("String_Node_Str").append(nextTokenObject.getCoveredText());
          endCharacter=nextTokenObject.getOffset().getEndCharacter();
          endToken=nextTokenObject.getOffset().getEndToken();
          sentenceIndex++;
          nextTokenObject=sentence.get(sentenceIndex + 1);
        }
        token.setCoveredText(coveredText.toString());
        token.setOffset(new Offset(token.getOffset().getBeginCharacter(),endCharacter,token.getOffset().getBeginToken(),endToken));
        word=predictToken(token);
        annotatedSentence.add(word);
      }
      sentenceIndex++;
    }
    result.add(annotatedSentence);
  }
);
  return result;
}