Program: 47350
Project: 47350
Buggy source:
@Test public void testImportFileWithoutManifest() throws PlatformImportException, DomainIdNullException, DomainAlreadyExistsException, DomainStorageException, IOException, PlatformInitializationException, InterruptedException {
  ByteArrayInputStream solutionInputStream=null;
  final File srcContentFile=new File(solutionDir + SRC_CONTENT_FILE);
  ByteArrayOutputStream tmpOS=null;
  try {
    tmpOS=new ByteArrayOutputStream();
    ZipOutputStream zipOS=new ZipOutputStream(tmpOS);
    zipOS.putNextEntry(new ZipEntry(ZIPENTRY_CONTENT_FILE));
    FileUtils.copyFile(srcContentFile,zipOS);
    zipOS.closeEntry();
    zipOS.close();
    solutionInputStream=new ByteArrayInputStream(tmpOS.toByteArray());
  }
  finally {
    if (tmpOS != null) {
      tmpOS.close();
    }
  }
  final RepositoryFileImportBundle.Builder bundleBuilder=new RepositoryFileImportBundle.Builder();
  bundleBuilder.input(solutionInputStream);
  bundleBuilder.charSet(DEFAULT_ENCODING);
  bundleBuilder.hidden(false);
  bundleBuilder.path(IMPORT_REPO_DIR);
  bundleBuilder.overwriteFile(false);
  bundleBuilder.applyAclSettings(false);
  bundleBuilder.overwriteAclSettings(false);
  bundleBuilder.retainOwnership(false);
  bundleBuilder.name("String_Node_Str");
  bundleBuilder.mime("String_Node_Str");
  final IPlatformImportBundle bundle=bundleBuilder.build();
  runImport(solutionImportHandler,bundle);
{
    RepositoryFile dir=repo.getFile(IMPORT_REPO_DIR + "String_Node_Str");
    assertNotNull(dir);
    assertTrue(dir.isFolder());
    RepositoryFile file=repo.getFile(IMPORT_REPO_DIR + "String_Node_Str");
    assertNotNull(file);
    assertFalse(file.isFolder());
    assertFileContentEquals(srcContentFile,file);
  }
{
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
  }
}

Fixed version (ground truth):
@Test public void testImportFileWithoutManifest() throws PlatformImportException, DomainIdNullException, DomainAlreadyExistsException, DomainStorageException, IOException, PlatformInitializationException, InterruptedException {
  ByteArrayInputStream solutionInputStream=null;
  final File srcContentFile=new File(solutionDir + SRC_CONTENT_FILE);
  ByteArrayOutputStream tmpOS=null;
  try {
    tmpOS=new ByteArrayOutputStream();
    ZipOutputStream zipOS=new ZipOutputStream(tmpOS);
    zipOS.putNextEntry(new ZipEntry(ZIPENTRY_CONTENT_FILE_NOMANIFEST));
    FileUtils.copyFile(srcContentFile,zipOS);
    zipOS.closeEntry();
    zipOS.close();
    solutionInputStream=new ByteArrayInputStream(tmpOS.toByteArray());
  }
  finally {
    if (tmpOS != null) {
      tmpOS.close();
    }
  }
  final RepositoryFileImportBundle.Builder bundleBuilder=new RepositoryFileImportBundle.Builder();
  bundleBuilder.input(solutionInputStream);
  bundleBuilder.charSet(DEFAULT_ENCODING);
  bundleBuilder.hidden(false);
  bundleBuilder.path(IMPORT_REPO_DIR);
  bundleBuilder.overwriteFile(false);
  bundleBuilder.applyAclSettings(false);
  bundleBuilder.overwriteAclSettings(false);
  bundleBuilder.retainOwnership(false);
  bundleBuilder.name("String_Node_Str");
  bundleBuilder.mime("String_Node_Str");
  final IPlatformImportBundle bundle=bundleBuilder.build();
  runImport(solutionImportHandler,bundle);
{
    RepositoryFile dir=repo.getFile(IMPORT_REPO_DIR + "String_Node_Str");
    assertNotNull(dir);
    assertTrue(dir.isFolder());
    RepositoryFile file=repo.getFile(IMPORT_REPO_DIR + "String_Node_Str");
    assertNotNull(file);
    assertFalse(file.isFolder());
    assertFileContentEquals(srcContentFile,file);
  }
{
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
    assertNull(repo.getFile(IMPORT_REPO_DIR + "String_Node_Str"));
  }
}