nus-yam/ex-repair huggingface dataset:
Program: 46028
Project: 46028
Buggy source:
protected void componentVisible(HUDComponent2D component){
  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);
  component.changeTransparency(1.0f,component.getPreferredTransparency() != 1.0f ? component.getPreferredTransparency() : unfocusedTransparency);
  view.setVisibleApp(true,false);
  view.setVisibleUser(true);
  if (component.getDecoratable()) {
    showFrame(component,true);
  }
}

Fixed version (ground truth):
protected void componentVisible(HUDComponent2D component){
  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);
  }
}
Program: 46029
Project: 46029
Buggy source:
public void setFocused(HUDComponent component,boolean focused){
  if (component != null) {
    component.changeTransparency(component.getTransparency(),focused ? focusedTransparency : unfocusedTransparency);
  }
}

Fixed version (ground truth):
public void setFocused(HUDComponent component,boolean focused){
  if (component != null) {
    component.changeTransparency(component.getTransparency(),focused ? focusedTransparency : ((component.getPreferredTransparency() != 1.0f) ? component.getPreferredTransparency() : unfocusedTransparency));
  }
}
Program: 46031
Project: 46031
Buggy source:
/** 
 * Create a new instance of a HUD Event
 * @param hudObject the HUD object associated with this event
 * @param eventType the event type
 * @param eventTime the time of the event
 */
public HUDEvent(HUDObject hudObject,HUDEventType eventType,Date eventTime){
  this.hudObject=hudObject;
  this.eventType=eventType;
  this.eventTime=eventTime;
}

Fixed version (ground truth):
/** 
 * Clone constructor
 * @param event the event instance to clone
 */
public HUDEvent(HUDEvent event){
  this(event.getObject(),event.getEventType(),event.getEventTime());
}
Program: 46032
Project: 46032
Buggy source:
/** 
 * Gets the listeners for this HUD object
 * @return a list of event listeners
 */
public List<HUDEventListener> getEventListeners();

Fixed version (ground truth):
/** 
 * Gets the listeners for this HUD object
 * @return a list of event listeners
 */
public HUDEventListener[] getEventListeners();
Program: 46033
Project: 46033
Buggy source:
/** 
 * Convenience methods for notifying listeners
 * @param eventType the type of the notification event
 */
public void notifyEventListeners(HUDEventType eventType){
  event.setObject(this);
  event.setEventType(eventType);
  event.setEventTime(new Date());
  notifyEventListeners(event);
}

Fixed version (ground truth):
/** 
 * Convenience methods for notifying listeners
 * @param eventType the type of the notification event
 */
public void notifyEventListeners(HUDEventType eventType){
  notifyEventListeners(new HUDEvent(this,eventType,new Date()));
}
Program: 46034
Project: 46034
Buggy source:
/** 
 * {@inheritDoc}
 */
public List<HUDEventListener> getEventListeners(){
  return listeners;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public HUDEventListener[] getEventListeners(){
  return listeners.toArray(new HUDEventListener[0]);
}
Program: 46035
Project: 46035
Buggy source:
public HUDObject2D(){
  listeners=Collections.synchronizedList(new ArrayList());
  event=new HUDEvent(this);
  bounds=new Rectangle2D.Double();
}

Fixed version (ground truth):
public HUDObject2D(){
  listeners=new ConcurrentLinkedQueue();
  eventQueue=new ConcurrentLinkedQueue();
  bounds=new Rectangle2D.Double();
  id=(int)(Math.random() * 10000);
}
Program: 46036
Project: 46036
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + bounds + "String_Node_Str"+ mode+ "String_Node_Str"+ visible+ "String_Node_Str"+ worldVisible+ "String_Node_Str"+ enabled+ "String_Node_Str"+ transparency;
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + id + "String_Node_Str"+ bounds+ "String_Node_Str"+ mode+ "String_Node_Str"+ visible+ "String_Node_Str"+ worldVisible+ "String_Node_Str"+ enabled+ "String_Node_Str"+ transparency;
}
Program: 46037
Project: 46037
Buggy source:
/** 
 * {@inheritDoc}
 */
