Program: 160330
Project: 160330
Buggy source:
@Override public boolean process() throws BimserverDatabaseException, QueryException {
  if (typeIterator == null) {
    return true;
  }
  if (typeIterator.hasNext()) {
    EClass eClass=typeIterator.next();
    if (oids != null) {
      List<Long> oids2=oids.get(eClass);
      if (oids2.size() == 1 && oids2.get(0) == 91638728554L) {
        System.out.println();
      }
      if (oids2 != null) {
        queryObjectProvider.push(new QueryOidsAndTypesStackFrame(queryObjectProvider,eClass,partialQuery,reusable,oids2));
      }
    }
 else     if (guids != null) {
      queryObjectProvider.push(new QueryGuidsAndTypesStackFrame(queryObjectProvider,eClass,partialQuery,reusable,guids));
    }
 else     if (names != null) {
      queryObjectProvider.push(new QueryNamesAndTypesStackFrame(queryObjectProvider,eClass,partialQuery,reusable,names));
    }
 else     if (properties != null) {
      queryObjectProvider.push(new QueryPropertiesAndTypesStackFrame(queryObjectProvider,eClass,partialQuery,reusable,properties));
    }
 else     if (classifications != null) {
      queryObjectProvider.push(new QueryClassificationsAndTypesStackFrame(queryObjectProvider,eClass,partialQuery,reusable,classifications));
    }
 else     if (inBoundingBox != null) {
      queryObjectProvider.push(new QueryBoundingBoxStackFrame(queryObjectProvider,eClass,partialQuery,reusable,inBoundingBox));
    }
 else     if (tiles != null) {
      List<Long> oids=new ArrayList<>();
      List<Long> oidsFiltered=new ArrayList<>();
      QueryPart filteredQueryPart=createFilteredQueryPart(partialQuery);
      Set<Node<GeometryObject>> nodes=(Set<Node<GeometryObject>>)tiles.getNodes();
      for (      Node<GeometryObject> node : nodes) {
        float last=0;
        for (        ObjectWrapper<GeometryObject> objectWrapper : node.getValues()) {
          last=objectWrapper.getV().getDensity();
          GeometryObject geometryObject=objectWrapper.getV();
          if (geometryObject.getRoid() == reusable.getRoid()) {
            long objectId=geometryObject.getOid();
            if (eClass.isSuperTypeOf(queryObjectProvider.getDatabaseSession().getEClassForOid(objectId))) {
              if (tiles.getMinimumReuseThreshold() != -1 && tiles.getMinimumReuseThreshold() <= geometryObject.getSaveableTriangles()) {
                oidsFiltered.add(objectId);
              }
 else {
                oids.add(objectId);
              }
            }
          }
        }
      }
      if (!oids.isEmpty()) {
        queryObjectProvider.push(new QueryOidsAndTypesStackFrame(queryObjectProvider,eClass,partialQuery,reusable,oids));
      }
      if (!oidsFiltered.isEmpty()) {
        queryObjectProvider.push(new QueryOidsAndTypesStackFrame(queryObjectProvider,eClass,filteredQueryPart,reusable,oidsFiltered));
      }
    }
 else {
      queryObjectProvider.push(new QueryTypeStackFrame(queryObjectProvider,eClass,reusable,partialQuery));
    }
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean process() throws BimserverDatabaseException, QueryException {
  if (typeIterator == null) {
    return true;
  }
  if (typeIterator.hasNext()) {
    EClass eClass=typeIterator.next();
    if (oids != null) {
      List<Long> oids2=oids.get(eClass);
      if (oids2 != null) {
        queryObjectProvider.push(new QueryOidsAndTypesStackFrame(queryObjectProvider,eClass,partialQuery,reusable,oids2));
      }
    }
 else     if (guids != null) {
      queryObjectProvider.push(new QueryGuidsAndTypesStackFrame(queryObjectProvider,eClass,partialQuery,reusable,guids));
    }
 else     if (names != null) {
      queryObjectProvider.push(new QueryNamesAndTypesStackFrame(queryObjectProvider,eClass,partialQuery,reusable,names));
    }
 else     if (properties != null) {
      queryObjectProvider.push(new QueryPropertiesAndTypesStackFrame(queryObjectProvider,eClass,partialQuery,reusable,properties));
    }
 else     if (classifications != null) {
      queryObjectProvider.push(new QueryClassificationsAndTypesStackFrame(queryObjectProvider,eClass,partialQuery,reusable,classifications));
    }
 else     if (inBoundingBox != null) {
      queryObjectProvider.push(new QueryBoundingBoxStackFrame(queryObjectProvider,eClass,partialQuery,reusable,inBoundingBox));
    }
 else     if (tiles != null) {
      List<Long> oids=new ArrayList<>();
      List<Long> oidsFiltered=new ArrayList<>();
      QueryPart filteredQueryPart=createFilteredQueryPart(partialQuery);
      Set<Node<GeometryObject>> nodes=(Set<Node<GeometryObject>>)tiles.getNodes();
      for (      Node<GeometryObject> node : nodes) {
        float last=0;
        for (        ObjectWrapper<GeometryObject> objectWrapper : node.getValues()) {
          last=objectWrapper.getV().getDensity();
          GeometryObject geometryObject=objectWrapper.getV();
          if (geometryObject.getRoid() == reusable.getRoid()) {
            long objectId=geometryObject.getOid();
            if (eClass.isSuperTypeOf(queryObjectProvider.getDatabaseSession().getEClassForOid(objectId))) {
              if (tiles.getMinimumReuseThreshold() != -1 && tiles.getMinimumReuseThreshold() <= geometryObject.getSaveableTriangles()) {
                oidsFiltered.add(objectId);
              }
 else {
                oids.add(objectId);
              }
            }
          }
        }
      }
      if (!oids.isEmpty()) {
        queryObjectProvider.push(new QueryOidsAndTypesStackFrame(queryObjectProvider,eClass,partialQuery,reusable,oids));
      }
      if (!oidsFiltered.isEmpty()) {
        queryObjectProvider.push(new QueryOidsAndTypesStackFrame(queryObjectProvider,eClass,filteredQueryPart,reusable,oidsFiltered));
      }
    }
 else {
      queryObjectProvider.push(new QueryTypeStackFrame(queryObjectProvider,eClass,reusable,partialQuery));
    }
    return false;
  }
  return true;
}