nus-yam/ex-repair huggingface dataset:
Program: 10069
Project: 10069
Buggy source:
/** 
 * This is the constructor for DL-Learner model.
 * @param editorKit Editor Kit to get the currently loaded Ontology
 * @param h OWLFrame(OWLClass) to get the base uri of the 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,OWLFrame<OWLClass> h,String id,OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view){
  editor=editorKit;
  current=h;
  this.id=id;
  this.view=view;
  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();
  detailPane=new JXTaskPane();
  detailPane.setTitle("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * This is the constructor for DL-Learner model.
 * @param editorKit Editor Kit to get the currently loaded Ontology
 * @param h OWLFrame(OWLClass) to get the base uri of the 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,OWLFrame<OWLClass> h,String id,OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view){
  editor=editorKit;
  current=h;
  this.id=id;
  this.view=view;
  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();
  detailPane=new JXTaskPane();
  detailPane.setTitle("String_Node_Str");
  sources=new HashSet<KnowledgeSource>();
}
Program: 10070
Project: 10070
Buggy source:
/** 
 * This method sets the knowledge source for the learning process. Only OWLAPIOntology will be available.
 */
public void setKnowledgeSource(){
  this.source=new OWLAPIOntology(editor.getModelManager().getActiveOntology());
  source.setOWLOntologies(editor.getModelManager().getActiveOntologies());
}

Fixed version (ground truth):
/** 
 * This method sets the knowledge source for the learning process. Only OWLAPIOntology will be available.
 */
public void setKnowledgeSource(){
  Iterator<OWLOntology> it=editor.getModelManager().getActiveOntologies().iterator();
  while (it.hasNext()) {
    sources.add(new OWLAPIOntology(it.next()));
  }
}
Program: 10071
Project: 10071
Buggy source:
/** 
 * This method sets the individuals that belong to the concept which is chosen in protege.
 */
public void setPositiveConcept(){
  SortedSet<Individual> individuals=null;
  hasIndividuals=false;
  if (!current.getRootObject().toString().equals("String_Node_Str")) {
    for (Iterator<NamedClass> i=reasoner.getAtomicConceptsList().iterator(); i.hasNext(); ) {
      if (individuals == null) {
        NamedClass concept=i.next();
        if (concept.toString().endsWith(current.getRootObject().toString())) {
          currentConcept=concept;
          if (reasoner.getIndividuals(concept) != null) {
            if (reasoner.getIndividuals(concept).size() > 0) {
              hasIndividuals=true;
            }
            individual=reasoner.getIndividuals(concept);
            break;
          }
        }
      }
    }
  }
 else {
    if (reasoner.getIndividuals().size() > 0) {
      hasIndividuals=true;
    }
    individual=reasoner.getIndividuals();
  }
}

Fixed version (ground truth):
/** 
 * This method sets the individuals that belong to the concept which is chosen in protege.
 */
public void setPositiveConcept(){
  SortedSet<Individual> individuals=null;
  hasIndividuals=false;
  if (!current.getRootObject().toString().equals("String_Node_Str")) {
    for (Iterator<NamedClass> i=reasoner.getAtomicConceptsList().iterator(); i.hasNext(); ) {
      if (individuals == null) {
        NamedClass concept=i.next();
        if (concept.toString().contains("String_Node_Str")) {
          if (concept.toString().endsWith("String_Node_Str" + current.getRootObject().toString())) {
            currentConcept=concept;
            if (reasoner.getIndividuals(concept) != null) {
              if (reasoner.getIndividuals(concept).size() > 0) {
                hasIndividuals=true;
              }
              individual=reasoner.getIndividuals(concept);
              break;
            }
          }
        }
 else {
          if (concept.toString().endsWith(current.getRootObject().toString())) {
            currentConcept=concept;
            if (reasoner.getIndividuals(concept) != null) {
              if (reasoner.getIndividuals(concept).size() > 0) {
                hasIndividuals=true;
              }
              individual=reasoner.getIndividuals(concept);
              break;
            }
          }
        }
      }
    }
  }
 else {
    if (reasoner.getIndividuals().size() > 0) {
      hasIndividuals=true;
    }
    individual=reasoner.getIndividuals();
  }
}
Program: 10072
Project: 10072
Buggy source:
/** 
 * This method checks which positive and negative examples are checked and puts the checked examples into a tree set.
 */
