nus-yam/ex-repair huggingface dataset:
Program: 45735
Project: 45735
Buggy source:
private void specifyRadiusRadioButtonActionPerformed(java.awt.event.ActionEvent evt){
  fullVolumeRadiusSpinner.setEnabled(true);
  xExtentSpinner.setEnabled(false);
  yExtentSpinner.setEnabled(false);
  zExtentSpinner.setEnabled(false);
  boundsType=COSBoundsType.SPHERE;
  if (editor != null) {
    editor.setPanelDirty(ConeOfSilenceComponentProperties.class,originalBoundsType.equals(COSBoundsType.SPHERE) == false);
  }
}

Fixed version (ground truth):
private void specifyRadiusRadioButtonActionPerformed(java.awt.event.ActionEvent evt){
  if (specifyRadiusRadioButton.isSelected() == false) {
    return;
  }
  fullVolumeRadiusSpinner.setEnabled(true);
  xExtentSpinner.setEnabled(false);
  yExtentSpinner.setEnabled(false);
  zExtentSpinner.setEnabled(false);
  boundsType=COSBoundsType.SPHERE;
  if (editor != null) {
    editor.setPanelDirty(ConeOfSilenceComponentProperties.class,originalBoundsType.equals(COSBoundsType.SPHERE) == false);
  }
}
Program: 45736
Project: 45736
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()) {
      System.out.println("String_Node_Str");
      System.out.println("String_Node_Str");
      System.exit(1);
    }
  }
 else {
    if (!connect()) {
      System.out.println("String_Node_Str");
      System.out.println("String_Node_Str");
      System.exit(1);
    }
  }
}

Fixed version (ground truth):
/** 
 * 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);
    }
  }
}
Program: 45737
Project: 45737
Buggy source:
public static void downloadFile() throws java.net.URISyntaxException {
  final Thread threads[]=new Thread[uris.length];
  for (int i=0; i < uris.length; i++) {
    final int j=i;
    threads[i]=new Thread(ThreadManager.getThreadGroup(),"String_Node_Str"){
      @Override public void run(){
        Logger logger=Logger.getLogger(AssetManager.class.getName());
        AssetManager assetManager=AssetManager.getAssetManager();
        AssetURI assetURI=AssetURI.uriFactory(uris[j]);
        assetURI.setServerHostAndPort("String_Node_Str");
        Asset asset=assetManager.getAsset(assetURI);
        assetManager.waitForAsset(asset);
        logger.fine("String_Node_Str" + asset.getFailureInfo());
        if (asset.getLocalCacheFile() == null) {
          logger.fine("String_Node_Str");
        }
 else {
          logger.fine("String_Node_Str" + asset.getLocalCacheFile().getAbsolutePath());
        }
        logger.fine("String_Node_Str" + assetURI.toString());
      }
    }
;
    threads[i].start();
  }
  for (int i=0; i < uris.length; i++) {
    try {
      threads[i].join();
    }
 catch (    java.lang.InterruptedException excp) {
      System.out.println(excp.toString());
    }
  }
}

Fixed version (ground truth):
public static void downloadFile() throws java.net.URISyntaxException {
  final Thread threads[]=new Thread[uris.length];
  for (int i=0; i < uris.length; i++) {
    final int j=i;
    threads[i]=new Thread(ThreadManager.getThreadGroup(),"String_Node_Str"){
      @Override public void run(){
        Logger logger=Logger.getLogger(AssetManager.class.getName());
        AssetManager assetManager=AssetManager.getAssetManager();
        AssetURI assetURI=AssetURI.uriFactory(uris[j]);
        assetURI.setServerHostAndPort("String_Node_Str");
        Asset asset=assetManager.getAsset(assetURI);
        assetManager.waitForAsset(asset);
        logger.fine("String_Node_Str" + asset.getFailureInfo());
        if (asset.getLocalCacheFile() == null) {
          logger.fine("String_Node_Str");
        }
 else {
          logger.fine("String_Node_Str" + asset.getLocalCacheFile().getAbsolutePath());
        }
        logger.fine("String_Node_Str" + assetURI.toString());
      }
    }
;
    threads[i].start();
  }
  for (int i=0; i < uris.length; i++) {
    try {
      threads[i].join();
    }
 catch (    java.lang.InterruptedException excp) {
      logger.log(Level.WARNING,"String_Node_Str",excp);
    }
  }
}
Program: 45738
Project: 45738
Buggy source:
/** 
 */
public void handleDrop(Transferable transferable,DataFlavor dataFlavor,Point dropLocation){
  String data=null;
  try {
    data=(String)transferable.getTransferData(dataFlavor);
  }
 catch (  UnsupportedFlavorException ex) {
    logger.log(Level.SEVERE,null,ex);
  }
catch (  IOException ex) {
    logger.log(Level.SEVERE,null,ex);
  }
  System.out.println("String_Node_Str" + data);
  List<URI> uriList=uriStringToList(data);
  if (uriList.isEmpty() == true) {
    logger.warning("String_Node_Str" + data);
    return;
  }
  URI uri=uriList.get(0);
  String scheme=uri.getScheme();
  if (scheme == null) {
    logger.warning("String_Node_Str" + uri.toString());
    return;
  }
  if (scheme.equals("String_Node_Str") == false) {
    try {
      URLDataFlavorHandler.launchCellFromURL(uri.toURL());
    }
 catch (    MalformedURLException excp) {
      logger.log(Level.WARNING,"String_Node_Str" + uri.toString(),excp);
      return;
    }
  }
 else {
    File file=null;
    if (uri.getAuthority() != null) {
      logger.warning("String_Node_Str" + uri.getPath());
      file=new File(uri.getPath());
    }
 else {
      logger.warning("String_Node_Str" + uri.toString());
      file=new File(uri);
    }
    List<File> fileList=new LinkedList();
    fileList.add(file);
    FileListDataFlavorHandler.launchCellFromFileList(fileList);
  }
}

Fixed version (ground truth):
/** 
 */