public void addEventListener(HUDEventListener listener){
  listeners.add(listener);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void addEventListener(HUDEventListener listener){
  listeners.add(listener);
  logger.finest(this.getClass().getSimpleName() + "String_Node_Str" + listener.getClass().getSimpleName()+ "String_Node_Str"+ listeners.size()+ "String_Node_Str");
}
Program: 46038
Project: 46038
Buggy source:
/** 
 * {@inheritDoc}
 */
public void addComponent(HUDComponent component){
  components.add(component);
  event.setObject(component);
  event.setEventType(HUDEventType.ADDED);
  event.setEventTime(new Date());
  notifyEventListeners(event);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void addComponent(HUDComponent component){
  components.add(component);
  component.addEventListener(this);
  HUDObjectChanged(new HUDEvent(component,HUDEventType.ADDED,new Date()));
}
Program: 46039
Project: 46039
Buggy source:
/** 
 * {@inheritDoc}
 */
public void removeComponent(HUDComponent component){
  components.remove(component);
  event.setObject(component);
  event.setEventType(HUDEventType.REMOVED);
  event.setEventTime(new Date());
  notifyEventListeners(event);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void removeComponent(HUDComponent component){
  component.removeEventListener(this);
  components.remove(component);
  HUDObjectChanged(new HUDEvent(component,HUDEventType.REMOVED,new Date()));
}
Program: 46040
Project: 46040
Buggy source:
protected void componentWorldVisible(HUDComponent2D component){
  logger.info("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state.isWorldVisible()) {
    return;
  }
  Cell cell=component.getCell();
  if (cell != null) {
    HUDView3D worldView=state.getWorldView();
    if (worldView == null) {
      if (worldDisplayer == null) {
        logger.fine("String_Node_Str");
        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){
  logger.info("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state == null) {
    return;
  }
  if (state.isWorldVisible()) {
    return;
  }
  Cell cell=component.getCell();
  if (cell != null) {
    HUDView3D worldView=state.getWorldView();
    if (worldView == null) {
      if (worldDisplayer == null) {
        logger.fine("String_Node_Str");
        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();
  }
}
Program: 46041
Project: 46041
Buggy source:
protected void componentClosed(HUDComponent2D component){
  logger.fine("String_Node_Str" + component);
}

Fixed version (ground truth):
protected void componentClosed(HUDComponent2D component){
  logger.info("String_Node_Str" + component);
}
Program: 46042
Project: 46042
Buggy source:
protected void componentViewChanged(HUDComponent2D component){
  logger.fine("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  HUDView2D view=state.getView();
  if (component.getDisplayMode().equals(DisplayMode.HUD)) {
    view.setLocationOrtho(new Vector2f(component.getX(),component.getY()),false);
    view.setOrtho(true);
  }
 else {
    view.applyDeltaTranslationUser(component.getWorldLocation());
    view.setOrtho(false);
  }
}

Fixed version (ground truth):
protected void componentViewChanged(HUDComponent2D component){
  logger.fine("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state == null) {
    return;
  }
  HUDView2D view=state.getView();
  if (component.getDisplayMode().equals(DisplayMode.HUD)) {
    view.setLocationOrtho(new Vector2f(component.getX(),component.getY()),false);
    view.setOrtho(true);
  }
 else {
    view.applyDeltaTranslationUser(component.getWorldLocation());
    view.setOrtho(false);
  }
}
Program: 46043
Project: 46043
Buggy source:
protected void componentMinimized(final HUDComponent2D component){
  logger.fine("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state != null) {
  }
}

Fixed version (ground truth):
protected void componentMinimized(final HUDComponent2D component){
  logger.info("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state != null) {
    component.setVisible(false);
  }
}
Program: 46044
Project: 46044
Buggy source:
/** 
 * {@inheritDoc}
 */
public void addComponent(final HUDComponent component){
  logger.fine("String_Node_Str" + component);
  HUDComponentState state=new HUDComponentState(component);
  HUDComponent2D component2D=(HUDComponent2D)component;
  Window2D window;
  if (component2D.getWindow() != null) {
    window=component2D.getWindow();
  }
 else {
    window=createWindow(component);
    component2D.setWindow(window);
  }
  window.addEventListener(new EnterExitEvent3DLogger(){
    @Override public void commitEvent(    Event event){
      MouseEnterExitEvent3D mouseEvent=(MouseEnterExitEvent3D)event;
switch (mouseEvent.getID()) {
case MouseEvent.MOUSE_ENTERED:
        logger.finest("String_Node_Str" + component);
      setFocused(component,true);
    break;
case MouseEvent.MOUSE_EXITED:
  logger.finest("String_Node_Str" + component);
setFocused(component,false);
break;
default :
break;
}
}
}
);
state.setWindow(window);
component.addEventListener(this);
hudStateMap.put(component,state);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void addComponent(final HUDComponent component){
  logger.fine("String_Node_Str" + component);
  HUDComponentState state=new HUDComponentState(component);
  HUDComponent2D component2D=(HUDComponent2D)component;
  Window2D window;
  if (component2D.getWindow() != null) {
    window=component2D.getWindow();
  }
 else {
    window=createWindow(component);
    component2D.setWindow(window);
  }
  window.addEventListener(new EnterExitEvent3DLogger(){
    @Override public void commitEvent(    Event event){
      MouseEnterExitEvent3D mouseEvent=(MouseEnterExitEvent3D)event;
switch (mouseEvent.getID()) {
case MouseEvent.MOUSE_ENTERED:
        logger.finest("String_Node_Str" + component);
      setFocused(component,true);
    break;
case MouseEvent.MOUSE_EXITED:
  logger.finest("String_Node_Str" + component);
setFocused(component,false);
break;
default :
break;
}
}
}
);
state.setWindow(window);
hudStateMap.put(component,state);
}
Program: 46045
Project: 46045
Buggy source:
protected void componentWorldInvisible(HUDComponent2D component){
  logger.info("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (!state.isWorldVisible()) {
    return;
  }
  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){
  logger.info("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state == null) {
    return;
  }
  if (!state.isWorldVisible()) {
    return;
  }
  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");
  }
}
Program: 46046
Project: 46046
Buggy source:
public Window2D createWindow(HUDComponent component){
  Window2D window=null;
  logger.fine("String_Node_Str" + component);
  hudApp=new HUDApp2D("String_Node_Str",new ControlArbHUD(),worldPixelScale);
  try {
    window=hudApp.createWindow(component.getWidth(),component.getHeight(),Type.PRIMARY,false,hudPixelScale,"String_Node_Str");
    JComponent comp=((HUDComponent2D)component).getComponent();
    ((WindowSwing)window).setComponent(comp);
  }
 catch (  InstantiationException e) {
    logger.warning("String_Node_Str" + e);
  }
  return window;
}

Fixed version (ground truth):
public Window2D createWindow(HUDComponent component){
  logger.fine("String_Node_Str" + component);
  Window2D window=null;
  hudApp=new HUDApp2D("String_Node_Str",new ControlArbHUD(),worldPixelScale);
  try {
    window=hudApp.createWindow(component.getWidth(),component.getHeight(),Type.PRIMARY,false,hudPixelScale,"String_Node_Str");
    JComponent comp=((HUDComponent2D)component).getComponent();
    ((WindowSwing)window).setComponent(comp);
  }
 catch (  InstantiationException e) {
    logger.warning("String_Node_Str" + e);
  }
  return window;
}
Program: 46047
Project: 46047
Buggy source:
public void actionPerformed(ActionEvent e){
  logger.info("String_Node_Str" + e);
  if (e.getActionCommand().equals("String_Node_Str")) {
    logger.info("String_Node_Str" + e);
    close(hudFrameMap.get((HUDFrameHeader2D)e.getSource()));
  }
 else   if (e.getActionCommand().equals("String_Node_Str")) {
    logger.info("String_Node_Str" + e);
    minimizeComponent(hudFrameMap.get((HUDFrameHeader2D)e.getSource()));
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  logger.fine("String_Node_Str" + e);
  if (e.getActionCommand().equals("String_Node_Str")) {
    logger.info("String_Node_Str" + e);
    close(hudFrameMap.get((HUDFrameHeader2D)e.getSource()));
  }
 else   if (e.getActionCommand().equals("String_Node_Str")) {
    logger.info("String_Node_Str" + e);
    minimizeComponent(hudFrameMap.get((HUDFrameHeader2D)e.getSource()));
  }
}
Program: 46048
Project: 46048
Buggy source:
protected void componentResized(HUDComponent2D component){
  logger.finest("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  HUDView2D view=state.getView();
  if (view != null) {
    view.setSizeApp(component.getSize());
    if (component.getDecoratable()) {
      HUDView2D frameView=state.getFrameView();
      if (frameView != null) {
        HUDFrameHeader2D frame=state.getFrame();
        frameView.setLocationOrtho(new Vector2f(0.0f,(float)(0.75 * frame.getHeight() / 2 + 0.75f * component.getSize().height / 2)));
        frameView.setSizeApp(new Dimension((int)(component.getWidth()),frame.getHeight()));
      }
    }
  }
}

Fixed version (ground truth):
protected void componentResized(HUDComponent2D component){
  logger.finest("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state == null) {
    return;
  }
  HUDView2D view=state.getView();
  if (view != null) {
    view.setSizeApp(component.getSize());
    if (component.getDecoratable()) {
      HUDView2D frameView=state.getFrameView();
      if (frameView != null) {
        HUDFrameHeader2D frame=state.getFrame();
        frameView.setLocationOrtho(new Vector2f(0.0f,(float)(0.75 * frame.getHeight() / 2 + 0.75f * component.getSize().height / 2)));
        frameView.setSizeApp(new Dimension((int)(component.getWidth()),frame.getHeight()));
      }
    }
  }
}
Program: 46049
Project: 46049
Buggy source:
protected void componentMovedWorld(HUDComponent2D component){
  logger.finest("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  HUDView3D view=state.getWorldView();
  if (view != null) {
    Vector3f worldOffset=component.getWorldLocation();
    view.setOffset(new Vector2f(worldOffset.x,worldOffset.y));
  }
}

Fixed version (ground truth):
protected void componentMovedWorld(HUDComponent2D component){
  logger.finest("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state == null) {
    return;
  }
  HUDView3D view=state.getWorldView();
  if (view != null) {
    Vector3f worldOffset=component.getWorldLocation();
    view.setOffset(new Vector2f(worldOffset.x,worldOffset.y));
  }
}
Program: 46050
Project: 46050
Buggy source:
protected void componentMoved(HUDComponent2D component){
  logger.finest("String_Node_Str" + component.getX() + "String_Node_Str"+ component.getY());
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  HUDView2D view=state.getView();
  if (view != null) {
    Vector2f location=(layout != null) ? layout.getLocation(component) : new Vector2f(component.getX(),component.getY());
    view.setLocationOrtho(new Vector2f(location.x + view.getDisplayerLocalWidth() / 2,location.y + view.getDisplayerLocalHeight() / 2),true);
  }
}

Fixed version (ground truth):
protected void componentMoved(HUDComponent2D component){
  logger.finest("String_Node_Str" + component.getX() + "String_Node_Str"+ component.getY());
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state == null) {
    return;
  }
  HUDView2D view=state.getView();
  if (view != null) {
    Vector2f location=(layout != null) ? layout.getLocation(component) : new Vector2f(component.getX(),component.getY());
    view.setLocationOrtho(new Vector2f(location.x + view.getDisplayerLocalWidth() / 2,location.y + view.getDisplayerLocalHeight() / 2),true);
  }
}
Program: 46051
Project: 46051
Buggy source:
protected void componentMaximized(HUDComponent2D component){
  logger.fine("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state != null) {
  }
}

Fixed version (ground truth):
protected void componentMaximized(HUDComponent2D component){
  logger.info("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state != null) {
    component.setVisible(true);
  }
}
Program: 46052
Project: 46052
Buggy source:
/** 
 * {@inheritDoc}
 */
public void removeComponent(HUDComponent component){
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state != null) {
    HUDView2D view2D=state.getView();
    if (view2D != null) {
      view2D.cleanup();
      view2D=null;
    }
    HUDView2D frameView=state.getFrameView();
    if (frameView != null) {
      frameView.cleanup();
      frameView=null;
    }
    HUDView3D view3D=state.getWorldView();
    if (view3D != null) {
      view3D.cleanup();
      view3D=null;
    }
    component.removeEventListener(this);
    hudStateMap.remove(component);
    state=null;
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void removeComponent(HUDComponent component){
  logger.fine("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state != null) {
    HUDView2D view2D=state.getView();
    if (view2D != null) {
      view2D.cleanup();
      view2D=null;
    }
    HUDView2D frameView=state.getFrameView();
    if (frameView != null) {
      frameView.cleanup();
      frameView=null;
    }
    HUDView3D view3D=state.getWorldView();
    if (view3D != null) {
      view3D.cleanup();
      view3D=null;
    }
    hudStateMap.remove(component);
    state=null;
  }
}
Program: 46053
Project: 46053
Buggy source:
protected void componentVisible(HUDComponent2D component){
  logger.info("String_Node_Str" + component);
  HUDComponentState state=(HUDComponentState)hudStateMap.get(component);
  if (state == null) {
    return;
  }
  if (state.isVisible()) {
  }
  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);
  component.changeTransparency(1.0f,component.getPreferredTransparency() != 1.0f ? component.getPreferredTransparency() : unfocusedTransparency);
  view.setVisibleApp(true,false);
  view.setVisibleUser(true);
  if (component.getDecoratable()) {
    showFrame(component,true);
  }
}

Fixed version (ground truth):
protected void componentVisible(HUDComponent2D component){
  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);
  component.changeTransparency(1.0f,component.getPreferredTransparency() != 1.0f ? component.getPreferredTransparency() : unfocusedTransparency);
  view.setVisibleApp(true,false);
  view.setVisibleUser(true);
  if (component.getDecoratable()) {
    showFrame(component,true);
  }
}
Program: 46054
Project: 46054
Buggy source:
/** 
 * Creates the table based upon the list of registered components
 */
private JTable createTable(){
  CellComponentRegistry registry=CellComponentRegistry.getCellComponentRegistry();
  Set<CellComponentFactorySPI> factories=registry.getAllCellFactories();
  CellServerState state=editframe.getCellServerState();
  Iterator<CellComponentFactorySPI> it=factories.iterator();
  while (it.hasNext() == true) {
    CellComponentFactorySPI spi=it.next();
    Class clazz=spi.getDefaultCellComponentServerState().getClass();
    if (state.getComponentServerState(clazz) != null) {
      it.remove();
    }
  }
  int size=factories.size();
  Object[][] entries=new Object[size][2];
  int i=0;
  for (  CellComponentFactorySPI factory : factories) {
    entries[i][0]=factory.getDisplayName();
    entries[i][1]=factory.getDescription();
    factoryMap.put(factory.getDisplayName(),factory);
    i++;
  }
  Object[] names=new Object[]{"String_Node_Str","String_Node_Str"};
  JTable table=new JTable(entries,names);
  return table;
}

Fixed version (ground truth):
/** 
 * Creates the table based upon the list of registered components
 */
private JTable createTable(){
  CellComponentRegistry registry=CellComponentRegistry.getCellComponentRegistry();
  Set<CellComponentFactorySPI> factories=registry.getAllCellFactories();
  CellServerState state=editframe.getCellServerState();
  Iterator<CellComponentFactorySPI> it=factories.iterator();
  while (it.hasNext() == true) {
    CellComponentFactorySPI spi=it.next();
    Class clazz=spi.getDefaultCellComponentServerState().getClass();
    if (state.getComponentServerState(clazz) != null) {
      it.remove();
    }
  }
  List<CellComponentFactorySPI> factoryList=new LinkedList(factories);
  Comparator nameComparator=new Comparator<CellComponentFactorySPI>(){
    public int compare(    CellComponentFactorySPI o1,    CellComponentFactorySPI o2){
      return o1.getDisplayName().compareTo(o2.getDisplayName());
    }
  }
;
  Collections.sort(factoryList,nameComparator);
  int size=factoryList.size();
  Object[][] entries=new Object[size][2];
  int i=0;
  for (  CellComponentFactorySPI factory : factoryList) {
    entries[i][0]=factory.getDisplayName();
    entries[i][1]=factory.getDescription();
    factoryMap.put(factory.getDisplayName(),factory);
    i++;
  }
  Object[] names=new Object[]{"String_Node_Str","String_Node_Str"};
  JTable table=new JTable(entries,names);
  return table;
}
Program: 46055
Project: 46055
Buggy source:
@Override public void initialize(ServerSessionManager loginInfo){
  paletteMI=new JMenuItem("String_Node_Str");
  paletteMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      CellPalette cellPaletteFrame;
      if (cellPaletteFrameRef == null || cellPaletteFrameRef.get() == null) {
        cellPaletteFrame=new CellPalette();
        cellPaletteFrameRef=new WeakReference(cellPaletteFrame);
      }
 else {
        cellPaletteFrame=cellPaletteFrameRef.get();
      }
      if (cellPaletteFrame.isVisible() == false) {
        cellPaletteFrame.setVisible(true);
      }
    }
  }
);
  paletteHUDMI=new JMenuItem("String_Node_Str");
  paletteHUDMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      new Thread(){
        @Override public void run(){
          if (paletteHUD == null) {
            createHUD();
          }
          paletteHUD.setVisible(true);
        }
      }
.start();
    }
  }
);
  super.initialize(loginInfo);
}

Fixed version (ground truth):
@Override public void initialize(ServerSessionManager loginInfo){
  paletteMI=new JMenuItem("String_Node_Str");
  paletteMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      CellPalette cellPaletteFrame;
      if (cellPaletteFrameRef == null || cellPaletteFrameRef.get() == null) {
        cellPaletteFrame=new CellPalette();
        cellPaletteFrameRef=new WeakReference(cellPaletteFrame);
      }
 else {
        cellPaletteFrame=cellPaletteFrameRef.get();
      }
      if (cellPaletteFrame.isVisible() == false) {
        cellPaletteFrame.setVisible(true);
      }
      cellPaletteFrame.toFront();
    }
  }
);
  paletteHUDMI=new JMenuItem("String_Node_Str");
  paletteHUDMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      new Thread(){
        @Override public void run(){
          if (paletteHUD == null) {
            createHUD();
          }
          paletteHUD.setVisible(true);
        }
      }
.start();
    }
  }
);
  super.initialize(loginInfo);
}
Program: 46056
Project: 46056
Buggy source:
private void callEnded(PresenceInfo callee,String reason){
  CallEndedHUDPanel callEndedHUDPanel=new CallEndedHUDPanel(callee,reason);
  HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
  HUDComponent callEndedHUDComponent=mainHUD.createComponent(callEndedHUDPanel);
  callEndedHUDPanel.setHUDComponent(callEndedHUDComponent);
  callEndedHUDComponent.setPreferredLocation(Layout.CENTER);
  mainHUD.addComponent(callEndedHUDComponent);
  callEndedHUDComponent.addEventListener(new HUDEventListener(){
    public void HUDObjectChanged(    HUDEvent e){
      if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
      }
    }
  }
);
  callEndedHUDComponent.setVisible(true);
}

