Program: 38799
Project: 38799
Buggy source:
@Test public void baseTest() throws IOException {
  assertSame(afs,ad.getFileSystem("String_Node_Str"));
  assertNull(ad.getFileSystem("String_Node_Str"));
  assertEquals(Collections.singletonList("String_Node_Str"),ad.getRemotelyAccessibleFileSystemNames());
  assertNotNull(ad.getRemotelyAccessibleStorage("String_Node_Str"));
  assertEquals("String_Node_Str",afs.getName());
  assertEquals(1,ad.getProjectFileClasses().size());
  Folder root=afs.getRootFolder();
  assertNotNull(root);
  Folder dir1=root.createFolder("String_Node_Str");
  assertNotNull(dir1);
  dir1.createFolder("String_Node_Str");
  dir1.createFolder("String_Node_Str");
  dir1=root.getFolder("String_Node_Str").orElse(null);
  assertNotNull(dir1);
  assertTrue(dir1.isFolder());
  assertTrue(dir1.isWritable());
  assertEquals("String_Node_Str",dir1.getName());
  assertNotNull(dir1.getCreationDate());
  assertNotNull(dir1.getModificationDate());
  assertEquals(0,dir1.getVersion());
  assertFalse(dir1.isAheadOfVersion());
  assertEquals(dir1.getName(),dir1.toString());
  assertEquals("String_Node_Str",dir1.getParent().orElseThrow(AssertionError::new).getName());
  Folder dir2=dir1.getFolder("String_Node_Str").orElse(null);
  assertNotNull(dir2);
  assertNotNull(dir2.getParent());
  assertEquals("String_Node_Str",dir2.getParent().orElseThrow(AssertionError::new).getPath().toString());
  assertEquals(2,dir1.getChildren().size());
  Folder dir3=root.getFolder("String_Node_Str").orElse(null);
  assertNull(dir3);
  String str=dir2.getPath().toString();
  assertEquals("String_Node_Str",str);
  Folder mayBeDir2=afs.getRootFolder().getFolder("String_Node_Str").orElse(null);
  assertNotNull(mayBeDir2);
  assertEquals("String_Node_Str",mayBeDir2.getName());
  Folder mayBeDir2otherWay=afs.getRootFolder().getChild(Folder.class,"String_Node_Str","String_Node_Str").orElse(null);
  assertNotNull(mayBeDir2otherWay);
  assertEquals("String_Node_Str",mayBeDir2otherWay.getName());
  Project project1=dir2.createProject("String_Node_Str");
  project1.setDescription("String_Node_Str");
  assertNotNull(project1);
  assertEquals("String_Node_Str",project1.getName());
  assertEquals("String_Node_Str",project1.getDescription());
  assertNotNull(project1.getIcon());
  assertNotNull(project1.getParent());
  assertEquals("String_Node_Str",project1.getParent().orElseThrow(AssertionError::new).getPath().toString());
  assertTrue(project1.getRootFolder().getChildren().isEmpty());
  assertTrue(project1.getFileSystem() == afs);
  List<String> added=new ArrayList<>();
  List<String> removed=new ArrayList<>();
  project1.getRootFolder().addListener(new ProjectFolderListener(){
    @Override public void childAdded(    String nodeId){
      added.add(nodeId);
    }
    @Override public void childRemoved(    String nodeId){
      removed.add(nodeId);
    }
  }
);
  ProjectFolder dir4=project1.getRootFolder().createFolder("String_Node_Str");
  assertTrue(dir4.isFolder());
  assertEquals("String_Node_Str",dir4.getName());
  assertNotNull(dir4.getParent());
  assertTrue(dir4.getChildren().isEmpty());
  assertEquals(1,project1.getRootFolder().getChildren().size());
  dir4.delete();
  assertTrue(project1.getRootFolder().getChildren().isEmpty());
  try {
    dir4.getChildren();
    fail();
  }
 catch (  Exception ignored) {
  }
  ProjectFolder dir5=project1.getRootFolder().createFolder("String_Node_Str");
  ProjectFolder dir6=dir5.createFolder("String_Node_Str");
  assertEquals(ImmutableList.of("String_Node_Str","String_Node_Str"),dir6.getPath().toList().subList(1,3));
  assertEquals("String_Node_Str",dir6.getPath().toString());
  assertEquals("String_Node_Str",project1.getRootFolder().getChild("String_Node_Str").orElseThrow(AssertionError::new).getName());
  assertEquals(Arrays.asList(dir4.getId(),dir5.getId()),added);
  assertEquals(Collections.singletonList(dir4.getId()),removed);
}

