Program: 171693
Project: 171693
Buggy source:
/** 
 * Merges the configuration values for the replacing release, creates the manfiest, and creates the Report for the next stage of upgrading a Release.
 * @param upgradeRequest containing the {@link UpgradeProperties} and{@link PackageIdentifier} for the update.
 * @return A report of what needs to change to bring the current release to the requestedrelease
 */
@Transactional(readOnly=true) public ReleaseAnalysisReport createReport(UpgradeRequest upgradeRequest){
  Assert.notNull(upgradeRequest.getUpgradeProperties(),"String_Node_Str");
  Assert.notNull(upgradeRequest.getPackageIdentifier(),"String_Node_Str");
  UpgradeProperties upgradeProperties=upgradeRequest.getUpgradeProperties();
  Release existingRelease=this.releaseRepository.findLatestReleaseForUpdate(upgradeProperties.getReleaseName());
  Release latestRelease=this.releaseRepository.findLatestRelease(upgradeProperties.getReleaseName());
  PackageIdentifier packageIdentifier=upgradeRequest.getPackageIdentifier();
  PackageMetadata packageMetadata=this.packageMetadataRepository.findByNameAndOptionalVersionRequired(packageIdentifier.getPackageName(),packageIdentifier.getPackageVersion());
  Release replacingRelease=createReleaseForUpgrade(packageMetadata,latestRelease.getVersion() + 1,upgradeProperties,existingRelease.getPlatformName());
  Map<String,Object> model=ConfigValueUtils.mergeConfigValues(replacingRelease.getPkg(),replacingRelease.getConfigValues());
  String manifest=ManifestUtils.createManifest(replacingRelease.getPkg(),model);
  replacingRelease.setManifest(manifest);
  return this.releaseManager.createReport(existingRelease,replacingRelease);
}

Fixed version (ground truth):
/** 
 * Merges the configuration values for the replacing release, creates the manfiest, and creates the Report for the next stage of upgrading a Release.
 * @param upgradeRequest containing the {@link UpgradeProperties} and{@link PackageIdentifier} for the update.
 * @return A report of what needs to change to bring the current release to the requestedrelease
 */
@Transactional public ReleaseAnalysisReport createReport(UpgradeRequest upgradeRequest){
  Assert.notNull(upgradeRequest.getUpgradeProperties(),"String_Node_Str");
  Assert.notNull(upgradeRequest.getPackageIdentifier(),"String_Node_Str");
  UpgradeProperties upgradeProperties=upgradeRequest.getUpgradeProperties();
  Release existingRelease=this.releaseRepository.findLatestReleaseForUpdate(upgradeProperties.getReleaseName());
  Release latestRelease=this.releaseRepository.findLatestRelease(upgradeProperties.getReleaseName());
  PackageIdentifier packageIdentifier=upgradeRequest.getPackageIdentifier();
  PackageMetadata packageMetadata=this.packageMetadataRepository.findByNameAndOptionalVersionRequired(packageIdentifier.getPackageName(),packageIdentifier.getPackageVersion());
  Release replacingRelease=createReleaseForUpgrade(packageMetadata,latestRelease.getVersion() + 1,upgradeProperties,existingRelease.getPlatformName());
  Map<String,Object> model=ConfigValueUtils.mergeConfigValues(replacingRelease.getPkg(),replacingRelease.getConfigValues());
  String manifest=ManifestUtils.createManifest(replacingRelease.getPkg(),model);
  replacingRelease.setManifest(manifest);
  return this.releaseManager.createReport(existingRelease,replacingRelease);
}