nus-yam/ex-repair huggingface dataset:
Program: 28313
Project: 28313
Buggy source:
/** 
 * Get the Permissions for a CodeSource.  If this instance of WebappClassLoader is for a web application context, add read FilePermission or JndiPermissions for the base directory (if unpacked), the context URL, and jar file resources.
 * @param codeSource where the code was loaded from
 * @return PermissionCollection for CodeSource
 */
@Override protected PermissionCollection getPermissions(CodeSource codeSource){
  String codeUrl=codeSource.getLocation().toString();
  PermissionCollection pc=loaderPC.get(codeUrl);
  if (pc == null) {
    pc=new Permissions();
    PermissionCollection spc=super.getPermissions(codeSource);
    if (spc != null) {
      Enumeration<Permission> perms=spc.elements();
      while (perms.hasMoreElements()) {
        Permission p=perms.nextElement();
        pc.add(p);
      }
    }
    Iterator<Permission> perms=permissionList.iterator();
    while (perms.hasNext()) {
      Permission p=perms.next();
      pc.add(p);
    }
    PermissionCollection pc1=permissionsHolder.getPermissions(codeSource,null);
    if (pc1 != null) {
      Enumeration<Permission> dperms=pc1.elements();
      while (dperms.hasMoreElements()) {
        Permission p=dperms.nextElement();
        pc.add(p);
      }
    }
    PermissionCollection tmpPc=loaderPC.putIfAbsent(codeUrl,pc);
    if (tmpPc != null) {
      pc=tmpPc;
    }
  }
  return (pc);
}

Fixed version (ground truth):
/** 
 * Get the Permissions for a CodeSource.  If this instance of WebappClassLoader is for a web application context, add read FilePermission or JndiPermissions for the base directory (if unpacked), the context URL, and jar file resources.
 * @param codeSource where the code was loaded from
 * @return PermissionCollection for CodeSource
 */
@Override protected PermissionCollection getPermissions(CodeSource codeSource){
  String codeUrl=codeSource.getLocation().toString();
  PermissionCollection pc=loaderPC.get(codeUrl);
  if (pc == null) {
    pc=new Permissions();
    PermissionCollection spc=super.getPermissions(codeSource);
    Enumeration<Permission> permsa=spc.elements();
    while (permsa.hasMoreElements()) {
      Permission p=permsa.nextElement();
      pc.add(p);
    }
    Iterator<Permission> perms=permissionList.iterator();
    while (perms.hasNext()) {
      Permission p=perms.next();
      pc.add(p);
    }
    PermissionCollection pc1=permissionsHolder.getPermissions(codeSource,null);
    if (pc1 != null) {
      Enumeration<Permission> dperms=pc1.elements();
      while (dperms.hasMoreElements()) {
        Permission p=dperms.nextElement();
        pc.add(p);
      }
    }
    PermissionCollection tmpPc=loaderPC.putIfAbsent(codeUrl,pc);
    if (tmpPc != null) {
      pc=tmpPc;
    }
  }
  return (pc);
}
Program: 28314
Project: 28314
Buggy source:
@Override protected PermissionCollection getPermissions(CodeSource codeSource){
  String codeUrl=codeSource.getLocation().toString();
  PermissionCollection cachedPc=permissionsHolder.getCachedPerms(codeSource);
  if (cachedPc != null)   return cachedPc;
  return permissionsHolder.getPermissions(codeSource,super.getPermissions(codeSource));
}

Fixed version (ground truth):
@Override protected PermissionCollection getPermissions(CodeSource codeSource){
  PermissionCollection cachedPc=permissionsHolder.getCachedPerms(codeSource);
  if (cachedPc != null)   return cachedPc;
  return permissionsHolder.getPermissions(codeSource,super.getPermissions(codeSource));
}
Program: 28315
Project: 28315
Buggy source:
public PermissionCollection newPermissionCollection(){
  return new SecurityAccessPermissionCollection(this.getClass(),logger,localStrings);
}