Fixed version (ground truth):
private void callEnded(PresenceInfo callee,String reason){
  CallEndedHUDPanel callEndedHUDPanel=new CallEndedHUDPanel(callee,reason);
  HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
  HUDComponent callEndedHUDComponent=mainHUD.createComponent(callEndedHUDPanel);
  callEndedHUDPanel.setHUDComponent(callEndedHUDComponent);
  callEndedHUDComponent.setPreferredLocation(Layout.CENTER);
  callEndedHUDComponent.setIcon(voiceChatIcon);
  mainHUD.addComponent(callEndedHUDComponent);
  callEndedHUDComponent.addEventListener(new HUDEventListener(){
    public void HUDObjectChanged(    HUDEvent e){
      if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
      }
    }
  }
);
  callEndedHUDComponent.setVisible(true);
}
Program: 46057
Project: 46057
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("String_Node_Str");
    userListHUDComponent.setIcon(new ImageIcon(getClass().getResource("String_Node_Str")));
    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("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: 46058
Project: 46058
Buggy source:
public void voiceChat(){
  if (presenceInfo == null) {
    return;
  }
  AddHUDPanel addPanel=new AddHUDPanel(this,session,presenceInfo,presenceInfo);
  HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
  final HUDComponent addComponent=mainHUD.createComponent(addPanel);
  addPanel.setHUDComponent(addComponent);
  addComponent.setPreferredLocation(Layout.CENTER);
  addComponent.setName("String_Node_Str");
  mainHUD.addComponent(addComponent);
  addComponent.addEventListener(new HUDEventListener(){
    public void HUDObjectChanged(    HUDEvent e){
      if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
      }
    }
  }
);
  PropertyChangeListener plistener=new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent pe){
      if (pe.getPropertyName().equals("String_Node_Str") || pe.getPropertyName().equals("String_Node_Str")) {
        addComponent.setVisible(false);
      }
    }
  }
