nus-yam/ex-repair huggingface dataset:
Program: 13045
Project: 13045
Buggy source:
@Override public void networkDiscovered(NetworkDiscoveryResult result){
  File outFile=new File(projectPath,labelDirName + File.separator + graphmlDataDirName+ File.separator+ ProjectConstants.networkGraphmlFileName);
  File dir=new File(projectPath,labelDirName + File.separator + graphmlDataDirName);
  File[] files=dir.listFiles(new FileFilter(){
    @Override public boolean accept(    File pathname){
      return pathname.getName().endsWith("String_Node_Str");
    }
  }
);
  if (files == null) {
    return;
  }
  try {
    new GrahmlMerge().merge(files,outFile,vertexTypes,edgesTypes,"String_Node_Str");
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void networkDiscovered(NetworkDiscoveryResult result){
  File outFile=new File(projectPath,labelDirName + File.separator + graphmlDataDirName+ File.separator+ ProjectConstants.networkGraphmlFileName);
  File dir=new File(projectPath,labelDirName + File.separator + graphmlDataDirName);
  File[] files=dir.listFiles(new FileFilter(){
    @Override public boolean accept(    File pathname){
      return pathname.getName().endsWith("String_Node_Str");
    }
  }
);
  if (files == null) {
    logger.error("String_Node_Str");
    return;
  }
  try {
    new GrahmlMerge().merge(files,outFile,vertexTypes,edgesTypes,"String_Node_Str");
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 13046
Project: 13046
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) @ResponseBody public void createConnection(@RequestBody String name,@RequestBody ConnectionDetails connectionDetails){
  getConnectionDetailsManager().createConnection(name,connectionDetails);
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) @ResponseBody public void createConnection(@RequestBody String name){
  getConnectionDetailsManager().createConnection(name,null);
}
Program: 13047
Project: 13047
Buggy source:
public CmdRightClickHandler(ResourceManager resourceManager){
  this.resourceManager=resourceManager;
}

Fixed version (ground truth):
public CmdRightClickHandler(ResourceManager resourceManager,ResourceResolver resourceResolver){
  this.resourceManager=resourceManager;
  this.resourceResolver=resourceResolver;
}
Program: 13052
Project: 13052
Buggy source:
@Override public void actionPerformed(ActionEvent e){
  DiffWizardDialog wizardDialog;
  try {
    File baseDir=frame.getPath();
    wizardDialog=new DiffWizardDialog(frame,baseDir);
  }
 catch (  MalformedURLException e1) {
    e1.printStackTrace();
    return;
  }
  wizardDialog.setVisible(true);
  System.out.println(frame.getPath());
  System.out.println(wizardDialog.getDiffPath1());
  System.out.println(wizardDialog.getDiffPath2());
  System.out.println(wizardDialog.getDiffPath3());
  System.out.println(wizardDialog.getResult() == DiffWizardDialog.Result.DONE);
  if (wizardDialog.getResult() == DiffWizardDialog.Result.DONE) {
    frame.doOpenGraph(new File(wizardDialog.getDiffPath3() + File.separator + "String_Node_Str"));
  }
}

Fixed version (ground truth):
@Override public void actionPerformed(ActionEvent e){
  DiffWizardDialog wizardDialog;
  try {
    File baseDir=frame.getPath();
    wizardDialog=new DiffWizardDialog(frame,baseDir);
  }
 catch (  MalformedURLException e1) {
    e1.printStackTrace();
    return;
  }
  wizardDialog.setVisible(true);
  System.out.println(frame.getPath());
  System.out.println(wizardDialog.getDiffPath1());
  System.out.println(wizardDialog.getDiffPath2());
  System.out.println(wizardDialog.getDiffPath3());
  System.out.println(wizardDialog.getResult() == DiffWizardDialog.Result.DONE);
  if (wizardDialog.getResult() == DiffWizardDialog.Result.DONE) {
    frame.doOpenGraph(new File(wizardDialog.getDiffPath3() + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str"));
  }
}
Program: 13053
Project: 13053
Buggy source:
public static void main(String[] args) throws IOException, JAXBException {
  FileInputStream is=null;
  try {
    is=new FileInputStream("String_Node_Str");
    ResourcesType resources=JaxbMarshalar.unmarshal(ResourcesType.class,is);
    final DiscoveryResourcePanel panel=new DiscoveryResourcePanel();
    panel.setResources(resources);
    EventQueue.invokeLater(new Runnable(){
      public void run(){
        try {
          JFrame frame=new JFrame();
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setBounds(100,100,645,622);
          JPanel contentPane=new JPanel();
          contentPane.setBorder(new EmptyBorder(5,5,5,5));
          frame.setContentPane(contentPane);
          contentPane.setLayout(null);
          panel.setBounds(10,11,617,648);
          contentPane.add(panel);
          frame.setVisible(true);
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
);
  }
  finally {
    if (is != null)     is.close();
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws IOException, JAXBException {
  FileInputStream is=null;
  try {
    is=new FileInputStream("String_Node_Str");
    ResourcesType resources=JaxbMarshalar.unmarshal(ResourcesType.class,is);
    final DiscoveryResourcePanel panel=new DiscoveryResourcePanel();
    panel.setResources(resources);
    EventQueue.invokeLater(new Runnable(){
      public void run(){
        try {
          JFrame frame=new JFrame();
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setBounds(100,100,945,622);
          JPanel contentPane=new JPanel();
          contentPane.setBorder(new EmptyBorder(5,5,5,5));
          frame.setContentPane(contentPane);
          contentPane.setLayout(null);
          panel.setBounds(10,11,917,648);
          contentPane.add(panel);
          frame.setVisible(true);
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
);
  }
  finally {
    if (is != null)     is.close();
  }
}
Program: 13054
Project: 13054
Buggy source:
public void run(){
  try {
    JFrame frame=new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setBounds(100,100,645,622);
    JPanel contentPane=new JPanel();
    contentPane.setBorder(new EmptyBorder(5,5,5,5));
    frame.setContentPane(contentPane);
    contentPane.setLayout(null);
    panel.setBounds(10,11,617,648);
    contentPane.add(panel);
    frame.setVisible(true);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void run(){
  try {
    JFrame frame=new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setBounds(100,100,945,622);
    JPanel contentPane=new JPanel();
    contentPane.setBorder(new EmptyBorder(5,5,5,5));
    frame.setContentPane(contentPane);
    contentPane.setLayout(null);
    panel.setBounds(10,11,917,648);
    contentPane.add(panel);
    frame.setVisible(true);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 13055
Project: 13055
Buggy source:
private void onSelectedResource(int index){
  updateCurrentResource();
  currentResourceIndex=index;
  mCurrentConnectionTypeIndex=0;
  updateResourceTable();
}

Fixed version (ground truth):
private void onSelectedResource(int index){
  if (index != -1) {
    updateCurrentResource();
  }
  currentResourceIndex=index;
  mCurrentConnectionTypeIndex=0;
  updateResourceTable();
}
Program: 13056
Project: 13056
Buggy source:
public void doOpenGraph(File selectedFile){
  try {
    logger.info("String_Node_Str" + projectType + "String_Node_Str"+ viewerConfig+ "String_Node_Str"+ selectedFile);
    GraphViewerPanelManager<UndirectedGraph<String,String>> viewerPanelManager=new GraphViewerPanelManager<UndirectedGraph<String,String>>(this,projectType,path,viewerConfig,selectedFile,UndirectedSparseMultigraph.<String,String>getFactory(),tabbedPane,GraphType.UNDIRECTED);
    viewerPanelManagerMap.put(viewerPanelManager.getVersionDir().getAbsolutePath(),viewerPanelManager);
    viewerPanelManager.createAndAddViewerPanel();
  }
 catch (  Exception e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this,"String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
public void doOpenGraph(File selectedFile){
  try {
    GraphmlEdgeDefaultResolver graphTypeResolver=new GraphmlEdgeDefaultResolver();
    String graphType=graphTypeResolver.resolveEdgeDefault(selectedFile);
    if (graphType.equals("String_Node_Str")) {
      logger.info("String_Node_Str" + projectType + "String_Node_Str"+ viewerConfig+ "String_Node_Str"+ selectedFile);
      GraphViewerPanelManager<UndirectedGraph<String,String>> viewerPanelManager=new GraphViewerPanelManager<UndirectedGraph<String,String>>(this,projectType,path,viewerConfig,selectedFile,UndirectedSparseMultigraph.<String,String>getFactory(),tabbedPane,GraphType.UNDIRECTED);
      viewerPanelManagerMap.put(viewerPanelManager.getVersionDir().getAbsolutePath(),viewerPanelManager);
      viewerPanelManager.createAndAddViewerPanel();
    }
 else     if (selectedFile.getAbsolutePath().contains("String_Node_Str")) {
      GraphViewerPanelManager<DirectedGraph<String,String>> viewerPanelManager=new GraphViewerPanelManager<DirectedGraph<String,String>>(this,projectType,path,viewerConfig,selectedFile,DirectedSparseMultigraph.<String,String>getFactory(),tabbedPane,GraphType.DIRECTED);
      viewerPanelManagerMap.put(viewerPanelManager.getVersionDir().getAbsolutePath(),viewerPanelManager);
      viewerPanelManager.createAndAddViewerPanel();
    }
 else {
      logger.error(String.format("String_Node_Str",selectedFile.getName()));
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this,"String_Node_Str" + e.getMessage());
  }
}
Program: 13059
Project: 13059
Buggy source:
private static Map<String,String> parse(String line,String body){
  String[] fields=body.split("String_Node_Str");
  Map<String,String> attributes=new HashMap<String,String>();
  for (  String field : fields) {
    String[] nameValPair=field.split("String_Node_Str");
    if (nameValPair.length != 2) {
      throw new RuntimeException("String_Node_Str" + field + "String_Node_Str"+ line);
    }
    attributes.put(nameValPair[0].trim(),nameValPair[1].trim());
  }
  return attributes;
}

Fixed version (ground truth):
private static Map<String,String> parse(String line,String body){
  String[] fields=body.split("String_Node_Str");
  Map<String,String> attributes=new LinkedHashMap<String,String>();
  for (  String field : fields) {
    String[] nameValPair=field.split("String_Node_Str");
    if (nameValPair.length != 2) {
      throw new RuntimeException("String_Node_Str" + field + "String_Node_Str"+ line);
    }
    attributes.put(nameValPair[0].trim(),nameValPair[1].trim());
  }
  return attributes;
}
Program: 13061
Project: 13061
Buggy source:
/** 
 * Launch the application.
 */
public static void main(String[] args){
  try {
    java.util.Map<String,ConnectionDetails> connectionDetailsList=CvsConnectionDetailsFactory.createConnectionDetail(new File("String_Node_Str"));
    ConnectionDetailsDialog dialog=new ConnectionDetailsDialog(connectionDetailsList,true);
    int option=dialog.showDialog();
    if (option == JOptionPane.OK_OPTION) {
      System.out.println(dialog.getConnDetails());
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Launch the application.
 */
public static void main(String[] args){
  try {
    UIManager.put("String_Node_Str",new ColorUIResource(Color.gray));
    java.util.Map<String,ConnectionDetails> connectionDetailsList=CvsConnectionDetailsFactory.createConnectionDetail(new File("String_Node_Str"));
    ConnectionDetailsDialog dialog=new ConnectionDetailsDialog(connectionDetailsList,true);
    int option=dialog.showDialog();
    if (option == JOptionPane.OK_OPTION) {
      System.out.println(dialog.getConnDetails());
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 13062
Project: 13062
Buggy source:
private GraphViewerPanel createViewerPanel(){
  return new GraphViewerPanel<G>(frame,viewerConfig,graphmlLoader,iconMapLoader,edgeStrokeMapLoader,edgeColorMapLoader,entireGraph,projectPath,graphmlsFile,graphmlDir,initialNode);
}

Fixed version (ground truth):
private GraphViewerPanel createViewerPanel(){
  return new GraphViewerPanel<G>(frame,viewerConfig,graphmlLoader,iconMapLoader,edgeStrokeMapLoader,edgeColorMapLoader,entireGraph,projectPath,versionDir,graphmlDir,initialNode);
}
Program: 13063
Project: 13063
Buggy source:
public GraphViewerPanelManager(JFrame frame,File projectPath,File graphmlsFile,Factory<G> factory,JTabbedPane tabbedPane,GraphType graphType) throws Exception {
  this.frame=frame;
  this.projectPath=projectPath;
  this.graphType=graphType;
  this.graphmlsFile=graphmlsFile;
  if (graphType == GraphType.DIRECTED) {
    this.graphmlDir=new File(graphmlsFile.getParent(),"String_Node_Str");
  }
 else {
    this.graphmlDir=new File(graphmlsFile.getParent(),"String_Node_Str");
  }
  this.factory=factory;
  this.tabbedPane=tabbedPane;
  entireGraph=factory.create();
  String fName;
  fName=new File("String_Node_Str").toString();
  viewerConfig=ViewerConfigLoader.loadViewerConfig(new File(this.projectPath,fName));
  init();
}

Fixed version (ground truth):
public GraphViewerPanelManager(JFrame frame,File projectPath,File graphmlsFile,Factory<G> factory,JTabbedPane tabbedPane,GraphType graphType) throws Exception {
  this.frame=frame;
  this.projectPath=projectPath;
  this.graphType=graphType;
  this.graphmlsFile=graphmlsFile;
  versionDir=new File(graphmlsFile.getParent());
  if (graphType == GraphType.DIRECTED) {
    this.graphmlDir=new File(versionDir,"String_Node_Str");
  }
 else {
    this.graphmlDir=new File(versionDir,"String_Node_Str");
  }
  this.factory=factory;
  this.tabbedPane=tabbedPane;
  entireGraph=factory.create();
  String fName;
  fName=new File("String_Node_Str").toString();
  viewerConfig=ViewerConfigLoader.loadViewerConfig(new File(this.projectPath,fName));
  init();
}
Program: 13064
Project: 13064
Buggy source:
public void doOpenGraph(File selectedFile){
  try {
    if (selectedFile.getName().startsWith("String_Node_Str")) {
      GraphViewerPanelManager<UndirectedGraph<String,String>> viewerPanelManager=new GraphViewerPanelManager<UndirectedGraph<String,String>>(this,path,selectedFile,UndirectedSparseGraph.<String,String>getFactory(),tabbedPane,GraphType.UNDIRECTED);
      viewerPanelManagerMap.put(selectedFile.getAbsolutePath(),viewerPanelManager);
      viewerPanelManager.createAndAddViewerPanel();
    }
 else     if (selectedFile.getName().startsWith("String_Node_Str")) {
      GraphViewerPanelManager<DirectedGraph<String,String>> viewerPanelManager=new GraphViewerPanelManager<DirectedGraph<String,String>>(this,path,selectedFile,DirectedSparseMultigraph.<String,String>getFactory(),tabbedPane,GraphType.DIRECTED);
      viewerPanelManagerMap.put(selectedFile.getAbsolutePath(),viewerPanelManager);
      viewerPanelManager.createAndAddViewerPanel();
    }
 else {
      JOptionPane.showMessageDialog(this,String.format("String_Node_Str",selectedFile.getName()));
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this,"String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
public void doOpenGraph(File selectedFile){
  try {
    if (selectedFile.getName().startsWith("String_Node_Str")) {
      GraphViewerPanelManager<UndirectedGraph<String,String>> viewerPanelManager=new GraphViewerPanelManager<UndirectedGraph<String,String>>(this,path,selectedFile,UndirectedSparseGraph.<String,String>getFactory(),tabbedPane,GraphType.UNDIRECTED);
      viewerPanelManagerMap.put(viewerPanelManager.getVersionDir().getAbsolutePath(),viewerPanelManager);
      viewerPanelManager.createAndAddViewerPanel();
    }
 else     if (selectedFile.getName().startsWith("String_Node_Str")) {
      GraphViewerPanelManager<DirectedGraph<String,String>> viewerPanelManager=new GraphViewerPanelManager<DirectedGraph<String,String>>(this,path,selectedFile,DirectedSparseMultigraph.<String,String>getFactory(),tabbedPane,GraphType.DIRECTED);
      viewerPanelManagerMap.put(viewerPanelManager.getVersionDir().getAbsolutePath(),viewerPanelManager);
      viewerPanelManager.createAndAddViewerPanel();
    }
 else {
      JOptionPane.showMessageDialog(this,String.format("String_Node_Str",selectedFile.getName()));
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this,"String_Node_Str" + e.getMessage());
  }
}
Program: 13065
Project: 13065
Buggy source:
private void storeDiscoveryParameters(DiscoveryHelperType discoveryHelperType){
  FileOutputStream os=null;
  File file;
  file=new File(frame.getPath(),"String_Node_Str");
  try {
    os=new FileOutputStream(file);
    JaxbMarshalar.marshal(discoveryHelperType,os,"String_Node_Str");
    JOptionPane.showMessageDialog(this.frame,"String_Node_Str");
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this.frame,"String_Node_Str" + file.getAbsolutePath());
  }
catch (  JAXBException e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this.frame,"String_Node_Str" + file.getAbsolutePath());
  }
 finally {
    if (os != null)     try {
      os.close();
    }
 catch (    IOException e) {
    }
  }
}

Fixed version (ground truth):
private void storeDiscoveryParameters(DiscoveryHelperType discoveryHelperType){
  FileOutputStream os=null;
  File file;
  file=new File(getPath(),"String_Node_Str");
  try {
    os=new FileOutputStream(file);
    JaxbMarshalar.marshal(discoveryHelperType,os,"String_Node_Str");
    JOptionPane.showMessageDialog(this.frame,"String_Node_Str");
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this.frame,"String_Node_Str" + file.getAbsolutePath());
  }
catch (  JAXBException e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this.frame,"String_Node_Str" + file.getAbsolutePath());
  }
 finally {
    if (os != null)     try {
      os.close();
    }
 catch (    IOException e) {
    }
  }
}
Program: 13066
Project: 13066
Buggy source:
private DiscoveryHelperType loadDiscoveryParameters(){
  FileInputStream is=null;
  File file;
  file=new File(frame.getPath(),"String_Node_Str");
  try {
    is=new FileInputStream(file);
    DiscoveryHelperType discoveryHelperType=JaxbMarshalar.unmarshal(DiscoveryHelperType.class,is);
    return discoveryHelperType;
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this.frame,"String_Node_Str" + file.getAbsolutePath());
  }
catch (  JAXBException e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this.frame,"String_Node_Str" + file.getAbsolutePath());
  }
 finally {
    if (is != null)     try {
      is.close();
    }
 catch (    IOException e) {
    }
  }
  return null;
}

Fixed version (ground truth):
private DiscoveryHelperType loadDiscoveryParameters(){
  FileInputStream is=null;
  File file;
  file=new File(getPath(),"String_Node_Str");
  try {
    is=new FileInputStream(file);
    DiscoveryHelperType discoveryHelperType=JaxbMarshalar.unmarshal(DiscoveryHelperType.class,is);
    return discoveryHelperType;
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this.frame,"String_Node_Str" + file.getAbsolutePath());
  }
catch (  JAXBException e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this.frame,"String_Node_Str" + file.getAbsolutePath());
  }
 finally {
    if (is != null)     try {
      is.close();
    }
 catch (    IOException e) {
    }
  }
  return null;
}
Program: 13067
Project: 13067
Buggy source:
private void updateOidsTable(){
  DiscoveryMethodType discoveryMethod=getCurrentDiscoveryMethod();
  if (discoveryMethod != null) {
    String discoveryMethodValueList=discoveryMethod.getValue();
    String[] oids=discoveryMethodValueList.split("String_Node_Str");
    Vector oidsTableModelData=oidsTableModel.getDataVector();
    oidsTableModelData.removeAllElements();
    for (    String oid : oids) {
      Vector vec=new Vector();
      vec.add(oid);
      oidsTableModelData.add(0,vec);
    }
    oidsTableModel.fireTableDataChanged();
  }
}

Fixed version (ground truth):
private void updateOidsTable(){
  DiscoveryMethodType discoveryMethod=getCurrentDiscoveryMethod();
  if (discoveryMethod != null) {
    String discoveryMethodValueList=discoveryMethod.getValue();
    String[] oids=discoveryMethodValueList.split("String_Node_Str");
    Vector oidsTableModelData=oidsTableModel.getDataVector();
    oidsTableModelData.removeAllElements();
    for (    String oid : oids) {
      Vector vec=new Vector();
      vec.add(oid);
      oidsTableModelData.add(vec);
    }
    oidsTableModel.fireTableDataChanged();
  }
}
Program: 13068
Project: 13068
Buggy source:
private void updateCurrentDiscoveryMethod(){
  DeviceType device=getCurrentDevice();
  if (device != null) {
    Vector discoveryMethodsRows=discoveryMethodTableModel.getDataVector();
    for (int i=0; i < discoveryMethodsRows.size(); i++) {
      String discoveryMethodName=(String)((Vector)discoveryMethodsRows.get(i)).get(0);
      device.getDiscoveryMethod().get(discoveryMethodsRows.size() - i - 1).setName(discoveryMethodName);
    }
  }
}

Fixed version (ground truth):
private void updateCurrentDiscoveryMethod(){
  DeviceType device=getCurrentDevice();
  if (device != null) {
    Vector discoveryMethodsRows=discoveryMethodTableModel.getDataVector();
    for (int i=0; i < discoveryMethodsRows.size(); i++) {
      String discoveryMethodName=(String)((Vector)discoveryMethodsRows.get(i)).get(0);
      device.getDiscoveryMethod().get(i).setName(discoveryMethodName);
    }
  }
}
Program: 13069
Project: 13069
Buggy source:
private void onSelectedDiscoveryMethod(int index){
  updateCurrentOids();
  currentDiscoveryMethodIndex=index;
  updateOidsTable();
}

Fixed version (ground truth):
private void onSelectedDiscoveryMethod(int index){
  if (currentDiscoveryMethodIndex != -1)   updateCurrentOids();
  currentDiscoveryMethodIndex=index;
  updateOidsTable();
}
Program: 13070
Project: 13070
Buggy source:
private void updateDiscoveryMethodTable(){
  DeviceType deviceType=getCurrentDevice();
  List<DiscoveryMethodType> discoveryMethodTypeList=deviceType.getDiscoveryMethod();
  Vector discoveryMethodTableModelData=discoveryMethodTableModel.getDataVector();
  discoveryMethodTableModelData.removeAllElements();
  for (  DiscoveryMethodType discoveryMethodType : discoveryMethodTypeList) {
    Vector vec=new Vector();
    vec.add(discoveryMethodType.getName());
    discoveryMethodTableModelData.add(0,vec);
  }
  discoveryMethodTableModel.fireTableDataChanged();
}

Fixed version (ground truth):
private void updateDiscoveryMethodTable(){
  DeviceType deviceType=getCurrentDevice();
  List<DiscoveryMethodType> discoveryMethodTypeList=deviceType.getDiscoveryMethod();
  Vector discoveryMethodTableModelData=discoveryMethodTableModel.getDataVector();
  discoveryMethodTableModelData.removeAllElements();
  for (  DiscoveryMethodType discoveryMethodType : discoveryMethodTypeList) {
    Vector vec=new Vector();
    vec.add(discoveryMethodType.getName());
    discoveryMethodTableModelData.add(vec);
  }
  discoveryMethodTableModel.fireTableDataChanged();
}
Program: 13071
Project: 13071
Buggy source:
private void onSelectedDevice(int index){
  updateCurrentDiscoveryMethod();
  updateCurrentOids();
  currentDeviceIndex=index;
  currentDiscoveryMethodIndex=-1;
  updateDiscoveryMethodTable();
  clearOidsTable();
}

Fixed version (ground truth):
private void onSelectedDevice(int index){
  if (currentDeviceIndex != -1) {
    updateCurrentDiscoveryMethod();
    updateCurrentOids();
  }
  currentDeviceIndex=index;
  currentDiscoveryMethodIndex=-1;
  updateDiscoveryMethodTable();
  clearOidsTable();
}
Program: 13072
Project: 13072
Buggy source:
private void updateCurrentOids(){
  DiscoveryMethodType discoveryMethod=getCurrentDiscoveryMethod();
  if (discoveryMethod != null) {
    StringBuilder sbs=new StringBuilder();
    Vector oidsTableModelData=oidsTableModel.getDataVector();
    for (int i=oidsTableModelData.size() - 1; i >= 0; i--) {
      Vector row=(Vector)oidsTableModelData.get(i);
      sbs.append(row.get(0));
      if (i > 0)       sbs.append("String_Node_Str");
    }
    discoveryMethod.setValue(sbs.toString());
  }
}

Fixed version (ground truth):
private void updateCurrentOids(){
  DiscoveryMethodType discoveryMethod=getCurrentDiscoveryMethod();
  if (discoveryMethod != null) {
    StringBuilder sbs=new StringBuilder();
    Vector oidsTableModelData=oidsTableModel.getDataVector();
    for (int i=0; i < oidsTableModelData.size(); i++) {
      Vector row=(Vector)oidsTableModelData.get(i);
      sbs.append(row.get(0));
      if (i < oidsTableModelData.size())       sbs.append("String_Node_Str");
    }
    discoveryMethod.setValue(sbs.toString());
  }
}
Program: 13073
Project: 13073
Buggy source:
public void bindFrom(DiscoveryHelperType discoveryHelperType){
  List<DeviceType> deviceTypeList=discoveryHelperType.getDevice();
  Vector devicesTableModelData=devicesTableModel.getDataVector();
  devicesTableModelData.removeAllElements();
  for (  DeviceType deviceType : deviceTypeList) {
    Vector vec=new Vector();
    vec.add(deviceType.getType());
    devicesTableModelData.add(0,vec);
  }
}

Fixed version (ground truth):
public void bindFrom(DiscoveryHelperType discoveryHelperType){
  List<DeviceType> deviceTypeList=discoveryHelperType.getDevice();
  Vector devicesTableModelData=devicesTableModel.getDataVector();
  devicesTableModelData.removeAllElements();
  for (  DeviceType deviceType : deviceTypeList) {
    Vector vec=new Vector();
    vec.add(deviceType.getType());
    devicesTableModelData.add(vec);
  }
}
Program: 13074
Project: 13074
Buggy source:
private void doDiff(){
  progressMonitor=new ProgressMonitor(this,"String_Node_Str","String_Node_Str",0,1000);
  progressMonitor.setMillisToPopup(0);
  new File(getDiffPath3()).mkdirs();
  String path1=getDiffPath1();
  File path1File=new File(path1);
  File diffPath1;
  if (path1File.getName().startsWith("String_Node_Str")) {
    diffPath1=new File(path1File.getParent(),"String_Node_Str");
  }
 else {
    diffPath1=new File(path1File.getParent(),"String_Node_Str");
  }
  String path2=getDiffPath2();
  File path2File=new File(path2);
  File diffPath2;
  if (path2File.getName().startsWith("String_Node_Str")) {
    diffPath2=new File(path2File.getParent(),"String_Node_Str");
  }
 else {
    diffPath2=new File(path2File.getParent(),"String_Node_Str");
  }
  task=new GraphMLDiffTool(diffPath1.getAbsolutePath(),diffPath2.getAbsolutePath(),getDiffPath3(),getIgnoredKeysPath());
  task.addPropertyChangeListener(this);
  task.execute();
}

Fixed version (ground truth):
private void doDiff(){
  progressMonitor=new ProgressMonitor(this,"String_Node_Str","String_Node_Str",0,1000);
  progressMonitor.setMillisToPopup(0);
  new File(getDiffPath3()).mkdirs();
  String path1=getDiffPath1();
  File path1File=new File(path1);
  File diffPath1;
  if (path1File.getName().startsWith("String_Node_Str")) {
    diffPath1=new File(path1File.getParent(),"String_Node_Str");
  }
 else {
    diffPath1=new File(path1File.getParent(),"String_Node_Str");
  }
  String path2=getDiffPath2();
  File path2File=new File(path2);
  File diffPath2;
  if (path2File.getName().startsWith("String_Node_Str")) {
    diffPath2=new File(path2File.getParent(),"String_Node_Str");
  }
 else {
    diffPath2=new File(path2File.getParent(),"String_Node_Str");
  }
  task=new GraphMLDiffTool(baseDir,diffPath1.getAbsolutePath(),diffPath2.getAbsolutePath(),getDiffPath3(),getIgnoredKeysPath());
  task.addPropertyChangeListener(this);
  task.execute();
}
Program: 13076
Project: 13076
Buggy source:
public GraphMLDiffTool(String dirAPath,String dirBPath,String dirCPath,String ignoredKeysPath){
  this.dirAPath=dirAPath;
  this.dirBPath=dirBPath;
  this.dirCPath=dirCPath;
  this.ignoredKeysPath=ignoredKeysPath;
}

Fixed version (ground truth):
public GraphMLDiffTool(File baseDir,String dirAPath,String dirBPath,String dirCPath,String ignoredKeysPath){
  this.baseDir=baseDir;
  this.dirAPath=dirAPath;
  this.dirBPath=dirBPath;
  this.dirCPath=dirCPath;
  this.ignoredKeysPath=ignoredKeysPath;
}
Program: 13077
Project: 13077
Buggy source:
public static void main(String[] args) throws IOException {
  Map<String,String> params=new HashMap<String,String>();
  String key=null;
  for (  String arg : args) {
    if (key == null && arg.startsWith("String_Node_Str")) {
      key=arg;
    }
 else {
      params.put(key,arg);
      key=null;
    }
  }
  String dirAPath=params.get("String_Node_Str");
  String dirBPath=params.get("String_Node_Str");
  String dirCPath=params.get("String_Node_Str");
  String ignoredKeysPath=params.get("String_Node_Str");
  GraphMLDiffTool graphMLDiffTool=new GraphMLDiffTool(dirAPath,dirBPath,dirCPath,ignoredKeysPath);
  graphMLDiffTool.execute();
  long time=System.currentTimeMillis();
  graphMLDiffTool.doInBackground();
  System.out.println("String_Node_Str" + (System.currentTimeMillis() - time) + "String_Node_Str");
}

Fixed version (ground truth):
public static void main(String[] args) throws IOException {
  Map<String,String> params=new HashMap<String,String>();
  String key=null;
  for (  String arg : args) {
    if (key == null && arg.startsWith("String_Node_Str")) {
      key=arg;
    }
 else {
      params.put(key,arg);
      key=null;
    }
  }
  String dirAPath=params.get("String_Node_Str");
  String dirBPath=params.get("String_Node_Str");
  String dirCPath=params.get("String_Node_Str");
  String ignoredKeysPath=params.get("String_Node_Str");
  GraphMLDiffTool graphMLDiffTool=new GraphMLDiffTool(null,dirAPath,dirBPath,dirCPath,ignoredKeysPath);
  graphMLDiffTool.execute();
  long time=System.currentTimeMillis();
  graphMLDiffTool.doInBackground();
  System.out.println("String_Node_Str" + (System.currentTimeMillis() - time) + "String_Node_Str");
}
Program: 13078
Project: 13078
Buggy source:
private static void createNewGraphml(String newfile,String status,URI file,File OutputFile) throws FileNotFoundException {
  File transformator=new File("String_Node_Str");
  ByteArrayInputStream fileInputStream=null;
  FileOutputStream fileOutputStream=null;
  String dummyXml="String_Node_Str";
  fileInputStream=new ByteArrayInputStream(dummyXml.getBytes());
  fileOutputStream=new FileOutputStream(OutputFile);
  XsltTransformer transformer=new XsltTransformer();
  HashMap<String,String> xsltParams;
  xsltParams=new HashMap<String,String>();
  xsltParams.put("String_Node_Str",file.toString());
  xsltParams.put("String_Node_Str",status);
  xsltParams.put("String_Node_Str","String_Node_Str");
  try {
    transformer.transformXML(fileInputStream,transformator,fileOutputStream,xsltParams,null);
  }
 catch (  ParserConfigurationException e) {
    e.printStackTrace();
  }
catch (  SAXException e) {
    e.printStackTrace();
  }
catch (  TransformerException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    try {
      fileInputStream.close();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    try {
      fileOutputStream.close();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
private void createNewGraphml(String newfile,String status,URI file,File OutputFile) throws FileNotFoundException {
  File transformator=new File(baseDir,"String_Node_Str");
  ByteArrayInputStream fileInputStream=null;
  FileOutputStream fileOutputStream=null;
  String dummyXml="String_Node_Str";
  fileInputStream=new ByteArrayInputStream(dummyXml.getBytes());
  fileOutputStream=new FileOutputStream(OutputFile);
  XsltTransformer transformer=new XsltTransformer();
  HashMap<String,String> xsltParams;
  xsltParams=new HashMap<String,String>();
  xsltParams.put("String_Node_Str",file.toString());
  xsltParams.put("String_Node_Str",status);
  xsltParams.put("String_Node_Str","String_Node_Str");
  try {
    transformer.transformXML(fileInputStream,transformator,fileOutputStream,xsltParams,null);
  }
 catch (  ParserConfigurationException e) {
    e.printStackTrace();
  }
catch (  SAXException e) {
    e.printStackTrace();
  }
catch (  TransformerException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    try {
      fileInputStream.close();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
    try {
      fileOutputStream.close();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}
Program: 13079
Project: 13079
Buggy source:
private void doDiff(){
  progressMonitor=new ProgressMonitor(this,"String_Node_Str","String_Node_Str",0,1000);
  progressMonitor.setMillisToPopup(0);
  task=new GraphMLDiffTool(getDiffPath1(),getDiffPath2(),getDiffPath3(),getIgnoredKeysPath());
  task.addPropertyChangeListener(this);
  task.execute();
}

Fixed version (ground truth):
private void doDiff(){
  progressMonitor=new ProgressMonitor(this,"String_Node_Str","String_Node_Str",0,1000);
  progressMonitor.setMillisToPopup(0);
  new File(getDiffPath3()).mkdirs();
  task=new GraphMLDiffTool(getDiffPath1(),getDiffPath2(),getDiffPath3(),getIgnoredKeysPath());
  task.addPropertyChangeListener(this);
  task.execute();
}
Program: 13081
Project: 13081
Buggy source:
public <G>void handleRightClick(JFrame parent,String v,Map<String,String> graphMLParams,Map<String,String> rightClickParams,File deviceDataXmlFileName) throws Exception {
}

Fixed version (ground truth):
public <G>void handleRightClick(JFrame parent,String v,Map<String,String> graphMLParams,Map<String,String> rightClickParams,File deviceDataXmlFileName) throws Exception {
  TopologyManagerFrame viewer=(TopologyManagerFrame)parent;
  viewer.getCurrentGraphViewerManager().createAndAddViewerPanel();
}
Program: 13083
Project: 13083
Buggy source:
@Override public void insertUpdate(DocumentEvent e){
  System.out.println("String_Node_Str");
  final String path1=diffPathTextField1.getText();
  final String path2=diffPathTextField2.getText();
  final String ignoredKeysFile=ignoredKeysTextField.getText();
  File file1=new File(path1);
  File file2=new File(path2);
  diffPathTextField3.setText(new File(new File(file1.getParent()).getParent(),new File(file1.getParent()).getName() + "String_Node_Str" + new File(file2.getParent()).getName()).getAbsolutePath());
  preferences.setProperty(PreferencesKeys.DIFF_PATH3.name(),diffPathTextField3.getText());
  try {
    preferences.store(new FileOutputStream(TopologyManagerFrame.VIEWER_PREFERENCES_PROPERTIES),"String_Node_Str");
  }
 catch (  IOException e1) {
    e1.printStackTrace();
    JOptionPane.showMessageDialog(owner,"String_Node_Str" + e1.getMessage(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
  }
}

Fixed version (ground truth):
@Override public void insertUpdate(DocumentEvent e){
  System.out.println("String_Node_Str");
  final String path1=diffPathTextField1.getText();
  final String path2=diffPathTextField2.getText();
  File file1=new File(path1);
  File file2=new File(path2);
  String graphType=null;
  if (path1.endsWith("String_Node_Str") && path1.endsWith("String_Node_Str")) {
    graphType="String_Node_Str";
  }
 else   if (path1.endsWith("String_Node_Str") && path1.endsWith("String_Node_Str")) {
    graphType="String_Node_Str";
  }
  if (graphType != null) {
    diffPathTextField3.setText(new File(new File(new File(file1.getParent()).getParent(),new File(file1.getParent()).getName() + "String_Node_Str" + new File(file2.getParent()).getName()),"String_Node_Str" + graphType).getAbsolutePath());
  }
  preferences.setProperty(PreferencesKeys.DIFF_PATH3.name(),diffPathTextField3.getText());
  try {
    preferences.store(new FileOutputStream(TopologyManagerFrame.VIEWER_PREFERENCES_PROPERTIES),"String_Node_Str");
  }
 catch (  IOException e1) {
    e1.printStackTrace();
    JOptionPane.showMessageDialog(owner,"String_Node_Str" + e1.getMessage(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
  }
}
Program: 13084
Project: 13084
Buggy source:
public GraphViewerPanel(JFrame parent,TopologyViewerConfType viewerConfig,GraphmlLoader<G> graphmlLoader,IconMapLoader iconMapLoader,EdgeStrokeMapLoader edgeStrokeMapLoader,EdgeColorMapLoader edgeColorMapLoader,G entireGraph,File path,String initialNode){
  super();
  this.parent=parent;
  this.viewerConfig=viewerConfig;
  this.graphmlLoader=graphmlLoader;
  this.entireGraph=entireGraph;
  this.initialNode=initialNode;
  this.deviceXmlPath=new File(path,"String_Node_Str");
  this.path=path;
  vv=new MyVisualizationViewer(viewerConfig,entireGraph,graphmlLoader.getVertexMetadatas(),graphmlLoader.getEdgeMetadatas(),iconMapLoader.getIconMap(),edgeStrokeMapLoader.getEdgesStrokeMap(),edgeColorMapLoader.getEdgesColorMap());
  createPanel();
}

Fixed version (ground truth):
public GraphViewerPanel(JFrame parent,TopologyViewerConfType viewerConfig,GraphmlLoader<G> graphmlLoader,IconMapLoader iconMapLoader,EdgeStrokeMapLoader edgeStrokeMapLoader,EdgeColorMapLoader edgeColorMapLoader,G entireGraph,File path,File graphmlDir,String initialNode){
  super();
  this.parent=parent;
  this.viewerConfig=viewerConfig;
  this.graphmlLoader=graphmlLoader;
  this.entireGraph=entireGraph;
  this.graphmlDir=graphmlDir;
  this.initialNode=initialNode;
  this.deviceXmlPath=new File(path,"String_Node_Str");
  this.path=path;
  vv=new MyVisualizationViewer(viewerConfig,entireGraph,graphmlLoader.getVertexMetadatas(),graphmlLoader.getEdgeMetadatas(),iconMapLoader.getIconMap(),edgeStrokeMapLoader.getEdgesStrokeMap(),edgeColorMapLoader.getEdgesColorMap());
  createPanel();
}
Program: 13085
Project: 13085
Buggy source:
private GraphViewerPanel createViewerPanel(){
  return new GraphViewerPanel<G>(frame,viewerConfig,graphmlLoader,iconMapLoader,edgeStrokeMapLoader,edgeColorMapLoader,entireGraph,projectPath,initialNode);
}

Fixed version (ground truth):
private GraphViewerPanel createViewerPanel(){
  return new GraphViewerPanel<G>(frame,viewerConfig,graphmlLoader,iconMapLoader,edgeStrokeMapLoader,edgeColorMapLoader,entireGraph,projectPath,graphmlDir,initialNode);
}
Program: 13086
Project: 13086
Buggy source:
public void init() throws JAXBException, ParserConfigurationException, SAXException, IOException {
  tabbedPane.removeAll();
  iconMapLoader=new IconMapLoader(viewerConfig);
  edgeStrokeMapLoader=new EdgeStrokeMapLoader(viewerConfig);
  edgeColorMapLoader=new EdgeColorMapLoader(viewerConfig);
  neo4jLoader=new Neo4jLoader<G>(entireGraph,factory,"String_Node_Str");
  graphmlLoader=new GraphmlLoader<G>(viewerConfig,entireGraph,factory,neo4jLoader.getVertexMetadatas());
  graphmlLoader.addGraphmlLoaderListener(iconMapLoader);
  graphmlLoader.addGraphmlLoaderListener(edgeStrokeMapLoader);
  graphmlLoader.addGraphmlLoaderListener(edgeColorMapLoader);
  graphmlLoader.loadGraphml(graphmlDir);
}

Fixed version (ground truth):
public void init() throws JAXBException, ParserConfigurationException, SAXException, IOException {
  iconMapLoader=new IconMapLoader(viewerConfig);
  edgeStrokeMapLoader=new EdgeStrokeMapLoader(viewerConfig);
  edgeColorMapLoader=new EdgeColorMapLoader(viewerConfig);
  neo4jLoader=new Neo4jLoader<G>(entireGraph,factory,"String_Node_Str");
  graphmlLoader=new GraphmlLoader<G>(viewerConfig,entireGraph,factory,neo4jLoader.getVertexMetadatas());
  graphmlLoader.addGraphmlLoaderListener(iconMapLoader);
  graphmlLoader.addGraphmlLoaderListener(edgeStrokeMapLoader);
  graphmlLoader.addGraphmlLoaderListener(edgeColorMapLoader);
  graphmlLoader.loadGraphml(graphmlDir);
}
Program: 13087
Project: 13087
Buggy source:
public GraphViewerPanelManager(JFrame frame,File projectPath,File graphmlDir,Factory<G> factory,JTabbedPane tabbedPane) throws Exception {
  this.frame=frame;
  this.projectPath=projectPath;
  this.graphmlDir=graphmlDir;
  this.factory=factory;
  this.tabbedPane=tabbedPane;
  entireGraph=factory.create();
  String fName=null;
  if (entireGraph instanceof UndirectedGraph) {
    fName=new File("String_Node_Str").toString();
  }
 else   if (entireGraph instanceof DirectedGraph) {
    fName=new File("String_Node_Str").toString();
  }
 else {
    JOptionPane.showMessageDialog(frame,"String_Node_Str");
  }
  viewerConfig=ViewerConfigLoader.loadViewerConfig(new File(this.projectPath,fName));
  init();
}

Fixed version (ground truth):
public GraphViewerPanelManager(JFrame frame,File projectPath,File graphmlDir,Factory<G> factory,JTabbedPane tabbedPane) throws Exception {
  this.frame=frame;
  this.projectPath=projectPath;
  this.graphmlDir=graphmlDir;
  this.factory=factory;
  this.tabbedPane=tabbedPane;
  entireGraph=factory.create();
  String fName=null;
  String graphType=graphmlDir.getName();
  if ("String_Node_Str".equals(graphType)) {
    fName=new File("String_Node_Str").toString();
  }
 else   if ("String_Node_Str".equals(graphType)) {
    fName=new File("String_Node_Str").toString();
  }
 else   if ("String_Node_Str".equals(graphType) || "String_Node_Str".equals(graphType)) {
    fName=new File("String_Node_Str").toString();
  }
 else {
    JOptionPane.showMessageDialog(frame,"String_Node_Str");
  }
  viewerConfig=ViewerConfigLoader.loadViewerConfig(new File(this.projectPath,fName));
  init();
}
Program: 13088
Project: 13088
Buggy source:
public void doOpenGraph(File selectedFile){
  try {
    if ("String_Node_Str".equals(selectedFile.getName())) {
      GraphViewerPanelManager<UndirectedGraph<String,String>> viewerPanelManager=new GraphViewerPanelManager<UndirectedGraph<String,String>>(this,path,selectedFile,UndirectedSparseGraph.<String,String>getFactory(),tabbedPane);
      viewerPanelManagerMap.put(selectedFile.getAbsolutePath(),viewerPanelManager);
      viewerPanelManager.createAndAddViewerPanel();
    }
 else     if ("String_Node_Str".equals(selectedFile.getName())) {
      GraphViewerPanelManager<DirectedGraph<String,String>> viewerPanelManager=new GraphViewerPanelManager<DirectedGraph<String,String>>(this,path,selectedFile,DirectedSparseMultigraph.<String,String>getFactory(),tabbedPane);
      viewerPanelManagerMap.put(selectedFile.getAbsolutePath(),viewerPanelManager);
      viewerPanelManager.createAndAddViewerPanel();
    }
 else {
      JOptionPane.showMessageDialog(this,String.format("String_Node_Str",selectedFile.getName()));
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this,"String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
public void doOpenGraph(File selectedFile){
  try {
    if ("String_Node_Str".equals(selectedFile.getName()) || "String_Node_Str".equals(selectedFile.getName())) {
      GraphViewerPanelManager<UndirectedGraph<String,String>> viewerPanelManager=new GraphViewerPanelManager<UndirectedGraph<String,String>>(this,path,selectedFile,UndirectedSparseGraph.<String,String>getFactory(),tabbedPane);
      viewerPanelManagerMap.put(selectedFile.getAbsolutePath(),viewerPanelManager);
      viewerPanelManager.createAndAddViewerPanel();
    }
 else     if ("String_Node_Str".equals(selectedFile.getName()) || "String_Node_Str".equals(selectedFile.getName())) {
      GraphViewerPanelManager<DirectedGraph<String,String>> viewerPanelManager=new GraphViewerPanelManager<DirectedGraph<String,String>>(this,path,selectedFile,DirectedSparseMultigraph.<String,String>getFactory(),tabbedPane);
      viewerPanelManagerMap.put(selectedFile.getAbsolutePath(),viewerPanelManager);
      viewerPanelManager.createAndAddViewerPanel();
    }
 else {
      JOptionPane.showMessageDialog(this,String.format("String_Node_Str",selectedFile.getName()));
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this,"String_Node_Str" + e.getMessage());
  }
}
Program: 13089
Project: 13089
Buggy source:
public void doCloseProject(){
  setPath(null);
  getTabbedPane().removeAll();
}

Fixed version (ground truth):
public void doCloseProject(){
  setPath(null);
  getTabbedPane().removeAll();
  viewerPanelManagerMap.clear();
}
Program: 13091
Project: 13091
Buggy source:
private void createWindowMenu(TopologyManagerFrame frame,JMenuBar menuBar){
  final JMenu tabs=new JMenu("String_Node_Str");
  menuBar.add(tabs);
  final JMenuItem newTab=new JMenuItem("String_Node_Str");
  newTab.addActionListener(new NewTabMenuHandler(frame));
  tabs.add(newTab);
  final JMenuItem close=new JMenuItem("String_Node_Str");
  close.addActionListener(new CloseOthersMenuHandler(frame));
  tabs.add(close);
  final JMenuItem closeOthers=new JMenuItem("String_Node_Str");
  closeOthers.addActionListener(new CloseAllMenuHandler(frame));
  tabs.add(closeOthers);
  final JMenuItem closeAll=new JMenuItem("String_Node_Str");
  closeAll.addActionListener(new CloseAllMenuHandler(frame));
  tabs.add(closeAll);
}

Fixed version (ground truth):
private void createWindowMenu(TopologyManagerFrame frame,JMenuBar menuBar){
  final JMenu tabs=new JMenu("String_Node_Str");
  menuBar.add(tabs);
  final JMenuItem newTab=new JMenuItem("String_Node_Str");
  newTab.addActionListener(new NewTabMenuHandler(frame));
  tabs.add(newTab);
  final JMenuItem close=new JMenuItem("String_Node_Str");
  close.addActionListener(new CloseTabMenuHandler(frame));
  tabs.add(close);
  final JMenuItem closeOthers=new JMenuItem("String_Node_Str");
  closeOthers.addActionListener(new CloseOthersMenuHandler(frame));
  tabs.add(closeOthers);
  final JMenuItem closeAll=new JMenuItem("String_Node_Str");
  closeAll.addActionListener(new CloseAllMenuHandler(frame));
  tabs.add(closeAll);
}
Program: 13092
Project: 13092
Buggy source:
private void fireNodeDiscoveredEvent(NodeDiscoveryResult discoveryResult){
  for (  NodeDiscoveryListener nodeDiscoveryListener : nodeDiscoveryListeners) {
    nodeDiscoveryListener.nodeDiscovered(discoveryResult);
  }
}

Fixed version (ground truth):
private void fireNodeDiscoveredEvent(NodeDiscoveryResult discoveryResult){
  if (nodeDiscoveryListeners != null)   for (  NodeDiscoveryListener nodeDiscoveryListener : nodeDiscoveryListeners) {
    nodeDiscoveryListener.nodeDiscovered(discoveryResult);
  }
}