Buggy code:
; private static final byte [ ] URL_SAFE_ENCODE_TABLE = new byte [ ] { 'A' , 'B' , 'C' , 'D' , 'E' , 'F' , 'G' , 'H' , 'I' , 'J' , 'K' , 'L' , 'M' , 'N' , 'O' , 'P' , 'Q' , 'R' , 'S' , 'T' , 'U' , 'V' , 'W' , 'X' , 'Y' , 'Z' , 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , 'k' , 'l' , 'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 's' , 't' , 'u' , 'v' , 'w' , 'x' , 'y' , 'z' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '-' , '_' } ; private static final byte PAD = '=' ; private static final byte [ ] DECODE_TABLE = new byte [ ] { - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 62 , - 1 , 62 , - 1 , 63 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , - 1 , 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , - 1 , - 1 , - 1 , - 1 , 63 , - 1 , 26 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 , 50 , 51 } ; private static final int MASK_6BITS = 63 ; private static final int MASK_8BITS = 255 ; private final byte [ ] encodeTable ; private final int lineLength ; private final byte [ ] lineSeparator ; private final int decodeSize ; private final int encodeSize ; private byte [ ] buffer ; private int pos ; private int readPos ; private int currentLinePos ; private int modulus ; private boolean eof ; private int x ; public Base64 ( ) { } public Base64 ( boolean urlSafe ) { } public Base64 ( int lineLength ) { } public Base64 ( int lineLength , byte [ ] lineSeparator ) { } public Base64 ( int lineLength , byte [ ] lineSeparator , boolean urlSafe ) { } public boolean isUrlSafe ( ) { } boolean hasData ( ) { } int avail ( ) { } private void resizeBuffer ( ) { } int readResults ( byte [ ] b , int bPos , int bAvail ) { } void setInitialBuffer ( byte [ ] out , int outPos , int outAvail ) { } void encode ( byte [ ] in , int inPos , int inAvail ) { } void decode ( byte [ ] in , int inPos , int inAvail ) { } public static boolean isBase64 ( byte octet ) { } public static boolean isArrayByteBase64 ( byte [ ] arrayOctet ) { } private static boolean containsBase64Byte ( byte [ ] arrayOctet ) { } public static byte [ ] encodeBase64 ( byte [ ] binaryData ) { } public static String encodeBase64String ( byte [ ] binaryData ) { <START_BUG> return StringUtils . newStringUtf8 ( Base64 . encodeBase64 ( binaryData , true ) ) ; <END_BUG> } public static byte [ ] encodeBase64URLSafe ( byte [ ] binaryData ) { } public static String encodeBase64URLSafeString ( byte [ ] binaryData ) { } public static byte [ ] encodeBase64Chunked ( byte [ ] binaryData ) { } public Object decode ( Object pObject ) throws DecoderException { } public byte [ ] decode ( String pArray ) { } public byte [ ] decode ( byte [ ] pArray ) { } public static byte [ ] encodeBase64 ( byte [ ] binaryData , boolean isChunked ) { } public static byte [ ] encodeBase64 ( byte [ ] binaryData , boolean isChunked , boolean urlSafe ) { } public static byte [ ] encodeBase64 ( byte [ ] binaryData , boolean isChunked , boolean urlSafe , int maxResultSize ) { } public static byte [ ] decodeBase64 ( String base64String ) { } public static byte [ ] decodeBase64 ( byte [ ] base64Data ) { } static byte [ ] discardWhitespace ( byte [ ] data ) { } private static boolean isWhiteSpace ( byte byteToCheck ) { } public Object encode ( Object pObject ) throws EncoderException { } public String encodeToString ( byte [ ] pArray ) { } public byte [ ] encode ( byte [ ] pArray ) { } private static long getEncodeLength ( byte [ ] pArray , int chunkSize , byte [ ] chunkSeparator ) { }

Fix:
return StringUtils . newStringUtf8 ( Base64 . encodeBase64 ( binaryData , false ) ) ;