;
  addPanel.addPropertyChangeListener(plistener);
  addComponent.setVisible(true);
}

Fixed version (ground truth):
public void voiceChat(){
  if (presenceInfo == null) {
    return;
  }
  AddHUDPanel addPanel=new AddHUDPanel(this,session,presenceInfo,presenceInfo);
  HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
  final HUDComponent addComponent=mainHUD.createComponent(addPanel);
  addPanel.setHUDComponent(addComponent);
  addComponent.setPreferredLocation(Layout.CENTER);
  addComponent.setName("String_Node_Str");
  addComponent.setIcon(voiceChatIcon);
  mainHUD.addComponent(addComponent);
  addComponent.addEventListener(new HUDEventListener(){
    public void HUDObjectChanged(    HUDEvent e){
      if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
      }
    }
  }
);
  PropertyChangeListener plistener=new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent pe){
      if (pe.getPropertyName().equals("String_Node_Str") || pe.getPropertyName().equals("String_Node_Str")) {
        addComponent.setVisible(false);
      }
    }
  }
;
  addPanel.addPropertyChangeListener(plistener);
  addComponent.setVisible(true);
}
Program: 46060
Project: 46060
Buggy source:
/** 
 * Create a new AudioManagerClient
 * @param session the session to connect to, guaranteed to be inthe CONNECTED state
 * @throws org.jdesktop.wonderland.client.comms.ConnectionFailureException
 */