public void handleDrop(Transferable transferable,DataFlavor dataFlavor,Point dropLocation){
  String data=null;
  try {
    data=(String)transferable.getTransferData(dataFlavor);
  }
 catch (  UnsupportedFlavorException ex) {
    logger.log(Level.SEVERE,null,ex);
  }
catch (  IOException ex) {
    logger.log(Level.SEVERE,null,ex);
  }
  List<URI> uriList=uriStringToList(data);
  if (uriList.isEmpty() == true) {
    logger.warning("String_Node_Str" + data);
    return;
  }
  URI uri=uriList.get(0);
  String scheme=uri.getScheme();
  if (scheme == null) {
    logger.warning("String_Node_Str" + uri.toString());
    return;
  }
  if (scheme.equals("String_Node_Str") == false) {
    try {
      URLDataFlavorHandler.launchCellFromURL(uri.toURL());
    }
 catch (    MalformedURLException excp) {
      logger.log(Level.WARNING,"String_Node_Str" + uri.toString(),excp);
      return;
    }
  }
 else {
    File file=null;
    if (uri.getAuthority() != null) {
      logger.warning("String_Node_Str" + uri.getPath());
      file=new File(uri.getPath());
    }
 else {
      logger.warning("String_Node_Str" + uri.toString());
      file=new File(uri);
    }
    List<File> fileList=new LinkedList();
    fileList.add(file);
    FileListDataFlavorHandler.launchCellFromFileList(fileList);
  }
}
Program: 45739
Project: 45739
Buggy source:
/** 
 * Constructor, takes base URL  of the server 
 */
public ServerCache(String serverURL){
  System.out.println("String_Node_Str" + serverURL);
  this.serverURL=serverURL;
  this.reload();
  ServerSessionManager ssm=LoginManager.findSessionManager(serverURL);
  if (ssm == null) {
    logger.log(Level.WARNING,"String_Node_Str" + serverURL);
  }
 else {
    this.listener=new SessionListener(ssm);
  }
}

Fixed version (ground truth):
/** 
 * Constructor, takes base URL  of the server 
 */
public ServerCache(String serverURL){
  this.serverURL=serverURL;
  this.reload();
  ServerSessionManager ssm=LoginManager.findSessionManager(serverURL);
  if (ssm == null) {
    logger.log(Level.WARNING,"String_Node_Str" + serverURL);
  }
 else {
    this.listener=new SessionListener(ssm);
  }
}
Program: 45740
Project: 45740
Buggy source:
@Override public void connect() throws IOException {
  System.out.println("String_Node_Str" + url);
}

Fixed version (ground truth):
@Override public void connect() throws IOException {
}
Program: 45741
Project: 45741
Buggy source:
@Override public void connect() throws IOException {
  System.out.println("String_Node_Str" + url);
}

Fixed version (ground truth):
@Override public void connect() throws IOException {
}
Program: 45743
Project: 45743
Buggy source:
protected void componentWorldVisible(HUDComponent2D component){
  if (logger.isLoggable(Level.INFO)) {
    logger.info("String_Node_Str" + component);
  }
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if ((state != null) && (!state.isWorldVisible())) {
    Cell cell=component.getCell();
    if (cell != null) {
      HUDView3D worldView=state.getWorldView();
      if (worldView == null) {
        logger.fine("String_Node_Str");
        HUDView3DDisplayer worldDisplayer=new HUDView3DDisplayer(cell);
        logger.fine("String_Node_Str");
        worldView=worldDisplayer.createView(state.getWindow());
        worldView.setPixelScale(worldPixelScale);
        state.setWorldView(worldView);
      }
      logger.fine("String_Node_Str");
      worldView.setOrtho(false,false);
      worldView.setPixelScale(worldPixelScale);
      worldView.setVisibleApp(true);
      worldView.setVisibleUser(true,false);
      componentMovedWorld(component);
      worldView.update();
    }
  }
}

