Program: 153351
Project: 153351
Buggy source:
/** 
 * Updates the workspace as well as locate changes.
 * @return List of affected file names, relative to the workspace directory.Null if the operation failed.
 */
private List<String> update(boolean dryRun,Launcher launcher,FilePath workspace,TaskListener listener,Date date) throws IOException, InterruptedException {
  List<String> changedFileNames=new ArrayList<String>();
  ArgumentListBuilder cmd=new ArgumentListBuilder();
  cmd.add(getDescriptor().getCvsExeOrDefault(),debug ? "String_Node_Str" : "String_Node_Str",compression());
  if (dryRun) {
    cmd.add("String_Node_Str");
  }
  cmd.add("String_Node_Str","String_Node_Str");
  if (branch != null) {
    cmd.add("String_Node_Str",branch);
  }
  configureDate(cmd,date);
  if (flatten) {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    if (!run(launcher,cmd,listener,workspace,new ForkOutputStream(baos,listener.getLogger()))) {
      return null;
    }
    Future<Void> task=workspace.actAsync(new StickyDateCleanUpTask());
    parseUpdateOutput("String_Node_Str",baos,changedFileNames);
    join(task);
  }
 else {
    @SuppressWarnings("String_Node_Str") final Set<String> moduleNames=new TreeSet(Arrays.asList(getAllModulesNormalized()));
    moduleNames.addAll(workspace.act(new FileCallable<Set<String>>(){
      public Set<String> invoke(      File ws,      VirtualChannel channel) throws IOException {
        File[] subdirs=ws.listFiles();
        if (subdirs != null) {
          SUBDIR:           for (          File s : subdirs) {
            if (new File(s,"String_Node_Str").isDirectory()) {
              String top=s.getName();
              for (              String mod : moduleNames) {
                if (mod.startsWith(top + "String_Node_Str")) {
                  continue SUBDIR;
                }
              }
              moduleNames.add(top);
            }
          }
        }
        return moduleNames;
      }
    }
));
    for (    String moduleName : moduleNames) {
      ByteArrayOutputStream baos=new ByteArrayOutputStream();
      FilePath modulePath=new FilePath(workspace,moduleName);
      ArgumentListBuilder actualCmd=cmd;
      String baseName=moduleName;
      if (!modulePath.isDirectory()) {
        actualCmd=cmd.clone();
        actualCmd.add(modulePath.getName());
        modulePath=modulePath.getParent();
        int slash=baseName.lastIndexOf('/');
        if (slash > 0) {
          baseName=baseName.substring(0,slash);
        }
      }
      if (!run(launcher,actualCmd,listener,modulePath,new ForkOutputStream(baos,listener.getLogger()))) {
        return null;
      }
      Future<Void> task=modulePath.actAsync(new StickyDateCleanUpTask());
      parseUpdateOutput(baseName + '/',baos,changedFileNames);
      join(task);
    }
  }
  return changedFileNames;
}

Fixed version (ground truth):
/** 
 * Updates the workspace as well as locate changes.
 * @return List of affected file names, relative to the workspace directory.Null if the operation failed.
 */
private List<String> update(boolean dryRun,Launcher launcher,FilePath workspace,TaskListener listener,Date date) throws IOException, InterruptedException {
  List<String> changedFileNames=new ArrayList<String>();
  ArgumentListBuilder cmd=new ArgumentListBuilder();
  cmd.add(getDescriptor().getCvsExeOrDefault(),debug ? "String_Node_Str" : "String_Node_Str",compression());
  if (dryRun) {
    cmd.add("String_Node_Str");
  }
  cmd.add("String_Node_Str","String_Node_Str");
  if (branch != null) {
    cmd.add("String_Node_Str",branch);
  }
  configureDate(cmd,date);
  if (preventLineEndingConversion) {
    cmd.add("String_Node_Str");
  }
  if (flatten) {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    if (!run(launcher,cmd,listener,workspace,new ForkOutputStream(baos,listener.getLogger()))) {
      return null;
    }
    Future<Void> task=workspace.actAsync(new StickyDateCleanUpTask());
    parseUpdateOutput("String_Node_Str",baos,changedFileNames);
    join(task);
  }
 else {
    @SuppressWarnings("String_Node_Str") final Set<String> moduleNames=new TreeSet(Arrays.asList(getAllModulesNormalized()));
    moduleNames.addAll(workspace.act(new FileCallable<Set<String>>(){
      public Set<String> invoke(      File ws,      VirtualChannel channel) throws IOException {
        File[] subdirs=ws.listFiles();
        if (subdirs != null) {
          SUBDIR:           for (          File s : subdirs) {
            if (new File(s,"String_Node_Str").isDirectory()) {
              String top=s.getName();
              for (              String mod : moduleNames) {
                if (mod.startsWith(top + "String_Node_Str")) {
                  continue SUBDIR;
                }
              }
              moduleNames.add(top);
            }
          }
        }
        return moduleNames;
      }
    }
));
    for (    String moduleName : moduleNames) {
      ByteArrayOutputStream baos=new ByteArrayOutputStream();
      FilePath modulePath=new FilePath(workspace,moduleName);
      ArgumentListBuilder actualCmd=cmd;
      String baseName=moduleName;
      if (!modulePath.isDirectory()) {
        actualCmd=cmd.clone();
        actualCmd.add(modulePath.getName());
        modulePath=modulePath.getParent();
        int slash=baseName.lastIndexOf('/');
        if (slash > 0) {
          baseName=baseName.substring(0,slash);
        }
      }
      if (!run(launcher,actualCmd,listener,modulePath,new ForkOutputStream(baos,listener.getLogger()))) {
        return null;
      }
      Future<Void> task=modulePath.actAsync(new StickyDateCleanUpTask());
      parseUpdateOutput(baseName + '/',baos,changedFileNames);
      join(task);
    }
  }
  return changedFileNames;
}