#vulnerable code 
                                public OutputStream writeFloat(float value) throws IOException {
        write(getIsoBytes(String.valueOf(value)));
        return this;
    } 
                            #location 2 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                public OutputStream writeFloat(float value) throws IOException {
        int intPart = (int) value;
        int fractalPart = (int) (value - (int) value) * 1000;
        writeInteger(intPart, 8).writeByte((byte) '.').writeInteger(fractalPart, 4);
        return this;
    }