Buggy code:
public class CVB0Driver extends AbstractJob { private static final Logger log = LoggerFactory . getLogger ( CVB0Driver . class ) ; public static final String NUM_TOPICS = "num_topics" ; public static final String NUM_TERMS = "num_terms" ; public static final String DOC_TOPIC_SMOOTHING = "doc_topic_smoothing" ; public static final String TERM_TOPIC_SMOOTHING = "term_topic_smoothing" ; public static final String DICTIONARY = "dictionary" ; public static final String DOC_TOPIC_OUTPUT = "doc_topic_output" ; public static final String MODEL_TEMP_DIR = "topic_model_temp_dir" ; public static final String ITERATION_BLOCK_SIZE = "iteration_block_size" ; public static final String RANDOM_SEED = "random_seed" ; public static final String TEST_SET_FRACTION = "test_set_fraction" ; public static final String NUM_TRAIN_THREADS = "num_train_threads" ; public static final String NUM_UPDATE_THREADS = "num_update_threads" ; public static final String MAX_ITERATIONS_PER_DOC = "max_doc_topic_iters" ; public static final String MODEL_WEIGHT = "prev_iter_mult" ; public static final String NUM_REDUCE_TASKS = "num_reduce_tasks" ; public static final String BACKFILL_PERPLEXITY = "backfill_perplexity" ; private static final String MODEL_PATHS = "mahout.lda.cvb.modelPath" ; private static final double DEFAULT_CONVERGENCE_DELTA = 0 ; private static final double DEFAULT_DOC_TOPIC_SMOOTHING = 1.0E-4 ; private static final double DEFAULT_TERM_TOPIC_SMOOTHING = 1.0E-4 ; private static final int DEFAULT_ITERATION_BLOCK_SIZE = 10 ; private static final double DEFAULT_TEST_SET_FRACTION = 0 ; private static final int DEFAULT_NUM_TRAIN_THREADS = 4 ; private static final int DEFAULT_NUM_UPDATE_THREADS = 1 ; private static final int DEFAULT_MAX_ITERATIONS_PER_DOC = 10 ; private static final int DEFAULT_NUM_REDUCE_TASKS = 10 ; @ Override public int run ( String [ ] args ) throws Exception { } private static int getNumTerms ( Configuration conf , Path dictionaryPath ) throws IOException { } public int run ( Configuration conf , Path inputPath , Path topicModelOutputPath , int numTopics , int numTerms , double alpha , double eta , int maxIterations , int iterationBlockSize , double convergenceDelta , Path dictionaryPath , Path docTopicOutputPath , Path topicModelStateTempPath , long randomSeed , float testFraction , int numTrainThreads , int numUpdateThreads , int maxItersPerDoc , int numReduceTasks , boolean backfillPerplexity ) throws IOException , ClassNotFoundException , InterruptedException { } private static double rateOfChange ( List < Double > perplexities ) { } private double calculatePerplexity ( Configuration conf , Path corpusPath , Path modelPath , int iteration ) throws IOException , ClassNotFoundException , InterruptedException { } public static class DualDoubleSumReducer extends Reducer < DoubleWritable , DoubleWritable , DoubleWritable , DoubleWritable > { private final DoubleWritable outKey = new DoubleWritable ( ) ; private final DoubleWritable outValue = new DoubleWritable ( ) ; @ Override public void run ( Context context ) throws IOException , InterruptedException { } } public static double readPerplexity ( Configuration conf , Path topicModelStateTemp , int iteration ) throws IOException { } private Job writeTopicModel ( Configuration conf , Path modelInput , Path output ) throws IOException , ClassNotFoundException , InterruptedException { } private Job writeDocTopicInference ( Configuration conf , Path corpus , Path modelInput , Path output ) throws IOException , ClassNotFoundException , InterruptedException { String jobName = String . format ( "Writing<seq2seq4repair_space>final<seq2seq4repair_space>document//topic<seq2seq4repair_space>inference<seq2seq4repair_space>from<seq2seq4repair_space>%s<seq2seq4repair_space>to<seq2seq4repair_space>%s" , corpus , output ) ; CVB0Driver . log . info ( "About<seq2seq4repair_space>to<seq2seq4repair_space>run:<seq2seq4repair_space>{}" , jobName ) ; <START_BUG> Job job = prepareJob ( corpus , outputPath , SequenceFileInputFormat . class , CVB0DocInferenceMapper . class , IntWritable . class , VectorWritable . class , SequenceFileOutputFormat . class , jobName ) ; <END_BUG> FileSystem fs = FileSystem . get ( corpus . toUri ( ) , conf ) ; if ( ( modelInput != null ) && ( fs . exists ( modelInput ) ) ) { FileStatus [ ] statuses = fs . listStatus ( modelInput , PathFilters . partFilter ( ) ) ; URI [ ] modelUris = new URI [ statuses . length ] ; for ( int i = 0 ; i < ( statuses . length ) ; i ++ ) { modelUris [ i ] = statuses [ i ] . getPath ( ) . toUri ( ) ; } DistributedCache . setCacheFiles ( modelUris , conf ) ; CVB0Driver . setModelPaths ( job , modelInput ) ; } job . submit ( ) ; return job ; } public static Path modelPath ( Path topicModelStateTempPath , int iterationNumber ) { } public static Path perplexityPath ( Path topicModelStateTempPath , int iterationNumber ) { } private static int getCurrentIterationNumber ( Configuration config , Path modelTempDir , int maxIterations ) throws IOException { } public void runIteration ( Configuration conf , Path corpusInput , Path modelInput , Path modelOutput , int iterationNumber , int maxIterations , int numReduceTasks ) throws IOException , ClassNotFoundException , InterruptedException { } private static void setModelPaths ( Job job , Path modelPath ) throws IOException { } public static Path [ ] getModelPaths ( Configuration conf ) { } public static void main ( String [ ] args ) throws Exception { } }

Fix:
Job job = prepareJob ( corpus , output , SequenceFileInputFormat . class , CVB0DocInferenceMapper . class , IntWritable . class , VectorWritable . class , SequenceFileOutputFormat . class , jobName ) ;