Program: 3644
Project: 3644
Buggy source:
/** 
 * Take an InProgressSubmission and turn it into a fully-archived Item.
 * @param Context
 * @param InProgressSubmission
 * @param EPerson (unused, should be removed from API) 
 */
public static Item installItem(Context c,InProgressSubmission is,EPerson e2) throws SQLException, IOException, AuthorizeException {
  Item item=is.getItem();
  DCDate now=DCDate.getCurrent();
  item.addDC("String_Node_Str","String_Node_Str",null,now.toString());
  item.addDC("String_Node_Str","String_Node_Str",null,now.toString());
  DCValue[] currentDateIssued=item.getDC("String_Node_Str","String_Node_Str",Item.ANY);
  if (currentDateIssued.length == 0) {
    item.addDC("String_Node_Str","String_Node_Str",null,now.toString());
  }
  String handle=HandleManager.createHandle(c,item);
  String handleref=HandleManager.getCanonicalForm(handle);
  item.addDC("String_Node_Str","String_Node_Str",null,handleref);
  Bitstream[] bitstreams=item.getNonInternalBitstreams();
  for (int i=0; i < bitstreams.length; i++) {
    BitstreamFormat bf=bitstreams[i].getFormat();
    item.addDC("String_Node_Str","String_Node_Str",null,String.valueOf(bitstreams[i].getSize()));
    item.addDC("String_Node_Str","String_Node_Str",null,bf.getMIMEType());
  }
  String provDescription="String_Node_Str" + now + "String_Node_Str"+ getBitstreamProvenanceMessage(item);
  if (currentDateIssued.length != 0) {
    DCDate d=new DCDate(currentDateIssued[0].value);
    provDescription=provDescription + "String_Node_Str" + d.toString();
  }
  item.addDC("String_Node_Str","String_Node_Str","String_Node_Str",provDescription);
  is.getCollection().addItem(item);
  item.setArchived(true);
  item.update();
  DSIndexer.indexContent(c,item);
  is.deleteWrapper();
  List policies=AuthorizeManager.getPoliciesActionFilter(c,is.getCollection(),Constants.READ);
  item.replaceAllPolicies(policies);
  return item;
}

Fixed version (ground truth):
/** 
 * Take an InProgressSubmission and turn it into a fully-archived Item.
 * @param Context
 * @param InProgressSubmission
 * @param EPerson (unused, should be removed from API) 
 */
public static Item installItem(Context c,InProgressSubmission is,EPerson e2) throws SQLException, IOException, AuthorizeException {
  Item item=is.getItem();
  DCDate now=DCDate.getCurrent();
  item.addDC("String_Node_Str","String_Node_Str",null,now.toString());
  item.addDC("String_Node_Str","String_Node_Str",null,now.toString());
  DCValue[] currentDateIssued=item.getDC("String_Node_Str","String_Node_Str",Item.ANY);
  if (currentDateIssued.length == 0) {
    item.addDC("String_Node_Str","String_Node_Str",null,now.toString());
  }
  String handle=HandleManager.createHandle(c,item);
  String handleref=HandleManager.getCanonicalForm(handle);
  item.addDC("String_Node_Str","String_Node_Str",null,handleref);
  Bitstream[] bitstreams=item.getNonInternalBitstreams();
  for (int i=0; i < bitstreams.length; i++) {
    BitstreamFormat bf=bitstreams[i].getFormat();
    item.addDC("String_Node_Str","String_Node_Str",null,String.valueOf(bitstreams[i].getSize()) + "String_Node_Str");
    item.addDC("String_Node_Str","String_Node_Str",null,bf.getMIMEType());
  }
  String provDescription="String_Node_Str" + now + "String_Node_Str"+ getBitstreamProvenanceMessage(item);
  if (currentDateIssued.length != 0) {
    DCDate d=new DCDate(currentDateIssued[0].value);
    provDescription=provDescription + "String_Node_Str" + d.toString();
  }
  item.addDC("String_Node_Str","String_Node_Str","String_Node_Str",provDescription);
  is.getCollection().addItem(item);
  item.setArchived(true);
  item.update();
  DSIndexer.indexContent(c,item);
  is.deleteWrapper();
  List policies=AuthorizeManager.getPoliciesActionFilter(c,is.getCollection(),Constants.READ);
  item.replaceAllPolicies(policies);
  return item;
}