Program: 104683
Project: 104683
Buggy source:
@SuppressWarnings("String_Node_Str") public <T>MapreduceResults<T> mapReduce(MapreduceType type,Query query,String map,String reduce,String finalize,Map<String,Object> scopeFields,Class<T> outputType){
  Assert.parametersNotNull("String_Node_Str",map);
  Assert.parameterNotEmpty(map,"String_Node_Str");
  Assert.parametersNotNull("String_Node_Str",reduce);
  Assert.parameterNotEmpty(reduce,"String_Node_Str");
  if (MapreduceType.INLINE.equals(type))   throw new IllegalArgumentException("String_Node_Str");
  QueryImpl<T> qi=(QueryImpl<T>)query;
  DBCollection dbColl=qi.getCollection();
  if (dbColl == null)   dbColl=getCollection(qi.getEntityClass());
  if (log.isTraceEnabled())   log.info("String_Node_Str" + dbColl.getName() + "String_Node_Str"+ qi.toString()+ "String_Node_Str"+ map+ "String_Node_Str"+ reduce+ "String_Node_Str"+ finalize+ "String_Node_Str"+ scopeFields+ "String_Node_Str");
  String outColl=mapr.getCollectionName(outputType);
  BasicDBObjectBuilder bldr=BasicDBObjectBuilder.start("String_Node_Str",mapr.getCollectionName(qi.getEntityClass()));
switch (type) {
case REDUCE:
    bldr.push("String_Node_Str").add("String_Node_Str",outColl).pop();
  break;
case MERGE:
bldr.push("String_Node_Str").add("String_Node_Str",outColl).pop();
break;
case INLINE:
bldr.push("String_Node_Str").add("String_Node_Str",1).pop();
break;
default :
bldr.add("String_Node_Str",outColl);
break;
}
if (qi.getOffset() != 0 || qi.getFieldsObject() != null) throw new QueryException("String_Node_Str");
if (qi.getQueryObject() != null) bldr.add("String_Node_Str",qi.getQueryObject());
if (qi.getLimit() > 0) bldr.add("String_Node_Str",qi.getLimit());
if (qi.getSortObject() != null) bldr.add("String_Node_Str",qi.getSortObject());
bldr.add("String_Node_Str",map);
bldr.add("String_Node_Str",reduce);
if (finalize != null && finalize.length() > 0) bldr.add("String_Node_Str",finalize);
if (scopeFields != null && scopeFields.size() > 0) bldr.add("String_Node_Str",mapr.toMongoObject(null,null,scopeFields));
DBObject dbObj=bldr.get();
CommandResult cr=dbColl.getDB().command(dbObj);
cr.throwOnError();
MapreduceResults mrRes=(MapreduceResults)mapr.fromDBObject(MapreduceResults.class,cr,createCache());
QueryImpl baseQ=null;
if (!MapreduceType.INLINE.equals(type)) baseQ=new QueryImpl(outputType,db.getCollection(mrRes.getOutputCollectionName()),this);
mrRes.setBits(type,baseQ);
return mrRes;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public <T>MapreduceResults<T> mapReduce(MapreduceType type,Query query,String map,String reduce,String finalize,Map<String,Object> scopeFields,Class<T> outputType){
  QueryImpl<T> qi=(QueryImpl<T>)query;
  DBCollection dbColl=qi.getCollection();
  String outColl=mapr.getCollectionName(outputType);
  OutputType outType=OutputType.REPLACE;
switch (type) {
case REDUCE:
    outType=OutputType.REDUCE;
  break;
case MERGE:
outType=OutputType.MERGE;
break;
case INLINE:
outType=OutputType.INLINE;
break;
default :
outType=OutputType.REPLACE;
break;
}
MapReduceCommand cmd=new MapReduceCommand(dbColl,map,reduce,outColl,outType,qi.getQueryObject());
if (qi.getLimit() > 0) cmd.setLimit(qi.getLimit());
if (qi.getSortObject() != null) cmd.setSort(qi.getSortObject());
if (finalize != null && finalize.length() > 0) cmd.setFinalize(finalize);
if (scopeFields != null && scopeFields.size() > 0) cmd.setScope(scopeFields);
return mapReduce(type,query,outputType,cmd);
}