Program: 98754
Project: 98754
Buggy source:
@Override public boolean perform(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener) throws InterruptedException, IOException {
  String productUsed=product;
  out=listener.getLogger();
  PRQAToolSuite suite=null;
  QACToolSuite qacSuite=QACToolSuite.getInstallationByName(product);
  out.println(VersionInfo.getPluginVersion());
  if (qacSuite != null) {
    productUsed=qacSuite.tool;
    suite=qacSuite;
  }
  QAVerifyServerConfiguration conf=PRQAGlobalConfig.get().getConfigurationByName(chosenServer);
  PRQAApplicationSettings appSettings=null;
  if (suite != null) {
    if (suite instanceof QACToolSuite) {
      QACToolSuite cSuite=(QACToolSuite)suite;
      appSettings=new PRQAApplicationSettings(cSuite.qarHome,cSuite.qavHome,cSuite.qawHome,cSuite.getHome());
    }
  }
  PRQAReportSettings settings=null;
  QAR qar=null;
  if (source != null && source instanceof PRQAReportProjectFileSource) {
    PRQAReportProjectFileSource pSource=(PRQAReportProjectFileSource)source;
    settings=new PRQAReportSettings(chosenServer,pSource.projectFile,performCrossModuleAnalysis,publishToQAV,enableDependencyMode,enableDataFlowAnalysis,chosenReportTypes,productUsed);
    qar=new QAR(productUsed,pSource.projectFile,QARReportType.Compliance);
  }
 else   if (source != null && source instanceof PRQAReportFileListSource) {
    PRQAReportFileListSource flSource=(PRQAReportFileListSource)source;
    settings=new PRQAReportSettings(chosenServer,flSource.fileList,performCrossModuleAnalysis,publishToQAV,enableDependencyMode,enableDataFlowAnalysis,chosenReportTypes,productUsed,flSource.settingsFile);
    qar=new QAR(productUsed,flSource.fileList,QARReportType.Compliance);
  }
  if (generateReports) {
    out.println(Messages.PRQANotifier_ReportGenerateText());
    out.println(qar);
  }
 else {
    out.println("String_Node_Str");
  }
  PRQAUploadSettings uploadSettings=new PRQAUploadSettings(vcsConfigXml,singleSnapshotMode,codeUploadSetting,sourceOrigin,qaVerifyProjectName);
  QAVerifyServerSettings qavSettings=null;
  if (conf != null) {
    qavSettings=new QAVerifyServerSettings(conf.getHostName(),conf.getPortNumber(),conf.getProtocol(),conf.getPassword(),conf.getUserName());
  }
  HashMap<String,String> environment=null;
  if (suite != null) {
    environment=suite.createEnvironmentVariables(build.getWorkspace().getRemote());
  }
  boolean success=true;
  PRQAComplianceStatus status=null;
  try {
    if (qacSuite == null && (!productUsed.equals("String_Node_Str") || !productUsed.equals("String_Node_Str"))) {
      throw new PrqaSetupException("String_Node_Str");
    }
    if (source == null) {
      throw new PrqaSetupException("String_Node_Str");
    }
    PRQAReport report=new PRQAReport(settings,qavSettings,uploadSettings,appSettings,environment);
    if (productUsed.equals("String_Node_Str")) {
      String qacVersion=build.getWorkspace().act(new PRQARemoteToolCheck(new QAC(appSettings.productHome),environment,appSettings,settings,listener,launcher.isUnix()));
      out.println("String_Node_Str" + qacVersion);
    }
 else     if (productUsed.equals("String_Node_Str")) {
      String qacppVersion=build.getWorkspace().act(new PRQARemoteToolCheck(new QACpp(appSettings.productHome),environment,appSettings,settings,listener,launcher.isUnix()));
      out.println("String_Node_Str" + qacppVersion);
    }
    String qawVersion=build.getWorkspace().act(new PRQARemoteToolCheck(new QAW(),environment,appSettings,settings,listener,launcher.isUnix()));
    out.println("String_Node_Str" + qawVersion);
    String qarVersion=build.getWorkspace().act(new PRQARemoteToolCheck(qar,environment,appSettings,settings,listener,launcher.isUnix()));
    out.println("String_Node_Str" + qarVersion);
    status=build.getWorkspace().act(new PRQARemoteReport(report,listener,launcher.isUnix()));
    status.setMessagesWithinThreshold(status.getMessageCount(threshholdlevel));
  }
 catch (  IOException ex) {
    Throwable myCase=ExceptionUtils.unpackFrom(IOException.class,ex);
    if (myCase instanceof PrqaSetupException) {
      out.println(String.format("String_Node_Str",VersionInfo.WIKI_PAGE));
      out.println(myCase.getMessage());
      log.log(Level.SEVERE,"String_Node_Str",myCase);
    }
 else     if (myCase instanceof PrqaUploadException) {
      out.println("String_Node_Str");
      out.println(myCase.getMessage());
      log.log(Level.SEVERE,"String_Node_Str",myCase);
    }
 else     if (myCase instanceof PrqaParserException) {
      out.println(myCase.getMessage());
      log.log(Level.SEVERE,"String_Node_Str",myCase);
    }
 else     if (myCase instanceof PrqaException) {
      out.println(myCase.getMessage());
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
    success=false;
    return false;
  }
catch (  Exception ex) {
    out.println(Messages.PRQANotifier_FailedGettingResults());
    out.println("String_Node_Str");
    ex.printStackTrace(out);
    log.log(Level.SEVERE,"String_Node_Str",ex);
    return false;
  }
 finally {
    try {
      if (generateReports && success) {
        copyReportsToArtifactsDir(settings,build);
      }
      if (publishToQAV && success) {
        copyReourcesToArtifactsDir("String_Node_Str",build);
      }
    }
 catch (    Exception ex) {
      out.println("String_Node_Str");
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
  if (status == null && generateReports) {
    out.println(Messages.PRQANotifier_FailedGettingResults());
    return false;
  }
  Tuple<PRQAReading,AbstractBuild<?,?>> previousResult=getPreviousReading(build,Result.SUCCESS);
  if (status == null && !generateReports) {
    out.println(Messages.PRQANotifier_SkipOk());
    return true;
  }
  status.setThresholds(thresholds);
  boolean res=true;
  if (previousResult != null) {
    out.println(String.format(Messages.PRQANotifier_PreviousResultBuildNumber(new Integer(previousResult.getSecond().number))));
    out.println(previousResult.getFirst());
  }
 else {
    out.println(Messages.PRQANotifier_NoPreviousResults());
  }
  PRQAReading lar=previousResult != null ? previousResult.getFirst() : null;
  ComparisonSettings fileCompliance=ComparisonSettings.valueOf(settingFileCompliance);
  ComparisonSettings projCompliance=ComparisonSettings.valueOf(settingProjectCompliance);
  ComparisonSettings maxMsg=ComparisonSettings.valueOf(settingMaxMessages);
  try {
    Double currentFileCompliance=status.getReadout(StatusCategory.ProjectCompliance).doubleValue();
    if (fileCompliance == ComparisonSettings.Improvement) {
      if (lar != null) {
        Double previous=lar.getReadout(StatusCategory.FileCompliance).doubleValue();
        if (currentFileCompliance < previous) {
          status.addNotification(Messages.PRQANotifier_ProjectComplianceIndexRequirementNotMet(currentFileCompliance,previous));
          res=false;
        }
      }
    }
 else     if (fileCompliance == ComparisonSettings.Threshold) {
      if (currentFileCompliance < fileComplianceIndex) {
        status.addNotification(Messages.PRQANotifier_FileComplianceRequirementNotMet(currentFileCompliance,fileComplianceIndex));
        res=false;
      }
    }
    Double currentProjecCompliance=status.getReadout(StatusCategory.ProjectCompliance).doubleValue();
    if (projCompliance == ComparisonSettings.Threshold) {
      if (currentProjecCompliance < projectComplianceIndex) {
        status.addNotification(Messages.PRQANotifier_ProjectComplianceIndexRequirementNotMet(currentProjecCompliance,projectComplianceIndex));
        res=false;
      }
    }
 else     if (projCompliance == ComparisonSettings.Improvement) {
      if (lar != null) {
        Double previous=lar.getReadout(StatusCategory.ProjectCompliance).doubleValue();
        if (currentProjecCompliance < previous) {
          status.addNotification(Messages.PRQANotifier_ProjectComplianceIndexRequirementNotMet(currentProjecCompliance,previous));
          res=false;
        }
      }
    }
  }
 catch (  PrqaException ex) {
    out.println("String_Node_Str");
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
  int current=((PRQAComplianceStatus)status).getMessageCount(threshholdlevel);
  if (maxMsg == ComparisonSettings.Improvement) {
    if (lar != null) {
      int previous=((PRQAComplianceStatus)lar).getMessageCount(threshholdlevel);
      if (current > previous) {
        status.addNotification(Messages.PRQANotifier_MaxMessagesRequirementNotMet(current,previous));
        res=false;
      }
    }
  }
 else   if (maxMsg == ComparisonSettings.Threshold) {
    if (current > totalMax) {
      status.addNotification(Messages.PRQANotifier_MaxMessagesRequirementNotMet(current,totalMax));
      res=false;
    }
  }
  out.println(Messages.PRQANotifier_ScannedValues());
  out.println(status);
  PRQABuildAction action=new PRQABuildAction(build);
  action.setResult(status);
  action.setPublisher(this);
  if (!res) {
    build.setResult(Result.UNSTABLE);
  }
  build.getActions().add(action);
  return true;
}

Fixed version (ground truth):
@Override public boolean perform(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener) throws InterruptedException, IOException {
  String productUsed=product;
  out=listener.getLogger();
  PRQAToolSuite suite=null;
  QACToolSuite qacSuite=QACToolSuite.getInstallationByName(product);
  out.println(VersionInfo.getPluginVersion());
  if (qacSuite != null) {
    productUsed=qacSuite.tool;
    suite=qacSuite;
  }
  QAVerifyServerConfiguration conf=PRQAGlobalConfig.get().getConfigurationByName(chosenServer);
  PRQAApplicationSettings appSettings=null;
  if (suite != null) {
    if (suite instanceof QACToolSuite) {
      QACToolSuite cSuite=(QACToolSuite)suite;
      appSettings=new PRQAApplicationSettings(cSuite.qarHome,cSuite.qavHome,cSuite.qawHome,cSuite.getHome());
    }
  }
  PRQAReportSettings settings=null;
  QAR qar=null;
  if (source != null && source instanceof PRQAReportProjectFileSource) {
    PRQAReportProjectFileSource pSource=(PRQAReportProjectFileSource)source;
    settings=new PRQAReportSettings(chosenServer,pSource.projectFile,performCrossModuleAnalysis,publishToQAV,enableDependencyMode,enableDataFlowAnalysis,chosenReportTypes,productUsed);
    qar=new QAR(productUsed,pSource.projectFile,QARReportType.Compliance);
  }
 else   if (source != null && source instanceof PRQAReportFileListSource) {
    PRQAReportFileListSource flSource=(PRQAReportFileListSource)source;
    settings=new PRQAReportSettings(chosenServer,flSource.fileList,performCrossModuleAnalysis,publishToQAV,enableDependencyMode,enableDataFlowAnalysis,chosenReportTypes,productUsed,flSource.settingsFile);
    qar=new QAR(productUsed,flSource.fileList,QARReportType.Compliance);
  }
  if (generateReports) {
    out.println(Messages.PRQANotifier_ReportGenerateText());
    out.println(qar);
  }
 else {
    out.println("String_Node_Str");
  }
  PRQAUploadSettings uploadSettings=new PRQAUploadSettings(vcsConfigXml,singleSnapshotMode,codeUploadSetting,sourceOrigin,qaVerifyProjectName);
  QAVerifyServerSettings qavSettings=null;
  if (conf != null) {
    qavSettings=new QAVerifyServerSettings(conf.getHostName(),conf.getPortNumber(),conf.getProtocol(),conf.getPassword(),conf.getUserName());
  }
  HashMap<String,String> environment=null;
  if (suite != null) {
    environment=suite.createEnvironmentVariables(build.getWorkspace().getRemote());
  }
  boolean success=true;
  PRQAComplianceStatus status=null;
  try {
    if (qacSuite == null && !(productUsed.equals("String_Node_Str") || productUsed.equals("String_Node_Str"))) {
      throw new PrqaSetupException(String.format("String_Node_Str",productUsed));
    }
    if (source == null) {
      throw new PrqaSetupException("String_Node_Str");
    }
    PRQAReport report=new PRQAReport(settings,qavSettings,uploadSettings,appSettings,environment);
    if (productUsed.equals("String_Node_Str")) {
      String qacVersion=build.getWorkspace().act(new PRQARemoteToolCheck(new QAC(),environment,appSettings,settings,listener,launcher.isUnix()));
      out.println("String_Node_Str" + qacVersion);
    }
 else     if (productUsed.equals("String_Node_Str")) {
      String qacppVersion=build.getWorkspace().act(new PRQARemoteToolCheck(new QACpp(),environment,appSettings,settings,listener,launcher.isUnix()));
      out.println("String_Node_Str" + qacppVersion);
    }
    String qawVersion=build.getWorkspace().act(new PRQARemoteToolCheck(new QAW(),environment,appSettings,settings,listener,launcher.isUnix()));
    out.println("String_Node_Str" + qawVersion);
    String qarVersion=build.getWorkspace().act(new PRQARemoteToolCheck(qar,environment,appSettings,settings,listener,launcher.isUnix()));
    out.println("String_Node_Str" + qarVersion);
    status=build.getWorkspace().act(new PRQARemoteReport(report,listener,launcher.isUnix()));
    status.setMessagesWithinThreshold(status.getMessageCount(threshholdlevel));
  }
 catch (  IOException ex) {
    Throwable myCase=ExceptionUtils.unpackFrom(IOException.class,ex);
    if (myCase instanceof PrqaSetupException) {
      out.println(String.format("String_Node_Str",VersionInfo.WIKI_PAGE));
      out.println(myCase.getMessage());
      log.log(Level.SEVERE,"String_Node_Str",myCase);
    }
 else     if (myCase instanceof PrqaUploadException) {
      out.println("String_Node_Str");
      out.println(myCase.getMessage());
      log.log(Level.SEVERE,"String_Node_Str",myCase);
    }
 else     if (myCase instanceof PrqaParserException) {
      out.println(myCase.getMessage());
      log.log(Level.SEVERE,"String_Node_Str",myCase);
    }
 else     if (myCase instanceof PrqaException) {
      out.println(myCase.getMessage());
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
    success=false;
    return false;
  }
catch (  Exception ex) {
    out.println(Messages.PRQANotifier_FailedGettingResults());
    out.println("String_Node_Str");
    ex.printStackTrace(out);
    log.log(Level.SEVERE,"String_Node_Str",ex);
    return false;
  }
 finally {
    try {
      if (generateReports && success) {
        copyReportsToArtifactsDir(settings,build);
      }
      if (publishToQAV && success) {
        copyReourcesToArtifactsDir("String_Node_Str",build);
      }
    }
 catch (    Exception ex) {
      out.println("String_Node_Str");
      log.log(Level.SEVERE,"String_Node_Str",ex);
    }
  }
  if (status == null && generateReports) {
    out.println(Messages.PRQANotifier_FailedGettingResults());
    return false;
  }
  Tuple<PRQAReading,AbstractBuild<?,?>> previousResult=getPreviousReading(build,Result.SUCCESS);
  if (status == null && !generateReports) {
    out.println(Messages.PRQANotifier_SkipOk());
    return true;
  }
  status.setThresholds(thresholds);
  boolean res=true;
  if (previousResult != null) {
    out.println(String.format(Messages.PRQANotifier_PreviousResultBuildNumber(new Integer(previousResult.getSecond().number))));
    out.println(previousResult.getFirst());
  }
 else {
    out.println(Messages.PRQANotifier_NoPreviousResults());
  }
  PRQAReading lar=previousResult != null ? previousResult.getFirst() : null;
  ComparisonSettings fileCompliance=ComparisonSettings.valueOf(settingFileCompliance);
  ComparisonSettings projCompliance=ComparisonSettings.valueOf(settingProjectCompliance);
  ComparisonSettings maxMsg=ComparisonSettings.valueOf(settingMaxMessages);
  try {
    Double currentFileCompliance=status.getReadout(StatusCategory.ProjectCompliance).doubleValue();
    if (fileCompliance == ComparisonSettings.Improvement) {
      if (lar != null) {
        Double previous=lar.getReadout(StatusCategory.FileCompliance).doubleValue();
        if (currentFileCompliance < previous) {
          status.addNotification(Messages.PRQANotifier_ProjectComplianceIndexRequirementNotMet(currentFileCompliance,previous));
          res=false;
        }
      }
    }
 else     if (fileCompliance == ComparisonSettings.Threshold) {
      if (currentFileCompliance < fileComplianceIndex) {
        status.addNotification(Messages.PRQANotifier_FileComplianceRequirementNotMet(currentFileCompliance,fileComplianceIndex));
        res=false;
      }
    }
    Double currentProjecCompliance=status.getReadout(StatusCategory.ProjectCompliance).doubleValue();
    if (projCompliance == ComparisonSettings.Threshold) {
      if (currentProjecCompliance < projectComplianceIndex) {
        status.addNotification(Messages.PRQANotifier_ProjectComplianceIndexRequirementNotMet(currentProjecCompliance,projectComplianceIndex));
        res=false;
      }
    }
 else     if (projCompliance == ComparisonSettings.Improvement) {
      if (lar != null) {
        Double previous=lar.getReadout(StatusCategory.ProjectCompliance).doubleValue();
        if (currentProjecCompliance < previous) {
          status.addNotification(Messages.PRQANotifier_ProjectComplianceIndexRequirementNotMet(currentProjecCompliance,previous));
          res=false;
        }
      }
    }
  }
 catch (  PrqaException ex) {
    out.println("String_Node_Str");
    log.log(Level.SEVERE,"String_Node_Str",ex);
  }
  int current=((PRQAComplianceStatus)status).getMessageCount(threshholdlevel);
  if (maxMsg == ComparisonSettings.Improvement) {
    if (lar != null) {
      int previous=((PRQAComplianceStatus)lar).getMessageCount(threshholdlevel);
      if (current > previous) {
        status.addNotification(Messages.PRQANotifier_MaxMessagesRequirementNotMet(current,previous));
        res=false;
      }
    }
  }
 else   if (maxMsg == ComparisonSettings.Threshold) {
    if (current > totalMax) {
      status.addNotification(Messages.PRQANotifier_MaxMessagesRequirementNotMet(current,totalMax));
      res=false;
    }
  }
  out.println(Messages.PRQANotifier_ScannedValues());
  out.println(status);
  PRQABuildAction action=new PRQABuildAction(build);
  action.setResult(status);
  action.setPublisher(this);
  if (!res) {
    build.setResult(Result.UNSTABLE);
  }
  build.getActions().add(action);
  return true;
}