Program: 101980
Project: 101980
Buggy source:
/** 
 * Method to create document contents for an Index object.
 * @param parent the Element that is the parent of any created Elements or Attributes; may not be null
 * @param eobj the Index representing the graph of objects for which document content may be created; may not be null
 */
protected void create(final Element parent,final Index index,final ModelWrapper wrapper){
  CoreArgCheck.isNotNull(parent);
  CoreArgCheck.isNotNull(index);
  if (!wrapper.isSelected(index)) {
    return;
  }
  final Element indexElement=new Element(Xml.Index.TAG);
  parent.addContent(indexElement);
  setAttribute(indexElement,Xml.Index.Attributes.NAME,getUniqueObjectName(index));
  setAttribute(indexElement,Xml.Index.Attributes.UUID,editor.getObjectID(index));
  setAttribute(indexElement,Xml.Index.Attributes.PATH_IN_MODEL,editor.getModelRelativePath(index));
  final List columns=index.getColumns();
  final Element indexColumnElement=new Element(Xml.IndexColumns.TAG);
  indexElement.addContent(indexColumnElement);
  Table indexedTable=null;
  final Iterator iter=columns.iterator();
  while (iter.hasNext()) {
    final Column column=(Column)iter.next();
    final Element indexedColumnElement=new Element(Xml.IndexColumn.TAG);
    setAttribute(indexedColumnElement,Xml.IndexColumn.Attributes.NAME,getObjectNameInDdl(column));
    setAttribute(indexedColumnElement,Xml.IndexColumn.Attributes.UUID,editor.getObjectID(column));
    indexColumnElement.addContent(indexedColumnElement);
    indexedTable=(Table)column.getOwner();
  }
  if (indexedTable != null) {
    setAttribute(indexElement,Xml.ForeignKey.Attributes.TABLE_NAME,getObjectNameInDdl(indexedTable));
  }
}

Fixed version (ground truth):
/** 
 * Method to create document contents for an Index object.
 * @param parent the Element that is the parent of any created Elements or Attributes; may not be null
 * @param eobj the Index representing the graph of objects for which document content may be created; may not be null
 */
protected void create(final Element parent,final Index index,final ModelWrapper wrapper){
  CoreArgCheck.isNotNull(parent);
  CoreArgCheck.isNotNull(index);
  if (!wrapper.isSelected(index)) {
    return;
  }
  final Element indexElement=new Element(Xml.Index.TAG);
  parent.addContent(indexElement);
  setAttribute(indexElement,Xml.Index.Attributes.NAME,getUniqueObjectName(index));
  setAttribute(indexElement,Xml.Index.Attributes.UUID,getModelEditor().getObjectID(index));
  setAttribute(indexElement,Xml.Index.Attributes.PATH_IN_MODEL,getModelEditor().getModelRelativePath(index));
  final List columns=index.getColumns();
  final Element indexColumnElement=new Element(Xml.IndexColumns.TAG);
  indexElement.addContent(indexColumnElement);
  Table indexedTable=null;
  final Iterator iter=columns.iterator();
  while (iter.hasNext()) {
    final Column column=(Column)iter.next();
    final Element indexedColumnElement=new Element(Xml.IndexColumn.TAG);
    setAttribute(indexedColumnElement,Xml.IndexColumn.Attributes.NAME,getObjectNameInDdl(column));
    setAttribute(indexedColumnElement,Xml.IndexColumn.Attributes.UUID,getModelEditor().getObjectID(column));
    indexColumnElement.addContent(indexedColumnElement);
    indexedTable=(Table)column.getOwner();
  }
  if (indexedTable != null) {
    setAttribute(indexElement,Xml.ForeignKey.Attributes.TABLE_NAME,getObjectNameInDdl(indexedTable));
  }
}