nus-yam/ex-repair huggingface dataset:
Program: 45541
Project: 45541
Buggy source:
@Override public void setLive(boolean live){
  this.live=live;
  if (live) {
    receiverRef.get().setChannel(channelRef.get());
    if (state != null) {
      setServerState(state);
      state=null;
    }
    channelRef.get().addMessageReceiver(MapRequestMessage.class,receiverRef.get());
    channelRef.get().addMessageReceiver(GetRequestMessage.class,receiverRef.get());
    channelRef.get().addMessageReceiver(PutRequestMessage.class,receiverRef.get());
    channelRef.get().addMessageReceiver(RemoveRequestMessage.class,receiverRef.get());
  }
 else {
    channelRef.get().removeMessageReceiver(MapRequestMessage.class);
    channelRef.get().removeMessageReceiver(GetRequestMessage.class);
    channelRef.get().removeMessageReceiver(PutRequestMessage.class);
    channelRef.get().removeMessageReceiver(RemoveRequestMessage.class);
  }
}

Fixed version (ground truth):
@Override public void setLive(boolean live){
  super.setLive(live);
  this.live=live;
  if (live) {
    receiverRef.get().setChannel(channelRef.get());
    if (state != null) {
      setServerState(state);
      state=null;
    }
    channelRef.get().addMessageReceiver(MapRequestMessage.class,receiverRef.get());
    channelRef.get().addMessageReceiver(GetRequestMessage.class,receiverRef.get());
    channelRef.get().addMessageReceiver(PutRequestMessage.class,receiverRef.get());
    channelRef.get().addMessageReceiver(RemoveRequestMessage.class,receiverRef.get());
  }
 else {
    channelRef.get().removeMessageReceiver(MapRequestMessage.class);
    channelRef.get().removeMessageReceiver(GetRequestMessage.class);
    channelRef.get().removeMessageReceiver(PutRequestMessage.class);
    channelRef.get().removeMessageReceiver(RemoveRequestMessage.class);
  }
}
Program: 45542
Project: 45542
Buggy source:
public void cellAdded(CellMO cell){
  Set<Class<? extends CellComponentMO>> components=new LinkedHashSet<Class<? extends CellComponentMO>>();
  Set<Class<? extends CellMO>> cellTree=getClassTree(cell.getClass());
  for (  Class<? extends CellMO> cellClass : cellTree) {
    components.addAll(CellManagerMO.getCellComponents(cellClass));
  }
  for (  Class<? extends CellComponentMO> c : components) {
    try {
      Constructor con=c.getConstructor(CellMO.class);
      CellComponentMO comp=(CellComponentMO)con.newInstance(cell);
      cell.addComponent(comp);
    }
 catch (    NoSuchMethodException ex) {
      logger.log(Level.WARNING,null,ex);
    }
catch (    SecurityException ex) {
      logger.log(Level.WARNING,null,ex);
    }
catch (    InstantiationException ex) {
      logger.log(Level.WARNING,null,ex);
    }
catch (    IllegalAccessException ex) {
      logger.log(Level.WARNING,null,ex);
    }
catch (    IllegalArgumentException ex) {
      logger.log(Level.WARNING,null,ex);
    }
catch (    InvocationTargetException ex) {
      if (ex.getCause() != null && ex.getCause() instanceof RuntimeException) {
        throw (RuntimeException)ex.getCause();
      }
      logger.log(Level.WARNING,null,ex);
    }
  }
}

Fixed version (ground truth):
public void cellAdded(CellMO cell){
  Set<Class<? extends CellComponentMO>> components=new LinkedHashSet<Class<? extends CellComponentMO>>();
  Set<Class<? extends CellMO>> cellTree=getClassTree(cell.getClass());
  for (  Class<? extends CellMO> cellClass : cellTree) {
    components.addAll(CellManagerMO.getCellComponents(cellClass));
  }
  for (  Class<? extends CellComponentMO> c : components) {
    if (cell.getComponent(CellComponentMO.getLookupClass(c)) != null) {
      continue;
    }
    try {
      Constructor con=c.getConstructor(CellMO.class);
      CellComponentMO comp=(CellComponentMO)con.newInstance(cell);
      cell.addComponent(comp);
    }
 catch (    NoSuchMethodException ex) {
      logger.log(Level.WARNING,null,ex);
    }
catch (    SecurityException ex) {
      logger.log(Level.WARNING,null,ex);
    }
catch (    InstantiationException ex) {
      logger.log(Level.WARNING,null,ex);
    }
catch (    IllegalAccessException ex) {
      logger.log(Level.WARNING,null,ex);
    }
catch (    IllegalArgumentException ex) {
      logger.log(Level.WARNING,null,ex);
    }
catch (    InvocationTargetException ex) {
      if (ex.getCause() != null && ex.getCause() instanceof RuntimeException) {
        throw (RuntimeException)ex.getCause();
      }
      logger.log(Level.WARNING,null,ex);
    }
  }
}
Program: 45544
Project: 45544
Buggy source:
/** 
 * Returns true if all of the deployers can deploy the parts of the module, false if not
 */