Fixed version (ground truth):
public PermissionCollection newPermissionCollection(){
  return new SecurityAccessPermissionCollection(this.getClass(),_log,localStrings);
}
Program: 28316
Project: 28316
Buggy source:
private boolean isUserSmfAuthorized(final String user,final StringBuilder auths){
  boolean authorized=false;
  String path2Auths="String_Node_Str";
  String at="String_Node_Str";
  final String AUTH1="String_Node_Str";
  final String AUTH2="String_Node_Str";
  final String AUTH3="String_Node_Str";
  if (System.getProperty("String_Node_Str") != null)   path2Auths=System.getProperty("String_Node_Str");
  if (System.getProperty("String_Node_Str") != null)   at=System.getProperty("String_Node_Str");
  try {
    final String[] cmd=new String[]{path2Auths,user};
    ProcessExecutor pe=new ProcessExecutor(cmd);
    pe.setExecutionRetentionFlag(true);
    pe.execute();
    auths.append(pe.getLastExecutionOutput());
    final StringTokenizer st=new StringTokenizer(pe.getLastExecutionOutput(),at);
    while (st.hasMoreTokens()) {
      String t=st.nextToken();
      if (t != null)       t=t.trim();
      if (AUTH1.equals(t) || AUTH2.equals(t) || AUTH3.equals(t)) {
        authorized=true;
        break;
      }
    }
    return (authorized);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
private boolean isUserSmfAuthorized(final String user,final StringBuilder auths){
  boolean authorized=false;
  String path2Auths="String_Node_Str";
  String at="String_Node_Str";
  final String AUTH1="String_Node_Str";
  final String AUTH2="String_Node_Str";
  final String AUTH3="String_Node_Str";
  if (System.getProperty("String_Node_Str") != null)   path2Auths=System.getProperty("String_Node_Str");
  if (System.getProperty("String_Node_Str") != null)   at=System.getProperty("String_Node_Str");
  try {
    final String[] cmd=new String[]{path2Auths,user};
    ProcessExecutor pe=new ProcessExecutor(cmd);
    pe.setExecutionRetentionFlag(true);
    pe.execute();
    auths.append(pe.getLastExecutionOutput());
    final StringTokenizer st=new StringTokenizer(pe.getLastExecutionOutput(),at);
    while (st.hasMoreTokens()) {
      String t=st.nextToken();
      t=t.trim();
      if (AUTH1.equals(t) || AUTH2.equals(t) || AUTH3.equals(t)) {
        authorized=true;
        break;
      }
    }
    return (authorized);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}
Program: 28318
Project: 28318
Buggy source:
/** 
 * Gets the list of child files. If the given file is a directory then all the files under directory and sub-directories will be retrieved recursively.
 * @param rootfile
 * @return
 */
public List<File> getAllChildFiles(File rootfile){
  List<File> retFiles=new LinkedList<File>();
  if (!rootfile.exists()) {
    _log.log(Level.INFO,SLogger.INVALID_FILE_LOCATION,rootfile.getAbsolutePath());
  }
 else   if (!rootfile.isDirectory()) {
    retFiles.add(rootfile);
  }
 else {
    File files[]=rootfile.listFiles();
    for (    File file : files) {
      retFiles.addAll(getAllChildFiles(file));
    }
  }
  return retFiles;
}

Fixed version (ground truth):
/** 
 * Gets the list of child files. If the given file is a directory then all the files under directory and sub-directories will be retrieved recursively.
 * @param rootfile
 * @return List<File>
 */
public List<File> getAllChildFiles(File rootfile){
  List<File> retFiles=new LinkedList<File>();
  if (!rootfile.exists()) {
    _log.log(Level.INFO,SLogger.INVALID_FILE_LOCATION,rootfile.getAbsolutePath());
  }
 else   if (!rootfile.isDirectory()) {
    retFiles.add(rootfile);
  }
 else {
    File files[]=rootfile.listFiles();
    for (    File file : files) {
      retFiles.addAll(getAllChildFiles(file));
    }
  }
  return retFiles;
}
Program: 28322
Project: 28322
Buggy source:
@Override public void initialize() throws LifecycleException {
  if (mapper == null) {
    mapper=new V3Mapper();
  }
  super.initialize();
  ((V3Mapper)mapper).setHttpHandler(getHandler());
}

Fixed version (ground truth):
@Override public void initialize() throws LifecycleException {
  V3Mapper v3Mapper=null;
  if (mapper == null) {
    v3Mapper=new V3Mapper();
    mapper=v3Mapper;
  }
  super.initialize();
  if (v3Mapper != null) {
    v3Mapper.setHttpHandler(getHandler());
  }
 else   if (mapper instanceof V3Mapper) {
    ((V3Mapper)mapper).setHttpHandler(getHandler());
  }
}
Program: 28323
Project: 28323
Buggy source:
@Override public ServerSocket createServerSocket(int port) throws IOException {
  if (socketMap.containsKey(port)) {
    return (ServerSocket)socketMap.get(port);
  }
  final int backlog=5;
  final JMXSslConfigHolder sslConfigHolder;
  try {
    sslConfigHolder=new JMXSslConfigHolder(habitat,ssl);
  }
 catch (  SSLException ssle) {
    throw new IllegalStateException(ssle);
  }
  final SSLContext context=sslConfigHolder.getSslContext();
  SSLServerSocket sslSocket=(SSLServerSocket)context.getServerSocketFactory().createServerSocket(port,backlog,mAddress);
  configureSSLSocket(sslSocket,sslConfigHolder);
  Util.getLogger().log(Level.INFO,createdServerSocket,new Object[]{sslSocket.getLocalSocketAddress(),sslSocket.toString()});
  socketMap.put(port,sslSocket);
  return sslSocket;
}

Fixed version (ground truth):
@Override public ServerSocket createServerSocket(int port) throws IOException {
  if (socketMap.containsKey(port)) {
    return (ServerSocket)socketMap.get(port);
  }
  final int backlog=5;
  final JMXSslConfigHolder sslConfigHolder;
  try {
    sslConfigHolder=new JMXSslConfigHolder(habitat,ssl);
  }
 catch (  SSLException ssle) {
    throw new IllegalStateException(ssle);
  }
  final SSLContext context=sslConfigHolder.getSslContext();
  ServerSocket sslSocket=context.getServerSocketFactory().createServerSocket(port,backlog,mAddress);
  if (!(sslSocket instanceof SSLServerSocket)) {
    throw new IllegalStateException("String_Node_Str");
  }
  configureSSLSocket((SSLServerSocket)sslSocket,sslConfigHolder);
  Util.getLogger().log(Level.INFO,createdServerSocket,new Object[]{sslSocket.getLocalSocketAddress(),sslSocket.toString()});
  socketMap.put(port,sslSocket);
  return sslSocket;
}
Program: 28324
Project: 28324
Buggy source:
/** 
 * receives notiification of the value for a particular tag
 * @param element the xml element
 * @param value it's associated value
 */
@Override public void setElementValue(XMLElement element,String value){
  if (RuntimeTagNames.EJB_REFERENCE_NAME.equals(element.getQName())) {
    Object parentDesc=getParentNode().getDescriptor();
    if (parentDesc instanceof EjbReferenceContainer) {
      try {
        descriptor=((EjbReferenceContainer)parentDesc).getEjbReference(value);
        DOLUtils.getDefaultLogger().finer("String_Node_Str" + descriptor);
      }
 catch (      IllegalArgumentException iae) {
        DOLUtils.getDefaultLogger().warning(iae.getMessage());
      }
    }
    if (descriptor == null) {
      DOLUtils.getDefaultLogger().log(Level.SEVERE,"String_Node_Str",new Object[]{"String_Node_Str",value});
    }
  }
 else {
    super.setElementValue(element,value);
  }
}

Fixed version (ground truth):
/** 
 * receives notiification of the value for a particular tag
 * @param element the xml element
 * @param value it's associated value
 */
@Override public void setElementValue(XMLElement element,String value){
  if (RuntimeTagNames.EJB_REFERENCE_NAME.equals(element.getQName())) {
    Object parentDesc=getParentNode().getDescriptor();
    Logger logger=DOLUtils.getDefaultLogger();
    if (parentDesc instanceof EjbReferenceContainer) {
      try {
        descriptor=((EjbReferenceContainer)parentDesc).getEjbReference(value);
        if (logger.isLoggable(Level.FINER)) {
          logger.finer("String_Node_Str" + descriptor);
        }
      }
 catch (      IllegalArgumentException iae) {
        logger.warning(iae.getMessage());
      }
    }
    if (descriptor == null) {
      logger.log(Level.SEVERE,"String_Node_Str",new Object[]{"String_Node_Str",value});
    }
  }
 else {
    super.setElementValue(element,value);
  }
}
Program: 28326
Project: 28326
Buggy source:
@Override protected int executeCommand() throws CommandException {
  try {
    nodeDir=nodeDir0;
    node=node0;
    File serverDir=new File(nodeDir,node);
    if (serverDir == null || !serverDir.isDirectory()) {
      throw new CommandException(strings.get("String_Node_Str",serverDir));
    }
    ArrayList<String> serverNames=getInstanceDirs(serverDir);
    for (    String serverName : serverNames)     if (isRunning(serverDir,serverName))     throw new CommandException(strings.get("String_Node_Str",serverName));
    oldPassword=passwords.get("String_Node_Str");
    if (oldPassword == null) {
      oldPassword=super.readPassword(strings.get("String_Node_Str"));
    }
    if (oldPassword == null)     throw new CommandException(strings.get("String_Node_Str"));
    boolean valid=true;
    for (    String instanceDir0 : getInstanceDirs(nodeDirChild)) {
      valid&=verifyInstancePassword(new File(nodeDirChild,instanceDir0));
    }
    if (!valid) {
      throw new CommandException(strings.get("String_Node_Str"));
    }
    ParamModelData nmpo=new ParamModelData("String_Node_Str",String.class,false,null);
    nmpo.prompt=strings.get("String_Node_Str");
    nmpo.promptAgain=strings.get("String_Node_Str");
    nmpo.param._password=true;
    newPassword=super.getPassword(nmpo,null,true);
    for (    String instanceDir2 : getInstanceDirs(nodeDirChild)) {
      encryptKeystore(instanceDir2);
    }
    if (savemp) {
      createMasterPasswordFile();
    }
    return 0;
  }
 catch (  Exception e) {
    throw new CommandException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override protected int executeCommand() throws CommandException {
  try {
    nodeDir=nodeDir0;
    node=node0;
    File serverDir=new File(nodeDir,node);
    if (!serverDir.isDirectory()) {
      throw new CommandException(strings.get("String_Node_Str",serverDir));
    }
    ArrayList<String> serverNames=getInstanceDirs(serverDir);
    for (    String serverName : serverNames)     if (isRunning(serverDir,serverName))     throw new CommandException(strings.get("String_Node_Str",serverName));
    oldPassword=passwords.get("String_Node_Str");
    if (oldPassword == null) {
      oldPassword=super.readPassword(strings.get("String_Node_Str"));
    }
    if (oldPassword == null)     throw new CommandException(strings.get("String_Node_Str"));
    boolean valid=true;
    for (    String instanceDir0 : getInstanceDirs(nodeDirChild)) {
      valid&=verifyInstancePassword(new File(nodeDirChild,instanceDir0));
    }
    if (!valid) {
      throw new CommandException(strings.get("String_Node_Str"));
    }
    ParamModelData nmpo=new ParamModelData("String_Node_Str",String.class,false,null);
    nmpo.prompt=strings.get("String_Node_Str");
    nmpo.promptAgain=strings.get("String_Node_Str");
    nmpo.param._password=true;
    newPassword=super.getPassword(nmpo,null,true);
    for (    String instanceDir2 : getInstanceDirs(nodeDirChild)) {
      encryptKeystore(instanceDir2);
    }
    if (savemp) {
      createMasterPasswordFile();
    }
    return 0;
  }
 catch (  Exception e) {
    throw new CommandException(e.getMessage(),e);
  }
}
Program: 28328
Project: 28328
Buggy source:
private void unpackOnHosts(String host,String remotePassword,String unpackScript) throws WindowsException, CommandException {
  String domain=windowsDomain;
  if (!ok(domain))   domain=host;
  WindowsCredentials bonafides=new WindowsCredentials(host,domain,getRemoteUser(),remotePassword);
  WindowsRemoteScripter scripter=new WindowsRemoteScripter(bonafides);
  String out=scripter.run(unpackScript);
  if (out == null || out.length() < 50)   throw new CommandException(Strings.get("String_Node_Str",unpackScript,out));
  logger.fine("String_Node_Str" + out);
}

Fixed version (ground truth):
private void unpackOnHosts(String host,String remotePassword,String unpackScript) throws WindowsException, CommandException {
  String domain=windowsDomain;
  if (!ok(domain))   domain=host;
  WindowsCredentials bonafides=new WindowsCredentials(host,domain,getRemoteUser(),remotePassword);
  WindowsRemoteScripter scripter=new WindowsRemoteScripter(bonafides);
  String out=scripter.run(unpackScript);
  if (out == null || out.length() < 50)   throw new CommandException(Strings.get("String_Node_Str",unpackScript,out));
  if (logger.isLoggable(Level.FINE))   logger.fine("String_Node_Str" + out);
}
Program: 28329
Project: 28329
Buggy source:
private void copyToHostsInternal(File zipFile,ArrayList<String> binDirFiles) throws CommandException, WindowsException {
  final String zipFileName="String_Node_Str";
  final String unpackScriptName="String_Node_Str";
  for (  String host : hosts) {
    String remotePassword=getPassword(host);
    WindowsRemoteFileSystem wrfs=new WindowsRemoteFileSystem(host,getRemoteUser(),remotePassword);
    WindowsRemoteFile remoteInstallDir=new WindowsRemoteFile(wrfs,remoteInstallDirString);
    remoteInstallDir.mkdirs(getForce());
    WindowsRemoteFile remoteZip=new WindowsRemoteFile(remoteInstallDir,zipFileName);
    WindowsRemoteFile unpackScript=new WindowsRemoteFile(remoteInstallDir,unpackScriptName);
    System.out.printf("String_Node_Str",zipFile.length());
    remoteZip.copyFrom(zipFile,new RemoteFileCopyProgress(){
      @Override public void callback(      long numcopied,      long numtotal){
        System.out.print("String_Node_Str");
      }
      @Override public int getChunkSize(){
        return 1048576;
      }
    }
);
    System.out.println("String_Node_Str");
    String fullZipFileName=remoteInstallDirString + "String_Node_Str" + zipFileName;
    String fullUnpackScriptPath=remoteInstallDirString + "String_Node_Str" + unpackScriptName;
    unpackScript.copyFrom(makeScriptString(remoteInstallDirString,zipFileName));
    logger.fine("String_Node_Str" + fullZipFileName + "String_Node_Str"+ fullUnpackScriptPath);
    unpackOnHosts(host,remotePassword,fullUnpackScriptPath.replace('/','\\'));
  }
}

Fixed version (ground truth):
private void copyToHostsInternal(File zipFile,ArrayList<String> binDirFiles) throws CommandException, WindowsException {
  final String zipFileName="String_Node_Str";
  final String unpackScriptName="String_Node_Str";
  for (  String host : hosts) {
    String remotePassword=getPassword(host);
    WindowsRemoteFileSystem wrfs=new WindowsRemoteFileSystem(host,getRemoteUser(),remotePassword);
    WindowsRemoteFile remoteInstallDir=new WindowsRemoteFile(wrfs,remoteInstallDirString);
    remoteInstallDir.mkdirs(getForce());
    WindowsRemoteFile remoteZip=new WindowsRemoteFile(remoteInstallDir,zipFileName);
    WindowsRemoteFile unpackScript=new WindowsRemoteFile(remoteInstallDir,unpackScriptName);
    System.out.printf("String_Node_Str",zipFile.length());
    remoteZip.copyFrom(zipFile,new RemoteFileCopyProgress(){
      @Override public void callback(      long numcopied,      long numtotal){
        System.out.print("String_Node_Str");
      }
      @Override public int getChunkSize(){
        return 1048576;
      }
    }
);
    System.out.println("String_Node_Str");
    String fullZipFileName=remoteInstallDirString + "String_Node_Str" + zipFileName;
    String fullUnpackScriptPath=remoteInstallDirString + "String_Node_Str" + unpackScriptName;
    unpackScript.copyFrom(makeScriptString(remoteInstallDirString,zipFileName));
    if (logger.isLoggable(Level.FINE))     logger.fine("String_Node_Str" + fullZipFileName + "String_Node_Str"+ fullUnpackScriptPath);
    unpackOnHosts(host,remotePassword,fullUnpackScriptPath.replace('/','\\'));
  }
}
Program: 28331
Project: 28331
Buggy source:
/** 
 * Determines if GlassFish is installed on remote host at specified location. Uses SSH launcher to execute 'asadmin version'
 * @param host remote host
 * @throws CommandException
 * @throws IOException
 * @throws InterruptedException
 */
private void checkIfAlreadyInstalled(String host,String sshInstallDir) throws CommandException, IOException, InterruptedException {
  ByteArrayOutputStream outStream=new ByteArrayOutputStream();
  try {
    String asadmin=Constants.v4 ? "String_Node_Str" : "String_Node_Str";
    String cmd="String_Node_Str" + sshInstallDir + "String_Node_Str"+ SystemPropertyConstants.getComponentName()+ asadmin;
    int status=sshLauncher.runCommand(cmd,outStream);
    if (status == 0) {
      logger.finer(host + "String_Node_Str" + cmd+ "String_Node_Str"+ "String_Node_Str"+ outStream.toString()+ "String_Node_Str");
      throw new CommandException(Strings.get("String_Node_Str",sshInstallDir));
    }
 else {
      logger.finer(host + "String_Node_Str" + cmd+ "String_Node_Str"+ "String_Node_Str"+ outStream.toString()+ "String_Node_Str");
    }
  }
 catch (  IOException ex) {
    logger.info(Strings.get("String_Node_Str",host));
    throw new IOException(ex);
  }
}

Fixed version (ground truth):
/** 
 * Determines if GlassFish is installed on remote host at specified location. Uses SSH launcher to execute 'asadmin version'
 * @param host remote host
 * @throws CommandException
 * @throws IOException
 * @throws InterruptedException
 */
private void checkIfAlreadyInstalled(String host,String sshInstallDir) throws CommandException, IOException, InterruptedException {
  ByteArrayOutputStream outStream=new ByteArrayOutputStream();
  try {
    String asadmin=Constants.v4 ? "String_Node_Str" : "String_Node_Str";
    String cmd="String_Node_Str" + sshInstallDir + "String_Node_Str"+ SystemPropertyConstants.getComponentName()+ asadmin;
    int status=sshLauncher.runCommand(cmd,outStream);
    if (status == 0) {
      if (logger.isLoggable(Level.FINER))       logger.finer(host + "String_Node_Str" + cmd+ "String_Node_Str"+ "String_Node_Str"+ outStream.toString()+ "String_Node_Str");
      throw new CommandException(Strings.get("String_Node_Str",sshInstallDir));
    }
 else {
      if (logger.isLoggable(Level.FINER))       logger.finer(host + "String_Node_Str" + cmd+ "String_Node_Str"+ "String_Node_Str"+ outStream.toString()+ "String_Node_Str");
    }
  }
 catch (  IOException ex) {
    logger.info(Strings.get("String_Node_Str",host));
    throw new IOException(ex);
  }
}
Program: 28333
Project: 28333
Buggy source:
/** 
 * This method first obtains a list of files under the product installation directory. It then modifies each path by prepending it with remote install dir path. For ex. glassfish/lib/appserv-rt.jar becomes <remote-install-path>/glassfish/lib/appserv-rt.jar
 * @return List of files and directories
 * @throws IOException
 */
List<String> getListOfInstallFiles(String installDir) throws IOException {
  String ins=resolver.resolve("String_Node_Str");
  Set files=FileUtils.getAllFilesAndDirectoriesUnder(new File(ins));
  logger.finer("String_Node_Str" + ins + "String_Node_Str"+ files.size());
  String remoteDir=installDir;
  if (!installDir.endsWith("String_Node_Str")) {
    remoteDir=remoteDir + "String_Node_Str";
  }
  List<String> modList=new ArrayList<String>();
  for (  Object f : files) {
    modList.add(remoteDir + FileUtils.makeForwardSlashes(((File)f).getPath()));
  }
  return modList;
}

Fixed version (ground truth):
/** 
 * This method first obtains a list of files under the product installation directory. It then modifies each path by prepending it with remote install dir path. For ex. glassfish/lib/appserv-rt.jar becomes <remote-install-path>/glassfish/lib/appserv-rt.jar
 * @return List of files and directories
 * @throws IOException
 */
List<String> getListOfInstallFiles(String installDir) throws IOException {
  String ins=resolver.resolve("String_Node_Str");
  Set files=FileUtils.getAllFilesAndDirectoriesUnder(new File(ins));
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + ins + "String_Node_Str"+ files.size());
  String remoteDir=installDir;
  if (!installDir.endsWith("String_Node_Str")) {
    remoteDir=remoteDir + "String_Node_Str";
  }
  List<String> modList=new ArrayList<String>();
  for (  Object f : files) {
    modList.add(remoteDir + FileUtils.makeForwardSlashes(((File)f).getPath()));
  }
  return modList;
}
Program: 28334
Project: 28334
Buggy source:
/** 
 * make sure that the right DLLs for running the C++ program are in the Path
 * @throws CommandException if the right DLLs are not in the path.
 */
private void checkPath() throws CommandException {
  List<String> notFound=new ArrayList<String>();
  for (  String dll : DEPENDENCIES) {
    File f=getExe(dll);
    if (f == null)     notFound.add(dll);
 else     logger.finer("String_Node_Str" + f);
  }
  if (!notFound.isEmpty()) {
    throw prepareMissingDllMessage(notFound);
  }
}

Fixed version (ground truth):
/** 
 * make sure that the right DLLs for running the C++ program are in the Path
 * @throws CommandException if the right DLLs are not in the path.
 */
private void checkPath() throws CommandException {
  List<String> notFound=new ArrayList<String>();
  for (  String dll : DEPENDENCIES) {
    File f=getExe(dll);
    if (f == null)     notFound.add(dll);
 else {
      if (logger.isLoggable(Level.FINER))       logger.finer("String_Node_Str" + f);
    }
  }
  if (!notFound.isEmpty()) {
    throw prepareMissingDllMessage(notFound);
  }
}
Program: 28335
Project: 28335
Buggy source:
private void prepareCppApp() throws CommandException {
  if (!TMPDIR.isDirectory())   throw exceptionMaker("String_Node_Str",Strings.get("String_Node_Str",TMPDIR));
  if (!FileUtils.deleteFileMaybe(CPP_APP))   throw exceptionMaker("String_Node_Str",CPP_APP);
  finer("String_Node_Str",CPP_APP);
  CPP_APP.deleteOnExit();
  InputStream in=null;
  FileOutputStream out=null;
  try {
    in=getClass().getResourceAsStream("String_Node_Str" + CPP_APP_FILENAME);
    out=new FileOutputStream(CPP_APP);
    copyStream(in,out);
  }
 catch (  IOException ex) {
    throw exceptionMaker("String_Node_Str",CPP_APP,ex);
  }
 finally {
    if (out != null) {
      try {
        out.close();
      }
 catch (      Exception e) {
      }
    }
    if (in != null) {
      try {
        in.close();
      }
 catch (      Exception e) {
      }
    }
  }
  if (!CPP_APP.canExecute())   throw exceptionMaker("String_Node_Str",CPP_APP);
}

Fixed version (ground truth):
private void prepareCppApp() throws CommandException {
  if (!TMPDIR.isDirectory())   throw exceptionMaker("String_Node_Str",Strings.get("String_Node_Str",TMPDIR));
  if (!FileUtils.deleteFileMaybe(CPP_APP))   throw exceptionMaker("String_Node_Str",CPP_APP);
  if (logger.isLoggable(Level.FINER))   logger.finer(Strings.get("String_Node_Str",CPP_APP));
  CPP_APP.deleteOnExit();
  InputStream in=null;
  FileOutputStream out=null;
  try {
    in=getClass().getResourceAsStream("String_Node_Str" + CPP_APP_FILENAME);
    out=new FileOutputStream(CPP_APP);
    copyStream(in,out);
  }
 catch (  IOException ex) {
    throw exceptionMaker("String_Node_Str",CPP_APP,ex);
  }
 finally {
    if (out != null) {
      try {
        out.close();
      }
 catch (      Exception e) {
      }
    }
    if (in != null) {
      try {
        in.close();
      }
 catch (      Exception e) {
      }
    }
  }
  if (!CPP_APP.canExecute())   throw exceptionMaker("String_Node_Str",CPP_APP);
}
Program: 28337
Project: 28337
Buggy source:
private int kill() throws CommandException {
  File prevPid=null;
  String pids=null;
  try {
    prevPid=new File(getServerDirs().getPidFile().getPath() + "String_Node_Str");
    if (!prevPid.canRead())     throw new CommandException(Strings.get("String_Node_Str",prevPid));
    pids=FileUtils.readSmallFile(prevPid).trim();
    String s=ProcessUtils.kill(Integer.parseInt(pids));
    if (s != null)     logger.finer(s);
  }
 catch (  CommandException ce) {
    throw ce;
  }
catch (  Exception ex) {
    throw new CommandException(Strings.get("String_Node_Str",prevPid,ex.getMessage()));
  }
  return 0;
}

Fixed version (ground truth):
private int kill() throws CommandException {
  File prevPid=null;
  String pids=null;
  try {
    prevPid=new File(getServerDirs().getPidFile().getPath() + "String_Node_Str");
    if (!prevPid.canRead())     throw new CommandException(Strings.get("String_Node_Str",prevPid));
    pids=FileUtils.readSmallFile(prevPid).trim();
    String s=ProcessUtils.kill(Integer.parseInt(pids));
    if (s != null && logger.isLoggable(Level.FINER))     logger.finer(s);
  }
 catch (  CommandException ce) {
    throw ce;
  }
catch (  Exception ex) {
    throw new CommandException(Strings.get("String_Node_Str",prevPid,ex.getMessage()));
  }
  return 0;
}
Program: 28338
Project: 28338
Buggy source:
/** 
 */
@Override protected int executeCommand() throws CommandException, CommandValidationException {
  File serverDir=getServerDirs().getServerDir();
  if (serverDir == null || !serverDir.isDirectory())   return noSuchInstance();
  if (getServerDirs().getLocalPassword() == null)   return instanceNotRunning();
  String serverName=getServerDirs().getServerName();
  HostAndPort addr=getAdminAddress(serverName);
  programOpts.setHostAndPort(addr);
  logger.finer("String_Node_Str" + addr.getPort());
  if (!isRunning())   return instanceNotRunning();
  logger.finer("String_Node_Str");
  return doRemoteCommand();
}

Fixed version (ground truth):
/** 
 */
@Override protected int executeCommand() throws CommandException, CommandValidationException {
  File serverDir=getServerDirs().getServerDir();
  if (serverDir == null || !serverDir.isDirectory())   return noSuchInstance();
  if (getServerDirs().getLocalPassword() == null)   return instanceNotRunning();
  String serverName=getServerDirs().getServerName();
  HostAndPort addr=getAdminAddress(serverName);
  programOpts.setHostAndPort(addr);
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + addr.toString());
  if (!isRunning())   return instanceNotRunning();
  logger.finer("String_Node_Str");
  return doRemoteCommand();
}
Program: 28340
Project: 28340
Buggy source:
protected void configureLoaderAttributes(WebappClassLoader cloader,WebXmlParser webXmlParser,File base){
  boolean delegate=webXmlParser.isDelegate();
  cloader.setDelegate(delegate);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("String_Node_Str" + base + "String_Node_Str"+ delegate);
  }
  String extraClassPath=webXmlParser.getExtraClassPath();
  if (extraClassPath != null) {
    String[] pathElements=extraClassPath.split("String_Node_Str");
    if (pathElements != null) {
      for (      String path : pathElements) {
        path=path.replace("String_Node_Str","String_Node_Str");
        if (logger.isLoggable(Level.FINE)) {
          logger.fine("String_Node_Str" + base + "String_Node_Str"+ path+ "String_Node_Str");
        }
        try {
          URL url=new URL(path);
          cloader.addRepository(path);
        }
 catch (        MalformedURLException mue1) {
          File file=new File(path);
          if (!file.isAbsolute()) {
            file=new File(base.getPath(),path);
          }
          try {
            URL url=file.toURI().toURL();
            cloader.addRepository(url.toString());
          }
 catch (          MalformedURLException mue2) {
            String msg=rb.getString(CLASSPATH_ERROR);
            Object[] params={path};
            msg=MessageFormat.format(msg,params);
            logger.log(Level.SEVERE,msg,mue2);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
protected void configureLoaderAttributes(WebappClassLoader cloader,WebXmlParser webXmlParser,File base){
  boolean delegate=webXmlParser.isDelegate();
  cloader.setDelegate(delegate);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("String_Node_Str" + base + "String_Node_Str"+ delegate);
  }
  String extraClassPath=webXmlParser.getExtraClassPath();
  if (extraClassPath != null) {
    String[] pathElements=extraClassPath.split("String_Node_Str");
    for (    String path : pathElements) {
      path=path.replace("String_Node_Str","String_Node_Str");
      if (logger.isLoggable(Level.FINE)) {
        logger.fine("String_Node_Str" + base + "String_Node_Str"+ path+ "String_Node_Str");
      }
      try {
        URL url=new URL(path);
        cloader.addRepository(path);
      }
 catch (      MalformedURLException mue1) {
        File file=new File(path);
        if (!file.isAbsolute()) {
          file=new File(base.getPath(),path);
        }
        try {
          URL url=file.toURI().toURL();
          cloader.addRepository(url.toString());
        }
 catch (        MalformedURLException mue2) {
          String msg=rb.getString(CLASSPATH_ERROR);
          Object[] params={path};
          msg=MessageFormat.format(msg,params);
          logger.log(Level.SEVERE,msg,mue2);
        }
      }
    }
  }
}
Program: 28343
Project: 28343
Buggy source:
protected boolean serviceContent(Request gReq,Response gResp) throws IOException {
  String relativeURIString=relativizeURIString(contextRoot,gReq.getRequestURI());
  if (state == State.SUSPENDED) {
    finishErrorResponse(gResp,HttpServletResponse.SC_FORBIDDEN);
    logger.fine(logPrefix() + "String_Node_Str" + (relativeURIString == null ? "String_Node_Str" : relativeURIString));
    return true;
  }
  if (relativeURIString == null) {
    logger.fine(logPrefix() + "String_Node_Str" + gReq.getRequestURI()+ "String_Node_Str");
    respondNotFound(gResp);
    return true;
  }
  final StaticContent sc=content.get(relativeURIString);
  if (sc != null && sc.isAvailable()) {
    processContent(relativeURIString,gReq,gResp);
    return true;
  }
 else {
    finishErrorResponse(gResp,contentStateToResponseStatus(sc));
    final String scString=(sc == null ? "String_Node_Str" : sc.toString());
    final String scStateString=(sc == null ? "String_Node_Str" : sc.state().toString());
    logger.fine(logPrefix() + "String_Node_Str" + gReq.getMethod()+ "String_Node_Str"+ relativeURIString+ "String_Node_Str"+ scString+ "String_Node_Str"+ scStateString);
    return true;
  }
}

Fixed version (ground truth):
protected boolean serviceContent(Request gReq,Response gResp) throws IOException {
  String relativeURIString=relativizeURIString(contextRoot,gReq.getRequestURI());
  if (state == State.SUSPENDED) {
    finishErrorResponse(gResp,HttpServletResponse.SC_FORBIDDEN);
    logger.fine(logPrefix() + "String_Node_Str" + (relativeURIString == null ? "String_Node_Str" : relativeURIString));
    return true;
  }
  if (relativeURIString == null) {
    logger.fine(logPrefix() + "String_Node_Str" + gReq.getRequestURI()+ "String_Node_Str");
    respondNotFound(gResp);
    return true;
  }
  final StaticContent sc=content.get(relativeURIString);
  if (sc != null && sc.isAvailable()) {
    processContent(relativeURIString,gReq,gResp);
    return true;
  }
 else {
    finishErrorResponse(gResp,contentStateToResponseStatus(sc));
    final String scString=(sc == null ? "String_Node_Str" : sc.toString());
    final String scStateString=(sc == null ? "String_Node_Str" : sc.state().toString());
    if (logger.isLoggable(Level.FINE)) {
      logger.fine(logPrefix() + "String_Node_Str" + gReq.getMethod()+ "String_Node_Str"+ relativeURIString+ "String_Node_Str"+ scString+ "String_Node_Str"+ scStateString);
    }
    return true;
  }
}
Program: 28346
Project: 28346
Buggy source:
private void pumpItOut(AdminCommandContext context){
  String fileName=file_name != null && !file_name.isEmpty() ? file_name : getDefaultBundleName();
  File localFile=new File(fileName.replace('\\','/'));
  Properties props=new Properties();
  File parent=localFile.getParentFile();
  if (parent == null) {
    parent=localFile;
  }
  props.setProperty("String_Node_Str",parent.getPath().replace('\\','/'));
  URI parentURI=parent.toURI();
  try {
    context.getOutboundPayload().attachFile("String_Node_Str",parentURI.relativize(localFile.toURI()),"String_Node_Str",props,syncBundleExport);
  }
 catch (  IOException ex) {
    setError(Strings.get("String_Node_Str",ex.getLocalizedMessage()));
    logger.finer("String_Node_Str" + parentURI.relativize(localFile.toURI()));
    logger.finer("String_Node_Str" + parent.getPath().replace('\\','/'));
    logger.finer("String_Node_Str" + syncBundleExport.getAbsolutePath());
  }
}

Fixed version (ground truth):
private void pumpItOut(AdminCommandContext context){
  String fileName=file_name != null && !file_name.isEmpty() ? file_name : getDefaultBundleName();
  File localFile=new File(fileName.replace('\\','/'));
  Properties props=new Properties();
  File parent=localFile.getParentFile();
  if (parent == null) {
    parent=localFile;
  }
  props.setProperty("String_Node_Str",parent.getPath().replace('\\','/'));
  URI parentURI=parent.toURI();
  try {
    context.getOutboundPayload().attachFile("String_Node_Str",parentURI.relativize(localFile.toURI()),"String_Node_Str",props,syncBundleExport);
  }
 catch (  IOException ex) {
    setError(Strings.get("String_Node_Str",ex.getLocalizedMessage()));
    if (logger.isLoggable(Level.FINER)) {
      logger.finer("String_Node_Str" + parentURI.relativize(localFile.toURI()));
      logger.finer("String_Node_Str" + parent.getPath().replace('\\','/'));
      logger.finer("String_Node_Str" + syncBundleExport.getAbsolutePath());
    }
  }
}
Program: 28347
Project: 28347
Buggy source:
private void prepare() throws InstanceNotRunningException {
  if (isError())   return;
  if (!StringUtils.ok(instanceName)) {
    setError(Strings.get("String_Node_Str"));
    return;
  }
  instance=helper.getServer(instanceName);
  if (instance == null) {
    setError(Strings.get("String_Node_Str",instanceName));
    return;
  }
  host=instance.getAdminHost();
  if (host == null) {
    setError(Strings.get("String_Node_Str",instanceName));
    return;
  }
  port=helper.getAdminPort(instance);
  if (port < 0) {
    setError(Strings.get("String_Node_Str",instanceName));
    return;
  }
  if (!isInstanceRestartable())   setError(Strings.get("String_Node_Str",instanceName));
  logger.finer(ObjectAnalyzer.toString(this));
}

Fixed version (ground truth):
private void prepare() throws InstanceNotRunningException {
  if (isError())   return;
  if (!StringUtils.ok(instanceName)) {
    setError(Strings.get("String_Node_Str"));
    return;
  }
  instance=helper.getServer(instanceName);
  if (instance == null) {
    setError(Strings.get("String_Node_Str",instanceName));
    return;
  }
  host=instance.getAdminHost();
  if (host == null) {
    setError(Strings.get("String_Node_Str",instanceName));
    return;
  }
  port=helper.getAdminPort(instance);
  if (port < 0) {
    setError(Strings.get("String_Node_Str",instanceName));
    return;
  }
  if (!isInstanceRestartable())   setError(Strings.get("String_Node_Str",instanceName));
  if (logger.isLoggable(Level.FINER))   logger.finer(ObjectAnalyzer.toString(this));
}
Program: 28348
Project: 28348
Buggy source:
@Override public void execute(AdminCommandContext context){
  try {
    ctx=context;
    helper=new RemoteInstanceCommandHelper(habitat);
    report=context.getActionReport();
    logger=context.getLogger();
    report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
    if (!env.isDas())     setError(Strings.get("String_Node_Str",env.getRuntimeType().toString()));
    prepare();
    setOldPid();
    logger.fine("String_Node_Str" + oldPid);
    callInstance();
    waitForRestart();
    if (!isError()) {
      String msg=Strings.get("String_Node_Str",instanceName);
      logger.info(msg);
      report.setMessage(msg);
    }
  }
 catch (  InstanceNotRunningException inre) {
    start();
  }
catch (  CommandException ce) {
    setError(Strings.get("String_Node_Str",instanceName,ce.getLocalizedMessage()));
  }
}

Fixed version (ground truth):
@Override public void execute(AdminCommandContext context){
  try {
    ctx=context;
    helper=new RemoteInstanceCommandHelper(habitat);
    report=context.getActionReport();
    logger=context.getLogger();
    report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
    if (!env.isDas())     setError(Strings.get("String_Node_Str",env.getRuntimeType().toString()));
    prepare();
    setOldPid();
    if (logger.isLoggable(Level.FINE))     logger.fine("String_Node_Str" + oldPid);
    callInstance();
    waitForRestart();
    if (!isError()) {
      String msg=Strings.get("String_Node_Str",instanceName);
      logger.info(msg);
      report.setMessage(msg);
    }
  }
 catch (  InstanceNotRunningException inre) {
    start();
  }
catch (  CommandException ce) {
    setError(Strings.get("String_Node_Str",instanceName,ce.getLocalizedMessage()));
  }
}
Program: 28349
Project: 28349
Buggy source:
private void waitForRestart(){
  if (isError())   return;
  long deadline=System.currentTimeMillis() + WAIT_TIME_MS;
  while (System.currentTimeMillis() < deadline) {
    try {
      String newpid=getPid();
      if (StringUtils.ok(newpid) && !newpid.equals(oldPid)) {
        logger.fine("String_Node_Str" + newpid);
        return;
      }
    }
 catch (    Exception e) {
    }
  }
  setError(Strings.get("String_Node_Str",instanceName));
}

Fixed version (ground truth):
private void waitForRestart(){
  if (isError())   return;
  long deadline=System.currentTimeMillis() + WAIT_TIME_MS;
  while (System.currentTimeMillis() < deadline) {
    try {
      String newpid=getPid();
      if (StringUtils.ok(newpid) && !newpid.equals(oldPid)) {
        if (logger.isLoggable(Level.FINE))         logger.fine("String_Node_Str" + newpid);
        return;
      }
    }
 catch (    Exception e) {
    }
  }
  setError(Strings.get("String_Node_Str",instanceName));
}
Program: 28351
Project: 28351
Buggy source:
/** 
 * Synchronize all the applications in the applications directory. We use the mod time of the application directory to decide if the application has changed.  If it has changed, we also send any of the generated content.
 */
private void synchronizeApplications(Payload.Outbound payload,Server server,SyncRequest sr) throws URISyntaxException {
  logger.finer("String_Node_Str" + sr.instance);
  Map<String,Application> apps=getApps(server);
  File appsDir=env.getApplicationRepositoryPath();
  for (  ModTime mt : sr.files) {
    if (apps.containsKey(mt.name)) {
      syncApp(apps.get(mt.name),appsDir,mt,payload);
      apps.remove(mt.name);
    }
 else     removeApp(apps.get(mt.name),appsDir,mt,payload);
  }
  for (  Map.Entry<String,Application> e : apps.entrySet())   syncApp(e.getValue(),appsDir,new ModTime(e.getKey(),0),payload);
}

Fixed version (ground truth):
/** 
 * Synchronize all the applications in the applications directory. We use the mod time of the application directory to decide if the application has changed.  If it has changed, we also send any of the generated content.
 */
private void synchronizeApplications(Payload.Outbound payload,Server server,SyncRequest sr) throws URISyntaxException {
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + "String_Node_Str" + sr.instance);
  Map<String,Application> apps=getApps(server);
  File appsDir=env.getApplicationRepositoryPath();
  for (  ModTime mt : sr.files) {
    if (apps.containsKey(mt.name)) {
      syncApp(apps.get(mt.name),appsDir,mt,payload);
      apps.remove(mt.name);
    }
 else     removeApp(apps.get(mt.name),appsDir,mt,payload);
  }
  for (  Map.Entry<String,Application> e : apps.entrySet())   syncApp(e.getValue(),appsDir,new ModTime(e.getKey(),0),payload);
}
Program: 28352
Project: 28352
Buggy source:
/** 
 * Return the names of the config files we need to consider. Names are all relative to the config directory.
 */
private Set<String> getConfigFileNames(){
  Set<String> files=new LinkedHashSet<String>();
  BufferedReader in=null;
  try {
    File configDir=env.getConfigDirPath();
    File f=new File(configDir,"String_Node_Str");
    if (f.exists())     in=new BufferedReader(new InputStreamReader(new FileInputStream(f)));
 else {
      InputStream res=getClass().getResourceAsStream("String_Node_Str");
      if (res != null)       in=new BufferedReader(new InputStreamReader(res));
 else       logger.severe("String_Node_Str" + "String_Node_Str");
    }
    String line;
    if (in != null) {
      while ((line=in.readLine()) != null) {
        if (line.startsWith("String_Node_Str"))         continue;
        line=line.trim();
        if (line.length() == 0)         continue;
        files.add(line);
      }
    }
  }
 catch (  IOException ex) {
    logger.fine("String_Node_Str");
    logger.fine(ex.toString());
  }
 finally {
    try {
      if (in != null)       in.close();
    }
 catch (    IOException cex) {
    }
  }
  return files;
}

Fixed version (ground truth):
/** 
 * Return the names of the config files we need to consider. Names are all relative to the config directory.
 */
private Set<String> getConfigFileNames(){
  Set<String> files=new LinkedHashSet<String>();
  BufferedReader in=null;
  try {
    File configDir=env.getConfigDirPath();
    File f=new File(configDir,"String_Node_Str");
    if (f.exists())     in=new BufferedReader(new InputStreamReader(new FileInputStream(f)));
 else {
      InputStream res=getClass().getResourceAsStream("String_Node_Str");
      if (res != null)       in=new BufferedReader(new InputStreamReader(res));
 else       logger.severe("String_Node_Str" + "String_Node_Str");
    }
    String line;
    if (in != null) {
      while ((line=in.readLine()) != null) {
        if (line.startsWith("String_Node_Str"))         continue;
        line=line.trim();
        if (line.length() == 0)         continue;
        files.add(line);
      }
    }
  }
 catch (  IOException ex) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine("String_Node_Str");
      logger.fine(ex.toString());
    }
  }
 finally {
    try {
      if (in != null)       in.close();
    }
 catch (    IOException cex) {
    }
  }
  return files;
}
Program: 28353
Project: 28353
Buggy source:
/** 
 * Send requests to the client to remove the specified app directory and all the generated directories.
 */
private void removeApp(Application app,File base,ModTime mt,Payload.Outbound payload) throws URISyntaxException {
  logger.fine("String_Node_Str" + mt.name + "String_Node_Str");
  try {
    File dir=fileOf(base,mt.name);
    removeDir(dir,payload);
    dir=env.getApplicationCompileJspPath();
    removeDir(fileOf(dir,mt.name),payload);
    dir=env.getApplicationGeneratedXMLPath();
    removeDir(fileOf(dir,mt.name),payload);
    dir=env.getApplicationEJBStubPath();
    removeDir(fileOf(dir,mt.name),payload);
    dir=new File(env.getApplicationStubPath(),"String_Node_Str");
    removeDir(fileOf(dir,mt.name),payload);
  }
 catch (  IOException ioex) {
    logger.fine("String_Node_Str" + mt.name);
    logger.fine(ioex.toString());
  }
}

Fixed version (ground truth):
/** 
 * Send requests to the client to remove the specified app directory and all the generated directories.
 */
private void removeApp(Application app,File base,ModTime mt,Payload.Outbound payload) throws URISyntaxException {
  if (logger.isLoggable(Level.FINE))   logger.fine("String_Node_Str" + mt.name + "String_Node_Str");
  try {
    File dir=fileOf(base,mt.name);
    removeDir(dir,payload);
    dir=env.getApplicationCompileJspPath();
    removeDir(fileOf(dir,mt.name),payload);
    dir=env.getApplicationGeneratedXMLPath();
    removeDir(fileOf(dir,mt.name),payload);
    dir=env.getApplicationEJBStubPath();
    removeDir(fileOf(dir,mt.name),payload);
    dir=new File(env.getApplicationStubPath(),"String_Node_Str");
    removeDir(fileOf(dir,mt.name),payload);
  }
 catch (  IOException ioex) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine("String_Node_Str" + mt.name);
      logger.fine(ioex.toString());
    }
  }
}
Program: 28354
Project: 28354
Buggy source:
/** 
 * Send a request to the client to remove the specified file. The file is named by mt.name, relative to base.  The name used in the response will be relative to root.
 */
private void removeFile(URI root,File base,ModTime mt,Payload.Outbound payload) throws URISyntaxException {
  File f=fileOf(base,mt.name);
  if (logger.isLoggable(Level.FINEST))   logger.finest("String_Node_Str" + mt.name + "String_Node_Str");
  try {
    logger.fine("String_Node_Str" + f + "String_Node_Str");
    payload.requestFileRemoval(root.relativize(f.toURI()),"String_Node_Str",null);
  }
 catch (  IOException ioex) {
    logger.fine("String_Node_Str" + f);
    logger.fine(ioex.toString());
  }
}

Fixed version (ground truth):
/** 
 * Send a request to the client to remove the specified file. The file is named by mt.name, relative to base.  The name used in the response will be relative to root.
 */
private void removeFile(URI root,File base,ModTime mt,Payload.Outbound payload) throws URISyntaxException {
  File f=fileOf(base,mt.name);
  if (logger.isLoggable(Level.FINEST))   logger.finest("String_Node_Str" + mt.name + "String_Node_Str");
  try {
    if (logger.isLoggable(Level.FINE))     logger.fine("String_Node_Str" + f + "String_Node_Str");
    payload.requestFileRemoval(root.relativize(f.toURI()),"String_Node_Str",null);
  }
 catch (  IOException ioex) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine("String_Node_Str" + f);
      logger.fine(ioex.toString());
    }
  }
}