#fixed code
                                public void testBase64() {
        String content = "Hello World";
        String encodedContent;
        byte[] encodedBytes = Base64.encodeBase64(StringUtils.getBytesUtf8(content));
        encodedContent = StringUtils.newStringUtf8(encodedBytes);
        assertTrue("encoding hello world", encodedContent.equals("SGVsbG8gV29ybGQ="));

        Base64 b64 = new Base64(76, null);  // null lineSeparator same as saying no-chunking
        encodedBytes = b64.encode(StringUtils.getBytesUtf8(content));
        encodedContent = StringUtils.newStringUtf8(encodedBytes);
        assertTrue("encoding hello world", encodedContent.equals("SGVsbG8gV29ybGQ="));

        b64 = new Base64(0, null);  // null lineSeparator same as saying no-chunking
        encodedBytes = b64.encode(StringUtils.getBytesUtf8(content));
        encodedContent = StringUtils.newStringUtf8(encodedBytes);
        assertTrue("encoding hello world", encodedContent.equals("SGVsbG8gV29ybGQ="));

        // bogus characters to decode (to skip actually)
        byte[] decode = b64.decode("SGVsbG{}8gV29ybGQ=");
        String decodeString = StringUtils.newStringUtf8(decode);
        assertTrue("decode hello world", decodeString.equals("Hello World"));        
    }
#vulnerable code 
                                public void testBase64() {
        String content = "Hello World";
        String encodedContent;
        byte[] encodedBytes = Base64.encodeBase64(StringUtils.getBytesUtf8(content));
        encodedContent = StringUtils.newStringUtf8(encodedBytes);
        assertTrue("encoding hello world", encodedContent.equals("SGVsbG8gV29ybGQ="));
    } 
                            #location 6 
                            #vulnerability type NULL_DEREFERENCE