Buggy code:
public class NaiveBayesTest extends MahoutTestCase { private Configuration conf ; private File inputFile ; private File outputDir ; private File tempDir ; static final Text LABEL_STOLEN = new Text ( "//stolen//" ) ; static final Text LABEL_NOT_STOLEN = new Text ( "//not_stolen//" ) ; static final Element COLOR_RED = MathHelper . elem ( 0 , 1 ) ; static final Element COLOR_YELLOW = MathHelper . elem ( 1 , 1 ) ; static final Element TYPE_SPORTS = MathHelper . elem ( 2 , 1 ) ; static final Element TYPE_SUV = MathHelper . elem ( 3 , 1 ) ; static final Element ORIGIN_DOMESTIC = MathHelper . elem ( 4 , 1 ) ; static final Element ORIGIN_IMPORTED = MathHelper . elem ( 5 , 1 ) ; @ Override @ Before public void setUp ( ) throws Exception { super . setUp ( ) ; <START_BUG> conf = new Configuration ( ) ; <END_BUG> inputFile = getTestTempFile ( "trainingInstances.seq" ) ; outputDir = getTestTempDir ( "output" ) ; outputDir . delete ( ) ; tempDir = getTestTempDir ( "tmp" ) ; SequenceFile . Writer writer = new SequenceFile . Writer ( FileSystem . get ( conf ) , conf , new Path ( inputFile . getAbsolutePath ( ) ) , Text . class , VectorWritable . class ) ; try { writer . append ( NaiveBayesTest . LABEL_STOLEN , NaiveBayesTest . trainingInstance ( NaiveBayesTest . COLOR_RED , NaiveBayesTest . TYPE_SPORTS , NaiveBayesTest . ORIGIN_DOMESTIC ) ) ; writer . append ( NaiveBayesTest . LABEL_NOT_STOLEN , NaiveBayesTest . trainingInstance ( NaiveBayesTest . COLOR_RED , NaiveBayesTest . TYPE_SPORTS , NaiveBayesTest . ORIGIN_DOMESTIC ) ) ; writer . append ( NaiveBayesTest . LABEL_STOLEN , NaiveBayesTest . trainingInstance ( NaiveBayesTest . COLOR_RED , NaiveBayesTest . TYPE_SPORTS , NaiveBayesTest . ORIGIN_DOMESTIC ) ) ; writer . append ( NaiveBayesTest . LABEL_NOT_STOLEN , NaiveBayesTest . trainingInstance ( NaiveBayesTest . COLOR_YELLOW , NaiveBayesTest . TYPE_SPORTS , NaiveBayesTest . ORIGIN_DOMESTIC ) ) ; writer . append ( NaiveBayesTest . LABEL_STOLEN , NaiveBayesTest . trainingInstance ( NaiveBayesTest . COLOR_YELLOW , NaiveBayesTest . TYPE_SPORTS , NaiveBayesTest . ORIGIN_IMPORTED ) ) ; writer . append ( NaiveBayesTest . LABEL_NOT_STOLEN , NaiveBayesTest . trainingInstance ( NaiveBayesTest . COLOR_YELLOW , NaiveBayesTest . TYPE_SUV , NaiveBayesTest . ORIGIN_IMPORTED ) ) ; writer . append ( NaiveBayesTest . LABEL_STOLEN , NaiveBayesTest . trainingInstance ( NaiveBayesTest . COLOR_YELLOW , NaiveBayesTest . TYPE_SUV , NaiveBayesTest . ORIGIN_IMPORTED ) ) ; writer . append ( NaiveBayesTest . LABEL_NOT_STOLEN , NaiveBayesTest . trainingInstance ( NaiveBayesTest . COLOR_YELLOW , NaiveBayesTest . TYPE_SUV , NaiveBayesTest . ORIGIN_DOMESTIC ) ) ; writer . append ( NaiveBayesTest . LABEL_NOT_STOLEN , NaiveBayesTest . trainingInstance ( NaiveBayesTest . COLOR_RED , NaiveBayesTest . TYPE_SUV , NaiveBayesTest . ORIGIN_IMPORTED ) ) ; writer . append ( NaiveBayesTest . LABEL_STOLEN , NaiveBayesTest . trainingInstance ( NaiveBayesTest . COLOR_RED , NaiveBayesTest . TYPE_SPORTS , NaiveBayesTest . ORIGIN_IMPORTED ) ) ; } finally { Closeables . closeQuietly ( writer ) ; } } @ Test public void toyData ( ) throws Exception { } @ Test public void toyDataComplementary ( ) throws Exception { } static VectorWritable trainingInstance ( Vector ... elems ) { } }

Fix:
conf = getConfiguration ( ) ;