#vulnerable code 
                              public static void main(String[] args) throws Exception {
    DebugProtocol protocol = new DebugProtocol(new EventListener() {
      @Override
      public void onPageLoad() {
        //To change body of implemented methods use File | Settings | File Templates.
      }

      @Override
      public void domHasChanged(Event event) {
        //To change body of implemented methods use File | Settings | File Templates.
      }

      @Override
      public void frameDied(JSONObject message) {
        //To change body of implemented methods use File | Settings | File Templates.
      }
    }, "com.apple.mobilesafari");

    System.out.println(protocol.sendCommand(DOM.getDocument()).toString(2));
  } 
                            #location 2 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              public static void main(String[] args) throws Exception {
    test();

  }