Program: 100735
Project: 100735
Buggy source:
/** 
 * Writes a formatted list of target names to <code>System.out</code> with an optional description.
 * @param project the project instance.
 * @param names The names to be printed. Must not be <code>null</code>.
 * @param descriptions The associated target descriptions. May be<code>null</code>, in which case no descriptions are displayed. If non-<code>null</code>, this should have as many elements as <code>names</code>.
 * @param topDependencies The list of dependencies for each target. Thedependencies are listed as a non null enumeration of String.
 * @param heading The heading to display. Should not be <code>null</code>.
 * @param maxlen The maximum length of the names of the targets. Ifdescriptions are given, they are padded to this position so they line up (so long as the names really <i>are</i> shorter than this).
 */
private static void printTargets(final Project project,final Vector<String> names,final Vector<String> descriptions,final Vector<Enumeration<String>> dependencies,final String heading,final int maxlen){
  final String lSep=System.getProperty("String_Node_Str");
  String spaces="String_Node_Str";
  while (spaces.length() <= maxlen) {
    spaces+=spaces;
  }
  final StringBuffer msg=new StringBuffer();
  msg.append(heading + lSep + lSep);
  final int size=names.size();
  for (int i=0; i < size; i++) {
    msg.append("String_Node_Str");
    msg.append(names.elementAt(i));
    if (descriptions != null) {
      msg.append(spaces.substring(0,maxlen - names.elementAt(i).length() + 2));
      msg.append(descriptions.elementAt(i));
    }
    msg.append(lSep);
    if (!dependencies.isEmpty()) {
      final Enumeration<String> deps=dependencies.elementAt(i);
      if (deps.hasMoreElements()) {
        msg.append("String_Node_Str");
        while (deps.hasMoreElements()) {
          msg.append(deps.nextElement());
          if (deps.hasMoreElements()) {
            msg.append("String_Node_Str");
          }
        }
        msg.append(lSep);
      }
    }
  }
  project.log(msg.toString(),Project.MSG_WARN);
}

Fixed version (ground truth):
/** 
 * Writes a formatted list of target names to <code>System.out</code> with an optional description.
 * @param project the project instance.
 * @param names The names to be printed. Must not be <code>null</code>.
 * @param descriptions The associated target descriptions. May be<code>null</code>, in which case no descriptions are displayed. If non-<code>null</code>, this should have as many elements as <code>names</code>.
 * @param topDependencies The list of dependencies for each target. Thedependencies are listed as a non null enumeration of String.
 * @param heading The heading to display. Should not be <code>null</code>.
 * @param maxlen The maximum length of the names of the targets. Ifdescriptions are given, they are padded to this position so they line up (so long as the names really <i>are</i> shorter than this).
 */
private static void printTargets(final Project project,final Vector<String> names,final Vector<String> descriptions,final Vector<Enumeration<String>> dependencies,final String heading,final int maxlen){
  final String lSep=System.getProperty("String_Node_Str");
  String spaces="String_Node_Str";
  while (spaces.length() <= maxlen) {
    spaces+=spaces;
  }
  final StringBuilder msg=new StringBuilder();
  msg.append(heading + lSep + lSep);
  final int size=names.size();
  for (int i=0; i < size; i++) {
    msg.append("String_Node_Str");
    msg.append(names.elementAt(i));
    if (descriptions != null) {
      msg.append(spaces.substring(0,maxlen - names.elementAt(i).length() + 2));
      msg.append(descriptions.elementAt(i));
    }
    msg.append(lSep);
    if (!dependencies.isEmpty()) {
      final Enumeration<String> deps=dependencies.elementAt(i);
      if (deps.hasMoreElements()) {
        msg.append("String_Node_Str");
        while (deps.hasMoreElements()) {
          msg.append(deps.nextElement());
          if (deps.hasMoreElements()) {
            msg.append("String_Node_Str");
          }
        }
        msg.append(lSep);
      }
    }
  }
  project.log(msg.toString(),Project.MSG_WARN);
}