nus-yam/ex-repair huggingface dataset:
Program: 10111
Project: 10111
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,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();
  }
}

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(EQUIVALENT_CLASS_AXIOM_STRING)) {
    lp=cm.learningProblem(PosNegDefinitionLP.class,reasoner);
  }
  if (id.equals(SUPER_CLASS_AXIOM_STRING)) {
    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: 10112
Project: 10112
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();
  }
  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;
}

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",5);
  cm.applyConfigEntry(la,"String_Node_Str",false);
  cm.applyConfigEntry(la,"String_Node_Str",2);
  cm.applyConfigEntry(la,"String_Node_Str",view.getPosAndNegSelectPanel().getOptionPanel().getMaxExecutionTime());
  try {
    la.init();
  }
 catch (  ComponentInitException e) {
    e.printStackTrace();
  }
  alreadyLearned=true;
}
Program: 10113
Project: 10113
Buggy source:
/** 
 * This Method checks if the selected class has any individuals.
 * @param owlConcept OWLClass
 * @return boolean hasIndividuals
 */
public boolean hasIndividuals(){
  return hasIndividuals;
}

Fixed version (ground truth):
/** 
 * This Method checks if the selected class has any individuals.
 * @return boolean hasIndividuals
 */
public boolean hasIndividuals(){
  return hasIndividuals;
}
Program: 10114
Project: 10114
Buggy source:
/** 
 * Constructor for the IndividualObject.
 * @param normal String
 * @param manchester String
 * @param pos boolean
 */
public IndividualObject(String normal,boolean pos){
  normalIndividual=normal;
  isPos=pos;
}

Fixed version (ground truth):
/** 
 * Constructor for the IndividualObject.
 * @param normal String
 * @param pos boolean
 */
public IndividualObject(String normal,boolean pos){
  normalIndividual=normal;
  isPos=pos;
}
Program: 10116
Project: 10116
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.getConcepts(indi2);
        for (Iterator<NamedClass> k=concept.iterator(); k.hasNext(); ) {
          OWLDescription oldOWLAPI=OWLAPIDescriptionConvertVisitor.getOWLDescription(k.next());
          ds.add(oldOWLAPI);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * 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.getConcepts(indi2);
        for (Iterator<NamedClass> k=concept.iterator(); k.hasNext(); ) {
          OWLDescription oldOWLAPI=OWLAPIDescriptionConvertVisitor.getOWLDescription(k.next());
          oldConceptOWLAPI=oldOWLAPI;
          ds.add(oldOWLAPI);
        }
      }
    }
  }
}
Program: 10117
Project: 10117
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);
  setOldConceptOWLAPI();
  OWLOntologyManager manager=OWLManager.createOWLOntologyManager();
  OWLDataFactory factory=manager.getOWLDataFactory();
  if (id.equals("String_Node_Str")) {
    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){
  setNewConceptOWLAPI(descript);
  setOldConceptOWLAPI();
  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();
  }
}
Program: 10118
Project: 10118
Buggy source:
/** 
 * This method adds the solutions from the DL-Learner to the List Model.
 */
private void addToListModel(){
  evalDescriptions=la.getCurrentlyBestEvaluatedDescriptions(view.getPosAndNegSelectPanel().getMaxNrOfResultsModelData(),view.getPosAndNegSelectPanel().getMinAccuracyModelData(),true);
  for (int j=0; j < evalDescriptions.size(); j++) {
    System.out.println("String_Node_Str" + evalDescriptions.get(j).getNotCoveredPositives());
    if (isConsistent(evalDescriptions.get(j))) {
      suggestModel.add(j,new SuggestListItem(Color.GREEN,evalDescriptions.get(j).getDescription().toManchesterSyntaxString(editor.getModelManager().getActiveOntology().getURI().toString() + "String_Node_Str",null)));
    }
 else {
      suggestModel.add(j,new SuggestListItem(Color.RED,evalDescriptions.get(j).getDescription().toManchesterSyntaxString(editor.getModelManager().getActiveOntology().getURI().toString() + "String_Node_Str",null)));
    }
  }
}

Fixed version (ground truth):
/** 
 * This method adds the solutions from the DL-Learner to the List Model.
 */
private void addToListModel(){
  evalDescriptions=la.getCurrentlyBestEvaluatedDescriptions(view.getPosAndNegSelectPanel().getMaxNrOfResultsModelData(),view.getPosAndNegSelectPanel().getMinAccuracyModelData(),true);
  for (int j=0; j < evalDescriptions.size(); j++) {
    if (isConsistent(evalDescriptions.get(j))) {
      suggestModel.add(j,new SuggestListItem(Color.GREEN,evalDescriptions.get(j).getDescription().toManchesterSyntaxString(editor.getModelManager().getActiveOntology().getURI().toString() + "String_Node_Str",null)));
    }
 else {
      suggestModel.add(j,new SuggestListItem(Color.RED,evalDescriptions.get(j).getDescription().toManchesterSyntaxString(editor.getModelManager().getActiveOntology().getURI().toString() + "String_Node_Str",null)));
    }
  }
}
Program: 10121
Project: 10121
Buggy source:
@Override protected void clear(){
}

Fixed version (ground truth):
@Override protected void clear(){
  added.clear();
}
Program: 10122
Project: 10122
Buggy source:
@Override public void initialiseClassView() throws Exception {
  list=new OWLFrameList2<OWLClass>(getOWLEditorKit(),new ButtonList(getOWLEditorKit()));
  setLayout(new BorderLayout());
  JScrollPane hallo=new JScrollPane(list);
  add(hallo);
}

Fixed version (ground truth):
@Override public void initialiseClassView() throws Exception {
  list=new OWLFrameList2<OWLClass>(getOWLEditorKit(),new ButtonList(getOWLEditorKit()));
  setLayout(new BorderLayout());
  JScrollPane dlLearner=new JScrollPane(list);
  add(dlLearner);
}
Program: 10123
Project: 10123
Buggy source:
/** 
 * Queries one of the standard endpoints defined in DL-Learner.
 * @param predefinedEndpoint A string describing the endpoint e.g. DBpedia.
 * @param query The SPARQL query.
 * @param useCache Specify whether to use a cache for queries.
 * @return The result of the SPARQL query in JSON format or null if the endpoint does not exist.
 * @see SPARQLEndpoint#getEndpointByName;
 */
