code: public Collection<Defect> getDefects(DefectFilter filter, boolean includeSubprojects) {
  
          if (filter == null)
              filter = new DefectFilter();
          return getInstance().get().defects(
                  getFilter(filter, includeSubprojects));
      }
docs: Get Defects in this Project filtered as specified in the passed in
  filter.
  
  @param filter             Criteria to filter on. Project will be set automatically.
  If null, all defects in the project are returned.
  @param includeSubprojects Specifies whether to include items from sub
  project or not. This only adds open subprojects.
  @return An Collection of Defect.