Program: 52342
Project: 52342
Buggy source:
/** 
 * The metadata fields of the given item will be added to the given feed.
 * @param context	DSpace context object
 * @param dspaceItem	DSpace Item
 * @return an object representing a feed entry
 */
private com.sun.syndication.feed.rss.Item itemFromDSpaceItem(Context context,Item dspaceItem) throws SQLException {
  com.sun.syndication.feed.rss.Item rssItem=new com.sun.syndication.feed.rss.Item();
  String titleField=ConfigurationManager.getProperty("String_Node_Str");
  if (titleField == null) {
    titleField="String_Node_Str";
  }
  String dateField=ConfigurationManager.getProperty("String_Node_Str");
  if (dateField == null) {
    dateField="String_Node_Str";
  }
  String itHandle=ConfigurationManager.getBooleanProperty("String_Node_Str") ? HandleManager.resolveToURL(context,dspaceItem.getHandle()) : HandleManager.getCanonicalForm(dspaceItem.getHandle());
  rssItem.setLink(itHandle);
  String title=null;
  try {
    title=dspaceItem.getMetadata(titleField)[0].value;
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    title=labels.getString(clazz + "String_Node_Str");
  }
  rssItem.setTitle(title);
  String descriptionFields=ConfigurationManager.getProperty("String_Node_Str");
  if (descriptionFields == null) {
    descriptionFields=defaultDescriptionFields;
  }
  StringBuffer descBuf=new StringBuffer();
  StringTokenizer st=new StringTokenizer(descriptionFields,"String_Node_Str");
  while (st.hasMoreTokens()) {
    String field=st.nextToken().trim();
    boolean isDate=false;
    if (field.indexOf("String_Node_Str") > 0) {
      field=field.replaceAll("String_Node_Str","String_Node_Str");
      isDate=true;
    }
    DCValue[] values=dspaceItem.getMetadata(field);
    if (values != null && values.length > 0) {
      if (descBuf.length() > 0) {
        descBuf.append("String_Node_Str");
        descBuf.append("String_Node_Str");
      }
      String fieldLabel=null;
      try {
        fieldLabel=labels.getString("String_Node_Str" + field);
      }
 catch (      java.util.MissingResourceException e) {
      }
      if (fieldLabel != null && fieldLabel.length() > 0)       descBuf.append(fieldLabel + "String_Node_Str");
      for (int i=0; i < values.length; i++) {
        String fieldValue=values[i].value;
        if (isDate)         fieldValue=(new DCDate(fieldValue)).toString();
        descBuf.append(fieldValue);
        if (i < values.length - 1) {
          descBuf.append("String_Node_Str");
        }
      }
    }
  }
  Description descrip=new Description();
  descrip.setValue(descBuf.toString());
  rssItem.setDescription(descrip);
  String dcDate=null;
  try {
    dcDate=dspaceItem.getMetadata(dateField)[0].value;
  }
 catch (  ArrayIndexOutOfBoundsException e) {
  }
  if (dcDate != null) {
    rssItem.setPubDate((new DCDate(dcDate)).toDate());
  }
  return rssItem;
}

Fixed version (ground truth):
/** 
 * The metadata fields of the given item will be added to the given feed.
 * @param context	DSpace context object
 * @param dspaceItem	DSpace Item
 * @return an object representing a feed entry
 */
private com.sun.syndication.feed.rss.Item itemFromDSpaceItem(Context context,Item dspaceItem) throws SQLException {
  com.sun.syndication.feed.rss.Item rssItem=new com.sun.syndication.feed.rss.Item();
  String titleField=ConfigurationManager.getProperty("String_Node_Str");
  if (titleField == null) {
    titleField="String_Node_Str";
  }
  String dateField=ConfigurationManager.getProperty("String_Node_Str");
  if (dateField == null) {
    dateField="String_Node_Str";
  }
  String itHandle=ConfigurationManager.getBooleanProperty("String_Node_Str") ? HandleManager.resolveToURL(context,dspaceItem.getHandle()) : HandleManager.getCanonicalForm(dspaceItem.getHandle());
  rssItem.setLink(itHandle);
  String title=null;
  try {
    title=dspaceItem.getMetadata(titleField)[0].value;
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    title=labels.getString(clazz + "String_Node_Str");
  }
  rssItem.setTitle(title);
  String descriptionFields=ConfigurationManager.getProperty("String_Node_Str");
  if (descriptionFields == null) {
    descriptionFields=defaultDescriptionFields;
  }
  StringBuffer descBuf=new StringBuffer();
  StringTokenizer st=new StringTokenizer(descriptionFields,"String_Node_Str");
  while (st.hasMoreTokens()) {
    String field=st.nextToken().trim();
    boolean isDate=false;
    if (field.indexOf("String_Node_Str") > 0) {
      field=field.replaceAll("String_Node_Str","String_Node_Str");
      isDate=true;
    }
    DCValue[] values=dspaceItem.getMetadata(field);
    if (values != null && values.length > 0) {
      if (descBuf.length() > 0) {
        descBuf.append("String_Node_Str");
        descBuf.append("String_Node_Str");
      }
      String fieldLabel=null;
      try {
        fieldLabel=labels.getString("String_Node_Str" + field);
      }
 catch (      java.util.MissingResourceException e) {
      }
      if (fieldLabel != null && fieldLabel.length() > 0)       descBuf.append(fieldLabel + "String_Node_Str");
      for (int i=0; i < values.length; i++) {
        String fieldValue=values[i].value;
        if (isDate)         fieldValue=(new DCDate(fieldValue)).toString();
        descBuf.append(fieldValue);
        if (i < values.length - 1) {
          descBuf.append("String_Node_Str");
        }
      }
    }
  }
  Description descrip=new Description();
  descrip.setValue(descBuf.toString().replaceAll("String_Node_Str","String_Node_Str"));
  rssItem.setDescription(descrip);
  String dcDate=null;
  try {
    dcDate=dspaceItem.getMetadata(dateField)[0].value;
  }
 catch (  ArrayIndexOutOfBoundsException e) {
  }
  if (dcDate != null) {
    rssItem.setPubDate((new DCDate(dcDate)).toDate());
  }
  return rssItem;
}