nus-yam/ex-repair huggingface dataset:
Program: 10032
Project: 10032
Buggy source:
@Override public void initialise() throws Exception {
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + this.getOWLEditorKit().getOWLWorkspace().getViewManager().getClass());
  view=new DLLearnerView("String_Node_Str",this.getOWLEditorKit());
}

Fixed version (ground truth):
@Override public void initialise() throws Exception {
  view=new DLLearnerView("String_Node_Str",super.getOWLEditorKit());
}
Program: 10033
Project: 10033
Buggy source:
/** 
 * This is the constructor of the ReadingOntologyThread.
 * @param editorKit OWLEditorKit
 * @param frame OWLFrame
 * @param v DL-Learner view
 * @param m DL-Learner model
 */
public ReadingOntologyThread(OWLEditorKit editorKit,OWLFrame<OWLClass> frame,DLLearnerView v,DLLearnerModel m){
  ontologieURI=new HashSet<String>();
  this.editor=editorKit;
  current=editor.getOWLWorkspace().getOWLComponentFactory().getOWLClassSelectorPanel().getSelectedObject();
  this.view=v;
  this.model=m;
}

Fixed version (ground truth):
/** 
 * This is the constructor of the ReadingOntologyThread.
 * @param editorKit OWLEditorKit
 * @param frame OWLFrame
 * @param v DL-Learner view
 * @param m DL-Learner model
 */
public ReadingOntologyThread(OWLEditorKit editorKit,OWLFrame<OWLClass> frame,DLLearnerView v,DLLearnerModel m){
  ontologieURI=new HashSet<String>();
  this.editor=editorKit;
  current=editor.getOWLWorkspace().getOWLSelectionModel().getLastSelectedClass();
  this.view=v;
  this.model=m;
}
Program: 10034
Project: 10034
Buggy source:
/** 
 * This is the constructor for DL-Learner model.
 * @param editorKit Editor Kit to get the currently loaded Ontology
 * @param id String if it learns a subclass or a superclass.
 * @param view current view of the DL-Learner tab
 */
public DLLearnerModel(OWLEditorKit editorKit,String id,DLLearnerView view){
  editor=editorKit;
  this.id=id;
  this.view=view;
  ontologyConsistent=true;
  instancesCount=0;
  owlDescription=new HashSet<OWLDescription>();
  posListModel=new DefaultListModel();
  negListModel=new DefaultListModel();
  ComponentManager.setComponentClasses(componenten);
  individualVector=new Vector<IndividualObject>();
  cm=ComponentManager.getInstance();
  ds=new HashSet<OWLDescription>();
  suggestModel=new DefaultListModel();
  ontologieURI=new HashSet<String>();
  sources=new HashSet<KnowledgeSource>();
}

Fixed version (ground truth):
/** 
 * This is the constructor for DL-Learner model.
 * @param editorKit Editor Kit to get the currently loaded Ontology
 * @param id String if it learns a subclass or a superclass.
 * @param view current view of the DL-Learner tab
 */
public DLLearnerModel(OWLEditorKit editorKit,String id,DLLearnerView view){
  editor=editorKit;
  this.id=id;
  this.view=view;
  ontologyConsistent=true;
  instancesCount=0;
  owlDescription=new HashSet<OWLDescription>();
  ComponentManager.setComponentClasses(componenten);
  cm=ComponentManager.getInstance();
  ds=new HashSet<OWLDescription>();
  suggestModel=new DefaultListModel();
  ontologieURI=new HashSet<String>();
  sources=new HashSet<KnowledgeSource>();
}
Program: 10035
Project: 10035
Buggy source:
private String getSolutionString(List<? extends EvaluatedDescription> solutions){
  String baseURI=config.getReasoner().getBaseURI();
  Map<String,String> prefixes=config.getReasoner().getPrefixes();
  String string="String_Node_Str";
  for (  EvaluatedDescription d : solutions) {
    string+="String_Node_Str" + (df.format(((EvaluatedDescriptionPosNeg)d).getAccuracy() * 100)) + "String_Node_Str"+ d.getDescription().toManchesterSyntaxString(baseURI,prefixes)+ "String_Node_Str";
  }
  return string;
}

Fixed version (ground truth):
private String getSolutionString(List<? extends EvaluatedDescription> solutions){
  String baseURI=config.getReasoner().getBaseURI();
  Map<String,String> prefixes=config.getReasoner().getPrefixes();
  String string="String_Node_Str";
  for (  EvaluatedDescription d : solutions) {
    string+="String_Node_Str" + (df.format(d.getAccuracy() * 100)) + "String_Node_Str"+ d.getDescription().toManchesterSyntaxString(baseURI,prefixes)+ "String_Node_Str";
  }
  return string;
}
Program: 10036
Project: 10036
Buggy source:
/** 
 * Gets a list describing the position of this node within the  tree. If the list is e.g. [2,5,1], then the node can be reached by picking the second child of the root node, then picking the 5th child of this node and finally selecting the first child of the previous node.
 * @return The position number of this node within the tree as described above.
 */
public int[] getCurrentPosition(){
  int[] position=new int[level - 1];
  ELDescriptionNode root=this;
  while (root.parent != null) {
    position[root.level - 2]=getChildNumber();
    root=root.parent;
  }
  return position;
}

Fixed version (ground truth):
/** 
 * Gets a list describing the position of this node within the  tree. If the list is e.g. [2,5,1], then the node can be reached by picking the second child of the root node, then picking the 5th child of this node and finally selecting the first child of the previous node.
 * @return The position number of this node within the tree as described above.
 */
public int[] getCurrentPosition(){
  int[] position=new int[level - 1];
  ELDescriptionNode root=this;
  while (root.parent != null) {
    position[root.level - 2]=root.getChildNumber();
    root=root.parent;
  }
  return position;
}
Program: 10037
Project: 10037
Buggy source:
private int getChildNumber(){
  int count=0;
  for (  ELDescriptionEdge edge : parent.edges) {
    if (edge.getNode() == this) {
      return count;
    }
  }
  throw new RuntimeException("String_Node_Str");
}

Fixed version (ground truth):
private int getChildNumber(){
  int count=0;
  for (  ELDescriptionEdge edge : parent.edges) {
    if (edge.getNode() == this) {
      return count;
    }
    count++;
  }
  throw new RuntimeException("String_Node_Str");
}
Program: 10038
Project: 10038
Buggy source:
/** 
 * Performs downward refinement for the given tree. The operator works directly on EL description trees (which differ from the the tree structures build by descriptions).
 * @param tree Input EL description tree.
 * @return Set of refined EL description trees.
 */
