nus-yam/ex-repair huggingface dataset:
Program: 9924
Project: 9924
Buggy source:
private JPanel getContentPanel(){
  JPanel contentPanel1=new JPanel();
  JScrollPane scroll=new JScrollPane();
  conceptList=new JList(model);
  scroll.setPreferredSize(new Dimension(400,400));
  scroll.setViewportView(conceptList);
  contentPanel1.add(scroll);
  return contentPanel1;
}

Fixed version (ground truth):
private JPanel getContentPanel(){
  JPanel contentPanel1=new JPanel();
  JScrollPane scroll=new JScrollPane();
  conceptList=new JXList(model);
  conceptList.setFilterEnabled(true);
  conceptList.setFilters(new FilterPipeline(new ShuttleSorter(0,true)));
  conceptList.setHighlighters(HighlighterFactory.createSimpleStriping(HighlighterFactory.CLASSIC_LINE_PRINTER));
  conceptList.addHighlighter(new ColorHighlighter(HighlightPredicate.ROLLOVER_ROW));
  conceptList.setRolloverEnabled(true);
  scroll.setPreferredSize(new Dimension(400,400));
  scroll.setViewportView(conceptList);
  contentPanel1.add(scroll);
  return contentPanel1;
}
Program: 9925
Project: 9925
Buggy source:
public Component getListCellRendererComponent(JList list,Object value,int index,boolean isSelected,boolean cellHasFocus){
  removeAll();
  JLabel cor=new JLabel();
  JLabel desc=new JLabel();
  setLayout(new GridBagLayout());
  desc.setText(((EvaluatedDescriptionPosNeg)value).getDescription().toManchesterSyntaxString(ore.getBaseURI(),ore.getPrefixes()));
  double accuracy=((EvaluatedDescriptionPosNeg)value).getAccuracy();
  BigDecimal roundedAccuracy=new BigDecimal(accuracy * 100);
  roundedAccuracy=roundedAccuracy.setScale(2,BigDecimal.ROUND_HALF_UP);
  cor.setText(roundedAccuracy.toString());
  add(cor,new GridBagConstraints(0,0,1,1,0.1,0.0,GridBagConstraints.LINE_END,GridBagConstraints.BOTH,new Insets(0,0,0,0),0,0));
  add(desc,new GridBagConstraints(1,0,1,1,0.8,0.0,GridBagConstraints.LINE_START,GridBagConstraints.BOTH,new Insets(0,0,0,0),0,0));
  Color background;
  Color foreground;
  if (index % 2 == 0 && !isSelected) {
    background=new Color(242,242,242);
    foreground=Color.BLACK;
  }
 else   if (isSelected) {
    background=Color.LIGHT_GRAY;
    foreground=Color.WHITE;
  }
 else {
    background=Color.WHITE;
    foreground=Color.BLACK;
  }
  setForeground(foreground);
  setBackground(background);
  return this;
}

Fixed version (ground truth):
public Component getListCellRendererComponent(JList list,Object value,int index,boolean isSelected,boolean cellHasFocus){
  removeAll();
  JLabel cor=new JLabel();
  JLabel desc=new JLabel();
  setLayout(new GridBagLayout());
  desc.setText(((EvaluatedDescriptionClass)value).getDescription().toManchesterSyntaxString(ore.getBaseURI(),ore.getPrefixes()));
  double accuracy=((EvaluatedDescriptionClass)value).getAccuracy();
  BigDecimal roundedAccuracy=new BigDecimal(accuracy * 100);
  roundedAccuracy=roundedAccuracy.setScale(2,BigDecimal.ROUND_HALF_UP);
  cor.setText(String.valueOf(roundedAccuracy));
  add(cor,new GridBagConstraints(0,0,1,1,0.1,0.0,GridBagConstraints.LINE_END,GridBagConstraints.BOTH,new Insets(0,0,0,0),0,0));
  add(desc,new GridBagConstraints(1,0,1,1,0.8,0.0,GridBagConstraints.LINE_START,GridBagConstraints.BOTH,new Insets(0,0,0,0),0,0));
  Color background;
  Color foreground;
  if (index % 2 == 0 && !isSelected) {
    background=new Color(242,242,242);
    foreground=Color.BLACK;
  }
 else   if (isSelected) {
    background=Color.LIGHT_GRAY;
    foreground=Color.WHITE;
  }
 else {
    background=Color.WHITE;
    foreground=Color.BLACK;
  }
  setForeground(foreground);
  setBackground(background);
  return this;
}
Program: 9926
Project: 9926
Buggy source:
/** 
 * Updates the panel.
 */
public void updatePanel(){
  for (  Component c : getComponents()) {
    if (c instanceof JLabel) {
      remove(c);
    }
  }
  ore.updateReasoner();
  correct=true;
  if (mode.equals("String_Node_Str")) {
    for (    JLabel jL : ore.descriptionToJLabelNeg(ind,newClassDescription)) {
      add(jL);
      if (jL instanceof DescriptionLabel) {
        ((DescriptionLabel)jL).setIndOre(ore,ind);
        ((DescriptionLabel)jL).init();
        ((DescriptionLabel)jL).addActionListeners(aL);
        correct=false;
      }
    }
  }
 else   if (mode.equals("String_Node_Str")) {
    for (    JLabel jL : ore.descriptionToJLabelPos(ind,newClassDescription)) {
      add(jL);
      if (jL instanceof DescriptionLabel) {
        ((DescriptionLabel)jL).setIndOre(ore,ind);
        ((DescriptionLabel)jL).init();
        ((DescriptionLabel)jL).addActionListeners(aL);
        correct=false;
      }
    }
  }
  SwingUtilities.updateComponentTreeUI(this);
}

Fixed version (ground truth):
/** 
 * Updates the panel.
 */
