#vulnerable code 
                                void insert(Token.Character characterToken) {
        Node node;
        // characters in script and style go in as datanodes, not text nodes
        final String tagName = currentElement().tagName();
        final String data = characterToken.getData();

        if (characterToken.isCData())
            node = new CDataNode(data);
        else if (tagName.equals("script") || tagName.equals("style"))
            node = new DataNode(data);
        else
            node = new TextNode(data);
        currentElement().appendChild(node); // doesn't use insertNode, because we don't foster these; and will always have a stack.
    } 
                            #location 13 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                ParseSettings defaultSettings() {
        return ParseSettings.htmlDefault;
    }