Program: 7252
Project: 7252
Buggy source:
/** 
 * Overridden checkout function This is the real invocation of this plugin. Currently, we will do a project info and determine the true nature of the project Subsequent to that we will run a view project command and cache the information on each member, so that we can execute project checkout commands.  This obviously eliminates the need for a sandbox and can wily nilly delete the workspace directory as needed
 * @see hudson.scm.SCM#checkout(hudson.model.AbstractBuild,hudson.Launcher,hudson.FilePath,hudson.model.BuildListener,java.io.File)
 */
@Override public boolean checkout(AbstractBuild<?,?> build,Launcher launcher,FilePath workspace,BuildListener listener,File changeLogFile) throws IOException, InterruptedException {
  Logger.debug("String_Node_Str");
  listener.getLogger().println("String_Node_Str" + ciServerURL + build.getUrl()+ "String_Node_Str");
  listener.getLogger().println("String_Node_Str" + ciServerURL + build.getUrl()+ "String_Node_Str");
  APISession api=createAPISession();
  if (null == api) {
    listener.getLogger().println("String_Node_Str");
    return false;
  }
  PrintWriter writer=new PrintWriter(new OutputStreamWriter(new FileOutputStream(changeLogFile),"String_Node_Str"));
  try {
    listener.getLogger().println("String_Node_Str" + configPath);
    initializeCMProject(api,build.getRootDir());
    if (checkpointBeforeBuild) {
      if (!siProject.isBuild()) {
        listener.getLogger().println("String_Node_Str" + siProject.getConfigurationPath());
        Response res=siProject.checkpoint(api,"String_Node_Str");
        Logger.debug(res.getCommandString() + "String_Node_Str" + res.getExitCode());
        WorkItem wi=res.getWorkItem(siProject.getConfigurationPath());
        String chkpt=wi.getResult().getField("String_Node_Str").getItem().getId();
        listener.getLogger().println("String_Node_Str" + siProject.getConfigurationPath() + "String_Node_Str"+ chkpt);
        Command siProjectInfoCmd=new Command(Command.SI,"String_Node_Str");
        siProjectInfoCmd.addOption(new Option("String_Node_Str",siProject.getProjectName()));
        siProjectInfoCmd.addOption(new Option("String_Node_Str",chkpt));
        Response infoRes=api.runCommand(siProjectInfoCmd);
        siProject.initializeProject(infoRes.getWorkItems().next());
      }
 else {
        listener.getLogger().println("String_Node_Str");
      }
    }
    listener.getLogger().println("String_Node_Str" + siProject.getConfigurationPath());
    initializeCMProjectMembers(api);
    AbstractBuild<?,?> previousBuild=build.getPreviousBuild();
    for (AbstractBuild<?,?> b=build.getPreviousBuild(); null != b; b=b.getPreviousBuild()) {
      File prevProjectDB=new File(build.getRootDir(),DerbyUtils.DERBY_DB_FOLDER);
      if (prevProjectDB.isDirectory()) {
        Logger.debug("String_Node_Str" + b.getNumber());
        previousBuild=b;
        break;
      }
    }
    File prevProjectDB=getIntegrityCMProjectDB(previousBuild);
    if (null != prevProjectDB && prevProjectDB.isDirectory()) {
      siProject.compareBaseline(prevProjectDB.getParentFile(),api);
    }
 else {
      Logger.debug("String_Node_Str");
      if (!skipAuthorInfo) {
        siProject.primeAuthorInformation(api);
      }
    }
    List<Hashtable<CM_PROJECT,Object>> projectMembersList=siProject.viewProject();
    List<String> dirList=siProject.getDirList();
    IntegrityCheckoutTask coTask=null;
    if (null == prevProjectDB) {
      coTask=new IntegrityCheckoutTask(projectMembersList,dirList,alternateWorkspace,lineTerminator,restoreTimestamp,true,fetchChangedWorkspaceFiles,checkoutThreadPoolSize,listener);
    }
 else {
      coTask=new IntegrityCheckoutTask(projectMembersList,dirList,alternateWorkspace,lineTerminator,restoreTimestamp,cleanCopy,fetchChangedWorkspaceFiles,checkoutThreadPoolSize,listener);
    }
    coTask.initAPIVariables(ipHostName,ipPort,hostName,port,secure,userName,password);
    if (workspace.act(coTask)) {
      listener.getLogger().println("String_Node_Str");
      if (fetchChangedWorkspaceFiles) {
        siProject.updateChecksum(coTask.getChecksumUpdates());
      }
      listener.getLogger().println("String_Node_Str");
      writer.println(siProject.getChangeLog(String.valueOf(build.getNumber()),projectMembersList));
      listener.getLogger().println("String_Node_Str" + changeLogFile.getAbsolutePath());
      if (deleteNonMembers) {
        IntegrityDeleteNonMembersTask deleteNonMembers=new IntegrityDeleteNonMembersTask(build,listener,alternateWorkspace,getIntegrityProject());
        if (!workspace.act(deleteNonMembers)) {
          return false;
        }
      }
    }
 else {
      return false;
    }
  }
 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());
    Logger.fatal(aex);
    return false;
  }