public AudioManagerClient(){
  AudioMenu.getAudioMenu(this).setEnabled(false);
  userListJMenuItem=new javax.swing.JCheckBoxMenuItem();
  userListJMenuItem.setText("String_Node_Str");
  userListJMenuItem.setSelected(usersMenuSelected);
  userListJMenuItem.addActionListener(new java.awt.event.ActionListener(){
    public void actionPerformed(    java.awt.event.ActionEvent evt){
      usersMenuSelected=!usersMenuSelected;
      userListJMenuItem.setSelected(usersMenuSelected);
      showUsers(evt);
    }
  }
);
  userListJMenuItem.setEnabled(false);
  logger.fine("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Create a new AudioManagerClient
 * @param session the session to connect to, guaranteed to be inthe CONNECTED state
 * @throws org.jdesktop.wonderland.client.comms.ConnectionFailureException
 */
public AudioManagerClient(){
  AudioMenu.getAudioMenu(this).setEnabled(false);
  voiceChatIcon=new ImageIcon(getClass().getResource("String_Node_Str"));
  userListIcon=new ImageIcon(getClass().getResource("String_Node_Str"));
  userListJMenuItem=new javax.swing.JCheckBoxMenuItem();
  userListJMenuItem.setText("String_Node_Str");
  userListJMenuItem.setSelected(usersMenuSelected);
  userListJMenuItem.addActionListener(new java.awt.event.ActionListener(){
    public void actionPerformed(    java.awt.event.ActionEvent evt){
      usersMenuSelected=!usersMenuSelected;
      userListJMenuItem.setSelected(usersMenuSelected);
      showUsers(evt);
    }
  }
);
  userListJMenuItem.setEnabled(false);
  logger.fine("String_Node_Str");
}
Program: 46061
Project: 46061
Buggy source:
private void phoneButtonActionPerformed(java.awt.event.ActionEvent evt){
  AddHUDPanel addHUDPanel=new AddHUDPanel(client,session,presenceInfo,presenceInfo);
  addHUDPanel.setPhoneType();
  HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
  addHUDComponent=mainHUD.createComponent(addHUDPanel);
  addHUDComponent.setName("String_Node_Str");
  addHUDComponent.setPreferredLocation(Layout.CENTER);
  addHUDPanel.setHUDComponent(addHUDComponent);
  mainHUD.addComponent(addHUDComponent);
  addHUDComponent.addEventListener(new HUDEventListener(){
    public void HUDObjectChanged(    HUDEvent e){
      if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
      }
    }
  }
);
  PropertyChangeListener plistener=new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent pe){
    }
  }