public String sparqlQueryPredefinedEndpoint(String predefinedEndpoint,String query,boolean useCache){
  SparqlEndpoint endpoint=SparqlEndpoint.getEndpointByName(predefinedEndpoint);
  SPARQLTasks st;
  if (useCache) {
    st=new SPARQLTasks(endpoint);
  }
 else {
    st=new SPARQLTasks(Cache.getDefaultCache(),endpoint);
  }
  return st.query(query);
}

Fixed version (ground truth):
/** 
 * Queries one of the standard endpoints defined in DL-Learner.
 * @param predefinedEndpoint A string describing the endpoint e.g. DBpedia.
 * @param query The SPARQL query.
 * @param useCache Specify whether to use a cache for queries.
 * @return The result of the SPARQL query in JSON format or null if the endpoint does not exist.
 * @see SPARQLEndpoint#getEndpointByName;
 */
@WebMethod public String sparqlQueryPredefinedEndpoint(String predefinedEndpoint,String query,boolean useCache){
  SparqlEndpoint endpoint=SparqlEndpoint.getEndpointByName(predefinedEndpoint);
  SPARQLTasks st;
  if (useCache) {
    st=new SPARQLTasks(endpoint);
  }
 else {
    st=new SPARQLTasks(Cache.getDefaultCache(),endpoint);
  }
  return st.query(query);
}
Program: 10124
Project: 10124
Buggy source:
/** 
 * Sets the ADD button enable after a concept is chosen.
 * @param m MouseEvent
 */
public void mousePressed(MouseEvent m){
  if (!view.getAddButton().isEnabled()) {
    view.getAddButton().setEnabled(true);
  }
}

Fixed version (ground truth):
/** 
 * Sets the ADD button enable after a concept is chosen.
 * @param m MouseEvent
 */
public void mousePressed(MouseEvent m){
  if (view.getSuggestClassPanel().getSuggestList().getSelectedValue() != null) {
    if (!view.getAddButton().isEnabled()) {
      view.getAddButton().setEnabled(true);
    }
  }
}
Program: 10125
Project: 10125
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;
  SuggestListItem item=(SuggestListItem)view.getSuggestClassPanel().getSuggestList().getSelectedValue();
  String desc=item.getValue();
  if (model.getEvaluatedDescriptionList() != null) {
    for (Iterator<EvaluatedDescription> i=model.getEvaluatedDescriptionList().iterator(); i.hasNext(); ) {
      eDescription=i.next();
      if (desc.equals(eDescription.getDescription().toManchesterSyntaxString(editorKit.getModelManager().getActiveOntology().getURI() + "String_Node_Str",null))) {
        evaluatedDescription=eDescription;
        break;
      }
    }
  }
  if (m.getClickCount() == 2) {
    view.getMoreDetailForSuggestedConceptsPanel().renderDetailPanel(evaluatedDescription);
  }
}

Fixed version (ground truth):
/** 
 * Choses the right EvaluatedDescription object after a concept is chosen in the list.
 * @param m MouseEvent
 */
public void mouseClicked(MouseEvent m){
  EvaluatedDescription eDescription=null;
  if (view.getSuggestClassPanel().getSuggestList().getSelectedValue() != null) {
    SuggestListItem item=(SuggestListItem)view.getSuggestClassPanel().getSuggestList().getSelectedValue();
    String desc=item.getValue();
    if (model.getEvaluatedDescriptionList() != null) {
      for (Iterator<EvaluatedDescription> i=model.getEvaluatedDescriptionList().iterator(); i.hasNext(); ) {
        eDescription=i.next();
        if (desc.equals(eDescription.getDescription().toManchesterSyntaxString(editorKit.getModelManager().getActiveOntology().getURI() + "String_Node_Str",null))) {
          evaluatedDescription=eDescription;
          break;
        }
      }
    }
    if (m.getClickCount() == 2) {
      view.getMoreDetailForSuggestedConceptsPanel().renderDetailPanel(evaluatedDescription);
    }
  }
 else {
    String message="String_Node_Str";
    view.renderErrorMessage(message);
  }
}
Program: 10126
Project: 10126
Buggy source:
/** 
 * This Method updates the the view of protege after adding a new concept.
 */
public void updateWindow(){
  mainWindow.getHandler().handleEditingFinished(mainWindow.getEditedObjects());
}

Fixed version (ground truth):
/** 
 * This Method updates the the view of protege after adding a new concept.
 */
public void updateWindow(){
  mainWindow.getHandler().handleEditingFinished(mainWindow.getEditedObjects());
  mainWindow.dispose();
}
Program: 10127
Project: 10127
Buggy source:
public void makeNegativeExamplesFromNearbyClasses(SortedSet<String> positiveSet,int sparqlResultLimit){
  SortedSet<String> classes=new TreeSet<String>();
  Iterator<String> instanceIter=positiveSet.iterator();
  while (classes.isEmpty() && instanceIter.hasNext()) {
    classes.addAll(sparqltasks.getClassesForInstance(instanceIter.next(),100));
  }
  String concept=classes.first();
  if (filterClasses != null && filterClasses.size() > 0) {
    boolean br=false;
    for (    String oneClass : classes) {
      Iterator<String> iter=filterClasses.iterator();
      while (iter.hasNext()) {
        if (!oneClass.startsWith(iter.next())) {
          concept=oneClass;
          br=true;
          break;
        }
      }
      if (br)       break;
    }
  }
  concept=concept.replaceAll("String_Node_Str","String_Node_Str");
  SortedSet<String> superClasses=sparqltasks.getSuperClasses(concept,1);
  classes=new TreeSet<String>();
  for (  String oneSuperClass : superClasses) {
    classes.addAll(sparqltasks.getSubClasses(oneSuperClass,1));
  }
  classes.remove(concept);
  for (  String oneClass : classes) {
    fromNearbyClasses.addAll(sparqltasks.retrieveInstancesForClassDescription("String_Node_Str" + oneClass + "String_Node_Str",sparqlResultLimit));
  }
  this.fromNearbyClasses.removeAll(fullPositiveSet);
}

