// Path: src/main/java/jp/gr/java_conf/daisy/ajax_mutator/mutatable/DOMCreation.java
// public class DOMCreation extends Mutatable {
//     private final AstNode tagName;
// 
//     public DOMCreation(AstNode node, AstNode tagName) {
//         super(node);
//         this.tagName = tagName;
//     }
// 
//     public AstNode getTagName() {
//         return tagName;
//     }
// 
//     @Override
//     public String toString() {
//         StringBuilder builder = new StringBuilder();
//         builder.append(super.toString()).append('\n');
//         builder.append("  DOM creation: [tag:");
//         builder.append(tagName.toSource()).append("]");
//         return builder.toString();
//     }
// }


import java.util.List;
import jp.gr.java_conf.daisy.ajax_mutator.detector.AbstractDetector;
import jp.gr.java_conf.daisy.ajax_mutator.mutatable.DOMCreation;
import org.mozilla.javascript.ast.AstNode;
import org.mozilla.javascript.ast.FunctionCall;
import org.mozilla.javascript.ast.PropertyGet;
package jp.gr.java_conf.daisy.ajax_mutator.detector.dom_manipulation_detector;




/**
 * Detector to detect dom creation like document.createElement("tagName")
 *
 * @author Kazuki Nishiura
 */
public class CreateElementDetector extends AbstractDetector<DOMCreation> {
    private static String CREATE_ELEMENT_IDENTIFIER = "createElement";

    @Override
    public DOMCreation detect(AstNode node) {
        return detectFromFunctionCall(node, true);
    }

    @Override
// Path: src/main/java/jp/gr/java_conf/daisy/ajax_mutator/mutatable/DOMCreation.java
// public class DOMCreation extends Mutatable {
//     private final AstNode tagName;
// 
//     public DOMCreation(AstNode node, AstNode tagName) {
//         super(node);
//         this.tagName = tagName;
//     }
// 
//     public AstNode getTagName() {
//         return tagName;
//     }
// 
//     @Override
//     public String toString() {
//         StringBuilder builder = new StringBuilder();
//         builder.append(super.toString()).append('\n');
//         builder.append("  DOM creation: [tag:");
//         builder.append(tagName.toSource()).append("]");
//         return builder.toString();
//     }
// }


// Path: src/main/java/jp/gr/java_conf/daisy/ajax_mutator/detector/dom_manipulation_detector/CreateElementDetector.java
import java.util.List;
import jp.gr.java_conf.daisy.ajax_mutator.detector.AbstractDetector;
import jp.gr.java_conf.daisy.ajax_mutator.mutatable.DOMCreation;
import org.mozilla.javascript.ast.AstNode;
import org.mozilla.javascript.ast.FunctionCall;
import org.mozilla.javascript.ast.PropertyGet;

package jp.gr.java_conf.daisy.ajax_mutator.detector.dom_manipulation_detector;




/**
 * Detector to detect dom creation like document.createElement("tagName")
 *
 * @author Kazuki Nishiura
 */
public class CreateElementDetector extends AbstractDetector<DOMCreation> {
    private static String CREATE_ELEMENT_IDENTIFIER = "createElement";

    @Override
    public DOMCreation detect(AstNode node) {
        return detectFromFunctionCall(node, true);
    }

    @Override
    protected DOMCreation detectFromFunctionCall(FunctionCall functionCall,