Buggy code:
public class Main { private static final int nTrialsPerPaper = 12 ; private Indexer < String > wordIndexer ; private Indexer < PaperAbstract > paperIndexer ; private Terms terms ; private KNNSimilarityCache knnSimilarityCache ; private KNNGraphDistanceCache knnGraphDistanceCache ; private static MetadataLogger metadataLogger ; private static Random randGen ; public List < TrainingPaper > trainingSet ; public List < PredictionPaper > testingSet ; private Baseline baseline ; private CommonNeighbors cn ; private DTRandomWalkPredictor dtRWPredictor ; private KNN knn ; private KNNWithCitation knnc ; private LSI lsi ; public Main ( long randomSeed ) { } public void load_data ( String filename , double trainPercent ) { } private void splitByTrainPercent ( double trainPercent , List < PaperAbstract > documents ) { } public void splitHeldoutWords ( double testWordPercent ) { } public static Random getRandomGenerator ( ) { } public static MetadataLogger getMetadataLogger ( ) { } public double [ ] evaluate ( PredictionPaper testingPaper , Integer [ ] prediction , int size , int k ) { } public static void printResults ( double [ ] results ) { } public static void printResults ( File output , double [ ] results ) { } public void runClusteringMethods ( File outputDir , int [ ] ks ) { int size = ( trainingSet . size ( ) ) + ( testingSet . size ( ) ) ; if ( Main . testIsEnabled ( "baseline" ) ) { baseline = new Baseline ( trainingSet , terms ) ; runClusteringMethod ( testingSet , baseline , outputDir , ks , size ) ; } if ( Main . testIsEnabled ( "dtrw" ) ) { int rwLength = Integer . getInteger ( "plusone.dtrw.walkLength" , 4 ) ; boolean stoch = Boolean . getBoolean ( "plusone.dtrw.stochastic" ) ; int nSampleWalks = Integer . getInteger ( "plusone.dtrw.nSampleWalks" ) ; System . out . println ( ( "Random<seq2seq4repair_space>walk<seq2seq4repair_space>length:<seq2seq4repair_space>" + rwLength ) ) ; if ( stoch ) System . out . println ( ( ( "Stochastic<seq2seq4repair_space>random<seq2seq4repair_space>walk:<seq2seq4repair_space>" + nSampleWalks ) + "<seq2seq4repair_space>samples." ) ) ; boolean finalIdf = Boolean . getBoolean ( "plusone.dtrw.finalIdf" ) ; boolean ndiw = Boolean . getBoolean ( "plusone.dtrw.normalizeDocsInWord" ) ; Boolean nwid = Boolean . getBoolean ( "plusone.dtrw.normalizeWordsInDoc" ) ; dtRWPredictor = new DTRandomWalkPredictor ( trainingSet , terms , rwLength , stoch , nSampleWalks , finalIdf , nwid , ndiw ) ; runClusteringMethod ( testingSet , dtRWPredictor , outputDir , ks , size ) ; } int [ ] closest_k = Main . parseIntList ( System . getProperty ( "plusone.closestKValues" , "1,3,5,10,25,50,100,250,500,1000,10000,100000" ) ) ; KNNSimilarityCacheLocalSVDish KNNSVDcache = null ; LocalSVDish localSVD ; KNNLocalSVDish knnSVD ; if ( Main . testIsEnabled ( "svdishknn" ) ) { int [ ] TODOpar = new int [ ] { 50 , 50 , 50 } ; localSVD = new LocalSVDish ( 3 , TODOpar , TODOpar , TODOpar , TODOpar , TODOpar , trainingSet , terms . size ( ) ) ; KNNSVDcache = new KNNSimilarityCacheLocalSVDish ( trainingSet , testingSet , localSVD ) ; } for ( int ck = 0 ; ck < ( closest_k . length ) ; ck ++ ) { if ( Main . testIsEnabled ( "knn" ) ) { knn = new KNN ( closest_k [ ck ] , trainingSet , paperIndexer , terms , knnSimilarityCache ) ; runClusteringMethod ( testingSet , knn , outputDir , ks , size ) ; } <START_BUG> if ( Main . testIsEnabled ( "KNNLocalSVDish" ) ) { <END_BUG> knnSVD = new KNNLocalSVDish ( closest_k [ ck ] , trainingSet , paperIndexer , terms , KNNSVDcache ) ; runClusteringMethod ( testingSet , knnSVD , outputDir , ks , size ) ; } if ( Main . testIsEnabled ( "knnc" ) ) { knnc = new KNNWithCitation ( closest_k [ ck ] , trainingSet , paperIndexer , knnSimilarityCache , knnGraphDistanceCache , terms ) ; runClusteringMethod ( testingSet , knnc , outputDir , ks , size ) ; } } int [ ] dimensions = Main . parseIntList ( System . getProperty ( "plusone.svdDimensions" , "1,5,10,20" ) ) ; for ( int dk = 0 ; dk < ( dimensions . length ) ; dk ++ ) { if ( Main . testIsEnabled ( "lsi" ) ) { lsi = new LSI ( dimensions [ dk ] , trainingSet , terms ) ; runClusteringMethod ( testingSet , lsi , outputDir , ks , size ) ; } } } public void runClusteringMethod ( List < PredictionPaper > testingSet , ClusteringTest test , File outputDir , int [ ] ks , int size ) { } static double [ ] parseDoubleList ( String s ) { } static int [ ] parseIntList ( String s ) { } static Boolean testIsEnabled ( String testName ) { } public static void main ( String [ ] args ) { } No newline ; at end ; of file ; }

Fix:
if ( Main . testIsEnabled ( "svdishknn" ) ) {