catch (  SQLException sqlex) {
    Logger.error("String_Node_Str");
    listener.getLogger().println("String_Node_Str");
    listener.getLogger().println(sqlex.getMessage());
    Logger.fatal(sqlex);
    return false;
  }
 finally {
    if (writer != null) {
      writer.close();
    }
    if (siProject != null) {
      siProject.closeProjectDB();
    }
    api.Terminate();
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Overridden checkout function This is the real invocation of this plugin. Currently, we will do a project info and determine the true nature of the project Subsequent to that we will run a view project command and cache the information on each member, so that we can execute project checkout commands.  This obviously eliminates the need for a sandbox and can wily nilly delete the workspace directory as needed
 * @see hudson.scm.SCM#checkout(hudson.model.AbstractBuild,hudson.Launcher,hudson.FilePath,hudson.model.BuildListener,java.io.File)
 */
@Override public boolean checkout(AbstractBuild<?,?> build,Launcher launcher,FilePath workspace,BuildListener listener,File changeLogFile) throws IOException, InterruptedException {
  Logger.debug("String_Node_Str");
  String resolvedConfigPath=IntegrityCheckpointAction.evalGroovyExpression(build.getEnvironment(listener),configPath);
  listener.getLogger().println("String_Node_Str" + ciServerURL + build.getUrl()+ "String_Node_Str");
  listener.getLogger().println("String_Node_Str" + ciServerURL + build.getUrl()+ "String_Node_Str");
  APISession api=createAPISession();
  if (null == api) {
    listener.getLogger().println("String_Node_Str");
    return false;
  }
  PrintWriter writer=new PrintWriter(new OutputStreamWriter(new FileOutputStream(changeLogFile),"String_Node_Str"));
  try {
    listener.getLogger().println("String_Node_Str" + resolvedConfigPath);
    initializeCMProject(api,build.getRootDir(),resolvedConfigPath);
    if (checkpointBeforeBuild) {
      if (!siProject.isBuild()) {
        listener.getLogger().println("String_Node_Str" + siProject.getConfigurationPath());
        Response res=siProject.checkpoint(api,IntegrityCheckpointAction.evalGroovyExpression(build.getEnvironment(listener),tagName));
        Logger.debug(res.getCommandString() + "String_Node_Str" + res.getExitCode());
        WorkItem wi=res.getWorkItem(siProject.getConfigurationPath());
        String chkpt=wi.getResult().getField("String_Node_Str").getItem().getId();
        listener.getLogger().println("String_Node_Str" + siProject.getConfigurationPath() + "String_Node_Str"+ chkpt);
        Command siProjectInfoCmd=new Command(Command.SI,"String_Node_Str");
        siProjectInfoCmd.addOption(new Option("String_Node_Str",siProject.getProjectName()));
        siProjectInfoCmd.addOption(new Option("String_Node_Str",chkpt));
        Response infoRes=api.runCommand(siProjectInfoCmd);
        siProject.initializeProject(infoRes.getWorkItems().next());
      }
 else {
        listener.getLogger().println("String_Node_Str");
      }
    }
    listener.getLogger().println("String_Node_Str" + siProject.getConfigurationPath());
    initializeCMProjectMembers(api);
    AbstractBuild<?,?> previousBuild=build.getPreviousBuild();
    while (null != previousBuild) {
      File prevProjectDB=new File(previousBuild.getRootDir(),DerbyUtils.DERBY_DB_FOLDER);
      if (prevProjectDB.isDirectory()) {
        Logger.debug("String_Node_Str" + previousBuild.getNumber());
        break;
      }
      previousBuild=previousBuild.getPreviousBuild();
    }
    File prevProjectDB=getIntegrityCMProjectDB(previousBuild);
    if (null != prevProjectDB && prevProjectDB.isDirectory()) {
      siProject.compareBaseline(prevProjectDB.getParentFile(),api);
    }
 else {
      Logger.debug("String_Node_Str");
      if (!skipAuthorInfo) {
        siProject.primeAuthorInformation(api);
      }
    }
    List<Hashtable<CM_PROJECT,Object>> projectMembersList=siProject.viewProject();
    List<String> dirList=siProject.getDirList();
    IntegrityCheckoutTask coTask=null;
    if (null == prevProjectDB) {
      coTask=new IntegrityCheckoutTask(projectMembersList,dirList,alternateWorkspace,lineTerminator,restoreTimestamp,true,fetchChangedWorkspaceFiles,checkoutThreadPoolSize,listener);
    }
 else {
      coTask=new IntegrityCheckoutTask(projectMembersList,dirList,alternateWorkspace,lineTerminator,restoreTimestamp,cleanCopy,fetchChangedWorkspaceFiles,checkoutThreadPoolSize,listener);
    }
    coTask.initAPIVariables(ipHostName,ipPort,hostName,port,secure,userName,password);
    if (workspace.act(coTask)) {
      listener.getLogger().println("String_Node_Str");
      if (fetchChangedWorkspaceFiles) {
        siProject.updateChecksum(coTask.getChecksumUpdates());
      }
      listener.getLogger().println("String_Node_Str");
      writer.println(siProject.getChangeLog(String.valueOf(build.getNumber()),projectMembersList));
      listener.getLogger().println("String_Node_Str" + changeLogFile.getAbsolutePath());
      if (deleteNonMembers) {
        IntegrityDeleteNonMembersTask deleteNonMembers=new IntegrityDeleteNonMembersTask(build,listener,alternateWorkspace,getIntegrityProject());
        if (!workspace.act(deleteNonMembers)) {
          return false;
        }
      }
    }
 else {
      return false;
    }
  }
 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());
    Logger.fatal(aex);
    return false;
  }
catch (  SQLException sqlex) {
    Logger.error("String_Node_Str");
    listener.getLogger().println("String_Node_Str");
    listener.getLogger().println(sqlex.getMessage());
    Logger.fatal(sqlex);
    return false;
  }
 finally {
    if (writer != null) {
      writer.close();
    }
    if (siProject != null) {
      siProject.closeProjectDB();
    }
    api.Terminate();
  }
  return true;
}