Program: 188027
Project: 188027
Buggy source:
private void init(){
  JLabel name=new JLabel("String_Node_Str");
  JLabel id=new JLabel("String_Node_Str");
  JLabel ep=new JLabel("String_Node_Str");
  JLabel path=new JLabel("String_Node_Str");
  tep=new JList();
  tname=new JTextField();
  tep.setEnabled(false);
  tname.setEnabled(false);
  tid=new JTextField();
  tid.setEditable(false);
  tpath=new JTextField();
  tpath.setEditable(false);
  JPanel jPanel1=new JPanel();
  JScrollPane jScrollPane2=new JScrollPane();
  JScrollPane epscroll=new JScrollPane(tep);
  proppanel=new JPanel();
  add=new JButton("String_Node_Str");
  add.setEnabled(false);
  setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
  jPanel1.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  jScrollPane2.setBorder(null);
  jScrollPane2.setPreferredSize(new Dimension(350,150));
  proppanel.setPreferredSize(new Dimension(280,150));
  proppanel.setLayout(null);
  proppanel.add(add);
  add.setBounds(310,5,90,23);
  jScrollPane2.setViewportView(proppanel);
  GroupLayout jPanel1Layout=new GroupLayout(jPanel1);
  jPanel1.setLayout(jPanel1Layout);
  jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(jScrollPane2,GroupLayout.PREFERRED_SIZE,0,Short.MAX_VALUE));
  jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(jScrollPane2,GroupLayout.Alignment.TRAILING,GroupLayout.DEFAULT_SIZE,GroupLayout.DEFAULT_SIZE,Short.MAX_VALUE));
  GroupLayout optpanLayout=new GroupLayout(this);
  this.setLayout(optpanLayout);
  optpanLayout.setHorizontalGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(optpanLayout.createSequentialGroup().addContainerGap().addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(optpanLayout.createSequentialGroup().addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(ep).addComponent(name).addComponent(id).addComponent(path)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.TRAILING,false).addComponent(epscroll,GroupLayout.Alignment.LEADING,GroupLayout.DEFAULT_SIZE,151,Short.MAX_VALUE).addComponent(tid,GroupLayout.Alignment.LEADING,GroupLayout.DEFAULT_SIZE,151,Short.MAX_VALUE).addComponent(tname,GroupLayout.Alignment.LEADING).addComponent(tpath)).addGap(0,105,Short.MAX_VALUE)).addComponent(jPanel1,GroupLayout.DEFAULT_SIZE,GroupLayout.DEFAULT_SIZE,Short.MAX_VALUE)).addContainerGap()));
  optpanLayout.setVerticalGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(optpanLayout.createSequentialGroup().addContainerGap().addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(ep).addComponent(epscroll,80,80,80)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(name).addComponent(tname,GroupLayout.PREFERRED_SIZE,GroupLayout.DEFAULT_SIZE,GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(id).addComponent(tid,GroupLayout.PREFERRED_SIZE,GroupLayout.DEFAULT_SIZE,GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(path).addComponent(tpath,GroupLayout.PREFERRED_SIZE,GroupLayout.DEFAULT_SIZE,GroupLayout.PREFERRED_SIZE)).addGap(18,18,18).addComponent(jPanel1,GroupLayout.DEFAULT_SIZE,GroupLayout.DEFAULT_SIZE,Short.MAX_VALUE).addContainerGap()));
  tname.addKeyListener(new KeyAdapter(){
    public void keyReleased(    KeyEvent ev){
      try {
        if (parent.getName().equals(tname.getText()))         return;
        if (!checkExistingName(parent,tname.getText())) {
          String query=client.execute("String_Node_Str",new Object[]{parent.getID(),tname.getText()}).toString();
          if (query.equals("String_Node_Str")) {
            updatePaths(treenode,parent);
            parent.setName(tname.getText());
            tpath.setText(parent.getPath().getPath());
            ((DefaultTreeModel)tree.getModel()).nodeChanged(treenode);
            Repository.window.mainpanel.p1.suitaDetails.setComboTBs();
          }
 else {
            System.out.println("String_Node_Str" + query);
            CustomDialog.showInfo(JOptionPane.WARNING_MESSAGE,NodePanel.this,"String_Node_Str",query);
          }
        }
 else {
          tname.setText(parent.getName());
          CustomDialog.showInfo(JOptionPane.WARNING_MESSAGE,NodePanel.this,"String_Node_Str","String_Node_Str");
        }
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
);
  add.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent ev){
      String resp=CustomDialog.showInputDialog(JOptionPane.QUESTION_MESSAGE,JOptionPane.OK_CANCEL_OPTION,NodePanel.this,"String_Node_Str","String_Node_Str");
      if (resp != null && !resp.equals("String_Node_Str")) {
        try {
          if (parent.getPropery(resp) == null) {
            String name=parent.getName();
            String path=parent.getParent().getID();
            String query="String_Node_Str" + resp + "String_Node_Str";
            query=client.execute("String_Node_Str",new Object[]{name,path,query}).toString();
            if (query.equals("String_Node_Str")) {
              parent.addProperty(resp,"String_Node_Str");
              updateProperties();
            }
          }
 else {
            CustomDialog.showInfo(JOptionPane.WARNING_MESSAGE,NodePanel.this,"String_Node_Str","String_Node_Str");
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
  }
);
  populateEPs();
}

Fixed version (ground truth):
private void init(){
  JLabel name=new JLabel("String_Node_Str");
  JLabel id=new JLabel("String_Node_Str");
  JLabel ep=new JLabel("String_Node_Str");
  JLabel path=new JLabel("String_Node_Str");
  tep=new JList();
  tname=new JTextField();
  tep.setEnabled(false);
  tname.setEnabled(false);
  tid=new JTextField();
  tid.setEditable(false);
  tpath=new JTextField();
  tpath.setEditable(false);
  JPanel jPanel1=new JPanel();
  JScrollPane jScrollPane2=new JScrollPane();
  JScrollPane epscroll=new JScrollPane(tep);
  proppanel=new JPanel();
  add=new JButton("String_Node_Str");
  add.setEnabled(false);
  setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
  jPanel1.setBorder(BorderFactory.createTitledBorder("String_Node_Str"));
  jScrollPane2.setBorder(null);
  jScrollPane2.setPreferredSize(new Dimension(350,150));
  proppanel.setPreferredSize(new Dimension(280,150));
  proppanel.setLayout(null);
  proppanel.add(add);
  add.setBounds(310,5,90,23);
  jScrollPane2.setViewportView(proppanel);
  GroupLayout jPanel1Layout=new GroupLayout(jPanel1);
  jPanel1.setLayout(jPanel1Layout);
  jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(jScrollPane2,GroupLayout.PREFERRED_SIZE,0,Short.MAX_VALUE));
  jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(jScrollPane2,GroupLayout.Alignment.TRAILING,GroupLayout.DEFAULT_SIZE,GroupLayout.DEFAULT_SIZE,Short.MAX_VALUE));
  GroupLayout optpanLayout=new GroupLayout(this);
  this.setLayout(optpanLayout);
  optpanLayout.setHorizontalGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(optpanLayout.createSequentialGroup().addContainerGap().addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(optpanLayout.createSequentialGroup().addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(ep).addComponent(name).addComponent(id).addComponent(path)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.TRAILING,false).addComponent(epscroll,GroupLayout.Alignment.LEADING,GroupLayout.DEFAULT_SIZE,151,Short.MAX_VALUE).addComponent(tid,GroupLayout.Alignment.LEADING,GroupLayout.DEFAULT_SIZE,151,Short.MAX_VALUE).addComponent(tname,GroupLayout.Alignment.LEADING).addComponent(tpath)).addGap(0,105,Short.MAX_VALUE)).addComponent(jPanel1,GroupLayout.DEFAULT_SIZE,GroupLayout.DEFAULT_SIZE,Short.MAX_VALUE)).addContainerGap()));
  optpanLayout.setVerticalGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(optpanLayout.createSequentialGroup().addContainerGap().addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(ep).addComponent(epscroll,80,80,80)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(name).addComponent(tname,GroupLayout.PREFERRED_SIZE,GroupLayout.DEFAULT_SIZE,GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(id).addComponent(tid,GroupLayout.PREFERRED_SIZE,GroupLayout.DEFAULT_SIZE,GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(optpanLayout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(path).addComponent(tpath,GroupLayout.PREFERRED_SIZE,GroupLayout.DEFAULT_SIZE,GroupLayout.PREFERRED_SIZE)).addGap(18,18,18).addComponent(jPanel1,GroupLayout.DEFAULT_SIZE,GroupLayout.DEFAULT_SIZE,Short.MAX_VALUE).addContainerGap()));
  tname.addFocusListener(new FocusAdapter(){
    public void focusLost(    FocusEvent ev){
      if (tname.getText().equals("String_Node_Str") && parent != null) {
        CustomDialog.showInfo(JOptionPane.WARNING_MESSAGE,NodePanel.this,"String_Node_Str","String_Node_Str");
        tname.setText(parent.getName());
        tname.requestFocusInWindow();
        tname.requestFocus();
      }
    }
  }
);
  tname.addKeyListener(new KeyAdapter(){
    public void keyReleased(    KeyEvent ev){
      try {
        if (tname.getText().equals("String_Node_Str"))         return;
        if (parent.getName().equals(tname.getText()))         return;
        if (!checkExistingName(parent,tname.getText())) {
          String query=client.execute("String_Node_Str",new Object[]{parent.getID(),tname.getText()}).toString();
          if (query.equals("String_Node_Str")) {
            updatePaths(treenode,parent);
            parent.setName(tname.getText());
            tpath.setText(parent.getPath().getPath());
            ((DefaultTreeModel)tree.getModel()).nodeChanged(treenode);
            Repository.window.mainpanel.p1.suitaDetails.setComboTBs();
          }
 else {
            System.out.println("String_Node_Str" + query);
            CustomDialog.showInfo(JOptionPane.WARNING_MESSAGE,NodePanel.this,"String_Node_Str",query);
          }
        }
 else {
          tname.setText(parent.getName());
          CustomDialog.showInfo(JOptionPane.WARNING_MESSAGE,NodePanel.this,"String_Node_Str","String_Node_Str");
        }
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
);
  add.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent ev){
      String resp=CustomDialog.showInputDialog(JOptionPane.QUESTION_MESSAGE,JOptionPane.OK_CANCEL_OPTION,NodePanel.this,"String_Node_Str","String_Node_Str");
      if (resp != null && !resp.equals("String_Node_Str")) {
        try {
          if (parent.getPropery(resp) == null) {
            String name=parent.getName();
            String path=parent.getParent().getID();
            String query="String_Node_Str" + resp + "String_Node_Str";
            query=client.execute("String_Node_Str",new Object[]{name,path,query}).toString();
            if (query.equals("String_Node_Str")) {
              parent.addProperty(resp,"String_Node_Str");
              updateProperties();
            }
          }
 else {
            CustomDialog.showInfo(JOptionPane.WARNING_MESSAGE,NodePanel.this,"String_Node_Str","String_Node_Str");
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
  }
);
  populateEPs();
}