Program: 52214
Project: 52214
Buggy source:
/** 
 * Simple test program Usage:  java org.dspace.content.DCdate [DCDate | -l yyyy [mm [dd ..]]] ] (-l form tests local time parsing) Default is to use current time.
 */
public static void main(String args[]) throws Exception {
  DCDate d;
  if (args.length > 0) {
    if (args[0].equals("String_Node_Str")) {
      int val[]={-1,-1,-1,-1,-1,-1};
      for (int i=1; i < 7 && i < args.length; ++i)       val[i - 1]=Integer.parseInt(args[i]);
      d=new DCDate();
      d.setDateLocal(val[0],val[1],val[2],val[3],val[4],val[5]);
    }
 else     d=new DCDate(args[0]);
  }
 else   d=DCDate.getCurrent();
  System.out.println("String_Node_Str" + d.toString() + "String_Node_Str");
  System.out.println("String_Node_Str" + d.toDate().toString() + "String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + d.granularity);
  System.out.println("String_Node_Str" + d.getYear());
  System.out.println("String_Node_Str" + d.getMonth());
  System.out.println("String_Node_Str" + d.getDay());
  System.out.println("String_Node_Str" + d.getHour());
  System.out.println("String_Node_Str" + d.getMinute());
  System.out.println("String_Node_Str" + d.getSecond());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + d.getYearGMT());
  System.out.println("String_Node_Str" + d.getMonthGMT());
  System.out.println("String_Node_Str" + d.getDayGMT());
  System.out.println("String_Node_Str" + d.getHourGMT());
  System.out.println("String_Node_Str" + d.getMinuteGMT());
  System.out.println("String_Node_Str" + d.getSecondGMT());
  DCDate hw=new DCDate();
  hw.setDateLocal(d.getYear(),d.getMonth(),d.getDay(),d.getHour(),d.getMinute(),d.getSecond());
  System.out.println("String_Node_Str" + hw.toString() + "String_Node_Str");
  System.out.println("String_Node_Str" + DCDate.getMonthName(d.getMonth(),Locale.getDefault()) + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Simple test program Usage:  java org.dspace.content.DCdate [DCDate | -l yyyy [mm [dd ..]]] ] where "DCDate" is the kind of value that would be in metadata, e.g. "2006", "2006-02-03", etc. (-l form tests local time parsing) Default is to use current time.
 */
public static void main(String args[]) throws Exception {
  DCDate d;
  if (args.length > 0) {
    if (args[0].equals("String_Node_Str")) {
      int val[]={-1,-1,-1,-1,-1,-1};
      for (int i=1; i < 7 && i < args.length; ++i)       val[i - 1]=Integer.parseInt(args[i]);
      d=new DCDate();
      d.setDateLocal(val[0],val[1],val[2],val[3],val[4],val[5]);
    }
 else     d=new DCDate(args[0]);
  }
 else   d=DCDate.getCurrent();
  System.out.println("String_Node_Str" + d.toString() + "String_Node_Str");
  System.out.println("String_Node_Str" + d.toDate().toString() + "String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + d.granularity);
  System.out.println("String_Node_Str" + d.getYear());
  System.out.println("String_Node_Str" + d.getMonth());
  System.out.println("String_Node_Str" + d.getDay());
  System.out.println("String_Node_Str" + d.getHour());
  System.out.println("String_Node_Str" + d.getMinute());
  System.out.println("String_Node_Str" + d.getSecond());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + d.getYearGMT());
  System.out.println("String_Node_Str" + d.getMonthGMT());
  System.out.println("String_Node_Str" + d.getDayGMT());
  System.out.println("String_Node_Str" + d.getHourGMT());
  System.out.println("String_Node_Str" + d.getMinuteGMT());
  System.out.println("String_Node_Str" + d.getSecondGMT());
  DCDate hw=new DCDate();
  hw.setDateLocal(d.getYear(),d.getMonth(),d.getDay(),d.getHour(),d.getMinute(),d.getSecond());
  System.out.println("String_Node_Str" + hw.toString() + "String_Node_Str");
  System.out.println("String_Node_Str" + DCDate.getMonthName(d.getMonth(),Locale.getDefault()) + "String_Node_Str");
}