Buggy code:
public int _sparseLen ; int set_sparseLen ( int l ) { } @ Override public int sparseLen ( ) { } private int _naCnt = - 1 ; protected int naCnt ( ) { } private int _enumCnt ; protected int enumCnt ( ) { } private int _strCnt ; protected int strCnt ( ) { } private int _nzCnt ; private int _uuidCnt ; public final int [ ] _timCnt = new int [ TIME_PARSE . length ] ; protected static final int MIN_SPARSE_RATIO = 32 ; private int _sparseRatio = NewChunk . MIN_SPARSE_RATIO ; public NewChunk ( Vec vec , int cidx ) { } public NewChunk ( Vec vec , int cidx , boolean sparse ) { } public NewChunk ( double [ ] ds ) { } public NewChunk ( Vec vec , int cidx , long [ ] mantissa , int [ ] exponent , int [ ] indices , double [ ] doubles ) { } public NewChunk ( Chunk c ) { } public NewChunk ( Vec vec , int cidx , int len ) { } public NewChunk setSparseRatio ( int s ) { } public void set_vec ( Vec vec ) { } public NewChunk convertEnum2Str ( ValueString [ ] emap ) { } public final class Value { int _gId ; int _lId ; public Value ( int lid , int gid ) { } public final int rowId0 ( ) { } public void add2Chunk ( NewChunk c ) { } } public Iterator < NewChunk . Value > values ( ) { } public Iterator < NewChunk . Value > values ( int fromIdx , int toIdx ) { } public byte type ( ) { } protected final boolean isNA2 ( int idx ) { } protected final boolean isEnum2 ( int idx ) { } protected final boolean isEnum ( int idx ) { } public void addEnum ( int e ) { } public void addNA ( ) { } public void addNum ( long val , int exp ) { } public void addNum ( double d ) { } private void append_ss ( String str ) { } private void append_ss ( ValueString str ) { } public void addStr ( ValueString str ) { } public void addUUID ( long lo , long hi ) { } public void addUUID ( Chunk c , long row ) { } public void addUUID ( Chunk c , int row ) { } public final boolean isUUID ( ) { } public final boolean isString ( ) { } public final boolean sparse ( ) { } public void addZeros ( int n ) { } public void add ( NewChunk nc ) { } public void addr ( NewChunk nc ) { } void append2 ( long l , int x ) { } private void append2slowd ( ) { } private void append2slowUUID ( ) { } private void append2slowstr ( ) { } private void append2slow ( ) { } public Chunk new_close ( ) { } public void close ( Futures fs ) { } protected void switch_to_doubles ( ) { } protected void set_sparse ( int nzeros ) { } protected void cancel_sparse ( ) { } public Chunk compress ( ) { } private static long leRange ( long lemin , long lemax ) { } private Chunk compress2 ( ) { byte mode = type ( ) ; if ( mode == ( AppendableVec . NA ) ) return new C0DChunk ( Double . NaN , sparseLen ( ) ) ; if ( mode == ( AppendableVec . STRING ) ) <START_BUG> return new CStrChunk ( _sslen , _ss , sparseLen ( ) , _is ) ; <END_BUG> boolean rerun = false ; if ( mode == ( AppendableVec . ENUM ) ) { for ( int i = 0 ; i < ( sparseLen ( ) ) ; i ++ ) if ( isEnum2 ( i ) ) _xs [ i ] = 0 ; else if ( ! ( isNA2 ( i ) ) ) { setNA_impl2 ( i ) ; ++ ( _naCnt ) ; } } else if ( mode == ( AppendableVec . NUMBER ) ) { for ( int i = 0 ; i < ( sparseLen ( ) ) ; i ++ ) if ( isEnum2 ( i ) ) { setNA_impl2 ( i ) ; rerun = true ; } } if ( rerun ) { _naCnt = - 1 ; type ( ) ; } boolean sparse = false ; if ( ( ( _sparseRatio ) * ( ( _naCnt ) + ( _nzCnt ) ) ) < ( _len ) ) { set_sparse ( ( ( _naCnt ) + ( _nzCnt ) ) ) ; sparse = true ; } else if ( ( sparseLen ( ) ) != ( _len ) ) cancel_sparse ( ) ; if ( ( ( _ds ) != null ) && ( ( _ls ) != null ) ) return chunkUUID ( ) ; if ( ( _ds ) != null ) { int i ; for ( i = 0 ; i < ( sparseLen ( ) ) ; ++ i ) if ( ( ! ( Double . isNaN ( _ds [ i ] ) ) ) && ( ( ( double ) ( ( long ) ( _ds [ i ] ) ) ) != ( _ds [ i ] ) ) ) break ; boolean isInteger = i == ( sparseLen ( ) ) ; boolean isConstant = sparse && ( ( sparseLen ( ) ) == 0 ) ; if ( ! isConstant ) for ( i = 0 ; i < ( sparseLen ( ) ) ; ++ i ) if ( ( _ds [ i ] ) != ( _ds [ 0 ] ) ) break ;

Fix:
return new CStrChunk ( _sslen , _ss , sparseLen ( ) , _len , _is ) ;