public void setPositiveAndNegativeExamples(){
  positiveExamples=new TreeSet<String>();
  negativeExamples=new TreeSet<String>();
  for (int i=0; i < individualVector.size(); i++) {
    if (individualVector.get(i).isPositiveExample()) {
      positiveExamples.add(individualVector.get(i).getIndividualString());
    }
 else {
      negativeExamples.add(individualVector.get(i).getIndividualString());
    }
  }
  System.out.println("String_Node_Str" + positiveExamples);
}

Fixed version (ground truth):
/** 
 * This method checks which positive and negative examples are checked and puts the checked examples into a tree set.
 */
public void setPositiveAndNegativeExamples(){
  positiveExamples=new TreeSet<String>();
  negativeExamples=new TreeSet<String>();
  for (int i=0; i < individualVector.size(); i++) {
    if (individualVector.get(i).isPositiveExample()) {
      positiveExamples.add(individualVector.get(i).getIndividualString());
    }
 else {
      negativeExamples.add(individualVector.get(i).getIndividualString());
    }
  }
}
Program: 10073
Project: 10073
Buggy source:
/** 
 * This method sets the reasoner and the reasoning service Only OWLAPIReasoner is available.
 */
public void setReasoner(){
  this.reasoner=cm.reasoner(OWLAPIReasoner.class,source);
  try {
    reasoner.init();
  }
 catch (  ComponentInitException e) {
    System.out.println("String_Node_Str");
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * This method sets the reasoner and the reasoning service Only OWLAPIReasoner is available.
 */
public void setReasoner(){
  this.reasoner=cm.reasoner(OWLAPIReasoner.class,sources);
  try {
    reasoner.init();
  }
 catch (  ComponentInitException e) {
    System.out.println("String_Node_Str");
    e.printStackTrace();
  }
}
Program: 10074
Project: 10074
Buggy source:
/** 
 * This method sets the learning algorithm for the learning process.
 */
public void setLearningAlgorithm(){
  try {
    this.la=cm.learningAlgorithm(ExampleBasedROLComponent.class,lp,reasoner);
  }
 catch (  LearningProblemUnsupportedException e) {
    e.printStackTrace();
  }
  cm.applyConfigEntry(la,"String_Node_Str",view.getPosAndNegSelectPanel().getOptionPanel().getMaxExecutionTime());
  try {
    la.init();
  }
 catch (  ComponentInitException e) {
    e.printStackTrace();
  }
  alreadyLearned=true;
}

Fixed version (ground truth):
/** 
 * This method sets the learning algorithm for the learning process.
 */
public void setLearningAlgorithm(){
  try {
    this.la=cm.learningAlgorithm(ExampleBasedROLComponent.class,lp,reasoner);
  }
 catch (  LearningProblemUnsupportedException e) {
    e.printStackTrace();
  }
  Set<String> ignore=new TreeSet<String>();
  ignore.add(currentConcept.toString());
  cm.applyConfigEntry(la,"String_Node_Str",ignore);
  cm.applyConfigEntry(la,"String_Node_Str",view.getPosAndNegSelectPanel().getOptionPanel().getMaxExecutionTime());
  try {
    la.init();
  }
 catch (  ComponentInitException e) {
    e.printStackTrace();
  }
  alreadyLearned=true;
}
Program: 10077
Project: 10077
Buggy source:
/** 
 * Construktor for the Option Panel. 
 */
public OptionPanel(){
  setPreferredSize(new Dimension(490,120));
  setLayout(new GridLayout(0,1));
  optionPanel=new JPanel(new GridLayout(0,2));
  minAccuracyLabel=new JLabel("String_Node_Str");
  maxExecutionTimeLabel=new JLabel("String_Node_Str");
  nrOfConceptsLabel=new JLabel("String_Node_Str");
  minAccuracy=new JSlider(50,100,80);
  minAccuracy.setPaintTicks(true);
  minAccuracy.setMajorTickSpacing(10);
  minAccuracy.setMinorTickSpacing(1);
  minAccuracy.setPaintLabels(true);
  maxExecutionTime=new JSlider(5,20,10);
  maxExecutionTime.setPaintTicks(true);
  maxExecutionTime.setMajorTickSpacing(5);
  maxExecutionTime.setMinorTickSpacing(1);
  maxExecutionTime.setPaintLabels(true);
  nrOfConcepts=new JSlider(2,20,5);
  nrOfConcepts.setPaintTicks(true);
  nrOfConcepts.setMajorTickSpacing(2);
  nrOfConcepts.setMinorTickSpacing(1);
  nrOfConcepts.setPaintLabels(true);
  optionPanel.add(minAccuracyLabel);
  optionPanel.add(minAccuracy);
  optionPanel.add(maxExecutionTimeLabel);
  optionPanel.add(maxExecutionTime);
  optionPanel.add(nrOfConceptsLabel);
  optionPanel.add(nrOfConcepts);
  add(optionPanel);
}

Fixed version (ground truth):
/** 
 * Construktor for the Option Panel. 
 */
public OptionPanel(){
  setPreferredSize(new Dimension(490,120));
  setLayout(new GridLayout(0,1));
  optionPanel=new JPanel(new GridLayout(0,2));
  minAccuracyLabel=new JLabel("String_Node_Str");
  maxExecutionTimeLabel=new JLabel("String_Node_Str");
  nrOfConceptsLabel=new JLabel("String_Node_Str");
  minAccuracy=new JSlider(50,100,50);
  minAccuracy.setPaintTicks(true);
  minAccuracy.setMajorTickSpacing(10);
  minAccuracy.setMinorTickSpacing(1);
  minAccuracy.setPaintLabels(true);
  maxExecutionTime=new JSlider(5,20,10);
  maxExecutionTime.setPaintTicks(true);
  maxExecutionTime.setMajorTickSpacing(5);
  maxExecutionTime.setMinorTickSpacing(1);
  maxExecutionTime.setPaintLabels(true);
  nrOfConcepts=new JSlider(2,20,10);
  nrOfConcepts.setPaintTicks(true);
  nrOfConcepts.setMajorTickSpacing(2);
  nrOfConcepts.setMinorTickSpacing(1);
  nrOfConcepts.setPaintLabels(true);
  optionPanel.add(minAccuracyLabel);
  optionPanel.add(minAccuracy);
  optionPanel.add(maxExecutionTimeLabel);
  optionPanel.add(maxExecutionTime);
  optionPanel.add(nrOfConceptsLabel);
  optionPanel.add(nrOfConcepts);
  add(optionPanel);
}
Program: 10078
Project: 10078
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);
}

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){
  System.out.println("String_Node_Str");
  descriptions.setModel(desc);
  repaint();
}
Program: 10079
Project: 10079
Buggy source:
/** 
 * select/deselect the Check boxes.
 * @param i ItemEvent
 */
