Exemple #1
0
  public ArrayList<DOMMutAstInstrumenter> domMutAstInstrumenterGenerator() {

    ArrayList<DOMMutAstInstrumenter> domMutAstInstrumenterList =
        new ArrayList<DOMMutAstInstrumenter>();
    TreeMap<String, ArrayList<NodeProperty>> func_domNode_map =
        domTraceReading.getFunc_domNode_map();
    Set<String> keys = func_domNode_map.keySet();
    Iterator<String> it = keys.iterator();

    while (it.hasNext()) {
      String stateNameFuncName = it.next();
      ArrayList<NodeProperty> nodeProps = func_domNode_map.get(stateNameFuncName);
      String[] str = stateNameFuncName.split("-");
      String stateName = str[0];
      String funcName = str[1];
      for (int i = 0; i < nodeProps.size(); i++) {

        NodeProperty nodeProp = nodeProps.get(i);
        // excluding elements that are part of our crawljax event sequence from the list of dom
        // mutations
        if (excludedElementsList.contains(nodeProp.getNode().xpath)) continue;
        if (nodeProp.getTypeOfAccess().equals("DIRECTACCESS")) {
          domMutAstInstrumenterList.add(
              new DOMMutAstInstrumenter(funcName, nodeProp, true, stateName));
        } else {

          domMutAstInstrumenterList.add(
              new DOMMutAstInstrumenter(funcName, nodeProp, true, stateName));
          domMutAstInstrumenterList.add(
              new DOMMutAstInstrumenter(funcName, nodeProp, false, stateName));
        }
      }
    }
    return domMutAstInstrumenterList;
  }
Exemple #2
0
 public void setVar(LocalVariableReference node) {
   super.setChild(VariableInialized.VAR, node);
 }