Program: 142471
Project: 142471
Buggy source:
/** 
 * The checkout method is expected to check out modified files into the project workspace. In Perforce terms a 'p4 sync' on the project's workspace. Authorisation
 */
@Override public void checkout(Run<?,?> run,Launcher launcher,FilePath buildWorkspace,TaskListener listener,File changelogFile,SCMRevisionState baseline) throws IOException, InterruptedException {
  PrintStream log=listener.getLogger();
  boolean success=true;
  changelogFilename=changelogFile.getAbsolutePath();
  CheckoutTask task=new CheckoutTask(populate);
  task.setListener(listener);
  task.setCredential(credential);
  Workspace ws=task.setEnvironment(run,workspace,buildWorkspace);
  ws=task.setNextChange(ws,changes);
  changes=new ArrayList<Integer>();
  task.setWorkspace(ws);
  task.initialise();
  TagAction tag=new TagAction(run);
  tag.setCredential(credential);
  tag.setWorkspace(ws);
  tag.setBuildChange(task.getSyncChange());
  run.addAction(tag);
  String node=ws.getExpand().get("String_Node_Str");
  Job<?,?> job=run.getParent();
  if (run instanceof MatrixBuild) {
    parentChange=task.getSyncChange();
    if (isBuildParent(job)) {
      log.println("String_Node_Str" + node);
      success&=buildWorkspace.act(task);
    }
 else {
      listener.getLogger().println("String_Node_Str");
      success=true;
    }
  }
 else {
    if (job instanceof MatrixProject) {
      if (parentChange != null) {
        log.println("String_Node_Str" + parentChange);
        task.setBuildChange(parentChange);
      }
      log.println("String_Node_Str" + node);
    }
 else {
      log.println("String_Node_Str" + node);
    }
    success&=buildWorkspace.act(task);
  }
  if (success) {
    listener.getLogger().println("String_Node_Str");
    List<P4ChangeEntry> changes=calculateChanges(run,task);
    P4ChangeSet.store(changelogFile,changes);
    listener.getLogger().println("String_Node_Str");
  }
 else {
    String msg="String_Node_Str";
    logger.warning(msg);
    throw new AbortException(msg);
  }
}

Fixed version (ground truth):
/** 
 * The checkout method is expected to check out modified files into the project workspace. In Perforce terms a 'p4 sync' on the project's workspace. Authorisation
 */
@Override public void checkout(Run<?,?> run,Launcher launcher,FilePath buildWorkspace,TaskListener listener,File changelogFile,SCMRevisionState baseline) throws IOException, InterruptedException {
  PrintStream log=listener.getLogger();
  boolean success=true;
  changelogFilename=changelogFile.getAbsolutePath();
  CheckoutTask task=new CheckoutTask(populate);
  task.setListener(listener);
  task.setCredential(credential);
  Workspace ws=task.setEnvironment(run,workspace,buildWorkspace);
  ws=task.setNextChange(ws,changes);
  changes=new ArrayList<Integer>();
  task.setWorkspace(ws);
  task.initialise();
  TagAction tag=new TagAction(run);
  tag.setCredential(credential);
  tag.setWorkspace(ws);
  tag.setBuildChange(task.getSyncChange());
  run.addAction(tag);
  String node=ws.getExpand().get("String_Node_Str");
  Job<?,?> job=run.getParent();
  if (run instanceof MatrixBuild) {
    parentChange=task.getSyncChange();
    if (isBuildParent(job)) {
      log.println("String_Node_Str" + node);
      success&=buildWorkspace.act(task);
    }
 else {
      listener.getLogger().println("String_Node_Str");
      success=true;
    }
  }
 else {
    if (job instanceof MatrixProject) {
      if (parentChange != null) {
        log.println("String_Node_Str" + parentChange);
        task.setBuildChange(parentChange);
      }
      log.println("String_Node_Str" + node);
    }
 else {
      log.println("String_Node_Str" + node);
    }
    success&=buildWorkspace.act(task);
  }
  if (success) {
  }
 else {
    String msg="String_Node_Str";
    logger.warning(msg);
    throw new AbortException(msg);
  }
}