#vulnerable code 
                                public double readDouble() throws NulsException {
        return Utils.bytes2Double(this.readByLengthByte());
    } 
                            #location 2 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                public double readDouble() throws NulsException { byte[] bytes = this.readByLengthByte();
        if(null==bytes){
            return 0;
        }
        return Utils.bytes2Double(bytes);
    }