public void itemStateChanged(ItemEvent i){
  if (i.getItem().toString().contains("String_Node_Str")) {
    for (int j=0; j < model.getPosVector().size(); j++) {
      if (i.getItem().toString().contains(model.getPosVector().get(j).getText().toString())) {
        if (!model.getPosVector().get(j).isSelected()) {
          model.getPosVector().get(j).setSelected(true);
          break;
        }
        if (model.getPosVector().get(j).isSelected()) {
          model.getPosVector().get(j).setSelected(false);
          break;
        }
      }
    }
  }
  if (i.getItem().toString().contains("String_Node_Str")) {
    for (int j=0; j < model.getNegVector().size(); j++) {
      if (i.getItem().toString().contains(model.getNegVector().get(j).getText().toString())) {
        if (!model.getNegVector().get(j).isSelected()) {
          model.getNegVector().get(j).setSelected(true);
          break;
        }
        if (model.getNegVector().get(j).isSelected()) {
          model.getNegVector().get(j).setSelected(false);
          break;
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * select/deselect the Check boxes.
 * @param i ItemEvent
 */
public void itemStateChanged(ItemEvent i){
}
Program: 10080
Project: 10080
Buggy source:
/** 
 * Nothing happens here.
 * @param e ListSelectionEvent 
 */
public void valueChanged(ListSelectionEvent e){
}

Fixed version (ground truth):
/** 
 * Nothing happens here.
 * @param e ListSelectionEvent
 */
public void valueChanged(ListSelectionEvent e){
}
Program: 10081
Project: 10081
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();
    }
    view.getPosAndNegSelectPanel().setCheckBoxesEnable(false);
    model.setKnowledgeSource();
    model.setReasoner();
    model.setPositiveAndNegativeExamples();
    model.setLearningProblem();
    model.setLearningAlgorithm();
    this.dlLearner=new Thread(model);
    dlLearner.start();
    view.getRunButton().setEnabled(false);
    view.renderErrorMessage("String_Node_Str");
  }
  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("String_Node_Str" + id)) {
    if (model.getAlreadyLearned()) {
      model.unsetListModel();
    }
    view.getRunButton().setEnabled(false);
    view.renderErrorMessage("String_Node_Str");
    view.getPosAndNegSelectPanel().setCheckBoxesEnable(false);
    final SuggestionRetriever 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: 10082
Project: 10082
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);
    }
  }
 else {
  }
}

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() + "String_Node_Str",null))) {
          evaluatedDescription=eDescription;
          break;
        }
      }
    }
    if (m.getClickCount() == 2) {
      view.getMoreDetailForSuggestedConceptsPanel().renderDetailPanel(evaluatedDescription);
    }
  }
}
Program: 10083
Project: 10083
Buggy source:
/** 
 * This is the constructor for DL-Learner model.
 * @param editorKit Editor Kit to get the currently loaded Ontology
 * @param h OWLFrame(OWLClass) to get the base uri of the 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,OWLFrame<OWLClass> h,String id,OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view){
  editor=editorKit;
  current=h;
  this.id=id;
  this.view=view;
  ontologyURI=editor.getModelManager().getActiveOntology().getURI().toString() + "String_Node_Str";
  owlDescription=new HashSet<OWLDescription>();
  positiv=new Vector<JCheckBox>();
  posListModel=new DefaultListModel();
  negListModel=new DefaultListModel();
  negativ=new Vector<JCheckBox>();
  normalIndividuals=new Vector<String>();
  ComponentManager.setComponentClasses(componenten);
  individualVector=new Vector<IndividualObject>();
  cm=ComponentManager.getInstance();
  ds=new HashSet<OWLDescription>();
  suggestModel=new DefaultListModel();
  detailPane=new JXTaskPane();
  detailPane.setTitle("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * This is the constructor for DL-Learner model.
 * @param editorKit Editor Kit to get the currently loaded Ontology
 * @param h OWLFrame(OWLClass) to get the base uri of the 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,OWLFrame<OWLClass> h,String id,OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view){
  editor=editorKit;
  current=h;
  this.id=id;
  this.view=view;
  ontologyURI=editor.getModelManager().getActiveOntology().getURI().toString() + "String_Node_Str";
  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();
  detailPane=new JXTaskPane();
  detailPane.setTitle("String_Node_Str");
}
Program: 10084
Project: 10084
Buggy source:
/** 
 * This method sets the individuals that belong to the concept which is chosen in protege.
 */
