Buggy code:
public class SecondarySort extends Configured implements Tool { public static class IntPair implements WritableComparable < SecondarySort . IntPair > { private int first = 0 ; private int second = 0 ; public void set ( int left , int right ) { } public int getFirst ( ) { } public int getSecond ( ) { } @ Override public void readFields ( DataInput in ) throws IOException { } @ Override public void write ( DataOutput out ) throws IOException { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object right ) { } public static class Comparator extends WritableComparator { public Comparator ( ) { } public int compare ( byte [ ] b1 , int s1 , int l1 , byte [ ] b2 , int s2 , int l2 ) { } } @ Override public int compareTo ( SecondarySort . IntPair o ) { } } public static class FirstPartitioner extends Partitioner < SecondarySort . IntPair , IntWritable > { @ Override public int getPartition ( SecondarySort . IntPair key , IntWritable value , int numPartitions ) { } } public static class FirstGroupingComparator implements RawComparator < SecondarySort . IntPair > { @ Override public int compare ( byte [ ] b1 , int s1 , int l1 , byte [ ] b2 , int s2 , int l2 ) { } @ Override public int compare ( SecondarySort . IntPair o1 , SecondarySort . IntPair o2 ) { } } public static class MapClass extends Mapper < LongWritable , Text , SecondarySort . IntPair , IntWritable > { private final SecondarySort . IntPair key = new SecondarySort . IntPair ( ) ; private final IntWritable value = new IntWritable ( ) ; @ Override public void map ( LongWritable inKey , Text inValue , Context context ) throws IOException , InterruptedException { } } public static class Reduce extends Reducer < SecondarySort . IntPair , IntWritable , Text , IntWritable > { private static final Text SEPARATOR = new Text ( "------------------------------------------------" ) ; private final Text first = new Text ( ) ; @ Override public void reduce ( SecondarySort . IntPair key , Iterable < IntWritable > values , Context context ) throws IOException , InterruptedException { } } @ Override public int run ( String [ ] args ) throws Exception { Configuration conf = getConf ( ) ; String [ ] otherArgs = new org . apache . hadoop . util . GenericOptionsParser ( conf , args ) . getRemainingArgs ( ) ; if ( ( otherArgs . length ) != 2 ) { System . err . println ( "Usage:<seq2seq4repair_space>secondarysort<seq2seq4repair_space><in><seq2seq4repair_space><out>" ) ; ToolRunner . printGenericCommandUsage ( System . out ) ; <START_BUG> System . exit ( 2 ) ; <END_BUG> } Job job = new Job ( conf , "secondary<seq2seq4repair_space>sort" ) ; job . setJarByClass ( SecondarySort . class ) ; job . setMapperClass ( SecondarySort . MapClass . class ) ; job . setReducerClass ( SecondarySort . Reduce . class ) ; job . setPartitionerClass ( SecondarySort . FirstPartitioner . class ) ; job . setGroupingComparatorClass ( SecondarySort . FirstGroupingComparator . class ) ; job . setMapOutputKeyClass ( SecondarySort . IntPair . class ) ; job . setMapOutputValueClass ( IntWritable . class ) ; job . setOutputKeyClass ( Text . class ) ; job . setOutputValueClass ( IntWritable . class ) ; FileInputFormat . addInputPath ( job , new Path ( otherArgs [ 0 ] ) ) ; FileOutputFormat . setOutputPath ( job , new Path ( otherArgs [ 1 ] ) ) ; return job . waitForCompletion ( true ) ? 0 : 1 ; } public static void main ( String [ ] args ) throws Exception { } }

Fix:
return 2 ;