Source:
<code>public List<NamedArrayList<? extends SCMTraitDescriptor<?>>> getTraitsDescriptorLists() { GitHubSCMSource.DescriptorImpl sourceDescriptor = Jenkins.getActiveInstance().getDescriptorByType(GitHubSCMSource.DescriptorImpl.class); List<SCMTraitDescriptor<?>> all = new ArrayList<>(); all.addAll(SCMNavigatorTrait._for(this, GitHubSCMNavigatorContext.class, GitHubSCMSourceBuilder.class)); all.addAll(SCMSourceTrait._for(sourceDescriptor, GitHubSCMSourceContext.class, null)); all.addAll(SCMSourceTrait._for(sourceDescriptor, null, GitHubSCMBuilder.class)); Set<SCMTraitDescriptor<?>> dedup = new HashSet<>(); for (Iterator<SCMTraitDescriptor<?>> iterator = all.iterator(); iterator.hasNext(); ) { SCMTraitDescriptor<?> d = iterator.next(); if (dedup.contains(d) || d instanceof GitBrowserSCMSourceTrait.DescriptorImpl) { iterator.remove(); } else { dedup.add(d); } } List<NamedArrayList<? extends SCMTraitDescriptor<?>>> result = new ArrayList<>(); NamedArrayList.select(all, "Repositories", new NamedArrayList.Predicate<SCMTraitDescriptor<?>>() { @Override public boolean test(SCMTraitDescriptor<?> scmTraitDescriptor) { return scmTraitDescriptor instanceof SCMNavigatorTraitDescriptor; } }, true, result); <START> NamedArrayList.select(all, Messages.within_repository(), NamedArrayList.anyOf(NamedArrayList.withAnnotation(Discovery.class),NamedArrayList.withAnnotation(Selection.class)), <END> true, result); NamedArrayList.select(all, Messages.general(), null, true, result); return result; }</code><technical_language>GitHubSCMNavigator. suggestion NamedArrayList.select(all, Messages.GitHubSCMNavigator_withinRepository(), NamedArrayList.anyOf(NamedArrayList.withAnnotation(Discovery.class),NamedArrayList.withAnnotation(Selection.class)),</technical_language>

Target:
public List<NamedArrayList<? extends SCMTraitDescriptor<?>>> getTraitsDescriptorLists() { GitHubSCMSource.DescriptorImpl sourceDescriptor = Jenkins.getActiveInstance().getDescriptorByType(GitHubSCMSource.DescriptorImpl.class); List<SCMTraitDescriptor<?>> all = new ArrayList<>(); all.addAll(SCMNavigatorTrait._for(this, GitHubSCMNavigatorContext.class, GitHubSCMSourceBuilder.class)); all.addAll(SCMSourceTrait._for(sourceDescriptor, GitHubSCMSourceContext.class, null)); all.addAll(SCMSourceTrait._for(sourceDescriptor, null, GitHubSCMBuilder.class)); Set<SCMTraitDescriptor<?>> dedup = new HashSet<>(); for (Iterator<SCMTraitDescriptor<?>> iterator = all.iterator(); iterator.hasNext(); ) { SCMTraitDescriptor<?> d = iterator.next(); if (dedup.contains(d) || d instanceof GitBrowserSCMSourceTrait.DescriptorImpl) { iterator.remove(); } else { dedup.add(d); } } List<NamedArrayList<? extends SCMTraitDescriptor<?>>> result = new ArrayList<>(); NamedArrayList.select(all, "Repositories", new NamedArrayList.Predicate<SCMTraitDescriptor<?>>() { @Override public boolean test(SCMTraitDescriptor<?> scmTraitDescriptor) { return scmTraitDescriptor instanceof SCMNavigatorTraitDescriptor; } }, true, result); NamedArrayList.select(all, Messages.GitHubSCMNavigator_withinRepository(), NamedArrayList.anyOf(NamedArrayList.withAnnotation(Discovery.class),NamedArrayList.withAnnotation(Selection.class)), true, result); NamedArrayList.select(all, Messages.GitHubSCMNavigator_general(), null, true, result); return result; }