nus-yam/ex-repair huggingface dataset:
Program: 9802
Project: 9802
Buggy source:
@Override public void buildWidgetPanel(){
  add(getLabel());
  value=config.getConfigOptionValue(component,configOption);
  if (((URLConfigOption)configOption).refersToOWLClass()) {
    comboBox=new JComboBox();
    ReasonerComponent reasoner=config.getReasoner();
    String baseURI=reasoner.getBaseURI();
    Map<String,String> prefixes=reasoner.getPrefixes();
    classes=new LinkedList<NamedClass>(reasoner.getNamedClasses());
    for (    NamedClass clazz : classes) {
      comboBox.addItem(clazz.toManchesterSyntaxString(baseURI,prefixes));
    }
    comboBox.addActionListener(this);
    NamedClass valueNc=new NamedClass(value.toString());
    comboBox.setSelectedItem(valueNc.toManchesterSyntaxString(baseURI,prefixes));
    add(comboBox);
  }
 else {
    stringField=new JTextField(35);
    if (value != null) {
      stringField.setText(value.toString());
    }
    stringField.setToolTipText(configOption.getAllowedValuesDescription());
    setButton=new JButton("String_Node_Str");
    setButton.addActionListener(this);
    add(stringField);
    add(setButton);
    if (((URLConfigOption)configOption).refersToFile()) {
      chooseLocalButton=new JButton("String_Node_Str");
      chooseLocalButton.addActionListener(this);
      add(new JLabel("String_Node_Str"));
      add(chooseLocalButton);
    }
  }
}

Fixed version (ground truth):
@Override public void buildWidgetPanel(){
  add(getLabel());
  value=config.getConfigOptionValue(component,configOption);
  if (((URLConfigOption)configOption).refersToOWLClass()) {
    comboBox=new JComboBox();
    ReasonerComponent reasoner=config.getReasoner();
    String baseURI=reasoner.getBaseURI();
    Map<String,String> prefixes=reasoner.getPrefixes();
    classes=new LinkedList<NamedClass>(reasoner.getNamedClasses());
    for (    NamedClass clazz : classes) {
      comboBox.addItem(clazz.toManchesterSyntaxString(baseURI,prefixes));
    }
    comboBox.addActionListener(this);
    if (value == null) {
      comboBox.setSelectedIndex(0);
    }
 else {
      NamedClass valueNc=new NamedClass(value.toString());
      comboBox.setSelectedItem(valueNc.toManchesterSyntaxString(baseURI,prefixes));
    }
    add(comboBox);
  }
 else {
    stringField=new JTextField(35);
    if (value != null) {
      stringField.setText(value.toString());
    }
    stringField.setToolTipText(configOption.getAllowedValuesDescription());
    setButton=new JButton("String_Node_Str");
    setButton.addActionListener(this);
    add(stringField);
    add(setButton);
    if (((URLConfigOption)configOption).refersToFile()) {
      chooseLocalButton=new JButton("String_Node_Str");
      chooseLocalButton.addActionListener(this);
      add(new JLabel("String_Node_Str"));
      add(chooseLocalButton);
    }
  }
}
Program: 9803
Project: 9803
Buggy source:
private void saveUserInputToFile(){
  OWLOntology activeOnt=getOWLModelManager().getActiveOntology();
  URI uri=getOWLModelManager().getOntologyPhysicalURI(activeOnt);
  String outputFile=uri.toString().substring(0,uri.toString().lastIndexOf('.') + 1) + "String_Node_Str";
  OutputStream fos=null;
  File file=new File(outputFile);
  try {
    fos=new FileOutputStream(file);
    ObjectOutputStream o=new ObjectOutputStream(fos);
    o.flush();
    o.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    try {
      fos.close();
    }
 catch (    Exception e) {
    }
  }
}

Fixed version (ground truth):
/** 
 * Saves the user evaluation map object to disk. The file format is 'FILENAME'.inp .
 */
private void saveUserInputToFile(){
  OWLOntology activeOnt=getOWLModelManager().getActiveOntology();
  URI uri=getOWLModelManager().getOntologyPhysicalURI(activeOnt);
  String outputFile=uri.toString().substring(0,uri.toString().lastIndexOf('.') + 1) + "String_Node_Str";
  OutputStream fos=null;
  File file=new File(URI.create(outputFile));
  try {
    fos=new FileOutputStream(file);
    ObjectOutputStream o=new ObjectOutputStream(fos);
    o.writeObject(userInputMap);
    o.flush();
    o.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    try {
      fos.close();
    }
 catch (    Exception e) {
    }
  }
}
Program: 9805
Project: 9805
Buggy source:
@Override public void actionPerformed(ActionEvent arg0){
  saveUserInputToFile();
}

Fixed version (ground truth):
@Override public void actionPerformed(ActionEvent arg0){
  traceInput(classes.get(currentClassIndex - 1));
  saveUserInputToFile();
}
Program: 9808
Project: 9808
Buggy source:
private void setRenderers(OWLEditorKit editorKit){
  OWLCellRenderer renderer=new OWLCellRenderer(editorKit,true,false);
  renderer.setHighlightKeywords(true);
  renderer.setWrap(true);
  getColumn(0).setCellRenderer(renderer);
  for (int i=1; i < getColumnCount(); i++) {
    getColumn(i).setCellRenderer(new RadioButtonRenderer());
    getColumn(i).setCellEditor(new RadioButtonEditor());
    getColumn(i).setHeaderRenderer(new VerticalHeaderRenderer());
  }
}

