code: public HadoopJobResults run(Collection<String> inputPaths)
              throws Exception {
  
          // Create a mostly unique file name for the output directory.
          String outputDir = "output-" + System.currentTimeMillis();
          //conf.setBoolean("mapred.task.profile", true);
  
          Job job = new Job(conf, mapperClass.getName() + "-" 
                            + reducerClass.getName());
  	
          job.setJarByClass(HadoopJob.class);
          job.setMapperClass(mapperClass);
          job.setReducerClass(reducerClass);
  	
          job.setMapOutputKeyClass(mapperOutputKey);
          job.setMapOutputValueClass(mapperOutputValue);
          job.setOutputKeyClass(outputKey);
          job.setOutputValueClass(outputValue);
          
          // Add all the specified directories as input paths for the job
          for (String inputDir : inputPaths) 
              FileInputFormat.addInputPath(job, new Path(inputDir));
          Path outputDirPath = new Path(outputDir);
          FileOutputFormat.setOutputPath(job, outputDirPath);
  	
          job.waitForCompletion(true);
  
          // From the output directory, collect all the results files 
          FileSystem fs = FileSystem.get(conf);
          FileStatus[] outputFiles = 
              fs.listStatus(outputDirPath, new OutputFilePathFilter());
          Collection<Path> paths = new LinkedList<Path>();
          for (FileStatus status : outputFiles) {
              paths.add(status.getPath());
          }
          
          return new HadoopJobResults(fs, paths);
      }
docs: Exceutes the word co-occurrence counting job on the corpus files in the
  input directory using the current Hadoop instance, returning an iterator
  over all the occurrences frequences found in the corpus.
  
  @param inputPaths the directories on the Hadoop distributed file system
  containing all the corpus files that will be processed
  
  @return an iterator over the unique {@link WordCooccurrence} counts found
  in the corpus.  Note that if two words co-occur the same distance
  apart multiple times, only one {@code WordCooccurrence} is
  returned, where the number of co-occurrences is reflected by the
  the {@link WordCooccurrence#getCount() getCount()} method.
  
  @throws Exception if Hadoop throws an {@code Exception} during its
  execution or if the resulting output files cannot be read.