Program: 63060
Project: 63060
Buggy source:
/** 
 * @param tokens the words spanned by the mention
 * @param limit maximum number of results
 * @return a query to retrieve candidate entities
 */
public static TupleQuery generateCandidateQuery(RepositoryConnection conn,List<String> tokens,int limit,IRI aDescriptionIri){
  String query=String.join("String_Node_Str","String_Node_Str",SPARQL_PREFIX,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + TERMS,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + STATEMENTS + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + String.join("String_Node_Str",WIKIMEDIA_INTERNAL,WIKIMEDIA_PROJECT_PAGE,WIKIMEDIA_CATEGORY,WIKIMEDIA_DISAMBIGUATION_PAGE,WIKIMEDIA_LIST_ARTICLE,WIKIMEDIA_TEMPLATE,WIKIMEDIA_NEWS_ARTICLE,WIKIMEDIA_NAVIGATIONAL_TEMPLATE) + "String_Node_Str","String_Node_Str" + INSTANCES + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + TERMS + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + limit);
  ValueFactory vf=SimpleValueFactory.getInstance();
  Literal tokensJoined=vf.createLiteral(String.join("String_Node_Str",tokens));
  TupleQuery tupleQuery=conn.prepareTupleQuery(QueryLanguage.SPARQL,query);
  tupleQuery.setBinding("String_Node_Str",tokensJoined);
  tupleQuery.setBinding("String_Node_Str",aDescriptionIri);
  return tupleQuery;
}

Fixed version (ground truth):
/** 
 * @param tokens the words spanned by the mention
 * @param limit maximum number of results
 * @return a query to retrieve candidate entities
 */
public static TupleQuery generateCandidateQuery(RepositoryConnection conn,String tokens,int limit,IRI aDescriptionIri){
  String query=String.join("String_Node_Str","String_Node_Str",SPARQL_PREFIX,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + TERMS,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + STATEMENTS + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + String.join("String_Node_Str",WIKIMEDIA_INTERNAL,WIKIMEDIA_PROJECT_PAGE,WIKIMEDIA_CATEGORY,WIKIMEDIA_DISAMBIGUATION_PAGE,WIKIMEDIA_LIST_ARTICLE,WIKIMEDIA_TEMPLATE,WIKIMEDIA_NEWS_ARTICLE,WIKIMEDIA_NAVIGATIONAL_TEMPLATE) + "String_Node_Str","String_Node_Str" + INSTANCES + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + TERMS + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + limit);
  ValueFactory vf=SimpleValueFactory.getInstance();
  Literal tokensJoined=vf.createLiteral(String.join("String_Node_Str",tokens));
  TupleQuery tupleQuery=conn.prepareTupleQuery(QueryLanguage.SPARQL,query);
  tupleQuery.setBinding("String_Node_Str",tokensJoined);
  tupleQuery.setBinding("String_Node_Str",aDescriptionIri);
  return tupleQuery;
}