Fixed version (ground truth):
public void makeNegativeExamplesFromNearbyClasses(SortedSet<String> positiveSet,int sparqlResultLimit){
  SortedSet<String> classes=new TreeSet<String>();
  Iterator<String> instanceIter=positiveSet.iterator();
  while (classes.isEmpty() && instanceIter.hasNext()) {
    classes.addAll(sparqltasks.getClassesForInstance(instanceIter.next(),100));
  }
  String concept=classes.first();
  if (filterClasses != null && filterClasses.size() > 0) {
    boolean br=false;
    for (    String oneClass : classes) {
      Iterator<String> iter=filterClasses.iterator();
      while (iter.hasNext()) {
        if (oneClass.startsWith(iter.next())) {
          break;
        }
 else {
          concept=oneClass;
          br=true;
          break;
        }
      }
      if (br)       break;
    }
  }
  concept=concept.replaceAll("String_Node_Str","String_Node_Str");
  SortedSet<String> superClasses=sparqltasks.getSuperClasses(concept,1);
  classes=new TreeSet<String>();
  for (  String oneSuperClass : superClasses) {
    classes.addAll(sparqltasks.getSubClasses(oneSuperClass,1));
  }
  classes.remove(concept);
  for (  String oneClass : classes) {
    try {
      fromNearbyClasses.addAll(sparqltasks.retrieveInstancesForClassDescription("String_Node_Str" + oneClass + "String_Node_Str",sparqlResultLimit));
    }
 catch (    Exception e) {
    }
  }
  this.fromNearbyClasses.removeAll(fullPositiveSet);
}
Program: 10128
Project: 10128
Buggy source:
public static void main(String[] args) throws ClassNotFoundException, SQLException, BackingStoreException {
  CalculatePageRank cal=new CalculatePageRank();
  cal.calculateCategoriesNewOntology();
}

Fixed version (ground truth):
public static void main(String[] args) throws ClassNotFoundException, SQLException, BackingStoreException {
  CalculatePageRank cal=new CalculatePageRank();
  Class.forName("String_Node_Str");
  String url="String_Node_Str" + dbServer + "String_Node_Str"+ dbName;
  con=DriverManager.getConnection(url,dbUser,dbPass);
  cal.calculateCategoriesNewOntology();
  con.close();
}
Program: 10133
Project: 10133
Buggy source:
public static void main(String[] args) throws ClassNotFoundException, SQLException, BackingStoreException {
  CalculatePageRank cal=new CalculatePageRank();
  Class.forName("String_Node_Str");
  String url="String_Node_Str" + dbServer + "String_Node_Str"+ dbName;
  con=DriverManager.getConnection(url,dbUser,dbPass);
  cal.calculateCategoriesNewOntology();
  cal.copyNumbers();
  con.close();
}

Fixed version (ground truth):
public static void main(String[] args) throws ClassNotFoundException, SQLException, BackingStoreException {
  CalculatePageRank cal=new CalculatePageRank();
  cal.calculateCategoriesNewOntology();
}
Program: 10134
Project: 10134
Buggy source:
protected void updateSimulation(Set<ELDescriptionNode> nUpdate){
  Stack<ELDescriptionNode> stack=new Stack<ELDescriptionNode>();
  stack.addAll(nUpdate);
  while (stack.size() != 0) {
    ELDescriptionNode v=stack.peek();
    for (    ELDescriptionNode w : levelNodeMapping.get(v.getLevel())) {
      if (!v.out.contains(w) && v.outSC1.contains(w) && checkSC2(v,w)) {
        extendSimulation(v,w);
        stack.add(v.getParent());
        stack.add(w.getParent());
      }
      if (!w.out.contains(v) && w.outSC1.contains(v) && checkSC2(w,v)) {
        extendSimulation(w,v);
        stack.add(v.getParent());
        stack.add(w.getParent());
      }
    }
  }
}

Fixed version (ground truth):
protected void updateSimulation(Set<ELDescriptionNode> nUpdate){
  LinkedList<ELDescriptionNode> list=new LinkedList<ELDescriptionNode>();
  list.addAll(nUpdate);
  while (list.size() != 0) {
    ELDescriptionNode v=list.pollFirst();
    for (    ELDescriptionNode w : levelNodeMapping.get(v.getLevel())) {
      if (!v.out.contains(w) && v.outSC1.contains(w) && checkSC2(v,w)) {
        extendSimulation(v,w);
        list.add(v.getParent());
        list.add(w.getParent());
      }
      if (!w.out.contains(v) && w.outSC1.contains(v) && checkSC2(w,v)) {
        extendSimulation(w,v);
        list.add(v.getParent());
        list.add(w.getParent());
      }
    }
  }
}
Program: 10135
Project: 10135
Buggy source:
@Test public void simulationTest(){
  Simulation s=new Simulation();
  ELDescriptionTree tree1=null;
  ELDescriptionTree tree2=null;
  ELDescriptionNode t1=new ELDescriptionNode(tree1);
  ELDescriptionNode t2=new ELDescriptionNode(tree2);
  TreeTuple tuple1=new TreeTuple(t1,t2);
  s.addTuple(tuple1);
  assertTrue(s.in(t2).size() == 1);
  ObjectProperty p=new ObjectProperty("String_Node_Str");
  TreeSet<NamedClass> l3=new TreeSet<NamedClass>();
  ELDescriptionNode t3=new ELDescriptionNode(t1,p,l3);
  assertTrue(t3.getLevel() == 2);
  assertTrue(tree1.getMaxLevel() == 2);
}

