Program: 7244
Project: 7244
Buggy source:
/** 
 * Overridden compareRemoteRevisionWith function Loads up the previous project configuration and compares  that against the current to determine if the project has changed
 * @see hudson.scm.SCM#compareRemoteRevisionWith(hudson.model.AbstractProject,hudson.Launcher,hudson.FilePath,hudson.model.TaskListener,hudson.scm.SCMRevisionState)
 */
@Override protected PollingResult compareRemoteRevisionWith(AbstractProject<?,?> project,Launcher launcher,FilePath workspace,final TaskListener listener,SCMRevisionState _baseline) throws IOException, InterruptedException {
  Logger.debug("String_Node_Str");
  IntegrityRevisionState baseline;
  IntegrityCMProject siProject=getIntegrityProject();
  if (_baseline instanceof IntegrityRevisionState) {
    baseline=(IntegrityRevisionState)_baseline;
    AbstractBuild<?,?> lastBuild=project.getLastBuild();
    if (null == lastBuild) {
      Logger.debug("String_Node_Str");
      return PollingResult.BUILD_NOW;
    }
 else {
      baseline=(IntegrityRevisionState)calcRevisionsFromBuild(lastBuild,launcher,listener);
      if (null != baseline && null != baseline.getProjectDB()) {
        APISession api=APISession.create(this);
        if (null != api) {
          try {
            String resolvedConfigPath=IntegrityCheckpointAction.evalGroovyExpression(project.getCharacteristicEnvVars(),configPath);
            listener.getLogger().println("String_Node_Str" + resolvedConfigPath);
            initializeCMProject(api,new File(lastBuild.getRootDir(),"String_Node_Str"),resolvedConfigPath);
            listener.getLogger().println("String_Node_Str" + resolvedConfigPath);
            initializeCMProjectMembers(api);
            File projectDB=baseline.getProjectDB();
            int changeCount=siProject.compareBaseline(projectDB,api);
            if (changeCount > 0) {
              listener.getLogger().println("String_Node_Str" + changeCount + "String_Node_Str");
              return PollingResult.SIGNIFICANT;
            }
 else {
              listener.getLogger().println("String_Node_Str");
              return PollingResult.NO_CHANGES;
            }
          }
 catch (          APIException aex) {
            Logger.error("String_Node_Str");
            listener.getLogger().println("String_Node_Str");
            ExceptionHandler eh=new ExceptionHandler(aex);
            Logger.error(eh.getMessage());
            listener.getLogger().println(eh.getMessage());
            Logger.debug(eh.getCommand() + "String_Node_Str" + eh.getExitCode());
            listener.getLogger().println(eh.getCommand() + "String_Node_Str" + eh.getExitCode());
            aex.printStackTrace();
            return PollingResult.NO_CHANGES;
          }
catch (          SQLException sqlex) {
            Logger.error("String_Node_Str");
            listener.getLogger().println("String_Node_Str");
            listener.getLogger().println(sqlex.getMessage());
            Logger.fatal(sqlex);
            return PollingResult.NO_CHANGES;
          }
 finally {
            api.Terminate();
            siProject.closeProjectDB();
          }
        }
 else {
          listener.getLogger().println("String_Node_Str");
          return PollingResult.NO_CHANGES;
        }
      }
 else {
        Logger.debug("String_Node_Str");
        return PollingResult.BUILD_NOW;
      }
    }
  }
 else {
    Logger.error("String_Node_Str");
    return PollingResult.NO_CHANGES;
  }
}

Fixed version (ground truth):
/** 
 * Overridden compareRemoteRevisionWith function Loads up the previous project configuration and compares  that against the current to determine if the project has changed
 * @see hudson.scm.SCM#compareRemoteRevisionWith(hudson.model.AbstractProject,hudson.Launcher,hudson.FilePath,hudson.model.TaskListener,hudson.scm.SCMRevisionState)
 */
@Override protected PollingResult compareRemoteRevisionWith(AbstractProject<?,?> project,Launcher launcher,FilePath workspace,final TaskListener listener,SCMRevisionState _baseline) throws IOException, InterruptedException {
  Logger.debug("String_Node_Str");
  IntegrityRevisionState baseline;
  IntegrityCMProject siProject=null;
  if (_baseline instanceof IntegrityRevisionState) {
    baseline=(IntegrityRevisionState)_baseline;
    AbstractBuild<?,?> lastBuild=project.getLastBuild();
    if (null == lastBuild) {
      Logger.debug("String_Node_Str");
      return PollingResult.BUILD_NOW;
    }
 else {
      baseline=(IntegrityRevisionState)calcRevisionsFromBuild(lastBuild,launcher,listener);
      if (null != baseline && null != baseline.getProjectDB()) {
        APISession api=APISession.create(this);
        if (null != api) {
          try {
            String resolvedConfigPath=IntegrityCheckpointAction.evalGroovyExpression(project.getCharacteristicEnvVars(),configPath);
            listener.getLogger().println("String_Node_Str" + resolvedConfigPath);
            initializeCMProject(api,new File(lastBuild.getRootDir(),"String_Node_Str"),resolvedConfigPath);
            listener.getLogger().println("String_Node_Str" + resolvedConfigPath);
            initializeCMProjectMembers(api);
            siProject=getIntegrityProject();
            File projectDB=baseline.getProjectDB();
            int changeCount=siProject.compareBaseline(projectDB,api);
            if (changeCount > 0) {
              listener.getLogger().println("String_Node_Str" + changeCount + "String_Node_Str");
              return PollingResult.SIGNIFICANT;
            }
 else {
              listener.getLogger().println("String_Node_Str");
              return PollingResult.NO_CHANGES;
            }
          }
 catch (          APIException aex) {
            Logger.error("String_Node_Str");
            listener.getLogger().println("String_Node_Str");
            ExceptionHandler eh=new ExceptionHandler(aex);
            Logger.error(eh.getMessage());
            listener.getLogger().println(eh.getMessage());
            Logger.debug(eh.getCommand() + "String_Node_Str" + eh.getExitCode());
            listener.getLogger().println(eh.getCommand() + "String_Node_Str" + eh.getExitCode());
            aex.printStackTrace();
            return PollingResult.NO_CHANGES;
          }
catch (          SQLException sqlex) {
            Logger.error("String_Node_Str");
            listener.getLogger().println("String_Node_Str");
            listener.getLogger().println(sqlex.getMessage());
            Logger.fatal(sqlex);
            return PollingResult.NO_CHANGES;
          }
 finally {
            api.Terminate();
            if (null != siProject) {
              siProject.closeProjectDB();
            }
          }
        }
 else {
          listener.getLogger().println("String_Node_Str");
          return PollingResult.NO_CHANGES;
        }
      }
 else {
        Logger.debug("String_Node_Str");
        return PollingResult.BUILD_NOW;
      }
    }
  }
 else {
    Logger.error("String_Node_Str");
    return PollingResult.NO_CHANGES;
  }
}