public void setPositiveConcept(){
  SortedSet<Individual> individuals=null;
  if (!current.getRootObject().toString().equals("String_Node_Str")) {
    for (Iterator<NamedClass> i=rs.getNamedClasses().iterator(); i.hasNext(); ) {
      if (individuals == null) {
        NamedClass concept=i.next();
        if (concept.toString().endsWith("String_Node_Str" + current.getRootObject().toString())) {
          if (rs.getIndividuals(concept) != null) {
            individual=rs.getIndividuals(concept);
            break;
          }
        }
      }
    }
  }
 else {
    individual=rs.getIndividuals();
  }
}

Fixed version (ground truth):
/** 
 * This method sets the individuals that belong to the concept which is chosen in protege.
 */
public void setPositiveConcept(){
  SortedSet<Individual> individuals=null;
  if (!current.getRootObject().toString().equals("String_Node_Str")) {
    for (Iterator<NamedClass> i=reasoner.getAtomicConceptsList().iterator(); i.hasNext(); ) {
      if (individuals == null) {
        NamedClass concept=i.next();
        if (concept.toString().endsWith("String_Node_Str" + current.getRootObject().toString())) {
          if (reasoner.getIndividuals(concept) != null) {
            individual=reasoner.getIndividuals(concept);
            break;
          }
        }
      }
    }
  }
 else {
    individual=reasoner.getIndividuals();
  }
}
Program: 10085
Project: 10085
Buggy source:
/** 
 * This method starts the learning process.
 */
