Buggy code:
public final class TestClusterEvaluator extends MahoutTestCase { private static final double [ ] [ ] REFERENCE = new double [ ] [ ] { new double [ ] { 1 , 1 } , new double [ ] { 2 , 1 } , new double [ ] { 1 , 2 } , new double [ ] { 2 , 2 } , new double [ ] { 3 , 3 } , new double [ ] { 4 , 4 } , new double [ ] { 5 , 4 } , new double [ ] { 4 , 5 } , new double [ ] { 5 , 5 } } ; private List < VectorWritable > referenceData = Lists . newArrayList ( ) ; private final List < VectorWritable > sampleData = Lists . newArrayList ( ) ; private Map < Integer , List < VectorWritable > > representativePoints ; private List < Cluster > clusters ; private static final Logger log = LoggerFactory . getLogger ( TestClusterEvaluator . class ) ; private Configuration conf ; private FileSystem fs ; private Path testdata ; private Path output ; @ Override @ Before public void setUp ( ) throws Exception { } private void generateSamples ( int num , double mx , double my , double sd ) { } private void generateSamples ( ) { } private void printRepPoints ( int numIterations ) { } private void initData ( double dC , double dP , DistanceMeasure measure ) { } @ Test public void testRepresentativePoints ( ) throws Exception { ClusteringTestUtils . writePointsToFile ( referenceData , new Path ( testdata , "file1" ) , fs , conf ) ; DistanceMeasure measure = new EuclideanDistanceMeasure ( ) ; <START_BUG> Configuration conf = new Configuration ( ) ; <END_BUG> CanopyDriver . run ( conf , testdata , output , measure , 3.1 , 1.1 , true , 0.0 , true ) ; int numIterations = 2 ; Path clustersIn = new Path ( output , "clusters-0-final" ) ; RepresentativePointsDriver . run ( conf , clustersIn , new Path ( output , "clusteredPoints" ) , output , measure , numIterations , false ) ; printRepPoints ( numIterations ) ; ClusterEvaluator evaluatorMR = new ClusterEvaluator ( conf , clustersIn ) ; HadoopUtil . delete ( conf , output ) ; CanopyDriver . run ( conf , testdata , output , measure , 3.1 , 1.1 , true , 0.0 , true ) ; RepresentativePointsDriver . run ( conf , clustersIn , new Path ( output , "clusteredPoints" ) , output , measure , numIterations , true ) ; printRepPoints ( numIterations ) ; ClusterEvaluator evaluatorSeq = new ClusterEvaluator ( conf , clustersIn ) ; assertEquals ( "InterCluster<seq2seq4repair_space>Density" , evaluatorMR . interClusterDensity ( ) , evaluatorSeq . interClusterDensity ( ) , EPSILON ) ; assertEquals ( "IntraCluster<seq2seq4repair_space>Density" , evaluatorMR . intraClusterDensity ( ) , evaluatorSeq . intraClusterDensity ( ) , EPSILON ) ; } @ Test public void testCluster0 ( ) throws IOException { } @ Test public void testCluster1 ( ) throws IOException { } @ Test public void testCluster2 ( ) throws IOException { } @ Test public void testEmptyCluster ( ) throws IOException { } @ Test public void testSingleValueCluster ( ) throws IOException { } @ Test public void testAllSameValueCluster ( ) throws IOException { } @ Test public void testCanopy ( ) throws Exception { } @ Test public void testKmeans ( ) throws Exception { } @ Test public void testFuzzyKmeans ( ) throws Exception { } @ Test public void testMeanShift ( ) throws Exception { } @ Test public void testDirichlet ( ) throws Exception { } }

Fix:
Configuration conf = getConfiguration ( ) ;