public Set<ELDescriptionTree> refine(ELDescriptionTree tree){
  logger.trace("String_Node_Str" + tree.toDescriptionString());
  Set<ELDescriptionTree> refinements=new HashSet<ELDescriptionTree>();
  Set<ELDescriptionNode> nodes=new HashSet<ELDescriptionNode>(tree.getNodes());
  for (  ELDescriptionNode v : nodes) {
    logger.trace("String_Node_Str" + v);
    int[] position=v.getCurrentPosition();
    refinements.addAll(extendLabel(tree,v,position));
    refinements.addAll(refineLabel(tree,v,position));
    refinements.addAll(refineEdge(tree,v,position));
    refinements.addAll(attachSubtree(tree,v,position));
  }
  return refinements;
}

Fixed version (ground truth):
/** 
 * Performs downward refinement for the given tree. The operator works directly on EL description trees (which differ from the the tree structures build by descriptions).
 * @param tree Input EL description tree.
 * @return Set of refined EL description trees.
 */
public Set<ELDescriptionTree> refine(ELDescriptionTree tree){
  logger.trace("String_Node_Str" + tree.toDescriptionString());
  Set<ELDescriptionTree> refinements=new HashSet<ELDescriptionTree>();
  Set<ELDescriptionNode> nodes=new HashSet<ELDescriptionNode>(tree.getNodes());
  for (  ELDescriptionNode v : nodes) {
    logger.trace("String_Node_Str" + v);
    int[] position=v.getCurrentPosition();
    logger.trace("String_Node_Str" + Helper.arrayContent(position));
    refinements.addAll(extendLabel(tree,v,position));
    refinements.addAll(refineLabel(tree,v,position));
    refinements.addAll(refineEdge(tree,v,position));
    refinements.addAll(attachSubtree(tree,v,position));
  }
  return refinements;
}
Program: 10040
Project: 10040
Buggy source:
public static void main(String[] args) throws MalformedURLException, ComponentInitException {
  String example="String_Node_Str";
  testOntology(example);
  System.exit(0);
}

Fixed version (ground truth):
public static void main(String[] args) throws ComponentInitException, IOException {
  String example="String_Node_Str";
  testOntology(example);
  System.exit(0);
}
Program: 10041
Project: 10041
Buggy source:
public String getShortDescriptionHTML(int nrOfPositiveExamples,int nrOfNegativeExamples,String baseURI){
  String ret="String_Node_Str" + concept.toString(baseURI,null) + "String_Node_Str";
  if (isTooWeak)   ret+="String_Node_Str";
 else {
    double accuracy=100 * (coveredPositives.size() + nrOfNegativeExamples - coveredNegatives.size()) / (double)(nrOfPositiveExamples + nrOfNegativeExamples);
    ret+="String_Node_Str" + df.format(accuracy) + "String_Node_Str";
    double heuristicScore=MultiHeuristic.getNodeScore(this,nrOfPositiveExamples,nrOfNegativeExamples,configurator);
    ret+="String_Node_Str" + df.format(heuristicScore) + "String_Node_Str";
    int wrongPositives=nrOfPositiveExamples - coveredPositives.size();
    ret+="String_Node_Str" + wrongPositives + "String_Node_Str"+ coveredNegatives.size()+ "String_Node_Str";
  }
  ret+="String_Node_Str" + qualityEvaluationMethod + "String_Node_Str"+ horizontalExpansion;
  ret+="String_Node_Str" + children.size() + "String_Node_Str";
  return ret + "String_Node_Str";
}