public void updatePanel(){
  for (  Component c : getComponents()) {
    if (c instanceof JLabel) {
      remove(c);
    }
  }
  correct=true;
  if (mode.equals("String_Node_Str")) {
    for (    JLabel jL : ore.descriptionToJLabelNeg(ind,newClassDescription)) {
      add(jL);
      if (jL instanceof DescriptionLabel) {
        ((DescriptionLabel)jL).setIndOre(ore,ind);
        ((DescriptionLabel)jL).init();
        ((DescriptionLabel)jL).addActionListeners(aL);
        correct=false;
      }
    }
  }
 else   if (mode.equals("String_Node_Str")) {
    for (    JLabel jL : ore.descriptionToJLabelPos(ind,newClassDescription)) {
      add(jL);
      if (jL instanceof DescriptionLabel) {
        ((DescriptionLabel)jL).setIndOre(ore,ind);
        ((DescriptionLabel)jL).init();
        ((DescriptionLabel)jL).addActionListeners(aL);
        correct=false;
      }
    }
  }
  SwingUtilities.updateComponentTreeUI(this);
}
Program: 9927
Project: 9927
Buggy source:
public void addListeners(ActionListener l,DocumentListener d){
  browseButton.addActionListener(l);
  fileURL.addActionListener(l);
  sparqlURL.addActionListener(l);
  owl.addActionListener(l);
  sparql.addActionListener(l);
  fileURL.getDocument().addDocumentListener(d);
}

Fixed version (ground truth):
public void addListeners(ActionListener l,DocumentListener d){
  browseButton.addActionListener(l);
  fileURL.addActionListener(l);
  sparqlURL.addActionListener(l);
  connectButton.addActionListener(l);
  owl.addActionListener(l);
  sparql.addActionListener(l);
  fileURL.getDocument().addDocumentListener(d);
}
Program: 9929
Project: 9929
Buggy source:
public void valueChanged(ListSelectionEvent e){
  setNextButtonAccordingToConceptSelected();
  if (!e.getValueIsAdjusting()) {
    getWizardModel().getOre().setNewClassDescription(((EvaluatedDescriptionPosNeg)(learnPanel.getResultList().getSelectedValue())));
  }
}

Fixed version (ground truth):
public void valueChanged(ListSelectionEvent e){
  setNextButtonAccordingToConceptSelected();
  if (!e.getValueIsAdjusting()) {
    getWizardModel().getOre().setNewClassDescription(((EvaluatedDescriptionClass)(learnPanel.getResultList().getSelectedValue())));
  }
}
Program: 9930
Project: 9930
Buggy source:
public static Collection<ConfigOption<?>> createConfigOptions(){
  Collection<ConfigOption<?>> options=new LinkedList<ConfigOption<?>>();
  options.add(new IntegerConfigOption("String_Node_Str","String_Node_Str",5));
  options.add(new IntegerConfigOption("String_Node_Str","String_Node_Str",5));
  return options;
}

Fixed version (ground truth):
public static Collection<ConfigOption<?>> createConfigOptions(){
  Collection<ConfigOption<?>> options=new LinkedList<ConfigOption<?>>();
  options.add(new IntegerConfigOption("String_Node_Str","String_Node_Str",100));
  options.add(new IntegerConfigOption("String_Node_Str","String_Node_Str",5));
  return options;
}
Program: 9931
Project: 9931
Buggy source:
/** 
 * This method stores the new concept learned by the DL-Learner in the Ontology.
 * @param descript Description learn by the DL-Learner
 */
