Buggy code:
public final class SequenceFilesFromDirectory extends AbstractJob { private static final Logger log = LoggerFactory . getLogger ( SequenceFilesFromDirectory . class ) ; private static final String PREFIX_ADDITION_FILTER = SequenceFilesFromDirectory . PrefixAdditionFilter . class . getName ( ) ; public static final String [ ] CHUNK_SIZE_OPTION = new String [ ] { "chunkSize" , "chunk" } ; public static final String [ ] FILE_FILTER_CLASS_OPTION = new String [ ] { "fileFilterClass" , "filter" } ; public static final String [ ] KEY_PREFIX_OPTION = new String [ ] { "keyPrefix" , "prefix" } ; public static final String [ ] CHARSET_OPTION = new String [ ] { "charset" , "c" } ; public void run ( Configuration conf , Path input , Path output , String prefix , int chunkSizeInMB , Charset charset , String fileFilterClassName ) throws IOException , ClassNotFoundException , IllegalAccessException , IllegalArgumentException , InstantiationException , NoSuchMethodException , SecurityException , InvocationTargetException { } private static final class ChunkedWriter implements Closeable { private final int maxChunkSizeInBytes ; private final Path output ; private Writer writer ; private int currentChunkID ; private int currentChunkSize ; private final FileSystem fs ; private final Configuration conf ; private ChunkedWriter ( Configuration conf , int chunkSizeInMB , Path output ) throws IOException { } private Path getPath ( int chunkID ) { } public void write ( String key , String value ) throws IOException { } @ Override public void close ( ) throws IOException { } } private final class PrefixAdditionFilter implements PathFilter { private final String prefix ; private final SequenceFilesFromDirectory . ChunkedWriter writer ; private final Charset charset ; private final Configuration conf ; private final FileSystem fs ; private PrefixAdditionFilter ( Configuration conf , String prefix , SequenceFilesFromDirectory . ChunkedWriter writer , Charset charset ) throws IOException { } @ Override public boolean accept ( Path current ) { SequenceFilesFromDirectory . log . debug ( "CURRENT:<seq2seq4repair_space>{}" , current . getName ( ) ) ; try { FileStatus [ ] fstatus = fs . listStatus ( current ) ; for ( FileStatus fst : fstatus ) { SequenceFilesFromDirectory . log . debug ( "CHILD:<seq2seq4repair_space>{}" , fst . getPath ( ) . getName ( ) ) ; if ( fst . isDir ( ) ) { fs . listStatus ( fst . getPath ( ) , new SequenceFilesFromDirectory . PrefixAdditionFilter ( conf , ( ( ( prefix ) + ( Path . SEPARATOR ) ) + ( current . getName ( ) ) ) , writer , charset ) ) ; } else { StringBuilder file = new StringBuilder ( ) ; InputStream in = fs . open ( fst . getPath ( ) ) ; for ( String aFit : new FileLineIterable ( in , charset , false ) ) { file . append ( aFit ) . append ( '\n' ) ; } String name = ( current . getName ( ) . equals ( fst . getPath ( ) . getName ( ) ) ) ? current . getName ( ) : ( ( current . getName ( ) ) + ( Path . SEPARATOR ) ) + ( fst . getPath ( ) . getName ( ) ) ; writer . write ( ( ( ( prefix ) + ( Path . SEPARATOR ) ) + name ) , file . toString ( ) ) ; } } <START_BUG> } catch ( Exception e ) { <END_BUG> throw new IllegalStateException ( e ) ; } return false ; } } public static void main ( String [ ] args ) throws Exception { } @ Override public int run ( String [ ] args ) throws IOException , ClassNotFoundException , IllegalAccessException , InstantiationException , NoSuchMethodException , InvocationTargetException { } }

Fix:
} catch ( IOException e ) {