Fixed version (ground truth):
@Test public void simulationTest(){
  ReasoningService rs=TestOntologies.getTestOntology(TestOntology.EMPTY);
  Simulation s=new Simulation();
  ELDescriptionTree tree1=new ELDescriptionTree(rs);
  ELDescriptionTree tree2=new ELDescriptionTree(rs);
  ELDescriptionNode t1=new ELDescriptionNode(tree1);
  ELDescriptionNode t2=new ELDescriptionNode(tree2);
  TreeTuple tuple1=new TreeTuple(t1,t2);
  s.addTuple(tuple1);
  assertTrue(s.in(t2).size() == 1);
  ObjectProperty p=new ObjectProperty("String_Node_Str");
  TreeSet<NamedClass> l3=new TreeSet<NamedClass>();
  ELDescriptionNode t3=new ELDescriptionNode(t1,p,l3);
  assertTrue(t3.getLevel() == 2);
  assertTrue(tree1.getMaxLevel() == 2);
}
Program: 10136
Project: 10136
Buggy source:
@Test public void cloneTest() throws ParseException {
  Description d=KBParser.parseConcept("String_Node_Str");
  ConceptTransformation.cleanConcept(d);
  ELDescriptionTree tree=null;
  ELDescriptionTree treeCloned=tree.clone();
  ELDescriptionTreeComparator comparator=new ELDescriptionTreeComparator();
  assertTrue(comparator.compare(tree,treeCloned) == 0);
}

Fixed version (ground truth):
@Test public void cloneTest() throws ParseException {
  ReasoningService rs=TestOntologies.getTestOntology(TestOntology.EMPTY);
  Description d=KBParser.parseConcept("String_Node_Str");
  ConceptTransformation.cleanConcept(d);
  ELDescriptionTree tree=new ELDescriptionTree(rs,d);
  ELDescriptionTree treeCloned=tree.clone();
  ELDescriptionTreeComparator comparator=new ELDescriptionTreeComparator();
  assertTrue(comparator.compare(tree,treeCloned) == 0);
}
Program: 10140
Project: 10140
Buggy source:
@Override public void toOWLOntology(OWLAPIOntologyCollector owlAPIOntologyCollector){
}

Fixed version (ground truth):
@Override public void toOWLOntology(OWLAPIOntologyCollector owlAPIOntologyCollector){
  logger.error("String_Node_Str");
}
Program: 10142
Project: 10142
Buggy source:
/** 
 * @param args
 */
