nus-yam/ex-repair huggingface dataset:
Program: 45692
Project: 45692
Buggy source:
@Override public InputStream getInputStream(){
  try {
    WlHttpURI uri=new WlHttpURI(this.url.toExternalForm());
    Asset asset=AssetManager.getAssetManager().getAsset(uri);
    if (asset == null || AssetManager.getAssetManager().waitForAsset(asset) == false) {
      return null;
    }
    return new FileInputStream(asset.getLocalCacheFile());
  }
 catch (  FileNotFoundException ex) {
    Logger.getLogger(WlHttpURLConnection.class.getName()).log(Level.SEVERE,null,ex);
  }
catch (  URISyntaxException excp) {
    Logger.getLogger(WlHttpURLConnection.class.getName()).log(Level.SEVERE,null,excp);
  }
catch (  MalformedURLException excp) {
    Logger.getLogger(WlHttpURLConnection.class.getName()).log(Level.SEVERE,null,excp);
  }
  return null;
}

Fixed version (ground truth):
@Override public InputStream getInputStream() throws IOException {
  try {
    WlHttpURI uri=new WlHttpURI(this.url.toExternalForm());
    Asset asset=AssetManager.getAssetManager().getAsset(uri);
    if (asset == null || AssetManager.getAssetManager().waitForAsset(asset) == false) {
      throw new IOException("String_Node_Str" + url);
    }
    return new FileInputStream(asset.getLocalCacheFile());
  }
 catch (  URISyntaxException excp) {
    IOException ioe=new IOException("String_Node_Str");
    ioe.initCause(excp);
    throw ioe;
  }
}
Program: 45693
Project: 45693
Buggy source:
@Override public InputStream getInputStream(){
  try {
    return WlzipManager.getWlzipManager().getInputStream(url.getHost(),url.getPath());
  }
 catch (  IOException ex) {
    Logger.getLogger(WlzipURLConnection.class.getName()).log(Level.SEVERE,null,ex);
    return null;
  }
}

Fixed version (ground truth):
@Override public InputStream getInputStream() throws IOException {
  return WlzipManager.getWlzipManager().getInputStream(url.getHost(),url.getPath());
}
Program: 45694
Project: 45694
Buggy source:
public void showUsers(java.awt.event.ActionEvent evt){
  if (presenceInfo == null) {
    return;
  }
  if (userListHUDComponent == null) {
    userListHUDPanel=new UserListHUDPanel(this,session,pm,cell);
    HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
    userListHUDComponent=mainHUD.createComponent(userListHUDPanel);
    userListHUDPanel.setHUDComponent(userListHUDComponent);
    userListHUDComponent.setPreferredLocation(Layout.NORTHWEST);
    userListHUDComponent.setName(BUNDLE.getString("String_Node_Str"));
    userListHUDComponent.setIcon(userListIcon);
    mainHUD.addComponent(userListHUDComponent);
    userListHUDComponent.addEventListener(new HUDEventListener(){
      public void HUDObjectChanged(      HUDEvent e){
        if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
          usersMenuSelected=false;
          userListJMenuItem.setSelected(usersMenuSelected);
        }
      }
    }
);
  }
  userListHUDPanel.setUserList();
  userListHUDComponent.setVisible(usersMenuSelected);
}

Fixed version (ground truth):
public void showUsers(java.awt.event.ActionEvent evt){
  if (presenceInfo == null) {
    return;
  }
  if (userListHUDComponent == null) {
    userListHUDPanel=new UserListHUDPanel(this,session,pm,cell);
    HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
    userListHUDComponent=mainHUD.createComponent(userListHUDPanel);
    userListHUDPanel.setHUDComponent(userListHUDComponent);
    userListHUDComponent.setPreferredLocation(Layout.NORTHWEST);
    userListHUDComponent.setName(BUNDLE.getString("String_Node_Str") + "String_Node_Str");
    userListHUDComponent.setIcon(userListIcon);
    mainHUD.addComponent(userListHUDComponent);
    userListHUDComponent.addEventListener(new HUDEventListener(){
      public void HUDObjectChanged(      HUDEvent e){
        if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
          usersMenuSelected=false;
          userListJMenuItem.setSelected(usersMenuSelected);
        }
      }
    }
);
  }
  userListHUDPanel.setUserList();
  userListHUDComponent.setVisible(usersMenuSelected);
}
Program: 45695
Project: 45695
Buggy source:
private void teleport(){
  Thread t=new Thread(new Runnable(){
    public void run(){
      try {
        ClientContextJME.getClientMain().gotoLocation(serverURL,location,look);
        System.out.println("String_Node_Str" + serverURL + "String_Node_Str"+ location+ "String_Node_Str"+ look);
      }
 catch (      IOException ex) {
        logger.log(Level.WARNING,"String_Node_Str",ex);
      }
    }
  }
,"String_Node_Str");
  t.start();
}

Fixed version (ground truth):
private void teleport(){
  Thread t=new Thread(new Runnable(){
    public void run(){
      try {
        ClientContextJME.getClientMain().gotoLocation(serverURL,location,look);
        logger.warning("String_Node_Str" + serverURL + "String_Node_Str"+ location+ "String_Node_Str"+ look);
      }
 catch (      IOException ex) {
        logger.log(Level.WARNING,"String_Node_Str",ex);
      }
    }
  }
,"String_Node_Str");
  t.start();
}
Program: 45696
Project: 45696
Buggy source:
public void run(){
  try {
    ClientContextJME.getClientMain().gotoLocation(serverURL,location,look);
    System.out.println("String_Node_Str" + serverURL + "String_Node_Str"+ location+ "String_Node_Str"+ look);
  }
 catch (  IOException ex) {
    logger.log(Level.WARNING,"String_Node_Str",ex);
  }
}

Fixed version (ground truth):
public void run(){
  try {
    ClientContextJME.getClientMain().gotoLocation(serverURL,location,look);
    logger.warning("String_Node_Str" + serverURL + "String_Node_Str"+ location+ "String_Node_Str"+ look);
  }
 catch (  IOException ex) {
    logger.log(Level.WARNING,"String_Node_Str",ex);
  }
}
Program: 45698
Project: 45698
Buggy source:
public void run(){
  DefaultMutableTreeNode node=cellNodes.get(cell);
  if (status == CellStatus.DISK) {
    if (node != null) {
      LOGGER.info("String_Node_Str" + cell.getName());
      if (selectedCell == cell) {
        dirtyPanelSet.clear();
      }
      TreeModel m=cellHierarchyTree.getModel();
      ((DefaultTreeModel)m).removeNodeFromParent(node);
      cellNodes.remove(cell);
    }
  }
 else   if (status == CellStatus.RENDERING) {
    if (node == null) {
      LOGGER.info("String_Node_Str" + cell.getName());
      createJTreeNode(cell);
    }
  }
}

