Buggy code:
public final class SequenceFilesFromDirectory { private static transient Logger log = LoggerFactory . getLogger ( SequenceFilesFromDirectory . class ) ; private static SequenceFilesFromDirectory . ChunkedWriter createNewChunkedWriter ( int chunkSizeInMB , String outputDir ) throws IOException { } public void createSequenceFiles ( File parentDir , String outputDir , String prefix , int chunkSizeInMB , Charset charset ) throws IOException { } public static class ChunkedWriter implements Closeable { private final int maxChunkSizeInBytes ; private final String outputDir ; private Writer writer ; private int currentChunkID ; private int currentChunkSize ; private final Configuration conf = new Configuration ( ) ; private final FileSystem fs ; public ChunkedWriter ( int chunkSizeInMB , String outputDir ) throws IOException { } private Path getPath ( int chunkID ) { } public void write ( String key , String value ) throws IOException { } @ Override public void close ( ) throws IOException { } } public class PrefixAdditionFilter implements FileFilter { private final String prefix ; private final SequenceFilesFromDirectory . ChunkedWriter writer ; private final Charset charset ; public PrefixAdditionFilter ( String prefix , SequenceFilesFromDirectory . ChunkedWriter writer , Charset charset ) { } @ Override public boolean accept ( File current ) { } } public static void main ( String [ ] args ) throws Exception { DefaultOptionBuilder obuilder = new DefaultOptionBuilder ( ) ; ArgumentBuilder abuilder = new ArgumentBuilder ( ) ; GroupBuilder gbuilder = new GroupBuilder ( ) ; <START_BUG> Option parentOpt = obuilder . withLongName ( "input" ) . withRequired ( true ) . withArgument ( abuilder . withName ( "input" ) . withMinimum ( 1 ) . withMaximum ( 1 ) . create ( ) ) . withDescription ( "The<seq2seq4repair_space>input<seq2seq4repair_space>dir<seq2seq4repair_space>containing<seq2seq4repair_space>the<seq2seq4repair_space>documents" ) . withShortName ( "p" ) . create ( ) ; <END_BUG> Option outputDirOpt = obuilder . withLongName ( "output" ) . withRequired ( true ) . withArgument ( abuilder . withName ( "output" ) . withMinimum ( 1 ) . withMaximum ( 1 ) . create ( ) ) . withDescription ( "The<seq2seq4repair_space>output<seq2seq4repair_space>directory" ) . withShortName ( "o" ) . create ( ) ; Option chunkSizeOpt = obuilder . withLongName ( "chunkSize" ) . withArgument ( abuilder . withName ( "chunkSize" ) . withMinimum ( 1 ) . withMaximum ( 1 ) . create ( ) ) . withDescription ( "The<seq2seq4repair_space>chunkSize<seq2seq4repair_space>in<seq2seq4repair_space>MegaBytes.<seq2seq4repair_space>Defaults<seq2seq4repair_space>to<seq2seq4repair_space>64" ) . withShortName ( "chunk" ) . create ( ) ; Option keyPrefixOpt = obuilder . withLongName ( "keyPrefix" ) . withArgument ( abuilder . withName ( "keyPrefix" ) . withMinimum ( 1 ) . withMaximum ( 1 ) . create ( ) ) . withDescription ( "The<seq2seq4repair_space>prefix<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>prepended<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>key" ) . withShortName ( "prefix" ) . create ( ) ; Option charsetOpt = obuilder . withLongName ( "charset" ) . withRequired ( true ) . withArgument ( abuilder . withName ( "charset" ) . withMinimum ( 1 ) . withMaximum ( 1 ) . create ( ) ) . withDescription ( "The<seq2seq4repair_space>name<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>character<seq2seq4repair_space>encoding<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>input<seq2seq4repair_space>files" ) . withShortName ( "c" ) . create ( ) ; Option helpOpt = obuilder . withLongName ( "help" ) . withDescription ( "Print<seq2seq4repair_space>out<seq2seq4repair_space>help" ) . withShortName ( "h" ) . create ( ) ; Group group = gbuilder . withName ( "Options" ) . withOption ( keyPrefixOpt ) . withOption ( chunkSizeOpt ) . withOption ( charsetOpt ) . withOption ( outputDirOpt ) . withOption ( helpOpt ) . withOption ( parentOpt ) . create ( ) ; try { Parser parser = new Parser ( ) ; parser . setGroup ( group ) ; CommandLine cmdLine = parser . parse ( args ) ; if ( cmdLine . hasOption ( helpOpt ) ) { CommandLineUtil . printHelp ( group ) ; return ; } File parentDir = new File ( ( ( String ) ( cmdLine . getValue ( parentOpt ) ) ) ) ; String outputDir = ( ( String ) ( cmdLine . getValue ( outputDirOpt ) ) ) ; int chunkSize = 64 ; if ( cmdLine . hasOption ( chunkSizeOpt ) ) { chunkSize = Integer . parseInt ( ( ( String ) ( cmdLine . getValue ( chunkSizeOpt ) ) ) ) ; } String prefix = "" ; if ( cmdLine . hasOption ( keyPrefixOpt ) ) { prefix = ( ( String ) ( cmdLine . getValue ( keyPrefixOpt ) ) ) ; } Charset charset = Charset . forName ( ( ( String ) ( cmdLine . getValue ( charsetOpt ) ) ) ) ; SequenceFilesFromDirectory dir = new SequenceFilesFromDirectory ( ) ; dir . createSequenceFiles ( parentDir , outputDir , prefix , chunkSize , charset ) ; } catch ( OptionException e ) { SequenceFilesFromDirectory . log . error ( "Exception" , e ) ; CommandLineUtil . printHelp ( group ) ; } } }

Fix:
Option parentOpt = obuilder . withLongName ( "input" ) . withRequired ( true ) . withArgument ( abuilder . withName ( "input" ) . withMinimum ( 1 ) . withMaximum ( 1 ) . create ( ) ) . withDescription ( "The<seq2seq4repair_space>input<seq2seq4repair_space>dir<seq2seq4repair_space>containing<seq2seq4repair_space>the<seq2seq4repair_space>documents" ) . withShortName ( "i" ) . create ( ) ;