Fixed version (ground truth):
@Test public void baseTest() throws IOException {
  assertSame(afs,ad.getFileSystem("String_Node_Str"));
  assertNull(ad.getFileSystem("String_Node_Str"));
  assertEquals(Collections.singletonList("String_Node_Str"),ad.getRemotelyAccessibleFileSystemNames());
  assertNotNull(ad.getRemotelyAccessibleStorage("String_Node_Str"));
  assertEquals("String_Node_Str",afs.getName());
  assertEquals(1,ad.getProjectFileClasses().size());
  Folder root=afs.getRootFolder();
  assertNotNull(root);
  Folder dir1=root.createFolder("String_Node_Str");
  assertNotNull(dir1);
  dir1.createFolder("String_Node_Str");
  dir1.createFolder("String_Node_Str");
  dir1=root.getFolder("String_Node_Str").orElse(null);
  assertNotNull(dir1);
  assertTrue(dir1.isFolder());
  assertTrue(dir1.isWritable());
  assertEquals("String_Node_Str",dir1.getName());
  assertNotNull(dir1.getCreationDate());
  assertNotNull(dir1.getModificationDate());
  assertEquals(0,dir1.getVersion());
  assertFalse(dir1.isAheadOfVersion());
  assertEquals(dir1.getName(),dir1.toString());
  assertEquals("String_Node_Str",dir1.getParent().orElseThrow(AssertionError::new).getName());
  Folder dir2=dir1.getFolder("String_Node_Str").orElse(null);
  assertNotNull(dir2);
  assertNotNull(dir2.getParent());
  assertEquals("String_Node_Str",dir2.getParent().orElseThrow(AssertionError::new).getPath().toString());
  assertEquals(2,dir1.getChildren().size());
  Folder dir3=root.getFolder("String_Node_Str").orElse(null);
  assertNull(dir3);
  String str=dir2.getPath().toString();
  assertEquals("String_Node_Str",str);
  Folder mayBeDir2=afs.getRootFolder().getFolder("String_Node_Str").orElse(null);
  assertNotNull(mayBeDir2);
  assertEquals("String_Node_Str",mayBeDir2.getName());
  Folder mayBeDir2otherWay=afs.getRootFolder().getChild(Folder.class,"String_Node_Str","String_Node_Str").orElse(null);
  assertNotNull(mayBeDir2otherWay);
  assertEquals("String_Node_Str",mayBeDir2otherWay.getName());
  Project project1=dir2.createProject("String_Node_Str");
  project1.setDescription("String_Node_Str");
  assertNotNull(project1);
  assertEquals("String_Node_Str",project1.getName());
  assertEquals("String_Node_Str",project1.getDescription());
  assertNotNull(project1.getIcon());
  assertNotNull(project1.getParent());
  assertEquals("String_Node_Str",project1.getParent().orElseThrow(AssertionError::new).getPath().toString());
  assertTrue(project1.getRootFolder().getChildren().isEmpty());
  assertTrue(project1.getFileSystem() == afs);
  List<String> added=new ArrayList<>();
  List<String> removed=new ArrayList<>();
  ProjectFolderListener l=new ProjectFolderListener(){
    @Override public void childAdded(    String nodeId){
      added.add(nodeId);
    }
    @Override public void childRemoved(    String nodeId){
      removed.add(nodeId);
    }
  }
;
  project1.getRootFolder().addListener(l);
  ProjectFolder dir4=project1.getRootFolder().createFolder("String_Node_Str");
  assertTrue(dir4.isFolder());
  assertEquals("String_Node_Str",dir4.getName());
  assertNotNull(dir4.getParent());
  assertTrue(dir4.getChildren().isEmpty());
  assertEquals(1,project1.getRootFolder().getChildren().size());
  dir4.delete();
  assertTrue(project1.getRootFolder().getChildren().isEmpty());
  try {
    dir4.getChildren();
    fail();
  }
 catch (  Exception ignored) {
  }
  ProjectFolder dir5=project1.getRootFolder().createFolder("String_Node_Str");
  ProjectFolder dir6=dir5.createFolder("String_Node_Str");
  assertEquals(ImmutableList.of("String_Node_Str","String_Node_Str"),dir6.getPath().toList().subList(1,3));
  assertEquals("String_Node_Str",dir6.getPath().toString());
  assertEquals("String_Node_Str",project1.getRootFolder().getChild("String_Node_Str").orElseThrow(AssertionError::new).getName());
  assertEquals(Arrays.asList(dir4.getId(),dir5.getId()),added);
  assertEquals(Collections.singletonList(dir4.getId()),removed);
}