Get list of Features (Issues in Jira terms) given a project.

@param project
@return List of Feature
488698
@Override
    public FeatureEpicResult getIssues(Scope project) {
        Map<String, Epic> epicMap = new HashMap<>();
        FeatureEpicResult featureEpicResult = new FeatureEpicResult();

        String lookBackDate = getUpdatedSince(project.getLastCollected());

        String issueTypes = featureSettings.getJiraIssueTypeNames() == null ? DEFAULT_ISSUE_TYPES : String.join(",", featureSettings.getJiraIssueTypeNames());

        List<Feature> features = new ArrayList<>();

        boolean isLast = false;
        long startAt = 0;

        while (!isLast) {
            try {
                String url = featureSettings.getJiraBaseUrl() + (featureSettings.getJiraBaseUrl().endsWith("/") ? "" : "/")
                        + ISSUE_BY_PROJECT_REST_SUFFIX_BY_DATE;
                url = String.format(url, project.getpId(), issueTypes.replaceAll(",", "','"), lookBackDate, issueFields, startAt);

                IssueResult temp = getFeaturesFromQueryURL(url, epicMap, null);

                features.addAll(temp.getFeatures());
                isLast = temp.getTotal() == features.size() || CollectionUtils.isEmpty(temp.getFeatures());
                startAt += temp.getPageSize();
            } catch (ParseException pe) {
                LOGGER.error("Parser exception when parsing issue", pe);
            } catch (HygieiaException e) {
                LOGGER.error("Error in calling JIRA API", e);
            }
        }
        featureEpicResult.setFeatureList(features);
        featureEpicResult.getEpicList().addAll(epicMap.values());
        return featureEpicResult;
    }
128513
private List<Artifact> getScopeArtifacts( final MavenProject project, final String scope )
    {
        if ( SCOPE_COMPILE.equals( scope ) )
        {
            return project.getCompileArtifacts();
        }
        if ( SCOPE_RUNTIME.equals( scope ) )
        {
            return project.getRuntimeArtifacts();
        }
        else if ( SCOPE_TEST.equals( scope ) )
        {
            return project.getTestArtifacts();
        }
        else
        {
            throw new RuntimeException( "Not allowed scope " + scope );
        }
    }
20683
public List<JavaResource> getProjectInjectionPointBeans(Project project)
   {
      final List<JavaResource> beans = new ArrayList<>();
      if (project != null)
      {
         project.getFacet(JavaSourceFacet.class).visitJavaSources(new JavaResourceVisitor()
         {
            @Override
            public void visit(VisitContext context, JavaResource resource)
            {
               try
               {
                  JavaSource<?> javaSource = resource.getJavaType();
                  if (javaSource.isClass()
                           // JPA
                           && !javaSource.hasAnnotation(Entity.class)
                           && !javaSource.hasAnnotation(MappedSuperclass.class)
                           && !javaSource.hasAnnotation(Embeddable.class)
                           // Bean Validation
                           && !javaSource.hasImport(Payload.class)
                  )
                  {
                     beans.add(resource);
                  }
               }
               catch (FileNotFoundException e)
               {
                  // ignore
               }
            }
         });
      }
      return beans;
   }
705397
public List<GitlabProject> searchProjects(String search) throws IOException {
        Query query = new Query()
                .append("search", search);
        String tailUrl = GitlabProject.URL + query.toString();
        GitlabProject[] response = retrieve().to(tailUrl, GitlabProject[].class);
        return Arrays.asList(response);
    }
63871
public List<GitlabProject> getProjectsWithPagination(int page, int perPage) throws IOException {
        Pagination pagination = new Pagination()
                .withPage(page)
                .withPerPage(perPage);
        return getProjectsWithPagination(pagination);
    }
1362652
public CollectionRequest<Project> tasks(String project) {
    
        String path = String.format("/projects/%s/tasks", project);
        return new CollectionRequest<Project>(this, Project.class, path, "GET");
    }
363810
static List<ProjectDefinition> getTopDownParentProjects(ProjectDefinition project) {
    List<ProjectDefinition> result = new ArrayList<>();
    ProjectDefinition p = project;
    while (p != null) {
      result.add(0, p);
      p = p.getParent();
    }
    return result;
  }