public boolean canDeploy(Module module){
  Map<String,ModulePart> parts=module.getParts();
  Iterator<ModuleDeployerSPI> it=getDeployers().iterator();
  while (it.hasNext() == true) {
    ModuleDeployerSPI deployer=it.next();
    String[] partTypes=deployer.getTypes();
    if (partTypes == null) {
      continue;
    }
    for (    String partType : partTypes) {
      if (parts.containsKey(partType) == true) {
        if (deployer.isDeployable(partType,module,parts.get(partType)) == false) {
          return false;
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Returns true if all of the deployers can deploy the parts of the module, false if not
 */
public DeploymentQueryResult canDeploy(Module module){
  DeploymentQueryResult res=new DeploymentQueryResult();
  Map<String,ModulePart> parts=module.getParts();
  Iterator<ModuleDeployerSPI> it=getDeployers().iterator();
  while (it.hasNext() == true) {
    ModuleDeployerSPI deployer=it.next();
    String[] partTypes=deployer.getTypes();
    if (partTypes == null) {
      continue;
    }
    for (    String partType : partTypes) {
      if (parts.containsKey(partType) == true) {
        if (deployer.isDeployable(partType,module,parts.get(partType)) == false) {
          res.addReason("String_Node_Str" + partType + "String_Node_Str"+ deployer.getName()+ "String_Node_Str"+ deployer.getClass().getName());
          res.setResult(false);
          return res;
        }
      }
    }
  }
  res.setResult(true);
  return res;
}
Program: 45545
Project: 45545
Buggy source:
/** 
 * Returns true if all of the deployers can undeploy the parts of the module, false if not
 */
public boolean canUndeploy(Module module){
  Map<String,ModulePart> parts=module.getParts();
  Iterator<ModuleDeployerSPI> it=getDeployers().iterator();
  while (it.hasNext() == true) {
    ModuleDeployerSPI deployer=it.next();
    String[] partTypes=deployer.getTypes();
    if (partTypes == null) {
      continue;
    }
    for (    String partType : partTypes) {
      if (parts.containsKey(partType) == true) {
        logger.warning("String_Node_Str" + module.getName() + "String_Node_Str"+ "String_Node_Str"+ partType+ "String_Node_Str"+ deployer.getName()+ "String_Node_Str"+ deployer.getClass().getName());
        if (deployer.isUndeployable(partType,module,parts.get(partType)) == false) {
          return false;
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Returns true if all of the deployers can undeploy the parts of the module, false if not
 */
public DeploymentQueryResult canUndeploy(Module module){
  DeploymentQueryResult res=new DeploymentQueryResult();
  Map<String,ModulePart> parts=module.getParts();
  Iterator<ModuleDeployerSPI> it=getDeployers().iterator();
  while (it.hasNext() == true) {
    ModuleDeployerSPI deployer=it.next();
    String[] partTypes=deployer.getTypes();
    if (partTypes == null) {
      continue;
    }
    for (    String partType : partTypes) {
      if (parts.containsKey(partType) == true) {
        logger.warning("String_Node_Str" + module.getName() + "String_Node_Str"+ "String_Node_Str"+ partType+ "String_Node_Str"+ deployer.getName()+ "String_Node_Str"+ deployer.getClass().getName());
        if (deployer.isUndeployable(partType,module,parts.get(partType)) == false) {
          res.addReason("String_Node_Str" + partType + "String_Node_Str"+ deployer.getName()+ "String_Node_Str"+ deployer.getClass().getName());
          res.setResult(false);
          return res;
        }
      }
    }
  }
  res.setResult(true);
  return res;
}
Program: 45546
Project: 45546
Buggy source:
/** 
 * Adds a new module to installed. This simply copies files, it assumes all preparations or checks have already been performed. It is given the module and the File root of where to copy and returns the Module object representing the installed module
 */
public Module add(String moduleName,File root){
  Logger logger=ModuleManager.getLogger();
  File file=new File(this.installedFile,moduleName);
  if (ModuleManagerUtils.makeCleanDirectory(file) == false) {
    logger.log(Level.WARNING,"String_Node_Str" + file.getAbsolutePath());
    return null;
  }
  try {
    FileUtils.copyDirectory(root,file);
  }
 catch (  java.io.IOException excp) {
    logger.log(Level.WARNING,"String_Node_Str" + root.getAbsolutePath() + "String_Node_Str"+ file.getAbsolutePath(),excp);
    return null;
  }
  Module module=null;
  try {
    module=ModuleFactory.open(file);
    this.installedModules.put(moduleName,module);
  }
 catch (  java.lang.Exception excp) {
    logger.log(Level.WARNING,"String_Node_Str",excp);
    return null;
  }
  return module;
}

Fixed version (ground truth):
/** 
 * Adds a new module to installed. This simply copies files, it assumes all preparations or checks have already been performed. It is given the module and the File root of where to copy and returns the Module object representing the installed module
 */
public Module add(String moduleName,File root){
  Logger logger=ModuleManager.getLogger();
  File file=new File(this.installedFile,moduleName);
  if (ModuleManagerUtils.makeCleanDirectory(file) == false) {
    logger.log(Level.WARNING,"String_Node_Str" + file.getAbsolutePath());
    return null;
  }
  try {
    FileUtils.copyDirectory(root,file);
  }
 catch (  java.io.IOException excp) {
    logger.log(Level.WARNING,"String_Node_Str" + root.getAbsolutePath() + "String_Node_Str"+ file.getAbsolutePath(),excp);
    return null;
  }
  Module module=null;
  try {
    module=ModuleFactory.open(file);
    this.installedModules.put(moduleName,module);
    if (logger.isLoggable(Level.FINE)) {
      logger.fine("String_Node_Str" + module);
    }
  }
 catch (  java.lang.Exception excp) {
    logger.log(Level.WARNING,"String_Node_Str",excp);
    return null;
  }
  return module;
}
Program: 45547
Project: 45547
Buggy source:
/** 
 * Returns a map of module names and objects from a given directory. If no modules are present, this method returns an empty map.
 * @return An map of unique module names and their Module objects
 */
private Map<String,Module> fetchModules(){
  Map<String,Module> map=new HashMap<String,Module>();
  File[] files=this.installedFile.listFiles();
  for (  File file : files) {
    try {
      Module module=ModuleFactory.open(file);
      map.put(module.getName(),module);
    }
 catch (    java.lang.Exception excp) {
      ModuleManager.getLogger().log(Level.WARNING,"String_Node_Str" + file,excp);
    }
  }
  return map;
}

Fixed version (ground truth):
/** 
 * Returns a map of module names and objects from a given directory. If no modules are present, this method returns an empty map.
 * @return An map of unique module names and their Module objects
 */
private Map<String,Module> fetchModules(){
  Logger logger=ModuleManager.getLogger();
  Map<String,Module> map=new HashMap<String,Module>();
  File[] files=this.installedFile.listFiles();
  for (  File file : files) {
    try {
      Module module=ModuleFactory.open(file);
      map.put(module.getName(),module);
      if (logger.isLoggable(Level.FINE)) {
        logger.fine("String_Node_Str" + module);
      }
    }
 catch (    java.lang.Exception excp) {
      ModuleManager.getLogger().log(Level.WARNING,"String_Node_Str" + file,excp);
    }
  }
  return map;
}
Program: 45548
Project: 45548
Buggy source:
/** 
 * Takes two ModuleInfo class and checks whether the first (provider) is satisfied as a requirement of the second (requirer). Returns true if the requirement is satisfied, false if not.
 * @param provider The module info that could satisfy the requirement
 * @param requirer The module info that specifies the requirement
 * @return True is the requirement is satisfied, false if not
 */
private boolean isSatisfied(ModuleInfo provider,ModuleInfo requirer){
  if (provider.getName().compareTo(requirer.getName()) != 0) {
    return false;
  }
  if (requirer.getMajor() == ModuleInfo.VERSION_UNSET) {
    return true;
  }
  if (requirer.getMajor() > provider.getMajor()) {
    return false;
  }
  if (provider.getMajor() > requirer.getMajor()) {
    return true;
  }
  if (requirer.getMinor() == ModuleInfo.VERSION_UNSET) {
    return true;
  }
  if (requirer.getMinor() > provider.getMinor()) {
    return false;
  }
  if (provider.getMinor() > requirer.getMinor()) {
    return true;
  }
  if (requirer.getMini() == ModuleInfo.VERSION_UNSET) {
    return true;
  }
  if (requirer.getMini() <= provider.getMini()) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Takes two ModuleInfo class and checks whether the first (provider) is satisfied as a requirement of the second (requirer). Returns true if the requirement is satisfied, false if not.
 * @param provider The module info that could satisfy the requirement
 * @param requirer The module info that specifies the requirement
 * @return True is the requirement is satisfied, false if not
 */
private boolean isSatisfied(ModuleInfo provider,ModuleInfo requirer){
  Logger logger=ModuleManager.getLogger();
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("String_Node_Str" + provider + "String_Node_Str"+ requirer);
  }
  if (provider.getName().compareTo(requirer.getName()) != 0) {
    return false;
  }
  if (requirer.getMajor() == ModuleInfo.VERSION_UNSET) {
    return true;
  }
  if (requirer.getMajor() > provider.getMajor()) {
    return false;
  }
  if (provider.getMajor() > requirer.getMajor()) {
    return true;
  }
  if (requirer.getMinor() == ModuleInfo.VERSION_UNSET) {
    return true;
  }
  if (requirer.getMinor() > provider.getMinor()) {
    return false;
  }
  if (provider.getMinor() > requirer.getMinor()) {
    return true;
  }
  if (requirer.getMini() == ModuleInfo.VERSION_UNSET) {
    return true;
  }
  if (requirer.getMini() <= provider.getMini()) {
    return true;
  }
  return false;
}
Program: 45553
Project: 45553
Buggy source:
/** 
 * Constructor which takes major/minor version number 
 */
public ModuleInfo(String name,int major,int minor){
  this.name=name;
  this.version.major=major;
  this.version.minor=minor;
}

Fixed version (ground truth):
/** 
 * Constructor which takes major/minor version number 
 */
public ModuleInfo(String name,int major,int minor,int mini){
  this.name=name;
  this.version.major=major;
  this.version.minor=minor;
  this.version.mini=mini;
}
Program: 45554
Project: 45554
Buggy source:
/** 
 * Returns the version as a string: <major>.<minor>
 */
@Override public String toString(){
  return this.getName() + "String_Node_Str" + Integer.toString(this.getMajor())+ "String_Node_Str"+ Integer.toString(this.getMinor())+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Returns the version as a string: <major>.<minor>
 */
@Override public String toString(){
  return this.getName() + "String_Node_Str" + Integer.toString(this.getMajor())+ "String_Node_Str"+ Integer.toString(this.getMinor())+ "String_Node_Str"+ Integer.toString(this.getMini())+ "String_Node_Str";
}
Program: 45555
Project: 45555
Buggy source:
public static void main(String[] args) throws IOException, JAXBException {
  ModuleJarWriter mjw=new ModuleJarWriter();
  ModuleInfo info=new ModuleInfo("String_Node_Str",1,0,"String_Node_Str");
  mjw.setModuleInfo(info);
  mjw.addArtFile("String_Node_Str",new File("String_Node_Str"));
  mjw.addArtFile("String_Node_Str",new File("String_Node_Str"));
  mjw.writeToJar(new File("String_Node_Str"));
}

Fixed version (ground truth):
public static void main(String[] args) throws IOException, JAXBException {
  ModuleJarWriter mjw=new ModuleJarWriter();
  ModuleInfo info=new ModuleInfo("String_Node_Str",1,0,0,"String_Node_Str");
  mjw.setModuleInfo(info);
  mjw.addArtFile("String_Node_Str",new File("String_Node_Str"));
  mjw.addArtFile("String_Node_Str",new File("String_Node_Str"));
  mjw.writeToJar(new File("String_Node_Str"));
}
Program: 45556
Project: 45556
Buggy source:
/** 
 * Deploys the textures into the art directory, placing them in a directory with the name of the original model.
 * @param moduleArtRootDir
 */
protected void deployTextures(File targetDir,Map<String,String> deploymentMapping,ImportedModel loadedModel){
  try {
    for (    Map.Entry<URL,String> t : loadedModel.getTextureFiles().entrySet()) {
      File target=null;
      String targetFilename=t.getValue();
      String deployFilename=null;
      if (targetFilename.startsWith("String_Node_Str")) {
        targetFilename=targetFilename.substring(targetFilename.lastIndexOf('/'));
        if (targetFilename == null) {
          targetFilename=t.getValue();
        }
      }
 else {
        if (targetFilename.startsWith("String_Node_Str")) {
          deployFilename=targetFilename.substring(3);
          target=new File(targetDir,deployFilename);
        }
      }
      if (target == null) {
        deployFilename=targetFilename;
        target=new File(targetDir,targetFilename);
      }
      target.getParentFile().mkdirs();
      target.createNewFile();
      copyAsset(t.getKey(),target,false);
      String colladaURL=loadedModel.getTextureFiles().get(t.getKey());
      deploymentMapping.put(colladaURL,deployFilename);
    }
  }
 catch (  IOException ex) {
    logger.log(Level.SEVERE,null,ex);
  }
}

Fixed version (ground truth):
/** 
 * Deploys the textures into the art directory, placing them in a directory with the name of the original model.
 * @param moduleArtRootDir
 */
protected void deployTextures(File targetDir,Map<String,String> deploymentMapping,ImportedModel loadedModel){
  try {
    for (    Map.Entry<URL,String> t : loadedModel.getTextureFiles().entrySet()) {
      File target=null;
      String targetFilename=t.getValue();
      String deployFilename=null;
      if (targetFilename.startsWith("String_Node_Str")) {
        targetFilename=targetFilename.substring(targetFilename.lastIndexOf('/'));
        if (targetFilename == null) {
          targetFilename=t.getValue();
        }
      }
 else       if (targetFilename.startsWith("String_Node_Str")) {
        deployFilename=targetFilename.substring(3);
        target=new File(targetDir,deployFilename);
      }
 else       if (targetFilename.startsWith("String_Node_Str")) {
        deployFilename=targetFilename.substring(2);
        target=new File(targetDir,deployFilename);
      }
      if (target == null) {
        deployFilename=targetFilename;
        target=new File(targetDir,targetFilename);
      }
      target.getParentFile().mkdirs();
      target.createNewFile();
      copyAsset(t.getKey(),target,false);
      String colladaURL=loadedModel.getTextureFiles().get(t.getKey());
      deploymentMapping.put(colladaURL,deployFilename);
    }
  }
 catch (  IOException ex) {
    logger.log(Level.SEVERE,null,ex);
  }
}
Program: 45557
Project: 45557
Buggy source:
/** 
 * @param args the command line arguments
 */
public static void main(String[] args){
  for (int i=0; i < args.length; i++) {
    if (args[i].startsWith("String_Node_Str")) {
      TestHarnessSupport.processCommandLineArgs(args[i]);
    }
  }
  if (Webstart.isWebstart()) {
    Webstart.webstartSetup();
  }
  JmeClientMain worldTest=new JmeClientMain(args);
}

Fixed version (ground truth):
/** 
 * @param args the command line arguments
 */
public static void main(String[] args){
  for (int i=0; i < args.length; i++) {
    if (args[i].startsWith("String_Node_Str")) {
      TestHarnessSupport.processCommandLineArgs(args[i]);
    }
  }
  new LogControl(JmeClientMain.class,"String_Node_Str" + "String_Node_Str");
  Logger rootLogger=Logger.getLogger("String_Node_Str");
  rootLogger.addHandler(new LogViewerHandler());
  if (Webstart.isWebstart()) {
    Webstart.webstartSetup();
  }
  JmeClientMain worldTest=new JmeClientMain(args);
}
Program: 45558
Project: 45558
Buggy source:
public LogViewerHandler(){
  super();
  LogViewerFrame.getInstance().setHandler(this);
}

Fixed version (ground truth):
public LogViewerHandler(){
  super();
  setLevel(Level.ALL);
  LogViewerFrame.getInstance().setHandler(this);
}
Program: 45560
Project: 45560
Buggy source:
public void update(Object obj){
  CellTransform transform=cell.getWorldTransform();
  Vector3f translation=transform.getTranslation(null);
  translation=translation.add(bounds.getCenter());
  rootNode.setLocalTranslation(translation);
  wm.addToUpdateList(rootNode);
}

Fixed version (ground truth):
public void update(Object obj){
  CellTransform transform=cell.getWorldTransform();
  Vector3f translation=transform.getTranslation(null);
  translation=translation.add(bounds.getCenter());
  rootNode.setLocalTranslation(translation);
  rootNode.setLocalRotation(transform.getRotation(null));
  wm.addToUpdateList(rootNode);
}
Program: 45561
Project: 45561
Buggy source:
public void transformChanged(final Cell cell,ChangeSource source){
  final WorldManager wm=ClientContextJME.getWorldManager();
  RenderUpdater u=new RenderUpdater(){
    public void update(    Object obj){
      CellTransform transform=cell.getWorldTransform();
      Vector3f translation=transform.getTranslation(null);
      translation=translation.add(bounds.getCenter());
      rootNode.setLocalTranslation(translation);
      wm.addToUpdateList(rootNode);
    }
  }
;
  wm.addRenderUpdater(u,this);
}

Fixed version (ground truth):
public void transformChanged(final Cell cell,ChangeSource source){
  final WorldManager wm=ClientContextJME.getWorldManager();
  RenderUpdater u=new RenderUpdater(){
    public void update(    Object obj){
      CellTransform transform=cell.getWorldTransform();
      Vector3f translation=transform.getTranslation(null);
      translation=translation.add(bounds.getCenter());
      rootNode.setLocalTranslation(translation);
      rootNode.setLocalRotation(transform.getRotation(null));
      wm.addToUpdateList(rootNode);
    }
  }
;
  wm.addRenderUpdater(u,this);
}
Program: 45564
Project: 45564
Buggy source:
/** 
 * Deletes an entry from the X11 Apps.
 */
private void handleDelete(HttpServletRequest request,HttpServletResponse response,ContentCollection xAppsCollection) throws ServletException, IOException, ContentRepositoryException {
  String path=request.getParameter("String_Node_Str");
  String appName=request.getParameter("String_Node_Str");
  ContentResource resource=getXAppResource(xAppsCollection,path);
  if (resource == null) {
    error(request,response,"String_Node_Str" + request.getPathInfo() + "String_Node_Str");
    return;
  }
  xAppsCollection.removeChild(resource.getName());
  Object obj=getServletContext().getAttribute(XAPPS_CONN_ATTR);
  if (obj != null) {
    XAppsWebConfigConnection connection=(XAppsWebConfigConnection)obj;
    connection.removeX11App(appName);
  }
}

Fixed version (ground truth):
/** 
 * Deletes an entry from the X11 Apps.
 */
private void handleDelete(HttpServletRequest request,HttpServletResponse response,ContentCollection xAppsCollection) throws ServletException, IOException, ContentRepositoryException {
  String path=request.getParameter("String_Node_Str");
  String appName=request.getParameter("String_Node_Str");
  ContentResource resource=getXAppResource(xAppsCollection,path);
  if (resource == null) {
    error(request,response,"String_Node_Str" + request.getPathInfo() + "String_Node_Str");
    return;
  }
  xAppsCollection.removeChild(resource.getName());
  Object obj=getServletContext().getAttribute(XAPPS_CONN_ATTR);
  if (obj != null) {
    XAppsWebConfigConnection connection=(XAppsWebConfigConnection)obj;
    connection.removeX11App(appName);
  }
  try {
    handleBrowse(request,response,xAppsCollection);
  }
 catch (  java.lang.Exception cre) {
    throw new ServletException(cre);
  }
}
Program: 45565
Project: 45565
Buggy source:
/** 
 * Handles the "check" action to map an app name to a command
 */
private void handleCheck(HttpServletRequest request,HttpServletResponse response,ContentCollection c) throws ServletException, IOException, ContentRepositoryException, JAXBException {
  String checkApp=request.getParameter("String_Node_Str");
  if (checkApp == null) {
    throw new ServletException("String_Node_Str");
  }
 else {
    checkApp=checkApp.trim();
  }
  Collection<X11AppEntry> entries=new ArrayList();
  for (  ContentNode child : c.getChildren()) {
    if (child instanceof ContentResource) {
      ContentResource resource=(ContentResource)child;
      String path=resource.getPath();
      Reader r=new InputStreamReader(resource.getInputStream());
      XAppRegistryItem item=XAppRegistryItem.decode(r);
      if (item.getAppName().equalsIgnoreCase(checkApp)) {
        response.setContentType("String_Node_Str");
        PrintWriter pr=new PrintWriter(response.getWriter());
        pr.println(item.getCommand());
        pr.close();
        break;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Handles the "check" action to map an app name to a command
 */
private void handleCheck(HttpServletRequest request,HttpServletResponse response,ContentCollection c) throws ServletException, IOException, ContentRepositoryException, JAXBException {
  String checkApp=request.getParameter("String_Node_Str");
  if (checkApp == null) {
    throw new ServletException("String_Node_Str");
  }
 else {
    checkApp=checkApp.trim();
  }
  for (  ContentNode child : c.getChildren()) {
    if (child instanceof ContentResource) {
      ContentResource resource=(ContentResource)child;
      Reader r=new InputStreamReader(resource.getInputStream());
      XAppRegistryItem item=XAppRegistryItem.decode(r);
      if (item.getAppName().equalsIgnoreCase(checkApp)) {
        response.setContentType("String_Node_Str");
        PrintWriter pr=new PrintWriter(response.getWriter());
        pr.println(item.getCommand());
        pr.close();
        break;
      }
    }
  }
}
Program: 45567
Project: 45567
Buggy source:
@Override public void disconnected(){
  super.disconnected();
  System.out.println("String_Node_Str");
  connected=false;
  removeDialogs();
  LocalAvatar avatar=((CellClientSession)session).getLocalAvatar();
  avatar.removeViewCellConfiguredListener(this);
  System.out.println("String_Node_Str");
  SoftphoneControlImpl.getInstance().removeSoftphoneListener(this);
  try {
    SoftphoneControlImpl.getInstance().sendCommandToSoftphone("String_Node_Str");
  }
 catch (  IOException e) {
    logger.warning("String_Node_Str" + e.getMessage());
  }
  notifyDisconnectListeners();
}

Fixed version (ground truth):
@Override public void disconnected(){
  super.disconnected();
  connected=false;
  removeDialogs();
  LocalAvatar avatar=((CellClientSession)session).getLocalAvatar();
  avatar.removeViewCellConfiguredListener(this);
  SoftphoneControlImpl.getInstance().removeSoftphoneListener(this);
  try {
    SoftphoneControlImpl.getInstance().sendCommandToSoftphone("String_Node_Str");
  }
 catch (  IOException e) {
    logger.warning("String_Node_Str" + e.getMessage());
  }
  notifyDisconnectListeners();
}
Program: 45568
Project: 45568
Buggy source:
@Override public void connect(WonderlandSession session) throws ConnectionFailureException {
  super.connect(session);
  this.session=session;
  pm=PresenceManagerFactory.getPresenceManager(session);
  LocalAvatar avatar=((CellClientSession)session).getLocalAvatar();
  avatar.addViewCellConfiguredListener(this);
  if (avatar.getViewCell() != null) {
    viewConfigured(avatar);
  }
  System.out.println("String_Node_Str");
  SoftphoneControlImpl.getInstance().addSoftphoneListener(this);
  AudioMenu.getAudioMenu(this).setEnabled(true);
  userListJMenuItem.setEnabled(true);
  audioProblemJFrame=new AudioProblemJFrame(this);
  connected=true;
}

Fixed version (ground truth):
@Override public void connect(WonderlandSession session) throws ConnectionFailureException {
  super.connect(session);
  this.session=session;
  pm=PresenceManagerFactory.getPresenceManager(session);
  LocalAvatar avatar=((CellClientSession)session).getLocalAvatar();
  avatar.addViewCellConfiguredListener(this);
  if (avatar.getViewCell() != null) {
    viewConfigured(avatar);
  }
  SoftphoneControlImpl.getInstance().addSoftphoneListener(this);
  AudioMenu.getAudioMenu(this).setEnabled(true);
  userListJMenuItem.setEnabled(true);
  audioProblemJFrame=new AudioProblemJFrame(this);
  connected=true;
}
Program: 45569
Project: 45569
Buggy source:
private void receive(CellMessage message){
  if (message instanceof AudioTreatmentDoneMessage) {
    addMenuItems(new String[]{PLAY,VOLUME});
    System.out.println("String_Node_Str");
    channelComp.send(new AudioTreatmentRequestMessage(cell.getCellID(),true,true));
    return;
  }
  if (message instanceof AudioTreatmentEndedMessage) {
    AudioTreatmentEndedMessage msg=(AudioTreatmentEndedMessage)message;
    LOGGER.warning("String_Node_Str" + msg.getReason());
    notifyTreatmentEnded(msg.getReason());
    return;
  }
  if (message instanceof AudioTreatmentEstablishedMessage) {
    LOGGER.warning("String_Node_Str");
    notifyTreatmentEstablished();
    return;
  }
  if (message instanceof AudioTreatmentMenuChangeMessage) {
    addMenuItems(((AudioTreatmentMenuChangeMessage)message).getMenuItems());
    return;
  }
  if (message instanceof AudioVolumeMessage) {
    float volume=(float)((AudioVolumeMessage)message).getVolume();
    LOGGER.fine("String_Node_Str" + volume);
    return;
  }
}

Fixed version (ground truth):
private void receive(CellMessage message){
  if (message instanceof AudioTreatmentDoneMessage) {
    addMenuItems(new String[]{PLAY,VOLUME});
    channelComp.send(new AudioTreatmentRequestMessage(cell.getCellID(),true,true));
    return;
  }
  if (message instanceof AudioTreatmentEndedMessage) {
    AudioTreatmentEndedMessage msg=(AudioTreatmentEndedMessage)message;
    LOGGER.warning("String_Node_Str" + msg.getReason());
    notifyTreatmentEnded(msg.getReason());
    return;
  }
  if (message instanceof AudioTreatmentEstablishedMessage) {
    LOGGER.warning("String_Node_Str");
    notifyTreatmentEstablished();
    return;
  }
  if (message instanceof AudioTreatmentMenuChangeMessage) {
    addMenuItems(((AudioTreatmentMenuChangeMessage)message).getMenuItems());
    return;
  }
  if (message instanceof AudioVolumeMessage) {
    float volume=(float)((AudioVolumeMessage)message).getVolume();
    LOGGER.fine("String_Node_Str" + volume);
    return;
  }
}
Program: 45570
Project: 45570
Buggy source:
public void speakerVuMeterValue(String value){
  double volume=Math.abs(Double.parseDouble(value));
  final double v=Math.round(Math.sqrt(volume) * 100) / 100D;
  java.awt.EventQueue.invokeLater(new Runnable(){
    public void run(){
      speakerMeter.setValue(v);
      if (v > speakerWarningLimit) {
        speakerMeterPanel.setBackground(overLimitColor);
      }
 else {
        speakerMeterPanel.setBackground(micPanelBackground);
      }
    }
  }
);
}

Fixed version (ground truth):
public void speakerVuMeterValue(String value){
  double volume=Math.abs(Double.parseDouble(value));
  final double v=Math.round(Math.sqrt(volume) * 100) / 100D;
  java.awt.EventQueue.invokeLater(new Runnable(){
    public void run(){
      speakerMeter.setValue(v);
      if (v > speakerWarningLimit) {
        speakerMeterPanel.setBackground(overLimitColor);
      }
 else {
        speakerMeterPanel.setBackground(speakerPanelBackground);
      }
    }
  }
);
}
Program: 45571
Project: 45571
Buggy source:
public VuMeterPanel(AudioManagerClient client){
  this.client=client;
  initComponents();
  micPanelBackground=micMeterPanel.getBackground();
  speakerPanelBackground=speakerMeterPanel.getBackground();
  micMutedIcon=new ImageIcon(getClass().getResource("String_Node_Str" + "String_Node_Str"));
  micUnmutedIcon=new ImageIcon(getClass().getResource("String_Node_Str" + "String_Node_Str"));
  speakerMutedIcon=new ImageIcon(getClass().getResource("String_Node_Str" + "String_Node_Str"));
  speakerUnmutedIcon=new ImageIcon(getClass().getResource("String_Node_Str" + "String_Node_Str"));
  volumeConverter=new VolumeConverter(micVolumeSlider.getMaximum());
  if (client != null) {
    client.addDisconnectListener(this);
  }
  micMeter=new VMeter("String_Node_Str");
  micMeter.setBackground(Color.WHITE);
  micMeter.setForeground(Color.DARK_GRAY);
  micMeter.setPreferredSize(micMeterPanel.getPreferredSize());
  micMeter.setShowValue(false);
  micMeter.setShowTicks(false);
  micMeter.setMaxValue(1D);
  micMeter.setWarningValue(micWarningLimit);
  micMeter.setVisible(true);
  micMeterPanel.add(micMeter);
  speakerMeter=new VMeter("String_Node_Str");
  speakerMeter.setBackground(Color.WHITE);
  speakerMeter.setForeground(Color.DARK_GRAY);
  speakerMeter.setPreferredSize(micMeterPanel.getPreferredSize());
  speakerMeter.setShowValue(false);
  speakerMeter.setShowTicks(false);
  speakerMeter.setMaxValue(1D);
  speakerMeter.setWarningValue(speakerWarningLimit);
  speakerMeter.setVisible(true);
  speakerMeterPanel.add(speakerMeter);
}

Fixed version (ground truth):
public VuMeterPanel(AudioManagerClient client){
  this.client=client;
  initComponents();
  micPanelBackground=micMeterPanel.getBackground();
  speakerPanelBackground=speakerMeterPanel.getBackground();
  micMutedIcon=new ImageIcon(getClass().getResource("String_Node_Str" + "String_Node_Str"));
  micUnmutedIcon=new ImageIcon(getClass().getResource("String_Node_Str" + "String_Node_Str"));
  speakerMutedIcon=new ImageIcon(getClass().getResource("String_Node_Str" + "String_Node_Str"));
  speakerUnmutedIcon=new ImageIcon(getClass().getResource("String_Node_Str" + "String_Node_Str"));
  volumeConverter=new VolumeConverter(micVolumeSlider.getMaximum());
  if (client != null) {
    client.addDisconnectListener(this);
  }
  micMeter=new VMeter("String_Node_Str");
  micMeter.setBackground(Color.WHITE);
  micMeter.setForeground(Color.DARK_GRAY);
  micMeter.setPreferredSize(micMeterPanel.getPreferredSize());
  micMeter.setShowValue(false);
  micMeter.setShowTicks(false);
  micMeter.setMaxValue(1D);
  micMeter.setWarningValue(micWarningLimit);
  micMeter.setVisible(true);
  micMeterPanel.add(micMeter);
  speakerMeter=new VMeter("String_Node_Str");
  speakerMeter.setBackground(Color.WHITE);
  speakerMeter.setForeground(Color.DARK_GRAY);
  speakerMeter.setPreferredSize(speakerMeterPanel.getPreferredSize());
  speakerMeter.setShowValue(false);
  speakerMeter.setShowTicks(false);
  speakerMeter.setMaxValue(1D);
  speakerMeter.setWarningValue(speakerWarningLimit);
  speakerMeter.setVisible(true);
  speakerMeterPanel.add(speakerMeter);
}
Program: 45572
Project: 45572
Buggy source:
/** 
 * Creates a new tree node for the given Cell and inserts it into the tree.
 */
private void createJTreeNode(Cell cell){
  SortedTreeNode ret=new SortedTreeNode(cell){
    @Override public String toString(){
      Cell cell=(Cell)getUserObject();
      return "String_Node_Str" + cell.getCellID().toString();
    }
  }
;
  cellNodes.put(cell,ret);
  SortedTreeNode parentNode=cellNodes.get(cell.getParent());
  if (parentNode == null) {
    parentNode=treeRoot;
  }
  parentNode.add(ret);
  DefaultTreeModel model=(DefaultTreeModel)cellHierarchyTree.getModel();
  int childIndex=parentNode.getIndex(ret);
  model.nodesWereInserted(parentNode,new int[]{childIndex});
  List<Cell> children=cell.getChildren();
  for (  Cell child : children) {
    createJTreeNode(child);
  }
}

Fixed version (ground truth):
/** 
 * Creates a new tree node for the given Cell and inserts it into the tree.
 */
private void createJTreeNode(Cell cell){
  if (cell instanceof AvatarCell) {
    return;
  }
  SortedTreeNode ret=new SortedTreeNode(cell){
    @Override public String toString(){
      Cell cell=(Cell)getUserObject();
      return "String_Node_Str" + cell.getCellID().toString();
    }
  }
;
  cellNodes.put(cell,ret);
  SortedTreeNode parentNode=cellNodes.get(cell.getParent());
  if (parentNode == null) {
    parentNode=treeRoot;
  }
  parentNode.add(ret);
  DefaultTreeModel model=(DefaultTreeModel)cellHierarchyTree.getModel();
  int childIndex=parentNode.getIndex(ret);
  model.nodesWereInserted(parentNode,new int[]{childIndex});
  List<Cell> children=cell.getChildren();
  for (  Cell child : children) {
    createJTreeNode(child);
  }
}
Program: 45573
Project: 45573
Buggy source:
/** 
 * Get the  cells from the cache and update the nodes in tree
 */
private void refreshCells(WonderlandSession session){
  CellCache cache=ClientContext.getCellCache(session);
  if (cache == null) {
    LOGGER.warning("String_Node_Str" + session);
    return;
  }
  treeRoot=new SortedTreeNode(BUNDLE.getString("String_Node_Str"));
  DefaultTreeModel treeModel=new DefaultTreeModel(treeRoot);
  cellHierarchyTree.setModel(treeModel);
  cellNodes.clear();
  Collection<Cell> rootCells=cache.getRootCells();
  for (  Cell rootCell : rootCells) {
    if (rootCell instanceof AvatarCell) {
      continue;
    }
    createJTreeNode(rootCell);
  }
  cellHierarchyTree.repaint();
}

Fixed version (ground truth):
/** 
 * Get the  cells from the cache and update the nodes in tree
 */
private void refreshCells(WonderlandSession session){
  CellCache cache=ClientContext.getCellCache(session);
  if (cache == null) {
    LOGGER.warning("String_Node_Str" + session);
    return;
  }
  treeRoot=new SortedTreeNode(BUNDLE.getString("String_Node_Str"));
  DefaultTreeModel treeModel=new DefaultTreeModel(treeRoot);
  cellHierarchyTree.setModel(treeModel);
  cellNodes.clear();
  Collection<Cell> rootCells=cache.getRootCells();
  for (  Cell rootCell : rootCells) {
    createJTreeNode(rootCell);
  }
  cellHierarchyTree.repaint();
}
Program: 45574
Project: 45574
Buggy source:
public void removeAudioTreatmentComponentMO(CellMO cellMO,AudioTreatmentComponentMO audioTreatmentComponentMO){
  if (proximityListener == null) {
    return;
  }
  audioTreatmentComponentMO.setSpatializer(false);
  proximityListener.cellExited(cellMO.getCellID());
}

Fixed version (ground truth):
public void removeAudioTreatmentComponentMO(CellMO cellMO,AudioTreatmentComponentMO audioTreatmentComponentMO){
  if (proximityListenerRef == null) {
    return;
  }
  audioTreatmentComponentMO.setSpatializer(false);
  proximityListenerRef.get().cellExited(cellMO.getCellID());
}
Program: 45575
Project: 45575
Buggy source:
private void addProximityListener(boolean live){
  ProximityComponentMO component=cellRef.get().getComponent(ProximityComponentMO.class);
  if (component == null) {
    logger.warning("String_Node_Str" + "String_Node_Str" + cellID);
    return;
  }
  if (proximityListener != null) {
    proximityListener.remove();
    component.removeProximityListener(proximityListener);
  }
  if (live == true) {
    BoundingVolume[] boundingVolume=new BoundingVolume[1];
    if (boundsType.equals(COSBoundsType.CELL_BOUNDS)) {
      boundingVolume[0]=cellRef.get().getLocalBounds();
      logger.warning("String_Node_Str" + boundingVolume[0]);
    }
 else     if (boundsType.equals(COSBoundsType.BOX)) {
      boundingVolume[0]=new BoundingBox(new Vector3f(),bounds.getX(),bounds.getY(),bounds.getZ());
      logger.warning("String_Node_Str" + boundingVolume[0]);
    }
 else {
      boundingVolume[0]=new BoundingSphere(bounds.getX(),new Vector3f());
      logger.warning("String_Node_Str" + boundingVolume[0]);
    }
    proximityListener=new ConeOfSilenceProximityListener(cellRef.get(),name,outsideAudioVolume);
    component.addProximityListener(proximityListener,boundingVolume);
  }
 else {
    proximityListener=null;
  }
}

Fixed version (ground truth):
private void addProximityListener(boolean live){
  ProximityComponentMO component=cellRef.get().getComponent(ProximityComponentMO.class);
  if (component == null) {
    logger.warning("String_Node_Str" + "String_Node_Str" + cellID);
    return;
  }
  if (proximityListenerRef != null) {
    ConeOfSilenceProximityListener proximityListener=proximityListenerRef.get();
    proximityListener.remove();
    component.removeProximityListener(proximityListener);
    proximityListenerRef=null;
  }
  if (live == true) {
    BoundingVolume[] boundingVolume=new BoundingVolume[1];
    if (boundsType.equals(COSBoundsType.CELL_BOUNDS)) {
      boundingVolume[0]=cellRef.get().getLocalBounds();
      logger.warning("String_Node_Str" + boundingVolume[0]);
      System.out.println("String_Node_Str" + boundingVolume[0]);
    }
 else     if (boundsType.equals(COSBoundsType.BOX)) {
      boundingVolume[0]=new BoundingBox(new Vector3f(),bounds.getX(),bounds.getY(),bounds.getZ());
      logger.warning("String_Node_Str" + boundingVolume[0]);
      System.out.println("String_Node_Str" + boundingVolume[0]);
    }
 else {
      boundingVolume[0]=new BoundingSphere(bounds.getX(),new Vector3f());
      logger.warning("String_Node_Str" + boundingVolume[0]);
      System.out.println("String_Node_Str" + boundingVolume[0]);
    }
    ConeOfSilenceProximityListener proximityListener=new ConeOfSilenceProximityListener(cellRef.get(),name,outsideAudioVolume);
    proximityListenerRef=AppContext.getDataManager().createReference(proximityListener);
    component.addProximityListener(proximityListener,boundingVolume);
  }
}
Program: 45576
Project: 45576
Buggy source:
public void addAudioTreatmentComponentMO(CellMO cellMO,AudioTreatmentComponentMO audioTreatmentComponentMO){
  if (proximityListener == null) {
    return;
  }
  audioTreatmentComponentMO.setSpatializer(true);
  proximityListener.cellEntered(cellMO.getCellID());
}

Fixed version (ground truth):
public void addAudioTreatmentComponentMO(CellMO cellMO,AudioTreatmentComponentMO audioTreatmentComponentMO){
  if (proximityListenerRef == null) {
    return;
  }
  audioTreatmentComponentMO.setSpatializer(true);
  proximityListenerRef.get().cellEntered(cellMO.getCellID());
}
Program: 45577
Project: 45577
Buggy source:
public void viewEnterExit(boolean entered,CellID cellID,CellID viewCellID,BoundingVolume proximityVolume,int proximityIndex){
  logger.info("String_Node_Str" + entered + "String_Node_Str"+ cellID+ "String_Node_Str"+ viewCellID);
  this.entered=entered;
  this.callID=CallID.getCallID(viewCellID);
  if (entered) {
    cellEntered(viewCellID);
  }
 else {
    cellExited(viewCellID);
  }
}

Fixed version (ground truth):
public void viewEnterExit(boolean entered,CellID cellID,CellID viewCellID,BoundingVolume proximityVolume,int proximityIndex){
  logger.info("String_Node_Str" + entered + "String_Node_Str"+ cellID+ "String_Node_Str"+ viewCellID);
  System.out.println("String_Node_Str" + entered + "String_Node_Str"+ cellID+ "String_Node_Str"+ viewCellID+ "String_Node_Str"+ proximityVolume);
  this.entered=entered;
  this.callID=CallID.getCallID(viewCellID);
  if (entered) {
    cellEntered(viewCellID);
  }
 else {
    cellExited(viewCellID);
  }
}
Program: 45578
Project: 45578
Buggy source:
private void cellEntered(String 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 setup=new AudioGroupSetup();
    setup.audioGroupListener=this;
    setup.spatializer=new FullVolumeSpatializer();
    setup.spatializer.setAttenuator(Spatializer.DEFAULT_MAXIMUM_VOLUME);
    audioGroup=vm.createAudioGroup(name,setup);
  }
  boolean isSpeaking=(inPrivateChat(audioGroup,player) == false);
  audioGroup.addPlayer(player,new AudioGroupPlayerInfo(isSpeaking,AudioGroupPlayerInfo.ChatType.PRIVATE));
  WonderlandClientSender sender=WonderlandContext.getCommsManager().getSender(AudioManagerConnectionType.CONNECTION_TYPE);
  sender.send(new ConeOfSilenceEnterExitMessage(name,callId,true));
}

Fixed version (ground truth):
private void cellEntered(String callId){
  VoiceManager vm=AppContext.getManager(VoiceManager.class);
  Player player=vm.getPlayer(callId);
  System.out.println(callId + "String_Node_Str" + name+ "String_Node_Str"+ player);
  if (player == null) {
    logger.warning("String_Node_Str" + callId);
    return;
  }
  AudioGroup audioGroup=vm.getAudioGroup(name);
  if (audioGroup == null) {
    AudioGroupSetup setup=new AudioGroupSetup();
    setup.audioGroupListener=this;
    setup.spatializer=new FullVolumeSpatializer();
    setup.spatializer.setAttenuator(Spatializer.DEFAULT_MAXIMUM_VOLUME);
    audioGroup=vm.createAudioGroup(name,setup);
  }
  boolean isSpeaking=(inPrivateChat(audioGroup,player) == false);
  audioGroup.addPlayer(player,new AudioGroupPlayerInfo(isSpeaking,AudioGroupPlayerInfo.ChatType.PRIVATE));
  WonderlandClientSender sender=WonderlandContext.getCommsManager().getSender(AudioManagerConnectionType.CONNECTION_TYPE);
  sender.send(new ConeOfSilenceEnterExitMessage(name,callId,true));
}
Program: 45579
Project: 45579
Buggy source:
private 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(name,callId,false));
}

Fixed version (ground truth):
private void cellExited(String callId){
  logger.info(callId + "String_Node_Str" + name+ "String_Node_Str"+ callId);
  System.out.println(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(name,callId,false));
}
Program: 45580
Project: 45580
Buggy source:
@Override public void disconnected(){
  super.disconnected();
  LocalAvatar avatar=((CellClientSession)session).getLocalAvatar();
  avatar.removeViewCellConfiguredListener(this);
  SoftphoneControlImpl.getInstance().removeSoftphoneListener(this);
  SoftphoneControlImpl.getInstance().sendCommandToSoftphone("String_Node_Str");
  notifyDisconnectListeners();
}

Fixed version (ground truth):
@Override public void disconnected(){
  super.disconnected();
  removeDialogs();
  LocalAvatar avatar=((CellClientSession)session).getLocalAvatar();
  avatar.removeViewCellConfiguredListener(this);
  SoftphoneControlImpl.getInstance().removeSoftphoneListener(this);
  SoftphoneControlImpl.getInstance().sendCommandToSoftphone("String_Node_Str");
  notifyDisconnectListeners();
}
Program: 45581
Project: 45581
Buggy source:
private void notifyDisconnectListeners(){
  for (  DisconnectListener listener : disconnectListeners) {
    listener.disconnected();
  }
}

Fixed version (ground truth):
private void notifyDisconnectListeners(){
  DisconnectListener[] listeners=disconnectListeners.toArray(new DisconnectListener[0]);
  for (  DisconnectListener listener : listeners) {
    listener.disconnected();
  }
}
Program: 45582
Project: 45582
Buggy source:
public void init(RenderBuffer arg0){
  logger.info("String_Node_Str");
  waitForReady.release();
  canvas.setIgnoreRepaint(true);
}

Fixed version (ground truth):
public void init(RenderBuffer arg0){
  logger.info("String_Node_Str");
  waitForReady.release();
}