Fixed version (ground truth):
public void run(){
  DefaultMutableTreeNode node=cellNodes.get(cell);
  if (status == CellStatus.DISK) {
    if (node != null) {
      if (selectedCell == cell) {
        dirtyPanelSet.clear();
      }
      TreeModel m=cellHierarchyTree.getModel();
      ((DefaultTreeModel)m).removeNodeFromParent(node);
      cellNodes.remove(cell);
    }
  }
 else   if (status == CellStatus.RENDERING) {
    if (node == null) {
      createJTreeNode(cell);
    }
  }
}
Program: 45699
Project: 45699
Buggy source:
/** 
 * Given a component factory, adds the component to the server and upates the GUI to indicate its presence
 */
private void addComponent(CellComponentFactorySPI spi){
  CellComponentServerState state=spi.getDefaultCellComponentServerState();
  CellID cellID=selectedCell.getCellID();
  CellServerComponentMessage message=CellServerComponentMessage.newAddMessage(cellID,state);
  ResponseMessage response=selectedCell.sendCellMessageAndWait(message);
  if (response == null) {
    LOGGER.warning("String_Node_Str" + selectedCell.getCellID() + "String_Node_Str"+ selectedCell.getName()+ "String_Node_Str");
    return;
  }
  if (response instanceof CellServerComponentResponseMessage) {
    CellServerComponentResponseMessage cscrm=(CellServerComponentResponseMessage)response;
    addComponentToPanelSet(spi,cscrm.getCellComponentServerState());
  }
 else   if (response instanceof ErrorMessage) {
    LOGGER.log(Level.WARNING,"String_Node_Str",((ErrorMessage)response).getErrorCause());
  }
}

Fixed version (ground truth):
/** 
 * Given a component factory, adds the component to the server and upates the GUI to indicate its presence
 */
private void addComponent(CellComponentFactorySPI spi){
  CellComponentServerState state=spi.getDefaultCellComponentServerState();
  CellID cellID=selectedCell.getCellID();
  CellServerComponentMessage message=CellServerComponentMessage.newAddMessage(cellID,state);
  ResponseMessage response=selectedCell.sendCellMessageAndWait(message);
  if (response == null) {
    LOGGER.warning("String_Node_Str" + selectedCell.getCellID() + "String_Node_Str"+ selectedCell.getName()+ "String_Node_Str");
    return;
  }
  if (response instanceof CellServerComponentResponseMessage) {
    CellServerComponentResponseMessage cscrm=(CellServerComponentResponseMessage)response;
    addComponentToPanelSet(cscrm.getCellComponentServerState());
  }
 else   if (response instanceof ErrorMessage) {
    LOGGER.log(Level.WARNING,"String_Node_Str",((ErrorMessage)response).getErrorCause());
  }
}
Program: 45700
Project: 45700
Buggy source:
/** 
 * Creates a new tree node for the given Cell and inserts it into the tree.
 */
private void createJTreeNode(Cell cell){
  DefaultMutableTreeNode ret=new DefaultMutableTreeNode(cell){
    @Override public String toString(){
      Cell cell=(Cell)getUserObject();
      return "String_Node_Str" + cell.getCellID().toString();
    }
  }
;
  cellNodes.put(cell,ret);
  DefaultMutableTreeNode parentNode=cellNodes.get(cell.getParent());
  if (parentNode == null) {
    parentNode=treeRoot;
  }
  DefaultTreeModel model=(DefaultTreeModel)cellHierarchyTree.getModel();
  model.insertNodeInto(ret,parentNode,parentNode.getChildCount());
  List<Cell> children=cell.getChildren();
  for (  Cell child : children) {
    createJTreeNode(child);
  }
}

Fixed version (ground truth):
/** 
 * Creates a new tree node for the given Cell and inserts it into the tree.
 */
private void createJTreeNode(Cell cell){
  SortedTreeNode ret=new SortedTreeNode(cell){
    @Override public String toString(){
      Cell cell=(Cell)getUserObject();
      return "String_Node_Str" + cell.getCellID().toString();
    }
  }
;
  cellNodes.put(cell,ret);
  SortedTreeNode parentNode=cellNodes.get(cell.getParent());
  if (parentNode == null) {
    parentNode=treeRoot;
  }
  parentNode.add(ret);
  DefaultTreeModel model=(DefaultTreeModel)cellHierarchyTree.getModel();
  int childIndex=parentNode.getIndex(ret);
  model.nodesWereInserted(parentNode,new int[]{childIndex});
  List<Cell> children=cell.getChildren();
  for (  Cell child : children) {
    createJTreeNode(child);
  }
}
Program: 45701
Project: 45701
Buggy source:
public void cellStatusChanged(final Cell cell,final CellStatus status){
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      DefaultMutableTreeNode node=cellNodes.get(cell);
      if (status == CellStatus.DISK) {
        if (node != null) {
          LOGGER.info("String_Node_Str" + cell.getName());
          if (selectedCell == cell) {
            dirtyPanelSet.clear();
          }
          TreeModel m=cellHierarchyTree.getModel();
          ((DefaultTreeModel)m).removeNodeFromParent(node);
          cellNodes.remove(cell);
        }
      }
 else       if (status == CellStatus.RENDERING) {
        if (node == null) {
          LOGGER.info("String_Node_Str" + cell.getName());
          createJTreeNode(cell);
        }
      }
    }
  }
);
}

Fixed version (ground truth):
public void cellStatusChanged(final Cell cell,final CellStatus status){
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      DefaultMutableTreeNode node=cellNodes.get(cell);
      if (status == CellStatus.DISK) {
        if (node != null) {
          if (selectedCell == cell) {
            dirtyPanelSet.clear();
          }
          TreeModel m=cellHierarchyTree.getModel();
          ((DefaultTreeModel)m).removeNodeFromParent(node);
          cellNodes.remove(cell);
        }
      }
 else       if (status == CellStatus.RENDERING) {
        if (node == null) {
          createJTreeNode(cell);
        }
      }
    }
  }
);
}
Program: 45702
Project: 45702
Buggy source:
/** 
 * Update the node in the tree with the current Cell hierarchy.
 */
private void updateTreeGUI(){
  cellHierarchyTree.removeTreeSelectionListener(treeListener);
  refreshCells(LoginManager.getPrimary().getPrimarySession());
  if (selectedCell != null) {
    DefaultMutableTreeNode node=cellNodes.get(selectedCell);
    if (node == null) {
      LOGGER.warning("String_Node_Str" + selectedCell);
      return;
    }
    TreePath path=new TreePath(node.getPath());
    cellHierarchyTree.expandPath(path);
    cellHierarchyTree.setSelectionPath(path);
  }
  cellHierarchyTree.addTreeSelectionListener(treeListener);
}

