* sample object of the experiment
* @param migrationResult
* migration result of the experiment
*/
private void extractDetailedInfos(Alternative a, SampleObject sample, MigrationResult migrationResult) {
DetailedExperimentInfo info = a.getExperiment().getDetailedInfo().get(sample);
if (info == null) {
info = new DetailedExperimentInfo();
a.getExperiment().getDetailedInfo().put(sample, info);
}
info.clear();
if (migrationResult == null) {
info.setProgramOutput(String.format("Applying action %s to sample %s failed.",
a.getAction().getShortname(), sample.getFullname()));
} else {
info.setSuccessful(migrationResult.isSuccessful());
if (migrationResult.getReport() == null) {
info.setProgramOutput("The tool didn't provide any output.");
} else {
info.setProgramOutput(migrationResult.getReport());
}
// Execution claimed to be successful but size = 0
DigitalObject migratedObject = migrationResult.getMigratedObject();
if (migrationResult.isSuccessful() && (migratedObject == null || migratedObject.getData().getSize() == 0)) {
info.setSuccessful(false);
info.setProgramOutput(info.getProgramOutput()
+ "\nSomething went wrong during migration. No result file has been generated.");
}
if (info.getSuccessful()) {
info.getMeasurements().putAll(migrationResult.getMeasurements());
}
}
}