Program: 28801
Project: 28801
Buggy source:
@Test public void simplePermanentDirWithNoSlashRemovalTest() throws Exception {
  final String DIR="String_Node_Str";
  final String DIR_WITH_NO_SLASH="String_Node_Str";
  final String FILE_A_PREFIX=DIR;
  final String FILE_A_NAME="String_Node_Str";
  final Set<File> desiredAbsent=new HashSet<File>();
  final File origDir=File.createTempFile("String_Node_Str","String_Node_Str");
  origDir.delete();
  origDir.mkdir();
  final File dir=new File(origDir,DIR);
  dir.mkdir();
  final File fileA=new File(dir,FILE_A_NAME);
  writeFile(fileA,"String_Node_Str","String_Node_Str");
  File targetDir=null;
  try {
    targetDir=File.createTempFile("String_Node_Str","String_Node_Str");
    targetDir.delete();
    targetDir.mkdir();
    desiredAbsent.add(new File(targetDir.toURI().resolve(FILE_A_PREFIX + FILE_A_NAME)));
    new CommonPermTest(){
      @Override protected CommonPermTest init(      File targetDir){
        super.init(targetDir);
        return this;
      }
      @Override protected void addParts(      Outbound ob,      PayloadFilesManager instance) throws Exception {
        ob.attachFile("String_Node_Str",URI.create(DIR),"String_Node_Str",dir,true);
      }
      @Override protected void checkResults(      Inbound ib,      PayloadFilesManager instance) throws Exception {
        instance.processParts(ib);
        Payload.Outbound ob=PayloadImpl.Outbound.newInstance();
        ob.requestFileRemoval(URI.create(DIR_WITH_NO_SLASH),"String_Node_Str",null,true);
        ob.requestFileRemoval(URI.create("String_Node_Str"),"String_Node_Str",null,true);
        final ByteArrayOutputStream baos=new ByteArrayOutputStream();
        ob.writeTo(baos);
        baos.close();
        final PayloadFilesManager remover=new PayloadFilesManager.Perm(instance.getTargetDir(),null,debugLogger());
        final ByteArrayInputStream bais=new ByteArrayInputStream(baos.toByteArray());
        Payload.Inbound removerIB=PayloadImpl.Inbound.newInstance("String_Node_Str",bais);
        remover.processParts(removerIB);
        final Set<File> unexpectedlyPresent=new HashSet<File>();
        for (        File f : desiredAbsent) {
          if (f.exists()) {
            unexpectedlyPresent.add(f);
          }
        }
        assertEquals("String_Node_Str",Collections.EMPTY_SET,unexpectedlyPresent);
      }
      @Override protected void cleanup(){
        for (        File f : desiredAbsent) {
          if (f.exists()) {
            f.delete();
          }
        }
      }
    }
.init(targetDir).run("String_Node_Str");
  }
  finally {
    if (targetDir != null) {
      FileUtils.whack(targetDir);
    }
  }
}

Fixed version (ground truth):
@Test public void simplePermanentDirWithNoSlashRemovalTest() throws Exception {
  final String DIR="String_Node_Str";
  final String DIR_WITH_NO_SLASH="String_Node_Str";
  final String FILE_A_PREFIX=DIR;
  final String FILE_A_NAME="String_Node_Str";
  final Set<File> desiredAbsent=new HashSet<File>();
  final File origDir=File.createTempFile("String_Node_Str","String_Node_Str");
  origDir.delete();
  origDir.mkdir();
  final File dir=new File(origDir,DIR);
  dir.mkdir();
  final File fileA=new File(dir,FILE_A_NAME);
  writeFile(fileA,"String_Node_Str","String_Node_Str");
  File targetDir=null;
  try {
    targetDir=File.createTempFile("String_Node_Str","String_Node_Str");
    targetDir.delete();
    targetDir.mkdir();
    desiredAbsent.add(new File(targetDir.toURI().resolve(FILE_A_PREFIX + FILE_A_NAME)));
    new CommonPermTest(){
      @Override protected CommonPermTest init(      File targetDir){
        super.init(targetDir);
        return this;
      }
      @Override protected void addParts(      Outbound ob,      PayloadFilesManager instance) throws Exception {
        ob.attachFile("String_Node_Str",URI.create(DIR),"String_Node_Str",dir,true);
      }
      @Override protected void checkResults(      Inbound ib,      PayloadFilesManager instance) throws Exception {
        instance.processParts(ib);
        Payload.Outbound ob=PayloadImpl.Outbound.newInstance();
        ob.requestFileRemoval(URI.create(DIR_WITH_NO_SLASH),"String_Node_Str",null,true);
        ob.requestFileRemoval(URI.create("String_Node_Str"),"String_Node_Str",null,true);
        final ByteArrayOutputStream baos=new ByteArrayOutputStream();
        ob.writeTo(baos);
        baos.close();
        final PayloadFilesManager remover=new PayloadFilesManager.Perm(instance.getTargetDir(),null,debugLogger());
        final ByteArrayInputStream bais=new ByteArrayInputStream(baos.toByteArray());
        Payload.Inbound removerIB=PayloadImpl.Inbound.newInstance("String_Node_Str",bais);
        remover.processParts(removerIB);
        final Set<File> unexpectedlyPresent=new HashSet<File>();
        for (        File f : desiredAbsent) {
          if (f.exists()) {
            unexpectedlyPresent.add(f);
          }
        }
        assertEquals("String_Node_Str",Collections.EMPTY_SET,unexpectedlyPresent);
      }
      @Override protected void cleanup(){
        for (        File f : desiredAbsent) {
          if (f.exists()) {
            f.delete();
          }
        }
        PayloadFilesManagerTest.cleanup(origDir);
      }
    }
.init(targetDir).run("String_Node_Str");
  }
  finally {
    if (targetDir != null) {
      FileUtils.whack(targetDir);
    }
  }
}