Program: 69826
Project: 69826
Buggy source:
/** 
 * This test check every methods of the import process in details
 * @throws IOException
 * @throws URISyntaxException
 */
@Test public void testImport_SC() throws IOException, URISyntaxException {
  URL itemUrl=QTIImportProcessorTest.class.getResource("String_Node_Str");
  Assert.assertNotNull(itemUrl);
  File itemFile=new File(itemUrl.toURI());
  QTIImportProcessor proc=new QTIImportProcessor(owner,itemFile.getName(),itemFile,questionItemDao,qItemTypeDao,qEduContextDao,qpoolFileStorage);
  DocInfos docInfos=proc.getDocInfos();
  Assert.assertNotNull(docInfos);
  Assert.assertNotNull(docInfos.getFilename());
  Assert.assertNotNull(docInfos.getDocument());
  Assert.assertEquals("String_Node_Str",docInfos.getFilename());
  List<ItemInfos> itemInfos=proc.getItemList(docInfos);
  Assert.assertNotNull(itemInfos);
  Assert.assertEquals(1,itemInfos.size());
  QuestionItemImpl item=proc.processItem(docInfos,itemInfos.get(0));
  Assert.assertNotNull(item);
  dbInstance.commitAndCloseSession();
  proc.processFiles(item,itemInfos.get(0));
  QuestionItemFull reloadItem=questionItemDao.loadById(item.getKey());
  Assert.assertNotNull(reloadItem);
  Assert.assertNotNull(reloadItem.getCreationDate());
  Assert.assertNotNull(reloadItem.getLastModified());
  Assert.assertEquals(QuestionStatus.draft,reloadItem.getQuestionStatus());
  Assert.assertEquals(QTIConstants.QTI_12_FORMAT,reloadItem.getFormat());
  Assert.assertEquals("String_Node_Str",reloadItem.getTitle());
  Assert.assertEquals("String_Node_Str",reloadItem.getDescription());
  Assert.assertNotNull(reloadItem.getType());
  Assert.assertEquals(QuestionType.SC.name(),reloadItem.getType().getType());
  VFSContainer itemDir=qpoolFileStorage.getContainer(reloadItem.getDirectory());
  Assert.assertNotNull(itemDir);
  VFSItem qtiLeaf=itemDir.resolve(reloadItem.getRootFilename());
  Assert.assertNotNull(qtiLeaf);
  Assert.assertTrue(qtiLeaf instanceof VFSLeaf);
  Assert.assertTrue(qtiLeaf.exists());
  Assert.assertEquals(itemFile.length(),((VFSLeaf)qtiLeaf).getSize());
}

Fixed version (ground truth):
/** 
 * This test check every methods of the import process in details
 * @throws IOException
 * @throws URISyntaxException
 */
@Test public void testImport_SC() throws IOException, URISyntaxException {
  URL itemUrl=QTIImportProcessorTest.class.getResource("String_Node_Str");
  Assert.assertNotNull(itemUrl);
  File itemFile=new File(itemUrl.toURI());
  QTIImportProcessor proc=new QTIImportProcessor(owner,Locale.ENGLISH,itemFile.getName(),itemFile,questionItemDao,qItemTypeDao,qEduContextDao,qpoolFileStorage);
  DocInfos docInfos=proc.getDocInfos();
  Assert.assertNotNull(docInfos);
  Assert.assertNotNull(docInfos.getFilename());
  Assert.assertNotNull(docInfos.getDocument());
  Assert.assertEquals("String_Node_Str",docInfos.getFilename());
  List<ItemInfos> itemInfos=proc.getItemList(docInfos);
  Assert.assertNotNull(itemInfos);
  Assert.assertEquals(1,itemInfos.size());
  QuestionItemImpl item=proc.processItem(docInfos,itemInfos.get(0));
  Assert.assertNotNull(item);
  dbInstance.commitAndCloseSession();
  proc.processFiles(item,itemInfos.get(0));
  QuestionItemFull reloadItem=questionItemDao.loadById(item.getKey());
  Assert.assertNotNull(reloadItem);
  Assert.assertNotNull(reloadItem.getCreationDate());
  Assert.assertNotNull(reloadItem.getLastModified());
  Assert.assertEquals(QuestionStatus.draft,reloadItem.getQuestionStatus());
  Assert.assertEquals(QTIConstants.QTI_12_FORMAT,reloadItem.getFormat());
  Assert.assertEquals("String_Node_Str",reloadItem.getTitle());
  Assert.assertEquals("String_Node_Str",reloadItem.getDescription());
  Assert.assertNotNull(reloadItem.getType());
  Assert.assertEquals(QuestionType.SC.name(),reloadItem.getType().getType());
  VFSContainer itemDir=qpoolFileStorage.getContainer(reloadItem.getDirectory());
  Assert.assertNotNull(itemDir);
  VFSItem qtiLeaf=itemDir.resolve(reloadItem.getRootFilename());
  Assert.assertNotNull(qtiLeaf);
  Assert.assertTrue(qtiLeaf instanceof VFSLeaf);
  Assert.assertTrue(qtiLeaf.exists());
  Assert.assertEquals(itemFile.length(),((VFSLeaf)qtiLeaf).getSize());
}