Fixed version (ground truth):
private void setRenderers(OWLEditorKit editorKit){
  OWLCellRenderer renderer=new OWLCellRenderer(editorKit,false,false);
  renderer.setHighlightKeywords(true);
  renderer.setWrap(false);
  getColumn(0).setCellRenderer(renderer);
  for (int i=1; i < getColumnCount(); i++) {
    getColumn(i).setCellRenderer(new RadioButtonRenderer());
    getColumn(i).setCellEditor(new RadioButtonEditor());
    getColumn(i).setHeaderRenderer(new VerticalHeaderRenderer());
  }
}
Program: 9809
Project: 9809
Buggy source:
private String getSolutionString(){
  int current=1;
  String str="String_Node_Str";
  for (  EvaluatedDescription ed : bestEvaluatedDescriptions.getSet().descendingSet()) {
    if (learningProblem instanceof PosNegLPStandard) {
      str+=current + "String_Node_Str" + descriptionToString(ed.getDescription())+ "String_Node_Str"+ dfPercent.format(((PosNegLPStandard)learningProblem).getPredAccuracyOrTooWeakExact(ed.getDescription(),1))+ "String_Node_Str"+ dfPercent.format(((PosNegLPStandard)learningProblem).getFMeasureOrTooWeakExact(ed.getDescription(),1))+ "String_Node_Str";
    }
 else {
      str+=current + "String_Node_Str" + descriptionToString(ed.getDescription())+ "String_Node_Str"+ dfPercent.format(ed.getAccuracy())+ "String_Node_Str";
      System.out.println(ed);
    }
    current++;
  }
  return str;
}

Fixed version (ground truth):
private String getSolutionString(){
  int current=1;
  String str="String_Node_Str";
  for (  EvaluatedDescription ed : bestEvaluatedDescriptions.getSet().descendingSet()) {
    if (learningProblem instanceof PosNegLPStandard) {
      str+=current + "String_Node_Str" + descriptionToString(ed.getDescription())+ "String_Node_Str"+ dfPercent.format(((PosNegLPStandard)learningProblem).getPredAccuracyOrTooWeakExact(ed.getDescription(),1))+ "String_Node_Str"+ dfPercent.format(((PosNegLPStandard)learningProblem).getFMeasureOrTooWeakExact(ed.getDescription(),1))+ "String_Node_Str";
    }
 else {
      str+=current + "String_Node_Str" + descriptionToString(ed.getDescription())+ "String_Node_Str"+ dfPercent.format(ed.getAccuracy())+ "String_Node_Str";
    }
    current++;
  }
  return str;
}
Program: 9812
Project: 9812
Buggy source:
/** 
 * Build a String from nanoSeconds.
 * @param nanoSeconds is type of Long and represent a time interval in ns
 * @return a string like this: 3h 10min 46s 753ms
 */
private String makeTime(Long nanoSeconds){
  if (nanoSeconds == null)   return null;
  Long hours=0L, minutes=0L, seconds=0L, millis=0L, mikros=0L, nanos=0L;
  String timeStr="String_Node_Str";
  nanos=nanoSeconds % 1000;
  nanoSeconds/=1000;
  mikros=nanoSeconds % 1000;
  nanoSeconds/=1000;
  millis=nanoSeconds % 1000;
  nanoSeconds/=1000;
  seconds=nanoSeconds % 60;
  nanoSeconds/=60;
  minutes=nanoSeconds % 60;
  nanoSeconds/=60;
  hours=nanoSeconds;
  if (hours > 0)   timeStr+=hours + "String_Node_Str";
  if (minutes > 0)   timeStr+=minutes + "String_Node_Str";
  if (seconds > 0)   timeStr+=seconds + "String_Node_Str";
  if (millis > 0)   timeStr+=millis + "String_Node_Str";
  if (false)   timeStr+=mikros + "String_Node_Str";
  if (false)   timeStr+=nanos + "String_Node_Str";
  return timeStr;
}

Fixed version (ground truth):
/** 
 * Build a String from nanoSeconds.
 * @param nanoSeconds is type of Long and represent a time interval in ns
 * @return a string like this: 3h 10min 46s 753ms
 */
private String makeTime(Long nanoSeconds){
  if (nanoSeconds == null)   return null;
  Long hours=0L, minutes=0L, seconds=0L, millis=0L;
  String timeStr="String_Node_Str";
  nanoSeconds/=1000;
  nanoSeconds/=1000;
  millis=nanoSeconds % 1000;
  nanoSeconds/=1000;
  seconds=nanoSeconds % 60;
  nanoSeconds/=60;
  minutes=nanoSeconds % 60;
  nanoSeconds/=60;
  hours=nanoSeconds;
  if (hours > 0)   timeStr+=hours + "String_Node_Str";
  if (minutes > 0)   timeStr+=minutes + "String_Node_Str";
  if (seconds > 0)   timeStr+=seconds + "String_Node_Str";
  if (millis > 0)   timeStr+=millis + "String_Node_Str";
  return timeStr;
}
Program: 9813
Project: 9813
Buggy source:
@Override public void buildWidgetPanel(){
  add(getLabel());
  value=config.getConfigOptionValue(component,configOption);
  if (((URLConfigOption)configOption).refersToOWLClass()) {
    comboBox=new JComboBox();
    ReasonerComponent reasoner=config.getReasoner();
    String baseURI=reasoner.getBaseURI();
    Map<String,String> prefixes=reasoner.getPrefixes();
    classes=new LinkedList<NamedClass>(reasoner.getNamedClasses());
    for (    NamedClass clazz : classes) {
      comboBox.addItem(clazz.toManchesterSyntaxString(baseURI,prefixes));
    }
    comboBox.addActionListener(this);
    comboBox.setSelectedIndex(0);
    add(comboBox);
  }
 else {
    stringField=new JTextField(35);
    if (value != null) {
      stringField.setText(value.toString());
    }
    stringField.setToolTipText(configOption.getAllowedValuesDescription());
    setButton=new JButton("String_Node_Str");
    setButton.addActionListener(this);
    add(stringField);
    add(setButton);
    if (((URLConfigOption)configOption).refersToFile()) {
      chooseLocalButton=new JButton("String_Node_Str");
      chooseLocalButton.addActionListener(this);
      add(new JLabel("String_Node_Str"));
      add(chooseLocalButton);
    }
  }
}