Fixed version (ground truth):
protected void componentWorldVisible(HUDComponent2D component){
  if (logger.isLoggable(Level.INFO)) {
    logger.info("String_Node_Str" + component);
  }
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if ((state != null) && (!state.isWorldVisible())) {
    Cell cell=component.getCell();
    if (cell != null) {
      HUDView3D worldView=state.getWorldView();
      if (worldView == null) {
        logger.fine("String_Node_Str");
        HUDView3DDisplayer worldDisplayer=new HUDView3DDisplayer(cell);
        logger.fine("String_Node_Str");
        worldView=worldDisplayer.createView(state.getWindow());
        worldView.setPixelScale(worldPixelScale);
        state.setWorldView(worldView);
      }
      logger.fine("String_Node_Str");
      worldView.setOrtho(false,false);
      worldView.setPixelScale(worldPixelScale);
      worldView.setVisibleUser(true,false);
      componentMovedWorld(component);
      worldView.update();
    }
  }
}
Program: 45744
Project: 45744
Buggy source:
protected void componentWorldInvisible(HUDComponent2D component){
  if (logger.isLoggable(Level.INFO)) {
    logger.info("String_Node_Str" + component);
  }
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if ((state != null) && (state.isWorldVisible())) {
    HUDView3D worldView=state.getWorldView();
    if (worldView != null) {
      logger.fine("String_Node_Str");
      worldView.setVisibleApp(false);
      worldView.setVisibleUser(false,false);
      worldView.update();
    }
 else {
      logger.warning("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
protected void componentWorldInvisible(HUDComponent2D component){
  if (logger.isLoggable(Level.INFO)) {
    logger.info("String_Node_Str" + component);
  }
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if ((state != null) && (state.isWorldVisible())) {
    HUDView3D worldView=state.getWorldView();
    if (worldView != null) {
      logger.fine("String_Node_Str");
      worldView.setVisibleUser(false,false);
      worldView.update();
    }
 else {
      logger.warning("String_Node_Str");
    }
  }
}
Program: 45745
Project: 45745
Buggy source:
private void showFrame(HUDComponent2D component,boolean visible){
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("String_Node_Str" + component + "String_Node_Str"+ visible);
  }
  if (component.getDecoratable() == true) {
    HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
    HUDView2D view=state.getView();
    HUDView2D frameView=state.getFrameView();
    if (visible && (frameView == null)) {
      logger.fine("String_Node_Str");
      addFrame(component);
      frameView=state.getFrameView();
      view.attachView(frameView);
    }
    frameView.setVisibleApp(visible);
    frameView.setVisibleUser(visible);
    if (!visible) {
      logger.fine("String_Node_Str");
      view.detachView(view);
      removeFrame(component);
    }
  }
}

Fixed version (ground truth):
private void showFrame(HUDComponent2D component,boolean visible){
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("String_Node_Str" + component + "String_Node_Str"+ visible);
  }
  if (component.getDecoratable() == true) {
    HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
    HUDView2D view=state.getView();
    HUDView2D frameView=state.getFrameView();
    if (visible && (frameView == null)) {
      logger.fine("String_Node_Str");
      addFrame(component);
      frameView=state.getFrameView();
      view.attachView(frameView);
    }
    if (frameView != null) {
      frameView.setVisibleUser(visible);
      if (!visible) {
        logger.fine("String_Node_Str");
        view.detachView(view);
        removeFrame(component);
      }
    }
  }
}
Program: 45746
Project: 45746
Buggy source:
protected void componentInvisible(HUDComponent2D component){
  if (logger.isLoggable(Level.INFO)) {
    logger.info("String_Node_Str" + component);
  }
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if ((state != null) && (state.isVisible())) {
    HUDView2D view=state.getView();
    if (view != null) {
      logger.fine("String_Node_Str");
      view.setVisibleApp(false,false);
      view.setVisibleUser(false);
    }
 else {
      logger.warning("String_Node_Str");
    }
    showFrame(component,false);
  }
}

Fixed version (ground truth):
protected void componentInvisible(HUDComponent2D component){
  if (logger.isLoggable(Level.INFO)) {
    logger.info("String_Node_Str" + component);
  }
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if ((state != null) && (state.isVisible())) {
    HUDView2D view=state.getView();
    if (view != null) {
      logger.fine("String_Node_Str");
      view.setVisibleUser(false);
    }
 else {
      logger.warning("String_Node_Str");
    }
    showFrame(component,false);
  }
}
Program: 45747
Project: 45747
Buggy source:
public void addFrameHeader(HUDComponent component){
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("String_Node_Str" + component);
  }
  HUDComponentState state=hudStateMap.get(component);
  HUDFrameHeader2DImpl frameImpl=new HUDFrameHeader2DImpl();
  frameImpl.setPreferredSize(new Dimension(component.getWidth(),(int)frameImpl.getPreferredSize().getHeight()));
  HUDFrameHeader2D frame=new HUDFrameHeader2D(frameImpl);
  frame.setTitle(component.getName());
  Window2D window=createWindow(frame);
  frame.setWindow(window);
  Window2D componentWindow=state.getWindow();
  HUDView2D frameView=hudDisplayer.createView(window);
  frameView.setOrtho(true,false);
  frameView.setPixelScaleOrtho(hudPixelScale,false);
  frameView.setSizeApp(new Dimension((int)(window.getWidth()),frame.getHeight()));
  frameView.setLocationOrtho(new Vector2f(0.0f,(float)(0.75 * frame.getHeight() / 2 + 0.75f * componentWindow.getHeight() / 2)));
  frameImpl.addActionListener(frame);
  frame.addActionListener(this);
  frameImpl.addMouseMotionListener(frame);
  frame.addMouseMotionListener(this);
  state.setFrame(frame);
  state.setFrameWindow(window);
  state.setFrameView(frameView);
  hudFrameMap.put(frame,component);
}

Fixed version (ground truth):
public void addFrameHeader(HUDComponent component){
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("String_Node_Str" + component);
  }
  HUDComponentState state=hudStateMap.get(component);
  HUDFrameHeader2DImpl frameImpl=new HUDFrameHeader2DImpl();
  frameImpl.setPreferredSize(new Dimension(component.getWidth(),(int)frameImpl.getPreferredSize().getHeight()));
  HUDFrameHeader2D frame=new HUDFrameHeader2D(frameImpl);
  frame.setTitle(component.getName());
  Window2D window=createWindow(frame);
  frame.setWindow(window);
  Window2D componentWindow=state.getWindow();
  HUDView2D frameView=hudDisplayer.createView(window);
  frameView.setOrtho(true,false);
  frameView.setPixelScaleOrtho(hudPixelScale,false);
  frameView.setSizeApp(new Dimension((int)(window.getWidth()),frame.getHeight()));
  frameView.setLocationOrtho(new Vector2f(0.0f,(float)(0.75 * frame.getHeight() / 2 + 0.75f * componentWindow.getHeight() / 2)));
  frameView.setVisibleApp(true);
  frameImpl.addActionListener(frame);
  frame.addActionListener(this);
  frameImpl.addMouseMotionListener(frame);
  frame.addMouseMotionListener(this);
  state.setFrame(frame);
  state.setFrameWindow(window);
  state.setFrameView(frameView);
  hudFrameMap.put(frame,component);
}
Program: 45748
Project: 45748
Buggy source:
protected void componentVisible(HUDComponent2D component){
  if (logger.isLoggable(Level.INFO)) {
    logger.info("String_Node_Str" + component);
  }
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state == null) {
    return;
  }
  HUDView2D view=state.getView();
  if (view == null) {
    if (hudDisplayer == null) {
      hudDisplayer=new HUDView2DDisplayer();
    }
    view=hudDisplayer.createView(state.getWindow());
    state.setView(view);
    if (layout != null) {
      layout.addView(component,view);
    }
  }
  view.setOrtho(true,false);
  view.setPixelScaleOrtho(hudPixelScale,false);
  view.setVisibleUser(false);
  Vector2f location=(layout != null) ? layout.getLocation(component) : new Vector2f(component.getX(),component.getY());
  component.setLocation((int)location.x,(int)location.y,false);
  view.setLocationOrtho(new Vector2f(location.x + view.getDisplayerLocalWidth() / 2,location.y + view.getDisplayerLocalHeight() / 2),false);
  if (component.getPreferredTransparency() != 1.0f) {
    component.setTransparency(component.getPreferredTransparency());
  }
 else {
    component.changeTransparency(1.0f,unfocusedTransparency);
  }
  view.setVisibleApp(true,false);
  view.setVisibleUser(true);
  if (component.getDecoratable()) {
    showFrame(component,true);
  }
}

