Example #1
0
  public void CheckDPDList(TObj tobj) {
    TObj objlist[] = tobj.getTObjList();
    if (objlist == null) return;
    for (int i = 0; i < objlist.length; i++) {
      TObj tmpobj = objlist[i];
      CheckDPDList(tmpobj);
      TDpd dpdlist[] = tmpobj.getTDpdList();
      if (dpdlist == null) continue;
      for (int j = 0; j < dpdlist.length; j++) {
        TDpd tmpdpd = dpdlist[j];
        if (tmpdpd == null) continue;

        if (tmpdpd.getType() == C_FUNCTION_CALL) {
          String dpd_name = tmpdpd.getName();
          if (dpd_name.indexOf('(') > 0) {
            dpd_name = dpd_name.substring(0, dpd_name.indexOf('(')).trim();
          }
          if (hfunname.containsKey(dpd_name)) {
            Integer val = (Integer) hfunname.get(dpd_name);
            int cnt = val.intValue() + 1;
            hfunname.put(dpd_name, new Integer(cnt));
            // log.debug("push hash", dpd_name + ", count =" + cnt);
          }
        }
      }
    }
  }