public void changeDLLearnerDescriptionsToOWLDescriptions(Description descript){
  setNewConceptOWLAPI(descript);
  oldConceptOWLAPI=OWLAPIDescriptionConvertVisitor.getOWLDescription(currentConcept);
  ds.add(oldConceptOWLAPI);
  OWLOntologyManager manager=OWLManager.createOWLOntologyManager();
  OWLDataFactory factory=manager.getOWLDataFactory();
  if (id.equals(EQUIVALENT_CLASS_AXIOM_STRING)) {
    axiomOWLAPI=factory.getOWLEquivalentClassesAxiom(ds);
  }
 else {
    axiomOWLAPI=factory.getOWLSubClassAxiom(oldConceptOWLAPI,newConceptOWLAPI);
  }
  OWLOntology onto=editor.getModelManager().getActiveOntology();
  AddAxiom axiom=new AddAxiom(onto,axiomOWLAPI);
  try {
    manager.applyChange(axiom);
  }
 catch (  OWLOntologyChangeException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * This method stores the new concept learned by the DL-Learner in the Ontology.
 * @param descript Description learn by the DL-Learner
 */
public void changeDLLearnerDescriptionsToOWLDescriptions(Description descript){
  ds.clear();
  owlDescription.clear();
  setNewConceptOWLAPI(descript);
  oldConceptOWLAPI=OWLAPIDescriptionConvertVisitor.getOWLDescription(currentConcept);
  ds.add(oldConceptOWLAPI);
  System.out.println("String_Node_Str" + ds);
  OWLOntologyManager manager=OWLManager.createOWLOntologyManager();
  OWLDataFactory factory=manager.getOWLDataFactory();
  if (id.equals(EQUIVALENT_CLASS_AXIOM_STRING)) {
    axiomOWLAPI=factory.getOWLEquivalentClassesAxiom(ds);
  }
 else {
    axiomOWLAPI=factory.getOWLSubClassAxiom(oldConceptOWLAPI,newConceptOWLAPI);
  }
  OWLOntology onto=editor.getModelManager().getActiveOntology();
  AddAxiom axiom=new AddAxiom(onto,axiomOWLAPI);
  try {
    manager.applyChange(axiom);
  }
 catch (  OWLOntologyChangeException e) {
    e.printStackTrace();
  }
}
Program: 9932
Project: 9932
Buggy source:
@Override public SortedSet<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions(){
  return bestEvaluatedDescriptions.getSet();
}

Fixed version (ground truth):
@Override public TreeSet<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions(){
  return bestEvaluatedDescriptions.getSet();
}
Program: 9933
Project: 9933
Buggy source:
@Override public SortedSet<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions(){
  return bestEvaluatedDescriptions.getSet();
}

Fixed version (ground truth):
@Override public TreeSet<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions(){
  return bestEvaluatedDescriptions.getSet();
}
Program: 9934
Project: 9934
Buggy source:
@Override public SortedSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions(){
  int count=0;
  SortedSet<Node> rev=candidatesStable.descendingSet();
  SortedSet<EvaluatedDescriptionPosNeg> cbd=new TreeSet<EvaluatedDescriptionPosNeg>(edComparator);
  for (  Node eb : rev) {
    cbd.add(new EvaluatedDescriptionPosNeg(eb.getConcept(),getSolutionScore(eb.getConcept())));
    if (count > 200)     return cbd;
    count++;
  }
  return cbd;
}

Fixed version (ground truth):
@Override public TreeSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions(){
  int count=0;
  SortedSet<Node> rev=candidatesStable.descendingSet();
  TreeSet<EvaluatedDescriptionPosNeg> cbd=new TreeSet<EvaluatedDescriptionPosNeg>(edComparator);
  for (  Node eb : rev) {
    cbd.add(new EvaluatedDescriptionPosNeg(eb.getConcept(),getSolutionScore(eb.getConcept())));
    if (count > 200)     return cbd;
    count++;
  }
  return cbd;
}
Program: 9935
Project: 9935
Buggy source:
@Override public synchronized SortedSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions(){
  return algorithm.getCurrentlyBestEvaluatedDescriptions();
}

Fixed version (ground truth):
@Override public synchronized TreeSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions(){
  return algorithm.getCurrentlyBestEvaluatedDescriptions();
}
Program: 9937
Project: 9937
Buggy source:
public SortedSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions(){
  Iterator<ExampleBasedNode> it=candidatesStable.descendingIterator();
  int count=0;
  SortedSet<EvaluatedDescriptionPosNeg> cbd=new TreeSet<EvaluatedDescriptionPosNeg>(edComparator);
  while (it.hasNext()) {
    ExampleBasedNode eb=it.next();
    cbd.add(new EvaluatedDescriptionPosNeg(eb.getConcept(),getScore(eb.getConcept())));
    if (count > 200)     return cbd;
    count++;
  }
  return cbd;
}

Fixed version (ground truth):
public TreeSet<EvaluatedDescriptionPosNeg> getCurrentlyBestEvaluatedDescriptions(){
  Iterator<ExampleBasedNode> it=candidatesStable.descendingIterator();
  int count=0;
  TreeSet<EvaluatedDescriptionPosNeg> cbd=new TreeSet<EvaluatedDescriptionPosNeg>(edComparator);
  while (it.hasNext()) {
    ExampleBasedNode eb=it.next();
    cbd.add(new EvaluatedDescriptionPosNeg(eb.getConcept(),getScore(eb.getConcept())));
    if (count > 200)     return cbd;
    count++;
  }
  return cbd;
}
Program: 9938
Project: 9938
Buggy source:
/** 
 * type Whether to learn an equivalence class or super class axiom.. mandatory: false| reinit necessary: true default value: equivalence
 * @return String 
 */
public String getType(){
  return (String)ComponentManager.getInstance().getConfigOptionValue(classLearningProblem,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * type Whether to learn an equivalence class or super class axiom or domain/range of a property.. mandatory: false| reinit necessary: true default value: equivalence
 * @return String 
 */
public String getType(){
  return (String)ComponentManager.getInstance().getConfigOptionValue(classLearningProblem,"String_Node_Str");
}
Program: 9939
Project: 9939
Buggy source:
/** 
 * @param type Whether to learn an equivalence class or super class axiom..mandatory: false| reinit necessary: true default value: equivalence
 */
public void setType(String type){
  ComponentManager.getInstance().applyConfigEntry(classLearningProblem,"String_Node_Str",type);
  reinitNecessary=true;
}

Fixed version (ground truth):
/** 
 * @param type Whether to learn an equivalence class or super class axiom or domain/range of a property..mandatory: false| reinit necessary: true default value: equivalence
 */
public void setType(String type){
  ComponentManager.getInstance().applyConfigEntry(classLearningProblem,"String_Node_Str",type);
  reinitNecessary=true;
}
Program: 9940
Project: 9940
Buggy source:
protected OWLClass getLimit(){
  return getDataFactory().getOWLNothing();
}

Fixed version (ground truth):
@Override protected OWLClass getLimit(){
  return getDataFactory().getOWLNothing();
}
Program: 9941
Project: 9941
Buggy source:
public Set<OWLDescription> visit(OWLDataValueRestriction desc){
  return Collections.singleton((OWLDescription)desc);
}

Fixed version (ground truth):
@Override public Set<OWLDescription> visit(OWLDataValueRestriction desc){
  return Collections.singleton((OWLDescription)desc);
}
Program: 9942
Project: 9942
Buggy source:
protected OWLDataRange getDataLimit(){
  return getDataFactory().getOWLDataComplementOf(getDataFactory().getTopDataType());
}

Fixed version (ground truth):
@Override protected OWLDataRange getDataLimit(){
  return getDataFactory().getOWLDataComplementOf(getDataFactory().getTopDataType());
}
Program: 9943
Project: 9943
Buggy source:
protected OWLClass getLimit(){
  return getDataFactory().getOWLNothing();
}

Fixed version (ground truth):
@Override protected OWLClass getLimit(){
  return getDataFactory().getOWLNothing();
}
Program: 9944
Project: 9944
Buggy source:
public Set<OWLDescription> visit(OWLDataValueRestriction desc){
  return Collections.singleton((OWLDescription)desc);
}

Fixed version (ground truth):
@Override public Set<OWLDescription> visit(OWLDataValueRestriction desc){
  return Collections.singleton((OWLDescription)desc);
}
Program: 9945
Project: 9945
Buggy source:
protected OWLDataRange getDataLimit(){
  return getDataFactory().getOWLDataComplementOf(getDataFactory().getTopDataType());
}

Fixed version (ground truth):
@Override protected OWLDataRange getDataLimit(){
  return getDataFactory().getOWLDataComplementOf(getDataFactory().getTopDataType());
}
Program: 9946
Project: 9946
Buggy source:
protected OWLClass getLimit(){
  return getDataFactory().getOWLThing();
}

Fixed version (ground truth):
@Override protected OWLClass getLimit(){
  return getDataFactory().getOWLThing();
}
Program: 9947
Project: 9947
Buggy source:
protected OWLDataRange getDataLimit(){
  return getDataFactory().getTopDataType();
}

Fixed version (ground truth):
@Override protected OWLDataRange getDataLimit(){
  return getDataFactory().getTopDataType();
}
Program: 9948
Project: 9948
Buggy source:
protected OWLClass getLimit(){
  return getDataFactory().getOWLThing();
}

Fixed version (ground truth):
@Override protected OWLClass getLimit(){
  return getDataFactory().getOWLThing();
}
Program: 9949
Project: 9949
Buggy source:
protected OWLDataRange getDataLimit(){
  return getDataFactory().getTopDataType();
}

Fixed version (ground truth):
@Override protected OWLDataRange getDataLimit(){
  return getDataFactory().getTopDataType();
}
Program: 9950
Project: 9950
Buggy source:
@Override public int compare(EvaluatedDescriptionPosNeg ed1,EvaluatedDescriptionPosNeg ed2){
  double acc1=ed1.getAccuracy();
  double acc2=ed2.getAccuracy();
  if (acc1 > acc2)   return -1;
 else   if (acc1 < acc2)   return 1;
 else {
    int length1=ed1.getDescriptionLength();
    int length2=ed2.getDescriptionLength();
    if (length1 < length2)     return -1;
 else     if (length1 > length2)     return 1;
 else     return cc.compare(ed1.getDescription(),ed2.getDescription());
  }
}

Fixed version (ground truth):
@Override public int compare(EvaluatedDescriptionPosNeg ed1,EvaluatedDescriptionPosNeg ed2){
  double acc1=ed1.getAccuracy();
  double acc2=ed2.getAccuracy();
  if (acc1 > acc2)   return 1;
 else   if (acc1 < acc2)   return -1;
 else {
    int length1=ed1.getDescriptionLength();
    int length2=ed2.getDescriptionLength();
    if (length1 < length2)     return 1;
 else     if (length1 > length2)     return -1;
 else     return cc.compare(ed1.getDescription(),ed2.getDescription());
  }
}
Program: 9951
Project: 9951
Buggy source:
public void run(){
  model.setSuggestList(result);
  dm.clear();
  int i=0;
  for (  EvaluatedDescription eval : result) {
    Set<String> ont=model.getOntologyURIString();
    for (    String ontology : ont) {
      if (eval.getDescription().toString().contains(ontology)) {
        if (((EvaluatedDescriptionClass)eval).isConsistent()) {
          dm.add(i,new SuggestListItem(colorGreen,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          break;
        }
 else {
          dm.add(i,new SuggestListItem(colorRed,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          view.setIsInconsistent(true);
          break;
        }
      }
    }
  }
  view.getSuggestClassPanel().setSuggestList(dm);
}

Fixed version (ground truth):
public void run(){
  model.setSuggestList(result);
  dm.clear();
  int i=0;
  for (  EvaluatedDescription eval : result) {
    Set<String> ont=model.getOntologyURIString();
    for (    String ontology : ont) {
      if (eval.getDescription().toString().contains(ontology)) {
        if (((EvaluatedDescriptionClass)eval).isConsistent()) {
          dm.add(i,new SuggestListItem(colorGreen,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          break;
        }
 else {
          dm.add(i,new SuggestListItem(colorRed,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          view.setIsInconsistent(true);
          break;
        }
      }
    }
  }
  view.getSuggestClassPanel().setSuggestList(dm);
  view.getLearnerView().repaint();
}
Program: 9952
Project: 9952
Buggy source:
private void updateList(final List<? extends EvaluatedDescription> result){
  Runnable doUpdateList=new Runnable(){
    public void run(){
      model.setSuggestList(result);
      dm.clear();
      int i=0;
      for (      EvaluatedDescription eval : result) {
        Set<String> ont=model.getOntologyURIString();
        for (        String ontology : ont) {
          if (eval.getDescription().toString().contains(ontology)) {
            if (((EvaluatedDescriptionClass)eval).isConsistent()) {
              dm.add(i,new SuggestListItem(colorGreen,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
              break;
            }
 else {
              dm.add(i,new SuggestListItem(colorRed,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
              view.setIsInconsistent(true);
              break;
            }
          }
        }
      }
      view.getSuggestClassPanel().setSuggestList(dm);
    }
  }
;
  SwingUtilities.invokeLater(doUpdateList);
}

Fixed version (ground truth):
private void updateList(final List<? extends EvaluatedDescription> result){
  Runnable doUpdateList=new Runnable(){
    public void run(){
      model.setSuggestList(result);
      dm.clear();
      int i=0;
      for (      EvaluatedDescription eval : result) {
        Set<String> ont=model.getOntologyURIString();
        for (        String ontology : ont) {
          if (eval.getDescription().toString().contains(ontology)) {
            if (((EvaluatedDescriptionClass)eval).isConsistent()) {
              dm.add(i,new SuggestListItem(colorGreen,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
              break;
            }
 else {
              dm.add(i,new SuggestListItem(colorRed,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
              view.setIsInconsistent(true);
              break;
            }
          }
        }
      }
      view.getSuggestClassPanel().setSuggestList(dm);
      view.getLearnerView().repaint();
    }
  }
;
  SwingUtilities.invokeLater(doUpdateList);
}
Program: 9955
Project: 9955
Buggy source:
public void setGraphicalPanel(){
  GridBagConstraints c=new GridBagConstraints();
  learner.remove(posPanel);
  learner.remove(advancedPanel);
  detail.setVisible(true);
  c.fill=GridBagConstraints.NONE;
  c.gridwidth=GridBagConstraints.RELATIVE;
  c.gridx=0;
  c.gridy=3;
  c.weightx=0.0;
  c.weighty=0.0;
  learner.add(detail,c);
  c.fill=GridBagConstraints.NONE;
  c.anchor=GridBagConstraints.LINE_START;
  c.gridwidth=GridBagConstraints.REMAINDER;
  c.gridx=0;
  c.gridy=4;
  learner.add(advancedPanel,c);
  c.fill=GridBagConstraints.NONE;
  c.anchor=GridBagConstraints.LINE_START;
  c.gridx=0;
  c.gridy=5;
  c.gridwidth=GridBagConstraints.REMAINDER;
  learner.add(posPanel,c);
  learnerScroll.setPreferredSize(new Dimension(SCROLL_WIDTH,SCROLL_HEIGHT));
  learnerScroll.setViewportView(learner);
  learnerScroll.repaint();
}

Fixed version (ground truth):
public void setGraphicalPanel(){
  GridBagConstraints c=new GridBagConstraints();
  learner.remove(posPanel);
  learner.remove(advancedPanel);
  detail.setVisible(true);
  c.fill=GridBagConstraints.NONE;
  c.gridwidth=GridBagConstraints.REMAINDER;
  c.anchor=GridBagConstraints.LINE_START;
  c.gridx=0;
  c.gridy=3;
  c.weightx=0.0;
  c.weighty=0.0;
  learner.add(detail,c);
  c.fill=GridBagConstraints.NONE;
  c.anchor=GridBagConstraints.LINE_START;
  c.gridwidth=GridBagConstraints.REMAINDER;
  c.gridx=0;
  c.gridy=4;
  learner.add(advancedPanel,c);
  c.fill=GridBagConstraints.NONE;
  c.anchor=GridBagConstraints.LINE_START;
  c.gridx=0;
  c.gridy=5;
  c.gridwidth=GridBagConstraints.REMAINDER;
  learner.add(posPanel,c);
  learnerScroll.setPreferredSize(new Dimension(SCROLL_WIDTH,SCROLL_HEIGHT));
  learnerScroll.setViewportView(learner);
  learnerScroll.repaint();
}
Program: 9958
Project: 9958
Buggy source:
/** 
 * This method renders the output for the detail panel.
 * @param desc selected description
 */
public void renderDetailPanel(EvaluatedDescription desc){
  accuracy.setVisible(false);
  accuracyText.setVisible(false);
  concept.setVisible(false);
  conceptText.setVisible(false);
  eval=desc;
  this.setInformation();
  p=new GraphicalCoveragePanel(eval,model,conceptText.getText(),this);
  p.setBounds(5,0,600,350);
  unsetEverything();
  conceptPanel.removeAll();
  conceptPanel.add(concept);
  conceptPanel.add(accuracy);
  conceptPanel.add(conceptText);
  conceptPanel.add(accuracyText);
  conceptPanel.setVisible(true);
  this.add(p);
  this.addPropertyChangeListener(handler);
  this.repaint();
}

Fixed version (ground truth):
/** 
 * This method renders the output for the detail panel.
 * @param desc selected description
 */
public void renderDetailPanel(EvaluatedDescription desc){
  accuracy.setVisible(false);
  accuracyText.setVisible(false);
  concept.setVisible(false);
  conceptText.setVisible(false);
  eval=desc;
  this.setInformation();
  p=new GraphicalCoveragePanel(eval,model,conceptText.getText(),this);
  p.setBounds(5,0,600,700);
  unsetEverything();
  conceptPanel.removeAll();
  conceptPanel.add(concept);
  conceptPanel.add(accuracy);
  conceptPanel.add(conceptText);
  conceptPanel.add(accuracyText);
  conceptPanel.setVisible(true);
  this.add(p);
  this.addPropertyChangeListener(handler);
  this.repaint();
}
Program: 9959
Project: 9959
Buggy source:
/** 
 * Constructor for the Option Panel. 
 */
public OptionPanel(){
  setPreferredSize(new Dimension(490,150));
  setLayout(null);
  minAccuracyLabel=new JLabel("String_Node_Str");
  minAccuracyLabel.setBounds(5,0,150,40);
  maxExecutionTimeLabel=new JLabel("String_Node_Str");
  maxExecutionTimeLabel.setBounds(5,60,150,40);
  nrOfConceptsLabel=new JLabel("String_Node_Str");
  nrOfConceptsLabel.setBounds(5,120,150,40);
  minAccuracy=new JSlider(0,50,5);
  minAccuracy.setPaintTicks(true);
  minAccuracy.setMajorTickSpacing(10);
  minAccuracy.setMinorTickSpacing(1);
  minAccuracy.setPaintLabels(true);
  minAccuracy.setBounds(200,0,200,40);
  maxExecutionTime=new JSlider(0,40,8);
  maxExecutionTime.setPaintTicks(true);
  maxExecutionTime.setMajorTickSpacing(10);
  maxExecutionTime.setMinorTickSpacing(1);
  maxExecutionTime.setPaintLabels(true);
  maxExecutionTime.setBounds(200,60,200,40);
  nrOfConcepts=new JSlider(2,20,10);
  nrOfConcepts.setPaintTicks(true);
  nrOfConcepts.setMajorTickSpacing(2);
  nrOfConcepts.setMinorTickSpacing(1);
  nrOfConcepts.setPaintLabels(true);
  nrOfConcepts.setBounds(200,120,200,40);
  add(minAccuracyLabel);
  add(minAccuracy);
  add(maxExecutionTimeLabel);
  add(maxExecutionTime);
  add(nrOfConceptsLabel);
  add(nrOfConcepts);
}

Fixed version (ground truth):
/** 
 * Constructor for the Option Panel. 
 */
public OptionPanel(){
  setLayout(new BorderLayout());
  labelPanel=new JPanel();
  labelPanel.setLayout(new GridLayout(0,1));
  sliderPanel=new JPanel();
  sliderPanel.setLayout(new GridLayout(0,1));
  minAccuracyLabel=new JLabel("String_Node_Str");
  maxExecutionTimeLabel=new JLabel("String_Node_Str");
  nrOfConceptsLabel=new JLabel("String_Node_Str");
  minAccuracy=new JSlider(0,50,5);
  minAccuracy.setPaintTicks(true);
  minAccuracy.setMajorTickSpacing(10);
  minAccuracy.setMinorTickSpacing(1);
  minAccuracy.setPaintLabels(true);
  maxExecutionTime=new JSlider(0,40,8);
  maxExecutionTime.setPaintTicks(true);
  maxExecutionTime.setMajorTickSpacing(10);
  maxExecutionTime.setMinorTickSpacing(1);
  maxExecutionTime.setPaintLabels(true);
  nrOfConcepts=new JSlider(2,20,10);
  nrOfConcepts.setPaintTicks(true);
  nrOfConcepts.setMajorTickSpacing(2);
  nrOfConcepts.setMinorTickSpacing(1);
  nrOfConcepts.setPaintLabels(true);
  labelPanel.add(minAccuracyLabel);
  labelPanel.add(maxExecutionTimeLabel);
  labelPanel.add(nrOfConceptsLabel);
  sliderPanel.add(minAccuracy);
  sliderPanel.add(maxExecutionTime);
  sliderPanel.add(nrOfConcepts);
  add(BorderLayout.WEST,labelPanel);
  add(BorderLayout.CENTER,sliderPanel);
}
Program: 9960
Project: 9960
Buggy source:
/** 
 * This method is called after the model for the suggest list is updated.
 * @param desc List model of descriptions made by the DL-Learner
 */
public void setSuggestList(DefaultListModel desc){
  descriptions.setModel(desc);
  repaint();
}

Fixed version (ground truth):
/** 
 * This method is called after the model for the suggest list is updated.
 * @param desc List model of descriptions made by the DL-Learner
 */
public void setSuggestList(DefaultListModel desc){
  descriptions.setModel(desc);
  descriptions.repaint();
  repaint();
}
Program: 9961
Project: 9961
Buggy source:
/** 
 * This is the constructor for the suggest panel. It creates a new Scroll panel and puts the Suggest List in it. 
 */
public SuggestClassPanel(){
  super();
  this.setPreferredSize(new Dimension(470,120));
  suggestScroll=new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  descriptions=new JList();
  descriptions.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  suggestPanel=new JPanel();
  descriptions.setVisible(true);
  suggestPanel.add(descriptions);
  suggestScroll.setPreferredSize(new Dimension(WIDTH,HEIGHT));
  suggestScroll.setViewportView(descriptions);
  descriptions.setCellRenderer(new SuggestListCellRenderer());
  add(suggestScroll);
}

Fixed version (ground truth):
/** 
 * This is the constructor for the suggest panel. It creates a new Scroll panel and puts the Suggest List in it. 
 */
public SuggestClassPanel(){
  super();
  this.setLayout(new BorderLayout());
  suggestScroll=new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  descriptions=new JList();
  descriptions.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  suggestPanel=new JPanel();
  descriptions.setVisible(true);
  descriptions.setVisibleRowCount(6);
  descriptions.getPreferredScrollableViewportSize();
  suggestPanel.add(descriptions);
  suggestScroll.setViewportView(descriptions);
  descriptions.setCellRenderer(new SuggestListCellRenderer());
  add(BorderLayout.CENTER,suggestScroll);
}
Program: 9962
Project: 9962
Buggy source:
private boolean isDescriptionAllowed(Description description,OENode parentNode){
  if (isClassLearningProblem) {
    if (isEquivalenceProblem) {
      if (occursOnFirstLevel(description,classToDescribe)) {
        return false;
      }
    }
 else {
      TreeSet<Description> toTest=new TreeSet<Description>();
      toTest.add(classToDescribe);
      while (!toTest.isEmpty()) {
        Description d=toTest.pollFirst();
        if (occursOnFirstLevel(description,d)) {
          return false;
        }
        toTest.addAll(reasoner.getClassHierarchy().getSuperClasses(d));
      }
    }
  }
  if (parentNode != null && ConceptTransformation.getForallOccurences(description) > ConceptTransformation.getForallOccurences(parentNode.getDescription())) {
    SortedSet<PropertyContext> contexts=ConceptTransformation.getForallContexts(description);
    SortedSet<PropertyContext> parentContexts=ConceptTransformation.getForallContexts(parentNode.getDescription());
    contexts.removeAll(parentContexts);
    for (    PropertyContext context : contexts) {
      Description existentialContext=context.toExistentialContext();
      boolean fillerFound=false;
      for (      Individual instance : examples) {
        if (reasoner.hasType(existentialContext,instance)) {
          fillerFound=true;
          break;
        }
      }
      if (!fillerFound) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean isDescriptionAllowed(Description description,OENode parentNode){
  if (isClassLearningProblem) {
    if (isEquivalenceProblem) {
      if (occursOnFirstLevel(description,classToDescribe)) {
        return false;
      }
    }
 else {
      TreeSet<Description> toTest=new TreeSet<Description>(descriptionComparator);
      toTest.add(classToDescribe);
      while (!toTest.isEmpty()) {
        Description d=toTest.pollFirst();
        if (occursOnFirstLevel(description,d)) {
          return false;
        }
        toTest.addAll(reasoner.getClassHierarchy().getSuperClasses(d));
      }
    }
  }
  if (parentNode != null && ConceptTransformation.getForallOccurences(description) > ConceptTransformation.getForallOccurences(parentNode.getDescription())) {
    SortedSet<PropertyContext> contexts=ConceptTransformation.getForallContexts(description);
    SortedSet<PropertyContext> parentContexts=ConceptTransformation.getForallContexts(parentNode.getDescription());
    contexts.removeAll(parentContexts);
    for (    PropertyContext context : contexts) {
      Description existentialContext=context.toExistentialContext();
      boolean fillerFound=false;
      for (      Individual instance : examples) {
        if (reasoner.hasType(existentialContext,instance)) {
          fillerFound=true;
          break;
        }
      }
      if (!fillerFound) {
        return false;
      }
    }
  }
  return true;
}
Program: 9963
Project: 9963
Buggy source:
public static int getForallOccurences(Description description){
  int count=0;
  if (description instanceof ObjectAllRestriction) {
    count++;
  }
  for (  Description child : description.getChildren()) {
    count+=getForallOccurences(child);
  }
  return count;
}

Fixed version (ground truth):
/** 
 * Counts occurrences of \forall in description.
 * @param description A description.
 * @return Number of \forall occurrences.
 */
public static int getForallOccurences(Description description){
  int count=0;
  if (description instanceof ObjectAllRestriction) {
    count++;
  }
  for (  Description child : description.getChildren()) {
    count+=getForallOccurences(child);
  }
  return count;
}
Program: 9964
Project: 9964
Buggy source:
private static SortedSet<PropertyContext> getForallContexts(Description description,PropertyContext currentContext){
  if (description instanceof Restriction) {
    ObjectProperty op=(ObjectProperty)((Restriction)description).getRestrictedPropertyExpression();
    currentContext.add(op);
    if (description instanceof ObjectAllRestriction) {
      TreeSet<PropertyContext> contexts=new TreeSet<PropertyContext>();
      contexts.add(currentContext);
      contexts.addAll(getForallContexts(description.getChild(0),currentContext));
      return contexts;
    }
 else {
      return getForallContexts(description.getChild(0),currentContext);
    }
  }
 else {
    TreeSet<PropertyContext> contexts=new TreeSet<PropertyContext>();
    for (    Description child : description.getChildren()) {
      contexts.addAll(getForallContexts(child,currentContext));
    }
    return contexts;
  }
}

Fixed version (ground truth):
private static SortedSet<PropertyContext> getForallContexts(Description description,PropertyContext currentContext){
  if (description instanceof Restriction) {
    Property op=(Property)((Restriction)description).getRestrictedPropertyExpression();
    if (op instanceof ObjectProperty) {
      currentContext.add((ObjectProperty)op);
      if (description instanceof ObjectAllRestriction) {
        TreeSet<PropertyContext> contexts=new TreeSet<PropertyContext>();
        contexts.add(currentContext);
        contexts.addAll(getForallContexts(description.getChild(0),currentContext));
        return contexts;
      }
 else {
        return getForallContexts(description.getChild(0),currentContext);
      }
    }
 else {
      return new TreeSet<PropertyContext>();
    }
  }
 else {
    TreeSet<PropertyContext> contexts=new TreeSet<PropertyContext>();
    for (    Description child : description.getChildren()) {
      contexts.addAll(getForallContexts(child,currentContext));
    }
    return contexts;
  }
}
Program: 9965
Project: 9965
Buggy source:
public void run(){
  model.setSuggestList(result);
  dm.clear();
  int i=0;
  for (  EvaluatedDescription eval : result) {
    Set<String> ont=model.getOntologyURIString();
    for (    String ontology : ont) {
      if (eval.getDescription().toString().contains(ontology)) {
        if (((EvaluatedDescriptionClass)eval).isConsistent()) {
          dm.add(i,new SuggestListItem(colorGreen,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          break;
        }
 else {
          dm.add(i,new SuggestListItem(colorRed,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          view.setIsInconsistent(true);
          break;
        }
      }
    }
  }
  view.getSuggestClassPanel().setSuggestList(dm);
  view.getLearnerView().repaint();
}

Fixed version (ground truth):
public void run(){
  model.setSuggestList(result);
  dm.clear();
  int i=0;
  for (  EvaluatedDescription eval : result) {
    Set<String> ont=model.getOntologyURIString();
    for (    String ontology : ont) {
      if (eval.getDescription().toString().contains(ontology)) {
        if (((EvaluatedDescriptionClass)eval).isConsistent()) {
          dm.add(i,new SuggestListItem(colorGreen,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          i++;
          break;
        }
 else {
          dm.add(i,new SuggestListItem(colorRed,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          view.setIsInconsistent(true);
          i++;
          break;
        }
      }
    }
  }
  view.getSuggestClassPanel().setSuggestList(dm);
  view.getLearnerView().repaint();
}
Program: 9966
Project: 9966
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") || z.getActionCommand().equals("String_Node_Str")) {
    model.setKnowledgeSource();
    model.setReasoner();
    model.setLearningProblem();
    model.setLearningAlgorithm();
    view.getRunButton().setEnabled(false);
    view.renderErrorMessage("String_Node_Str");
    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);
  }
  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);
    }
  }
}

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("String_Node_Str") || z.getActionCommand().equals("String_Node_Str")) {
    model.setKnowledgeSource();
    model.setLearningProblem();
    model.setLearningAlgorithm();
    view.getRunButton().setEnabled(false);
    view.renderErrorMessage("String_Node_Str");
    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);
  }
  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);
    }
  }
}
Program: 9967
Project: 9967
Buggy source:
private void updateList(final List<? extends EvaluatedDescription> result){
  Runnable doUpdateList=new Runnable(){
    public void run(){
      model.setSuggestList(result);
      dm.clear();
      int i=0;
      for (      EvaluatedDescription eval : result) {
        Set<String> ont=model.getOntologyURIString();
        for (        String ontology : ont) {
          if (eval.getDescription().toString().contains(ontology)) {
            if (((EvaluatedDescriptionClass)eval).isConsistent()) {
              dm.add(i,new SuggestListItem(colorGreen,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
              break;
            }
 else {
              dm.add(i,new SuggestListItem(colorRed,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
              view.setIsInconsistent(true);
              break;
            }
          }
        }
      }
      view.getSuggestClassPanel().setSuggestList(dm);
      view.getLearnerView().repaint();
    }
  }
;
  SwingUtilities.invokeLater(doUpdateList);
}

Fixed version (ground truth):
private void updateList(final List<? extends EvaluatedDescription> result){
  Runnable doUpdateList=new Runnable(){
    public void run(){
      model.setSuggestList(result);
      dm.clear();
      int i=0;
      for (      EvaluatedDescription eval : result) {
        Set<String> ont=model.getOntologyURIString();
        for (        String ontology : ont) {
          if (eval.getDescription().toString().contains(ontology)) {
            if (((EvaluatedDescriptionClass)eval).isConsistent()) {
              dm.add(i,new SuggestListItem(colorGreen,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
              i++;
              break;
            }
 else {
              dm.add(i,new SuggestListItem(colorRed,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
              view.setIsInconsistent(true);
              i++;
              break;
            }
          }
        }
      }
      view.getSuggestClassPanel().setSuggestList(dm);
      view.getLearnerView().repaint();
    }
  }
;
  SwingUtilities.invokeLater(doUpdateList);
}
Program: 9974
Project: 9974
Buggy source:
/** 
 * Constructor of the class.
 * @param p display String 
 * @param x coordinate on the x axis
 * @param y coordinate on the y axis
 * @param ind Name of the Individual
 */
public IndividualPoint(String p,int x,int y,String ind){
  this.point=p;
  this.xAxis=x;
  this.yAxis=y;
  this.circlePoint=new Ellipse2D.Double(x - 1,y - 1,3,3);
  this.individual=ind;
}

Fixed version (ground truth):
/** 
 * Constructor of the class.
 * @param p display String 
 * @param x coordinate on the x axis
 * @param y coordinate on the y axis
 * @param ind Name of the Individual
 */
public IndividualPoint(String p,int x,int y,String ind){
  this.point=p;
  this.xAxis=x;
  this.yAxis=y;
  this.circlePoint=new Ellipse2D.Double(x - 1,y - 1,4,4);
  this.individual=ind;
}
Program: 9975
Project: 9975
Buggy source:
@Override public void run(){
  model.getSuggestModel().removeAllElements();
  model.initReasoner();
  reasoner=model.getReasoner();
  isInconsistent=false;
  if (!isInconsistent) {
    this.checkURI();
    this.setPositiveConcept();
    if (this.hasIndividuals()) {
      view.getRunButton().setEnabled(true);
      view.getHintPanel().setForeground(Color.BLACK);
      view.setHintMessage("String_Node_Str");
    }
 else {
      view.getRunButton().setEnabled(false);
      view.getHintPanel().setVisible(true);
      String message="String_Node_Str" + current + "String_Node_Str";
      view.getHintPanel().setForeground(Color.RED);
      view.setHintMessage(message);
    }
  }
 else {
    view.getHintPanel().setForeground(Color.RED);
    view.getRunButton().setEnabled(false);
    view.setHintMessage("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void run(){
  model.getSuggestModel().removeAllElements();
  reasoner=model.getReasoner();
  isInconsistent=false;
  if (!isInconsistent) {
    this.checkURI();
    this.setPositiveConcept();
    if (this.hasIndividuals()) {
      view.getRunButton().setEnabled(true);
      view.getHintPanel().setForeground(Color.BLACK);
      view.setHintMessage("String_Node_Str");
    }
 else {
      view.getRunButton().setEnabled(false);
      view.getHintPanel().setVisible(true);
      String message="String_Node_Str" + current + "String_Node_Str";
      view.getHintPanel().setForeground(Color.RED);
      view.setHintMessage(message);
    }
  }
 else {
    view.getHintPanel().setForeground(Color.RED);
    view.getRunButton().setEnabled(false);
    view.setHintMessage("String_Node_Str");
  }
}
Program: 9976
Project: 9976
Buggy source:
public void run(){
  model.setSuggestList(result);
  dm.clear();
  int i=0;
  for (  EvaluatedDescription eval : result) {
    Set<String> ont=model.getOntologyURIString();
    for (    String ontology : ont) {
      if (eval.getDescription().toString().contains(ontology)) {
        if (model.isConsistent(eval)) {
          dm.add(i,new SuggestListItem(colorGreen,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          break;
        }
 else {
          dm.add(i,new SuggestListItem(colorRed,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          view.setIsInconsistent(true);
          break;
        }
      }
    }
  }
  view.getSuggestClassPanel().setSuggestList(dm);
}

Fixed version (ground truth):
public void run(){
  model.setSuggestList(result);
  dm.clear();
  int i=0;
  for (  EvaluatedDescription eval : result) {
    Set<String> ont=model.getOntologyURIString();
    for (    String ontology : ont) {
      if (eval.getDescription().toString().contains(ontology)) {
        if (((EvaluatedDescriptionClass)eval).isConsistent()) {
          dm.add(i,new SuggestListItem(colorGreen,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          break;
        }
 else {
          dm.add(i,new SuggestListItem(colorRed,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          view.setIsInconsistent(true);
          break;
        }
      }
    }
  }
  view.getSuggestClassPanel().setSuggestList(dm);
}
Program: 9977
Project: 9977
Buggy source:
/** 
 * This is the constructor for the action handler.
 * @param a ActionHandler
 * @param m DLLearnerModel
 * @param view DLlearner tab
 * @param i id if it is a subclass or an equivalent class
 */
public ActionHandler(DLLearnerModel m,DLLearnerView view,String i){
  this.view=view;
  this.id=i;
  this.model=m;
  toggled=false;
}

Fixed version (ground truth):
/** 
 * This is the constructor for the action handler.
 * @param a ActionHandler
 * @param m DLLearnerModel
 * @param view DLlearner tab
 * @param i id if it is a subclass or an equivalent class
 */
public ActionHandler(DLLearnerModel m,DLLearnerView view){
  this.view=view;
  this.model=m;
  toggled=false;
}