Program: 188426
Project: 188426
Buggy source:
@Test public void siegfriedCorporaTestRepresentation() throws RODAException, ParseException, FileAlreadyExistsException, InterruptedException, IOException {
  AIP root=model.createAIP(null,RodaConstants.AIP_TYPE_MIXED,new Permissions(),aipCreator);
  TransferredResource transferredResource=createCorpora();
  AssertJUnit.assertEquals(transferredResource == null,false);
  Map<String,String> parameters=new HashMap<>();
  parameters.put(RodaConstants.PLUGIN_PARAMS_PARENT_ID,root.getId());
  parameters.put(RodaConstants.PLUGIN_PARAMS_SIP_TO_AIP_CLASS,TransferredResourceToAIPPlugin.class.getName());
  Job ingest=TestsHelper.executeJob(MinimalIngestPlugin.class,parameters,PluginType.SIP_TO_AIP,SelectedItemsList.create(TransferredResource.class,transferredResource.getUUID()));
  List<Report> ingestReports=TestsHelper.getJobReports(index,ingest,true);
  AssertJUnit.assertEquals(1,ingestReports.size());
  IndexResult<IndexedRepresentation> reps=index.find(IndexedRepresentation.class,Filter.ALL,Sorter.NONE,new Sublist(0,1),new ArrayList<String>());
  String representationUUID=reps.getResults().get(0).getUUID();
  Job job=TestsHelper.executeJob(SiegfriedPlugin.class,new HashMap<String,String>(),PluginType.MISC,SelectedItemsList.create(IndexedRepresentation.class,representationUUID));
  List<Report> jobReports=TestsHelper.getJobReports(index,job,true);
  AssertJUnit.assertEquals(1,jobReports.size());
  Report report=jobReports.get(0);
  AssertJUnit.assertEquals(0,report.getReports().size());
  AssertJUnit.assertEquals(false,report.getDateCreated().equals(report.getDateUpdated()));
}

Fixed version (ground truth):
@Test public void siegfriedCorporaTestRepresentation() throws RODAException, ParseException, FileAlreadyExistsException, InterruptedException, IOException {
  AIP root=model.createAIP(null,RodaConstants.AIP_TYPE_MIXED,new Permissions(),aipCreator);
  TransferredResource transferredResource=createCorpora();
  AssertJUnit.assertEquals(transferredResource == null,false);
  Map<String,String> parameters=new HashMap<>();
  parameters.put(RodaConstants.PLUGIN_PARAMS_PARENT_ID,root.getId());
  parameters.put(RodaConstants.PLUGIN_PARAMS_SIP_TO_AIP_CLASS,TransferredResourceToAIPPlugin.class.getName());
  Job ingest=TestsHelper.executeJob(MinimalIngestPlugin.class,parameters,PluginType.SIP_TO_AIP,SelectedItemsList.create(TransferredResource.class,transferredResource.getUUID()));
  List<Report> ingestReports=TestsHelper.getJobReports(index,ingest,true);
  AssertJUnit.assertEquals(1,ingestReports.size());
  IndexResult<IndexedRepresentation> reps=index.find(IndexedRepresentation.class,Filter.ALL,Sorter.NONE,new Sublist(0,1),new ArrayList<String>());
  String representationUUID=reps.getResults().get(0).getUUID();
  Job job=TestsHelper.executeJob(SiegfriedPlugin.class,new HashMap<String,String>(),PluginType.MISC,SelectedItemsList.create(IndexedRepresentation.class,representationUUID));
  List<Report> jobReports=TestsHelper.getJobReports(index,job,true);
  AssertJUnit.assertEquals(1,jobReports.size());
  Report report=jobReports.get(0);
  AssertJUnit.assertEquals(1,report.getReports().size());
  Report innerReport=report.getReports().get(0);
  AssertJUnit.assertEquals(false,report.getDateCreated().equals(report.getDateUpdated()));
  AssertJUnit.assertEquals(true,report.getDateCreated().equals(innerReport.getDateCreated()));
  AssertJUnit.assertEquals(true,report.getDateUpdated().equals(innerReport.getDateUpdated()));
}