Program: 98744
Project: 98744
Buggy source:
private boolean performQaFrameworkBuild(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener){
  QAFrameworkPostBuildActionSetup qaFrameworkPostBuildActionSetup=(QAFrameworkPostBuildActionSetup)sourceQAFramework;
  QAFrameworkInstallationConfiguration qaFrameworkInstallationConfiguration=QAFrameworkInstallationConfiguration.getInstallationByName(qaFrameworkPostBuildActionSetup.qaInstallation);
  outStream.println(VersionInfo.getPluginVersion());
  PRQAToolSuite suite=null;
  if (qaFrameworkInstallationConfiguration != null) {
    suite=qaFrameworkInstallationConfiguration;
  }
 else {
    try {
      throw new PrqaSetupException(String.format("String_Node_Str","String_Node_Str"));
    }
 catch (    PrqaSetupException pex) {
      outStream.println(pex.getMessage());
      log.log(Level.WARNING,"String_Node_Str",pex);
      return false;
    }
  }
  outStream.println(Messages.PRQANotifier_ReportGenerateText());
  outStream.println("String_Node_Str" + build.getWorkspace().getRemote());
  HashMap<String,String> environmentVariables=null;
  if (suite != null) {
    environmentVariables=suite.createEnvironmentVariables(build.getWorkspace().getRemote());
  }
  PRQAApplicationSettings appSettings=new PRQAApplicationSettings(qaFrameworkInstallationConfiguration.getHome());
  QaFrameworkReportSettings qaReportSettings;
  try {
    qaReportSettings=setQaFrameworkReportSettings(qaFrameworkPostBuildActionSetup,build);
  }
 catch (  PrqaException ex) {
    log.log(Level.WARNING,"String_Node_Str",ex.getMessage());
    return false;
  }
  QAVerifyServerSettings qaVerifySettings=setQaVerifyServerSettings(qaFrameworkPostBuildActionSetup.chosenServer);
  QAFrameworkReport report=new QAFrameworkReport(qaReportSettings,qaVerifySettings,appSettings,environmentVariables);
  PRQARemoteToolCheck remoteToolCheck=new PRQARemoteToolCheck(new QACli(),environmentVariables,appSettings,qaReportSettings,listener,launcher.isUnix());
  QAFrameworkRemoteReport remoteReport=new QAFrameworkRemoteReport(report,listener,launcher.isUnix());
  QAFrameworkRemoteReportUpload remoteReportUpload=new QAFrameworkRemoteReportUpload(report,listener,launcher.isUnix());
  PRQAComplianceStatus currentBuild;
  try {
    currentBuild=performBuild(build,appSettings,remoteToolCheck,remoteReport,qaReportSettings);
  }
 catch (  PrqaException ex) {
    log.log(Level.WARNING,"String_Node_Str",ex.getMessage());
    return false;
  }
  Tuple<PRQAReading,AbstractBuild<?,?>> previousBuildResultTuple=getPreviousReading(build,Result.SUCCESS);
  PRQAReading previousStabileBuildResult=previousBuildResultTuple != null ? previousBuildResultTuple.getFirst() : null;
  boolean res=true;
  log.fine("String_Node_Str" + (thresholdsDesc == null));
  if (thresholdsDesc != null) {
    log.fine("String_Node_Str" + thresholdsDesc.size());
  }
  try {
    res=evaluate((PRQAComplianceStatus)previousStabileBuildResult,thresholdsDesc,currentBuild);
    log.fine("String_Node_Str" + res);
  }
 catch (  Exception ex) {
    outStream.println("String_Node_Str");
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
  PRQABuildAction action=new PRQABuildAction(build);
  action.setResult(currentBuild);
  action.setPublisher(this);
  Result buildResult=build.getResult();
  if (!res) {
    if (!buildResult.isWorseOrEqualTo(Result.FAILURE)) {
      build.setResult(Result.UNSTABLE);
    }
    if (qaReportSettings.isPublishToQAV() && !qaReportSettings.isQaUploadWhenStable() && !buildResult.isWorseOrEqualTo(Result.FAILURE)) {
      try {
        outStream.println("String_Node_Str");
        performUpload(build,appSettings,remoteToolCheck,remoteReportUpload);
      }
 catch (      PrqaException ex) {
        log.log(Level.WARNING,"String_Node_Str",ex.getMessage());
        return false;
      }
    }
 else     if (qaReportSettings.isPublishToQAV() && (qaReportSettings.isQaUploadWhenStable() || buildResult.isWorseOrEqualTo(Result.FAILURE))) {
      outStream.println("String_Node_Str");
      log.warning("String_Node_Str");
    }
  }
 else   if (qaReportSettings.isPublishToQAV()) {
    if (buildResult.isWorseOrEqualTo(Result.FAILURE) && qaReportSettings.isQaUploadWhenStable()) {
      outStream.println("String_Node_Str");
      log.warning("String_Node_Str");
    }
 else {
      try {
        outStream.println("String_Node_Str");
        performUpload(build,appSettings,remoteToolCheck,remoteReportUpload);
      }
 catch (      PrqaException ex) {
        log.log(Level.WARNING,"String_Node_Str",ex.getMessage());
        return false;
      }
    }
  }
  outStream.println("String_Node_Str");
  if (previousBuildResultTuple != null) {
    outStream.println(String.format(Messages.PRQANotifier_PreviousResultBuildNumber(new Integer(previousBuildResultTuple.getSecond().number))));
    outStream.println(previousBuildResultTuple.getFirst());
  }
 else {
    outStream.println(Messages.PRQANotifier_NoPreviousResults());
  }
  outStream.println(Messages.PRQANotifier_ScannedValues());
  outStream.println(currentBuild);
  build.getActions().add(action);
  return true;
}

Fixed version (ground truth):
private boolean performQaFrameworkBuild(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener){
  QAFrameworkPostBuildActionSetup qaFrameworkPostBuildActionSetup=(QAFrameworkPostBuildActionSetup)sourceQAFramework;
  QAFrameworkInstallationConfiguration qaFrameworkInstallationConfiguration=QAFrameworkInstallationConfiguration.getInstallationByName(qaFrameworkPostBuildActionSetup.qaInstallation);
  outStream.println(VersionInfo.getPluginVersion());
  PRQAToolSuite suite=null;
  if (qaFrameworkInstallationConfiguration != null) {
    suite=qaFrameworkInstallationConfiguration;
  }
 else {
    try {
      throw new PrqaSetupException(String.format("String_Node_Str","String_Node_Str"));
    }
 catch (    PrqaSetupException pex) {
      outStream.println(pex.getMessage());
      log.log(Level.WARNING,"String_Node_Str",pex.getCause());
      return false;
    }
  }
  outStream.println(Messages.PRQANotifier_ReportGenerateText());
  outStream.println("String_Node_Str" + build.getWorkspace().getRemote());
  HashMap<String,String> environmentVariables=null;
  if (suite != null) {
    environmentVariables=suite.createEnvironmentVariables(build.getWorkspace().getRemote());
  }
  PRQAApplicationSettings appSettings=new PRQAApplicationSettings(qaFrameworkInstallationConfiguration.getHome());
  QaFrameworkReportSettings qaReportSettings;
  try {
    qaReportSettings=setQaFrameworkReportSettings(qaFrameworkPostBuildActionSetup,build);
  }
 catch (  PrqaException ex) {
    log.log(Level.WARNING,"String_Node_Str",ex.getMessage());
    return false;
  }
  QAVerifyServerSettings qaVerifySettings=setQaVerifyServerSettings(qaFrameworkPostBuildActionSetup.chosenServer);
  QAFrameworkReport report=new QAFrameworkReport(qaReportSettings,qaVerifySettings,appSettings,environmentVariables);
  PRQARemoteToolCheck remoteToolCheck=new PRQARemoteToolCheck(new QACli(),environmentVariables,appSettings,qaReportSettings,listener,launcher.isUnix());
  QAFrameworkRemoteReport remoteReport=new QAFrameworkRemoteReport(report,listener,launcher.isUnix());
  QAFrameworkRemoteReportUpload remoteReportUpload=new QAFrameworkRemoteReportUpload(report,listener,launcher.isUnix());
  PRQAComplianceStatus currentBuild;
  try {
    currentBuild=performBuild(build,appSettings,remoteToolCheck,remoteReport,qaReportSettings);
  }
 catch (  PrqaException ex) {
    log.log(Level.WARNING,"String_Node_Str",ex.getMessage());
    return false;
  }
  Tuple<PRQAReading,AbstractBuild<?,?>> previousBuildResultTuple=getPreviousReading(build,Result.SUCCESS);
  PRQAReading previousStabileBuildResult=previousBuildResultTuple != null ? previousBuildResultTuple.getFirst() : null;
  boolean res=true;
  log.fine("String_Node_Str" + (thresholdsDesc == null));
  if (thresholdsDesc != null) {
    log.fine("String_Node_Str" + thresholdsDesc.size());
  }
  try {
    res=evaluate((PRQAComplianceStatus)previousStabileBuildResult,thresholdsDesc,currentBuild);
    log.fine("String_Node_Str" + res);
  }
 catch (  Exception ex) {
    outStream.println("String_Node_Str");
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
  PRQABuildAction action=new PRQABuildAction(build);
  action.setResult(currentBuild);
  action.setPublisher(this);
  Result buildResult=build.getResult();
  if (!res) {
    if (!buildResult.isWorseOrEqualTo(Result.FAILURE)) {
      build.setResult(Result.UNSTABLE);
    }
    if (qaReportSettings.isPublishToQAV() && !qaReportSettings.isQaUploadWhenStable() && !buildResult.isWorseOrEqualTo(Result.FAILURE)) {
      try {
        outStream.println("String_Node_Str");
        performUpload(build,appSettings,remoteToolCheck,remoteReportUpload);
      }
 catch (      PrqaException ex) {
        log.log(Level.WARNING,"String_Node_Str",ex.getMessage());
        return false;
      }
    }
 else     if (qaReportSettings.isPublishToQAV() && (qaReportSettings.isQaUploadWhenStable() || buildResult.isWorseOrEqualTo(Result.FAILURE))) {
      outStream.println("String_Node_Str");
      log.warning("String_Node_Str");
    }
  }
 else   if (qaReportSettings.isPublishToQAV()) {
    if (buildResult.isWorseOrEqualTo(Result.FAILURE) && qaReportSettings.isQaUploadWhenStable()) {
      outStream.println("String_Node_Str");
      log.warning("String_Node_Str");
    }
 else {
      try {
        outStream.println("String_Node_Str");
        performUpload(build,appSettings,remoteToolCheck,remoteReportUpload);
      }
 catch (      PrqaException ex) {
        log.log(Level.WARNING,"String_Node_Str",ex.getMessage());
        return false;
      }
    }
  }
  outStream.println("String_Node_Str");
  if (previousBuildResultTuple != null) {
    outStream.println(String.format(Messages.PRQANotifier_PreviousResultBuildNumber(new Integer(previousBuildResultTuple.getSecond().number))));
    outStream.println(previousBuildResultTuple.getFirst());
  }
 else {
    outStream.println(Messages.PRQANotifier_NoPreviousResults());
  }
  outStream.println(Messages.PRQANotifier_ScannedValues());
  outStream.println(currentBuild);
  build.getActions().add(action);
  return true;
}