Fixed version (ground truth):
protected void componentVisible(HUDComponent2D component){
  if (logger.isLoggable(Level.INFO)) {
    logger.info("String_Node_Str" + component);
  }
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state == null) {
    return;
  }
  HUDView2D view=state.getView();
  if (view == null) {
    if (hudDisplayer == null) {
      hudDisplayer=new HUDView2DDisplayer();
    }
    view=hudDisplayer.createView(state.getWindow());
    state.setView(view);
    if (layout != null) {
      layout.addView(component,view);
    }
    if (((HUDComponent2D)component).isHUDManagedWindow()) {
      view.setVisibleApp(true);
    }
  }
  view.setOrtho(true,false);
  view.setPixelScaleOrtho(hudPixelScale,false);
  Vector2f location=(layout != null) ? layout.getLocation(component) : new Vector2f(component.getX(),component.getY());
  component.setLocation((int)location.x,(int)location.y,false);
  view.setLocationOrtho(new Vector2f(location.x + view.getDisplayerLocalWidth() / 2,location.y + view.getDisplayerLocalHeight() / 2),false);
  if (component.getPreferredTransparency() != 1.0f) {
    component.setTransparency(component.getPreferredTransparency());
  }
 else {
    component.changeTransparency(1.0f,unfocusedTransparency);
  }
  view.setVisibleUser(true);
  if (component.getDecoratable()) {
    Type windowType=state.getWindow().getType();
    if ((windowType != Type.POPUP) && (windowType != Type.UNKNOWN)) {
      showFrame(component,true);
    }
  }
}
Program: 45750
Project: 45750
Buggy source:
public void setCameraController(CameraController cameraController){
synchronized (this) {
    pendingController=cameraController;
  }
}

Fixed version (ground truth):
/** 
 * Set the camera controller. Note this call will return immediately but the camera controller will not be applied to the system until the next frame is rendererd, the change is applied in the compute method of this processor.
 * @param cameraController
 */
public void setCameraController(CameraController cameraController){
synchronized (this) {
    pendingController=cameraController;
  }
}
Program: 45751
Project: 45751
Buggy source:
public CameraController getCameraController(){
synchronized (this) {
    return pendingController;
  }
}

Fixed version (ground truth):
/** 
 * Return the camera controller. This method returns the most recently set cameraController, which may not be the controller being used this frame. CameraController changes are applied in the processor commit method, this method will return the most recently set camera controller, the application of which may still be pending.
 * @return
 */
public CameraController getCameraController(){
synchronized (this) {
    if (pendingController != null)     return pendingController;
    return cameraController;
  }
}
Program: 45753
Project: 45753
Buggy source:
public AvatarNameEvent(EventType eventType,String username,String usernameAlias,Color foregroundColor,Font font){
  this.eventType=eventType;
  this.username=username;
  this.usernameAlias=usernameAlias;
  this.foregroundColor=foregroundColor;
  this.font=font;
}

Fixed version (ground truth):
public AvatarNameEvent(EventType eventType,String username,String usernameAlias){
  this.eventType=eventType;
  this.username=username;
  this.usernameAlias=usernameAlias;
}
Program: 45754
Project: 45754
Buggy source:
@Override public Event clone(Event evt){
  if (evt == null) {
    evt=new AvatarNameEvent(eventType,username,usernameAlias,foregroundColor,font);
  }
 else {
    AvatarNameEvent e=(AvatarNameEvent)evt;
    e.setEventType(eventType);
    e.setUsername(username);
    e.setUsernameAlias(usernameAlias);
    e.setForegroundColor(foregroundColor);
    e.setFont(font);
  }
  super.clone(evt);
  return evt;
}

Fixed version (ground truth):
@Override public Event clone(Event evt){
  if (evt == null) {
    evt=new AvatarNameEvent(eventType,username,usernameAlias);
  }
 else {
    AvatarNameEvent e=(AvatarNameEvent)evt;
    e.setEventType(eventType);
    e.setUsername(username);
    e.setUsernameAlias(usernameAlias);
  }
  super.clone(evt);
  return evt;
}
Program: 45755
Project: 45755
Buggy source:
public String toString(){
  return "String_Node_Str" + eventType + "String_Node_Str"+ username+ "String_Node_Str"+ usernameAlias+ "String_Node_Str"+ foregroundColor+ "String_Node_Str"+ font;
}

Fixed version (ground truth):
public String toString(){
  return "String_Node_Str" + eventType + "String_Node_Str"+ username+ "String_Node_Str"+ usernameAlias;
}
Program: 45756
Project: 45756
Buggy source:
public void setVisible(boolean visible){
  this.visible=visible;
  if (visible) {
    updateLabel(getDisplayName(name,isSpeaking,isMuted));
  }
 else {
    removeLabel();
  }
}

Fixed version (ground truth):
public void setVisible(boolean visible){
  this.visible=visible;
  if (visible) {
    updateLabel();
  }
 else {
    removeLabel();
  }
}
Program: 45757
Project: 45757
Buggy source:
public void commit(){
  if (visible) {
    if (label == null) {
      label=new TextLabel2D(displayName,foregroundColor,backgroundColor,currentHeight,true,currentFont);
      label.setLocalTranslation(0,heightAbove,0);
      Matrix3f rot=new Matrix3f();
      rot.fromAngleAxis((float)Math.PI,new Vector3f(0f,1f,0f));
      label.setLocalRotation(rot);
      attachChild(label);
    }
 else {
      label.setText(displayName,foregroundColor,backgroundColor);
    }
    ClientContextJME.getWorldManager().addToUpdateList(NameTagNode.this);
  }
}