public void run(){
  error="String_Node_Str";
  String message="String_Node_Str";
  la.start();
  description=new Description[la.getCurrentlyBestEvaluatedDescriptions(view.getPosAndNegSelectPanel().getOptionPanel().getNrOfConcepts()).size()];
  addToListModel();
  view.renderErrorMessage(error);
  view.setHintMessage(message);
  view.getRunButton().setEnabled(true);
  view.getPosAndNegSelectPanel().setCheckBoxesEnable(true);
  view.getSuggestClassPanel().setSuggestList(suggestModel);
}

Fixed version (ground truth):
/** 
 * This method starts the learning process.
 */
public void run(){
  error="String_Node_Str";
  setKnowledgeSource();
  setReasoner();
  setPositiveAndNegativeExamples();
  setLearningProblem();
  setLearningAlgorithm();
  String message="String_Node_Str";
  la.start();
  view.renderErrorMessage(error);
  view.setHintMessage(message);
}
Program: 10086
Project: 10086
Buggy source:
/** 
 * This method sets the check boxes for the positive check boxes checked if the individuals matches the concept that is chosen in protege.
 */
public void setPosVector(){
  setPositiveConcept();
  for (Iterator<Individual> j=rs.getIndividuals().iterator(); j.hasNext(); ) {
    Individual ind=j.next();
    normalIndividuals.add(ind.toString());
    String indiv=ind.toString();
    if (setPositivExamplesChecked(indiv)) {
      posListModel.add(0,ind.toManchesterSyntaxString(ontologyURI,prefixes));
      individualVector.add(new IndividualObject(indiv,ind.toManchesterSyntaxString(ontologyURI,prefixes),true));
    }
 else {
      negListModel.add(0,ind.toManchesterSyntaxString(ontologyURI,prefixes));
      individualVector.add(new IndividualObject(indiv,ind.toManchesterSyntaxString(ontologyURI,prefixes),false));
    }
  }
}

Fixed version (ground truth):
/** 
 * This method sets the check boxes for the positive check boxes checked if the individuals matches the concept that is chosen in protege.
 */
public void setPosVector(){
  setPositiveConcept();
  for (Iterator<Individual> j=reasoner.getIndividuals().iterator(); j.hasNext(); ) {
    Individual ind=j.next();
    String indiv=ind.toString();
    if (setPositivExamplesChecked(indiv)) {
      posListModel.add(0,ind.toManchesterSyntaxString(ontologyURI,prefixes));
      individualVector.add(new IndividualObject(indiv,ind.toManchesterSyntaxString(ontologyURI,prefixes),true));
    }
 else {
      negListModel.add(0,ind.toManchesterSyntaxString(ontologyURI,prefixes));
      individualVector.add(new IndividualObject(indiv,ind.toManchesterSyntaxString(ontologyURI,prefixes),false));
    }
  }
}
Program: 10087
Project: 10087
Buggy source:
/** 
 * This method gets the old concept from checking the positive examples.
 */
