Program: 79522
Project: 79522
Buggy source:
@Override public void install(){
  String version=getEntity().getConfig(SoftwareProcess.SUGGESTED_VERSION);
  String majorMinorVersion=version.substring(0,version.lastIndexOf("String_Node_Str"));
  String shortVersion=majorMinorVersion.replace("String_Node_Str","String_Node_Str");
  Iterable<String> pgctlLocations=ImmutableList.of("String_Node_Str" + majorMinorVersion + "String_Node_Str","String_Node_Str" + shortVersion + "String_Node_Str","String_Node_Str" + majorMinorVersion + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  DynamicTasks.queueIfPossible(SshTasks.dontRequireTtyForSudo(getMachine(),true)).orSubmitAndBlock();
  MutableList<String> findOrInstall=MutableList.<String>of().append("String_Node_Str").appendAll(Iterables.transform(pgctlLocations,StringFunctions.formatter("String_Node_Str"))).append(installPackage(ImmutableMap.of("String_Node_Str","String_Node_Str" + shortVersion + "String_Node_Str"+ shortVersion+ "String_Node_Str","String_Node_Str","String_Node_Str" + majorMinorVersion,"String_Node_Str","String_Node_Str" + shortVersion + "String_Node_Str"+ shortVersion+ "String_Node_Str"),null)).append(warn(format("String_Node_Str",majorMinorVersion)));
  MutableList<String> linkFromHere=MutableList.<String>of().append(ifExecutableElse1("String_Node_Str",chainGroup("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"))).appendAll(Iterables.transform(pgctlLocations,givenDirIfFileExistsInItLinkToDir("String_Node_Str","String_Node_Str"))).append(fail(format("String_Node_Str",majorMinorVersion),9));
  newScript(INSTALLING).body.append(dontRequireTtyForSudo(),ifExecutableElse0("String_Node_Str",getYumRepository(version,majorMinorVersion,shortVersion)),ifExecutableElse0("String_Node_Str",getAptRepository()),"String_Node_Str",alternativesGroup(findOrInstall),alternativesGroup(linkFromHere)).failOnNonZeroResultCode().queue();
}

Fixed version (ground truth):
@Override public void install(){
  String version=getEntity().getConfig(SoftwareProcess.SUGGESTED_VERSION);
  String majorMinorVersion=version.substring(0,version.lastIndexOf("String_Node_Str"));
  String shortVersion=majorMinorVersion.replace("String_Node_Str","String_Node_Str");
  String altTarget="String_Node_Str";
  String altInstallDir=Urls.mergePaths(altTarget,"String_Node_Str" + majorMinorVersion);
  Iterable<String> pgctlLocations=ImmutableList.of(altInstallDir + "String_Node_Str","String_Node_Str" + majorMinorVersion + "String_Node_Str","String_Node_Str" + shortVersion + "String_Node_Str","String_Node_Str" + majorMinorVersion + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  DynamicTasks.queueIfPossible(SshTasks.dontRequireTtyForSudo(getMachine(),true)).orSubmitAndBlock();
  DynamicTasks.waitForLast();
  MutableList<String> findOrInstall=MutableList.<String>of().append("String_Node_Str").appendAll(Iterables.transform(pgctlLocations,StringFunctions.formatter("String_Node_Str"))).append(installPackage(ImmutableMap.of("String_Node_Str","String_Node_Str" + shortVersion + "String_Node_Str"+ shortVersion+ "String_Node_Str","String_Node_Str","String_Node_Str" + majorMinorVersion,"String_Node_Str","String_Node_Str" + shortVersion + "String_Node_Str"+ shortVersion+ "String_Node_Str"),null)).append(warn(format("String_Node_Str",majorMinorVersion)));
  MutableList<String> linkFromHere=MutableList.<String>of().append(ifExecutableElse1("String_Node_Str",chainGroup("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"))).appendAll(Iterables.transform(pgctlLocations,givenDirIfFileExistsInItLinkToDir("String_Node_Str","String_Node_Str"))).append(fail(format("String_Node_Str",majorMinorVersion),9));
  newScript(INSTALLING).body.append(dontRequireTtyForSudo(),ifExecutableElse0("String_Node_Str",getYumRepository(version,majorMinorVersion,shortVersion)),ifExecutableElse0("String_Node_Str",getAptRepository()),"String_Node_Str",alternativesGroup(findOrInstall),alternativesGroup(linkFromHere)).failOnNonZeroResultCode().queue();
  if (DynamicTasks.queue(SshEffectorTasks.ssh(sudoAsUser("String_Node_Str","String_Node_Str" + getInstallDir())).allowingNonZeroExitCode().summary("String_Node_Str")).asTask().getUnchecked() != 0) {
    log.info("String_Node_Str" + getInstallDir() + "String_Node_Str"+ getEntity()+ "String_Node_Str"+ "String_Node_Str"+ altInstallDir+ "String_Node_Str");
    String newRunDir=Urls.mergePaths(altTarget,"String_Node_Str",getEntity().getApplication().getId(),getEntity().getId());
    if (DynamicTasks.queue(SshEffectorTasks.ssh("String_Node_Str" + altInstallDir + "String_Node_Str").allowingNonZeroExitCode().summary("String_Node_Str" + altInstallDir + "String_Node_Str")).asTask().getUnchecked() == 0) {
    }
 else {
      DynamicTasks.queue(SshEffectorTasks.ssh("String_Node_Str" + altInstallDir,"String_Node_Str" + altInstallDir + "String_Node_Str","String_Node_Str" + getInstallDir() + "String_Node_Str"+ altInstallDir,"String_Node_Str" + getInstallDir() + "String_Node_Str","String_Node_Str" + altInstallDir + "String_Node_Str"+ getInstallDir(),"String_Node_Str" + newRunDir,"String_Node_Str" + altTarget).runAsRoot().requiringExitCodeZero().summary("String_Node_Str"));
    }
    DynamicTasks.waitForLast();
    setInstallDir(altInstallDir);
    setRunDir(newRunDir);
  }
}