Fixed version (ground truth):
public void commit(){
  if (visible) {
    if (label == null) {
      label=new TextLabel2D(displayName,foregroundColor,backgroundColor,height,true,font);
      label.setLocalTranslation(0,heightAbove,0);
      Matrix3f rot=new Matrix3f();
      rot.fromAngleAxis((float)Math.PI,new Vector3f(0f,1f,0f));
      label.setLocalRotation(rot);
      attachChild(label);
    }
 else {
      label.setText(displayName,foregroundColor,backgroundColor);
    }
    ClientContextJME.getWorldManager().addToUpdateList(NameTagNode.this);
  }
}
Program: 45758
Project: 45758
Buggy source:
public synchronized void setNameTag(EventType eventType,String username,String alias,Color foregroundColor,Font font){
  logger.fine("String_Node_Str" + eventType + "String_Node_Str"+ username+ "String_Node_Str"+ alias+ "String_Node_Str"+ foregroundColor+ "String_Node_Str"+ font);
switch (eventType) {
case HIDE:
    labelHidden=true;
  removeLabel();
return;
case SMALL_FONT:
labelHidden=false;
removeLabel();
setHeight(SMALL_SIZE);
break;
case REGULAR_FONT:
labelHidden=false;
removeLabel();
setHeight(REGULAR_SIZE);
break;
case LARGE_FONT:
labelHidden=false;
removeLabel();
setHeight(LARGE_SIZE);
break;
case ENTERED_CONE_OF_SILENCE:
inConeOfSilence=true;
setForegroundColor(CONE_OF_SILENCE_COLOR);
break;
case EXITED_CONE_OF_SILENCE:
inConeOfSilence=false;
setForegroundColor(NOT_SPEAKING_COLOR);
break;
case STARTED_SPEAKING:
isSpeaking=true;
setForegroundColor(SPEAKING_COLOR);
break;
case STOPPED_SPEAKING:
isSpeaking=false;
setForegroundColor(NOT_SPEAKING_COLOR);
break;
case MUTE:
isMuted=true;
setForegroundColor(NOT_SPEAKING_COLOR);
removeLabel();
break;
case UNMUTE:
isMuted=false;
setForegroundColor(NOT_SPEAKING_COLOR);
break;
case CHANGE_NAME:
removeLabel();
usernameAlias=alias;
break;
default :
logger.warning("String_Node_Str" + eventType);
break;
}
if ((alias != null) && !alias.equals(username)) {
setFont(ALIAS_NAME_FONT);
usernameAlias=alias;
updateLabel(getDisplayName(usernameAlias,isSpeaking,isMuted));
}
 else {
setFont(REAL_NAME_FONT);
updateLabel(getDisplayName(name,isSpeaking,isMuted));
}
if (foregroundColor != null) {
setForegroundColor(foregroundColor);
}
}

Fixed version (ground truth):
public void setNameTag(EventType eventType,String username,String alias){
  logger.fine("String_Node_Str" + eventType + "String_Node_Str"+ username+ "String_Node_Str"+ alias);
switch (eventType) {
case HIDE:
    labelHidden=true;
  break;
case SMALL_FONT:
labelHidden=false;
height=SMALL_SIZE;
break;
case REGULAR_FONT:
labelHidden=false;
height=REGULAR_SIZE;
break;
case LARGE_FONT:
labelHidden=false;
height=LARGE_SIZE;
break;
case ENTERED_CONE_OF_SILENCE:
inConeOfSilence=true;
break;
case EXITED_CONE_OF_SILENCE:
inConeOfSilence=false;
break;
case STARTED_SPEAKING:
isSpeaking=true;
break;
case STOPPED_SPEAKING:
isSpeaking=false;
break;
case MUTE:
isMuted=true;
isSpeaking=false;
removeLabel();
break;
case UNMUTE:
isMuted=false;
break;
case CHANGE_NAME:
removeLabel();
usernameAlias=alias;
break;
default :
logger.warning("String_Node_Str" + eventType);
break;
}
updateLabel();
}
Program: 45759
Project: 45759
Buggy source:
public NameTagNode(String name,float heightAbove){
  this.name=name;
  this.heightAbove=heightAbove;
  visible=true;
  nameTagMap.put(name,this);
  setLabelText(name);
  setNameTag(EventType.REGULAR_FONT,name,name);
}

Fixed version (ground truth):
public NameTagNode(String name,float heightAbove){
  this.name=name;
  this.heightAbove=heightAbove;
  visible=true;
  nameTagMap.put(name,this);
  usernameAlias=name;
  setNameTag(EventType.REGULAR_FONT,name,usernameAlias);
}
Program: 45760
Project: 45760
Buggy source:
public static String getDisplayName(String name,boolean isSpeaking,boolean isMuted){
  if (isMuted) {
    return LEFT_MUTE + name + RIGHT_MUTE;
  }
  if (isSpeaking) {
    return name + SPEAKING;
  }
  return name;
}

Fixed version (ground truth):
public static String getDisplayName(String name,boolean isSpeaking,boolean isMuted){
  if (isMuted) {
    return LEFT_MUTE + name + RIGHT_MUTE;
  }
 else {
    if (isSpeaking) {
      return name + SPEAKING;
    }
  }
  return name;
}
Program: 45761
Project: 45761
Buggy source:
private void updateLabel(final String displayName){
  if (labelHidden) {
    return;
  }
  SceneWorker.addWorker(new WorkCommit(){
    public void commit(){
      if (visible) {
        if (label == null) {
          label=new TextLabel2D(displayName,foregroundColor,backgroundColor,currentHeight,true,currentFont);
          label.setLocalTranslation(0,heightAbove,0);
          Matrix3f rot=new Matrix3f();
          rot.fromAngleAxis((float)Math.PI,new Vector3f(0f,1f,0f));
          label.setLocalRotation(rot);
          attachChild(label);
        }
 else {
          label.setText(displayName,foregroundColor,backgroundColor);
        }
        ClientContextJME.getWorldManager().addToUpdateList(NameTagNode.this);
      }
    }
  }
);
}