private void setOldConceptOWLAPI(){
  SortedSet<Individual> indi=rs.getIndividuals();
  for (Iterator<Individual> i=indi.iterator(); i.hasNext(); ) {
    Individual indi2=i.next();
    if (positiveExamples != null) {
      if (positiveExamples.toString().contains(indi2.toString())) {
        Set<NamedClass> concept=reasoner.getTypes(indi2);
        for (Iterator<NamedClass> k=concept.iterator(); k.hasNext(); ) {
          OWLDescription oldOWLAPI=OWLAPIDescriptionConvertVisitor.getOWLDescription(k.next());
          oldConceptOWLAPI=oldOWLAPI;
          ds.add(oldOWLAPI);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * This method gets the old concept from checking the positive examples.
 */
private void setOldConceptOWLAPI(){
  SortedSet<Individual> indi=reasoner.getIndividuals();
  for (Iterator<Individual> i=indi.iterator(); i.hasNext(); ) {
    Individual indi2=i.next();
    if (positiveExamples != null) {
      if (positiveExamples.toString().contains(indi2.toString())) {
        Set<NamedClass> concept=reasoner.getTypes(indi2);
        for (Iterator<NamedClass> k=concept.iterator(); k.hasNext(); ) {
          OWLDescription oldOWLAPI=OWLAPIDescriptionConvertVisitor.getOWLDescription(k.next());
          oldConceptOWLAPI=oldOWLAPI;
          ds.add(oldOWLAPI);
        }
      }
    }
  }
}
Program: 10088
Project: 10088
Buggy source:
public Vector<IndividualObject> getIndividualVector(){
  return individualVector;
}

Fixed version (ground truth):
/** 
 * This method returns the Vector of IndividualObjects.
 * @return individualVector Vector
 */
public Vector<IndividualObject> getIndividualVector(){
  return individualVector;
}
Program: 10089
Project: 10089
Buggy source:
public DefaultListModel getPosListModel(){
  return posListModel;
}

Fixed version (ground truth):
/** 
 * This method returns the PosListModel.
 * @return DefaultListModel posListModel
 */
public DefaultListModel getPosListModel(){
  return posListModel;
}
Program: 10090
Project: 10090
Buggy source:
/** 
 * This method sets the Learning problem for the learning process. PosNegDefinitonLp for equivalent classes and PosNegInclusionLP for super classes.
 */
public void setLearningProblem(){
  if (id.equals("String_Node_Str")) {
    lp=cm.learningProblem(PosNegDefinitionLP.class,rs);
  }
  if (id.equals("String_Node_Str")) {
    lp=cm.learningProblem(PosNegInclusionLP.class,rs);
  }
  cm.applyConfigEntry(lp,"String_Node_Str",positiveExamples);
  cm.applyConfigEntry(lp,"String_Node_Str",negativeExamples);
  try {
    lp.init();
  }
 catch (  ComponentInitException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * This method sets the Learning problem for the learning process. PosNegDefinitonLp for equivalent classes and PosNegInclusionLP for super classes.
 */
public void setLearningProblem(){
  if (id.equals("String_Node_Str")) {
    lp=cm.learningProblem(PosNegDefinitionLP.class,reasoner);
  }
  if (id.equals("String_Node_Str")) {
    lp=cm.learningProblem(PosNegInclusionLP.class,reasoner);
  }
  cm.applyConfigEntry(lp,"String_Node_Str",positiveExamples);
  cm.applyConfigEntry(lp,"String_Node_Str",negativeExamples);
  try {
    lp.init();
  }
 catch (  ComponentInitException e) {
    e.printStackTrace();
  }
}
Program: 10091
Project: 10091
Buggy source:
/** 
 * This method sets the learning algorithm for the learning process.
 */
public void setLearningAlgorithm(){
  try {
    this.la=cm.learningAlgorithm(ExampleBasedROLComponent.class,lp,rs);
  }
 catch (  LearningProblemUnsupportedException e) {
    e.printStackTrace();
  }
  System.out.println("String_Node_Str" + view.getPosAndNegSelectPanel().getOptionPanel().getMaxExecutionTime());
  cm.applyConfigEntry(la,"String_Node_Str",view.getPosAndNegSelectPanel().getOptionPanel().getMaxExecutionTime());
  try {
    la.init();
  }
 catch (  ComponentInitException e) {
    e.printStackTrace();
  }
  alreadyLearned=true;
}

Fixed version (ground truth):
/** 
 * This method sets the learning algorithm for the learning process.
 */
public void setLearningAlgorithm(){
  try {
    this.la=cm.learningAlgorithm(ExampleBasedROLComponent.class,lp,reasoner);
  }
 catch (  LearningProblemUnsupportedException e) {
    e.printStackTrace();
  }
  System.out.println("String_Node_Str" + view.getPosAndNegSelectPanel().getOptionPanel().getMaxExecutionTime());
  cm.applyConfigEntry(la,"String_Node_Str",view.getPosAndNegSelectPanel().getOptionPanel().getMaxExecutionTime());
  try {
    la.init();
  }
 catch (  ComponentInitException e) {
    e.printStackTrace();
  }
  alreadyLearned=true;
}
Program: 10092
Project: 10092
Buggy source:
public boolean hasIndividuals(OWLClass OWLConcept){
  boolean hasIndividuals=false;
  NamedClass concept=null;
  NamedClass selectedConcept=null;
  Iterator<NamedClass> it=reasoner.getNamedClasses().iterator();
  while (it.hasNext()) {
    concept=it.next();
    if (concept.toManchesterSyntaxString(ontologyURI,prefixes).equals(OWLConcept.toString())) {
      selectedConcept=concept;
      break;
    }
  }
  System.out.println("String_Node_Str" + concept);
  System.out.println("String_Node_Str" + reasoner.getIndividuals(concept).size());
  if (reasoner.getIndividuals(selectedConcept).size() > 0) {
    hasIndividuals=true;
  }
  concept=null;
  selectedConcept=null;
  return hasIndividuals;
}

Fixed version (ground truth):
/** 
 * This Method checks if the selected class has any individuals.
 * @param owlConcept OWLClass
 * @return boolean hasIndividuals
 */
public boolean hasIndividuals(OWLClass owlConcept){
  boolean hasIndividuals=false;
  NamedClass concept=null;
  NamedClass selectedConcept=null;
  Iterator<NamedClass> it=reasoner.getNamedClasses().iterator();
  while (it.hasNext()) {
    concept=it.next();
    if (concept.toManchesterSyntaxString(ontologyURI,prefixes).equals(owlConcept.toString())) {
      selectedConcept=concept;
      break;
    }
  }
  if (reasoner.getIndividuals(selectedConcept).size() > 0) {
    hasIndividuals=true;
  }
  concept=null;
  selectedConcept=null;
  return hasIndividuals;
}
Program: 10093
Project: 10093
Buggy source:
/** 
 * This method resets the vectors where the check boxes for positive and negative Examples are stored. It is called when the DL-Learner View is closed.
 */
public void clearVector(){
  individualVector.removeAllElements();
  posListModel.removeAllElements();
  negListModel.removeAllElements();
  positiv.removeAllElements();
  negativ.removeAllElements();
}

Fixed version (ground truth):
/** 
 * This method resets the vectors where the check boxes for positive and negative Examples are stored. It is called when the DL-Learner View is closed.
 */
public void clearVector(){
  individualVector.removeAllElements();
  posListModel.removeAllElements();
  negListModel.removeAllElements();
}
Program: 10094
Project: 10094
Buggy source:
public DefaultListModel getNegListModel(){
  return negListModel;
}

Fixed version (ground truth):
/** 
 * This method returns the NegListModel.
 * @return DefaultListModel negListModel
 */
public DefaultListModel getNegListModel(){
  return negListModel;
}
Program: 10095
Project: 10095
Buggy source:
private boolean isConsistent(EvaluatedDescription eDescription){
  boolean isConsistent=false;
  if (eDescription.getNotCoveredPositives().isEmpty()) {
    isConsistent=true;
  }
 else {
    isConsistent=false;
  }
  return isConsistent;
}

Fixed version (ground truth):
public boolean isConsistent(EvaluatedDescription eDescription){
  boolean isConsistent=false;
  if (eDescription.getNotCoveredPositives().isEmpty()) {
    isConsistent=true;
  }
 else {
    isConsistent=false;
  }
  return isConsistent;
}
Program: 10096
Project: 10096
Buggy source:
public String getManchesterIndividual(){
  return manchesterIndividual;
}

Fixed version (ground truth):
/** 
 * This method returns the manchester String of the Individual.
 * @return String manchesterIndividual
 */
public String getManchesterIndividual(){
  return manchesterIndividual;
}
Program: 10097
Project: 10097
Buggy source:
public boolean isPositiveExample(){
  return isPos;
}

Fixed version (ground truth):
/** 
 * This method returns if the Example is a positive Example.
 * @return boolean isPos
 */
public boolean isPositiveExample(){
  return isPos;
}
Program: 10098
Project: 10098
Buggy source:
public IndividualObject(String normal,String manchester,boolean pos){
  normalIndividual=normal;
  manchesterIndividual=manchester;
  isPos=pos;
}

Fixed version (ground truth):
/** 
 * Constructor for the IndividualObject.
 * @param normal String
 * @param manchester String
 * @param pos boolean
 */
public IndividualObject(String normal,String manchester,boolean pos){
  normalIndividual=normal;
  manchesterIndividual=manchester;
  isPos=pos;
}
Program: 10099
Project: 10099
Buggy source:
public String getIndividualString(){
  return normalIndividual;
}

Fixed version (ground truth):
/** 
 * This method returns the String of the Individual.
 * @return String normalIndividual
 */
public String getIndividualString(){
  return normalIndividual;
}
Program: 10100
Project: 10100
Buggy source:
public void setExamplePositive(boolean pos){
  isPos=pos;
}

Fixed version (ground truth):
/** 
 * This method sets the example positive or negative if changed to the othe list.
 * @param pos boolean
 */
public void setExamplePositive(boolean pos){
  isPos=pos;
}
Program: 10101
Project: 10101
Buggy source:
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);
}

Fixed version (ground truth):
public void run(){
  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;
        }
      }
    }
  }
  view.getSuggestClassPanel().setSuggestList(dm);
}
Program: 10102
Project: 10102
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);
  System.out.println("String_Node_Str");
  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.algorithmTerminated();
  updateList(result);
}
Program: 10103
Project: 10103
Buggy source:
/** 
 * 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);
  }
}

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)) {
    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: 10104
Project: 10104
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(){
      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;
}

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(){
      if (la != null) {
        publish(la.getCurrentlyBestEvaluatedDescriptions(view.getPosAndNegSelectPanel().getOptionPanel().getNrOfConcepts(),view.getPosAndNegSelectPanel().getOptionPanel().getMinAccuracy(),true));
      }
    }
  }
,0,500);
  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: 10105
Project: 10105
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);
      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);
}

Fixed version (ground truth):
private void updateList(final List<EvaluatedDescription> result){
  logger.debug("String_Node_Str" + result);
  Runnable doUpdateList=new Runnable(){
    public void run(){
      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;
            }
          }
        }
      }
      view.getSuggestClassPanel().setSuggestList(dm);
    }
  }
;
  SwingUtilities.invokeLater(doUpdateList);
}
Program: 10106
Project: 10106
Buggy source:
/** 
 * This method starts the learning process.
 */
