nus-yam/ex-repair huggingface dataset:
Program: 46218
Project: 46218
Buggy source:
/** 
 * Create a new StatusWaiter for the given runner and target status
 * @param runner the runner to listen for status on
 * @param targetStatus the status to wait for if <code>wait()</code> iscalled.
 */
public StatusWaiter(Runner runner,Runner.Status targetStatus){
  this.runner=runner;
  this.targetStatus=targetStatus;
  currentStatus=runner.addStatusListener(this);
}

Fixed version (ground truth):
/** 
 * Create a new StatusWaiter for the given runner and target status
 * @param runner the runner to listen for status on
 * @param targetStatus the status to wait for if <code>wait()</code> iscalled.
 */
public StatusWaiter(Runner runner,Runner.Status targetStatus){
  this.runner=runner;
  this.targetStatus=targetStatus;
  if (runner.isRunnable()) {
    currentStatus=runner.addStatusListener(this);
  }
}
Program: 46219
Project: 46219
Buggy source:
/** 
 * Wait for the runner's status to be the given status
 * @param status the status to wait for
 * @return the actual status.  This will either be the valuethat was specified in status or ERROR if the runner had an error.
 * @throws InterruptedException if the thread is interrupted
 */
public synchronized Runner.Status waitFor(Runner.Status status) throws InterruptedException {
  while (currentStatus != status && currentStatus != Runner.Status.ERROR) {
    wait();
  }
  return currentStatus;
}

Fixed version (ground truth):
/** 
 * Wait for the runner's status to be the given status
 * @param status the status to wait for
 * @return the actual status.  This will either be the valuethat was specified in status or ERROR if the runner had an error.
 * @throws InterruptedException if the thread is interrupted
 */
public synchronized Runner.Status waitFor(Runner.Status status) throws InterruptedException {
  if (!runner.isRunnable()) {
    return runner.getStatus();
  }
  while (currentStatus != status && currentStatus != Runner.Status.ERROR) {
    wait();
  }
  return currentStatus;
}
Program: 46220
Project: 46220
Buggy source:
/** 
 * Create a new instance of HUDApp2D with the given name.
 * @param name The name of the app.
 * @param controlArb The control arbiter to use. null means that all users can control at the same time.
 * @param pixelScale The size of the window pixels in world coordinates.
 */
public HUDApp2D(String name,ControlArb controlArb,Vector2f pixelScale){
  super(name,controlArb,pixelScale);
  controlArb.setApp(this);
}

Fixed version (ground truth):
/** 
 * Create a new instance of HUDApp2D with the given name.
 * @param name The name of the app.
 * @param controlArb The control arbiter to use. null means that all users can control at the same time.
 * @param pixelScale The size of the window pixels in world coordinates.
 */
public HUDApp2D(String name,ControlArb controlArb,Vector2f pixelScale){
  super(name,controlArb,pixelScale);
  controlArb.setApp(this);
  controlArb.takeControl();
}
Program: 46221
Project: 46221
Buggy source:
/** 
 * {@inheritDoc}
 */
