Program: 25547
Project: 25547
Buggy source:
/** 
 * @return list of section data objects for the specified stackId.
 * @throws IllegalArgumentException if any required parameters are missing or the stack cannot be found.
 */
public List<SectionData> getSectionData(final StackId stackId,final Double minZ,final Double maxZ) throws IllegalArgumentException {
  MongoUtil.validateRequiredParameter("String_Node_Str",stackId);
  final List<SectionData> list=new ArrayList<>();
  if (!MongoUtil.exists(renderDatabase,stackId.getSectionCollectionName())) {
    throw new IllegalArgumentException("String_Node_Str" + stackId + "String_Node_Str");
  }
  final MongoCollection<Document> sectionCollection=getSectionCollection(stackId);
  final Document query=new Document();
  if (minZ != null) {
    query.append("String_Node_Str",new Document(QueryOperators.GTE,minZ));
  }
  if (maxZ != null) {
    query.append("String_Node_Str",new Document(QueryOperators.LTE,maxZ));
  }
  try (MongoCursor<Document> cursor=sectionCollection.find(query).iterator()){
    Document document;
    Document resultId;
    String sectionId;
    Number tileCount;
    Long tileCountLong=null;
    Double z;
    Double minX;
    Double maxX;
    Double minY;
    Double maxY;
    while (cursor.hasNext()) {
      document=cursor.next();
      resultId=document.get("String_Node_Str",Document.class);
      sectionId=resultId.get("String_Node_Str",String.class);
      z=resultId.get("String_Node_Str",Double.class);
      tileCount=document.get("String_Node_Str",Number.class);
      if (tileCount != null) {
        tileCountLong=tileCount.longValue();
      }
      minX=document.getDouble("String_Node_Str");
      maxX=document.getDouble("String_Node_Str");
      minY=document.getDouble("String_Node_Str");
      maxY=document.getDouble("String_Node_Str");
      if ((sectionId != null) && (z != null)) {
        list.add(new SectionData(sectionId,z,tileCountLong,minX,maxX,minY,maxY));
      }
    }
  }
   LOG.debug("String_Node_Str",list.size(),sectionCollection.getNamespace().getFullName());
  return list;
}

Fixed version (ground truth):
/** 
 * @return list of section data objects for the specified stackId.
 * @throws IllegalArgumentException if any required parameters are missing or the stack cannot be found.
 */
public List<SectionData> getSectionData(final StackId stackId,final Double minZ,final Double maxZ) throws IllegalArgumentException {
  MongoUtil.validateRequiredParameter("String_Node_Str",stackId);
  final List<SectionData> list=new ArrayList<>();
  if (!MongoUtil.exists(renderDatabase,stackId.getSectionCollectionName())) {
    throw new IllegalArgumentException("String_Node_Str" + stackId + "String_Node_Str");
  }
  final MongoCollection<Document> sectionCollection=getSectionCollection(stackId);
  final Document query=new Document();
  if (minZ != null) {
    if (maxZ != null) {
      query.append("String_Node_Str",new Document(QueryOperators.GTE,minZ).append(QueryOperators.LTE,maxZ));
    }
 else {
      query.append("String_Node_Str",new Document(QueryOperators.GTE,minZ));
    }
  }
 else   if (maxZ != null) {
    query.append("String_Node_Str",new Document(QueryOperators.LTE,maxZ));
  }
  try (MongoCursor<Document> cursor=sectionCollection.find(query).iterator()){
    Document document;
    Document resultId;
    String sectionId;
    Number tileCount;
    Long tileCountLong=null;
    Double z;
    Double minX;
    Double maxX;
    Double minY;
    Double maxY;
    while (cursor.hasNext()) {
      document=cursor.next();
      resultId=document.get("String_Node_Str",Document.class);
      sectionId=resultId.get("String_Node_Str",String.class);
      z=resultId.get("String_Node_Str",Double.class);
      tileCount=document.get("String_Node_Str",Number.class);
      if (tileCount != null) {
        tileCountLong=tileCount.longValue();
      }
      minX=document.getDouble("String_Node_Str");
      maxX=document.getDouble("String_Node_Str");
      minY=document.getDouble("String_Node_Str");
      maxY=document.getDouble("String_Node_Str");
      if ((sectionId != null) && (z != null)) {
        list.add(new SectionData(sectionId,z,tileCountLong,minX,maxX,minY,maxY));
      }
    }
  }
   LOG.debug("String_Node_Str",list.size(),sectionCollection.getNamespace().getFullName());
  return list;
}