;
  addHUDPanel.addPropertyChangeListener(plistener);
  addHUDComponent.setVisible(true);
}

Fixed version (ground truth):
private void phoneButtonActionPerformed(java.awt.event.ActionEvent evt){
  AddHUDPanel addHUDPanel=new AddHUDPanel(client,session,presenceInfo,presenceInfo);
  addHUDPanel.setPhoneType();
  HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
  addHUDComponent=mainHUD.createComponent(addHUDPanel);
  addHUDComponent.setName("String_Node_Str");
  addHUDComponent.setIcon(new ImageIcon(getClass().getResource("String_Node_Str")));
  addHUDComponent.setPreferredLocation(Layout.CENTER);
  addHUDPanel.setHUDComponent(addHUDComponent);
  mainHUD.addComponent(addHUDComponent);
  addHUDComponent.addEventListener(new HUDEventListener(){
    public void HUDObjectChanged(    HUDEvent e){
      if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
      }
    }
  }
);
  PropertyChangeListener plistener=new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent pe){
    }
  }
;
  addHUDPanel.addPropertyChangeListener(plistener);
  addHUDComponent.setVisible(true);
}
Program: 46062
Project: 46062
Buggy source:
private void editButtonActionPerformed(java.awt.event.ActionEvent evt){
  HUDComponent changeNameHUDComponent=changeNameMap.get(presenceInfo);
  if (changeNameHUDComponent == null) {
    ChangeNameHUDPanel changeNameHUDPanel=new ChangeNameHUDPanel(this,pm,presenceInfo);
    HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
    final HUDComponent comp=mainHUD.createComponent(changeNameHUDPanel);
    comp.setPreferredLocation(Layout.NORTH);
    comp.setName("String_Node_Str");
    mainHUD.addComponent(comp);
    changeNameMap.put(presenceInfo,comp);
    PropertyChangeListener plistener=new PropertyChangeListener(){
      public void propertyChange(      PropertyChangeEvent pe){
        if (pe.getPropertyName().equals("String_Node_Str") || pe.getPropertyName().equals("String_Node_Str")) {
          comp.setVisible(false);
        }
      }
    }
;
    changeNameHUDPanel.addPropertyChangeListener(plistener);
    changeNameHUDComponent=comp;
  }
  changeNameHUDComponent.setVisible(true);
}

