Source:
<code>protected void findSecondaryDependencies(String[] secDeps, Set<String> ignorePkgs, Map<ExportPackageDescription, String> newDeps, IBundle bundle, boolean useRequireBundle, IProgressMonitor monitor) { IJavaProject jProject = JavaCore.create(fProject); SearchEngine engine = new SearchEngine(); if (ignorePkgs == null) ignorePkgs = new HashSet<>(2); SubMonitor subMonitor = SubMonitor.convert(monitor, PDEUIMessages.AddNewDependenciesOperation_searchProject, secDeps.length); for (int j = 0; j < secDeps.length; j++) { try { if (subMonitor.isCanceled()) return; String pluginId = secDeps[j]; IPluginModelBase base = PluginRegistry.findModel(secDeps[j]); if (base != null) { ExportPackageDescription[] exported = findExportedPackages(base.getBundleDescription()); IJavaSearchScope searchScope = PluginJavaSearchUtil.createSeachScope(jProject); subMonitor.beginTask(NLS.bind(PDEUIMessages.AddNewDependenciesOperation_searchForDependency, pluginId), exported.length); for (int i = 0; i < exported.length; i++) { String pkgName = exported[i].getName(); if (!ignorePkgs.contains(pkgName)) { ReferenceFinder requestor = new ReferenceFinder(); engine.search(SearchPattern.createPattern(pkgName, IJavaSearchConstants.PACKAGE, IJavaSearchConstants.REFERENCES, SearchPattern.R_EXACT_MATCH), new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()}, searchScope, requestor, null); if (requestor.foundMatches()) { fNewDependencies = true; ignorePkgs.add(pkgName); newDeps.put(exported[i], pluginId); if (useRequireBundle) { for (; i < exported.length; i++) ignorePkgs.add(exported[i].getName()); } } } subMonitor.worked(1); } } <START> } catch (CoreException e) { <END> } } }</code><technical_language>logging here</technical_language>

Target:
protected void findSecondaryDependencies(String[] secDeps, Set<String> ignorePkgs, Map<ExportPackageDescription, String> newDeps, IBundle bundle, boolean useRequireBundle, IProgressMonitor monitor) { IJavaProject jProject = JavaCore.create(fProject); SearchEngine engine = new SearchEngine(); if (ignorePkgs == null) ignorePkgs = new HashSet<>(2); SubMonitor subMonitor = SubMonitor.convert(monitor, PDEUIMessages.AddNewDependenciesOperation_searchProject, secDeps.length); for (int j = 0; j < secDeps.length; j++) { try { SubMonitor iterationMonitor = subMonitor.newChild(1); if (iterationMonitor.isCanceled()) { return; } String pluginId = secDeps[j]; IPluginModelBase base = PluginRegistry.findModel(secDeps[j]); if (base != null) { ExportPackageDescription[] exported = findExportedPackages(base.getBundleDescription()); IJavaSearchScope searchScope = PluginJavaSearchUtil.createSeachScope(jProject); iterationMonitor.beginTask( NLS.bind(PDEUIMessages.AddNewDependenciesOperation_searchForDependency, pluginId), exported.length); for (int i = 0; i < exported.length; i++) { String pkgName = exported[i].getName(); if (!ignorePkgs.contains(pkgName)) { ReferenceFinder requestor = new ReferenceFinder(); engine.search(SearchPattern.createPattern(pkgName, IJavaSearchConstants.PACKAGE, IJavaSearchConstants.REFERENCES, SearchPattern.R_EXACT_MATCH), new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()}, searchScope, requestor, null); if (requestor.foundMatches()) { fNewDependencies = true; ignorePkgs.add(pkgName); newDeps.put(exported[i], pluginId); if (useRequireBundle) { for (; i < exported.length; i++) ignorePkgs.add(exported[i].getName()); } } } iterationMonitor.worked(1); } } } catch (CoreException e) { PDEPlugin.logException(e); } } }