nus-yam/ex-repair huggingface dataset:
Program: 38958
Project: 38958
Buggy source:
/** 
 * Set an IProgressMonitor that is notified on changes in the evaluation progress for every managed issues.
 * @param progressMonitor monitor instance to be notified
 */
public void setProgressMonitor(IProgressMonitor progressMonitor){
  this.progressMonitor=progressMonitor;
}

Fixed version (ground truth):
/** 
 * Set an IProgressMonitor that is notified on changes in the evaluation progress for every managed issues.
 * @param progressMonitor monitor instance to be notified
 */
public void setProgressMonitor(IProgressMonitor progressMonitor){
  for (  Issue issue : issuesToTest) {
    issue.setProgressMonitor(progressMonitor);
  }
}
Program: 38959
Project: 38959
Buggy source:
public VocEvaluate(String[] args) throws OpenRDFException, IOException, UnsupportedIssueIdException {
  parseCmdParams(args);
  if (outputVersion) {
    System.out.println("String_Node_Str" + getClass().getPackage().getImplementationVersion());
  }
  if (parsedCommand == null) {
    jc.usage();
  }
 else {
    qskos=new QSkos();
    listIssuesOrEvaluate();
  }
}

Fixed version (ground truth):
private VocEvaluate(String[] args) throws OpenRDFException, IOException {
  parseCmdParams(args);
  if (outputVersion) {
    System.out.println("String_Node_Str" + getClass().getPackage().getImplementationVersion());
  }
  if (parsedCommand == null) {
    jc.usage();
  }
 else {
    listIssuesOrEvaluate();
  }
}
Program: 38960
Project: 38960
Buggy source:
private Collection<Issue> extractMeasures() throws UnsupportedIssueIdException {
  Collection<Issue> resultingIssues;
  Collection<Issue> selectedIssues=getIssues(parsedCommand.selectedIds);
  Collection<Issue> excludedIssues=getIssues(parsedCommand.excludedIds);
  if (!selectedIssues.isEmpty()) {
    resultingIssues=selectedIssues;
  }
 else   if (!excludedIssues.isEmpty()) {
    resultingIssues=getAllIssuesForCommand();
    resultingIssues.removeAll(excludedIssues);
  }
 else {
    resultingIssues=getAllIssuesForCommand();
  }
  return resultingIssues;
}

