Program: 21592
Project: 21592
Buggy source:
public void loadURL(URL url) throws Exception {
  XMLDatabase systemDB=null;
  try {
    String systemOtmlUrlStr=OTConfig.getStringProp(OTConfig.SYSTEM_OTML_PROP);
    if (systemOtmlUrlStr != null) {
      URL systemOtmlUrl=new URL(systemOtmlUrlStr);
      systemDB=new XMLDatabase(systemOtmlUrl,true,System.out);
      systemDB.loadObjects();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    systemDB=null;
  }
  try {
    xmlDB=new XMLDatabase(url,true,System.out);
    if (userMode == OTConfig.NO_USER_MODE) {
      xmlDB.setTrackResourceInfo(true);
    }
    xmlDB.loadObjects();
  }
 catch (  org.jdom.input.JDOMParseException e) {
    String xmlWarningTitle="String_Node_Str";
    String xmlWarningMessage="String_Node_Str" + "String_Node_Str" + e.getMessage();
    JOptionPane.showMessageDialog(null,xmlWarningMessage,xmlWarningTitle,JOptionPane.ERROR_MESSAGE);
    throw e;
  }
  addService(UserMessageHandler.class,new SwingUserMessageHandler(this));
  otrunk=new OTrunkImpl(systemDB,xmlDB,services);
  OTViewFactory myViewFactory=otrunk.getService(OTViewFactory.class);
  if (myViewFactory != null) {
    otViewFactory=myViewFactory;
  }
  OTViewContext factoryContext=otViewFactory.getViewContext();
  factoryContext.addViewService(OTrunk.class,otrunk);
  factoryContext.addViewService(OTFrameManager.class,frameManager);
  factoryContext.addViewService(OTJComponentServiceFactory.class,new OTJComponentServiceFactoryImpl());
  factoryContext.addViewService(OTExternalAppService.class,new OTExternalAppServiceImpl());
  factoryContext.addViewService(OTUserListService.class,new OTUserListService(){
    public Vector<OTUser> getUserList(){
      return otrunk.getUsers();
    }
  }
);
  ((OTViewFactoryImpl)otViewFactory).contextSetupComplete();
  currentURL=url;
}

Fixed version (ground truth):
public void loadURL(URL url) throws Exception {
  if ("String_Node_Str".equalsIgnoreCase(url.getProtocol())) {
    currentAuthoredFile=new File(url.getPath());
  }
  XMLDatabase systemDB=null;
  try {
    String systemOtmlUrlStr=OTConfig.getStringProp(OTConfig.SYSTEM_OTML_PROP);
    if (systemOtmlUrlStr != null) {
      URL systemOtmlUrl=new URL(systemOtmlUrlStr);
      systemDB=new XMLDatabase(systemOtmlUrl,true,System.out);
      systemDB.loadObjects();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    systemDB=null;
  }
  try {
    xmlDB=new XMLDatabase(url,true,System.out);
    if (userMode == OTConfig.NO_USER_MODE) {
      xmlDB.setTrackResourceInfo(true);
    }
    xmlDB.loadObjects();
  }
 catch (  org.jdom.input.JDOMParseException e) {
    String xmlWarningTitle="String_Node_Str";
    String xmlWarningMessage="String_Node_Str" + "String_Node_Str" + e.getMessage();
    JOptionPane.showMessageDialog(null,xmlWarningMessage,xmlWarningTitle,JOptionPane.ERROR_MESSAGE);
    throw e;
  }
  addService(UserMessageHandler.class,new SwingUserMessageHandler(this));
  otrunk=new OTrunkImpl(systemDB,xmlDB,services);
  OTViewFactory myViewFactory=otrunk.getService(OTViewFactory.class);
  if (myViewFactory != null) {
    otViewFactory=myViewFactory;
  }
  OTViewContext factoryContext=otViewFactory.getViewContext();
  factoryContext.addViewService(OTrunk.class,otrunk);
  factoryContext.addViewService(OTFrameManager.class,frameManager);
  factoryContext.addViewService(OTJComponentServiceFactory.class,new OTJComponentServiceFactoryImpl());
  factoryContext.addViewService(OTExternalAppService.class,new OTExternalAppServiceImpl());
  factoryContext.addViewService(OTUserListService.class,new OTUserListService(){
    public Vector<OTUser> getUserList(){
      return otrunk.getUsers();
    }
  }
);
  ((OTViewFactoryImpl)otViewFactory).contextSetupComplete();
  currentURL=url;
}