Buggy code:
public class DeduplicatePivotedGrammar { private static final Logger logger = Logger . getLogger ( DeduplicatePivotedGrammar . class . getName ( ) ) ; private static final String DELIM = String . format ( "<seq2seq4repair_space>%s<seq2seq4repair_space>" , DELIMITER_REGEX ) ; private static List < SimpleFeature > simple ; private static List < PivotedFeature > pivoted ; private static boolean sparse ; private static boolean labeled ; private static void writeRule ( RuleWritable rule ) { } private static void writeIndex ( String index_file ) throws FileNotFoundException , IOException { } public static void main ( String [ ] args ) { DeduplicatePivotedGrammar . labeled = false ; DeduplicatePivotedGrammar . sparse = false ; String grammar_file = null ; String index_file = null ; String feature_string = null ; for ( int i = 0 ; i < ( args . length ) ; i ++ ) { if ( ( "-g" . equals ( args [ i ] ) ) && ( i < ( ( args . length ) - 1 ) ) ) { grammar_file = args [ ( ++ i ) ] ; } else if ( ( "-i" . equals ( args [ i ] ) ) && ( i < ( ( args . length ) - 1 ) ) ) { index_file = args [ ( ++ i ) ] ; } else if ( ( "-f" . equals ( args [ i ] ) ) && ( i < ( ( args . length ) - 1 ) ) ) { feature_string += "<seq2seq4repair_space>" + ( args [ ( ++ i ) ] ) ; } else if ( "-l" . equals ( args [ i ] ) ) { DeduplicatePivotedGrammar . labeled = true ; } else if ( "-s" . equals ( args [ i ] ) ) { DeduplicatePivotedGrammar . sparse = true ; } } if ( grammar_file == null ) { DeduplicatePivotedGrammar . logger . severe ( "No<seq2seq4repair_space>grammar<seq2seq4repair_space>specified." ) ; return ; } if ( index_file == null ) { <START_BUG> DeduplicatePivotedGrammar . logger . severe ( "No<seq2seq4repair_space>grammar<seq2seq4repair_space>specified." ) ; <END_BUG> return ; } if ( feature_string == null ) { DeduplicatePivotedGrammar . logger . severe ( "No<seq2seq4repair_space>features<seq2seq4repair_space>specified." ) ; return ; } if ( ( ! ( DeduplicatePivotedGrammar . labeled ) ) && ( DeduplicatePivotedGrammar . sparse ) ) { DeduplicatePivotedGrammar . logger . severe ( ( "I<seq2seq4repair_space>cannot<seq2seq4repair_space>condone<seq2seq4repair_space>grammars<seq2seq4repair_space>that<seq2seq4repair_space>are<seq2seq4repair_space>both<seq2seq4repair_space>sparse<seq2seq4repair_space>" + "and<seq2seq4repair_space>unlabeled." ) ) ; return ; } DeduplicatePivotedGrammar . simple = SimpleFeatureFactory . getAll ( feature_string ) ; DeduplicatePivotedGrammar . pivoted = PivotedFeatureFactory . getAll ( feature_string ) ; try { MapWritable features = new MapWritable ( ) ; LineReader reader = new LineReader ( grammar_file ) ; RuleWritable rule = null ; RuleWritable last_rule = null ; for ( PivotedFeature pf : DeduplicatePivotedGrammar . pivoted ) pf . initializeAggregation ( ) ; while ( reader . hasNext ( ) ) { String rule_line = reader . next ( ) . trim ( ) ; features . clear ( ) ; String [ ] feature_entries = rule_line . split ( DeduplicatePivotedGrammar . DELIM ) [ 3 ] . split ( "\\s+" ) ; int i ; if ( ( feature_entries . length ) > 0 ) { if ( ! ( feature_entries [ 0 ] . contains ( "=" ) ) ) { DeduplicatePivotedGrammar . logger . severe ( "Expecting<seq2seq4repair_space>labeled<seq2seq4repair_space>features." ) ; System . exit ( 0 ) ; } for ( i = 0 ; i < ( feature_entries . length ) ; i ++ ) { String [ ] parts = feature_entries [ i ] . split ( "=" ) ; Text label = new Text ( parts [ 0 ] ) ; DoubleWritable value = new DoubleWritable ( Double . parseDouble ( parts [ 1 ] ) ) ; features . put ( label , value ) ; } } rule = new RuleWritable ( rule_line ) ; if ( ( last_rule != null ) && ( ! ( last_rule . sameYield ( rule ) ) ) ) { DeduplicatePivotedGrammar . writeRule ( last_rule ) ; for ( PivotedFeature pf : DeduplicatePivotedGrammar . pivoted ) pf . initializeAggregation ( ) ; } for ( PivotedFeature pf : DeduplicatePivotedGrammar . pivoted ) pf . aggregate ( features ) ; last_rule = rule ; } DeduplicatePivotedGrammar . writeRule ( rule ) ; DeduplicatePivotedGrammar . writeIndex ( index_file ) ; reader . close ( ) ; } catch ( IOException e ) { DeduplicatePivotedGrammar . logger . severe ( e . getMessage ( ) ) ; } } }

Fix:
DeduplicatePivotedGrammar . logger . severe ( "No<seq2seq4repair_space>index<seq2seq4repair_space>file<seq2seq4repair_space>specified." ) ;