Fixed version (ground truth):
@Override public void buildWidgetPanel(){
  add(getLabel());
  value=config.getConfigOptionValue(component,configOption);
  if (((URLConfigOption)configOption).refersToOWLClass()) {
    comboBox=new JComboBox();
    ReasonerComponent reasoner=config.getReasoner();
    String baseURI=reasoner.getBaseURI();
    Map<String,String> prefixes=reasoner.getPrefixes();
    classes=new LinkedList<NamedClass>(reasoner.getNamedClasses());
    for (    NamedClass clazz : classes) {
      comboBox.addItem(clazz.toManchesterSyntaxString(baseURI,prefixes));
    }
    comboBox.addActionListener(this);
    NamedClass valueNc=new NamedClass(value.toString());
    comboBox.setSelectedItem(valueNc.toManchesterSyntaxString(baseURI,prefixes));
    add(comboBox);
  }
 else {
    stringField=new JTextField(35);
    if (value != null) {
      stringField.setText(value.toString());
    }
    stringField.setToolTipText(configOption.getAllowedValuesDescription());
    setButton=new JButton("String_Node_Str");
    setButton.addActionListener(this);
    add(stringField);
    add(setButton);
    if (((URLConfigOption)configOption).refersToFile()) {
      chooseLocalButton=new JButton("String_Node_Str");
      chooseLocalButton.addActionListener(this);
      add(new JLabel("String_Node_Str"));
      add(chooseLocalButton);
    }
  }
}
Program: 9815
Project: 9815
Buggy source:
/** 
 * Returns asserted class definitions of given class
 * @param nc the class
 * @return the asserted class definitions
 */
@Override public Set<Description> getAssertedDefinitionsImpl(NamedClass nc){
  OWLClass owlClass=OWLAPIDescriptionConvertVisitor.getOWLDescription(nc).asOWLClass();
  Set<OWLDescription> owlAPIDefinitions=owlClass.getEquivalentClasses(new HashSet<OWLOntology>(owlAPIOntologies));
  Set<Description> definitions=new HashSet<Description>();
  return definitions;
}

Fixed version (ground truth):
/** 
 * Returns asserted class definitions of given class
 * @param nc the class
 * @return the asserted class definitions
 */
