#vulnerable code 
                                protected void removeChild(Node out) {
        Validate.isTrue(out.parentNode == this);
        int index = indexInList(out, childNodes);
        childNodes.remove(index);
        out.parentNode = null;
    } 
                            #location 3 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                protected void removeChild(Node out) {
        Validate.isTrue(out.parentNode == this);
        int index = out.siblingIndex();
        childNodes.remove(index);
        reindexChildren();
        out.parentNode = null;
    }