103965
def download_issuetypes(jira_connection, project_ids):
    '''
    
    '''
    print('downloading jira issue types... ', end='', flush=True)
    result = []
    for it in jira_connection.issue_types():
        if 'scope' in it.raw and it.raw['scope']['type'] == 'PROJECT':
            if it.raw['scope']['project']['id'] in project_ids:
                result.append(it.raw)
        else:
            result.append(it.raw)
    print('✓')
    return result
826663
def get_projects_list(self):
        
        try:
            result = self._request('/getprojectslist/')
            return [TildaProject(**p) for p in result]
        except NetworkError:
            return []
961492
private List<CmsSelectWidgetOption> getProjectSelections() {

        List<CmsSelectWidgetOption> result = new LinkedList<CmsSelectWidgetOption>();
        List<CmsProject> projects = null;
        try {
            projects = OpenCms.getOrgUnitManager().getAllAccessibleProjects(getCms(), "", true);
        } catch (CmsException e) {
            return result;
        }

        boolean first = true;
        for (CmsProject project : projects) {
            if (!project.getName().equals(CmsProject.ONLINE_PROJECT_NAME)) {
                first = false;
                result.add(new CmsSelectWidgetOption(project.getName(), first, project.getName()));
            }
        }
        return result;
    }
599617
def list_jobs(self, project):
        
        url = self._build_url(constants.LIST_JOBS_ENDPOINT)
        params = {'project': project}
        jobs = self.client.get(url, params=params, timeout=self.timeout)
        return jobs
506245
def list(self, request, project):
        
        job_ids = request.query_params.getlist('job_id')
        if not job_ids:
            raise ParseError(
                detail="The job_id parameter is mandatory for this endpoint")
        try:
            job_ids = [int(job_id) for job_id in job_ids]
        except ValueError:
            raise ParseError(detail="The job_id parameter(s) must be integers")

        logs = JobLog.objects.filter(job__repository__name=project,
                                     job_id__in=job_ids)

        return Response([self._log_as_dict(log) for log in logs])
1176552
public List<CmsProject> filterProjectsForSelector(List<CmsProject> projects) {

        List<CmsProject> result = new ArrayList<CmsProject>();
        for (CmsProject project : projects) {
            if (!project.isHiddenFromSelector()) {
                result.add(project);
            }
        }
        return result;
    }
681049
@SuppressWarnings( "unchecked" )
    private List<String> findOptionalMojosForLifecycle( MavenProject project, Lifecycle lifecycle )
        throws LifecycleExecutionException, PluginNotFoundException
    {
        String packaging = project.getPackaging();
        List<String> optionalMojos = null;

        LifecycleMapping m =
            (LifecycleMapping) findExtension( project, LifecycleMapping.ROLE, packaging, session.getSettings(),
                                              session.getLocalRepository() );

        if ( m != null )
        {
            optionalMojos = m.getOptionalMojos( lifecycle.getId() );
        }

        if ( optionalMojos == null )
        {
            try
            {
                m = (LifecycleMapping) session.lookup( LifecycleMapping.ROLE, packaging );
                optionalMojos = m.getOptionalMojos( lifecycle.getId() );
            }
            catch ( ComponentLookupException e )
            {
                log.debug( "Error looking up lifecycle mapping to retrieve optional mojos. Lifecycle ID: "
                    + lifecycle.getId() + ". Error: " + e.getMessage(), e );
            }
        }

        if ( optionalMojos == null )
        {
            optionalMojos = Collections.emptyList();
        }

        return optionalMojos;
    }
251493
public CollectionRequest<ProjectMembership> findByProject(String project) {
    
        String path = String.format("/projects/%s/project_memberships", project);
        return new CollectionRequest<ProjectMembership>(this, ProjectMembership.class, path, "GET");
    }
910451
public List<FeatureTileLink> queryForFeatureTable(String featureTable) {

		List<FeatureTileLink> links = null;

		if (featureTileLinksActive()) {
			links = featureTileLinkDao.queryForFeatureTableName(featureTable);
		} else {
			links = new ArrayList<FeatureTileLink>();
		}

		return links;
	}
1328735
public List<GitlabBuildVariable> getBuildVariables(Integer projectId)
            throws IOException {
        String tailUrl = GitlabProject.URL + "/" + projectId + GitlabBuildVariable.URL;
        GitlabBuildVariable[] variables = retrieve().to(tailUrl, GitlabBuildVariable[].class);
        return Arrays.asList(variables);
    }