Program: 44737
Project: 44737
Buggy source:
protected void printUsage(CommandSession session,Action action,Map<Option,Field> optionsMap,Map<Argument,Field> argsMap,PrintStream out){
  Command command=action.getClass().getAnnotation(Command.class);
  Terminal term=(Terminal)session.get("String_Node_Str");
  List<Argument> arguments=new ArrayList<Argument>(argsMap.keySet());
  Collections.sort(arguments,new Comparator<Argument>(){
    public int compare(    Argument o1,    Argument o2){
      return Integer.valueOf(o1.index()).compareTo(Integer.valueOf(o2.index()));
    }
  }
);
  Set<Option> options=new HashSet<Option>(optionsMap.keySet());
  options.add(HELP);
  if (command != null && (command.description() != null || command.name() != null)) {
    out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a("String_Node_Str").a(Ansi.Attribute.RESET));
    out.print("String_Node_Str");
    if (command.name() != null) {
      out.println(Ansi.ansi().a(command.scope()).a("String_Node_Str").a(Ansi.Attribute.INTENSITY_BOLD).a(command.name()).a(Ansi.Attribute.RESET));
      out.println();
    }
    out.print("String_Node_Str");
    out.println(command.description());
    out.println();
  }
  StringBuffer syntax=new StringBuffer();
  if (command != null) {
    syntax.append(String.format("String_Node_Str",command.scope(),command.name()));
  }
  if (options.size() > 0) {
    syntax.append("String_Node_Str");
  }
  if (arguments.size() > 0) {
    syntax.append(' ');
    for (    Argument argument : arguments) {
      if (!argument.required()) {
        syntax.append(String.format("String_Node_Str",argument.name()));
      }
 else {
        syntax.append(String.format("String_Node_Str",argument.name()));
      }
    }
  }
  out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a("String_Node_Str").a(Ansi.Attribute.RESET));
  out.print("String_Node_Str");
  out.println(syntax.toString());
  out.println();
  if (arguments.size() > 0) {
    out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a("String_Node_Str").a(Ansi.Attribute.RESET));
    for (    Argument argument : arguments) {
      out.print("String_Node_Str");
      out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a(argument.name()).a(Ansi.Attribute.RESET));
      printFormatted("String_Node_Str",argument.description(),term != null ? term.getTerminalWidth() : 80,out);
      if (!argument.required()) {
        try {
          argsMap.get(argument).setAccessible(true);
          Object o=argsMap.get(argument).get(action);
          if (o != null && (!(o instanceof Boolean) || ((Boolean)o)) && (!(o instanceof Number) || ((Number)o).doubleValue() != 0.0)) {
            out.print("String_Node_Str");
            out.print(o.toString());
            out.println("String_Node_Str");
          }
        }
 catch (        Throwable t) {
        }
      }
    }
    out.println();
  }
  if (options.size() > 0) {
    out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a("String_Node_Str").a(Ansi.Attribute.RESET));
    for (    Option option : options) {
      String opt=option.name();
      for (      String alias : option.aliases()) {
        opt+="String_Node_Str" + alias;
      }
      out.print("String_Node_Str");
      out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a(opt).a(Ansi.Attribute.RESET));
      printFormatted("String_Node_Str",option.description(),term != null ? term.getTerminalWidth() : 80,out);
      try {
        optionsMap.get(option).setAccessible(true);
        Object o=optionsMap.get(option).get(action);
        if (o != null && (!(o instanceof Boolean) || ((Boolean)o)) && (!(o instanceof Number) || ((Number)o).doubleValue() != 0.0)) {
          out.print("String_Node_Str");
          out.print(o.toString());
          out.println("String_Node_Str");
        }
      }
 catch (      Throwable t) {
      }
    }
    out.println();
  }
  if (command.detailedDescription().length() > 0) {
    out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a("String_Node_Str").a(Ansi.Attribute.RESET));
    String desc=loadDescription(action.getClass(),command.detailedDescription());
    printFormatted("String_Node_Str",desc,term != null ? term.getTerminalWidth() : 80,out);
  }
}