Fixed version (ground truth):
private void editButtonActionPerformed(java.awt.event.ActionEvent evt){
  HUDComponent changeNameHUDComponent=changeNameMap.get(presenceInfo);
  if (changeNameHUDComponent == null) {
    HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
    ChangeNameHUDPanel changeNameHUDPanel=new ChangeNameHUDPanel(this,pm,presenceInfo);
    final HUDComponent comp=mainHUD.createComponent(changeNameHUDPanel);
    comp.setPreferredLocation(Layout.NORTH);
    comp.setName("String_Node_Str");
    comp.setIcon(new ImageIcon(getClass().getResource("String_Node_Str")));
    mainHUD.addComponent(comp);
    changeNameMap.put(presenceInfo,comp);
    PropertyChangeListener plistener=new PropertyChangeListener(){
      public void propertyChange(      PropertyChangeEvent pe){
        if (pe.getPropertyName().equals("String_Node_Str") || pe.getPropertyName().equals("String_Node_Str")) {
          comp.setVisible(false);
        }
      }
    }
;
    changeNameHUDPanel.addPropertyChangeListener(plistener);
    changeNameHUDComponent=comp;
  }
  changeNameHUDComponent.setVisible(true);
}
Program: 46064
Project: 46064
Buggy source:
private void propertiesButtonActionPerformed(java.awt.event.ActionEvent evt){
  if (namePropertiesHUDComponent == null) {
    NamePropertiesHUDPanel namePropertiesHUDPanel=new NamePropertiesHUDPanel(presenceInfo);
    HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
    namePropertiesHUDComponent=mainHUD.createComponent(namePropertiesHUDPanel);
    namePropertiesHUDComponent.setPreferredLocation(Layout.NORTH);
    namePropertiesHUDComponent.setName("String_Node_Str");
    mainHUD.addComponent(namePropertiesHUDComponent);
    PropertyChangeListener plistener=new PropertyChangeListener(){
      public void propertyChange(      PropertyChangeEvent pe){
        if (pe.getPropertyName().equals("String_Node_Str") || pe.getPropertyName().equals("String_Node_Str")) {
          namePropertiesHUDComponent.setVisible(false);
        }
      }
    }
;
    namePropertiesHUDPanel.addPropertyChangeListener(plistener);
  }
  namePropertiesHUDComponent.setVisible(true);
}

Fixed version (ground truth):
private void propertiesButtonActionPerformed(java.awt.event.ActionEvent evt){
  if (namePropertiesHUDComponent == null) {
    HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
    NamePropertiesHUDPanel namePropertiesHUDPanel=new NamePropertiesHUDPanel(presenceInfo);
    namePropertiesHUDComponent=mainHUD.createComponent(namePropertiesHUDPanel);
    namePropertiesHUDComponent.setPreferredLocation(Layout.NORTH);
    namePropertiesHUDComponent.setName("String_Node_Str");
    namePropertiesHUDComponent.setIcon(new ImageIcon(getClass().getResource("String_Node_Str")));
    mainHUD.addComponent(namePropertiesHUDComponent);
    PropertyChangeListener plistener=new PropertyChangeListener(){
      public void propertyChange(      PropertyChangeEvent pe){
        if (pe.getPropertyName().equals("String_Node_Str") || pe.getPropertyName().equals("String_Node_Str")) {
          namePropertiesHUDComponent.setVisible(false);
        }
      }
    }
;
    namePropertiesHUDPanel.addPropertyChangeListener(plistener);
  }
  namePropertiesHUDComponent.setVisible(true);
}
Program: 46065
Project: 46065
Buggy source:
private void addButtonActionPerformed(ActionEvent e){
  AddHUDPanel addHUDPanel=new AddHUDPanel(client,session,myPresenceInfo,myPresenceInfo,group,Mode.ADD);
  HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
  final HUDComponent addHUDComponent=mainHUD.createComponent(addHUDPanel);
  addHUDComponent.setName("String_Node_Str");
  addHUDPanel.setHUDComponent(addHUDComponent);
  addHUDPanel.setPreferredLocation(Layout.EAST);
  mainHUD.addComponent(addHUDComponent);
  inProgressButtonPanel.setEnabledAddButton(false);
  addHUDComponent.addEventListener(new HUDEventListener(){
    public void HUDObjectChanged(    HUDEvent e){
      if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
        inProgressButtonPanel.setEnabledAddButton(true);
      }
    }
  }
);
  PropertyChangeListener plistener=new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent pe){
      if (pe.getPropertyName().equals("String_Node_Str") || pe.getPropertyName().equals("String_Node_Str")) {
        addHUDComponent.setVisible(false);
      }
    }
  }
