Configures the elements of the composite accept criterion for the
Distributions View.

@return accept criterion elements
553551
static ServerViewComponentClientCriterion[] createViewComponentClientCriteria() {
        final ServerViewComponentClientCriterion[] criteria = new ServerViewComponentClientCriterion[1];

        // Upload software module table acceptable components.
        criteria[0] = ServerViewComponentClientCriterion.createBuilder()
                .dragSourceIdPrefix(UIComponentIdProvider.UPLOAD_SOFTWARE_MODULE_TABLE)
                .dropTargetIdPrefixes(UIComponentIdProvider.DIST_TABLE_ID)
                .dropAreaIds(UIComponentIdProvider.DIST_TABLE_ID).build();

        return criteria;
    }
161545
@Override
    public boolean accepts(final MavenDependency dependency, final List<MavenDependency> dependenciesForResolution,
            final List<MavenDependency> dependencyAncestors) {
        if (bannedDependencies.contains(dependency)) {
            return false;
        }

        if (rejectTransitives) {
            if (dependencyAncestors != null && dependencyAncestors.size() != 0) {
                return dependencyAncestors.get(0).equals(dependency);
            }
        }

        return true;
    }
769492
public GitlabMergeRequestApprovals setMergeRequestApprovers(GitlabMergeRequest mr,
                                                                Collection<Integer> userApproverIds,
                                                                Collection<Integer> groupApproverIds) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(mr.getProjectId()) +
                GitlabMergeRequest.URL + "/" + mr.getIid() + GitlabMergeRequestApprovals.APPROVERS_URL;
        return put()
            .with("approver_ids", userApproverIds)
            .with("approver_group_ids", groupApproverIds)
            .to(tailUrl, GitlabMergeRequestApprovals.class);
    }
702352
@Override
    public boolean accepts(final MavenDependency dependency, final List<MavenDependency> dependenciesForResolution, final List<MavenDependency> dependencyAncestors) {
        if (dependency == null) {
            return false;
        }

        if (allowedScopes.contains(dependency.getScope())) {
            return true;
        }

        return false;
    }
1321023
public static HibernateValidatorConfiguration newConfiguration() {
        return BaseValidator.newConfiguration()
                .constraintValidatorFactory(new MutableValidatorFactory())
                .parameterNameProvider(new JerseyParameterNameProvider())
                .addValueExtractor(NonEmptyStringParamValueExtractor.DESCRIPTOR.getValueExtractor())
                .addValueExtractor(ParamValueExtractor.DESCRIPTOR.getValueExtractor());
    }
843776
@Bean
    @ConditionalOnMissingBean
    DistributionSetManagement distributionSetManagement(final EntityManager entityManager,
            final DistributionSetRepository distributionSetRepository,
            final DistributionSetTagManagement distributionSetTagManagement, final SystemManagement systemManagement,
            final DistributionSetTypeManagement distributionSetTypeManagement, final QuotaManagement quotaManagement,
            final DistributionSetMetadataRepository distributionSetMetadataRepository,
            final TargetFilterQueryRepository targetFilterQueryRepository, final ActionRepository actionRepository,
            final NoCountPagingRepository criteriaNoCountDao, final ApplicationEventPublisher eventPublisher,
            final BusProperties bus, final TenantAware tenantAware,
            final VirtualPropertyReplacer virtualPropertyReplacer,
            final SoftwareModuleRepository softwareModuleRepository,
            final DistributionSetTagRepository distributionSetTagRepository,
            final AfterTransactionCommitExecutor afterCommit, final JpaProperties properties) {
        return new JpaDistributionSetManagement(entityManager, distributionSetRepository, distributionSetTagManagement,
                systemManagement, distributionSetTypeManagement, quotaManagement, distributionSetMetadataRepository,
                targetFilterQueryRepository, actionRepository, criteriaNoCountDao, eventPublisher, bus, tenantAware,
                virtualPropertyReplacer, softwareModuleRepository, distributionSetTagRepository, afterCommit,
                properties.getDatabase());

    }
117659
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) {
		final String[] data = issue.getData();
		if (data != null && data.length > 1) {
			final String actionName = data[1];
			final ActionAddModification modification = new ActionAddModification(actionName);
			modification.setIssue(issue);
			modification.setTools(provider);
			acceptor.accept(issue,
					MessageFormat.format(Messages.SARLQuickfixProvider_2, actionName),
					MessageFormat.format(Messages.SARLQuickfixProvider_3, actionName),
					JavaPluginImages.IMG_CORRECTION_ADD,
					modification,
					IProposalRelevance.ADD_UNIMPLEMENTED_METHODS);
		}
	}
1273147
@Override
    public boolean accept(final DependencyNode node, List<DependencyNode> parents) {
        Dependency dependency = node.getDependency();

        if (dependency == null) {
            return false;
        }

        List<MavenDependency> ancestors = new ArrayList<MavenDependency>();
        for (DependencyNode parent : parents) {
            Dependency parentDependency = parent.getDependency();
            if (parentDependency != null) {
                ancestors.add(MavenConverter.fromDependency(parentDependency));
            }
        }

        if (log.isLoggable(Level.FINER)) {
            log.log(Level.FINER, "Filtering {0} using {1} filters", new Object[] { dependency, filters.length });
        }

        for (final MavenResolutionFilter filter : filters) {
            if (!filter.accepts(MavenConverter.fromDependency(dependency), dependenciesForResolution, ancestors)) {
                if (log.isLoggable(Level.FINER)) {
                    log.log(Level.FINER, "Dependency {0} rejected by {1}", new Object[] { dependency, filter });
                }
                return false;
            }
        }

        // All filters passed
        if (log.isLoggable(Level.FINER)) {
            log.log(Level.FINER, "Dependency {0} was accepted.", dependency);
        }
        return true;
    }
