anchor.diff:  [source,java]
   ----
   public class MyMapper extends MapReduceBase implements Mapper {
  -	@Override
  -	public void map(Object key, Object value, OutputCollector output, Reporter reporter) throws IOException {
  -	   // assuming the document is a String called 'source'
  -	   String source =  ...
  -	   Text jsonDoc = new Text(source)
  -	   // send the doc directly
  -	   output.collect(NullWritable.get(), jsonDoc);
  -	}}
  + @Override
  + public void map(Object key, Object value, OutputCollector output, Reporter reporter)
  +        throws IOException {
  +   // assuming the document is a String called 'source'
  +   String source =  ...
  +   Text jsonDoc = new Text(source);
  +   // send the doc directly
  +   output.collect(NullWritable.get(), jsonDoc);
  + }}
   ----
   
   [float]
  
positive.code: [source,java]
  ----
  public class SomeMapper extends Mapper {
      @Override
      protected void map(Object key, Object value, Context context) throws IOException, InterruptedException {
  		// create the MapWritable object
  		MapWritable doc = new MapWritable()
  		...
  	    context.write(NullWritable.get(), doc);
  	}}
  ----
  
  [float]
  
negative.code: 
  A `Mapper` using `EsInputFormat` might look as follows:
  
  [source,java]
  ----
  public class MyMapper extends MapReduceBase implements Mapper {
   @Override
   public void map(Object key, Object value, OutputCollector output, Reporter reporter) 
          throws IOException {
     Text docId = (Text) key;
     MapWritable doc = (MapWritable) value;
     ...
   }}
  ----
  NOTE: Feel free to use Java 5 generics to avoid the cast above. For clarity and readability, the examples in this chapter
  do not include generics.
  