private void dumpMethodAst()

in reference/src/main/java/ConvertJava.java [185:209]


  private void dumpMethodAst(String thisRuleName, JSONArray simpleTree) {
    if (thisClassName != null && thisRuleName.equals("methodBody")) {
      if (simpleTree.length() == 2) {
        try {
          simpleTree = simpleTree.getJSONArray(1);
        } catch (Exception e) {
          //                    System.err.println(simpleTree);
          //                    e.printStackTrace();
          //                    System.out.println("In " + thisFileName + ":" + thisClassName + ":" + thisMethodName+":"+beginLine);
          return;
        }
      }
      JSONObject tmp = new JSONObject();
      tmp.put("path", thisFileName);
      tmp.put("class", thisClassName);
      tmp.put("method", thisMethodName);
      tmp.put("beginline", beginLine);
      tmp.put("endline", endLine);
      tmp.put("ast", simpleTree);
      writer.println(tmp);
      writer.flush();
      totalMethods++;
      //System.out.println("Logged " + thisFileName + ":" + thisClassName + ":" + thisMethodName);
    }
  }