Fixed version (ground truth):
private void updateLabel(){
  removeLabel();
  if (labelHidden) {
    return;
  }
  if (name.equals(usernameAlias) == false) {
    font=ALIAS_NAME_FONT;
  }
 else {
    font=REAL_NAME_FONT;
  }
  if (inConeOfSilence) {
    foregroundColor=CONE_OF_SILENCE_COLOR;
  }
 else {
    if (isSpeaking) {
      foregroundColor=SPEAKING_COLOR;
    }
 else {
      foregroundColor=NOT_SPEAKING_COLOR;
    }
  }
  final String displayName=getDisplayName(usernameAlias,isSpeaking,isMuted);
  SceneWorker.addWorker(new WorkCommit(){
    public void commit(){
      if (visible) {
        if (label == null) {
          label=new TextLabel2D(displayName,foregroundColor,backgroundColor,height,true,font);
          label.setLocalTranslation(0,heightAbove,0);
          Matrix3f rot=new Matrix3f();
          rot.fromAngleAxis((float)Math.PI,new Vector3f(0f,1f,0f));
          label.setLocalRotation(rot);
          attachChild(label);
        }
 else {
          label.setText(displayName,foregroundColor,backgroundColor);
        }
        ClientContextJME.getWorldManager().addToUpdateList(NameTagNode.this);
      }
    }
  }
);
}
Program: 45762
Project: 45762
Buggy source:
/** 
 * Load and return the model. The node returned is the model BG
 * @return
 */