Fixed version (ground truth):
public String getShortDescriptionHTML(int nrOfPositiveExamples,int nrOfNegativeExamples,String baseURI){
  String ret="String_Node_Str" + concept.toManchesterSyntaxString(baseURI,null) + "String_Node_Str";
  if (isTooWeak)   ret+="String_Node_Str";
 else {
    double accuracy=100 * (coveredPositives.size() + nrOfNegativeExamples - coveredNegatives.size()) / (double)(nrOfPositiveExamples + nrOfNegativeExamples);
    ret+="String_Node_Str" + df.format(accuracy) + "String_Node_Str";
    double heuristicScore=MultiHeuristic.getNodeScore(this,nrOfPositiveExamples,nrOfNegativeExamples,configurator);
    ret+="String_Node_Str" + df.format(heuristicScore) + "String_Node_Str";
    int wrongPositives=nrOfPositiveExamples - coveredPositives.size();
    ret+="String_Node_Str" + wrongPositives + "String_Node_Str"+ coveredNegatives.size()+ "String_Node_Str";
  }
  ret+="String_Node_Str" + qualityEvaluationMethod + "String_Node_Str"+ horizontalExpansion;
  ret+="String_Node_Str" + children.size() + "String_Node_Str";
  return ret + "String_Node_Str";
}
Program: 10042
Project: 10042
Buggy source:
@SuppressWarnings("String_Node_Str") public TreeWindow(Config config){
  this.config=config;
  this.setTitle("String_Node_Str");
  this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
  this.setSize(800,600);
  if (this.getClass().getResource("String_Node_Str") != null)   setIconImage(java.awt.Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("String_Node_Str")));
  if (config.getLearningAlgorithm() instanceof ExampleBasedROLComponent) {
    ExampleBasedROLComponent ebrol=(ExampleBasedROLComponent)config.getLearningAlgorithm();
    this.rootNode=ebrol.getStartNode();
    this.ebNodeModel=new EBNodeTreeModel(rootNode);
    PosNegDefinitionLP lp=(PosNegDefinitionLP)config.getLearningProblem();
    Set<String> posExamples=lp.getConfigurator().getPositiveExamples();
    Set<String> negExamples=lp.getConfigurator().getNegativeExamples();
    String baseURI=config.getReasoner().getBaseURI();
    int nrOfPositiveExamples=posExamples.size();
    int nrOfNegativeExamples=negExamples.size();
    tree=new SearchTree(ebNodeModel,nrOfPositiveExamples,nrOfNegativeExamples,baseURI);
    this.add(new JScrollPane(tree));
  }
  setVisible(true);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public TreeWindow(Config config){
  this.config=config;
  this.setTitle("String_Node_Str");
  this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
  this.setSize(800,600);
  if (this.getClass().getResource("String_Node_Str") != null)   setIconImage(java.awt.Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("String_Node_Str")));
  if (config.getLearningAlgorithm() instanceof ExampleBasedROLComponent) {
    ExampleBasedROLComponent ebrol=(ExampleBasedROLComponent)config.getLearningAlgorithm();
    this.rootNode=ebrol.getStartNode();
    this.ebNodeModel=new EBNodeTreeModel(rootNode);
    PosNegDefinitionLP lp=(PosNegDefinitionLP)config.getLearningProblem();
    Set<String> posExamples=lp.getConfigurator().getPositiveExamples();
    Set<String> negExamples=lp.getConfigurator().getNegativeExamples();
    String baseURI=config.getReasoner().getBaseURI();
    int nrOfPositiveExamples=posExamples.size();
    int nrOfNegativeExamples=negExamples.size();
    tree=new SearchTree(ebNodeModel,nrOfPositiveExamples,nrOfNegativeExamples,baseURI);
    tree.updateUI();
    this.add(new JScrollPane(tree));
  }
  setVisible(true);
}
Program: 10043
Project: 10043
Buggy source:
public boolean isMinimal(){
  for (int i=1; i <= maxLevel; i++) {
    Set<ELDescriptionNode> nodes=levelNodeMapping.get(i);
    for (    ELDescriptionNode node : nodes) {
      List<ELDescriptionEdge> edges=node.getEdges();
      for (int j=0; j < edges.size(); j++) {
        for (int k=0; k < edges.size(); k++) {
          if (j != k) {
            ObjectProperty op1=edges.get(j).getLabel();
            ObjectProperty op2=edges.get(k).getLabel();
            if (rs.getObjectPropertyHierarchy().isSubpropertyOf(op1,op2)) {
              ELDescriptionNode node1=edges.get(j).getNode();
              ELDescriptionNode node2=edges.get(k).getNode();
              if (node1.in.contains(node2) || node2.in.contains(node1)) {
                return false;
              }
            }
          }
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean isMinimal(){
  for (int i=1; i <= maxLevel; i++) {
    Set<ELDescriptionNode> nodes=levelNodeMapping.get(i);
    for (    ELDescriptionNode node : nodes) {
      List<ELDescriptionEdge> edges=node.getEdges();
      for (int j=0; j < edges.size(); j++) {
        for (int k=0; k < edges.size(); k++) {
          if (j != k) {
            ObjectProperty op1=edges.get(j).getLabel();
            ObjectProperty op2=edges.get(k).getLabel();
            if (rs.getObjectPropertyHierarchy().isSubpropertyOf(op1,op2)) {
              ELDescriptionNode node1=edges.get(j).getNode();
              ELDescriptionNode node2=edges.get(k).getNode();
              if (node1.in.contains(node2)) {
                return false;
              }
            }
          }
        }
      }
    }
  }
  return true;
}
Program: 10045
Project: 10045
Buggy source:
private ELDescriptionTree mergeTrees(ELDescriptionTree tree,ELDescriptionNode node,int[] position,ObjectProperty r,ELDescriptionTree newTree){
  ELDescriptionTree mergedTree=tree.clone();
  ELDescriptionNode clonedNode=mergedTree.getNode(position);
  LinkedList<ELDescriptionNode> toProcess=new LinkedList<ELDescriptionNode>();
  toProcess.add(newTree.getRootNode());
  Map<ELDescriptionNode,ELDescriptionNode> cloneMap=new HashMap<ELDescriptionNode,ELDescriptionNode>();
  while (!toProcess.isEmpty()) {
    ELDescriptionNode v=toProcess.pollFirst();
    ELDescriptionNode vp;
    if (v.isRoot()) {
      vp=new ELDescriptionNode(clonedNode,r);
    }
 else {
      ELDescriptionNode parent=cloneMap.get(v.getParent());
      ObjectProperty role=v.getParentEdge().getLabel();
      Set<NamedClass> label=v.getLabel();
      vp=new ELDescriptionNode(parent,role,label);
    }
    cloneMap.put(v,vp);
    for (    ELDescriptionEdge edge : v.getEdges()) {
      toProcess.add(edge.getNode());
    }
  }
  return mergedTree;
}

Fixed version (ground truth):
private ELDescriptionTree mergeTrees(ELDescriptionTree tree,ELDescriptionNode node,int[] position,ObjectProperty r,ELDescriptionTree newTree){
  ELDescriptionTree mergedTree=tree.clone();
  ELDescriptionNode clonedNode=mergedTree.getNode(position);
  LinkedList<ELDescriptionNode> toProcess=new LinkedList<ELDescriptionNode>();
  toProcess.add(newTree.getRootNode());
  Map<ELDescriptionNode,ELDescriptionNode> cloneMap=new HashMap<ELDescriptionNode,ELDescriptionNode>();
  while (!toProcess.isEmpty()) {
    ELDescriptionNode v=toProcess.pollFirst();
    ELDescriptionNode vp;
    if (v.isRoot()) {
      vp=new ELDescriptionNode(clonedNode,r,newTree.getRootNode().getLabel());
    }
 else {
      ELDescriptionNode parent=cloneMap.get(v.getParent());
      ObjectProperty role=v.getParentEdge().getLabel();
      Set<NamedClass> label=v.getLabel();
      vp=new ELDescriptionNode(parent,role,label);
    }
    cloneMap.put(v,vp);
    for (    ELDescriptionEdge edge : v.getEdges()) {
      toProcess.add(edge.getNode());
    }
  }
  return mergedTree;
}
Program: 10046
Project: 10046
Buggy source:
/** 
 * Performs downward refinement for the given tree. The operator works directly on EL description trees (which differ from the the tree structures build by descriptions).
 * @param tree Input EL description tree.
 * @return Set of refined EL description trees.
 */
public Set<ELDescriptionTree> refine(ELDescriptionTree tree){
  Set<ELDescriptionTree> refinements=new HashSet<ELDescriptionTree>();
  Set<ELDescriptionNode> nodes=new HashSet<ELDescriptionNode>(tree.getNodes());
  for (  ELDescriptionNode v : nodes) {
    int[] position=v.getCurrentPosition();
    refinements.addAll(extendLabel(tree,v,position));
    refinements.addAll(refineLabel(tree,v,position));
    refinements.addAll(refineEdge(tree,v,position));
    refinements.addAll(attachSubtree(tree,v,position));
  }
  return refinements;
}

Fixed version (ground truth):
/** 
 * Performs downward refinement for the given tree. The operator works directly on EL description trees (which differ from the the tree structures build by descriptions).
 * @param tree Input EL description tree.
 * @return Set of refined EL description trees.
 */
public Set<ELDescriptionTree> refine(ELDescriptionTree tree){
  System.out.println("String_Node_Str" + tree.toDescriptionString());
  Set<ELDescriptionTree> refinements=new HashSet<ELDescriptionTree>();
  Set<ELDescriptionNode> nodes=new HashSet<ELDescriptionNode>(tree.getNodes());
  for (  ELDescriptionNode v : nodes) {
    System.out.println("String_Node_Str" + v);
    int[] position=v.getCurrentPosition();
    refinements.addAll(extendLabel(tree,v,position));
    refinements.addAll(attachSubtree(tree,v,position));
  }
  return refinements;
}
Program: 10048
Project: 10048
Buggy source:
private boolean asCheck(ELDescriptionNode v){
  List<ELDescriptionEdge> piVEdges=new LinkedList<ELDescriptionEdge>();
  ELDescriptionNode tmp=v;
  while (!tmp.isRoot()) {
    piVEdges.add(tmp.getParentEdge());
    tmp=tmp.getParent();
  }
  for (  ELDescriptionEdge piVEdge : piVEdges) {
    ELDescriptionNode wp=piVEdge.getNode();
    ObjectProperty s=piVEdge.getLabel();
    ELDescriptionNode w=wp.getParent();
    for (    ELDescriptionEdge wEdge : w.getEdges()) {
      ObjectProperty sp=wEdge.getLabel();
      ELDescriptionNode wpp=wEdge.getNode();
      if (s.equals(sp) && wp != wpp) {
        if (wp.getIn().contains(wpp)) {
          return false;
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean asCheck(ELDescriptionNode v){
  List<ELDescriptionEdge> piVEdges=new LinkedList<ELDescriptionEdge>();
  ELDescriptionNode tmp=v;
  while (!tmp.isRoot()) {
    piVEdges.add(tmp.getParentEdge());
    tmp=tmp.getParent();
  }
  for (  ELDescriptionEdge piVEdge : piVEdges) {
    ELDescriptionNode wp=piVEdge.getNode();
    ObjectProperty rp=piVEdge.getLabel();
    ELDescriptionNode w=wp.getParent();
    for (    ELDescriptionEdge wEdge : w.getEdges()) {
      ObjectProperty rpp=wEdge.getLabel();
      ELDescriptionNode wpp=wEdge.getNode();
      if (wp != wpp && opHierarchy.isSubpropertyOf(rp,rpp)) {
        if (wp.getIn().contains(wpp)) {
          return false;
        }
      }
    }
  }
  return true;
}
Program: 10049
Project: 10049
Buggy source:
private Set<NamedClass> getClassCandidatesRecursive(Description index,Set<NamedClass> existingClasses,Description upperClass){
  Set<NamedClass> candidates=new TreeSet<NamedClass>();
  for (  Description d : sh.getSubClasses(upperClass)) {
    if (!(d instanceof Nothing)) {
      NamedClass candidate=(NamedClass)d;
      if (!isDisjoint(candidate,index) || !checkSubClasses(existingClasses,candidate)) {
        if (!isDisjoint(new Negation(candidate),index) || !checkSuperClasses(existingClasses,candidate)) {
          candidates.add(candidate);
        }
 else {
          candidates.addAll(getClassCandidatesRecursive(index,existingClasses,candidate));
        }
      }
    }
  }
  return candidates;
}

Fixed version (ground truth):
private Set<NamedClass> getClassCandidatesRecursive(Description index,Set<NamedClass> existingClasses,Description upperClass){
  Set<NamedClass> candidates=new TreeSet<NamedClass>();
  for (  Description d : sh.getSubClasses(upperClass)) {
    if (!(d instanceof Nothing)) {
      NamedClass candidate=(NamedClass)d;
      if (!isDisjoint(candidate,index) && checkSubClasses(existingClasses,candidate)) {
        if (!isDisjoint(new Negation(candidate),index) && checkSuperClasses(existingClasses,candidate)) {
          candidates.add(candidate);
        }
 else {
          candidates.addAll(getClassCandidatesRecursive(index,existingClasses,candidate));
        }
      }
    }
  }
  return candidates;
}
Program: 10050
Project: 10050
Buggy source:
private boolean checkSubClasses(Set<NamedClass> existingClasses,NamedClass candidate){
  for (  NamedClass nc : existingClasses) {
    if (sh.isSubclassOf(candidate,nc))     return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean checkSubClasses(Set<NamedClass> existingClasses,NamedClass candidate){
  for (  NamedClass nc : existingClasses) {
    if (sh.isSubclassOf(candidate,nc)) {
      return false;
    }
  }
  return true;
}
Program: 10051
Project: 10051
Buggy source:
@Test public void cloneTest() throws ParseException {
  ReasonerComponent rs=TestOntologies.getTestOntology(TestOntology.EMPTY);
  Description d=KBParser.parseConcept("String_Node_Str");
  ConceptTransformation.cleanConcept(d);
  ELDescriptionTree tree=new ELDescriptionTree(rs,d);
  boolean testPerformance=false;
  ELDescriptionTree treeCloned=null;
  if (testPerformance) {
    int runs=1000000;
    long startTime=System.nanoTime();
    for (int i=0; i < runs; i++) {
      treeCloned=tree.clone();
    }
    long runTime=System.nanoTime() - startTime;
    System.out.println(Helper.prettyPrintNanoSeconds(runTime / runs,true,true) + "String_Node_Str");
  }
 else {
    treeCloned=tree.clone();
  }
  ELDescriptionTreeComparator comparator=new ELDescriptionTreeComparator();
  assertTrue(comparator.compare(tree,treeCloned) == 0);
}

Fixed version (ground truth):
@Test public void cloneTest() throws ParseException {
  ReasonerComponent rs=TestOntologies.getTestOntology(TestOntology.EMPTY);
  Description d=KBParser.parseConcept("String_Node_Str");
  ConceptTransformation.cleanConcept(d);
  ELDescriptionTree tree=new ELDescriptionTree(rs,d);
  boolean testPerformance=true;
  ELDescriptionTree treeCloned=null;
  if (testPerformance) {
    int runs=1000000;
    long startTime=System.nanoTime();
    for (int i=0; i < runs; i++) {
      treeCloned=tree.clone();
    }
    long runTime=System.nanoTime() - startTime;
    System.out.println(Helper.prettyPrintNanoSeconds(runTime / runs,true,true) + "String_Node_Str");
  }
 else {
    treeCloned=tree.clone();
  }
  ELDescriptionTreeComparator comparator=new ELDescriptionTreeComparator();
  assertTrue(comparator.compare(tree,treeCloned) == 0);
}
Program: 10053
Project: 10053
Buggy source:
private void labelSimulationUpdate(){
  Set<ELDescriptionNode> update=new HashSet<ELDescriptionNode>();
  Set<ELDescriptionNode> tmp=tree.getNodesOnLevel(level);
  for (  ELDescriptionNode w : tmp) {
    if (w != this) {
      if (!inSC1.contains(w) && tree.checkSC1(this,w)) {
        tree.extendSimulationSC1(this,w);
        if (inSC2.contains(w)) {
          tree.extendSimulationSC12(this,w);
        }
        update.add(w.getParent());
      }
      if (outSC1.contains(w) && !tree.checkSC1(w,this)) {
        tree.shrinkSimulationSC1(w,this);
        if (outSC2.contains(w)) {
          tree.shrinkSimulationSC12(w,this);
        }
        if (!update.contains(w.getParent())) {
          update.add(w.getParent());
        }
      }
    }
  }
  if (parent != null) {
    update.add(parent);
  }
  tree.updateSimulation(update);
}

Fixed version (ground truth):
private void labelSimulationUpdate(){
  Set<ELDescriptionNode> update=new HashSet<ELDescriptionNode>();
  Set<ELDescriptionNode> tmp=tree.getNodesOnLevel(level);
  for (  ELDescriptionNode w : tmp) {
    if (w != this) {
      if (!inSC1.contains(w) && tree.checkSC1(this,w)) {
        tree.extendSimulationSC1(this,w);
        if (inSC2.contains(w)) {
          tree.extendSimulationSC12(this,w);
        }
        update.add(w.getParent());
      }
      if (outSC1.contains(w) && !tree.checkSC1(w,this)) {
        tree.shrinkSimulationSC1(w,this);
        if (outSC2.contains(w)) {
          tree.shrinkSimulationSC12(w,this);
        }
        update.add(w.getParent());
      }
    }
  }
  if (parent != null) {
    update.add(parent);
  }
  tree.updateSimulation(update);
}
Program: 10054
Project: 10054
Buggy source:
private String toString(Set<ELDescriptionNode> nodes,Map<ELDescriptionNode,String> nodeNames){
  String str="String_Node_Str";
  for (  ELDescriptionNode node : nodes) {
    str+=nodeNames.get(node) + "String_Node_Str";
  }
  if (str.length() > 0) {
    str=str.substring(0,str.length() - 1);
  }
  return str;
}

Fixed version (ground truth):
/** 
 * A convenience method (for debugging purposes) to get a comma separated list of nodes, where the nodes are given names (to make them readable).
 * @param nodes The node objects.
 * @param nodeNames A mapping to node names.
 * @return A comma separated list of the node names.
 */
public static String toString(Set<ELDescriptionNode> nodes,Map<ELDescriptionNode,String> nodeNames){
  String str="String_Node_Str";
  for (  ELDescriptionNode node : nodes) {
    str+=nodeNames.get(node) + "String_Node_Str";
  }
  if (str.length() > 0) {
    str=str.substring(0,str.length() - 1);
  }
  return str;
}
Program: 10055
Project: 10055
Buggy source:
private boolean checkSC2Edge(ELDescriptionEdge superEdge,List<ELDescriptionEdge> edges){
  ObjectProperty superOP=superEdge.getLabel();
  ELDescriptionNode node1=superEdge.getTree();
  for (  ELDescriptionEdge edge : edges) {
    ObjectProperty op=edge.getLabel();
    if (roleHierarchy.isSubpropertyOf(op,superOP)) {
      ELDescriptionNode node2=edge.getTree();
      if (node1.in.contains(node2) || node2.in.contains(node1)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean checkSC2Edge(ELDescriptionEdge superEdge,List<ELDescriptionEdge> edges){
  ObjectProperty superOP=superEdge.getLabel();
  ELDescriptionNode superNode=superEdge.getTree();
  for (  ELDescriptionEdge edge : edges) {
    ObjectProperty op=edge.getLabel();
    if (roleHierarchy.isSubpropertyOf(op,superOP)) {
      ELDescriptionNode node=edge.getTree();
      if (node.in.contains(superNode)) {
        return true;
      }
    }
  }
  return false;
}
Program: 10056
Project: 10056
Buggy source:
@Override public boolean isValidValue(Double value){
  if (value >= lowerLimit && value <= upperLimit)   return true;
 else   return false;
}

Fixed version (ground truth):
@Override public boolean isValidValue(Double value){
  double tolerance=0.0001;
  return ((value >= lowerLimit - tolerance) && (value <= upperLimit + tolerance));
}
Program: 10059
Project: 10059
Buggy source:
public void run(){
  System.out.println("String_Node_Str");
  model.setSuggestList(result);
  Iterator<EvaluatedDescription> it=result.iterator();
  int i=0;
  while (it.hasNext()) {
    Iterator<OWLOntology> ont=model.getOWLEditorKit().getModelManager().getActiveOntologies().iterator();
    EvaluatedDescription eval=it.next();
    while (ont.hasNext()) {
      String onto=ont.next().getURI().toString();
      if (eval.getDescription().toString().contains(onto)) {
        if (model.isConsistent(eval)) {
          dm.add(i,new SuggestListItem(Color.GREEN,eval.getDescription().toManchesterSyntaxString(onto,null)));
          i++;
          break;
        }
 else {
          dm.add(i,new SuggestListItem(Color.RED,eval.getDescription().toManchesterSyntaxString(onto,null)));
          i++;
          break;
        }
      }
    }
  }
  System.out.println("String_Node_Str");
  view.getSuggestClassPanel().setSuggestList(dm);
}

Fixed version (ground truth):
public void run(){
  System.out.println("String_Node_Str");
  model.setSuggestList(result);
  dm.clear();
  Iterator<EvaluatedDescription> it=result.iterator();
  int i=0;
  while (it.hasNext()) {
    Iterator<OWLOntology> ont=model.getOWLEditorKit().getModelManager().getActiveOntologies().iterator();
    EvaluatedDescription eval=it.next();
    while (ont.hasNext()) {
      String onto=ont.next().getURI().toString();
      if (eval.getDescription().toString().contains(onto)) {
        if (model.isConsistent(eval)) {
          dm.add(i,new SuggestListItem(Color.GREEN,eval.getDescription().toManchesterSyntaxString(onto,null)));
          i++;
          break;
        }
 else {
          dm.add(i,new SuggestListItem(Color.RED,eval.getDescription().toManchesterSyntaxString(onto,null)));
          i++;
          break;
        }
      }
    }
  }
  System.out.println("String_Node_Str");
  view.getSuggestClassPanel().setSuggestList(dm);
}
Program: 10060
Project: 10060
Buggy source:
private void updateList(final List<EvaluatedDescription> result){
  logger.debug("String_Node_Str" + result);
  Runnable doUpdateList=new Runnable(){
    public void run(){
      System.out.println("String_Node_Str");
      model.setSuggestList(result);
      Iterator<EvaluatedDescription> it=result.iterator();
      int i=0;
      while (it.hasNext()) {
        Iterator<OWLOntology> ont=model.getOWLEditorKit().getModelManager().getActiveOntologies().iterator();
        EvaluatedDescription eval=it.next();
        while (ont.hasNext()) {
          String onto=ont.next().getURI().toString();
          if (eval.getDescription().toString().contains(onto)) {
            if (model.isConsistent(eval)) {
              dm.add(i,new SuggestListItem(Color.GREEN,eval.getDescription().toManchesterSyntaxString(onto,null)));
              i++;
              break;
            }
 else {
              dm.add(i,new SuggestListItem(Color.RED,eval.getDescription().toManchesterSyntaxString(onto,null)));
              i++;
              break;
            }
          }
        }
      }
      System.out.println("String_Node_Str");
      view.getSuggestClassPanel().setSuggestList(dm);
    }
  }
;
  SwingUtilities.invokeLater(doUpdateList);
}

Fixed version (ground truth):
private void updateList(final List<EvaluatedDescription> result){
  logger.debug("String_Node_Str" + result);
  Runnable doUpdateList=new Runnable(){
    public void run(){
      System.out.println("String_Node_Str");
      model.setSuggestList(result);
      dm.clear();
      Iterator<EvaluatedDescription> it=result.iterator();
      int i=0;
      while (it.hasNext()) {
        Iterator<OWLOntology> ont=model.getOWLEditorKit().getModelManager().getActiveOntologies().iterator();
        EvaluatedDescription eval=it.next();
        while (ont.hasNext()) {
          String onto=ont.next().getURI().toString();
          if (eval.getDescription().toString().contains(onto)) {
            if (model.isConsistent(eval)) {
              dm.add(i,new SuggestListItem(Color.GREEN,eval.getDescription().toManchesterSyntaxString(onto,null)));
              i++;
              break;
            }
 else {
              dm.add(i,new SuggestListItem(Color.RED,eval.getDescription().toManchesterSyntaxString(onto,null)));
              i++;
              break;
            }
          }
        }
      }
      System.out.println("String_Node_Str");
      view.getSuggestClassPanel().setSuggestList(dm);
    }
  }
;
  SwingUtilities.invokeLater(doUpdateList);
}
Program: 10061
Project: 10061
Buggy source:
public void run(){
  model.setSuggestList(result);
  Iterator<EvaluatedDescription> it=result.iterator();
  while (it.hasNext()) {
    Iterator<OWLOntology> ont=model.getOWLEditorKit().getModelManager().getActiveOntologies().iterator();
    EvaluatedDescription eval=it.next();
    while (ont.hasNext()) {
      String onto=ont.next().getURI().toString();
      System.out.println(eval.getDescription());
      if (eval.getDescription().toString().contains(onto)) {
        if (model.isConsistent(eval)) {
          dm.add(0,new SuggestListItem(Color.GREEN,eval.getDescription().toManchesterSyntaxString(onto + "String_Node_Str",null)));
        }
 else {
          dm.add(0,new SuggestListItem(Color.RED,eval.getDescription().toManchesterSyntaxString(onto + "String_Node_Str",null)));
        }
      }
    }
  }
  view.getSuggestClassPanel().getSuggestList().setModel(dm);
}

Fixed version (ground truth):
public void run(){
  model.setSuggestList(result);
  Iterator<EvaluatedDescription> it=result.iterator();
  while (it.hasNext()) {
    Iterator<OWLOntology> ont=model.getOWLEditorKit().getModelManager().getActiveOntologies().iterator();
    EvaluatedDescription eval=it.next();
    while (ont.hasNext()) {
      String onto=ont.next().getURI().toString();
      if (eval.getDescription().toString().contains(onto)) {
        if (model.isConsistent(eval)) {
          dm.add(0,new SuggestListItem(Color.GREEN,eval.getDescription().toManchesterSyntaxString(onto,null)));
          break;
        }
 else {
          dm.add(0,new SuggestListItem(Color.RED,eval.getDescription().toManchesterSyntaxString(onto,null)));
          break;
        }
      }
    }
  }
  view.getSuggestClassPanel().getSuggestList().setModel(dm);
}
Program: 10062
Project: 10062
Buggy source:
/** 
 * Choses the right EvaluatedDescription object after a concept is chosen in the list.
 * @param m MouseEvent
 */
public void mouseClicked(MouseEvent m){
  EvaluatedDescription eDescription=null;
  if (view.getSuggestClassPanel().getSuggestList().getSelectedValue() != null) {
    SuggestListItem item=(SuggestListItem)view.getSuggestClassPanel().getSuggestList().getSelectedValue();
    String desc=item.getValue();
    if (model.getEvaluatedDescriptionList() != null) {
      for (Iterator<EvaluatedDescription> i=model.getEvaluatedDescriptionList().iterator(); i.hasNext(); ) {
        eDescription=i.next();
        if (desc.equals(eDescription.getDescription().toManchesterSyntaxString(editorKit.getModelManager().getActiveOntology().getURI() + "String_Node_Str",null))) {
          evaluatedDescription=eDescription;
          break;
        }
      }
    }
    if (m.getClickCount() == 2) {
      view.getMoreDetailForSuggestedConceptsPanel().renderDetailPanel(evaluatedDescription);
    }
  }
}

Fixed version (ground truth):
/** 
 * Choses the right EvaluatedDescription object after a concept is chosen in the list.
 * @param m MouseEvent
 */
public void mouseClicked(MouseEvent m){
  EvaluatedDescription eDescription=null;
  if (view.getSuggestClassPanel().getSuggestList().getSelectedValue() != null) {
    SuggestListItem item=(SuggestListItem)view.getSuggestClassPanel().getSuggestList().getSelectedValue();
    String desc=item.getValue();
    if (model.getEvaluatedDescriptionList() != null) {
      for (Iterator<EvaluatedDescription> i=model.getEvaluatedDescriptionList().iterator(); i.hasNext(); ) {
        eDescription=i.next();
        if (desc.equals(eDescription.getDescription().toManchesterSyntaxString(editorKit.getModelManager().getActiveOntology().getURI().toString(),null))) {
          evaluatedDescription=eDescription;
          break;
        }
      }
    }
    if (m.getClickCount() == 2) {
      view.getMoreDetailForSuggestedConceptsPanel().renderDetailPanel(evaluatedDescription);
    }
  }
}
Program: 10063
Project: 10063
Buggy source:
private void updateList(final List<EvaluatedDescription> result){
  Runnable doUpdateList=new Runnable(){
    DefaultListModel dm=new DefaultListModel();
    public void run(){
      model.setSuggestList(result);
      Iterator<EvaluatedDescription> it=result.iterator();
      while (it.hasNext()) {
        Iterator<OWLOntology> ont=model.getOWLEditorKit().getModelManager().getActiveOntologies().iterator();
        EvaluatedDescription eval=it.next();
        while (ont.hasNext()) {
          String onto=ont.next().getURI().toString();
          System.out.println(eval.getDescription());
          if (eval.getDescription().toString().contains(onto)) {
            if (model.isConsistent(eval)) {
              dm.add(0,new SuggestListItem(Color.GREEN,eval.getDescription().toManchesterSyntaxString(onto + "String_Node_Str",null)));
            }
 else {
              dm.add(0,new SuggestListItem(Color.RED,eval.getDescription().toManchesterSyntaxString(onto + "String_Node_Str",null)));
            }
          }
        }
      }
      view.getSuggestClassPanel().getSuggestList().setModel(dm);
    }
  }
;
  SwingUtilities.invokeLater(doUpdateList);
}

Fixed version (ground truth):
private void updateList(final List<EvaluatedDescription> result){
  Runnable doUpdateList=new Runnable(){
    DefaultListModel dm=new DefaultListModel();
    public void run(){
      model.setSuggestList(result);
      Iterator<EvaluatedDescription> it=result.iterator();
      while (it.hasNext()) {
        Iterator<OWLOntology> ont=model.getOWLEditorKit().getModelManager().getActiveOntologies().iterator();
        EvaluatedDescription eval=it.next();
        while (ont.hasNext()) {
          String onto=ont.next().getURI().toString();
          if (eval.getDescription().toString().contains(onto)) {
            if (model.isConsistent(eval)) {
              dm.add(0,new SuggestListItem(Color.GREEN,eval.getDescription().toManchesterSyntaxString(onto,null)));
              break;
            }
 else {
              dm.add(0,new SuggestListItem(Color.RED,eval.getDescription().toManchesterSyntaxString(onto,null)));
              break;
            }
          }
        }
      }
      view.getSuggestClassPanel().getSuggestList().setModel(dm);
    }
  }
;
  SwingUtilities.invokeLater(doUpdateList);
}
Program: 10064
Project: 10064
Buggy source:
public void run(){
  model.setSuggestList(result);
  Iterator<EvaluatedDescription> it=result.iterator();
  while (it.hasNext()) {
    Iterator<OWLOntology> ont=model.getOWLEditorKit().getModelManager().getActiveOntologies().iterator();
    EvaluatedDescription eval=it.next();
    while (ont.hasNext()) {
      String onto=ont.next().getURI().toString();
      if (eval.getDescription().toString().contains(onto)) {
        if (model.isConsistent(eval)) {
          dm.add(0,new SuggestListItem(Color.GREEN,eval.getDescription().toManchesterSyntaxString(onto,null)));
          break;
        }
 else {
          dm.add(0,new SuggestListItem(Color.RED,eval.getDescription().toManchesterSyntaxString(onto,null)));
          break;
        }
      }
    }
  }
  view.getSuggestClassPanel().getSuggestList().setModel(dm);
}

Fixed version (ground truth):
public void run(){
  System.out.println("String_Node_Str");
  model.setSuggestList(result);
  Iterator<EvaluatedDescription> it=result.iterator();
  int i=0;
  while (it.hasNext()) {
    Iterator<OWLOntology> ont=model.getOWLEditorKit().getModelManager().getActiveOntologies().iterator();
    EvaluatedDescription eval=it.next();
    while (ont.hasNext()) {
      String onto=ont.next().getURI().toString();
      if (eval.getDescription().toString().contains(onto)) {
        if (model.isConsistent(eval)) {
          dm.add(i,new SuggestListItem(Color.GREEN,eval.getDescription().toManchesterSyntaxString(onto,null)));
          i++;
          break;
        }
 else {
          dm.add(i,new SuggestListItem(Color.RED,eval.getDescription().toManchesterSyntaxString(onto,null)));
          i++;
          break;
        }
      }
    }
  }
  System.out.println("String_Node_Str");
  view.getSuggestClassPanel().setSuggestList(dm);
}
Program: 10065
Project: 10065
Buggy source:
@Override public void done(){
  timer.cancel();
  List<EvaluatedDescription> result=null;
  try {
    result=get();
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
catch (  ExecutionException e) {
    e.printStackTrace();
  }
  view.getRunButton().setEnabled(true);
  updateList(result);
}

Fixed version (ground truth):
@Override public void done(){
  timer.cancel();
  List<EvaluatedDescription> result=null;
  try {
    result=get();
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
catch (  ExecutionException e) {
    e.printStackTrace();
  }
  view.getRunButton().setEnabled(true);
  System.out.println("String_Node_Str");
  updateList(result);
}
Program: 10066
Project: 10066
Buggy source:
/** 
 * When a Button is pressed this method select the right.
 * @param z ActionEvent
 */
public void actionPerformed(ActionEvent z){
  if (z.getActionCommand().equals("String_Node_Str" + id)) {
    if (model.getAlreadyLearned()) {
      model.unsetListModel();
    }
    model.setKnowledgeSource();
    model.setReasoner();
    model.setPositiveAndNegativeExamples();
    model.setLearningProblem();
    model.setLearningAlgorithm();
    view.getRunButton().setEnabled(false);
    view.renderErrorMessage("String_Node_Str");
    view.getPosAndNegSelectPanel().setCheckBoxesEnable(false);
    retriever=new SuggestionRetriever();
    retriever.execute();
  }
  if (z.getActionCommand().equals("String_Node_Str")) {
    if (evaluatedDescription != null) {
      model.changeDLLearnerDescriptionsToOWLDescriptions(evaluatedDescription.getDescription());
    }
 else {
      model.changeDLLearnerDescriptionsToOWLDescriptions((Description)view.getSuggestClassPanel().getSuggestList().getSelectedValue());
    }
    String message="String_Node_Str";
    view.renderErrorMessage(message);
    view.updateWindow();
  }
  if (z.getActionCommand().equals("String_Node_Str")) {
    if (!toggled) {
      toggled=true;
      view.setIconToggled(toggled);
      view.setExamplePanelVisible(toggled);
    }
 else {
      toggled=false;
      view.setIconToggled(toggled);
      view.setExamplePanelVisible(toggled);
    }
  }
  if (z.getActionCommand().equals("String_Node_Str")) {
    view.getMoreDetailForSuggestedConceptsPanel().renderDetailPanel(evaluatedDescription);
  }
}

Fixed version (ground truth):
/** 
 * When a Button is pressed this method select the right.
 * @param z ActionEvent
 */
public void actionPerformed(ActionEvent z){
  if (z.getActionCommand().equals(id)) {
    if (model.getAlreadyLearned()) {
      model.unsetListModel();
    }
    model.setKnowledgeSource();
    model.setReasoner();
    model.setPositiveAndNegativeExamples();
    model.setLearningProblem();
    model.setLearningAlgorithm();
    view.getRunButton().setEnabled(false);
    view.renderErrorMessage("String_Node_Str");
    view.getPosAndNegSelectPanel().setCheckBoxesEnable(false);
    retriever=new SuggestionRetriever();
    retriever.execute();
  }
  if (z.getActionCommand().equals("String_Node_Str")) {
    if (evaluatedDescription != null) {
      model.changeDLLearnerDescriptionsToOWLDescriptions(evaluatedDescription.getDescription());
    }
 else {
      model.changeDLLearnerDescriptionsToOWLDescriptions((Description)view.getSuggestClassPanel().getSuggestList().getSelectedValue());
    }
    String message="String_Node_Str";
    view.renderErrorMessage(message);
    view.updateWindow();
  }
  if (z.getActionCommand().equals("String_Node_Str")) {
    if (!toggled) {
      toggled=true;
      view.setIconToggled(toggled);
      view.setExamplePanelVisible(toggled);
    }
 else {
      toggled=false;
      view.setIconToggled(toggled);
      view.setExamplePanelVisible(toggled);
    }
  }
  if (z.getActionCommand().equals("String_Node_Str")) {
    view.getMoreDetailForSuggestedConceptsPanel().renderDetailPanel(evaluatedDescription);
  }
}
Program: 10067
Project: 10067
Buggy source:
@SuppressWarnings("String_Node_Str") @Override protected List<EvaluatedDescription> doInBackground() throws Exception {
  la=model.getLearningAlgorithm();
  timer=new Timer();
  timer.schedule(new TimerTask(){
    @Override public void run(){
      if (la != null) {
        publish(la.getCurrentlyBestEvaluatedDescriptions(view.getPosAndNegSelectPanel().getOptionPanel().getNrOfConcepts(),view.getPosAndNegSelectPanel().getOptionPanel().getMinAccuracy(),true));
      }
    }
  }
,0,100);
  dlLearner=new Thread(new Runnable(){
    @Override public void run(){
      model.run();
    }
  }
);
  dlLearner.start();
  try {
    dlLearner.join();
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  List<EvaluatedDescription> result=la.getCurrentlyBestEvaluatedDescriptions(view.getPosAndNegSelectPanel().getOptionPanel().getNrOfConcepts(),view.getPosAndNegSelectPanel().getOptionPanel().getMinAccuracy(),true);
  return result;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected List<EvaluatedDescription> doInBackground() throws Exception {
  la=model.getLearningAlgorithm();
  timer=new Timer();
  timer.schedule(new TimerTask(){
    @Override public void run(){
      System.out.println("String_Node_Str");
      if (la != null) {
        publish(la.getCurrentlyBestEvaluatedDescriptions(view.getPosAndNegSelectPanel().getOptionPanel().getNrOfConcepts(),view.getPosAndNegSelectPanel().getOptionPanel().getMinAccuracy(),true));
      }
    }
  }
,0,1000);
  dlLearner=new Thread(new Runnable(){
    @Override public void run(){
      try {
        model.run();
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
);
  dlLearner.start();
  try {
    dlLearner.join();
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  List<EvaluatedDescription> result=la.getCurrentlyBestEvaluatedDescriptions(view.getPosAndNegSelectPanel().getOptionPanel().getNrOfConcepts(),view.getPosAndNegSelectPanel().getOptionPanel().getMinAccuracy(),true);
  return result;
}
Program: 10068
Project: 10068
Buggy source:
private void updateList(final List<EvaluatedDescription> result){
  Runnable doUpdateList=new Runnable(){
    DefaultListModel dm=new DefaultListModel();
    public void run(){
      model.setSuggestList(result);
      Iterator<EvaluatedDescription> it=result.iterator();
      while (it.hasNext()) {
        Iterator<OWLOntology> ont=model.getOWLEditorKit().getModelManager().getActiveOntologies().iterator();
        EvaluatedDescription eval=it.next();
        while (ont.hasNext()) {
          String onto=ont.next().getURI().toString();
          if (eval.getDescription().toString().contains(onto)) {
            if (model.isConsistent(eval)) {
              dm.add(0,new SuggestListItem(Color.GREEN,eval.getDescription().toManchesterSyntaxString(onto,null)));
              break;
            }
 else {
              dm.add(0,new SuggestListItem(Color.RED,eval.getDescription().toManchesterSyntaxString(onto,null)));
              break;
            }
          }
        }
      }
      view.getSuggestClassPanel().getSuggestList().setModel(dm);
    }
  }
;
  SwingUtilities.invokeLater(doUpdateList);
}

Fixed version (ground truth):
private void updateList(final List<EvaluatedDescription> result){
  Runnable doUpdateList=new Runnable(){
    public void run(){
      System.out.println("String_Node_Str");
      model.setSuggestList(result);
      Iterator<EvaluatedDescription> it=result.iterator();
      int i=0;
      while (it.hasNext()) {
        Iterator<OWLOntology> ont=model.getOWLEditorKit().getModelManager().getActiveOntologies().iterator();
        EvaluatedDescription eval=it.next();
        while (ont.hasNext()) {
          String onto=ont.next().getURI().toString();
          if (eval.getDescription().toString().contains(onto)) {
            if (model.isConsistent(eval)) {
              dm.add(i,new SuggestListItem(Color.GREEN,eval.getDescription().toManchesterSyntaxString(onto,null)));
              i++;
              break;
            }
 else {
              dm.add(i,new SuggestListItem(Color.RED,eval.getDescription().toManchesterSyntaxString(onto,null)));
              i++;
              break;
            }
          }
        }
      }
      System.out.println("String_Node_Str");
      view.getSuggestClassPanel().setSuggestList(dm);
    }
  }
;
  SwingUtilities.invokeLater(doUpdateList);
}