Fixed version (ground truth):
/** 
 * Update the node in the tree with the current Cell hierarchy.
 */
private void updateTreeGUI(){
  cellHierarchyTree.removeTreeSelectionListener(treeListener);
  refreshCells(LoginManager.getPrimary().getPrimarySession());
  if (selectedCell != null) {
    SortedTreeNode node=cellNodes.get(selectedCell);
    if (node == null) {
      LOGGER.warning("String_Node_Str" + selectedCell);
      return;
    }
    TreePath path=new TreePath(node.getPath());
    cellHierarchyTree.expandPath(path);
    cellHierarchyTree.setSelectionPath(path);
  }
  cellHierarchyTree.addTreeSelectionListener(treeListener);
}
Program: 45703
Project: 45703
Buggy source:
/** 
 * Adds an individual component panel to the set of panels, given the cell component factory and the component server state.
 */
private void addComponentToPanelSet(CellComponentFactorySPI spi,CellComponentServerState state){
  Class clazz=state.getClass();
  selectedCellServerState.addComponentServerState(state);
  PropertiesManager manager=PropertiesManager.getPropertiesManager();
  PropertiesFactorySPI factory=manager.getPropertiesByClass(clazz);
  if (factory != null) {
    JPanel panel=factory.getPropertiesJPanel();
    if (panel != null) {
      String displayName=factory.getDisplayName();
      listModel.addElement(displayName);
      factoryList.add(factory);
      factory.setCellPropertiesEditor(this);
      factory.open();
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds an individual component panel to the set of panels, given the cell component factory and the component server state.
 */
private void addComponentToPanelSet(CellComponentServerState state){
  Class clazz=state.getClass();
  selectedCellServerState.addComponentServerState(state);
  PropertiesManager manager=PropertiesManager.getPropertiesManager();
  PropertiesFactorySPI factory=manager.getPropertiesByClass(clazz);
  if (factory != null) {
    JPanel panel=factory.getPropertiesJPanel();
    if (panel != null) {
      String displayName=factory.getDisplayName();
      listModel.addElement(displayName);
      factoryList.add(factory);
      factory.setCellPropertiesEditor(this);
      factory.open();
    }
  }
}
Program: 45704
Project: 45704
Buggy source:
/** 
 * Get the  cells from the cache and update the nodes in tree
 */
private void refreshCells(WonderlandSession session){
  CellCache cache=ClientContext.getCellCache(session);
  if (cache == null) {
    LOGGER.warning("String_Node_Str" + session);
    return;
  }
  treeRoot=new DefaultMutableTreeNode(BUNDLE.getString("String_Node_Str"));
  DefaultTreeModel treeModel=new DefaultTreeModel(treeRoot);
  cellHierarchyTree.setModel(treeModel);
  cellNodes.clear();
  Collection<Cell> rootCells=cache.getRootCells();
  for (  Cell rootCell : rootCells) {
    if (rootCell instanceof AvatarCell) {
      continue;
    }
    createJTreeNode(rootCell);
  }
  cellHierarchyTree.repaint();
}

Fixed version (ground truth):
/** 
 * Get the  cells from the cache and update the nodes in tree
 */
private void refreshCells(WonderlandSession session){
  CellCache cache=ClientContext.getCellCache(session);
  if (cache == null) {
    LOGGER.warning("String_Node_Str" + session);
    return;
  }
  treeRoot=new SortedTreeNode(BUNDLE.getString("String_Node_Str"));
  DefaultTreeModel treeModel=new DefaultTreeModel(treeRoot);
  cellHierarchyTree.setModel(treeModel);
  cellNodes.clear();
  Collection<Cell> rootCells=cache.getRootCells();
  for (  Cell rootCell : rootCells) {
    if (rootCell instanceof AvatarCell) {
      continue;
    }
    createJTreeNode(rootCell);
  }
  cellHierarchyTree.repaint();
}
Program: 45705
Project: 45705
Buggy source:
/** 
 */
@Override public Component getTreeCellRendererComponent(JTree tree,Object value,boolean selected,boolean expanded,boolean leaf,int row,boolean hasFocus){
  super.getTreeCellRendererComponent(tree,value,selected,expanded,leaf,row,hasFocus);
  DefaultMutableTreeNode treeNode=(DefaultMutableTreeNode)value;
  if (treeNode == dragOverTreeNode) {
    setBorder(BorderFactory.createLineBorder(Color.BLACK));
  }
 else {
    setBorder(null);
  }
  Object userObject=treeNode.getUserObject();
  if (userObject instanceof Cell) {
    Cell cell=(Cell)treeNode.getUserObject();
    setText(cell.getName() + "String_Node_Str" + cell.getCellID().toString()+ "String_Node_Str");
  }
  return this;
}

Fixed version (ground truth):
/** 
 */
@Override public Component getTreeCellRendererComponent(JTree tree,Object value,boolean selected,boolean expanded,boolean leaf,int row,boolean hasFocus){
  super.getTreeCellRendererComponent(tree,value,selected,expanded,leaf,row,hasFocus);
  SortedTreeNode treeNode=(SortedTreeNode)value;
  if (treeNode == dragOverTreeNode) {
    setBorder(BorderFactory.createLineBorder(Color.BLACK));
  }
 else {
    setBorder(null);
  }
  Object userObject=treeNode.getUserObject();
  if (userObject instanceof Cell) {
    Cell cell=(Cell)treeNode.getUserObject();
    setText(cell.getName() + "String_Node_Str" + cell.getCellID().toString()+ "String_Node_Str");
  }
  return this;
}
Program: 45706
Project: 45706
Buggy source:
/** 
 * Applies the values stored in the GUI to the cell. Loops through each of the panels and tells them to apply().
 */
private void applyValues(){
  for (  PropertiesFactorySPI factory : factoryList) {
    Class clazz=factory.getClass();
    if (dirtyPanelSet.contains(clazz) == true) {
      factory.apply();
    }
  }
  CellServerState updateState=stateUpdates.cellServerState;
  if (updateState != null) {
    updateState.removeAllComponentServerStates();
  }
  CellServerStateUpdateMessage msg=new CellServerStateUpdateMessage(selectedCell.getCellID(),updateState,stateUpdates.cellComponentServerStateSet);
  ResponseMessage response=selectedCell.sendCellMessageAndWait(msg);
  if (response instanceof ErrorMessage) {
    ErrorMessage em=(ErrorMessage)response;
    LOGGER.log(Level.WARNING,"String_Node_Str" + em.getErrorMessage(),em.getErrorCause());
    JOptionPane.showMessageDialog(this,em.getErrorMessage(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
  }
  stateUpdates.clear();
  selectedCellServerState=fetchCellServerState();
  if (selectedCellServerState == null) {
    LOGGER.warning("String_Node_Str" + selectedCell.getName());
    return;
  }
  dirtyPanelSet.clear();
  applyButton.setEnabled(false);
  restoreButton.setEnabled(false);
  updateGUI();
  DefaultMutableTreeNode node=cellNodes.get(selectedCell);
  ((DefaultTreeModel)cellHierarchyTree.getModel()).nodeChanged(node);
}

Fixed version (ground truth):
/** 
 * Applies the values stored in the GUI to the cell. Loops through each of the panels and tells them to apply().
 */
private void applyValues(){
  for (  PropertiesFactorySPI factory : factoryList) {
    Class clazz=factory.getClass();
    if (dirtyPanelSet.contains(clazz) == true) {
      factory.apply();
    }
  }
  CellServerState updateState=stateUpdates.cellServerState;
  if (updateState != null) {
    updateState.removeAllComponentServerStates();
  }
  CellServerStateUpdateMessage msg=new CellServerStateUpdateMessage(selectedCell.getCellID(),updateState,stateUpdates.cellComponentServerStateSet);
  ResponseMessage response=selectedCell.sendCellMessageAndWait(msg);
  if (response instanceof ErrorMessage) {
    ErrorMessage em=(ErrorMessage)response;
    LOGGER.log(Level.WARNING,"String_Node_Str" + em.getErrorMessage(),em.getErrorCause());
    JOptionPane.showMessageDialog(this,em.getErrorMessage(),"String_Node_Str",JOptionPane.ERROR_MESSAGE);
  }
  stateUpdates.clear();
  selectedCellServerState=fetchCellServerState();
  if (selectedCellServerState == null) {
    LOGGER.warning("String_Node_Str" + selectedCell.getName());
    return;
  }
  dirtyPanelSet.clear();
  applyButton.setEnabled(false);
  restoreButton.setEnabled(false);
  updateGUI();
  SortedTreeNode node=cellNodes.get(selectedCell);
  node.nameChanged();
}
Program: 45708
Project: 45708
Buggy source:
/** 
 */
@Override public void dragOver(DropTargetDragEvent dtde){
  Point location=dtde.getLocation();
  TreePath path=cellHierarchyTree.getPathForLocation(location.x,location.y);
  if (path == null) {
    dragOverTreeNode=null;
  }
 else {
    dragOverTreeNode=(DefaultMutableTreeNode)path.getLastPathComponent();
  }
  cellHierarchyTree.repaint();
}

Fixed version (ground truth):
/** 
 */
@Override public void dragOver(DropTargetDragEvent dtde){
  Point location=dtde.getLocation();
  TreePath path=cellHierarchyTree.getPathForLocation(location.x,location.y);
  if (path == null) {
    dragOverTreeNode=null;
  }
 else {
    dragOverTreeNode=(SortedTreeNode)path.getLastPathComponent();
  }
  cellHierarchyTree.repaint();
}
Program: 45710
Project: 45710
Buggy source:
/** 
 */
public void translationPerformed(Vector3f translation){
  CellTransform transform=cell.getLocalTransform();
  Vector3f newTranslation=translationOnPress.add(translation);
  transform.setTranslation(newTranslation);
  movableComp.localMoveRequest(transform);
}

Fixed version (ground truth):
/** 
 */
public void translationPerformed(Vector3f translation){
  CellTransform cellWorldTransform=new CellTransform();
  if (cell.getParent() != null) {
    cellWorldTransform=cell.getParent().getWorldTransform();
    cellWorldTransform.setTranslation(new Vector3f());
  }
  CellTransform worldTransform=new CellTransform();
  CellTransform transform=new CellTransform(null,translation);
  CellTransform newTransform=CellPlacementUtils.transform(transform,worldTransform,cellWorldTransform);
  Vector3f newTranslation=translationOnPress.add(newTransform.getTranslation(null));
  CellTransform cellTransform=cell.getLocalTransform();
  cellTransform.setTranslation(newTranslation);
  movableComp.localMoveRequest(cellTransform);
}
Program: 45712
Project: 45712
Buggy source:
/** 
 * Sets the current attributes of the avatar and refreshes the GUI. NOTE: This method assumes it is being called in the AWT Event Thread.
 * @param attributes The attribute of the avatar configuration
 */
public void setAttributes(WonderlandCharacterParams attributes){
  if (EventQueue.isDispatchThread() == false) {
    LOGGER.severe("String_Node_Str");
  }
  currentParams=attributes.clone();
  populateComboBox(hairComboBox,ConfigType.HAIR,"String_Node_Str");
  populateComboBox(headComboBox,ConfigType.HEAD,"String_Node_Str");
  populateComboBox(torsoComboBox,ConfigType.TORSO,"String_Node_Str");
  populateComboBox(legsComboBox,ConfigType.LEGS,"String_Node_Str");
  populateComboBox(jacketComboBox,ConfigType.JACKET,"String_Node_Str");
  populateComboBox(handsComboBox,ConfigType.HANDS,"String_Node_Str");
  populateComboBox(feetComboBox,ConfigType.FEET,"String_Node_Str");
  updateAvatarName();
  updateGender();
  updateComboBoxes();
}

Fixed version (ground truth):
/** 
 * Sets the current attributes of the avatar and refreshes the GUI. NOTE: This method assumes it is being called in the AWT Event Thread.
 * @param attributes The attribute of the avatar configuration
 */
public void setAttributes(WonderlandCharacterParams attributes){
  if (EventQueue.isDispatchThread() == false) {
    LOGGER.severe("String_Node_Str");
  }
  currentParams=attributes.clone();
  populateComboBox(hairComboBox,ConfigType.HAIR);
  populateComboBox(headComboBox,ConfigType.HEAD);
  populateComboBox(torsoComboBox,ConfigType.TORSO);
  populateComboBox(legsComboBox,ConfigType.LEGS);
  populateComboBox(jacketComboBox,ConfigType.JACKET);
  populateComboBox(handsComboBox,ConfigType.HANDS);
  populateComboBox(feetComboBox,ConfigType.FEET);
  updateAvatarName();
  updateGender();
  updateComboBoxes();
}
Program: 45713
Project: 45713
Buggy source:
/** 
 * Initializes the given combo box with the elements from the given configuration type (ConfigType). The 'prefix' given the name to prepend to each entry in the combo box. NOTE: This method assumes it is being called in the AWT Event Thread.
 */
private void populateComboBox(JComboBox box,ConfigType type,String prefix){
  setLocalChanges(true);
  try {
    List<ConfigElement> elements=currentParams.getElements(type);
    DefaultComboBoxModel m=(DefaultComboBoxModel)box.getModel();
    m.removeAllElements();
    int i=0;
    for (    ConfigElement ce : elements) {
      m.insertElementAt(ce.getDescription(),i);
      i++;
    }
  }
  finally {
    setLocalChanges(false);
  }
}

Fixed version (ground truth):
/** 
 * Initializes the given combo box with the elements from the given configuration type (ConfigType). NOTE: This method assumes it is being called in the AWT Event Thread.
 */
private void populateComboBox(JComboBox box,ConfigType type){
  setLocalChanges(true);
  try {
    List<ConfigElement> elements=currentParams.getElements(type);
    DefaultComboBoxModel m=(DefaultComboBoxModel)box.getModel();
    m.removeAllElements();
    int i=0;
    for (    ConfigElement ce : elements) {
      String description=ce.getDescription();
      m.insertElementAt(PRESETS_BUNDLE.getString(description),i);
      i++;
    }
  }
  finally {
    setLocalChanges(false);
  }
}
Program: 45714
Project: 45714
Buggy source:
/** 
 * Default constructor 
 */
public AssetCache(AssetFactory factory){
  assetDB=new AssetDB();
  assetFactory=factory;
  cacheDir=new File(ClientContext.getUserDirectory(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Default constructor 
 */
public AssetCache(AssetFactory factory) throws AssetDBException {
  assetDB=new AssetDB();
  assetFactory=factory;
  cacheDir=new File(ClientContext.getUserDirectory(),"String_Node_Str");
}
Program: 45715
Project: 45715
Buggy source:
/** 
 * Disconnects from the database.
 */
public void disconnect(){
  if (isConnected) {
    String dbUrl=getDatabaseUrl();
    dbProperties.put("String_Node_Str","String_Node_Str");
    try {
      DriverManager.getConnection(dbUrl,dbProperties);
    }
 catch (    SQLException ex) {
      if (ex.getSQLState().equals("String_Node_Str") == true) {
        logger.log(Level.INFO,"String_Node_Str");
      }
 else {
        logger.log(Level.WARNING,"String_Node_Str" + ex.getMessage(),ex);
      }
    }
    isConnected=false;
    dbConnection=null;
  }
}

Fixed version (ground truth):
/** 
 * Disconnects from the database.
 */
public void disconnect(){
  if (isConnected) {
    String dbUrl=getDatabaseUrl();
    dbProperties.put("String_Node_Str","String_Node_Str");
    try {
      DriverManager.getConnection(dbUrl,dbProperties);
    }
 catch (    SQLException ex) {
      if (ex.getSQLState().equals("String_Node_Str") == true) {
        logger.log(Level.INFO,"String_Node_Str");
      }
 else {
        logger.log(Level.WARNING,"String_Node_Str" + "String_Node_Str" + ex.getMessage(),ex);
      }
    }
    isConnected=false;
    dbConnection=null;
  }
}
Program: 45716
Project: 45716
Buggy source:
/** 
 * Main method that has a simple command-line interface to test the database. The usage is: java AssetDB [COMMAND] [ARGS], where COMMAND can be: <p> LIST: Lists all of the entries in the database ADD: Add an entry to the database, followed by the required data fields
 */
public static void main(String[] args) throws URISyntaxException {
  AssetDB db=new AssetDB();
  logger.warning("String_Node_Str" + db.getDatabaseLocation());
  logger.warning("String_Node_Str" + db.getDatabaseUrl());
  logger.warning("String_Node_Str" + db.isConnected());
  db.listAssets();
  db.disconnect();
}

Fixed version (ground truth):
/** 
 * Main method that has a simple command-line interface to test the database. The usage is: java AssetDB [COMMAND] [ARGS], where COMMAND can be: <p> LIST: Lists all of the entries in the database ADD: Add an entry to the database, followed by the required data fields
 */
public static void main(String[] args) throws URISyntaxException, AssetDBException {
  AssetDB db=new AssetDB();
  logger.warning("String_Node_Str" + db.getDatabaseLocation());
  logger.warning("String_Node_Str" + db.getDatabaseUrl());
  logger.warning("String_Node_Str" + db.isConnected());
  db.listAssets();
  db.disconnect();
}
Program: 45717
Project: 45717
Buggy source:
/** 
 * Default constructor
 */
public AssetDB(){
  this.dbName=AssetDB.DB_NAME;
  logger.fine("String_Node_Str" + this.dbName);
  if (this.setDBSystemDir() == false) {
    logger.severe("String_Node_Str");
    System.exit(1);
  }
  try {
    Class.forName("String_Node_Str");
  }
 catch (  ClassNotFoundException ex) {
    logger.log(Level.SEVERE,"String_Node_Str",ex);
    ex.printStackTrace();
    System.exit(1);
  }
  dbProperties=new Properties();
  dbProperties.put("String_Node_Str","String_Node_Str");
  dbProperties.put("String_Node_Str","String_Node_Str");
  dbProperties.put("String_Node_Str","String_Node_Str");
  dbProperties.put("String_Node_Str","String_Node_Str");
  dbProperties.put("String_Node_Str","String_Node_Str");
  dbProperties.put("String_Node_Str","String_Node_Str");
  if (!dbExists()) {
    try {
      logger.fine("String_Node_Str" + getDatabaseLocation());
      createDatabase();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
catch (    Error er) {
      er.printStackTrace();
    }
    disconnect();
    if (!connect()) {
      logger.severe("String_Node_Str");
      logger.severe("String_Node_Str");
      System.exit(1);
    }
  }
 else {
    if (!connect()) {
      logger.severe("String_Node_Str");
      logger.severe("String_Node_Str");
      System.exit(1);
    }
  }
}

Fixed version (ground truth):
/** 
 * Default constructor.
 * @throw AssetDBException Upon error connecting to the DB
 */
public AssetDB() throws AssetDBException {
  this.dbName=AssetDB.DB_NAME;
  logger.fine("String_Node_Str" + this.dbName);
  if (this.setDBSystemDir() == false) {
    logger.severe("String_Node_Str");
    throw new AssetDBException("String_Node_Str");
  }
  try {
    Class.forName("String_Node_Str");
  }
 catch (  ClassNotFoundException ex) {
    logger.log(Level.SEVERE,"String_Node_Str",ex);
    ex.printStackTrace();
    System.exit(1);
  }
  dbProperties=new Properties();
  dbProperties.put("String_Node_Str","String_Node_Str");
  dbProperties.put("String_Node_Str","String_Node_Str");
  dbProperties.put("String_Node_Str","String_Node_Str");
  dbProperties.put("String_Node_Str","String_Node_Str");
  dbProperties.put("String_Node_Str","String_Node_Str");
  dbProperties.put("String_Node_Str","String_Node_Str");
  if (!dbExists()) {
    try {
      logger.fine("String_Node_Str" + getDatabaseLocation());
      createDatabase();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
catch (    Error er) {
      er.printStackTrace();
    }
    disconnect();
    if (!connect()) {
      logger.severe("String_Node_Str");
      logger.severe("String_Node_Str");
      throw new AssetDBException("String_Node_Str");
    }
  }
 else {
    if (!connect()) {
      logger.severe("String_Node_Str");
      logger.severe("String_Node_Str");
      throw new AssetDBException("String_Node_Str");
    }
  }
}
Program: 45718
Project: 45718
Buggy source:
private AssetManager(){
  assetFactory=new AssetFactory();
  assetCache=new AssetCache(assetFactory);
  loadingAssets=new HashMap<AssetID,AssetLoader>();
  loadedAssets=new HashMap<AssetID,Asset>();
}

Fixed version (ground truth):
private AssetManager(){
  try {
    assetFactory=new AssetFactory();
    assetCache=new AssetCache(assetFactory);
  }
 catch (  java.lang.Exception excp) {
    logger.log(Level.WARNING,"String_Node_Str",excp);
  }
  loadingAssets=new HashMap<AssetID,AssetLoader>();
  loadedAssets=new HashMap<AssetID,Asset>();
}
Program: 45720
Project: 45720
Buggy source:
public URL locateResourceImpl(String resourceName){
  while (resourceName.startsWith("String_Node_Str") && resourceName.length() > 2) {
    resourceName=resourceName.substring(2);
  }
  while (resourceName.startsWith("String_Node_Str") && resourceName.length() > 2) {
    resourceName=resourceName.substring(2);
  }
  try {
    String spec=URLEncoder.encode(resourceName,"String_Node_Str");
    spec=spec.replaceAll("String_Node_Str","String_Node_Str");
    URL rVal=new URL(baseDir.toURL(),spec);
    rVal.openStream().close();
    return rVal;
  }
 catch (  IOException e) {
  }
catch (  IllegalArgumentException e) {
  }
  resourceName=trimResourceName(resourceName);
  if (resourceName == null) {
    return null;
  }
 else {
    return locateResourceImpl(resourceName);
  }
}

Fixed version (ground truth):
public URL locateResourceImpl(String resourceName){
  while (resourceName.startsWith("String_Node_Str") && resourceName.length() > 2) {
    resourceName=resourceName.substring(2);
  }
  while (resourceName.startsWith("String_Node_Str") && resourceName.length() > 2) {
    resourceName=resourceName.substring(2);
  }
  try {
    String spec=URLEncoder.encode(resourceName,"String_Node_Str");
    URL rVal=new URL(baseDir.toURL(),spec);
    rVal.openStream().close();
    return rVal;
  }
 catch (  IOException e) {
  }
catch (  IllegalArgumentException e) {
  }
  resourceName=trimResourceName(resourceName);
  if (resourceName == null) {
    return null;
  }
 else {
    return locateResourceImpl(resourceName);
  }
}
Program: 45722
Project: 45722
Buggy source:
/** 
 * Deploy the dae files to the server, source[0] is the primary file.
 * @param moduleArtRootDir
 */
protected void deployModels(File targetDir,String moduleName,DeployedModel deployedModel,ImportedModel importedModel,HashMap<String,String> deploymentMapping,ModelCellComponentServerState state){
  URL[] source=importedModel.getAllOriginalModels();
  String filename=getFilename(importedModel.getOriginalURL());
  String filenameGZ=filename + "String_Node_Str";
  File targetFile=new File(targetDir,filenameGZ);
  try {
    targetFile.createNewFile();
    copyAsset(source[0],targetFile,true);
    deployedModel.setModelURL(importedModel.getDeploymentBaseURL() + filename + "String_Node_Str"+ filenameGZ);
    deployedModel.setLoaderDataURL(deployedModel.getModelURL() + "String_Node_Str");
    deployDeploymentData(targetDir,deployedModel,filenameGZ);
    state.setDeployedModelURL(deployedModel.getModelURL() + "String_Node_Str");
  }
 catch (  IOException ex) {
    Logger.getLogger(JmeColladaLoader.class.getName()).log(Level.SEVERE,"String_Node_Str" + targetFile,ex);
  }
}

Fixed version (ground truth):
/** 
 * Deploy the dae files to the server, source[0] is the primary file.
 * @param moduleArtRootDir
 */
protected void deployModels(File targetDir,String moduleName,DeployedModel deployedModel,ImportedModel importedModel,HashMap<String,String> deploymentMapping,ModelCellComponentServerState state){
  try {
    URL[] source=importedModel.getAllOriginalModels();
    String filename=getFilename(importedModel.getOriginalURL().toURI().getPath());
    String filenameGZ=filename + "String_Node_Str";
    File targetFile=new File(targetDir,filenameGZ);
    try {
      targetFile.createNewFile();
      copyAsset(source[0],targetFile,true);
      deployedModel.setModelURL(importedModel.getDeploymentBaseURL() + filename + "String_Node_Str"+ filenameGZ);
      deployedModel.setLoaderDataURL(deployedModel.getModelURL() + "String_Node_Str");
      deployDeploymentData(targetDir,deployedModel,filenameGZ);
      state.setDeployedModelURL(deployedModel.getModelURL() + "String_Node_Str");
    }
 catch (    IOException ex) {
      Logger.getLogger(JmeColladaLoader.class.getName()).log(Level.SEVERE,"String_Node_Str" + targetFile,ex);
    }
  }
 catch (  URISyntaxException ex) {
    Logger.getLogger(JmeColladaLoader.class.getName()).log(Level.SEVERE,null,ex);
  }
}
Program: 45723
Project: 45723
Buggy source:
/** 
 * Call this when the app has control in order to display the window menu for this window.
 * @param entity An arbitrary entity belonging to the window's cell.
 * @param mouseEvent The triggering AWT event.
 */
public void displayWindowMenu(Entity entity,MouseEvent mouseEvent){
  LinkedList<Entity> entities=new LinkedList<Entity>();
  entities.add(entity);
  WindowContextMenuEvent windowMenuEvent=new WindowContextMenuEvent(entities,mouseEvent);
  InputManager.inputManager().postEvent(windowMenuEvent);
}

Fixed version (ground truth):
/** 
 * Call this when the app has control in order to display the window menu for this window.
 * @param entity An arbitrary entity belonging to the window's cell.
 * @param mouseEvent The triggering AWT event.
 */
public void displayWindowMenu(Entity entity,MouseEvent mouseEvent){
  LinkedList<Entity> entities=new LinkedList<Entity>();
  entities.add(entity);
  WindowContextMenuEvent windowMenuEvent=new WindowContextMenuEvent(entities,mouseEvent);
  SceneManager.getSceneManager().postEvent(windowMenuEvent);
}
Program: 45725
Project: 45725
Buggy source:
/** 
 * Returns a set of cell factories given the extension type. If no factories are present for the given extension, returns null.
 * @param extension File type extension (e.g. 'jpg', 'dae')
 * @return A set of CellFactory objects registered on the extension
 */
public Set<CellFactorySPI> getCellFactoriesByExtension(String extension){
  extension=extension.toLowerCase();
  return cellFactoryExtensionMap.get(extension);
}

Fixed version (ground truth):
/** 
 * Returns a set of cell factories given the extension type. If no factories are present for the given extension, returns null.
 * @param extension File type extension (e.g. 'jpg', 'dae')
 * @return A set of CellFactory objects registered on the extension
 */
public Set<CellFactorySPI> getCellFactoriesByExtension(String extension){
  if (extension != null) {
    extension=extension.toLowerCase();
    return cellFactoryExtensionMap.get(extension);
  }
  return null;
}
Program: 45727
Project: 45727
Buggy source:
/** 
 * Return the names of the animations available to this character
 * @return
 */
Iterable<String> getAnimationNames(){
  return actionMap.keySet();
}

Fixed version (ground truth):
/** 
 * Return the names of the animations available to this character
 * @return
 */
public Iterable<String> getAnimationNames(){
  return actionMap.keySet();
}
Program: 45728
Project: 45728
Buggy source:
void setMiscAnimation(String animationName){
  currentActionInfo=actionMap.get(animationName);
  ActionState action=(ActionState)gameStates.get(CycleActionState.class);
  action.setAnimationSetBoolean(false);
  currentActionInfo.apply(action);
}

Fixed version (ground truth):
public void setMiscAnimation(String animationName){
  currentActionInfo=actionMap.get(animationName);
  ActionState action=(ActionState)gameStates.get(CycleActionState.class);
  action.setAnimationSetBoolean(false);
  currentActionInfo.apply(action);
}
Program: 45729
Project: 45729
Buggy source:
void playMiscAnimation(String name){
  if (getavatar().getCharacterParams().isAnimateBody()) {
    setMiscAnimation(name);
    triggerReleased(TriggerNames.MiscAction.ordinal());
    triggerPressed(TriggerNames.MiscAction.ordinal());
    triggerReleased(TriggerNames.MiscAction.ordinal());
  }
}

Fixed version (ground truth):
public void playMiscAnimation(String name){
  if (getavatar().getCharacterParams().isAnimateBody()) {
    setMiscAnimation(name);
    triggerReleased(TriggerNames.MiscAction.ordinal());
    triggerPressed(TriggerNames.MiscAction.ordinal());
    triggerReleased(TriggerNames.MiscAction.ordinal());
  }
}
Program: 45730
Project: 45730
Buggy source:
/** 
 * @{inheritDoc }
 */
public void restore(){
  nameTextField.setText(originalName);
  fullVolumeRadiusSpinner.setEnabled(false);
  xExtentSpinner.setEnabled(false);
  yExtentSpinner.setEnabled(false);
  zExtentSpinner.setEnabled(false);
  if (originalBoundsType.equals(COSBoundsType.CELL_BOUNDS)) {
    useCellBoundsRadioButton.setSelected(true);
  }
 else   if (originalBoundsType.equals(COSBoundsType.SPHERE)) {
    specifyRadiusRadioButton.setSelected(true);
    fullVolumeRadiusSpinner.setEnabled(false);
    fullVolumeRadiusSpinner.setValue(originalBounds.getX());
  }
 else {
    specifyRadiusRadioButton.setSelected(true);
    xExtentSpinner.setEnabled(true);
    yExtentSpinner.setEnabled(true);
    zExtentSpinner.setEnabled(true);
    xExtentSpinner.setValue(originalBounds.getX());
    yExtentSpinner.setValue(originalBounds.getY());
    zExtentSpinner.setValue(originalBounds.getZ());
  }
  outsideAudioVolumeSlider.setValue(originalOutsideAudioVolume);
  fullVolumeRadiusSpinner.setValue(originalBounds.getX());
}

Fixed version (ground truth):
/** 
 * @{inheritDoc }
 */
public void restore(){
  nameTextField.setText(originalName);
  fullVolumeRadiusSpinner.setEnabled(false);
  xExtentSpinner.setEnabled(false);
  yExtentSpinner.setEnabled(false);
  zExtentSpinner.setEnabled(false);
  if (originalBoundsType.equals(COSBoundsType.CELL_BOUNDS)) {
    useCellBoundsRadioButton.setSelected(true);
  }
 else   if (originalBoundsType.equals(COSBoundsType.SPHERE)) {
    specifyRadiusRadioButton.setSelected(true);
    fullVolumeRadiusSpinner.setEnabled(false);
    fullVolumeRadiusSpinner.setValue(originalBounds.getX());
  }
 else {
    specifyBoxRadioButton.setSelected(true);
    xExtentSpinner.setEnabled(true);
    yExtentSpinner.setEnabled(true);
    zExtentSpinner.setEnabled(true);
    xExtentSpinner.setValue(originalBounds.getX());
    yExtentSpinner.setValue(originalBounds.getY());
    zExtentSpinner.setValue(originalBounds.getZ());
  }
  outsideAudioVolumeSlider.setValue(originalOutsideAudioVolume);
  fullVolumeRadiusSpinner.setValue(originalBounds.getX());
}
Program: 45731
Project: 45731
Buggy source:
private void specifyBoxRadioButtonActionPerformed(java.awt.event.ActionEvent evt){
  fullVolumeRadiusSpinner.setEnabled(false);
  xExtentSpinner.setEnabled(true);
  yExtentSpinner.setEnabled(true);
  zExtentSpinner.setEnabled(true);
  boundsType=COSBoundsType.BOX;
  if (editor != null) {
    editor.setPanelDirty(ConeOfSilenceComponentProperties.class,originalBoundsType.equals(COSBoundsType.BOX) == false);
  }
}

Fixed version (ground truth):
private void specifyBoxRadioButtonActionPerformed(java.awt.event.ActionEvent evt){
  if (specifyBoxRadioButton.isSelected() == false) {
    return;
  }
  fullVolumeRadiusSpinner.setEnabled(false);
  xExtentSpinner.setEnabled(true);
  yExtentSpinner.setEnabled(true);
  zExtentSpinner.setEnabled(true);
  boundsType=COSBoundsType.BOX;
  if (editor != null) {
    editor.setPanelDirty(ConeOfSilenceComponentProperties.class,originalBoundsType.equals(COSBoundsType.BOX) == false);
  }
}
Program: 45732
Project: 45732
Buggy source:
/** 
 * @{inheritDoc }
 */
public void apply(){
  CellServerState cellServerState=editor.getCellServerState();
  ConeOfSilenceComponentServerState state=(ConeOfSilenceComponentServerState)cellServerState.getComponentServerState(ConeOfSilenceComponentServerState.class);
  if (state == null) {
    return;
  }
  state.setName(nameTextField.getText());
  COSBoundsType boundsType;
  if (useCellBoundsRadioButton.isSelected()) {
    boundsType=COSBoundsType.CELL_BOUNDS;
  }
 else   if (specifyRadiusRadioButton.isSelected()) {
    boundsType=COSBoundsType.SPHERE;
  }
 else {
    boundsType=COSBoundsType.BOX;
  }
  state.setBoundsType(boundsType);
  state.setOutsideAudioVolume(VolumeUtil.getServerVolume(outsideAudioVolumeSlider.getValue()));
  editor.addToUpdateList(state);
}

Fixed version (ground truth):
/** 
 * @{inheritDoc }
 */
public void apply(){
  CellServerState cellServerState=editor.getCellServerState();
  ConeOfSilenceComponentServerState state=(ConeOfSilenceComponentServerState)cellServerState.getComponentServerState(ConeOfSilenceComponentServerState.class);
  if (state == null) {
    return;
  }
  state.setName(nameTextField.getText());
  if (useCellBoundsRadioButton.isSelected()) {
    state.setBoundsType(COSBoundsType.CELL_BOUNDS);
  }
 else   if (specifyRadiusRadioButton.isSelected()) {
    state.setBoundsType(COSBoundsType.SPHERE);
    state.setBounds(new Vector3f((Float)fullVolumeRadiusModel.getValue(),0f,0));
  }
 else {
    state.setBoundsType(COSBoundsType.BOX);
    state.setBounds(new Vector3f((Float)xExtentSpinner.getValue(),(Float)yExtentSpinner.getValue(),(Float)zExtentSpinner.getValue()));
  }
  state.setOutsideAudioVolume(VolumeUtil.getServerVolume(outsideAudioVolumeSlider.getValue()));
  editor.addToUpdateList(state);
}
Program: 45733
Project: 45733
Buggy source:
private void useCellBoundsRadioButtonActionPerformed(java.awt.event.ActionEvent evt){
  fullVolumeRadiusSpinner.setEnabled(false);
  xExtentSpinner.setEnabled(false);
  yExtentSpinner.setEnabled(false);
  zExtentSpinner.setEnabled(false);
  boundsType=COSBoundsType.CELL_BOUNDS;
  fullVolumeRadiusSpinner.setEnabled(false);
  xExtentSpinner.setEnabled(false);
  yExtentSpinner.setEnabled(false);
  zExtentSpinner.setEnabled(false);
  if (editor != null) {
    editor.setPanelDirty(ConeOfSilenceComponentProperties.class,originalBoundsType.equals(COSBoundsType.CELL_BOUNDS) == false);
  }
}

Fixed version (ground truth):
private void useCellBoundsRadioButtonActionPerformed(java.awt.event.ActionEvent evt){
  if (useCellBoundsRadioButton.isSelected() == false) {
    return;
  }
  fullVolumeRadiusSpinner.setEnabled(false);
  xExtentSpinner.setEnabled(false);
  yExtentSpinner.setEnabled(false);
  zExtentSpinner.setEnabled(false);
  boundsType=COSBoundsType.CELL_BOUNDS;
  fullVolumeRadiusSpinner.setEnabled(false);
  xExtentSpinner.setEnabled(false);
  yExtentSpinner.setEnabled(false);
  zExtentSpinner.setEnabled(false);
  if (editor != null) {
    editor.setPanelDirty(ConeOfSilenceComponentProperties.class,originalBoundsType.equals(COSBoundsType.CELL_BOUNDS) == false);
  }
}
Program: 45734
Project: 45734
Buggy source:
/** 
 * Creates new form ConeOfSilenceComponentProperties 
 */
public ConeOfSilenceComponentProperties(){
  initComponents();
  fullVolumeRadiusModel=new SpinnerNumberModel(new Float(1),new Float(0),new Float(100),new Float(.1));
  fullVolumeRadiusSpinner.setModel(fullVolumeRadiusModel);
  xExtentModel=new SpinnerNumberModel(new Float(1),new Float(0),new Float(100),new Float(.1));
  xExtentSpinner.setModel(xExtentModel);
  yExtentModel=new SpinnerNumberModel(new Float(1),new Float(0),new Float(100),new Float(.1));
  yExtentSpinner.setModel(yExtentModel);
  zExtentModel=new SpinnerNumberModel(new Float(1),new Float(0),new Float(100),new Float(.1));
  zExtentSpinner.setModel(yExtentModel);
  nameTextField.getDocument().addDocumentListener(new NameTextFieldListener());
  fullVolumeRadiusModel.addChangeListener(new RadiusChangeListener());
  xExtentModel.addChangeListener(new XExtentChangeListener());
  yExtentModel.addChangeListener(new YExtentChangeListener());
  zExtentModel.addChangeListener(new ZExtentChangeListener());
}

Fixed version (ground truth):
/** 
 * Creates new form ConeOfSilenceComponentProperties 
 */
public ConeOfSilenceComponentProperties(){
  initComponents();
  fullVolumeRadiusModel=new SpinnerNumberModel(new Float(1),new Float(0),new Float(100),new Float(.1));
  fullVolumeRadiusSpinner.setModel(fullVolumeRadiusModel);
  xExtentModel=new SpinnerNumberModel(new Float(1),new Float(0),new Float(100),new Float(.1));
  xExtentSpinner.setModel(xExtentModel);
  yExtentModel=new SpinnerNumberModel(new Float(1),new Float(0),new Float(100),new Float(.1));
  yExtentSpinner.setModel(yExtentModel);
  zExtentModel=new SpinnerNumberModel(new Float(1),new Float(0),new Float(100),new Float(.1));
  zExtentSpinner.setModel(zExtentModel);
  nameTextField.getDocument().addDocumentListener(new NameTextFieldListener());
  fullVolumeRadiusModel.addChangeListener(new RadiusChangeListener());
  xExtentModel.addChangeListener(new XExtentChangeListener());
  yExtentModel.addChangeListener(new YExtentChangeListener());
  zExtentModel.addChangeListener(new ZExtentChangeListener());
}