public void addComponent(HUDComponent component){
  logger.fine("String_Node_Str" + component + "String_Node_Str"+ component.getWidth()+ "String_Node_Str"+ component.getHeight());
  Window2D window=null;
  HUDComponentState state=new HUDComponentState(component);
  try {
    HUDApp2D hudApp=new HUDApp2D("String_Node_Str",new ControlArbMulti(),new Vector2f(0.2f,0.2f));
    window=hudApp.createWindow(component.getWidth(),component.getHeight(),Type.PRIMARY,false,new Vector2f(0.2f,0.2f),"String_Node_Str");
    JComponent comp=((HUDComponent2D)component).getComponent();
    ((WindowSwing)window).setComponent(comp);
  }
 catch (  InstantiationException e) {
    logger.warning("String_Node_Str" + e);
  }
  state.setWindow(window);
  component.addComponentListener(this);
  HUDStateMap.put(component,state);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void addComponent(HUDComponent component){
  logger.fine("String_Node_Str" + component + "String_Node_Str"+ component.getWidth()+ "String_Node_Str"+ component.getHeight());
  Window2D window=null;
  HUDComponentState state=new HUDComponentState(component);
  try {
    HUDApp2D hudApp=new HUDApp2D("String_Node_Str",new ControlArbHUD(),new Vector2f(0.2f,0.2f));
    window=hudApp.createWindow(component.getWidth(),component.getHeight(),Type.PRIMARY,false,new Vector2f(0.2f,0.2f),"String_Node_Str");
    JComponent comp=((HUDComponent2D)component).getComponent();
    ((WindowSwing)window).setComponent(comp);
  }
 catch (  InstantiationException e) {
    logger.warning("String_Node_Str" + e);
  }
  state.setWindow(window);
  component.addComponentListener(this);
  HUDStateMap.put(component,state);
}
Program: 46222
Project: 46222
Buggy source:
protected Node createSceneGraph(Entity entity){
  node=new Node("String_Node_Str");
  String textureURI=((ImageViewerCell)cell).getImageURI();
  if (textureURI == null) {
    logger.warning("String_Node_Str");
    return new Node();
  }
  URL url=null;
  try {
    url=getAssetURL(textureURI);
  }
 catch (  MalformedURLException ex) {
    Logger.getLogger(ImageViewerCellRenderer.class.getName()).log(Level.SEVERE,null,ex);
  }
  Texture texture=TextureManager.loadTexture(url);
  texture.setWrap(Texture.WrapMode.BorderClamp);
  texture.setTranslation(new Vector3f());
  Image image=texture.getImage();
  int width=image.getWidth();
  int height=image.getHeight();
  Box box=new Box("String_Node_Str",new Vector3f(0,0,0),width,height,0.1f);
  node.attachChild(box);
  node.setLocalScale(new Vector3f(0.01f,0.01f,1.0f));
  box.setModelBound(new BoundingSphere());
  box.updateModelBound();
  TextureState ts=(TextureState)ClientContextJME.getWorldManager().getRenderManager().createRendererState(RenderState.RS_TEXTURE);
  ts.setTexture(texture);
  ts.setEnabled(true);
  box.setRenderState(ts);
  return node;
}

Fixed version (ground truth):
protected Node createSceneGraph(Entity entity){
  node=new Node("String_Node_Str");
  String textureURI=((ImageViewerCell)cell).getImageURI();
  if (textureURI == null) {
    logger.warning("String_Node_Str");
    return new Node();
  }
  URL url=null;
  try {
    url=getAssetURL(textureURI);
  }
 catch (  MalformedURLException ex) {
    Logger.getLogger(ImageViewerCellRenderer.class.getName()).log(Level.SEVERE,null,ex);
  }
  Texture texture=TextureManager.loadTexture(url);
  texture.setWrap(Texture.WrapMode.BorderClamp);
  texture.setTranslation(new Vector3f());
  Image image=texture.getImage();
  float width=image.getWidth() * 0.01f;
  float height=image.getHeight() * 0.01f;
  Box box=new Box("String_Node_Str",new Vector3f(0,0,0),width,height,0.1f);
  node.attachChild(box);
  node.setModelBound(new BoundingSphere());
  node.updateModelBound();
  TextureState ts=(TextureState)ClientContextJME.getWorldManager().getRenderManager().createRendererState(RenderState.RS_TEXTURE);
  ts.setTexture(texture);
  ts.setEnabled(true);
  box.setRenderState(ts);
  return node;
}
Program: 46223
Project: 46223
Buggy source:
protected Node createSceneGraph(Entity entity){
  String name=cell.getCellID().toString();
  String shapeType=((SampleCell)cell).getShapeType();
  TriMesh mesh=this.getShapeMesh(name,shapeType);
  if (mesh == null) {
    node=new Node();
    return node;
  }
  node=new Node();
  node.attachChild(mesh);
  node.setModelBound(new BoundingSphere());
  node.setName("String_Node_Str" + cell.getCellID() + "String_Node_Str"+ cell.getName());
  return node;
}

Fixed version (ground truth):
protected Node createSceneGraph(Entity entity){
  String name=cell.getCellID().toString();
  String shapeType=((SampleCell)cell).getShapeType();
  TriMesh mesh=this.getShapeMesh(name,shapeType);
  if (mesh == null) {
    node=new Node();
    return node;
  }
  node=new Node();
  node.attachChild(mesh);
  node.setModelBound(new BoundingSphere());
  node.updateModelBound();
  node.setName("String_Node_Str" + cell.getCellID() + "String_Node_Str"+ cell.getName());
  return node;
}
Program: 46224
Project: 46224
Buggy source:
public void updateShape(){
  String name=cell.getCellID().toString();
  String shapeType=((SampleCell)cell).getShapeType();
  node.detachAllChildren();
  node.attachChild(this.getShapeMesh(name,shapeType));
  node.setModelBound(new BoundingSphere());
  ClientContextJME.getWorldManager().addToUpdateList(node);
}

Fixed version (ground truth):
public void updateShape(){
  String name=cell.getCellID().toString();
  String shapeType=((SampleCell)cell).getShapeType();
  node.detachAllChildren();
  node.attachChild(this.getShapeMesh(name,shapeType));
  node.setModelBound(new BoundingSphere());
  node.updateModelBound();
  ClientContextJME.getWorldManager().addToUpdateList(node);
}
Program: 46225
Project: 46225
Buggy source:
/** 
 * {@inheritDoc}
 */
public void sessionCreated(WonderlandSession session){
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void sessionCreated(WonderlandSession session){
  if (connection != null) {
    logger.warning("String_Node_Str");
    return;
  }
  connection=new AppConventionalConnection(session);
  try {
    connection.connect(session);
  }
 catch (  ConnectionFailureException ex) {
    RuntimeException re=new RuntimeException("String_Node_Str" + ex);
    re.initCause(ex);
    throw re;
  }
}
Program: 46226
Project: 46226
Buggy source:
/** 
 * {@inheritDoc}
 */
public void primarySession(WonderlandSession session){
  if (session == currentPrimarySession)   return;
  if (currentPrimarySession != null && connection != null) {
    connection.disconnect();
    connection=null;
  }
  currentPrimarySession=session;
  connection=new AppConventionalConnection(session);
  try {
    connection.connect(session);
  }
 catch (  ConnectionFailureException ex) {
    RuntimeException re=new RuntimeException("String_Node_Str" + ex);
    re.initCause(ex);
    throw re;
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void primarySession(WonderlandSession session){
}
Program: 46227
Project: 46227
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void setClientState(CellClientState clientState){
  super.setClientState(clientState);
  AppConventionalCellClientState state=(AppConventionalCellClientState)clientState;
  appName=state.getAppName();
  if (state.getLaunchLocation().equalsIgnoreCase("String_Node_Str") && state.getLaunchUser().equals(cellCacheSession.getUserID().getUsername())) {
    if (connection == null) {
      logger.severe("String_Node_Str");
      logger.severe("String_Node_Str" + state.getCommand());
      return;
    }
    connectionInfo=startMaster(appName,state.getCommand(),false);
    if (connectionInfo == null) {
      logger.warning("String_Node_Str" + appName);
      return;
    }
    logger.info("String_Node_Str" + getCellID() + "String_Node_Str"+ connectionInfo);
    AppConventionalCellSetConnectionInfoMessage msg=new AppConventionalCellSetConnectionInfoMessage(getCellID(),connectionInfo);
    connection.send(msg);
  }
 else {
    connectionInfo=state.getConnectionInfo();
    logger.severe("String_Node_Str" + connectionInfo);
    if (connectionInfo != null) {
      logger.severe("String_Node_Str");
      startTheSlave(connectionInfo);
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void setClientState(CellClientState clientState){
  super.setClientState(clientState);
  AppConventionalCellClientState state=(AppConventionalCellClientState)clientState;
  appName=state.getAppName();
  if (state.getLaunchLocation().equalsIgnoreCase("String_Node_Str") && state.getLaunchUser().equals(cellCacheSession.getUserID().getUsername())) {
    connectionInfo=startMaster(appName,state.getCommand(),false);
    if (connectionInfo == null) {
      logger.warning("String_Node_Str" + appName);
      return;
    }
    logger.info("String_Node_Str" + getCellID() + "String_Node_Str"+ connectionInfo);
    AppConventionalCellSetConnectionInfoMessage msg=new AppConventionalCellSetConnectionInfoMessage(getCellID(),connectionInfo);
    connection.send(msg);
  }
 else {
    connectionInfo=state.getConnectionInfo();
    logger.severe("String_Node_Str" + connectionInfo);
    if (connectionInfo != null) {
      logger.severe("String_Node_Str");
      startTheSlave(connectionInfo);
    }
  }
}
Program: 46228
Project: 46228
Buggy source:
/** 
 * This is called when the server sends the connection info.
 */
synchronized void setConnectionInfo(String connInfo){
  if (connectionInfo != null) {
    return;
  }
  if (connInfo != null) {
    connectionInfo=connInfo;
    notifyAll();
  }
}

Fixed version (ground truth):
/** 
 * This is called when the server sends the connection info.
 */
synchronized void setConnectionInfo(String connInfo){
  if (connectionInfo != null) {
    return;
  }
  if (slaveStarted)   return;
  if (connInfo != null) {
    connectionInfo=connInfo;
    logger.severe("String_Node_Str");
    startTheSlave(connectionInfo);
  }
}
Program: 46229
Project: 46229
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void setClientState(CellClientState clientState){
  super.setClientState(clientState);
  AppConventionalCellClientState state=(AppConventionalCellClientState)clientState;
  appName=state.getAppName();
  if (state.getLaunchLocation().equalsIgnoreCase("String_Node_Str") && state.getLaunchUser().equals(cellCacheSession.getUserID().getUsername())) {
    connectionInfo=startMaster(appName,state.getCommand(),false);
    if (connectionInfo == null) {
      logger.warning("String_Node_Str" + appName);
      return;
    }
    logger.info("String_Node_Str" + getCellID() + "String_Node_Str"+ connectionInfo);
    AppConventionalCellSetConnectionInfoMessage msg=new AppConventionalCellSetConnectionInfoMessage(getCellID(),connectionInfo);
    if (connection == null) {
      logger.severe("String_Node_Str");
      System.exit(1);
    }
    connection.send(msg);
  }
 else {
    connectionInfo=state.getConnectionInfo();
    logger.severe("String_Node_Str" + connectionInfo);
synchronized (this) {
      while (connectionInfo == null) {
        logger.fine("String_Node_Str");
        try {
          wait();
        }
 catch (        InterruptedException ex) {
        }
      }
      logger.fine("String_Node_Str");
    }
    startSlave(connectionInfo);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void setClientState(CellClientState clientState){
  super.setClientState(clientState);
  AppConventionalCellClientState state=(AppConventionalCellClientState)clientState;
  appName=state.getAppName();
  if (state.getLaunchLocation().equalsIgnoreCase("String_Node_Str") && state.getLaunchUser().equals(cellCacheSession.getUserID().getUsername())) {
    if (connection == null) {
      logger.severe("String_Node_Str");
      logger.severe("String_Node_Str" + state.getCommand());
      return;
    }
    connectionInfo=startMaster(appName,state.getCommand(),false);
    if (connectionInfo == null) {
      logger.warning("String_Node_Str" + appName);
      return;
    }
    logger.info("String_Node_Str" + getCellID() + "String_Node_Str"+ connectionInfo);
    AppConventionalCellSetConnectionInfoMessage msg=new AppConventionalCellSetConnectionInfoMessage(getCellID(),connectionInfo);
    connection.send(msg);
  }
 else {
    connectionInfo=state.getConnectionInfo();
    logger.severe("String_Node_Str" + connectionInfo);
    if (connectionInfo != null) {
      logger.severe("String_Node_Str");
      startTheSlave(connectionInfo);
    }
  }
}
Program: 46231
Project: 46231
Buggy source:
@Override public void setStatus(CellStatus status){
switch (status) {
case DISK:
    if (msgReceiver != null) {
      msgReceiver=null;
    }
  break;
case BOUNDS:
if (msgReceiver == null) {
  msgReceiver=new ChannelComponent.ComponentMessageReceiver(){
    public void messageReceived(    CellMessage message){
    }
  }
;
  channelComp=cell.getComponent(ChannelComponent.class);
  ProximityComponent comp=new ProximityComponent(cell);
  BoundingVolume[] boundingVolume=new BoundingVolume[1];
  boundingVolume[0]=cell.getLocalBounds();
  comp.addProximityListener(this,boundingVolume);
  cell.addComponent(comp);
}
break;
}
}

Fixed version (ground truth):
@Override public void setStatus(CellStatus status){
switch (status) {
case DISK:
    if (msgReceiver != null) {
      channelComp.removeMessageReceiver(CellServerComponentMessage.class);
      msgReceiver=null;
    }
  break;
case BOUNDS:
if (msgReceiver == null) {
  msgReceiver=new ChannelComponent.ComponentMessageReceiver(){
    public void messageReceived(    CellMessage message){
    }
  }
;
  channelComp=cell.getComponent(ChannelComponent.class);
  channelComp.addMessageReceiver(CellServerComponentMessage.class,msgReceiver);
  ProximityComponent comp=new ProximityComponent(cell);
  BoundingVolume[] boundingVolume=new BoundingVolume[1];
  boundingVolume[0]=cell.getLocalBounds();
  comp.addProximityListener(this,boundingVolume);
  cell.addComponent(comp);
}
break;
}
}
Program: 46232
Project: 46232
Buggy source:
public ConeOfSilenceEnterExitMessage(CellID cellID,boolean entered){
  super(cellID);
  this.entered=entered;
}

Fixed version (ground truth):
public ConeOfSilenceEnterExitMessage(String callID,boolean entered){
  this.callID=callID;
  this.entered=entered;
}
Program: 46233
Project: 46233
Buggy source:
public void cellEntered(String callId){
  logger.info(callId + "String_Node_Str" + name+ "String_Node_Str"+ callId);
  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(name);
  if (audioGroup == null) {
    AudioGroupSetup ags=new AudioGroupSetup();
    ags.audioGroupListener=this;
    ags.spatializer=new FullVolumeSpatializer();
    ags.spatializer.setAttenuator(DefaultSpatializer.DEFAULT_MAXIMUM_VOLUME);
    audioGroup=vm.createAudioGroup(name,ags);
  }
  audioGroup.addPlayer(player,new AudioGroupPlayerInfo(true,AudioGroupPlayerInfo.ChatType.EXCLUSIVE));
  WonderlandClientSender sender=WonderlandContext.getCommsManager().getSender(AudioManagerConnectionType.CONNECTION_TYPE);
  sender.send(new ConeOfSilenceEnterExitMessage(cellID,true));
}

Fixed version (ground truth):
public void cellEntered(String callId){
  logger.info(callId + "String_Node_Str" + name+ "String_Node_Str"+ callId);
  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(name);
  if (audioGroup == null) {
    AudioGroupSetup ags=new AudioGroupSetup();
    ags.audioGroupListener=this;
    ags.spatializer=new FullVolumeSpatializer();
    ags.spatializer.setAttenuator(DefaultSpatializer.DEFAULT_MAXIMUM_VOLUME);
    audioGroup=vm.createAudioGroup(name,ags);
  }
  audioGroup.addPlayer(player,new AudioGroupPlayerInfo(true,AudioGroupPlayerInfo.ChatType.EXCLUSIVE));
  WonderlandClientSender sender=WonderlandContext.getCommsManager().getSender(AudioManagerConnectionType.CONNECTION_TYPE);
  sender.send(new ConeOfSilenceEnterExitMessage(callId,true));
}
Program: 46234
Project: 46234
Buggy source:
public void cellExited(String callId){
  logger.info(callId + "String_Node_Str" + name+ "String_Node_Str"+ callId);
  VoiceManager vm=AppContext.getManager(VoiceManager.class);
  AudioGroup audioGroup=vm.getAudioGroup(name);
  if (audioGroup == null) {
    logger.warning("String_Node_Str" + name);
    return;
  }
  Player player=vm.getPlayer(callId);
  if (player == null) {
    logger.warning("String_Node_Str" + callId);
    return;
  }
  audioGroup.removePlayer(player);
  WonderlandClientSender sender=WonderlandContext.getCommsManager().getSender(AudioManagerConnectionType.CONNECTION_TYPE);
  sender.send(new ConeOfSilenceEnterExitMessage(cellID,false));
}

Fixed version (ground truth):
public void cellExited(String callId){
  logger.info(callId + "String_Node_Str" + name+ "String_Node_Str"+ callId);
  VoiceManager vm=AppContext.getManager(VoiceManager.class);
  AudioGroup audioGroup=vm.getAudioGroup(name);
  if (audioGroup == null) {
    logger.warning("String_Node_Str" + name);
    return;
  }
  Player player=vm.getPlayer(callId);
  if (player == null) {
    logger.warning("String_Node_Str" + callId);
    return;
  }
  audioGroup.removePlayer(player);
  WonderlandClientSender sender=WonderlandContext.getCommsManager().getSender(AudioManagerConnectionType.CONNECTION_TYPE);
  sender.send(new ConeOfSilenceEnterExitMessage(callId,false));
}
Program: 46235
Project: 46235
Buggy source:
public <T extends CellServerState>T getDefaultCellServerState(Properties props){
  ConeOfSilenceCellServerState cellServerState=new ConeOfSilenceCellServerState();
  cellServerState.setName("String_Node_Str");
  cellServerState.setFullVolumeRadius((float)1.5);
  Vector3f axis=new Vector3f((float)1,(float)0,(float)0);
  Logger.getLogger(ConeOfSilenceCellFactory.class.getName()).warning("String_Node_Str");
  return (T)cellServerState;
}

Fixed version (ground truth):
public <T extends CellServerState>T getDefaultCellServerState(Properties props){
  ConeOfSilenceCellServerState cellServerState=new ConeOfSilenceCellServerState();
  cellServerState.setName("String_Node_Str");
  cellServerState.setFullVolumeRadius((float)1.5);
  Vector3f axis=new Vector3f((float)1,(float)0,(float)0);
  Logger.getLogger(ConeOfSilenceCellFactory.class.getName()).fine("String_Node_Str");
  return (T)cellServerState;
}
Program: 46236
Project: 46236
Buggy source:
public <T extends CellServerState>T getDefaultCellServerState(Properties props){
  ConeOfSilenceCellServerState cellServerState=new ConeOfSilenceCellServerState();
  cellServerState.setName("String_Node_Str");
  cellServerState.setFullVolumeRadius((float)1.5);
  Vector3f axis=new Vector3f((float)1,(float)0,(float)0);
  Logger.getLogger(ConeOfSilenceCellFactory.class.getName()).fine("String_Node_Str");
  return (T)cellServerState;
}

Fixed version (ground truth):
public <T extends CellServerState>T getDefaultCellServerState(Properties props){
  ConeOfSilenceCellServerState cellServerState=new ConeOfSilenceCellServerState();
  cellServerState.setName("String_Node_Str");
  cellServerState.setFullVolumeRadius((float)1.5);
  Logger.getLogger(ConeOfSilenceCellFactory.class.getName()).fine("String_Node_Str");
  return (T)cellServerState;
}
Program: 46237
Project: 46237
Buggy source:
private boolean alreadyInMaps(PresenceInfo presenceInfo){
  PresenceInfo info=cellIDMap.get(presenceInfo.cellID);
  if (info == null || info.equals(presenceInfo) == false) {
    return false;
  }
  if (presenceInfo.clientID != null) {
    info=sessionIDMap.get(presenceInfo.clientID);
    if (info == null || info.equals(presenceInfo) == false) {
      return false;
    }
  }
  info=userIDMap.get(presenceInfo.userID);
  if (info == null || info.equals(presenceInfo) == false) {
    return false;
  }
  if (presenceInfo.callID != null) {
    info=callIDMap.get(presenceInfo.callID);
    if (info == null || info.equals(presenceInfo) == false) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean alreadyInMaps(PresenceInfo presenceInfo){
  PresenceInfo info=cellIDMap.get(presenceInfo.cellID);
  if (info != null && info.equals(presenceInfo)) {
    return true;
  }
  if (presenceInfo.clientID != null) {
    info=sessionIDMap.get(presenceInfo.clientID);
    if (info != null && info.equals(presenceInfo)) {
      return true;
    }
  }
  info=userIDMap.get(presenceInfo.userID);
  if (info != null && info.equals(presenceInfo)) {
    return true;
  }
  if (presenceInfo.callID != null) {
    info=callIDMap.get(presenceInfo.callID);
    if (info != null && info.equals(presenceInfo)) {
      return true;
    }
  }
  return false;
}
Program: 46238
Project: 46238
Buggy source:
@Override public void setStatus(CellStatus status){
}

Fixed version (ground truth):
@Override public void setStatus(CellStatus status){
switch (status) {
case DISK:
    if (msgReceiver != null) {
      channelComp.removeMessageReceiver(CellServerComponentMessage.class);
      msgReceiver=null;
    }
  break;
case BOUNDS:
if (msgReceiver == null) {
  msgReceiver=new ChannelComponent.ComponentMessageReceiver(){
    public void messageReceived(    CellMessage message){
    }
  }
;
}
channelComp=cell.getComponent(ChannelComponent.class);
channelComp.addMessageReceiver(CellServerComponentMessage.class,msgReceiver);
break;
}
}
Program: 46239
Project: 46239
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void setSize(float width,float height){
  quad.initialize(width,height);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} <br><br> Note: this method resets the texture attributes of the quad to display the entire contents of the texture image on the quad. It undoes any previous calls to  <code>setTextureCoords</code> for this quad. If you have previously called  <code>setTextureCoords</code> to display a subset of the image, you should  call <code>setTextureCoords</code> again to set the appropriate texture coordinates for the new size specified via this <code>setSize</code> call.
 */
public void setSize(float width,float height){
  quad.initialize(width,height);
}
Program: 46240
Project: 46240
Buggy source:
/** 
 * Specifies whether the view entity is to be displayed in ortho mode ("on the glass"). Update if specified.
 */
public synchronized void setOrtho(boolean ortho,boolean update){
  if (this.ortho == ortho)   return;
  this.ortho=ortho;
  changeMask|=CHANGED_ORTHO;
  if (update) {
    update();
  }
}

Fixed version (ground truth):
/** 
 * Specifies whether the view entity is to be displayed in ortho mode ("on the glass"). Update if specified.
 */
public synchronized void setOrtho(boolean ortho,boolean update){
  if (this.ortho == ortho)   return;
  logger.info("String_Node_Str" + ortho);
  this.ortho=ortho;
  changeMask|=CHANGED_ORTHO;
  if (update) {
    update();
  }
}
Program: 46242
Project: 46242
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override protected CellClientState getClientState(CellClientState cellClientState,WonderlandClientID clientID,ClientCapabilities capabilities){
  if (clientState == null) {
    clientState=new AppConventionalCellClientState();
  }
  populateClientState(clientState);
  return clientState;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected CellClientState getClientState(CellClientState cellClientState,WonderlandClientID clientID,ClientCapabilities capabilities){
  if (clientState == null) {
    clientState=new AppConventionalCellClientState();
  }
  populateClientState(clientState);
  return super.getClientState(clientState,clientID,capabilities);
}
Program: 46243
Project: 46243
Buggy source:
public URL locateResource(String resource){
  try {
    if (resource.startsWith("String_Node_Str")) {
      URL url=getAssetURL("String_Node_Str" + modulename + resource);
      return url;
    }
 else {
      String urlStr=trimUrlStr("String_Node_Str" + modulename + path+ resource);
      URL url=getAssetURL(urlStr);
      return url;
    }
  }
 catch (  MalformedURLException ex) {
    logger.log(Level.SEVERE,"String_Node_Str" + resource,ex);
    return null;
  }
}

Fixed version (ground truth):
public URL locateResource(String resource){
  System.err.println("String_Node_Str" + resource);
  System.err.println("String_Node_Str" + modulename + "String_Node_Str"+ path);
  try {
    if (resource.startsWith("String_Node_Str")) {
      URL url=getAssetURL(protocol + "String_Node_Str" + modulename+ resource);
      System.err.println("String_Node_Str" + url.toExternalForm());
      return url;
    }
 else {
      String urlStr=trimUrlStr(protocol + "String_Node_Str" + modulename+ path+ resource);
      URL url=getAssetURL(urlStr);
      System.err.println("String_Node_Str" + url.toExternalForm());
      return url;
    }
  }
 catch (  MalformedURLException ex) {
    logger.log(Level.SEVERE,"String_Node_Str" + resource,ex);
    return null;
  }
}
Program: 46244
Project: 46244
Buggy source:
/** 
 * Locate resources for the given file
 * @param url
 */
public AssetResourceLocator(URL url){
  if (url.getUserInfo() == null) {
    modulename=url.getHost();
  }
 else {
    modulename=url.getUserInfo();
  }
  path=url.getPath();
  path=path.substring(0,path.lastIndexOf('/') + 1);
}

Fixed version (ground truth):
/** 
 * Locate resources for the given file
 * @param url
 */
public AssetResourceLocator(URL url){
  System.out.println("String_Node_Str" + url.toExternalForm());
  if (url.getUserInfo() == null) {
    modulename=url.getHost();
  }
 else {
    modulename=url.getUserInfo();
  }
  path=url.getPath();
  path=path.substring(0,path.lastIndexOf('/') + 1);
  protocol=url.getProtocol();
  System.out.println("String_Node_Str" + modulename + "String_Node_Str"+ path);
}
Program: 46245
Project: 46245
Buggy source:
/** 
 * Default constructor 
 */
private DragAndDropManager(){
  dataFlavorHandlerMap=new HashMap();
  registerDataFlavorHandler(new FileListImportDataFlavorHandler());
  registerDataFlavorHandler(new URLDataFlavorHandler());
}

Fixed version (ground truth):
/** 
 * Default constructor 
 */
private DragAndDropManager(){
  dataFlavorHandlerMap=new HashMap();
  registerDataFlavorHandler(new FileListDataFlavorHandler());
  registerDataFlavorHandler(new URLDataFlavorHandler());
  registerDataFlavorHandler(new URIListDataFlavorHandler());
}
Program: 46246
Project: 46246
Buggy source:
/** 
 */
public void handleDrop(Transferable transferable,DataFlavor dataFlavor,Point dropLocation){
  URL url=null;
  try {
    url=(URL)transferable.getTransferData(dataFlavor);
  }
 catch (  java.io.IOException excp) {
    logger.log(Level.WARNING,"String_Node_Str",excp);
  }
catch (  UnsupportedFlavorException excp) {
    logger.log(Level.WARNING,"String_Node_Str",excp);
  }
  System.out.println("String_Node_Str" + url.toString());
  System.out.println("String_Node_Str" + url.toExternalForm());
  String extension=DragAndDropManager.getFileExtension(url.getFile());
  CellRegistry registry=CellRegistry.getCellRegistry();
  Set<CellFactorySPI> factories=registry.getCellFactoriesByExtension(extension);
  if (factories == null) {
    logger.warning("String_Node_Str" + extension);
    JFrame frame=JmeClientMain.getFrame().getFrame();
    JOptionPane.showMessageDialog(frame,"String_Node_Str" + url.toExternalForm());
    return;
  }
  CellFactorySPI factory=factories.iterator().next();
  Properties props=new Properties();
  props.put("String_Node_Str",url.toExternalForm());
  CellServerState state=factory.getDefaultCellServerState(props);
  try {
    CellUtils.createCell(state,5.0f);
  }
 catch (  CellCreationException excp) {
    logger.log(Level.WARNING,"String_Node_Str" + url,excp);
  }
}

Fixed version (ground truth):
/** 
 */
public void handleDrop(Transferable transferable,DataFlavor dataFlavor,Point dropLocation){
  URL url=null;
  try {
    url=(URL)transferable.getTransferData(dataFlavor);
  }
 catch (  java.io.IOException excp) {
    logger.log(Level.WARNING,"String_Node_Str",excp);
  }
catch (  UnsupportedFlavorException excp) {
    logger.log(Level.WARNING,"String_Node_Str",excp);
  }
  URLDataFlavorHandler.launchCellFromURL(url);
}
Program: 46247
Project: 46247
Buggy source:
private void writeDirectoryTree(JarOutputStream jos,File dir,int parentTrimStart,Set<String> written) throws IOException {
  String dirName=dir.getAbsolutePath().substring(parentTrimStart,dir.getAbsolutePath().length());
  jos.putNextEntry(new JarEntry(dirName + "String_Node_Str"));
  File[] files=dir.listFiles();
  if (files == null)   return;
  for (  File f : files) {
    if (f.isDirectory()) {
      writeDirectoryTree(jos,f,parentTrimStart,written);
    }
 else {
      String path=f.getAbsolutePath().substring(parentTrimStart,f.getAbsolutePath().length());
      jos.putNextEntry(new JarEntry(path));
      FileUtils.copyFile(new FileInputStream(f),jos);
    }
  }
}

Fixed version (ground truth):
private void writeDirectoryTree(JarOutputStream jos,File dir,int parentTrimStart,Set<String> written) throws IOException {
  String dirName=dir.getAbsolutePath().substring(parentTrimStart,dir.getAbsolutePath().length());
  jos.putNextEntry(new JarEntry(dirName + "String_Node_Str"));
  File[] files=dir.listFiles();
  if (files == null)   return;
  for (  File f : files) {
    if (f.isDirectory()) {
      writeDirectoryTree(jos,f,parentTrimStart,written);
    }
 else {
      String path=f.getAbsolutePath().substring(parentTrimStart,f.getAbsolutePath().length());
      if (File.separatorChar == '\\') {
        path=path.replace('\\','/');
      }
      jos.putNextEntry(new JarEntry(path));
      FileUtils.copyFile(new FileInputStream(f),jos);
    }
  }
}
Program: 46251
Project: 46251
Buggy source:
public void messageReceived(WonderlandClientSender sender,WonderlandClientID clientID,CellMessage message){
  receiverRef.get().messageReceived(sender,clientID,message);
}

Fixed version (ground truth):
public void messageReceived(WonderlandClientSender sender,WonderlandClientID clientID,CellMessage message){
  if (receiver == null) {
    receiver=receiverRef.get();
  }
  receiver.messageReceived(sender,clientID,message);
}
Program: 46252
Project: 46252
Buggy source:
public void recordMessage(WonderlandClientSender sender,WonderlandClientID clientID,CellMessage message){
  receiverRef.get().recordMessage(sender,clientID,message);
}

Fixed version (ground truth):
public void recordMessage(WonderlandClientSender sender,WonderlandClientID clientID,CellMessage message){
  if (receiver == null) {
    receiver=receiverRef.get();
  }
  receiver.recordMessage(sender,clientID,message);
}
Program: 46253
Project: 46253
Buggy source:
/** 
 * Re-lay out the contents of this window. This should be called whenever you make changes which affect the layout of the contained component.
 */
public void validate(){
  if (embeddedPeer == null) {
    throw new RuntimeException("String_Node_Str");
  }
  embeddedPeer.validate();
  embeddedPeer.repaint();
}

Fixed version (ground truth):
/** 
 * Re-lay out the contents of this window. This should be called whenever you make changes which affect the layout of the contained component.
 */
public void validate(){
  if (embeddedPeer != null) {
    embeddedPeer.validate();
    embeddedPeer.repaint();
  }
}
Program: 46254
Project: 46254
Buggy source:
/** 
 * {@inheritDoc} 
 */
public synchronized void setVisibleUser(boolean visible,boolean update){
  logger.info("String_Node_Str" + visible);
  visibleUser=visible;
  changeMask|=CHANGED_VISIBLE;
  if (update) {
    update();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public synchronized void setVisibleUser(boolean visible,boolean update){
  if (visibleUser == visible)   return;
  logger.info("String_Node_Str" + visible);
  visibleUser=visible;
  changeMask|=CHANGED_VISIBLE;
  if (update) {
    update();
  }
}
Program: 46256
Project: 46256
Buggy source:
/** 
 * Convert a string containing space-separated tokens into an ArrayList of the separate tokens.
 * @param str The input string.
 */
private static ArrayList<String> stringToArrayListString(String str){
  ArrayList<String> als=new ArrayList<String>();
  StringTokenizer tok=new StringTokenizer(str);
  int numTokens=tok.countTokens();
  if (numTokens <= 0) {
    return null;
  }
  for (int i=0; i < tok.countTokens(); i++) {
    als.add(tok.nextToken());
  }
  return als;
}

Fixed version (ground truth):
/** 
 * Convert a string containing space-separated tokens into an ArrayList of the separate tokens.
 * @param str The input string.
 */
private static ArrayList<String> stringToArrayListString(String str){
  ArrayList<String> als=new ArrayList<String>();
  StringTokenizer tok=new StringTokenizer(str);
  int numTokens=tok.countTokens();
  if (numTokens <= 0) {
    return null;
  }
  for (int i=0; i < numTokens; i++) {
    String s=tok.nextToken();
    als.add(s);
  }
  return als;
}
Program: 46257
Project: 46257
Buggy source:
/** 
 * Specifies whether the view entity is to be displayed in ortho mode ("on the glass"). Update if specified.
 */
public synchronized void setOrtho(boolean ortho,boolean update){
  this.ortho=ortho;
  changeMask|=CHANGED_ORTHO;
  if (update) {
    update();
  }
}

Fixed version (ground truth):
/** 
 * Specifies whether the view entity is to be displayed in ortho mode ("on the glass"). Update if specified.
 */
public synchronized void setOrtho(boolean ortho,boolean update){
  if (this.ortho == ortho)   return;
  this.ortho=ortho;
  changeMask|=CHANGED_ORTHO;
  if (update) {
    update();
  }
}
Program: 46258
Project: 46258
Buggy source:
@Override public String getRelativePathInModule(){
  return "String_Node_Str" + File.separator + this.getAssetPath();
}

Fixed version (ground truth):
@Override public String getRelativePathInModule(){
  return "String_Node_Str" + this.getAssetPath();
}
Program: 46259
Project: 46259
Buggy source:
/** 
 * Returns a relative path of the asset so that it exists in a unique location within a cache. The path does not have a leading "/".
 * @return A unique relative path for the URI
 */
public abstract String getRelativeCachePath();

Fixed version (ground truth):
/** 
 * Returns a relative path of the asset so that it exists in a unique location within a cache. The path does not have a leading "/". This method should return either forward or backward slashes depending upon the platform.
 * @return A unique relative path for the URI
 */
public abstract String getRelativeCachePath();
Program: 46260
Project: 46260
Buggy source:
/** 
 * Returns the relative resource path beneath some base repository URL
 */
public String getRelativePath(){
  return getRoot() + File.separator + getAssetPath();
}

Fixed version (ground truth):
/** 
 * Returns the relative resource path beneath some base repository URL
 */
public String getRelativePath(){
  return getRoot() + "String_Node_Str" + getAssetPath();
}
Program: 46261
Project: 46261
Buggy source:
/** 
 * Returns the relative path of the resource specified by the URI within the module. The relative path does not being with any forward "/". This method adds any directories before the relative asset path.
 * @return The relative path within the URI
 */
public abstract String getRelativePathInModule();

Fixed version (ground truth):
/** 
 * Returns the relative path of the resource specified by the URI within the module. The relative path does not being with any forward "/". This method adds any directories before the relative asset path. This method should return all forward-slashes.
 * @return The relative path within the URI
 */
public abstract String getRelativePathInModule();
Program: 46262
Project: 46262
Buggy source:
/** 
 * Returns the raw relative path of the asset, without prepending any assumed directory like "art/". It has no leading "/".
 */
public String getAssetPath(){
  return assetPath;
}

Fixed version (ground truth):
/** 
 * Returns the raw relative path of the asset, without prepending any assumed directory like "art/". It has no leading "/". This method should return all forward-slashes.
 */
public String getAssetPath(){
  return assetPath;
}
Program: 46263
Project: 46263
Buggy source:
public void clientDisconnected(WonderlandClientSender sender,WonderlandClientID clientID){
  PresenceInfo info=sessions.get(clientID);
  if (info == null) {
    logger.warning("String_Node_Str" + clientID);
    return;
  }
  sessionEnded(sender,info);
}

Fixed version (ground truth):
public void clientDisconnected(WonderlandClientSender sender,WonderlandClientID clientID){
  PresenceInfo info=sessions.get(clientID.getID());
  if (info == null) {
    logger.warning("String_Node_Str" + clientID.getID());
    return;
  }
  sessionEnded(sender,info);
}
Program: 46265
Project: 46265
Buggy source:
private void sendToAllClients(WonderlandClientSender sender,Message message){
  Iterator<BigInteger> it=sessions.keySet().iterator();
  while (it.hasNext()) {
    BigInteger sessionID=it.next();
    PresenceInfo info=sessions.get(sessionID);
    logger.fine("String_Node_Str" + info.userID);
    WonderlandClientID clientID=CommsManagerFactory.getCommsManager().getWonderlandClientID(sessionID);
    sender.send(clientID,message);
  }
}

Fixed version (ground truth):
private void sendToAllClients(WonderlandClientSender sender,Message message){
  Iterator<BigInteger> it=sessions.keySet().iterator();
  while (it.hasNext()) {
    BigInteger sessionID=it.next();
    PresenceInfo info=sessions.get(sessionID);
    String s;
    if (message instanceof SessionCreatedMessage) {
      s="String_Node_Str";
    }
 else {
      s="String_Node_Str";
    }
    logger.info("String_Node_Str" + s + "String_Node_Str"+ sessions.get(sessionID));
    WonderlandClientID clientID=CommsManagerFactory.getCommsManager().getWonderlandClientID(sessionID);
    sender.send(clientID,message);
  }
}
Program: 46266
Project: 46266
Buggy source:
public void messageReceived(WonderlandClientSender sender,WonderlandClientID clientID,CellMessage message){
}

Fixed version (ground truth):
public void messageReceived(WonderlandClientSender sender,WonderlandClientID clientID,CellMessage message){
  if (message instanceof AudioVolumeMessage == false) {
    logger.warning("String_Node_Str" + message);
    return;
  }
  AudioVolumeMessage msg=(AudioVolumeMessage)message;
  CellID cellID=msg.getCellID();
  String softphoneCallID=msg.getSoftphoneCallID();
  double volume=msg.getVolume();
  VoiceManager vm=AppContext.getManager(VoiceManager.class);
  Player softphonePlayer=vm.getPlayer(softphoneCallID);
  if (softphonePlayer == null) {
    System.out.println("String_Node_Str" + softphoneCallID);
    return;
  }
  String otherCallID=CallID.getCallID(cellID);
  if (softphoneCallID.equals(otherCallID)) {
    softphonePlayer.setMasterVolume(volume);
    return;
  }
  DefaultSpatializer spatializer=new DefaultSpatializer();
  spatializer.setAttenuator(volume);
  Player player=vm.getPlayer(otherCallID);
  if (player == null) {
    System.out.println("String_Node_Str" + otherCallID);
    return;
  }
  softphonePlayer.setPrivateSpatializer(player,spatializer);
  return;
}
Program: 46268
Project: 46268
Buggy source:
private static boolean parseArguments(String[] args){
  String port=null;
  String directory=null;
  String propsFile=null;
  Iterator<String> i=Arrays.asList(args).iterator();
  while (i.hasNext()) {
    String s=i.next();
    if (s.equalsIgnoreCase("String_Node_Str")) {
      if (!i.hasNext())       return false;
      port=i.next();
    }
 else     if (s.equalsIgnoreCase("String_Node_Str")) {
      if (!i.hasNext())       return false;
      directory=i.next();
    }
 else     if (s.trim().length() == 0) {
      continue;
    }
 else {
      if (i.hasNext())       return false;
      propsFile=s;
    }
  }
  if (propsFile != null) {
    try {
      System.getProperties().load(new FileInputStream(propsFile));
    }
 catch (    IOException ioe) {
      logger.log(Level.WARNING,"String_Node_Str" + propsFile,ioe);
      return false;
    }
  }
  if (port != null) {
    System.setProperty(Constants.WEBSERVER_PORT_PROP,port);
  }
 else {
    System.setProperty(Constants.WEBSERVER_PORT_PROP,"String_Node_Str");
  }
  if (directory != null) {
    System.setProperty(Constants.RUN_DIR_PROP,directory);
  }
  return true;
}

Fixed version (ground truth):
private static boolean parseArguments(String[] args){
  String port=null;
  String directory=null;
  String propsFile=null;
  Iterator<String> i=Arrays.asList(args).iterator();
  while (i.hasNext()) {
    String s=i.next();
    if (s.equalsIgnoreCase("String_Node_Str")) {
      if (!i.hasNext())       return false;
      port=i.next();
    }
 else     if (s.equalsIgnoreCase("String_Node_Str")) {
      if (!i.hasNext())       return false;
      directory=i.next();
    }
 else     if (s.trim().length() == 0) {
      continue;
    }
 else {
      if (i.hasNext())       return false;
      propsFile=s;
    }
  }
  if (propsFile != null) {
    try {
      System.getProperties().load(new FileInputStream(propsFile));
    }
 catch (    IOException ioe) {
      logger.log(Level.WARNING,"String_Node_Str" + propsFile,ioe);
      return false;
    }
  }
  if (port != null) {
    System.setProperty(Constants.WEBSERVER_PORT_PROP,port);
  }
  if (directory != null) {
    System.setProperty(Constants.RUN_DIR_PROP,directory);
  }
  return true;
}
Program: 46269
Project: 46269
Buggy source:
public AvatarImiJME(Cell cell){
  super(cell);
  assert(cell != null);
  final Cell c=cell;
  characterMotionListener=new CharacterMotionListener(){
    public void transformUpdate(    Vector3f translation,    PMatrix rotation){
      ((MovableAvatarComponent)c.getComponent(MovableComponent.class)).localMoveRequest(new CellTransform(rotation.getRotation(),translation));
    }
  }
;
  gameContextListener=new GameContextListener(){
    public void trigger(    boolean pressed,    int trigger,    Vector3f translation,    Quaternion rotation){
synchronized (this) {
        currentTrigger=trigger;
        currentPressed=pressed;
      }
      ((MovableAvatarComponent)c.getComponent(MovableComponent.class)).localMoveRequest(new CellTransform(rotation,translation),trigger,pressed,null);
    }
  }
;
  ClientContext.getInputManager().addGlobalEventListener(new EventClassListener(){
    private Class[] consumeClasses=new Class[]{AvatarRendererChangeRequestEvent.class};
    @Override public Class[] eventClassesToConsume(){
      return consumeClasses;
    }
    @Override public void computeEvent(    Event evtIn){
      System.err.println("String_Node_Str" + evtIn);
    }
  }
);
}

Fixed version (ground truth):
public AvatarImiJME(Cell cell){
  super(cell);
  assert(cell != null);
  final Cell c=cell;
  characterMotionListener=new CharacterMotionListener(){
    public void transformUpdate(    Vector3f translation,    PMatrix rotation){
      ((MovableAvatarComponent)c.getComponent(MovableComponent.class)).localMoveRequest(new CellTransform(rotation.getRotation(),translation));
    }
  }
;
  gameContextListener=new GameContextListener(){
    public void trigger(    boolean pressed,    int trigger,    Vector3f translation,    Quaternion rotation){
synchronized (this) {
        currentTrigger=trigger;
        currentPressed=pressed;
      }
      String animationName=avatarCharacter.getContext().getState(CycleActionState.class).getAnimationName();
      ((MovableAvatarComponent)c.getComponent(MovableComponent.class)).localMoveRequest(new CellTransform(rotation,translation),trigger,pressed,animationName,null);
    }
  }
;
  ClientContext.getInputManager().addGlobalEventListener(new EventClassListener(){
    private Class[] consumeClasses=new Class[]{AvatarRendererChangeRequestEvent.class};
    @Override public Class[] eventClassesToConsume(){
      return consumeClasses;
    }
    @Override public void computeEvent(    Event evtIn){
      System.err.println("String_Node_Str" + evtIn);
    }
  }
);
}
Program: 46270
Project: 46270
Buggy source:
public void trigger(int trigger,boolean pressed){
  if (!selectedForInput && avatarCharacter != null) {
synchronized (this) {
      if (currentTrigger == trigger && currentPressed == pressed)       return;
      if (pressed)       avatarCharacter.getContext().triggerPressed(trigger);
 else       avatarCharacter.getContext().triggerReleased(trigger);
      currentTrigger=trigger;
      currentPressed=pressed;
    }
  }
}

Fixed version (ground truth):
public void trigger(int trigger,boolean pressed,String animationName){
  if (!selectedForInput && avatarCharacter != null) {
synchronized (this) {
      if (currentTrigger == trigger && currentPressed == pressed)       return;
      System.err.println("String_Node_Str" + trigger + "String_Node_Str"+ pressed+ "String_Node_Str"+ animationName);
      if (pressed) {
        if (animationName != null)         ((WlAvatarContext)avatarCharacter.getContext()).setMiscAnimation(animationName);
        avatarCharacter.getContext().triggerPressed(trigger);
      }
 else       avatarCharacter.getContext().triggerReleased(trigger);
      currentTrigger=trigger;
      currentPressed=pressed;
    }
  }
}
Program: 46272
Project: 46272
Buggy source:
public void playAnimation(String name){
  ((WlAvatarContext)getContext()).playAnimation(name);
}

Fixed version (ground truth):
public void playAnimation(String name){
  ((WlAvatarContext)getContext()).playMiscAnimation(name);
}