public void run(){
  error="String_Node_Str";
  String message="String_Node_Str";
  la.start();
  view.renderErrorMessage(error);
  view.setHintMessage(message);
}

Fixed version (ground truth):
/** 
 * Starts the learning algorithm.
 */
public void run(){
  la.start();
}
Program: 10107
Project: 10107
Buggy source:
public Set<KnowledgeSource> getKnowledgeSources(){
  return sources;
}

Fixed version (ground truth):
/** 
 * This method returns the Knowledgesources currenty used. 
 * @return Set<KnowledgSource>
 */
public Set<KnowledgeSource> getKnowledgeSources(){
  return sources;
}
Program: 10108
Project: 10108
Buggy source:
/** 
 * This method sets the reasoner and the reasoning service Only OWLAPIReasoner is available.
 */
public void setReasoner(){
  this.reasoner=cm.reasoner(OWLAPIReasoner.class,sources);
  try {
    reasoner.init();
  }
 catch (  ComponentInitException e) {
    System.out.println("String_Node_Str");
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * This method sets the reasoner. Only FastInstanceChecker is available.
 */
public void setReasoner(){
  this.reasoner=cm.reasoner(FastInstanceChecker.class,sources);
  try {
    reasoner.init();
  }
 catch (  ComponentInitException e) {
    System.out.println("String_Node_Str");
    e.printStackTrace();
  }
}
Program: 10109
Project: 10109
Buggy source:
public OWLEditorKit getOWLEditorKit(){
  return editor;
}

Fixed version (ground truth):
/** 
 * This method returns the OWLEditorKit.
 * @return OWLEditorKit
 */
public OWLEditorKit getOWLEditorKit(){
  return editor;
}
Program: 10110
Project: 10110
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("String_Node_Str")) {
    axiomOWLAPI=factory.getOWLEquivalentClassesAxiom(ds);
  }
 else {
    axiomOWLAPI=factory.getOWLSubClassAxiom(newConceptOWLAPI,oldConceptOWLAPI);
  }
  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){
  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();
  }
}