Program: 119447
Project: 119447
Buggy source:
@Test public void testBdCeDemoComplete() throws Exception {
  Assert.assertTrue(ceResManager instanceof FileResourcesUnityManager);
  Iterator path=ceResManager.getPaths().iterator();
  String firstFilePath=((Path)path.next()).toPortableString();
  String ceDemoName=demoName.substring(0,demoName.indexOf("String_Node_Str"));
  String tempFolderPath=firstFilePath.substring(0,firstFilePath.indexOf(TEMP_FOLDER_SUFFIEX) + TEMP_FOLDER_SUFFIEX.length());
  Assert.assertTrue(new File(tempFolderPath).exists());
  String rootPath=tempFolderPath + File.separator + ceDemoName;
  Assert.assertTrue(new File(rootPath).exists());
  File tempJobsFolder=new File(rootPath + File.separator + processItemPath);
  List<File> demoJobItemFiles=DemoImportTestUtil.collectProjectFilesFromDirectory(tempJobsFolder,FileConstants.ITEM_EXTENSION,true);
  Assert.assertTrue(demoJobItemFiles.size() > 0);
  int currentJobItemsSize=ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.PROCESS).size();
  Assert.assertTrue(currentJobItemsSize > 0);
  Assert.assertEquals(demoJobItemFiles.size(),currentJobItemsSize);
  int currentContextItemsSize=ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.CONTEXT).size();
  Assert.assertTrue(currentContextItemsSize > 0);
  File tempContextItemsFolder=new File(rootPath + File.separator + contextItemPath);
  List<File> demoContextItemsFiles=DemoImportTestUtil.collectProjectFilesFromDirectory(tempContextItemsFolder,FileConstants.ITEM_EXTENSION,true);
  Assert.assertTrue(demoContextItemsFiles.size() > 0);
  Assert.assertEquals(demoContextItemsFiles.size(),currentContextItemsSize);
  int currentSqlPatternSize=ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.SQLPATTERNS).size();
  Assert.assertTrue(currentSqlPatternSize > 0);
  File tempSqlPatternFolder=new File(rootPath + File.separator + sqlPatternPath);
  List<File> demoSqlPatternFiles=DemoImportTestUtil.collectProjectFilesFromDirectory(tempSqlPatternFolder,FileConstants.ITEM_EXTENSION,true);
  Assert.assertTrue(demoSqlPatternFiles.size() > 0);
  Assert.assertEquals(demoSqlPatternFiles.size(),currentSqlPatternSize);
}

Fixed version (ground truth):
@Test public void testBdCeDemoComplete() throws Exception {
  Assert.assertTrue(ceResManager instanceof FileResourcesUnityManager);
  Iterator path=ceResManager.getPaths().iterator();
  String firstFilePath=((Path)path.next()).toPortableString();
  String ceDemoName=demoName.substring(0,demoName.indexOf("String_Node_Str"));
  String tempFolderPath=firstFilePath.substring(0,firstFilePath.indexOf(TEMP_FOLDER_SUFFIEX) + TEMP_FOLDER_SUFFIEX.length());
  Assert.assertTrue(new File(tempFolderPath).exists());
  String rootPath=tempFolderPath + File.separator + ceDemoName;
  Assert.assertTrue(new File(rootPath).exists());
  File tempJobsFolder=new File(rootPath + File.separator + processItemPath);
  List<File> demoJobItemFiles=DemoImportTestUtil.collectProjectFilesFromDirectory(tempJobsFolder,FileConstants.ITEM_EXTENSION,true);
  Assert.assertTrue(demoJobItemFiles.size() > 0);
  int currentJobItemsSize=ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.PROCESS).size();
  Assert.assertTrue(currentJobItemsSize > 0);
  Assert.assertEquals(demoJobItemFiles.size(),currentJobItemsSize);
  int currentContextItemsSize=ProxyRepositoryFactory.getInstance().getAll(ERepositoryObjectType.CONTEXT).size();
  Assert.assertTrue(currentContextItemsSize > 0);
  File tempContextItemsFolder=new File(rootPath + File.separator + contextItemPath);
  List<File> demoContextItemsFiles=DemoImportTestUtil.collectProjectFilesFromDirectory(tempContextItemsFolder,FileConstants.ITEM_EXTENSION,true);
  Assert.assertTrue(demoContextItemsFiles.size() > 0);
  Assert.assertEquals(demoContextItemsFiles.size(),currentContextItemsSize);
}