;
  addHUDPanel.addPropertyChangeListener(plistener);
  addHUDComponent.setVisible(true);
}

Fixed version (ground truth):
private void addButtonActionPerformed(ActionEvent e){
  AddHUDPanel addHUDPanel=new AddHUDPanel(client,session,myPresenceInfo,myPresenceInfo,group,Mode.ADD);
  HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
  final HUDComponent addHUDComponent=mainHUD.createComponent(addHUDPanel);
  addHUDComponent.setName("String_Node_Str");
  addHUDComponent.setIcon(new ImageIcon(getClass().getResource("String_Node_Str")));
  addHUDPanel.setHUDComponent(addHUDComponent);
  addHUDPanel.setPreferredLocation(Layout.EAST);
  mainHUD.addComponent(addHUDComponent);
  inProgressButtonPanel.setEnabledAddButton(false);
  addHUDComponent.addEventListener(new HUDEventListener(){
    public void HUDObjectChanged(    HUDEvent e){
      if (e.getEventType().equals(HUDEventType.DISAPPEARED)) {
        inProgressButtonPanel.setEnabledAddButton(true);
      }
    }
  }
);
  PropertyChangeListener plistener=new PropertyChangeListener(){
    public void propertyChange(    PropertyChangeEvent pe){
      if (pe.getPropertyName().equals("String_Node_Str") || pe.getPropertyName().equals("String_Node_Str")) {
        addHUDComponent.setVisible(false);
      }
    }
  }
;
  addHUDPanel.addPropertyChangeListener(plistener);
  addHUDComponent.setVisible(true);
}
Program: 46066
Project: 46066
Buggy source:
private void AnswerButtonActionPerformed(java.awt.event.ActionEvent evt){
  logger.info("String_Node_Str");
  AddHUDPanel addHUDPanel=new AddHUDPanel(client,session,myPresenceInfo,caller,group);
  addHUDPanel.setMode(Mode.IN_PROGRESS);
  HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
  addComponent=mainHUD.createComponent(addHUDPanel);
  addHUDPanel.setHUDComponent(addComponent);
  addHUDPanel.setPreferredLocation(Layout.NORTHWEST);
  mainHUD.addComponent(addComponent);
  addComponent.addEventListener(new HUDEventListener(){
    public void HUDObjectChanged(    HUDEvent e){
      if (e.getEventType().equals(HUDEventType.CLOSED)) {
        addComponent=null;
      }
    }
  }
);
  addComponent.setVisible(true);
  session.send(client,new VoiceChatJoinAcceptedMessage(group,myPresenceInfo,chatType));
  answered=true;
  if (chatType.equals(ChatType.PRIVATE)) {
    client.getWlAvatarCharacter().playAnimation("String_Node_Str");
  }
 else {
    client.getWlAvatarCharacter().stop();
  }
  incomingCallHUDComponent.setVisible(false);
}

Fixed version (ground truth):
private void AnswerButtonActionPerformed(java.awt.event.ActionEvent evt){
  logger.info("String_Node_Str");
  AddHUDPanel addHUDPanel=new AddHUDPanel(client,session,myPresenceInfo,caller,group);
  addHUDPanel.setMode(Mode.IN_PROGRESS);
  HUD mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
  addComponent=mainHUD.createComponent(addHUDPanel);
  addComponent.setIcon(new ImageIcon(getClass().getResource("String_Node_Str")));
  addHUDPanel.setHUDComponent(addComponent);
  addHUDPanel.setPreferredLocation(Layout.NORTHWEST);
  mainHUD.addComponent(addComponent);
  addComponent.addEventListener(new HUDEventListener(){
    public void HUDObjectChanged(    HUDEvent e){
      if (e.getEventType().equals(HUDEventType.CLOSED)) {
        addComponent=null;
      }
    }
  }
);
  addComponent.setVisible(true);
  session.send(client,new VoiceChatJoinAcceptedMessage(group,myPresenceInfo,chatType));
  answered=true;
  if (chatType.equals(ChatType.PRIVATE)) {
    client.getWlAvatarCharacter().playAnimation("String_Node_Str");
  }
 else {
    client.getWlAvatarCharacter().stop();
  }
  incomingCallHUDComponent.setVisible(false);
}