1000988
protected function setupFileExtensionsMimeTypesForValidation()
    {
        if (!is_array($this->file_extensions_mime_types) && $this->file_extensions_mime_types == null) {
            // extensions mime types was not set and not set to NOT validate (empty array).
            $default_mime_types_file = 'file-extensions-mime-types.php';
            if (is_file(__DIR__.DIRECTORY_SEPARATOR.$default_mime_types_file)) {
                $this->file_extensions_mime_types = include __DIR__.DIRECTORY_SEPARATOR.$default_mime_types_file;
            }
            unset($default_mime_types_file);
        }

        if (is_array($this->file_extensions_mime_types)) {
            // if mime types was set, change the keys to lower case.
            $this->file_extensions_mime_types = array_change_key_case($this->file_extensions_mime_types, CASE_LOWER);
        }

        if (is_array($this->allowed_file_extensions)) {
            // if allowed extensions was set, change the values to lower case.
            $this->allowed_file_extensions = array_map('strtolower', $this->allowed_file_extensions);
        }
    }
1277451
Set<UVariableDecl> requiredParameters() {
    return Maps.filterValues(
            annotatedParameters(),
            (ImmutableClassToInstanceMap<Annotation> annotations) ->
                !annotations.containsKey(MayOptionallyUse.class))
        .keySet();
  }
465869
protected Set<Element> getMembersFromJavaSource(final String clazzname, final ElementUtilities.ElementAcceptor acceptor) {
    final Set<Element> ret = new LinkedHashSet<>();
    JavaSource javaSource = getJavaSourceForClass(clazzname);
    if (javaSource != null) {
      try {
        javaSource.runUserActionTask(new Task<CompilationController>() {
          @Override
          public void run(CompilationController controller) throws IOException {
            controller.toPhase(JavaSource.Phase.ELEMENTS_RESOLVED);
            TypeElement classElem = controller.getElements().getTypeElement(clazzname);
            if (classElem == null) {
              return;
            }
            ElementUtilities eu = controller.getElementUtilities();

            Iterable<? extends Element> members = eu.getMembers(classElem.asType(), acceptor);
            for (Element e : members) {
              ret.add(e);
            }
          }
        }, false);
      }
      catch (IOException ioe) {
        Exceptions.printStackTrace(ioe);
      }
    }
    return ret;
  }
871380
private static void initializeSREExtensions() {
		final MultiStatus status = new MultiStatus(SARLEclipsePlugin.PLUGIN_ID,
				IStatus.OK, "Exceptions occurred", null);  //$NON-NLS-1$
		final IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(
				SARLEclipsePlugin.PLUGIN_ID, SARLEclipseConfig.EXTENSION_POINT_SARL_RUNTIME_ENVIRONMENT);
		if (extensionPoint != null) {
			Object obj;
			for (final IConfigurationElement element : extensionPoint.getConfigurationElements()) {
				try {
					obj = element.createExecutableExtension("class"); //$NON-NLS-1$
					if (obj instanceof ISREInstall) {
						final ISREInstall sre = (ISREInstall) obj;
						platformSREInstalls.add(sre.getId());
						ALL_SRE_INSTALLS.put(sre.getId(), sre);
					} else {
						SARLEclipsePlugin.getDefault().logErrorMessage(
								"Cannot instance extension point: " + element.getName()); //$NON-NLS-1$
					}
				} catch (CoreException e) {
					status.add(e.getStatus());
				}
			}
			if (!status.isOK()) {
				//only happens on a CoreException
				SARLEclipsePlugin.getDefault().getLog().log(status);
			}
		}
	}
516083
@Fix(IssueCodes.DUPLICATE_TYPE_NAME)
	public void fixDuplicateTopElements(Issue issue, IssueResolutionAcceptor acceptor) {
		MemberRemoveModification.accept(this, issue, acceptor);
	}
324018
protected void completeJavaTypes(ContentAssistContext context,
			ITypesProposalProvider.Filter filter, ICompletionProposalAcceptor acceptor) {
		completeJavaTypes(context,
				TypesPackage.Literals.JVM_PARAMETERIZED_TYPE_REFERENCE__TYPE,
				true,
				getQualifiedNameValueConverter(),
				filter,
				acceptor);
	}
126339
@Override
  protected void configure() {

    bind(DiscoveryService.class).to(BaseDiscoveryService.class);

    bind(OperatingSystemDetectionStrategy.class)
        .to(NameSubstringBasedOperatingSystemDetectionStrategy.class);
  }
378060
public static void accept(SARLQuickfixProvider provider, Issue issue, IssueResolutionAcceptor acceptor) {
		final SuperTypeRemoveModification modification = new SuperTypeRemoveModification();
		modification.setIssue(issue);
		modification.setTools(provider);
		acceptor.accept(issue,
				Messages.SARLQuickfixProvider_0,
				Messages.SARLQuickfixProvider_17,
				JavaPluginImages.IMG_CORRECTION_REMOVE,
				modification,
				IProposalRelevance.REMOVE_REDUNDANT_SUPER_INTERFACE);
	}
316342
protected function configure()
    {
        $this
            ->setName('detect')
            ->setDefinition(
                [
                    new InputArgument('path', InputArgument::OPTIONAL, 'path of the project', null),
                    new InputOption(
                        'config-file',
                        'c',
                        InputOption::VALUE_REQUIRED,
                        'File path of the configuration file'
                    ),
                    new InputOption(
                        'format',
                        'f',
                        InputOption::VALUE_REQUIRED,
                        sprintf('Output format (%s)', implode(', ', $this->formats)),
                        $this->formats[0]
                    ),
                ]
            )
            ->setDescription('Detect coupling rules')
            ->setHelp($this->loadHelpContent());
    }