Fixed version (ground truth):
private Collection<Issue> extractMeasures(){
  Collection<Issue> resultingIssues;
  Collection<Issue> selectedIssues=getIssues(parsedCommand.selectedIds);
  Collection<Issue> excludedIssues=getIssues(parsedCommand.excludedIds);
  if (!selectedIssues.isEmpty()) {
    resultingIssues=selectedIssues;
  }
 else   if (!excludedIssues.isEmpty()) {
    resultingIssues=getAllIssuesForCommand();
    resultingIssues.removeAll(excludedIssues);
  }
 else {
    resultingIssues=getAllIssuesForCommand();
  }
  return resultingIssues;
}
Program: 38961
Project: 38961
Buggy source:
public static void main(String[] args){
  try {
    new VocEvaluate(args);
  }
 catch (  ParameterException paramExc) {
    jc.usage();
  }
catch (  IOException ioException) {
    System.out.println("String_Node_Str" + ioException.getMessage());
  }
catch (  OpenRDFException rdfException) {
    System.out.println("String_Node_Str" + rdfException.getMessage());
  }
catch (  UnsupportedIssueIdException measureIdExc) {
    System.out.println("String_Node_Str" + measureIdExc.getUnsupportedId());
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  try {
    new VocEvaluate(args);
  }
 catch (  ParameterException paramExc) {
    jc.usage();
  }
catch (  IOException ioException) {
    System.out.println("String_Node_Str" + ioException.getMessage());
  }
catch (  OpenRDFException rdfException) {
    System.out.println("String_Node_Str" + rdfException.getMessage());
  }
}
Program: 38962
Project: 38962
Buggy source:
private void setup() throws OpenRDFException, IOException {
  setupLogging();
  VocabRepository vocabRepo=new VocabRepository(new File(parsedCommand.vocabFilenames.get(0)),null,null);
  qskos.setVocabRepository(vocabRepo);
  qskos.setAuthResourceIdentifier(parsedCommand.authoritativeResourceIdentifier);
  qskos.addSparqlEndPoint("String_Node_Str");
  qskos.addSparqlEndPoint("String_Node_Str");
  if (parsedCommand instanceof CommandAnalyze) {
    qskos.setSubsetSize(((CommandAnalyze)parsedCommand).randomSubsetSize_percent);
  }
  if (parsedCommand.enableSkosXl) {
    vocabRepo.enableSkosXlSupport();
  }
  if (!uriTrackingEnabled() && !parsedCommand.noProgressBar) {
    qskos.setProgressMonitor(new ConsoleProgressMonitor());
  }
}

Fixed version (ground truth):
private void setup() throws OpenRDFException, IOException {
  setupLogging();
  VocabRepository vocabRepo=new VocabRepository(new File(parsedCommand.vocabFilenames.get(0)),null,null);
  qskos=new QSkos(vocabRepo);
  qskos.setAuthResourceIdentifier(parsedCommand.authoritativeResourceIdentifier);
  qskos.addSparqlEndPoint("String_Node_Str");
  qskos.addSparqlEndPoint("String_Node_Str");
  if (parsedCommand instanceof CommandAnalyze) {
    qskos.setSubsetSize(((CommandAnalyze)parsedCommand).randomSubsetSize_percent);
  }
  if (parsedCommand.enableSkosXl) {
    vocabRepo.enableSkosXlSupport();
  }
  if (!uriTrackingEnabled() && !parsedCommand.noProgressBar) {
    qskos.setProgressMonitor(new ConsoleProgressMonitor());
  }
}
Program: 38963
Project: 38963
Buggy source:
private void evaluate() throws OpenRDFException, IOException, UnsupportedIssueIdException {
  setup();
  reportGenerator=new ReportGenerator(extractMeasures());
  if (uriTrackingEnabled()) {
    reportGenerator.outputURITrackingReport(new File(((CommandAnalyze)parsedCommand).uriTrackFilename));
  }
 else {
    reportGenerator.outputIssuesReport(shouldOutputExtReport(),shouldWriteGraphs());
  }
}

Fixed version (ground truth):
private void evaluate() throws OpenRDFException, IOException {
  setup();
  reportGenerator=new ReportGenerator(extractMeasures());
  if (uriTrackingEnabled()) {
    reportGenerator.outputURITrackingReport(new File(((CommandAnalyze)parsedCommand).uriTrackFilename));
  }
 else {
    reportGenerator.outputIssuesReport(shouldOutputExtReport(),shouldWriteGraphs());
  }
}
Program: 38964
Project: 38964
Buggy source:
private Collection<Issue> getIssues(String ids) throws UnsupportedIssueIdException {
  if (ids == null || ids.isEmpty()) {
    return Collections.emptySet();
  }
  Collection<Issue> issues=new ArrayList<Issue>();
  StringTokenizer tokenizer=new StringTokenizer(ids,"String_Node_Str");
  while (tokenizer.hasMoreElements()) {
    for (    Issue issue : qskos.getAllIssues()) {
      if (issue.getId().equalsIgnoreCase(tokenizer.nextToken())) {
        issues.add(issue);
      }
    }
  }
  return issues;
}

Fixed version (ground truth):
private Collection<Issue> getIssues(String ids){
  if (ids == null || ids.isEmpty()) {
    return Collections.emptySet();
  }
  Collection<Issue> issues=new ArrayList<Issue>();
  StringTokenizer tokenizer=new StringTokenizer(ids,"String_Node_Str");
  while (tokenizer.hasMoreElements()) {
    String token=tokenizer.nextToken();
    for (    Issue issue : qskos.getAllIssues()) {
      if (issue.getId().equalsIgnoreCase(token)) {
        issues.add(issue);
      }
    }
  }
  return issues;
}
Program: 38965
Project: 38965
Buggy source:
private void listIssuesOrEvaluate() throws OpenRDFException, IOException, UnsupportedIssueIdException {
  if (parsedCommand.vocabFilenames == null) {
    if (parsedCommand instanceof CommandAnalyze) {
      outputIssueDetails(Issue.IssueType.ANALYTICAL);
    }
 else {
      outputIssueDetails(Issue.IssueType.STATISTICAL);
    }
  }
 else {
    checkVocabFilenameGiven();
    evaluate();
  }
}

Fixed version (ground truth):
private void listIssuesOrEvaluate() throws OpenRDFException, IOException {
  if (parsedCommand.vocabFilenames == null) {
    if (parsedCommand instanceof CommandAnalyze) {
      outputIssueDetails(Issue.IssueType.ANALYTICAL);
    }
 else {
      outputIssueDetails(Issue.IssueType.STATISTICAL);
    }
  }
 else {
    checkVocabFilenameGiven();
    evaluate();
  }
}
Program: 38966
Project: 38966
Buggy source:
public final void reset(){
  result=null;
  if (progressMonitor != null) {
    progressMonitor.reset();
  }
}

Fixed version (ground truth):
protected final void reset(){
  result=null;
  if (progressMonitor != null) {
    progressMonitor.reset();
  }
}
Program: 38967
Project: 38967
Buggy source:
private Collection<Value> createUriResultList(TupleQueryResult result,String bindingName) throws OpenRDFException {
  List<Value> resultList=new ArrayList<Value>();
  while (result.hasNext()) {
    BindingSet queryResult=result.next();
    URI resource=(URI)queryResult.getValue(bindingName);
    resultList.add(resource);
  }
  return resultList;
}

Fixed version (ground truth):
private Collection<Value> createUriResultList(TupleQueryResult result) throws OpenRDFException {
  List<Value> resultList=new ArrayList<Value>();
  while (result.hasNext()) {
    BindingSet queryResult=result.next();
    URI resource=(URI)queryResult.getValue("String_Node_Str");
    resultList.add(resource);
  }
  return resultList;
}
Program: 38968
Project: 38968
Buggy source:
@Override protected CollectionResult<Value> invoke() throws OpenRDFException {
  TupleQueryResult result=vocabRepository.query(createTopConceptsHavingBroaderConceptQuery());
  return new CollectionResult<Value>(createUriResultList(result,"String_Node_Str"));
}

Fixed version (ground truth):
@Override protected CollectionResult<Value> invoke() throws OpenRDFException {
  TupleQueryResult result=vocabRepository.query(createTopConceptsHavingBroaderConceptQuery());
  return new CollectionResult<Value>(createUriResultList(result));
}
Program: 38969
Project: 38969
Buggy source:
public Result(T data){
  this.data=data;
}

Fixed version (ground truth):
protected Result(T data){
  this.data=data;
}
Program: 38970
Project: 38970
Buggy source:
public static Set<Value> getValuesForBindingName(TupleQueryResult result,String bindingName) throws QueryEvaluationException {
  Set<Value> ret=new HashSet<Value>();
  while (result.hasNext()) {
    Value concept=result.next().getValue(bindingName);
    if (concept instanceof URI) {
      ret.add((URI)concept);
    }
  }
  return ret;
}

Fixed version (ground truth):
public static Set<Value> getValuesForBindingName(TupleQueryResult result,String bindingName) throws QueryEvaluationException {
  Set<Value> ret=new HashSet<Value>();
  while (result.hasNext()) {
    Value concept=result.next().getValue(bindingName);
    if (concept instanceof URI) {
      ret.add(concept);
    }
  }
  return ret;
}
Program: 38971
Project: 38971
Buggy source:
public BrokenLinksResult findBrokenLinks() throws OpenRDFException {
  resourceAvailabilityChecker.setProgressMonitor(progressMonitor);
  return resourceAvailabilityChecker.findBrokenLinks(randomSubsetSize_percent,urlDereferencingDelay);
}

Fixed version (ground truth):
public ExtrapolatedCollectionResult<URL> findBrokenLinks() throws OpenRDFException {
  resourceAvailabilityChecker.setProgressMonitor(progressMonitor);
  return resourceAvailabilityChecker.findBrokenLinks(randomSubsetSize_percent,urlDereferencingDelay);
}
Program: 38972
Project: 38972
Buggy source:
private void dereferenceURIs(Float randomSubsetSize_percent){
  Set<URI> urisToBeDereferenced=collectUrisToBeDereferenced(randomSubsetSize_percent);
  Iterator<URI> it=new MonitoredIterator<URI>(urisToBeDereferenced,progressMonitor);
  int i=1;
  while (it.hasNext()) {
    URI uri=it.next();
    logger.debug("String_Node_Str" + i + "String_Node_Str"+ urisToBeDereferenced.size());
    i++;
    try {
      Thread.sleep(urlDereferencingDelayMillis);
    }
 catch (    InterruptedException e) {
    }
    addToResults(uri);
  }
}

Fixed version (ground truth):
private void dereferenceURIs(Float randomSubsetSize_percent,Integer urlDereferencingDelayMillis){
  Set<URI> urisToBeDereferenced=collectUrisToBeDereferenced(randomSubsetSize_percent);
  Iterator<URI> it=new MonitoredIterator<URI>(urisToBeDereferenced,progressMonitor);
  int i=1;
  while (it.hasNext()) {
    URI uri=it.next();
    logger.debug("String_Node_Str" + i + "String_Node_Str"+ urisToBeDereferenced.size());
    i++;
    try {
      if (urlDereferencingDelayMillis == null) {
        urlDereferencingDelayMillis=DEREF_DELAY_MILLIS;
      }
      Thread.sleep(urlDereferencingDelayMillis);
    }
 catch (    InterruptedException e) {
    }
    addToResults(uri);
  }
}
Program: 38973
Project: 38973
Buggy source:
public BrokenLinksResult findBrokenLinks(Float randomSubsetSize_percent,Integer urlDereferencingDelayMillis) throws OpenRDFException {
  if (urlDereferencingDelayMillis != null) {
    this.urlDereferencingDelayMillis=urlDereferencingDelayMillis;
  }
  findAllHttpURLs();
  dereferenceURIs(randomSubsetSize_percent);
  return new BrokenLinksResult(urlAvailability,randomSubsetSize_percent);
}

Fixed version (ground truth):
public ExtrapolatedCollectionResult<URL> findBrokenLinks(Float randomSubsetSize_percent,Integer urlDereferencingDelayMillis) throws OpenRDFException {
  createAvailabilityMap(randomSubsetSize_percent,urlDereferencingDelayMillis);
  return new ExtrapolatedCollectionResult<URL>(collectUnavailableURLs(),randomSubsetSize_percent);
}
Program: 38974
Project: 38974
Buggy source:
public CollectionResult<Set<URI>> findHierarchicalCycles() throws OpenRDFException {
  return hierarchyAnalyer.findCycleContainingComponents();
}

Fixed version (ground truth):
public CollectionResult<Set<Resource>> findHierarchicalCycles() throws OpenRDFException {
  return hierarchyAnalyer.findCycleContainingComponents();
}
Program: 38975
Project: 38975
Buggy source:
private Relation(URI sourceConcept,URI targetConcept,URI property){
  this.sourceConcept=sourceConcept;
  this.targetConcept=targetConcept;
  this.property=property;
}

Fixed version (ground truth):
private Relation(Resource sourceConcept,Resource targetConcept,Resource property){
  this.sourceConcept=sourceConcept;
  this.targetConcept=targetConcept;
  this.property=property;
}
Program: 38976
Project: 38976
Buggy source:
private void createGraph(Collection<URI> allConcepts) throws OpenRDFException {
  graph=new DirectedMultigraph<URI,NamedEdge>(NamedEdge.class);
  Iterator<URI> conceptIt=new MonitoredIterator<URI>(allConcepts,progressMonitor);
  while (conceptIt.hasNext()) {
    Collection<Relation> relations=findRelations(conceptIt.next());
    for (    Relation relation : relations) {
      addNodesToGraph(relation.sourceConcept,relation.targetConcept,relation.property);
    }
  }
}

Fixed version (ground truth):
private void createGraph(Collection<URI> allConcepts) throws OpenRDFException {
  graph=new DirectedMultigraph<Resource,NamedEdge>(NamedEdge.class);
  Iterator<URI> conceptIt=new MonitoredIterator<URI>(allConcepts,progressMonitor);
  while (conceptIt.hasNext()) {
    Collection<Relation> relations=findRelations(conceptIt.next());
    for (    Relation relation : relations) {
      addNodesToGraph(relation.sourceConcept,relation.targetConcept,relation.property);
    }
  }
}
Program: 38977
Project: 38977
Buggy source:
private void addNodesToGraph(URI skosResource,URI otherResource,URI skosRelation){
  graph.addVertex(skosResource);
  if (otherResource != null) {
    graph.addVertex(otherResource);
    graph.addEdge(skosResource,otherResource,new NamedEdge(skosRelation.getLocalName()));
  }
}

Fixed version (ground truth):
private void addNodesToGraph(Resource skosResource,Resource otherResource,Resource skosRelation){
  graph.addVertex(skosResource);
  if (otherResource != null) {
    graph.addVertex(otherResource);
    graph.addEdge(skosResource,otherResource,new NamedEdge(skosRelation.stringValue()));
  }
}
Program: 38978
Project: 38978
Buggy source:
private Collection<Relation> findRelations(URI concept) throws OpenRDFException {
  Collection<Relation> allRelations=new ArrayList<Relation>();
  TupleQueryResult result=vocabRepository.query(createConnectionsQuery(concept));
  while (result.hasNext()) {
    BindingSet bindingSet=result.next();
    Value otherConcept=bindingSet.getValue("String_Node_Str");
    Value semanticRelation=bindingSet.getValue("String_Node_Str");
    if (otherConcept != null && semanticRelation != null) {
      allRelations.add(new Relation(concept,(URI)otherConcept,(URI)semanticRelation));
    }
  }
  return allRelations;
}

Fixed version (ground truth):
private Collection<Relation> findRelations(URI concept) throws OpenRDFException {
  Collection<Relation> allRelations=new ArrayList<Relation>();
  TupleQueryResult result=vocabRepository.query(createConnectionsQuery(concept));
  while (result.hasNext()) {
    BindingSet bindingSet=result.next();
    Value otherConcept=bindingSet.getValue("String_Node_Str");
    Value semanticRelation=bindingSet.getValue("String_Node_Str");
    if (otherConcept != null && semanticRelation != null) {
      allRelations.add(new Relation(concept,(Resource)otherConcept,(Resource)semanticRelation));
    }
  }
  return allRelations;
}
Program: 38979
Project: 38979
Buggy source:
private void createGraph(TupleQueryResult broaderResult,TupleQueryResult narrowerResult) throws QueryEvaluationException {
  hierarchyGraph=new DirectedMultigraph<URI,NamedEdge>(NamedEdge.class);
  addResultsToGraph(broaderResult,false);
  addResultsToGraph(narrowerResult,true);
}

Fixed version (ground truth):
private void createGraph(TupleQueryResult broaderResult,TupleQueryResult narrowerResult) throws QueryEvaluationException {
  hierarchyGraph=new DirectedMultigraph<Resource,NamedEdge>(NamedEdge.class);
  addResultsToGraph(broaderResult,false);
  addResultsToGraph(narrowerResult,true);
}
Program: 38980
Project: 38980
Buggy source:
private void addToGraph(Value resource,Value otherResource,boolean invertEdges){
  URI resourceNode=new URIImpl(resource.stringValue());
  hierarchyGraph.addVertex(resourceNode);
  URI otherNode=new URIImpl(otherResource.stringValue());
  hierarchyGraph.addVertex(otherNode);
  if (invertEdges) {
    hierarchyGraph.addEdge(otherNode,resourceNode,new NamedEdge());
  }
 else {
    hierarchyGraph.addEdge(resourceNode,otherNode,new NamedEdge());
  }
}

Fixed version (ground truth):
private void addToGraph(Value resource,Value otherResource,boolean invertEdges){
  Resource resourceNode=(Resource)resource;
  hierarchyGraph.addVertex(resourceNode);
  Resource otherNode=(Resource)otherResource;
  hierarchyGraph.addVertex(otherNode);
  if (invertEdges) {
    hierarchyGraph.addEdge(otherNode,resourceNode,new NamedEdge());
  }
 else {
    hierarchyGraph.addEdge(resourceNode,otherNode,new NamedEdge());
  }
}
Program: 38981
Project: 38981
Buggy source:
private List<Set<URI>> trackNodesInCycles(Set<URI> nodesInCycles){
  List<Set<URI>> ret=new ArrayList<Set<URI>>();
  List<Set<URI>> stronglyConnectedSets=new StrongConnectivityInspector<URI,NamedEdge>(hierarchyGraph).stronglyConnectedSets();
  for (  URI node : nodesInCycles) {
    for (    Set<URI> stronglyConnectedSet : stronglyConnectedSets) {
      if (stronglyConnectedSet.contains(node)) {
        if (!ret.contains(stronglyConnectedSet)) {
          ret.add(stronglyConnectedSet);
        }
      }
    }
  }
  return ret;
}

Fixed version (ground truth):
private List<Set<Resource>> trackNodesInCycles(Set<Resource> nodesInCycles){
  List<Set<Resource>> ret=new ArrayList<Set<Resource>>();
  List<Set<Resource>> stronglyConnectedSets=new StrongConnectivityInspector<Resource,NamedEdge>(hierarchyGraph).stronglyConnectedSets();
  for (  Resource node : nodesInCycles) {
    for (    Set<Resource> stronglyConnectedSet : stronglyConnectedSets) {
      if (stronglyConnectedSet.contains(node)) {
        if (!ret.contains(stronglyConnectedSet)) {
          ret.add(stronglyConnectedSet);
        }
      }
    }
  }
  return ret;
}
Program: 38982
Project: 38982
Buggy source:
public CollectionResult<Set<URI>> findCycleContainingComponents() throws OpenRDFException {
  if (hierarchyGraph == null) {
    TupleQueryResult broaderResult=findTriples(HierarchyStyle.BROADER);
    TupleQueryResult narrowerResult=findTriples(HierarchyStyle.NARROWER);
    createGraph(broaderResult,narrowerResult);
  }
  Set<URI> nodesInCycles=new CycleDetector<URI,NamedEdge>(hierarchyGraph).findCycles();
  cycleContainingComponents=trackNodesInCycles(nodesInCycles);
  return new CollectionResult<Set<URI>>(cycleContainingComponents);
}

Fixed version (ground truth):
public CollectionResult<Set<Resource>> findCycleContainingComponents() throws OpenRDFException {
  if (hierarchyGraph == null) {
    TupleQueryResult broaderResult=findTriples(HierarchyStyle.BROADER);
    TupleQueryResult narrowerResult=findTriples(HierarchyStyle.NARROWER);
    createGraph(broaderResult,narrowerResult);
  }
  Set<Resource> nodesInCycles=new CycleDetector<Resource,NamedEdge>(hierarchyGraph).findCycles();
  cycleContainingComponents=trackNodesInCycles(nodesInCycles);
  return new CollectionResult<Set<Resource>>(cycleContainingComponents);
}
Program: 38983
Project: 38983
Buggy source:
public CollectionResult<URI> findMissingOutLinks(Collection<URI> autoritativeConcepts,String authResourceIdentifier) throws OpenRDFException {
  extResourcesForConcept=new HashMap<URI,List<URL>>();
  this.authResourceIdentifier=authResourceIdentifier;
  findResourcesForConcepts(autoritativeConcepts);
  retainExternalResources();
  return new CollectionResult<URI>(extractUnlinkedConcepts());
}

Fixed version (ground truth):
public CollectionResult<URI> findMissingOutLinks(Collection<URI> autoritativeConcepts,String authResourceIdentifier) throws OpenRDFException {
  extResourcesForConcept=new HashMap<URI,Collection<URL>>();
  this.authResourceIdentifier=authResourceIdentifier;
  findResourcesForConcepts(autoritativeConcepts);
  return new CollectionResult<URI>(extractUnlinkedConcepts());
}
Program: 38984
Project: 38984
Buggy source:
private void findResourcesForConcepts(Collection<URI> concepts) throws OpenRDFException {
  Iterator<URI> conceptIt=new MonitoredIterator<URI>(concepts,progressMonitor,"String_Node_Str");
  while (conceptIt.hasNext()) {
    URI concept=conceptIt.next();
    extResourcesForConcept.put(concept,findResourcesForConcept(concept));
  }
}

Fixed version (ground truth):
private void findResourcesForConcepts(Collection<URI> concepts) throws OpenRDFException {
  Iterator<URI> conceptIt=new MonitoredIterator<URI>(concepts,progressMonitor,"String_Node_Str");
  while (conceptIt.hasNext()) {
    URI concept=conceptIt.next();
    extResourcesForConcept.put(concept,findExternalResourcesForConcept(concept));
  }
}
Program: 38985
Project: 38985
Buggy source:
public WeaklyConnectedComponentsResult(DirectedGraph<URI,NamedEdge> data){
  super(data);
  connectedSets=new ConnectivityInspector<URI,NamedEdge>(getData()).connectedSets();
}

Fixed version (ground truth):
public WeaklyConnectedComponentsResult(DirectedGraph<Resource,NamedEdge> data){
  super(data);
  connectedSets=new ConnectivityInspector<Resource,NamedEdge>(getData()).connectedSets();
}
Program: 38986
Project: 38986
Buggy source:
public List<Set<URI>> getConnectedSets(){
  return connectedSets;
}

Fixed version (ground truth):
public List<Set<Resource>> getConnectedSets(){
  return connectedSets;
}
Program: 38987
Project: 38987
Buggy source:
@Override public String getExtensiveReport(){
  String detailedReport="String_Node_Str";
  long compCount=1;
  for (  Set<URI> component : connectedSets) {
    detailedReport+="String_Node_Str" + compCount + "String_Node_Str"+ component.size()+ "String_Node_Str"+ component.toString()+ "String_Node_Str";
    compCount++;
  }
  return detailedReport;
}

Fixed version (ground truth):
@Override public String getExtensiveReport(){
  String detailedReport="String_Node_Str";
  long compCount=1;
  for (  Set<Resource> component : connectedSets) {
    detailedReport+="String_Node_Str" + compCount + "String_Node_Str"+ component.size()+ "String_Node_Str"+ component.toString()+ "String_Node_Str";
    compCount++;
  }
  return detailedReport;
}
Program: 38988
Project: 38988
Buggy source:
public void exportSubGraph(List<Set<URI>> vertexSubSets,Writer[] outputWriters){
  int i=0;
  Iterator<Set<URI>> it=vertexSubSets.iterator();
  while (it.hasNext()) {
    Graph<URI,NamedEdge> componentGraph=getGraphForComponent(it.next());
    new DOTExporter<URI,NamedEdge>(new IntegerNameProvider<URI>(),new URIVertexNameProvider(),new StringEdgeNameProvider<NamedEdge>()).export(outputWriters[i],(DirectedGraph<URI,NamedEdge>)componentGraph);
    i++;
  }
}

Fixed version (ground truth):
public void exportSubGraph(List<Set<Resource>> vertexSubSets,Writer[] outputWriters){
  int i=0;
  Iterator<Set<Resource>> it=vertexSubSets.iterator();
  while (it.hasNext()) {
    Graph<Resource,NamedEdge> componentGraph=getGraphForComponent(it.next());
    new DOTExporter<Resource,NamedEdge>(new IntegerNameProvider<Resource>(),new URIVertexNameProvider(),new StringEdgeNameProvider<NamedEdge>()).export(outputWriters[i],(DirectedGraph<Resource,NamedEdge>)componentGraph);
    i++;
  }
}
Program: 38989
Project: 38989
Buggy source:
private Graph<URI,NamedEdge> getGraphForComponent(Collection<URI> component){
  return new DirectedSubgraph<URI,NamedEdge>(graph,new HashSet<URI>(component),null);
}

Fixed version (ground truth):
private Graph<Resource,NamedEdge> getGraphForComponent(Collection<Resource> component){
  return new DirectedSubgraph<Resource,NamedEdge>(graph,new HashSet<Resource>(component),null);
}
Program: 38990
Project: 38990
Buggy source:
public GraphExporter(DirectedGraph<URI,NamedEdge> graph){
  this.graph=graph;
}

Fixed version (ground truth):
public GraphExporter(DirectedGraph<Resource,NamedEdge> graph){
  this.graph=graph;
}
Program: 38991
Project: 38991
Buggy source:
@Override public String getVertexName(URI vertex){
  return vertex.getLocalName();
}

Fixed version (ground truth):
@Override public String getVertexName(Resource vertex){
  return vertex.stringValue();
}
Program: 38992
Project: 38992
Buggy source:
@Test public void testComponentCount() throws OpenRDFException {
  long conceptCount=qSkosComponents.findInvolvedConcepts().getData().size();
  List<Set<URI>> components=qSkosComponents.findComponents().getConnectedSets();
  Assert.assertEquals(7,components.size());
  Assert.assertTrue(getVertexCount(components) <= conceptCount);
}

Fixed version (ground truth):
@Test public void testComponentCount() throws OpenRDFException {
  long conceptCount=qSkosComponents.findInvolvedConcepts().getData().size();
  List<Set<Resource>> components=qSkosComponents.findComponents().getConnectedSets();
  Assert.assertEquals(7,components.size());
  Assert.assertTrue(getVertexCount(components) <= conceptCount);
}
Program: 38993
Project: 38993
Buggy source:
private long getVertexCount(List<Set<URI>> components){
  long ret=0;
  for (  Set<URI> component : components) {
    ret+=component.size();
  }
  return ret;
}

Fixed version (ground truth):
private long getVertexCount(List<Set<Resource>> components){
  long ret=0;
  for (  Set<Resource> component : components) {
    ret+=component.size();
  }
  return ret;
}
Program: 38994
Project: 38994
Buggy source:
public CollectionResult<URI> findOmittedTopConcepts() throws OpenRDFException {
  return new ConceptSchemeChecker(vocabRepository).findOmittedTopConcepts();
}

Fixed version (ground truth):
public CollectionResult<URI> findOmittedTopConcepts() throws OpenRDFException {
  return new ConceptSchemeChecker(vocabRepository).findOmittedTopConcepts(findConceptSchemes().getData());
}
Program: 38995
Project: 38995
Buggy source:
public CollectionResult<URI> findOmittedTopConcepts() throws OpenRDFException {
  TupleQueryResult result=vocabRepository.query(createConceptSchemesWithoutTopConceptQuery());
  Collection<URI> foundConceptSchemes=createUriResultList(result,"String_Node_Str");
  return new CollectionResult<URI>(foundConceptSchemes);
}

Fixed version (ground truth):
public CollectionResult<URI> findOmittedTopConcepts(Collection<URI> allConceptSchemes) throws OpenRDFException {
  RepositoryConnection connection=vocabRepository.getRepository().getConnection();
  Collection<URI> csWithOmittedTopConcepts=new HashSet<URI>();
  for (  URI conceptScheme : allConceptSchemes) {
    BooleanQuery hasTopConceptQuery=connection.prepareBooleanQuery(QueryLanguage.SPARQL,createConceptSchemeWithoutTopConceptQuery(conceptScheme));
    if (!hasTopConceptQuery.evaluate()) {
      csWithOmittedTopConcepts.add(conceptScheme);
    }
  }
  return new CollectionResult<URI>(csWithOmittedTopConcepts);
}
Program: 38996
Project: 38996
Buggy source:
@Test public void testConceptSchemesWithoutTopConceptsCount() throws OpenRDFException {
  Collection<URI> conceptSchemes=qSkosMissingTopConcepts.findOmittedTopConcepts().getData();
  Assert.assertEquals(1,conceptSchemes.size());
}

Fixed version (ground truth):
@Test public void testConceptSchemesWithoutTopConceptsCount() throws OpenRDFException {
  Collection<URI> conceptSchemes=qSkosMissingTopConcepts.findOmittedTopConcepts().getData();
  Assert.assertEquals(2,conceptSchemes.size());
}
Program: 38997
Project: 38997
Buggy source:
private String createRedundantAssociativeRelationsQuery(){
  return SparqlPrefix.SKOS + "String_Node_Str" + "String_Node_Str"+ vocabRepository.getVocabContext()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
}

Fixed version (ground truth):
private String createRedundantAssociativeRelationsQuery(){
  return SparqlPrefix.SKOS + "String_Node_Str" + "String_Node_Str"+ vocabRepository.getVocabContext()+ "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"+ "String_Node_Str";
}
Program: 38998
Project: 38998
Buggy source:
@Test public void testRedundantAssociativeRelationsCount() throws OpenRDFException {
  Collection<Pair<URI>> redAssRels=qSkosRedundantAssociativeRelations.findValuelessAssociativeRelations().getData();
  Assert.assertEquals(5,redAssRels.size());
}

Fixed version (ground truth):
@Test public void testRedundantAssociativeRelationsCount() throws OpenRDFException {
  Collection<Pair<URI>> redAssRels=qSkosRedundantAssociativeRelations.findValuelessAssociativeRelations().getData();
  Assert.assertEquals(6,redAssRels.size());
}
Program: 38999
Project: 38999
Buggy source:
public QSkos(File rdfFile,String baseURI,RDFFormat dataFormat) throws RepositoryException, RDFParseException, IOException {
  vocabRepository=new VocabRepository(rdfFile,baseURI,dataFormat);
  extractPublishingHost(baseURI);
  init();
}

Fixed version (ground truth):
public QSkos(File rdfFile,String baseURI,RDFFormat dataFormat) throws RepositoryException, RDFParseException, IOException {
  logger.info("String_Node_Str" + rdfFile.getName() + "String_Node_Str");
  vocabRepository=new VocabRepository(rdfFile,baseURI,dataFormat);
  extractPublishingHost(baseURI);
  init();
}
Program: 39000
Project: 39000
Buggy source:
private void setupQSkos() throws OpenRDFException, IOException {
  qskos=new QSkos(new File(vocabFilenames.get(0)));
  qskos.setPublishingHost(publishingHost);
  qskos.setAuthoritativeUriSubstring(authoritativeUriSubstring);
  qskos.setProgressMonitor(new LoggingProgressMonitor());
  qskos.setSubsetSize(randomSubsetSize_percent);
  qskos.addSparqlEndPoint("String_Node_Str");
  System.out.println("String_Node_Str" + vocabFilenames.get(0));
}

Fixed version (ground truth):
private void setupQSkos() throws OpenRDFException, IOException {
  qskos=new QSkos(new File(vocabFilenames.get(0)));
  qskos.setPublishingHost(publishingHost);
  qskos.setAuthoritativeUriSubstring(authoritativeUriSubstring);
  qskos.setProgressMonitor(new LoggingProgressMonitor());
  qskos.setSubsetSize(randomSubsetSize_percent);
  qskos.addSparqlEndPoint("String_Node_Str");
}
Program: 39001
Project: 39001
Buggy source:
private Object callEntityHandler(InvocationContext ctx,Class<?> entityClass,EntityManager entityManager) throws Exception {
  return EntityDaoHandler.create(entityManager,entityClass).invoke(ctx.getMethod(),ctx.getParameters());
}

Fixed version (ground truth):
private Object callEntityHandler(InvocationContext ctx,Class<?> entityClass,EntityManager entityManager) throws InvocationTargetException, IllegalAccessException {
  return EntityDaoHandler.create(entityManager,entityClass).invoke(ctx.getMethod(),ctx.getParameters());
}
Program: 39002
Project: 39002
Buggy source:
@Override public Object execute(QueryInvocationContext context) throws Exception {
  InvocationContext invocation=context.getInvocation();
  if (EntityDaoHandler.contains(invocation.getMethod())) {
    return callEntityHandler(invocation,context.getEntityClass(),context.getEntityManager());
  }
  return invocation.proceed();
}

Fixed version (ground truth):
@Override public Object execute(QueryInvocationContext context){
  try {
    InvocationContext invocation=context.getInvocation();
    if (EntityDaoHandler.contains(invocation.getMethod())) {
      return callEntityHandler(invocation,context.getEntityClass(),context.getEntityManager());
    }
    return invocation.proceed();
  }
 catch (  Exception e) {
    throw new QueryInvocationException(e,context);
  }
}
Program: 39003
Project: 39003
Buggy source:
public abstract Object execute(QueryInvocationContext ctx) throws Exception ;

Fixed version (ground truth):
public abstract Object execute(QueryInvocationContext ctx);
Program: 39004
Project: 39004
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public Object execute(QueryInvocationContext ctx) throws Exception {
  return new DefaultQueryResult(delegate,ctx);
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public Object execute(QueryInvocationContext ctx){
  return new DefaultQueryResult(delegate,ctx);
}
Program: 39005
Project: 39005
Buggy source:
String rewriteSeparator(String name){
  if (name.contains("String_Node_Str")) {
    name=name.replaceAll(SEPARATOR,"String_Node_Str");
  }
  return name;
}

Fixed version (ground truth):
String rewriteSeparator(String name){
  if (name.contains("String_Node_Str")) {
    return name.replaceAll(SEPARATOR,"String_Node_Str");
  }
  return name;
}
Program: 39006
Project: 39006
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public T getSingleResult(){
  try {
    return (T)((Query)builder.execute(context)).getSingleResult();
  }
 catch (  RuntimeException e) {
    throw e;
  }
catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public T getSingleResult(){
  return (T)((Query)builder.execute(context)).getSingleResult();
}
Program: 39007
Project: 39007
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public List<T> getResultList(){
  try {
    return ((Query)builder.execute(context)).getResultList();
  }
 catch (  RuntimeException e) {
    throw e;
  }
catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public List<T> getResultList(){
  return ((Query)builder.execute(context)).getResultList();
}
Program: 39008
Project: 39008
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void fetchSingular(From path){
  if (joinType == null)   path.fetch(singular);
 else   path.fetch(singular,joinType);
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void fetchSingular(From path){
  if (joinType == null) {
    path.fetch(singular);
  }
 else {
    path.fetch(singular,joinType);
  }
}
Program: 39009
Project: 39009
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void fetchPlural(From path){
  if (joinType == null)   path.fetch(plural);
 else   path.fetch(plural,joinType);
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void fetchPlural(From path){
  if (joinType == null) {
    path.fetch(plural);
  }
 else {
    path.fetch(plural,joinType);
  }
}
Program: 39010
Project: 39010
Buggy source:
public In(SingularAttribute<? super P,V> singular,V[] values){
  this.singular=singular;
  this.values=values;
}

Fixed version (ground truth):
public In(SingularAttribute<? super P,V> singular,V[] values){
  this.singular=singular;
  this.values=Arrays.copyOf(values,values.length);
}
Program: 39011
Project: 39011
Buggy source:
@Override public List<Predicate> build(CriteriaBuilder builder,Path<P> path){
  Path<V> p=path.get(singular);
  CriteriaBuilder.In<V> in=builder.in(p);
  for (  V value : values) {
    if (value != null)     in.value(value);
  }
  return Arrays.asList((Predicate)in);
}

Fixed version (ground truth):
@Override public List<Predicate> build(CriteriaBuilder builder,Path<P> path){
  Path<V> p=path.get(singular);
  CriteriaBuilder.In<V> in=builder.in(p);
  for (  V value : values) {
    if (value != null) {
      in.value(value);
    }
  }
  return Arrays.asList((Predicate)in);
}
Program: 39012
Project: 39012
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private Join joinSet(From path){
  if (joinType == null)   return path.join(set);
  return path.join(set,joinType);
}

Fixed version (ground truth):
private Join joinSet(From path){
  if (joinType == null)   return path.join(set);
  return path.join(set,joinType);
}
Program: 39013
Project: 39013
Buggy source:
@Override @SuppressWarnings({"String_Node_Str","String_Node_Str"}) public List<Predicate> build(CriteriaBuilder builder,Path<P> path){
  Join join=null;
  if (singular != null) {
    join=joinSingular((From)path);
  }
 else   if (list != null) {
    join=joinList((From)path);
  }
 else   if (collection != null) {
    join=joinCollection((From)path);
  }
 else   if (set != null) {
    join=joinSet((From)path);
  }
 else {
    join=joinMap((From)path);
  }
  return criteria.predicates(builder,join);
}

Fixed version (ground truth):
@Override public List<Predicate> build(CriteriaBuilder builder,Path<P> path){
  Join join=null;
  if (singular != null) {
    join=joinSingular((From)path);
  }
 else   if (list != null) {
    join=joinList((From)path);
  }
 else   if (collection != null) {
    join=joinCollection((From)path);
  }
 else   if (set != null) {
    join=joinSet((From)path);
  }
 else {
    join=joinMap((From)path);
  }
  return criteria.predicates(builder,join);
}
Program: 39014
Project: 39014
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private Join joinCollection(From path){
  if (joinType == null)   return path.join(collection);
  return path.join(collection,joinType);
}

Fixed version (ground truth):
private Join joinCollection(From path){
  if (joinType == null)   return path.join(collection);
  return path.join(collection,joinType);
}
Program: 39015
Project: 39015
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private Join joinSingular(From path){
  if (joinType == null)   return path.join(singular);
  return path.join(singular,joinType);
}

Fixed version (ground truth):
private Join joinSingular(From path){
  if (joinType == null) {
    return path.join(singular);
  }
  return path.join(singular,joinType);
}
Program: 39016
Project: 39016
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private Join joinList(From path){
  if (joinType == null)   return path.join(list);
  return path.join(list,joinType);
}

Fixed version (ground truth):
private Join joinList(From path){
  if (joinType == null) {
    return path.join(list);
  }
  return path.join(list,joinType);
}
Program: 39017
Project: 39017
Buggy source:
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private Join joinMap(From path){
  if (joinType == null)   return path.join(map);
  return path.join(map,joinType);
}

Fixed version (ground truth):
private Join joinMap(From path){
  if (joinType == null)   return path.join(map);
  return path.join(map,joinType);
}
Program: 39018
Project: 39018
Buggy source:
@AroundInvoke public Object handle(InvocationContext context) throws Exception {
  try {
    Class<?> daoClass=extractFromProxy(context);
    DaoComponent dao=components.lookupComponent(daoClass);
    DaoMethod method=components.lookupMethod(daoClass,context.getMethod());
    QueryBuilder builder=queryBuilder.build(method);
    return builder.execute(new QueryInvocationContext(context,method,resolveEntityManager(dao)));
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    throw e;
  }
}

Fixed version (ground truth):
@AroundInvoke public Object handle(InvocationContext context){
  QueryInvocationContext ctx=null;
  try {
    Class<?> daoClass=extractFromProxy(context);
    DaoComponent dao=components.lookupComponent(daoClass);
    DaoMethod method=components.lookupMethod(daoClass,context.getMethod());
    ctx=new QueryInvocationContext(context,method,resolveEntityManager(dao));
    QueryBuilder builder=queryBuilder.build(method);
    return builder.execute(ctx);
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    if (ctx != null) {
      throw new QueryInvocationException(e,ctx);
    }
    throw new QueryInvocationException(e,context);
  }
}
Program: 39019
Project: 39019
Buggy source:
private static <A extends Annotation>int extractInt(Object parameter,Annotation[] annotations,Class<A> target,int defaultVal){
  if (parameter != null) {
    A result=extractFrom(annotations,target);
    if (result != null) {
      if (parameter instanceof Integer) {
        return (Integer)parameter;
      }
 else {
        log.warnv("String_Node_Str",target,parameter.getClass());
      }
    }
  }
  return defaultVal;
}

Fixed version (ground truth):
private static <A extends Annotation>int extractInt(Object parameter,Annotation[] annotations,Class<A> target,int defaultVal){
  if (parameter != null) {
    A result=extractFrom(annotations,target);
    if (result != null) {
      if (parameter instanceof Integer) {
        return (Integer)parameter;
      }
 else {
        LOG.warnv("String_Node_Str",target,parameter.getClass());
      }
    }
  }
  return defaultVal;
}
Program: 39020
Project: 39020
Buggy source:
public SystemMap normalize(String environmentName){
  Environment env=environments.get(environmentName);
  checkNotNull(env,"String_Node_Str",environmentName);
  Iterator<Template> itty=this.templates.iterator();
  if (!itty.hasNext()) {
    return new SystemMap();
  }
  SystemMap map=itty.next().normalize(env);
  while (itty.hasNext()) {
    map=map.combine(itty.next().normalize(env));
  }
  return map;
}

Fixed version (ground truth):
public SystemMap normalize(String environmentName){
  Environment env=environments.get(environmentName);
  checkNotNull(env,"String_Node_Str",environmentName);
  Iterator<Template> itty=this.templates.iterator();
  if (!itty.hasNext()) {
    return new SystemMap();
  }
  SystemMap map=itty.next().normalize(env);
  while (itty.hasNext()) {
    map=map.combine(itty.next().normalize(env));
  }
  Collection<Template> env_defined=env.getEnvironmentDefinedElements();
  for (  Template template : env_defined) {
    List<Element> el=template._normalize(Identity.root(),env);
    map=new SystemMap(concat(map.getRoots(),el));
  }
  return map;
}
Program: 39021
Project: 39021
Buggy source:
public final SystemMap normalize(Environment env){
  List<Element> roots=Lists.newArrayList();
  List<Element> sys_roots=_normalize(Identity.root(),env);
  roots.addAll(sys_roots);
  Collection<Template> env_defined=env.getEnvironmentDefinedElements();
  for (  Template template : env_defined) {
    List<Element> el=template._normalize(Identity.root(),env);
    roots.addAll(el);
  }
  return new SystemMap(roots);
}

Fixed version (ground truth):
public final SystemMap normalize(Environment env){
  List<Element> roots=Lists.newArrayList();
  List<Element> sys_roots=_normalize(Identity.root(),env);
  roots.addAll(sys_roots);
  return new SystemMap(roots);
}
Program: 39022
Project: 39022
Buggy source:
@Override public String perform(Host host,Uri<? extends Component> uri,Deployment d) throws Exception {
  SSH ssh=new SSH(host,d.getSpace(),credentialName);
  try {
    ssh.exec("String_Node_Str");
    String out=ssh.exec("String_Node_Str" + uri.getFragment().replaceAll("String_Node_Str","String_Node_Str"));
    log.info(out);
    return out;
  }
  finally {
    ssh.close();
  }
}

Fixed version (ground truth):
@Override public String perform(Host host,Uri<? extends Component> uri,Deployment d) throws Exception {
  SSH ssh=new SSH(host,d.getSpace(),credentialName);
  try {
    ssh.exec("String_Node_Str");
    String out=ssh.exec("String_Node_Str" + uri.getFragment().replaceAll("String_Node_Str","String_Node_Str"));
    log.info("String_Node_Str",out);
    return out;
  }
  finally {
    ssh.close();
  }
}
Program: 39023
Project: 39023
Buggy source:
@Override public Void call() throws IOException {
  Space space=SQLiteBackedSpace.create(spaceFile);
  JRubyTemplateParser p=new JRubyTemplateParser();
  Descriptor descriptor=Descriptor.empty();
  for (  File file : modelDirectory.listFiles()) {
    if (file.isFile() && file.getName().endsWith("String_Node_Str")) {
      descriptor.combine(p.parseDescriptor(file));
    }
  }
  SystemMap map=descriptor.normalize(environmentName);
  Environment env=descriptor.getEnvironment(environmentName);
  ActualDeployment d=env.planDeploymentFor(map,space);
  d.destroy();
  return null;
}

Fixed version (ground truth):
@Override public Void call() throws IOException {
  Space space=SQLiteBackedSpace.create(spaceFile);
  JRubyTemplateParser p=new JRubyTemplateParser();
  Descriptor descriptor=Descriptor.empty();
  for (  File file : modelDirectory.listFiles()) {
    if (file.isFile() && file.getName().endsWith("String_Node_Str")) {
      descriptor=descriptor.combine(p.parseDescriptor(file));
    }
  }
  SystemMap map=descriptor.normalize(environmentName);
  Environment env=descriptor.getEnvironment(environmentName);
  ActualDeployment d=env.planDeploymentFor(map,space);
  d.destroy();
  return null;
}
Program: 39024
Project: 39024
Buggy source:
@Override public Void call() throws Exception {
  return null;
}

Fixed version (ground truth):
@Override public Void call() throws IOException {
  Space space=SQLiteBackedSpace.create(spaceFile);
  JRubyTemplateParser p=new JRubyTemplateParser();
  Descriptor descriptor=Descriptor.empty();
  for (  File file : modelDirectory.listFiles()) {
    if (file.isFile() && file.getName().endsWith("String_Node_Str")) {
      descriptor=descriptor.combine(p.parseDescriptor(file));
    }
  }
  SystemMap map=descriptor.normalize(environmentName);
  for (  Host host : map.findLeaves()) {
    System.out.println(host.getId() + "String_Node_Str");
    for (    Map.Entry<SpaceKey,String> entry : space.getAllFor(host.getId()).entrySet()) {
      System.out.printf("String_Node_Str",entry.getKey().getKey(),StringUtils.abbreviate(entry.getValue(),80).replaceAll("String_Node_Str","String_Node_Str"));
    }
  }
  return null;
}
Program: 39025
Project: 39025
Buggy source:
@SuppressWarnings("String_Node_Str") public static void main(String... args) throws Exception {
  Cli.buildCli("String_Node_Str",Callable.class).withCommands(Converge.class,Destroy.class,Help.class).withDefaultCommand(Help.class).build().parse(args).call();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static void main(String... args) throws Exception {
  Cli.buildCli("String_Node_Str",Callable.class).withCommands(Converge.class,Destroy.class,ListCommand.class,Help.class).withDefaultCommand(Help.class).build().parse(args).call();
}
Program: 39026
Project: 39026
Buggy source:
@Test public void testFoo() throws Exception {
  JRubyTemplateParser p=new JRubyTemplateParser();
  Environment e=p.parseEnvironment(new File("String_Node_Str"));
  InstalledElement one=p.parseSystem(new File("String_Node_Str")).normalize(e).provision(sameThreadExecutor()).get().initialize(sameThreadExecutor()).get().install(sameThreadExecutor()).get();
  assertThat(jsonify(reify(e,jsonify(one))),equalTo(jsonify(one)));
  InstalledElement reified=reify(e,jsonify(one));
  BoundTemplate two=p.parseSystem(new File("String_Node_Str")).normalize(e);
  UpgradePlan plan=two.upgradeFrom(reified);
}

Fixed version (ground truth):
@Test public void testFoo() throws Exception {
  assumeThat(1 + 1,equalTo(3));
  JRubyTemplateParser p=new JRubyTemplateParser();
  Environment e=p.parseEnvironment(new File("String_Node_Str"));
  InstalledElement one=p.parseSystem(new File("String_Node_Str")).normalize(e).provision(sameThreadExecutor()).get().initialize(sameThreadExecutor()).get().install(sameThreadExecutor()).get();
  assertThat(jsonify(reify(e,jsonify(one))),equalTo(jsonify(one)));
  InstalledElement reified=reify(e,jsonify(one));
  BoundTemplate two=p.parseSystem(new File("String_Node_Str")).normalize(e);
  UpgradePlan plan=two.upgradeFrom(reified);
}