public static void main(String[] args){
  SimpleClock total=new SimpleClock();
  initLogger();
  logger.warn("String_Node_Str");
  prepareTable();
  List<String> l=getFiles();
  analyzeFiles(l);
  if (onJensMachine) {
    conductExperiment(Experiments.NORMAL_10s);
    conductExperiment(Experiments.NORMAL_100s);
    conductExperiment(Experiments.NORMAL_1000_CTESTS);
    conductExperiment(Experiments.NORMAL_10000_CTESTS);
  }
 else {
    conductExperiment(Experiments.SPARQL_10000_CTESTS_SPECIAL_REC2_NOPROP);
    conductExperiment(Experiments.SPARQL_10000_CTESTS_SPECIAL_REC2_NOCLOSEAFTERRECURSION);
    conductExperiment(Experiments.SPARQL_10000_CTESTS_SPECIAL_REC1);
    conductExperiment(Experiments.SPARQL_10000_CTESTS_SPECIAL_REC3);
    conductExperiment(Experiments.NORMAL_10000_CTESTS_FASTINST);
  }
  logger.warn(total.getAndSet("String_Node_Str"));
  if (flawInExperiment) {
    logger.error("String_Node_Str");
  }
 else {
    logger.warn("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args){
  SimpleClock total=new SimpleClock();
  initLogger();
  logger.warn("String_Node_Str");
  prepareTable();
  List<String> l=getFiles();
  analyzeFiles(l);
  if (onJensMachine) {
    conductExperiment(Experiments.NORMAL_10s);
    conductExperiment(Experiments.NORMAL_100s);
    conductExperiment(Experiments.NORMAL_1000_CTESTS);
    conductExperiment(Experiments.NORMAL_10000_CTESTS);
  }
 else {
    conductExperiment(Experiments.NORMAL_10000_CTESTS_FASTINST);
  }
  logger.warn(total.getAndSet("String_Node_Str"));
  if (flawInExperiment) {
    logger.error("String_Node_Str");
  }
 else {
    logger.warn("String_Node_Str");
  }
}
Program: 10143
Project: 10143
Buggy source:
public static void fillTable(Experiments exp,int count){
  String[] columnString=new String[]{count + "String_Node_Str",StringFormatter.convertStatPercentageToLatex(accFragment,1,false,true),StringFormatter.convertStatPercentageToLatex(accOnOnto,1,false,true),StringFormatter.convertStatPercentageToLatex(accPosExOnOnto,1,false,true),StringFormatter.convertStatPercentageToLatex(accNegExOnOnto,1,false,true),StringFormatter.convertStatDoubleToLatex(ksinitializationTime,1,"String_Node_Str","String_Node_Str",true),StringFormatter.convertStatDoubleToLatex(reasonerInitializationTime,1,"String_Node_Str","String_Node_Str",true),StringFormatter.convertStatDoubleToLatex(learningTime,1,"String_Node_Str","String_Node_Str",true),StringFormatter.convertStatDoubleToLatex(nrOfExtractedAxioms,0,"String_Node_Str","String_Node_Str",true),StringFormatter.convertStatDoubleToLatex(descLength,1,"String_Node_Str","String_Node_Str",true),StringFormatter.convertStatDoubleToLatex(descDepth,1,"String_Node_Str","String_Node_Str",true)};
  t.removeColumn(exp.toString());
  t.addColumn(new TableColumn(exp.toString(),columnString));
  Table.serializeColumns(t,tableDir,tableFile + exp + count);
  Files.createFile(new File(tableLatex),t.getLatexString());
}

Fixed version (ground truth):
public static void fillTable(Experiments exp,int count){
  String[] columnString=new String[]{count + "String_Node_Str",StringFormatter.convertStatPercentageToLatex(accFragment,1,false,true),StringFormatter.convertStatPercentageToLatex(accOnOnto,1,false,true),StringFormatter.convertStatPercentageToLatex(accPosExOnOnto,1,false,true),StringFormatter.convertStatPercentageToLatex(accNegExOnOnto,1,false,true),StringFormatter.convertStatDoubleToLatex(ksinitializationTime,1,"String_Node_Str","String_Node_Str",true),StringFormatter.convertStatDoubleToLatex(reasonerInitializationTime,1,"String_Node_Str","String_Node_Str",true),StringFormatter.convertStatDoubleToLatex(learningTime,1,"String_Node_Str","String_Node_Str",true),StringFormatter.convertStatDoubleToLatex(nrOfExtractedAxioms,0,"String_Node_Str","String_Node_Str",true),StringFormatter.convertStatDoubleToLatex(descLength,1,"String_Node_Str","String_Node_Str",true),StringFormatter.convertStatDoubleToLatex(descDepth,1,"String_Node_Str","String_Node_Str",true)};
  t.removeColumn(exp.toString());
  t.addColumn(new TableColumn(exp.toString(),columnString));
  String expId=exp.toString() + count;
  Table.serializeColumns(t,tableDir + expId,tableDir + expId + File.separator+ "String_Node_Str");
  Files.createFile(new File(tableDir + expId + File.separator+ "String_Node_Str"),t.getLatexString());
}
Program: 10144
Project: 10144
Buggy source:
public static void prepareTable(){
  t=new Table("String_Node_Str");
  String[] labString=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  TableColumn labels=new TableColumn("String_Node_Str",labString);
  t.addColumn(labels);
  Table.serializeColumns(t,tableDir,tableFile);
  Files.createFile(new File(tableLatex),t.getLatexString());
}

Fixed version (ground truth):
public static void prepareTable(){
  t=new Table("String_Node_Str");
  String[] labString=new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  TableColumn labels=new TableColumn("String_Node_Str",labString);
  t.addColumn(labels);
  Files.mkdir(tableDir);
}
Program: 10145
Project: 10145
Buggy source:
public static void serializeColumns(Table t,String dir,String tableFile){
  String column="String_Node_Str";
  String content="String_Node_Str";
  dir=StringFormatter.checkIfDirEndsOnSlashAndRemove(dir);
  Files.mkdir(dir);
  String div=(System.currentTimeMillis() % 10000) + "String_Node_Str";
  try {
    int i=0;
    for (    TableColumn c : t.getColumns()) {
      String header=URLEncoder.encode(c.getHeader(),"String_Node_Str");
      String columnFileName=dir + File.separator + t.getTableName()+ (i++)+ header+ div+ column;
      c.serialize(new File(columnFileName));
      content+=columnFileName + System.getProperty("String_Node_Str");
    }
    Files.createFile(new File(tableFile),content);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void serializeColumns(Table t,String dir,String tableFile){
  String column="String_Node_Str";
  String content="String_Node_Str";
  dir=StringFormatter.checkIfDirEndsOnSlashAndRemove(dir);
  Files.mkdir(dir);
  try {
    int i=0;
    for (    TableColumn c : t.getColumns()) {
      String header=URLEncoder.encode(c.getHeader(),"String_Node_Str");
      String columnFileName=dir + File.separator + t.getTableName()+ (i++)+ header+ column;
      c.serialize(new File(columnFileName));
      content+=columnFileName + System.getProperty("String_Node_Str");
    }
    Files.createFile(new File(tableFile),content);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 10146
Project: 10146
Buggy source:
public static String getNaturalLanguageDescription(String descriptionKBSyntax) throws ParseException {
  System.out.println(descriptionKBSyntax);
  Description d=KBParser.parseConcept(descriptionKBSyntax);
  NaturalLanguageDescriptionConvertVisitor visitor=new NaturalLanguageDescriptionConvertVisitor();
  d.accept(visitor);
  String ret=visitor.getDescription();
  return ret;
}

Fixed version (ground truth):
public static String getNaturalLanguageDescription(String descriptionKBSyntax) throws ParseException {
  Description d=KBParser.parseConcept(descriptionKBSyntax);
  NaturalLanguageDescriptionConvertVisitor visitor=new NaturalLanguageDescriptionConvertVisitor();
  d.accept(visitor);
  String ret=visitor.getDescription();
  return ret;
}
Program: 10150
Project: 10150
Buggy source:
public static Manipulator getDBpediaNavigatorManipulator(){
  Manipulator m=new Manipulator();
  m.addRule(new DBPediaNavigatorCityLocatorRule(Months.JANUARY));
  m.addRule(new DBpediaNavigatorOtherRule(Months.DECEMBER));
  return m;
}

Fixed version (ground truth):
public static Manipulator getDBpediaNavigatorManipulator(){
  Manipulator m=new Manipulator();
  m.addRule(new DBpediaNavigatorFilterRule(Months.JANUARY));
  return m;
}
Program: 10151
Project: 10151
Buggy source:
public Manipulator getManipulator(){
  if (configurator.getPredefinedManipulator() == null) {
    return Manipulator.getManipulatorByName(configurator.getPredefinedManipulator());
  }
 else {
    Manipulator m=Manipulator.getDefaultManipulator();
    for (    StringTuple st : configurator.getReplacePredicate()) {
      m.addRule(new PredicateReplacementRule(Months.MAY,st.a,st.b));
    }
    for (    StringTuple st : configurator.getReplaceObject()) {
      m.addRule(new ObjectReplacementRule(Months.MAY,st.a,st.b));
    }
    return m;
  }
}

Fixed version (ground truth):
public Manipulator getManipulator(){
  if (configurator.getPredefinedManipulator() != null) {
    return Manipulator.getManipulatorByName(configurator.getPredefinedManipulator());
  }
 else {
    Manipulator m=Manipulator.getDefaultManipulator();
    for (    StringTuple st : configurator.getReplacePredicate()) {
      m.addRule(new PredicateReplacementRule(Months.MAY,st.a,st.b));
    }
    for (    StringTuple st : configurator.getReplaceObject()) {
      m.addRule(new ObjectReplacementRule(Months.MAY,st.a,st.b));
    }
    return m;
  }
}
Program: 10152
Project: 10152
Buggy source:
@WebMethod public String getCurrentlyBestEvaluatedDescriptions(int id,int limit) throws ClientNotKnownException {
  ClientState state=getState(id);
  List<EvaluatedDescription> descriptions=state.getLearningAlgorithm().getCurrentlyBestEvaluatedDescriptions(limit);
  String json="String_Node_Str";
  int count=1;
  for (  EvaluatedDescription description : descriptions) {
    json+="String_Node_Str" + count + "String_Node_Str"+ description.asJSON();
    count++;
  }
  json+="String_Node_Str";
  return json;
}

Fixed version (ground truth):
@WebMethod public String getCurrentlyBestEvaluatedDescriptions(int id,int limit) throws ClientNotKnownException {
  return currentlyBestEvaluatedDescriptions(id,limit,-1,false);
}
Program: 10153
Project: 10153
Buggy source:
public static String getSparqlQuery(Description description,int resultLimit){
  SparqlQueryDescriptionConvertVisitor visitor=new SparqlQueryDescriptionConvertVisitor();
  description.accept(visitor);
  String ret=visitor.getSparqlQuery(resultLimit);
  while (ret.contains("String_Node_Str")) {
    ret=ret.replace("String_Node_Str","String_Node_Str");
  }
  return ret;
}

Fixed version (ground truth):
public static String getSparqlQuery(Description description,int resultLimit){
  SparqlQueryDescriptionConvertVisitor visitor=new SparqlQueryDescriptionConvertVisitor();
  description.accept(visitor);
  String ret=visitor.getSparqlQuery(resultLimit);
  return ret;
}
Program: 10155
Project: 10155
Buggy source:
/** 
 * gets java imports
 * @return 
 */
public SortedSet<String> getJavaImports(){
  return new TreeSet<String>();
}

Fixed version (ground truth):
/** 
 * TODO Method should be removed and a mapping table in ConfigJavaGenerator  created instead. gets java imports
 * @return 
 */
public SortedSet<String> getJavaImports(){
  return new TreeSet<String>();
}
Program: 10156
Project: 10156
Buggy source:
public void init(int tabIndex){
  if (tabIndex == 0) {
    InitWorker worker=new InitWorker(source,gui);
    worker.execute();
  }
 else   if (tabIndex == 1) {
    InitWorker worker=new InitWorker(reasoner,gui);
    worker.execute();
  }
 else   if (tabIndex == 2) {
    InitWorker worker=new InitWorker(lp,gui);
    worker.execute();
  }
 else   if (tabIndex == 3) {
    InitWorker worker=new InitWorker(la,gui);
    worker.execute();
  }
  needsInit[tabIndex]=false;
  System.out.println("String_Node_Str" + tabIndex + "String_Node_Str");
}

Fixed version (ground truth):
public void init(List<Integer> tabIndex){
  List<Component> components=new LinkedList<Component>();
  for (  int i : tabIndex) {
switch (i) {
case 0:
      components.add(source);
    needsInit[i]=false;
  break;
case 1:
components.add(reasoner);
needsInit[i]=false;
break;
case 2:
components.add(lp);
needsInit[i]=false;
break;
case 3:
components.add(la);
needsInit[i]=false;
break;
}
}
InitWorker worker=new InitWorker(components,gui);
worker.execute();
if (tabIndex.size() == 1) {
logger.info("String_Node_Str" + tabIndex.get(0) + "String_Node_Str");
}
 else if (tabIndex.size() > 1) {
logger.info("String_Node_Str" + tabIndex + "String_Node_Str");
}
}
Program: 10157
Project: 10157
Buggy source:
public InitWorker(Component component,StartGUI gui){
  this.component=component;
  this.gui=gui;
  List<Class<? extends Component>> nonTimeIntensiveComponents=new LinkedList<Class<? extends Component>>();
  nonTimeIntensiveComponents.add(OWLFile.class);
  nonTimeIntensiveComponents.add(KBFile.class);
  if (nonTimeIntensiveComponents.contains(component.getClass())) {
    timeIntensive=false;
  }
}

Fixed version (ground truth):
public InitWorker(List<Component> components,StartGUI gui){
  this.components=components;
  this.gui=gui;
  List<Class<? extends Component>> nonTimeIntensiveComponents=new LinkedList<Class<? extends Component>>();
  nonTimeIntensiveComponents.add(OWLFile.class);
  nonTimeIntensiveComponents.add(KBFile.class);
  timeIntensive=false;
  for (  Component component : components) {
    if (!nonTimeIntensiveComponents.contains(component.getClass())) {
      timeIntensive=true;
    }
  }
}
Program: 10158
Project: 10158
Buggy source:
@Override protected Boolean doInBackground() throws Exception {
  JFrame waitFrame=null;
  if (timeIntensive) {
    gui.disableTabbedPane();
    gui.setEnabled(false);
    waitFrame=new JFrame();
    waitFrame.setUndecorated(true);
    waitFrame.setSize(160,100);
    waitFrame.getContentPane().setBackground(Color.WHITE);
    URL imgURL=Config.class.getResource("String_Node_Str");
    waitFrame.add(new JLabel("String_Node_Str" + imgURL + "String_Node_Str"));
    waitFrame.setLocationRelativeTo(gui);
    waitFrame.setVisible(true);
  }
  try {
    component.init();
  }
 catch (  ComponentInitException e) {
    gui.getStatusPanel().setExceptionMessage(e.getMessage());
    e.printStackTrace();
  }
  if (timeIntensive) {
    gui.enableTabbedPane();
    gui.setEnabled(true);
    waitFrame.dispose();
  }
  if (component instanceof ReasonerComponent) {
    gui.panels[2].updateOptionPanel();
    gui.panels[3].updateOptionPanel();
  }
  return true;
}

Fixed version (ground truth):
@Override protected Boolean doInBackground() throws Exception {
  JFrame waitFrame=null;
  if (timeIntensive) {
    gui.disableTabbedPane();
    gui.setEnabled(false);
    waitFrame=new JFrame();
    waitFrame.setUndecorated(true);
    waitFrame.setSize(160,100);
    waitFrame.getContentPane().setBackground(Color.WHITE);
    URL imgURL=Config.class.getResource("String_Node_Str");
    waitFrame.add(new JLabel("String_Node_Str" + imgURL + "String_Node_Str"));
    waitFrame.setLocationRelativeTo(gui);
    waitFrame.setVisible(true);
  }
  try {
    for (    Component component : components) {
      component.init();
    }
  }
 catch (  ComponentInitException e) {
    gui.getStatusPanel().setExceptionMessage(e.getMessage());
    e.printStackTrace();
  }
  if (timeIntensive) {
    gui.enableTabbedPane();
    gui.setEnabled(true);
    waitFrame.dispose();
  }
  if (components instanceof ReasonerComponent) {
    gui.panels[2].updateOptionPanel();
    gui.panels[3].updateOptionPanel();
  }
  return true;
}
Program: 10159
Project: 10159
Buggy source:
public static void main(String[] args){
  SimpleLayout layout=new SimpleLayout();
  ConsoleAppender consoleAppender=new ConsoleAppender(layout);
  Logger logger=Logger.getRootLogger();
  logger.removeAllAppenders();
  logger.addAppender(consoleAppender);
  logger.setLevel(Level.DEBUG);
  File file=null;
  if (args.length > 0)   file=new File(args[args.length - 1]);
  try {
    UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
catch (  InstantiationException e) {
    e.printStackTrace();
  }
catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  UnsupportedLookAndFeelException e) {
    e.printStackTrace();
  }
  new StartGUI(file);
}

Fixed version (ground truth):
public static void main(String[] args){
  SimpleLayout layout=new SimpleLayout();
  ConsoleAppender consoleAppender=new ConsoleAppender(layout);
  Logger logger=Logger.getRootLogger();
  logger.removeAllAppenders();
  logger.addAppender(consoleAppender);
  logger.setLevel(Level.TRACE);
  File file=null;
  if (args.length > 0)   file=new File(args[args.length - 1]);
  try {
    UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
catch (  InstantiationException e) {
    e.printStackTrace();
  }
catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  UnsupportedLookAndFeelException e) {
    e.printStackTrace();
  }
  new StartGUI(file);
}
Program: 10160
Project: 10160
Buggy source:
public void stateChanged(ChangeEvent evt){
  if (evt.getSource().equals(tabPane)) {
    int index=tabPane.getSelectedIndex();
    if (index != 0 && config.tabNeedsInit(index - 1)) {
      for (int i=0; i < index; i++) {
        if (config.tabNeedsInit(i)) {
          config.init(i);
        }
      }
    }
    updateTabs();
switch (index) {
case 0:
      panels[0].panelActivated();
    break;
case 1:
  panels[1].panelActivated();
break;
case 2:
panels[2].panelActivated();
break;
case 3:
panels[3].panelActivated();
break;
}
statusPanel.setTabInitMessage();
}
}

Fixed version (ground truth):
public void stateChanged(ChangeEvent evt){
  if (evt.getSource().equals(tabPane)) {
    int index=tabPane.getSelectedIndex();
    List<Integer> componentsToInit=new LinkedList<Integer>();
    if (index != 0 && config.tabNeedsInit(index - 1)) {
      for (int i=0; i < index; i++) {
        if (config.tabNeedsInit(i)) {
          componentsToInit.add(i);
        }
      }
    }
    config.init(componentsToInit);
    updateTabs();
switch (index) {
case 0:
      panels[0].panelActivated();
    break;
case 1:
  panels[1].panelActivated();
break;
case 2:
panels[2].panelActivated();
break;
case 3:
panels[3].panelActivated();
break;
}
statusPanel.setTabInitMessage();
}
}
Program: 10162
Project: 10162
Buggy source:
@Override public void init() throws ComponentInitException {
  try {
    String filename=configurator.getFilename();
    String urlString=configurator.getUrl().toString();
    if (filename != null) {
      url=new File(filename).toURI().toURL();
    }
 else     if (urlString != null) {
      url=new URL(urlString);
    }
    if (url != null) {
      kb=KBParser.parseKBFile(url);
    }
  }
 catch (  MalformedURLException e) {
    logger.error(e.getMessage());
  }
catch (  IOException e) {
    throw new ComponentInitException("String_Node_Str" + url + "String_Node_Str",e);
  }
catch (  ParseException e) {
    throw new ComponentInitException("String_Node_Str" + url + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void init() throws ComponentInitException {
  try {
    kb=KBParser.parseKBFile(configurator.getUrl());
  }
 catch (  MalformedURLException e) {
    logger.error(e.getMessage());
  }
catch (  IOException e) {
    throw new ComponentInitException("String_Node_Str" + configurator.getUrl() + "String_Node_Str",e);
  }
catch (  ParseException e) {
    throw new ComponentInitException("String_Node_Str" + configurator.getUrl() + "String_Node_Str",e);
  }
}
Program: 10163
Project: 10163
Buggy source:
public URL getURL(){
  return url;
}

Fixed version (ground truth):
public URL getURL(){
  return configurator.getUrl();
}
Program: 10164
Project: 10164
Buggy source:
public static Collection<ConfigOption<?>> createConfigOptions(){
  Collection<ConfigOption<?>> options=new LinkedList<ConfigOption<?>>();
  options.add(new StringConfigOption("String_Node_Str","String_Node_Str",null,true,true));
  options.add(new URLConfigOption("String_Node_Str","String_Node_Str",null,false,true));
  return options;
}

Fixed version (ground truth):
public static Collection<ConfigOption<?>> createConfigOptions(){
  Collection<ConfigOption<?>> options=new LinkedList<ConfigOption<?>>();
  URLConfigOption urlOption=new URLConfigOption("String_Node_Str","String_Node_Str",null,false,true);
  urlOption.setRefersToFile(true);
  options.add(urlOption);
  return options;
}
Program: 10165
Project: 10165
Buggy source:
public static Collection<ConfigOption<?>> createConfigOptions(){
  Collection<ConfigOption<?>> options=new LinkedList<ConfigOption<?>>();
  options.add(new URLConfigOption("String_Node_Str","String_Node_Str",null,true,true));
  return options;
}

Fixed version (ground truth):
public static Collection<ConfigOption<?>> createConfigOptions(){
  Collection<ConfigOption<?>> options=new LinkedList<ConfigOption<?>>();
  URLConfigOption urlOption=new URLConfigOption("String_Node_Str","String_Node_Str",null,true,true);
  urlOption.setRefersToFile(true);
  options.add(urlOption);
  return options;
}
Program: 10166
Project: 10166
Buggy source:
public SortedSet<EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions(){
  int count=0;
  SortedSet<ExampleBasedNode> rev=candidatesStable.descendingSet();
  SortedSet<EvaluatedDescription> cbd=new TreeSet<EvaluatedDescription>(edComparator);
  for (  ExampleBasedNode eb : rev) {
    cbd.add(new EvaluatedDescription(eb.getConcept(),getScore(eb.getConcept())));
    if (count > 200)     return cbd;
    count++;
  }
  return cbd;
}

Fixed version (ground truth):
public SortedSet<EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions(){
  Iterator<ExampleBasedNode> it=candidatesStable.descendingIterator();
  int count=0;
  SortedSet<EvaluatedDescription> cbd=new TreeSet<EvaluatedDescription>(edComparator);
  while (it.hasNext()) {
    ExampleBasedNode eb=it.next();
    cbd.add(new EvaluatedDescription(eb.getConcept(),getScore(eb.getConcept())));
    if (count > 200)     return cbd;
    count++;
  }
  return cbd;
}
Program: 10168
Project: 10168
Buggy source:
public static void main(String[] args){
  SimpleLayout layout=new SimpleLayout();
  ConsoleAppender consoleAppender=new ConsoleAppender(layout);
  Logger logger=Logger.getRootLogger();
  logger.removeAllAppenders();
  logger.addAppender(consoleAppender);
  logger.setLevel(Level.TRACE);
  File file=null;
  if (args.length > 0)   file=new File(args[args.length - 1]);
  try {
    UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
catch (  InstantiationException e) {
    e.printStackTrace();
  }
catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  UnsupportedLookAndFeelException e) {
    e.printStackTrace();
  }
  new StartGUI(file);
}

Fixed version (ground truth):
public static void main(String[] args){
  SimpleLayout layout=new SimpleLayout();
  ConsoleAppender consoleAppender=new ConsoleAppender(layout);
  Logger logger=Logger.getRootLogger();
  logger.removeAllAppenders();
  logger.addAppender(consoleAppender);
  logger.setLevel(Level.DEBUG);
  File file=null;
  if (args.length > 0)   file=new File(args[args.length - 1]);
  try {
    UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
catch (  InstantiationException e) {
    e.printStackTrace();
  }
catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  UnsupportedLookAndFeelException e) {
    e.printStackTrace();
  }
  new StartGUI(file);
}
Program: 10169
Project: 10169
Buggy source:
public void fireValueChanged(T value){
}

Fixed version (ground truth):
public void fireValueChanged(T value){
  ConfigEntry<T> entry=null;
  try {
    entry=new ConfigEntry<T>(configOption,value);
  }
 catch (  InvalidConfigOptionValueException e) {
    e.printStackTrace();
  }
  config.applyConfigEntry(component,entry);
}
Program: 10170
Project: 10170
Buggy source:
public <T>void applyConfigEntry(Component component,ConfigEntry<T> entry){
  cm.applyConfigEntry(component,entry);
}

Fixed version (ground truth):
public <T>void applyConfigEntry(Component component,ConfigEntry<T> entry){
  cm.applyConfigEntry(component,entry);
  if (component instanceof KnowledgeSource) {
    needsInit[0]=true;
    needsInit[1]=true;
    needsInit[2]=true;
    needsInit[3]=true;
  }
 else   if (component instanceof ReasonerComponent) {
    needsInit[1]=true;
    needsInit[2]=true;
    needsInit[3]=true;
  }
 else   if (component instanceof LearningProblem) {
    needsInit[2]=true;
    needsInit[3]=true;
  }
 else   if (component instanceof LearningAlgorithm) {
    needsInit[3]=true;
  }
  gui.updateTabColors();
}
Program: 10171
Project: 10171
Buggy source:
/** 
 * It is necessary for init KnowledgeSource.
 * @return true, if url was set otherwise false
 */
public Boolean isSetURL(){
  if (cm.getConfigOptionValue(source,"String_Node_Str") != null || cm.getConfigOptionValue(source,"String_Node_Str") != null)   return true;
 else   return false;
}

Fixed version (ground truth):
/** 
 * It is necessary for init KnowledgeSource.
 * @return true, if url was set otherwise false
 */
public boolean isSetURL(){
  if (cm.getConfigOptionValue(source,"String_Node_Str") != null || cm.getConfigOptionValue(source,"String_Node_Str") != null)   return true;
 else   return false;
}
Program: 10172
Project: 10172
Buggy source:
/** 
 * Get KnowledgeSource.
 * @return KnowledgeSource
 */
public KnowledgeSource getKnowledgeSource(){
  return this.source;
}

Fixed version (ground truth):
/** 
 * Get KnowledgeSource.
 * @return KnowledgeSource
 */
public KnowledgeSource getKnowledgeSource(){
  return source;
}
Program: 10173
Project: 10173
Buggy source:
public void reInit(){
  cm=ComponentManager.getInstance();
  source=null;
  reasoner=null;
  rs=null;
  lp=null;
  la=null;
  isInit=new boolean[4];
  threadIsRunning=false;
  algorithmRunStartTime=null;
  algorithmRunStopTime=null;
}

Fixed version (ground truth):
public void reInit(){
  cm=ComponentManager.getInstance();
  source=null;
  reasoner=null;
  rs=null;
  lp=null;
  la=null;
  needsInit=new boolean[4];
  threadIsRunning=false;
  algorithmRunStartTime=null;
  algorithmRunStopTime=null;
}