@Override protected Set<Description> getAssertedDefinitionsImpl(NamedClass nc){
  OWLClass owlClass=OWLAPIDescriptionConvertVisitor.getOWLDescription(nc).asOWLClass();
  Set<OWLDescription> owlAPIDescriptions=owlClass.getEquivalentClasses(new HashSet<OWLOntology>(owlAPIOntologies));
  Set<Description> definitions=new HashSet<Description>();
  for (  OWLDescription owlAPIDescription : owlAPIDescriptions) {
    definitions.add(DLLearnerDescriptionConvertVisitor.getDLLearnerDescription(owlAPIDescription));
  }
  return definitions;
}
Program: 9819
Project: 9819
Buggy source:
public void run(){
  model.setSuggestList(result);
  dm.clear();
  int i=0;
  for (  EvaluatedDescription eval : result) {
    Set<String> ont=model.getOntologyURIString();
    for (    String ontology : ont) {
      if (eval.getDescription().toString().contains(ontology)) {
        if (((EvaluatedDescriptionClass)eval).isConsistent()) {
          dm.add(i,new SuggestListItem(colorGreen,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          i++;
          break;
        }
 else {
          dm.add(i,new SuggestListItem(colorRed,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
          view.setIsInconsistent(true);
          i++;
          break;
        }
      }
    }
  }
  view.getSuggestClassPanel().setSuggestList(dm);
  view.getLearnerView().repaint();
}

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

Fixed version (ground truth):
private void updateList(final List<? extends EvaluatedDescription> result){
  Runnable doUpdateList=new Runnable(){
    public void run(){
      model.setSuggestList(result);
      dm.clear();
      int i=0;
      for (      EvaluatedDescription eval : result) {
        Set<String> ont=model.getOntologyURIString();
        for (        String ontology : ont) {
          if (eval.getDescription().toString().contains(ontology)) {
            if (((EvaluatedDescriptionClass)eval).isConsistent()) {
              dm.add(i,new SuggestListItem(colorGreen,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
              i++;
              break;
            }
 else {
              dm.add(i,new SuggestListItem(colorRed,eval.getDescription().toManchesterSyntaxString(ontology,null),((EvaluatedDescriptionClass)eval).getAccuracy() * 100));
              if (isFinished) {
                view.setIsInconsistent(true);
              }
              i++;
              break;
            }
          }
        }
      }
      view.getSuggestClassPanel().setSuggestList(dm);
      view.getLearnerView().repaint();
    }
  }
;
  SwingUtilities.invokeLater(doUpdateList);
}
Program: 9824
Project: 9824
Buggy source:
/** 
 * @param args
 * @throws MalformedURLException 
 * @throws LearningProblemUnsupportedException 
 * @throws ComponentInitException 
 * @throws URISyntaxException 
 */
public static void main(String[] args) throws MalformedURLException, ComponentInitException, LearningProblemUnsupportedException, URISyntaxException {
  if (args.length == 0) {
    System.out.println("String_Node_Str");
    System.exit(0);
  }
  URL fileURL=null;
  if (args[0].startsWith("String_Node_Str")) {
    fileURL=new URL(args[0]);
  }
 else {
    fileURL=new File(new URL(args[0]).toURI()).toURI().toURL();
  }
  long startTime=System.currentTimeMillis();
  new EvaluationComputingScript(fileURL);
  System.out.println("String_Node_Str" + (System.currentTimeMillis() - startTime) / 1000 + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @param args
 * @throws MalformedURLException 
 * @throws LearningProblemUnsupportedException 
 * @throws ComponentInitException 
 * @throws URISyntaxException 
 */
public static void main(String[] args) throws MalformedURLException, ComponentInitException, LearningProblemUnsupportedException, URISyntaxException {
  if (args.length == 0) {
    System.out.println("String_Node_Str");
    System.exit(0);
  }
  URL fileURL=new URL(args[0]);
  long startTime=System.currentTimeMillis();
  new EvaluationComputingScript(fileURL);
  System.out.println("String_Node_Str" + (System.currentTimeMillis() - startTime) / 1000 + "String_Node_Str");
}
Program: 9825
Project: 9825
Buggy source:
/** 
 * @param args
 * @throws ComponentInitException
 * @throws MalformedURLException
 * @throws LearningProblemUnsupportedException
 * @throws UnsupportedLookAndFeelException
 * @throws IllegalAccessException
 * @throws InstantiationException
 * @throws ClassNotFoundException
 * @throws URISyntaxException 
 */
public static void main(String[] args) throws ComponentInitException, MalformedURLException, LearningProblemUnsupportedException, ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException, URISyntaxException {
  UIManager.setLookAndFeel(new PlasticLookAndFeel());
  if (args.length == 0) {
    System.out.println("String_Node_Str");
    System.exit(0);
  }
  final File input=new File(args[0]);
  SwingUtilities.invokeLater(new Runnable(){
    @Override public void run(){
      try {
        new EvaluationGUI(input);
      }
 catch (      MalformedURLException e) {
        e.printStackTrace();
      }
catch (      ComponentInitException e) {
        e.printStackTrace();
      }
catch (      LearningProblemUnsupportedException e) {
        e.printStackTrace();
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * @param args
 * @throws ComponentInitException
 * @throws MalformedURLException
 * @throws LearningProblemUnsupportedException
 * @throws UnsupportedLookAndFeelException
 * @throws IllegalAccessException
 * @throws InstantiationException
 * @throws ClassNotFoundException
 * @throws URISyntaxException 
 */
public static void main(String[] args) throws ComponentInitException, LearningProblemUnsupportedException, ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException, URISyntaxException {
  UIManager.setLookAndFeel(new PlasticLookAndFeel());
  if (args.length == 0) {
    System.out.println("String_Node_Str");
    System.exit(0);
  }
  final File input=new File(args[0]);
  SwingUtilities.invokeLater(new Runnable(){
    @Override public void run(){
      try {
        new EvaluationGUI(input);
      }
 catch (      MalformedURLException e) {
        e.printStackTrace();
      }
catch (      ComponentInitException e) {
        e.printStackTrace();
      }
catch (      LearningProblemUnsupportedException e) {
        e.printStackTrace();
      }
    }
  }
);
}
Program: 9826
Project: 9826
Buggy source:
/** 
 * @param args
 * @throws URISyntaxException
 * @throws MalformedURLException
 */
public static void main(String[] args) throws MalformedURLException, URISyntaxException {
  Locale.setDefault(Locale.ENGLISH);
  File directory=new File(new URL(args[0]).toURI());
  new StatsGenerator(directory);
}

Fixed version (ground truth):
/** 
 * @param args
 * @throws URISyntaxException
 * @throws MalformedURLException
 */
public static void main(String[] args) throws MalformedURLException, URISyntaxException {
  Locale.setDefault(Locale.ENGLISH);
  Logger.getRootLogger().setLevel(Level.DEBUG);
  File directory=new File(new URL(args[0]).toURI());
  new StatsGenerator(directory);
}
Program: 9827
Project: 9827
Buggy source:
/** 
 * Loads the computed suggestion files.
 * @param resultFile The file where the suggestions are serialized.
 */
private void loadSuggestions(File resultFile){
  InputStream fis=null;
  try {
    fis=new FileInputStream(resultFile);
    ObjectInputStream o=new ObjectInputStream(fis);
    for (int i=0; i < 20; i++) {
      o.readObject();
    }
    equivalentSuggestions=(Map<NamedClass,List<EvaluatedDescriptionClass>>)o.readObject();
    superSuggestions=(Map<NamedClass,List<EvaluatedDescriptionClass>>)o.readObject();
  }
 catch (  IOException e) {
    System.err.println(e);
  }
catch (  ClassNotFoundException e) {
    System.err.println(e);
  }
 finally {
    try {
      fis.close();
    }
 catch (    Exception e) {
    }
  }
  suggestionListsCount=equivalentSuggestions.size() + superSuggestions.size();
}

Fixed version (ground truth):
/** 
 * Loads the computed suggestion files.
 * @param resultFile The file where the suggestions are serialized.
 */
private void loadSuggestions(File resultFile){
  InputStream fis=null;
  try {
    fis=new FileInputStream(resultFile);
    ObjectInputStream o=new ObjectInputStream(fis);
    for (int i=0; i < 20; i++) {
      o.readObject();
    }
    equivalentSuggestions=(Map<NamedClass,List<EvaluatedDescriptionClass>>)o.readObject();
    superSuggestions=(Map<NamedClass,List<EvaluatedDescriptionClass>>)o.readObject();
  }
 catch (  IOException e) {
    System.err.println(e);
  }
catch (  ClassNotFoundException e) {
    System.err.println(e);
  }
 finally {
    try {
      fis.close();
    }
 catch (    Exception e) {
    }
  }
  suggestionListsCount=equivalentSuggestions.keySet().size() + superSuggestions.keySet().size();
}
Program: 9829
Project: 9829
Buggy source:
public StatsGenerator(File directory){
  beginOntologyMetricsTable();
  beginStatsTable();
  for (  File suggestionFile : directory.listFiles(new ResultFileFilter())) {
    clearStats();
    loadSuggestions(suggestionFile);
    loadOntology(suggestionFile);
    for (    File inputFile : directory.listFiles(new NameFilter(suggestionFile))) {
      loadUserInput(inputFile);
      makeSingleStat();
    }
    addOntologyMetricsTableRow();
    addStatsTableRow();
  }
  endTables();
  printLatexCode();
}

Fixed version (ground truth):
public StatsGenerator(File directory){
  beginOntologyMetricsTable();
  beginStatsTable();
  for (  File suggestionFile : directory.listFiles(new ResultFileFilter())) {
    loadSuggestions(suggestionFile);
    loadOntology(suggestionFile);
    resetStats();
    for (    File inputFile : directory.listFiles(new NameFilter(suggestionFile))) {
      loadUserInput(inputFile);
      makeSingleStat();
    }
    addOntologyMetricsTableRow();
    addStatsTableRow();
  }
  endTables();
  printLatexCode();
}
Program: 9831
Project: 9831
Buggy source:
public EvaluationGUI(File input) throws ComponentInitException, MalformedURLException, LearningProblemUnsupportedException {
  super();
  inputFile=input;
  loadResults(input);
  setTitle(input.getName());
  createUI();
  createCoverageWindow();
  classesTable.setSelectedClass(currentClassIndex);
  graphPanel.initManchesterSyntax(baseURI,prefixes);
  graphPanel2.initManchesterSyntax(baseURI,prefixes);
  graphPanel.setConcept(classesTable.getSelectedClass(currentClassIndex));
  graphPanel2.setConcept(classesTable.getSelectedClass(currentClassIndex));
  if (classesTable.getSelectedClass(currentClassIndex) != null) {
    showEquivalentSuggestions(classesTable.getSelectedClass(currentClassIndex));
  }
 else {
    showSuperSuggestions(classesTable.getSelectedClass(currentClassIndex));
  }
  cardLayout.last(cardPanel);
  pack();
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  setExtendedState(JFrame.MAXIMIZED_BOTH);
  setVisible(true);
}

Fixed version (ground truth):
public EvaluationGUI(File input) throws ComponentInitException, MalformedURLException, LearningProblemUnsupportedException {
  super();
  inputFile=input;
  loadResults(input);
  setTitle(input.getName());
  createUI();
  createCoverageWindow();
  classesTable.setSelectedClass(currentClassIndex);
  graphPanel.initManchesterSyntax(baseURI,prefixes);
  graphPanel2.initManchesterSyntax(baseURI,prefixes);
  graphPanel.setConcept(classesTable.getSelectedClass(currentClassIndex));
  graphPanel2.setConcept(classesTable.getSelectedClass(currentClassIndex));
  if (defaultEquivalenceMap.get(classesTable.getSelectedClass(currentClassIndex)) != null) {
    showEquivalentSuggestions(classesTable.getSelectedClass(currentClassIndex));
  }
 else {
    showSuperSuggestions(classesTable.getSelectedClass(currentClassIndex));
  }
  cardLayout.last(cardPanel);
  pack();
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  setExtendedState(JFrame.MAXIMIZED_BOTH);
  setVisible(true);
}
Program: 9832
Project: 9832
Buggy source:
public RatingTablePanel(){
  setLayout(new BorderLayout());
  setBorder(BorderFactory.createLineBorder(Color.BLACK));
  table=new ResultTable();
  add(table,BorderLayout.CENTER);
  rating=new RatingPanel();
  add(rating,BorderLayout.EAST);
}

Fixed version (ground truth):
public RatingTablePanel(){
  setLayout(new BorderLayout());
  setBorder(BorderFactory.createLineBorder(Color.BLACK));
  table=new ResultTable();
  table.getColumn(1).setCellRenderer(new MultiLineTableCellRenderer());
  table.setRowHeightEnabled(true);
  add(table,BorderLayout.CENTER);
  rating=new RatingPanel();
  add(rating,BorderLayout.EAST);
}
Program: 9834
Project: 9834
Buggy source:
private void showSingleTable(){
  defaultTab.clearSelection();
  graphPanel.clear();
  cardLayout.last(cardPanel);
  showingMultiTables=false;
}

Fixed version (ground truth):
private void showSingleTable(){
  graphPanel.clear();
  cardLayout.last(cardPanel);
  showingMultiTables=false;
}
Program: 9836
Project: 9836
Buggy source:
@Override public void activeOntologyChanged(){
  ontology=OREManager.getInstance().getReasoner().getOWLAPIOntologies();
  reasoner=OREManager.getInstance().getReasoner().getReasoner();
  gen=new CachedExplanationGenerator(ontology,reasoner);
  orderingMap.clear();
  usageChecker=new AxiomUsageChecker(ontology);
}

Fixed version (ground truth):
@Override public void activeOntologyChanged(){
  reasoner=OREManager.getInstance().getReasoner().getReasoner();
  ontology=OREManager.getInstance().getReasoner().getOWLAPIOntologies();
  gen=new CachedExplanationGenerator(reasoner.getLoadedOntologies());
  orderingMap.clear();
  usageChecker=new AxiomUsageChecker(ontology);
}
Program: 9837
Project: 9837
Buggy source:
private ExplanationManager(OREManager oreMan){
  OREManager.getInstance().addListener(this);
  this.reasoner=oreMan.getReasoner().getReasoner();
  this.manager=reasoner.getManager();
  this.ontology=reasoner.getLoadedOntologies().iterator().next();
  dataFactory=manager.getOWLDataFactory();
  explanationOrderer=new DefaultExplanationOrderer();
  orderingMap=new HashMap<Explanation,List<Map<OWLAxiom,Integer>>>();
  rootFinder=new RootFinder();
  usageChecker=new AxiomUsageChecker(ontology);
  listeners=new ArrayList<ExplanationManagerListener>();
  gen=new CachedExplanationGenerator(ontology,reasoner);
}

Fixed version (ground truth):
private ExplanationManager(OREManager oreMan){
  OREManager.getInstance().addListener(this);
  this.reasoner=oreMan.getReasoner().getReasoner();
  this.manager=reasoner.getManager();
  this.ontology=oreMan.getReasoner().getOWLAPIOntologies();
  System.out.println(ontology);
  dataFactory=manager.getOWLDataFactory();
  explanationOrderer=new DefaultExplanationOrderer();
  orderingMap=new HashMap<Explanation,List<Map<OWLAxiom,Integer>>>();
  rootFinder=new RootFinder();
  usageChecker=new AxiomUsageChecker(ontology);
  listeners=new ArrayList<ExplanationManagerListener>();
  gen=new CachedExplanationGenerator(reasoner.getLoadedOntologies());
}
Program: 9838
Project: 9838
Buggy source:
private Set<Explanation> computeLaconicExplanations(OWLAxiom entailment,int limit) throws ExplanationException {
  Set<Explanation> explanations=laconicExplanationCache.get(entailment);
  Integer lastRequestedSize=lastRequestedLaconicSize.get(entailment);
  if (lastRequestedSize == null) {
    lastRequestedSize=Integer.valueOf(0);
  }
  if (explanations == null || lastRequestedSize.intValue() != -1 && lastRequestedSize.intValue() < limit) {
    OWLOntology module=axiom2Module.get(entailment);
    if (module == null) {
      module=OntologyUtils.getOntologyFromAxioms(ModularityUtils.extractModule(Collections.singleton(ontology),entailment.getSignature(),ModuleType.TOP_OF_BOT));
    }
    axiom2Module.put(entailment,module);
    laconicExpGen=new LaconicExplanationGenerator(manager,new PelletReasonerFactory(),Collections.singleton(module));
    laconicExpGen.setProgressMonitor(TaskManager.getInstance().getStatusBar());
    if (limit == -1) {
      explanations=laconicExpGen.getExplanations(entailment);
    }
 else {
      explanations=laconicExpGen.getExplanations(entailment,limit);
    }
    laconicExplanationCache.put(entailment,laconicExpGen.retrieveAxioms(explanations));
    preciseExplanationCache.put(entailment,explanations);
    lastRequestedLaconicSize.put(entailment,Integer.valueOf(limit));
  }
  return explanations;
}

Fixed version (ground truth):
private Set<Explanation> computeLaconicExplanations(OWLAxiom entailment,int limit) throws ExplanationException {
  Set<Explanation> explanations=laconicExplanationCache.get(entailment);
  Integer lastRequestedSize=lastRequestedLaconicSize.get(entailment);
  if (lastRequestedSize == null) {
    lastRequestedSize=Integer.valueOf(0);
  }
  if (explanations == null || lastRequestedSize.intValue() != -1 && lastRequestedSize.intValue() < limit) {
    OWLOntology module=axiom2Module.get(entailment);
    if (module == null) {
      module=OntologyUtils.getOntologyFromAxioms(ModularityUtils.extractModule(ontologies,entailment.getSignature(),ModuleType.TOP_OF_BOT));
    }
    axiom2Module.put(entailment,module);
    laconicExpGen=new LaconicExplanationGenerator(manager,new PelletReasonerFactory(),Collections.singleton(module));
    laconicExpGen.setProgressMonitor(TaskManager.getInstance().getStatusBar());
    if (limit == -1) {
      explanations=laconicExpGen.getExplanations(entailment);
    }
 else {
      explanations=laconicExpGen.getExplanations(entailment,limit);
    }
    laconicExplanationCache.put(entailment,laconicExpGen.retrieveAxioms(explanations));
    preciseExplanationCache.put(entailment,explanations);
    lastRequestedLaconicSize.put(entailment,Integer.valueOf(limit));
  }
  return explanations;
}
Program: 9839
Project: 9839
Buggy source:
private Set<Explanation> computeRegularExplanations(OWLAxiom entailment,int limit) throws ExplanationException {
  Set<Explanation> explanations=regularExplanationCache.get(entailment);
  Integer lastRequestedSize=lastRequestedRegularSize.get(entailment);
  if (lastRequestedSize == null) {
    lastRequestedSize=Integer.valueOf(0);
  }
  if (explanations == null || lastRequestedSize.intValue() != -1 && lastRequestedSize.intValue() < limit) {
    OWLOntology module=axiom2Module.get(entailment);
    if (module == null) {
      module=OntologyUtils.getOntologyFromAxioms(ModularityUtils.extractModule(Collections.singleton(ontology),entailment.getSignature(),ModuleType.TOP_OF_BOT));
    }
    axiom2Module.put(entailment,module);
    regularExpGen=new PelletExplanationGenerator(manager,Collections.singleton(module));
    regularExpGen.setProgressMonitor(TaskManager.getInstance().getStatusBar());
    if (limit == -1) {
      explanations=regularExpGen.getExplanations(entailment);
    }
 else {
      explanations=regularExpGen.getExplanations(entailment,limit);
    }
    regularExplanationCache.put(entailment,explanations);
    lastRequestedRegularSize.put(entailment,Integer.valueOf(limit));
  }
  return explanations;
}

Fixed version (ground truth):
private Set<Explanation> computeRegularExplanations(OWLAxiom entailment,int limit) throws ExplanationException {
  Set<Explanation> explanations=regularExplanationCache.get(entailment);
  Integer lastRequestedSize=lastRequestedRegularSize.get(entailment);
  if (lastRequestedSize == null) {
    lastRequestedSize=Integer.valueOf(0);
  }
  if (explanations == null || lastRequestedSize.intValue() != -1 && lastRequestedSize.intValue() < limit) {
    OWLOntology module=axiom2Module.get(entailment);
    if (module == null) {
      module=OntologyUtils.getOntologyFromAxioms(ModularityUtils.extractModule(ontologies,entailment.getSignature(),ModuleType.TOP_OF_BOT));
    }
    axiom2Module.put(entailment,module);
    regularExpGen=new PelletExplanationGenerator(manager,Collections.singleton(module));
    regularExpGen.setProgressMonitor(TaskManager.getInstance().getStatusBar());
    if (limit == -1) {
      explanations=regularExpGen.getExplanations(entailment);
    }
 else {
      explanations=regularExpGen.getExplanations(entailment,limit);
    }
    regularExplanationCache.put(entailment,explanations);
    lastRequestedRegularSize.put(entailment,Integer.valueOf(limit));
  }
  return explanations;
}
Program: 9840
Project: 9840
Buggy source:
public CachedExplanationGenerator(OWLOntology ontology,Reasoner reasoner){
  this.ontology=ontology;
  this.manager=OWLManager.createOWLOntologyManager();
  axiom2Module=new HashMap<OWLAxiom,OWLOntology>();
  regularExplanationCache=new HashMap<OWLAxiom,Set<Explanation>>();
  laconicExplanationCache=new HashMap<OWLAxiom,Set<Explanation>>();
  preciseExplanationCache=new HashMap<OWLAxiom,Set<Explanation>>();
  lastRequestedRegularSize=new HashMap<OWLAxiom,Integer>();
  lastRequestedLaconicSize=new HashMap<OWLAxiom,Integer>();
  RepairManager.getInstance(OREManager.getInstance()).addListener(this);
}

Fixed version (ground truth):
public CachedExplanationGenerator(Set<OWLOntology> ontologies){
  this.ontologies=ontologies;
  this.manager=OWLManager.createOWLOntologyManager();
  axiom2Module=new HashMap<OWLAxiom,OWLOntology>();
  regularExplanationCache=new HashMap<OWLAxiom,Set<Explanation>>();
  laconicExplanationCache=new HashMap<OWLAxiom,Set<Explanation>>();
  preciseExplanationCache=new HashMap<OWLAxiom,Set<Explanation>>();
  lastRequestedRegularSize=new HashMap<OWLAxiom,Integer>();
  lastRequestedLaconicSize=new HashMap<OWLAxiom,Integer>();
  RepairManager.getInstance(OREManager.getInstance()).addListener(this);
}
Program: 9841
Project: 9841
Buggy source:
private void setNextButtonEnabled2ConsistentOntology(){
  if (reasoner.isConsistent()) {
    getWizard().setNextFinishButtonEnabled(true);
  }
 else {
    getWizard().setNextFinishButtonEnabled(false);
  }
}

Fixed version (ground truth):
private void setNextButtonEnabled2ConsistentOntology(){
  reasoner.refresh();
  if (reasoner.isConsistent()) {
    getWizard().setNextFinishButtonEnabled(true);
  }
 else {
    getWizard().setNextFinishButtonEnabled(false);
  }
}
Program: 9842
Project: 9842
Buggy source:
public static Collection<ConfigOption<?>> createConfigOptions(){
  Collection<ConfigOption<?>> options=new LinkedList<ConfigOption<?>>();
  options.add(CommonConfigOptions.useAllConstructor());
  options.add(CommonConfigOptions.useExistsConstructor());
  options.add(CommonConfigOptions.useHasValueConstructor());
  options.add(CommonConfigOptions.valueFreqencyThreshold());
  options.add(CommonConfigOptions.useCardinalityRestrictions());
  options.add(CommonConfigOptions.cardinalityLimit());
  options.add(CommonConfigOptions.useNegation(false));
  options.add(CommonConfigOptions.useBooleanDatatypes());
  options.add(CommonConfigOptions.useDoubleDatatypes());
  options.add(CommonConfigOptions.maxExecutionTimeInSeconds(10));
  options.add(CommonConfigOptions.getNoisePercentage());
  options.add(CommonConfigOptions.getMaxDepth(7));
  options.add(CommonConfigOptions.maxNrOfResults(10));
  options.add(new BooleanConfigOption("String_Node_Str","String_Node_Str",false));
  options.add(CommonConfigOptions.getInstanceBasedDisjoints());
  return options;
}

Fixed version (ground truth):
public static Collection<ConfigOption<?>> createConfigOptions(){
  Collection<ConfigOption<?>> options=new LinkedList<ConfigOption<?>>();
  options.add(CommonConfigOptions.useAllConstructor());
  options.add(CommonConfigOptions.useExistsConstructor());
  options.add(CommonConfigOptions.useHasValueConstructor());
  options.add(CommonConfigOptions.useDataHasValueConstructor());
  options.add(CommonConfigOptions.valueFreqencyThreshold());
  options.add(CommonConfigOptions.useCardinalityRestrictions());
  options.add(CommonConfigOptions.cardinalityLimit());
  options.add(CommonConfigOptions.useNegation(false));
  options.add(CommonConfigOptions.useBooleanDatatypes());
  options.add(CommonConfigOptions.useDoubleDatatypes());
  options.add(CommonConfigOptions.maxExecutionTimeInSeconds(10));
  options.add(CommonConfigOptions.getNoisePercentage());
  options.add(CommonConfigOptions.getMaxDepth(7));
  options.add(CommonConfigOptions.maxNrOfResults(10));
  options.add(new BooleanConfigOption("String_Node_Str","String_Node_Str",false));
  options.add(CommonConfigOptions.getInstanceBasedDisjoints());
  return options;
}
Program: 9844
Project: 9844
Buggy source:
public int compareTo(TypedConstant o){
  int datatypeComparision=datatype.getURI().compareTo(datatype.getURI());
  if (datatypeComparision == 0) {
    return literal.compareTo(o.literal);
  }
 else   return datatypeComparision;
}

Fixed version (ground truth):
@Override public int compareTo(Constant o){
  if (o instanceof UntypedConstant) {
    return 1;
  }
  String str=literal + datatype;
  String str2=o.literal + ((TypedConstant)o).datatype;
  return str.compareTo(str2);
}
Program: 9845
Project: 9845
Buggy source:
public RhoDRDown(ReasonerComponent reasoningService,ClassHierarchy subHierarchy,ROLComponent2Configurator configurator,boolean applyAllFilter,boolean applyExistsFilter,boolean useAllConstructor,boolean useExistsConstructor,boolean useHasValueConstructor,int valueFrequencyThreshold,boolean useCardinalityRestrictions,boolean useNegation,boolean useBooleanDatatypes,boolean useDoubleDatatypes,NamedClass startClass){
  this.rs=reasoningService;
  this.subHierarchy=subHierarchy;
  this.applyAllFilter=applyAllFilter;
  this.applyExistsFilter=applyExistsFilter;
  this.useAllConstructor=useAllConstructor;
  this.useExistsConstructor=useExistsConstructor;
  this.useHasValueConstructor=useHasValueConstructor;
  this.frequencyThreshold=valueFrequencyThreshold;
  this.useCardinalityRestrictions=useCardinalityRestrictions;
  cardinalityLimit=configurator.getCardinalityLimit();
  this.useNegation=useNegation;
  this.useBooleanDatatypes=useBooleanDatatypes;
  this.useDoubleDatatypes=useDoubleDatatypes;
  useStringDatatypes=configurator.getUseStringDatatypes();
  instanceBasedDisjoints=configurator.getInstanceBasedDisjoints();
  if (startClass != null) {
    this.startClass=startClass;
  }
  init();
}

Fixed version (ground truth):
public RhoDRDown(ReasonerComponent reasoningService,ClassHierarchy subHierarchy,ROLComponent2Configurator configurator,boolean applyAllFilter,boolean applyExistsFilter,boolean useAllConstructor,boolean useExistsConstructor,boolean useHasValueConstructor,int valueFrequencyThreshold,boolean useCardinalityRestrictions,boolean useNegation,boolean useBooleanDatatypes,boolean useDoubleDatatypes,NamedClass startClass){
  this.rs=reasoningService;
  this.subHierarchy=subHierarchy;
  this.applyAllFilter=applyAllFilter;
  this.applyExistsFilter=applyExistsFilter;
  this.useAllConstructor=useAllConstructor;
  this.useExistsConstructor=useExistsConstructor;
  this.useHasValueConstructor=useHasValueConstructor;
  this.frequencyThreshold=valueFrequencyThreshold;
  this.useCardinalityRestrictions=useCardinalityRestrictions;
  cardinalityLimit=configurator.getCardinalityLimit();
  this.useDataHasValueConstructor=configurator.getUseDataHasValueConstructor();
  this.useNegation=useNegation;
  this.useBooleanDatatypes=useBooleanDatatypes;
  this.useDoubleDatatypes=useDoubleDatatypes;
  useStringDatatypes=configurator.getUseStringDatatypes();
  instanceBasedDisjoints=configurator.getInstanceBasedDisjoints();
  if (startClass != null) {
    this.startClass=startClass;
  }
  init();
}
Program: 9848
Project: 9848
Buggy source:
public EvaluationGUI(File input) throws ComponentInitException, MalformedURLException, LearningProblemUnsupportedException {
  super();
  loadResults(input);
  setTitle(input.getName());
  createUI();
  createCoverageWindow();
  classesTable.setSelectedClass(currentClassIndex);
  graphPanel.setConcept(classesTable.getSelectedClass(currentClassIndex));
  graphPanel2.setConcept(classesTable.getSelectedClass(currentClassIndex));
  showEquivalentSuggestions(classesTable.getSelectedClass(currentClassIndex));
  cardLayout.first(cardPanel);
  pack();
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  setExtendedState(JFrame.MAXIMIZED_BOTH);
  setVisible(true);
}

Fixed version (ground truth):
public EvaluationGUI(File input) throws ComponentInitException, MalformedURLException, LearningProblemUnsupportedException {
  super();
  loadResults(input);
  setTitle(input.getName());
  createUI();
  createCoverageWindow();
  classesTable.setSelectedClass(currentClassIndex);
  graphPanel.setConcept(classesTable.getSelectedClass(currentClassIndex));
  graphPanel2.setConcept(classesTable.getSelectedClass(currentClassIndex));
  showEquivalentSuggestions(classesTable.getSelectedClass(currentClassIndex));
  cardLayout.last(cardPanel);
  pack();
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  setExtendedState(JFrame.MAXIMIZED_BOTH);
  setVisible(true);
}
Program: 9849
Project: 9849
Buggy source:
private void showMultiTables(){
  cardLayout.last(cardPanel);
  showingMultiTables=true;
}

Fixed version (ground truth):
private void showMultiTables(){
  cardLayout.first(cardPanel);
  showingMultiTables=true;
}
Program: 9850
Project: 9850
Buggy source:
private void showSingleTable(){
  defaultTab.clearSelection();
  graphPanel.clear();
  cardLayout.first(cardPanel);
  showingMultiTables=false;
}

Fixed version (ground truth):
private void showSingleTable(){
  defaultTab.clearSelection();
  graphPanel.clear();
  cardLayout.last(cardPanel);
  showingMultiTables=false;
}
Program: 9851
Project: 9851
Buggy source:
private JPanel createMainPanel(){
  JPanel messageTablesPanel=new JPanel();
  messageTablesPanel.setLayout(new BorderLayout());
  messageLabel=new JLabel();
  messageLabel.addMouseMotionListener(this);
  messageTablesPanel.add(messageLabel,BorderLayout.NORTH);
  cardPanel=new JPanel();
  cardPanel.setBorder(new EmptyBorder(new Insets(5,10,5,10)));
  cardLayout=new CardLayout();
  cardPanel.add(createSingleTablePanel(),SINGLETABLEVIEW);
  cardPanel.add(createMultiTablesPanel(),MULTITABLEVIEW);
  cardPanel.setLayout(cardLayout);
  messageTablesPanel.add(cardPanel,BorderLayout.CENTER);
  return messageTablesPanel;
}

Fixed version (ground truth):
private JPanel createMainPanel(){
  JPanel messageTablesPanel=new JPanel();
  messageTablesPanel.setLayout(new BorderLayout());
  messageLabel=new JLabel();
  messageLabel.addMouseMotionListener(this);
  messageTablesPanel.add(messageLabel,BorderLayout.NORTH);
  cardPanel=new JPanel();
  cardPanel.setBorder(new EmptyBorder(new Insets(5,10,5,10)));
  cardLayout=new CardLayout();
  cardPanel.add(createMultiTablesPanel(),MULTITABLEVIEW);
  cardPanel.add(createSingleTablePanel(),SINGLETABLEVIEW);
  cardPanel.setLayout(cardLayout);
  messageTablesPanel.add(cardPanel,BorderLayout.CENTER);
  return messageTablesPanel;
}
Program: 9852
Project: 9852
Buggy source:
private JPanel createMultiTablesPanel(){
  JPanel tablesHolderPanel=new JPanel();
  tablesHolderPanel.setLayout(new GridLayout(5,2,5,5));
  tab1=new ResultTable();
  tab1.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab1));
  tab2=new ResultTable();
  tab2.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab2));
  tab3=new ResultTable();
  tab3.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab3));
  tab4=new ResultTable();
  tab4.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab4));
  tab5=new ResultTable();
  tab5.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab5));
  tab6=new ResultTable();
  tab6.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab6));
  tab7=new ResultTable();
  tab7.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab7));
  tab8=new ResultTable();
  tab8.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab8));
  tab9=new ResultTable();
  tab9.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab9));
  tab10=new ResultTable();
  tab10.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab10));
  return tablesHolderPanel;
}

Fixed version (ground truth):
private JPanel createMultiTablesPanel(){
  JPanel tablesHolderPanel=new JPanel();
  tablesHolderPanel.setLayout(new GridLayout(5,2,5,5));
  tablesHolderPanel.addMouseMotionListener(this);
  tab1=new ResultTable();
  tab1.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab1));
  tab2=new ResultTable();
  tab2.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab2));
  tab3=new ResultTable();
  tab3.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab3));
  tab4=new ResultTable();
  tab4.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab4));
  tab5=new ResultTable();
  tab5.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab5));
  tab6=new ResultTable();
  tab6.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab6));
  tab7=new ResultTable();
  tab7.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab7));
  tab8=new ResultTable();
  tab8.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab8));
  tab9=new ResultTable();
  tab9.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab9));
  tab10=new ResultTable();
  tab10.addMouseMotionListener(this);
  tablesHolderPanel.add(createSelectablePanel(tab10));
  return tablesHolderPanel;
}