Buggy code:
public class ArArchiveOutputStream extends ArchiveOutputStream { public static final int LONGFILE_ERROR = 0 ; public static final int LONGFILE_BSD = 1 ; private final OutputStream out ; private long entryOffset = 0 ; private ArArchiveEntry prevEntry ; private boolean haveUnclosedEntry = false ; private int longFileMode = ArArchiveOutputStream . LONGFILE_ERROR ; private boolean finished = false ; public ArArchiveOutputStream ( final OutputStream pOut ) { } public void setLongFileMode ( int longFileMode ) { } private long writeArchiveHeader ( ) throws IOException { } @ Override public void closeArchiveEntry ( ) throws IOException { } @ Override public void putArchiveEntry ( final ArchiveEntry pEntry ) throws IOException { } private long fill ( final long pOffset , final long pNewOffset , final char pFill ) throws IOException { } private long write ( final String data ) throws IOException { } private long writeEntryHeader ( final ArArchiveEntry pEntry ) throws IOException { long offset = 0 ; boolean mustAppendName = false ; final String n = pEntry . getName ( ) ; if ( ( ( ArArchiveOutputStream . LONGFILE_ERROR ) == ( longFileMode ) ) && ( ( n . length ( ) ) > 16 ) ) { throw new IOException ( ( "filename<seq2seq4repair_space>too<seq2seq4repair_space>long,<seq2seq4repair_space>><seq2seq4repair_space>16<seq2seq4repair_space>chars:<seq2seq4repair_space>" + n ) ) ; } <START_BUG> if ( ( ( ArArchiveOutputStream . LONGFILE_BSD ) == ( longFileMode ) ) && ( ( ( n . length ( ) ) > 16 ) || ( ( n . indexOf ( "<seq2seq4repair_space>" ) ) > ( - 1 ) ) ) ) { <END_BUG> mustAppendName = true ; offset += write ( ( ( ArArchiveInputStream . BSD_LONGNAME_PREFIX ) + ( String . valueOf ( n . length ( ) ) ) ) ) ; } else { offset += write ( n ) ; } offset = fill ( offset , 16 , '<seq2seq4repair_space>' ) ; final String m = "" + ( pEntry . getLastModified ( ) ) ; if ( ( m . length ( ) ) > 12 ) { throw new IOException ( "modified<seq2seq4repair_space>too<seq2seq4repair_space>long" ) ; } offset += write ( m ) ; offset = fill ( offset , 28 , '<seq2seq4repair_space>' ) ; final String u = "" + ( pEntry . getUserId ( ) ) ; if ( ( u . length ( ) ) > 6 ) { throw new IOException ( "userid<seq2seq4repair_space>too<seq2seq4repair_space>long" ) ; } offset += write ( u ) ; offset = fill ( offset , 34 , '<seq2seq4repair_space>' ) ; final String g = "" + ( pEntry . getGroupId ( ) ) ; if ( ( g . length ( ) ) > 6 ) { throw new IOException ( "groupid<seq2seq4repair_space>too<seq2seq4repair_space>long" ) ; } offset += write ( g ) ; offset = fill ( offset , 40 , '<seq2seq4repair_space>' ) ; final String fm = "" + ( Integer . toString ( pEntry . getMode ( ) , 8 ) ) ; if ( ( fm . length ( ) ) > 8 ) { throw new IOException ( "filemode<seq2seq4repair_space>too<seq2seq4repair_space>long" ) ; } offset += write ( fm ) ; offset = fill ( offset , 48 , '<seq2seq4repair_space>' ) ; final String s = String . valueOf ( ( ( pEntry . getLength ( ) ) + ( mustAppendName ? n . length ( ) : 0 ) ) ) ; if ( ( s . length ( ) ) > 10 ) { throw new IOException ( "size<seq2seq4repair_space>too<seq2seq4repair_space>long" ) ; } offset += write ( s ) ; offset = fill ( offset , 58 , '<seq2seq4repair_space>' ) ; offset += write ( TRAILER ) ; if ( mustAppendName ) { offset += write ( n ) ; } return offset ; } @ Override public void write ( byte [ ] b , int off , int len ) throws IOException { } @ Override public void close ( ) throws IOException { } @ Override public ArchiveEntry createArchiveEntry ( File inputFile , String entryName ) throws IOException { } @ Override public void finish ( ) throws IOException { } }

Fix:
if ( ( ( ArArchiveOutputStream . LONGFILE_BSD ) == ( longFileMode ) ) && ( ( ( n . length ( ) ) > 16 ) || ( n . contains ( "<seq2seq4repair_space>" ) ) ) ) {