public Node loadModel(){
  Node ret=new Node();
  if (deployedModel == null)   getDeployedModel();
  ModelLoader loader=deployedModel.getModelLoader();
  Node model=loader.loadDeployedModel(deployedModel);
  if (model != null) {
    model.setName(deployedModel.getModelURL());
    ret.attachChild(model);
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * Load and return the model. The node returned is the model BG
 * @return
 */
public Node loadModel(Entity rootEntity){
  Node ret=new Node();
  if (deployedModel == null)   getDeployedModel();
  ModelLoader loader=deployedModel.getModelLoader();
  Node model=loader.loadDeployedModel(deployedModel,rootEntity);
  if (model != null) {
    model.setName(deployedModel.getModelURL());
    ret.attachChild(model);
  }
  return ret;
}
Program: 45763
Project: 45763
Buggy source:
@Override public void setClientState(CellComponentClientState clientState){
  super.setClientState(clientState);
  ModelCellComponentClientState state=(ModelCellComponentClientState)clientState;
  setDeployedModelURL(state.getDeployedModelURL());
}

Fixed version (ground truth):
@Override public void setClientState(CellComponentClientState clientState){
  super.setClientState(clientState);
  ModelCellComponentClientState state=(ModelCellComponentClientState)clientState;
  setDeployedModelURL(state.getDeployedModelURL());
  collidable=state.isCollisionEnabled();
  pickable=state.isPickingEnabled();
  lightingEnabled=state.isLightingEnabled();
  if (renderer != null) {
    renderer.setCollisionEnabled(collidable);
    renderer.setPickingEnabled(pickable);
  }
}
Program: 45764
Project: 45764
Buggy source:
/** 
 * Instantiate and return the cell renderer
 * @param type
 * @param cell
 * @return
 */
public CellRenderer getCellRenderer(Cell.RendererType type,Cell cell){
synchronized (this) {
    if (renderer == null) {
      if (deployedModel == null) {
        getDeployedModel();
      }
      renderer=new ModelRenderer(cell,deployedModel);
    }
    return renderer;
  }
}

Fixed version (ground truth):
/** 
 * Instantiate and return the cell renderer
 * @param type
 * @param cell
 * @return
 */
public CellRenderer getCellRenderer(Cell.RendererType type,Cell cell){
synchronized (this) {
    if (renderer == null) {
      if (deployedModel == null) {
        getDeployedModel();
      }
      renderer=new ModelRenderer(cell,deployedModel);
      renderer.setCollisionEnabled(collidable);
      renderer.setPickingEnabled(pickable);
    }
    return renderer;
  }
}
Program: 45765
Project: 45765
Buggy source:
/** 
 * Given a previously deploy ImportedModel, load the model
 * @param model
 */
public Node loadDeployedModel(DeployedModel model);

Fixed version (ground truth):
/** 
 * Given a previously deploy model, load the model.
 * @param model the model to load
 * @param rootEntity the entity to which the returned node will be attached.
 */
public Node loadDeployedModel(DeployedModel model,Entity rootEntity);
Program: 45766
Project: 45766
Buggy source:
protected CollisionComponent setupCollision(CollisionSystem collisionSystem,Node rootNode){
  CollisionComponent cc=null;
  if (collisionSystem instanceof JMECollisionSystem) {
    cc=((JMECollisionSystem)collisionSystem).createCollisionComponent(rootNode);
  }
 else {
    logger.warning("String_Node_Str" + collisionSystem);
  }
  return cc;
}

Fixed version (ground truth):
protected CollisionComponent setupCollision(CollisionSystem collisionSystem,Node rootNode){
  CollisionComponent cc=null;
  if (collisionSystem instanceof JMECollisionSystem) {
    cc=((JMECollisionSystem)collisionSystem).createCollisionComponent(rootNode);
    cc.setCollidable(collisionEnabled);
    cc.setPickable(pickingEnabled);
  }
 else {
    logger.warning("String_Node_Str" + collisionSystem);
  }
  return cc;
}
Program: 45767
Project: 45767
Buggy source:
/** 
 * Return the entity for this basic renderer. The first time this method is called the entity will be created using createEntity()
 * @return
 */
public Entity getEntity(){
synchronized (this) {
    logger.fine("String_Node_Str" + this.getClass().getName());
    if (entity == null)     entity=createEntity();
  }
  return entity;
}

Fixed version (ground truth):
/** 
 * Return the entity for this basic renderer. The first time this method is called the entity will be created using createEntity()
 * @return
 */
public Entity getEntity(){
synchronized (entityLock) {
    logger.fine("String_Node_Str" + this.getClass().getName());
    if (entity == null)     entity=createEntity();
  }
  return entity;
}
Program: 45768
Project: 45768
Buggy source:
@Override protected Node createSceneGraph(Entity entity){
  if (modelComponent != null) {
    return modelComponent.loadModel();
  }
  if (deployedModel != null) {
    ModelLoader loader=deployedModel.getModelLoader();
    if (loader == null) {
      logger.warning("String_Node_Str" + deployedModel.getModelURL());
      return new Node("String_Node_Str");
    }
    Node ret=loader.loadDeployedModel(deployedModel);
    return ret;
  }
  ModelLoader loader=LoaderManager.getLoaderManager().getLoader(deployedModelURL);
  if (loader == null) {
    logger.warning("String_Node_Str" + deployedModel.getModelURL());
    return new Node("String_Node_Str");
  }
  deployedModel=new DeployedModel(deployedModelURL,loader);
  deployedModel.setModelTranslation(modelTranslation);
  deployedModel.setModelRotation(modelRotation);
  deployedModel.setModelScale(modelScale);
  return loader.loadDeployedModel(deployedModel);
}

Fixed version (ground truth):
@Override protected Node createSceneGraph(Entity entity){
  if (modelComponent != null) {
    return modelComponent.loadModel(entity);
  }
  if (deployedModel != null) {
    ModelLoader loader=deployedModel.getModelLoader();
    if (loader == null) {
      logger.warning("String_Node_Str" + deployedModel.getModelURL());
      return new Node("String_Node_Str");
    }
    Node ret=loader.loadDeployedModel(deployedModel,entity);
    return ret;
  }
  ModelLoader loader=LoaderManager.getLoaderManager().getLoader(deployedModelURL);
  if (loader == null) {
    logger.warning("String_Node_Str" + deployedModel.getModelURL());
    return new Node("String_Node_Str");
  }
  deployedModel=new DeployedModel(deployedModelURL,loader);
  deployedModel.setModelTranslation(modelTranslation);
  deployedModel.setModelRotation(modelRotation);
  deployedModel.setModelScale(modelScale);
  return loader.loadDeployedModel(deployedModel,entity);
}
Program: 45769
Project: 45769
Buggy source:
public CellComponentServerState clone(CellComponentServerState state){
  ModelCellComponentServerState ret=(ModelCellComponentServerState)state;
  if (ret == null)   ret=new ModelCellComponentServerState();
  ret.deployedModelURL=this.deployedModelURL;
  return ret;
}

Fixed version (ground truth):
public CellComponentServerState clone(CellComponentServerState state){
  ModelCellComponentServerState ret=(ModelCellComponentServerState)state;
  if (ret == null)   ret=new ModelCellComponentServerState();
  ret.deployedModelURL=this.deployedModelURL;
  ret.collidable=this.collidable;
  ret.pickable=this.pickable;
  ret.lightingEnabled=this.lightingEnabled;
  return ret;
}
Program: 45770
Project: 45770
Buggy source:
public CellComponentClientState setClientState(ModelCellComponentClientState state){
  state.setDeployedModelURL(deployedModelURL);
  return state;
}

Fixed version (ground truth):
public CellComponentClientState setClientState(ModelCellComponentClientState state){
  state.setDeployedModelURL(deployedModelURL);
  state.setCollisionEnabled(collidable);
  state.setPickingEnabled(pickable);
  state.setLightingEnabled(lightingEnabled);
  return state;
}
Program: 45771
Project: 45771
Buggy source:
public JPanel getPropertiesJPanel(CellPropertiesEditor editor){
  this.editor=editor;
  return this;
}

Fixed version (ground truth):
/** 
 */
public JPanel getPropertiesJPanel(){
  return this;
}
Program: 45772
Project: 45772
Buggy source:
@Override protected void setLive(boolean live){
  super.setLive(live);
  if (live) {
    channelRef.getForUpdate().addMessageReceiver(MicrophoneEnterCellMessage.class,new MicrophoneMessageHandler(this));
    BoundingVolume[] bounds=new BoundingVolume[2];
    if (fullVolumeArea.areaType.equalsIgnoreCase("String_Node_Str")) {
      bounds[0]=new BoundingSphere((float)fullVolumeArea.xExtent / 2,new Vector3f());
    }
 else {
      bounds[0]=new BoundingBox(new Vector3f(),(float)fullVolumeArea.xExtent,(float)fullVolumeArea.yExtent,(float)fullVolumeArea.zExtent);
    }
    Vector3f activeOrigin=new Vector3f((float)activeArea.origin.x,(float)activeArea.origin.y,(float)activeArea.origin.z);
    if (activeArea.areaType.equalsIgnoreCase("String_Node_Str")) {
      bounds[1]=new BoundingSphere((float)2,activeOrigin);
    }
 else {
      bounds[1]=new BoundingBox(activeOrigin,(float)activeArea.xExtent,(float)activeArea.yExtent,(float)activeArea.zExtent);
    }
    System.out.println("String_Node_Str" + Arrays.toString(bounds));
    proxListener=new MicrophoneProximityListener(microphoneName,volume,bounds);
    proxRef.getForUpdate().addProximityListener(proxListener,bounds);
  }
 else {
    channelRef.getForUpdate().removeMessageReceiver(MicrophoneEnterCellMessage.class);
    if (proxListener != null) {
      proxRef.getForUpdate().removeProximityListener(proxListener);
      proxListener=null;
    }
  }
}

Fixed version (ground truth):
@Override protected void setLive(boolean live){
  super.setLive(live);
  if (live) {
    channelRef.getForUpdate().addMessageReceiver(MicrophoneEnterCellMessage.class,new MicrophoneMessageHandler(this));
    BoundingVolume[] bounds=new BoundingVolume[2];
    if (fullVolumeArea.areaType.equalsIgnoreCase("String_Node_Str")) {
      bounds[0]=new BoundingSphere((float)fullVolumeArea.xExtent / 2,new Vector3f());
    }
 else {
      bounds[0]=new BoundingBox(new Vector3f(),(float)fullVolumeArea.xExtent,(float)fullVolumeArea.yExtent,(float)fullVolumeArea.zExtent);
    }
    Vector3f activeOrigin=new Vector3f((float)activeArea.origin.x,(float)activeArea.origin.y,(float)activeArea.origin.z);
    if (activeArea.areaType.equalsIgnoreCase("String_Node_Str")) {
      bounds[1]=new BoundingSphere((float)2,activeOrigin);
    }
 else {
      bounds[1]=new BoundingBox(activeOrigin,(float)activeArea.xExtent,(float)activeArea.yExtent,(float)activeArea.zExtent);
    }
    System.out.println("String_Node_Str" + Arrays.toString(bounds));
    proxListener=new MicrophoneProximityListener(microphoneName,volume,bounds);
    proxRef.getForUpdate().addProximityListener(proxListener,bounds);
  }
 else {
    channelRef.getForUpdate().removeMessageReceiver(MicrophoneEnterCellMessage.class);
    if (proxListener != null) {
      proxListener.remove();
      proxRef.getForUpdate().removeProximityListener(proxListener);
      proxListener=null;
    }
  }
}
Program: 45773
Project: 45773
Buggy source:
private void cellEntered(String callId){
  logger.info(callId + "String_Node_Str" + microphoneName);
  VoiceManager vm=AppContext.getManager(VoiceManager.class);
  Player player=vm.getPlayer(callId);
  if (player == null) {
    logger.warning("String_Node_Str" + callId);
    return;
  }
  AudioGroup audioGroup=vm.getAudioGroup(microphoneName);
  if (audioGroup == null) {
    AudioGroupSetup ags=new AudioGroupSetup();
    ags.spatializer=new FullVolumeSpatializer();
    ags.spatializer.setAttenuator(DefaultSpatializer.DEFAULT_MAXIMUM_VOLUME);
    audioGroup=vm.createAudioGroup(microphoneName,ags);
  }
  audioGroup.addPlayer(player,new AudioGroupPlayerInfo(false,AudioGroupPlayerInfo.ChatType.PUBLIC));
  player.attenuateOtherGroups(audioGroup,0,0);
}

Fixed version (ground truth):
private void cellEntered(String callId){
  logger.info(callId + "String_Node_Str" + microphoneName);
  VoiceManager vm=AppContext.getManager(VoiceManager.class);
  Player player=vm.getPlayer(callId);
  if (player == null) {
    logger.warning("String_Node_Str" + callId);
    return;
  }
  AudioGroup audioGroup=vm.getAudioGroup(microphoneName);
  if (audioGroup == null) {
    AudioGroupSetup ags=new AudioGroupSetup();
    ags.spatializer=new FullVolumeSpatializer();
    ags.spatializer.setAttenuator(DefaultSpatializer.DEFAULT_MAXIMUM_VOLUME);
    ags.audioGroupListener=this;
    audioGroup=vm.createAudioGroup(microphoneName,ags);
  }
  audioGroup.addPlayer(player,new AudioGroupPlayerInfo(false,AudioGroupPlayerInfo.ChatType.PUBLIC));
}
Program: 45774
Project: 45774
Buggy source:
private void cellExited(String callId){
  logger.info(callId + "String_Node_Str" + microphoneName);
  VoiceManager vm=AppContext.getManager(VoiceManager.class);
  AudioGroup audioGroup=vm.getAudioGroup(microphoneName);
  if (audioGroup == null) {
    logger.warning("String_Node_Str" + microphoneName);
    return;
  }
  Player player=vm.getPlayer(callId);
  if (player == null) {
    logger.warning("String_Node_Str" + callId);
    return;
  }
  audioGroup.removePlayer(player);
  if (audioGroup.getNumberOfPlayers() == 1) {
    vm.removeAudioGroup(audioGroup);
  }
  player.attenuateOtherGroups(audioGroup,AudioGroup.DEFAULT_SPEAKING_ATTENUATION,AudioGroup.DEFAULT_LISTEN_ATTENUATION);
}

Fixed version (ground truth):
private void cellExited(String callId){
  logger.info(callId + "String_Node_Str" + microphoneName);
  VoiceManager vm=AppContext.getManager(VoiceManager.class);
  AudioGroup audioGroup=vm.getAudioGroup(microphoneName);
  if (audioGroup == null) {
    logger.warning("String_Node_Str" + microphoneName);
    return;
  }
  Player player=vm.getPlayer(callId);
  if (player == null) {
    logger.warning("String_Node_Str" + callId);
    return;
  }
  audioGroup.removePlayer(player);
}
Program: 45775
Project: 45775
Buggy source:
void rootCellRemoved(SpatialCellImpl rootCell){
  viewCell.acquireRootReadLock();
  try {
synchronized (pendingCacheUpdates) {
      logger.fine("String_Node_Str");
      pendingCacheUpdates.add(new CacheUpdate(rootCell,null,false));
    }
  }
  finally {
    viewCell.releaseRootReadLock();
  }
}

Fixed version (ground truth):
void rootCellRemoved(SpatialCellImpl rootCell){
  if (rootCell == viewCell) {
    revalidateSpaces();
    return;
  }
  viewCell.acquireRootReadLock();
  try {
synchronized (pendingCacheUpdates) {
      logger.fine("String_Node_Str");
      pendingCacheUpdates.add(new CacheUpdate(rootCell,null,false));
    }
  }
  finally {
    viewCell.releaseRootReadLock();
  }
}
Program: 45778
Project: 45778
Buggy source:
public static WonderlandCharacterParams loadFemale() throws IOException {
  URL femaleURL=WonderlandCharacterParams.class.getResource(FEMALE_CONFIGS);
  return new WonderlandCharacterParams(femaleURL);
}

Fixed version (ground truth):
public static WonderlandCharacterParams loadFemale() throws IOException {
  URL femaleURL=WonderlandCharacterParams.class.getResource(FEMALE_CONFIGS);
  WonderlandCharacterParams params=new WonderlandCharacterParams(femaleURL);
  for (  ConfigType type : DEFAULT_FEMALE_PRESETS.keySet()) {
    params.setElementPreset(type,DEFAULT_FEMALE_PRESETS.get(type));
  }
  return params;
}
Program: 45779
Project: 45779
Buggy source:
public static WonderlandCharacterParams loadMale() throws IOException {
  URL maleURL=WonderlandCharacterParams.class.getResource(MALE_CONFIGS);
  return new WonderlandCharacterParams(maleURL);
}

Fixed version (ground truth):
public static WonderlandCharacterParams loadMale() throws IOException {
  URL maleURL=WonderlandCharacterParams.class.getResource(MALE_CONFIGS);
  WonderlandCharacterParams params=new WonderlandCharacterParams(maleURL);
  for (  ConfigType type : DEFAULT_MALE_PRESETS.keySet()) {
    params.setElementPreset(type,DEFAULT_MALE_PRESETS.get(type));
  }
  return params;
}