Fixed version (ground truth):
protected void printUsage(CommandSession session,Action action,Map<Option,Field> optionsMap,Map<Argument,Field> argsMap,PrintStream out){
  Command command=action.getClass().getAnnotation(Command.class);
  Terminal term=session != null ? (Terminal)session.get("String_Node_Str") : null;
  List<Argument> arguments=new ArrayList<Argument>(argsMap.keySet());
  Collections.sort(arguments,new Comparator<Argument>(){
    public int compare(    Argument o1,    Argument o2){
      return Integer.valueOf(o1.index()).compareTo(Integer.valueOf(o2.index()));
    }
  }
);
  Set<Option> options=new HashSet<Option>(optionsMap.keySet());
  options.add(HELP);
  if (command != null && (command.description() != null || command.name() != null)) {
    out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a("String_Node_Str").a(Ansi.Attribute.RESET));
    out.print("String_Node_Str");
    if (command.name() != null) {
      out.println(Ansi.ansi().a(command.scope()).a("String_Node_Str").a(Ansi.Attribute.INTENSITY_BOLD).a(command.name()).a(Ansi.Attribute.RESET));
      out.println();
    }
    out.print("String_Node_Str");
    out.println(command.description());
    out.println();
  }
  StringBuffer syntax=new StringBuffer();
  if (command != null) {
    syntax.append(String.format("String_Node_Str",command.scope(),command.name()));
  }
  if (options.size() > 0) {
    syntax.append("String_Node_Str");
  }
  if (arguments.size() > 0) {
    syntax.append(' ');
    for (    Argument argument : arguments) {
      if (!argument.required()) {
        syntax.append(String.format("String_Node_Str",argument.name()));
      }
 else {
        syntax.append(String.format("String_Node_Str",argument.name()));
      }
    }
  }
  out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a("String_Node_Str").a(Ansi.Attribute.RESET));
  out.print("String_Node_Str");
  out.println(syntax.toString());
  out.println();
  if (arguments.size() > 0) {
    out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a("String_Node_Str").a(Ansi.Attribute.RESET));
    for (    Argument argument : arguments) {
      out.print("String_Node_Str");
      out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a(argument.name()).a(Ansi.Attribute.RESET));
      printFormatted("String_Node_Str",argument.description(),term != null ? term.getTerminalWidth() : 80,out);
      if (!argument.required()) {
        try {
          argsMap.get(argument).setAccessible(true);
          Object o=argsMap.get(argument).get(action);
          if (o != null && (!(o instanceof Boolean) || ((Boolean)o)) && (!(o instanceof Number) || ((Number)o).doubleValue() != 0.0)) {
            out.print("String_Node_Str");
            out.print(o.toString());
            out.println("String_Node_Str");
          }
        }
 catch (        Throwable t) {
        }
      }
    }
    out.println();
  }
  if (options.size() > 0) {
    out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a("String_Node_Str").a(Ansi.Attribute.RESET));
    for (    Option option : options) {
      String opt=option.name();
      for (      String alias : option.aliases()) {
        opt+="String_Node_Str" + alias;
      }
      out.print("String_Node_Str");
      out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a(opt).a(Ansi.Attribute.RESET));
      printFormatted("String_Node_Str",option.description(),term != null ? term.getTerminalWidth() : 80,out);
      try {
        optionsMap.get(option).setAccessible(true);
        Object o=optionsMap.get(option).get(action);
        if (o != null && (!(o instanceof Boolean) || ((Boolean)o)) && (!(o instanceof Number) || ((Number)o).doubleValue() != 0.0)) {
          out.print("String_Node_Str");
          out.print(o.toString());
          out.println("String_Node_Str");
        }
      }
 catch (      Throwable t) {
      }
    }
    out.println();
  }
  if (command.detailedDescription().length() > 0) {
    out.println(Ansi.ansi().a(Ansi.Attribute.INTENSITY_BOLD).a("String_Node_Str").a(Ansi.Attribute.RESET));
    String desc=loadDescription(action.getClass(),command.detailedDescription());
    printFormatted("String_Node_Str",desc,term != null ? term.getTerminalWidth() : 80,out);
  }
}