@Override public Document toDocument(){
  assert project != null;
  DocumentFactory docFactory=new DocumentFactory();
  Document document=docFactory.createDocument();
  Dom4JXMLOutput treeBuilder=new Dom4JXMLOutput(document);
  try {
    writeXML(treeBuilder);
  }
 catch (  IOException e) {
  }
  return document;
}

@ Override public Document toDocument ( ) { assert project != null ; DocumentFactory docFactory = new DocumentFactory ( ) ; Document document = docFactory . createDocument ( ) ; Dom4JXMLOutput treeBuilder = new Dom4JXMLOutput ( document ) ; try { writeXML ( treeBuilder ) ; } catch ( IOException e ) { } return document ; }
convert the bugcollection into a dom4j document object .
