Program: 17588
Project: 17588
Buggy source:
/** 
 * {@inheritDoc} 
 */
@Override public Pattern read(Resource resource){
  checkNotNull(resource);
  PatternImpl.Builder patternBuilder=new PatternImpl.Builder();
  patternBuilder.setElement(resource);
  int count=0;
  count=0;
  for (  Statement smt : resource.listProperties(DCTerms.identifier).toList()) {
    checkArgument(++count == 1,"String_Node_Str",resource.getURI());
    patternBuilder.setId(smt.getObject().asLiteral().getString());
  }
  count=0;
  for (  Statement smt : resource.listProperties(DCTerms.description).toList()) {
    checkArgument(++count == 1,"String_Node_Str",resource.getURI());
    patternBuilder.setDescription(smt.getObject().asLiteral().getLexicalForm());
  }
  count=0;
  for (  Statement smt : resource.listProperties(RDFUNITv.sparqlWherePattern).toList()) {
    checkArgument(++count == 1,"String_Node_Str",resource.getURI());
    patternBuilder.setSparqlWherePattern(smt.getObject().asLiteral().getLexicalForm());
  }
  count=0;
  for (  Statement smt : resource.listProperties(RDFUNITv.sparqlPrevalencePattern).toList()) {
    checkArgument(++count == 1,"String_Node_Str",resource.getURI());
    patternBuilder.setSparqlPatternPrevalence(smt.getObject().asLiteral().getLexicalForm());
  }
  Collection<PatternParameter> patternParameters=new ArrayList<>();
  for (  Statement smt : resource.listProperties(RDFUNITv.parameter).toList()) {
    patternParameters.add(PatternParameterReader.create().read(smt.getResource()));
  }
  patternBuilder.setParameters(patternParameters);
  Collection<ResultAnnotation> patternAnnotations=new ArrayList<>();
  for (  Statement smt : resource.listProperties(RDFUNITv.resultAnnotation).toList()) {
    patternAnnotations.add(ResultAnnotationReader.create().read(smt.getResource()));
  }
  patternBuilder.setAnnotations(patternAnnotations);
  return patternBuilder.build();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public Pattern read(Resource resource){
  checkNotNull(resource);
  PatternImpl.Builder patternBuilder=new PatternImpl.Builder();
  patternBuilder.setElement(resource);
  int count=0;
  count=0;
  for (  Statement smt : resource.listProperties(DCTerms.identifier).toList()) {
    checkArgument(++count == 1,"String_Node_Str",resource.getURI());
    patternBuilder.setId(smt.getObject().asLiteral().getLexicalForm());
  }
  count=0;
  for (  Statement smt : resource.listProperties(DCTerms.description).toList()) {
    checkArgument(++count == 1,"String_Node_Str",resource.getURI());
    patternBuilder.setDescription(smt.getObject().asLiteral().getLexicalForm());
  }
  count=0;
  for (  Statement smt : resource.listProperties(RDFUNITv.sparqlWherePattern).toList()) {
    checkArgument(++count == 1,"String_Node_Str",resource.getURI());
    patternBuilder.setSparqlWherePattern(smt.getObject().asLiteral().getLexicalForm());
  }
  count=0;
  for (  Statement smt : resource.listProperties(RDFUNITv.sparqlPrevalencePattern).toList()) {
    checkArgument(++count == 1,"String_Node_Str",resource.getURI());
    patternBuilder.setSparqlPatternPrevalence(smt.getObject().asLiteral().getLexicalForm());
  }
  Collection<PatternParameter> patternParameters=new ArrayList<>();
  for (  Statement smt : resource.listProperties(RDFUNITv.parameter).toList()) {
    patternParameters.add(PatternParameterReader.create().read(smt.getResource()));
  }
  patternBuilder.setParameters(patternParameters);
  Collection<ResultAnnotation> patternAnnotations=new ArrayList<>();
  for (  Statement smt : resource.listProperties(RDFUNITv.resultAnnotation).toList()) {
    patternAnnotations.add(ResultAnnotationReader.create().read(smt.getResource()));
  }
  patternBuilder.setAnnotations(patternAnnotations);
  return patternBuilder.build();
}