Buggy code:
public final class FPGrowthDriver extends AbstractJob { private static final Logger log = LoggerFactory . getLogger ( FPGrowthDriver . class ) ; private FPGrowthDriver ( ) { } public static void main ( String [ ] args ) throws Exception { } @ Override public int run ( String [ ] args ) throws Exception { } private static void runFPGrowth ( Parameters params ) throws IOException { FPGrowthDriver . log . info ( "Starting<seq2seq4repair_space>Sequential<seq2seq4repair_space>FPGrowth" ) ; int maxHeapSize = Integer . valueOf ( params . get ( "maxHeapSize" , "50" ) ) ; int minSupport = Integer . valueOf ( params . get ( "minSupport" , "3" ) ) ; String output = params . get ( "output" , "output.txt" ) ; Path path = new Path ( output ) ; Configuration conf = new Configuration ( ) ; FileSystem fs = FileSystem . get ( path . toUri ( ) , conf ) ; Charset encoding = Charset . forName ( params . get ( "encoding" ) ) ; String input = params . get ( "input" ) ; String pattern = params . get ( "splitPattern" , SPLITTER . toString ( ) ) ; SequenceFile . Writer writer = new SequenceFile . Writer ( fs , conf , path , Text . class , TopKStringPatterns . class ) ; <START_BUG> if ( "true" . equals ( params . get ( "useFPG2" ) ) ) { <END_BUG> FPGrowthObj < String > fp = new FPGrowthObj < String > ( ) ; Collection < String > features = new HashSet < String > ( ) ; try { fp . generateTopKFrequentPatterns ( new org . apache . mahout . common . iterator . StringRecordIterator ( new FileLineIterable ( new File ( input ) , encoding , false ) , pattern ) , fp . generateFList ( new org . apache . mahout . common . iterator . StringRecordIterator ( new FileLineIterable ( new File ( input ) , encoding , false ) , pattern ) , minSupport ) , minSupport , maxHeapSize , features , new StringOutputConverter ( new org . apache . mahout . fpm . pfpgrowth . convertors . SequenceFileOutputCollector < Text , TopKStringPatterns > ( writer ) ) , new ContextStatusUpdater ( null ) ) ; } finally { Closeables . closeQuietly ( writer ) ; } } else { FPGrowth < String > fp = new FPGrowth < String > ( ) ; Collection < String > features = new HashSet < String > ( ) ; try { fp . generateTopKFrequentPatterns ( new org . apache . mahout . common . iterator . StringRecordIterator ( new FileLineIterable ( new File ( input ) , encoding , false ) , pattern ) , fp . generateFList ( new org . apache . mahout . common . iterator . StringRecordIterator ( new FileLineIterable ( new File ( input ) , encoding , false ) , pattern ) , minSupport ) , minSupport , maxHeapSize , features , new StringOutputConverter ( new org . apache . mahout . fpm . pfpgrowth . convertors . SequenceFileOutputCollector < Text , TopKStringPatterns > ( writer ) ) , new ContextStatusUpdater ( null ) ) ; } finally { Closeables . closeQuietly ( writer ) ; } } List < Pair < String , TopKStringPatterns > > frequentPatterns = FPGrowth . readFrequentPattern ( conf , path ) ; for ( Pair < String , TopKStringPatterns > entry : frequentPatterns ) { FPGrowthDriver . log . info ( "Dumping<seq2seq4repair_space>Patterns<seq2seq4repair_space>for<seq2seq4repair_space>Feature:<seq2seq4repair_space>{}<seq2seq4repair_space>\n{}" , entry . getFirst ( ) , entry . getSecond ( ) ) ; } } }

Fix:
if ( "true" . equals ( params . get ( USE_FPG2 ) ) ) {