Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
12 | 2 | 6 | 0.979 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 12 | 58 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringScopeFactory.java |
2 | 12 | 75 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/RefactoringScopeFactory.java |
| ||||
private static void addRelatedReferencing(IJavaProject focus, Set projects) throws CoreException { IProject[] referencingProjects = focus.getProject().getReferencingProjects(); for (int i = 0; i < referencingProjects.length; i++) { IJavaProject candidate = JavaCore.create(referencingProjects[i]); if (candidate == null || projects.contains(candidate) || !candidate.exists()) continue ; // break cycle IClasspathEntry entry = getReferencingClassPathEntry(candidate, focus); if (entry != null) { projects.add(candidate); if (entry.isExported()) { addRelatedReferencing(candidate, projects); addRelatedReferenced(candidate, projects); } } } } |
| ||||
private static void addRelatedReferenced(IJavaProject focus, Set projects) throws CoreException { IProject[] referencedProjects = focus.getProject().getReferencedProjects(); for (int i = 0; i < referencedProjects.length; i++) { IJavaProject candidate = JavaCore.create(referencedProjects[i]); if (candidate == null || projects.contains(candidate) || !candidate.exists()) continue ; // break cycle IClasspathEntry entry = getReferencingClassPathEntry(focus, candidate); if (entry != null) { projects.add(candidate); if (entry.isExported()) { addRelatedReferenced(candidate, projects); addRelatedReferencing(candidate, projects); } } } } |
| |||
private static void [[#variable528a6ec0]](IJavaProject focus, Set projects) throws CoreException { IProject[] [[#variable528a6dc0]]= focus.getProject(). [[#variable528a6d20]](); for (int i = 0; i < [[#variable528a6dc0]].length; i++) { IJavaProject candidate = JavaCore.create( [[#variable528a6dc0]][i]); if (candidate == null || projects.contains(candidate) || !candidate.exists()) continue ; // break cycle IClasspathEntry entry = getReferencingClassPathEntry( [[#variable528a6cc0]], [[#variable53086660]]); if (entry != null) { projects.add(candidate); if (entry.isExported()) { [[#variable528a6ec0]](candidate, projects); [[#variable528a6d40]](candidate, projects); } } } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#528a6ec0]] | addRelatedReferencing |
1 | 2 | [[#528a6ec0]] | addRelatedReferenced |
2 | 1 | [[#528a6dc0]] | referencingProjects |
2 | 2 | [[#528a6dc0]] | referencedProjects |
3 | 1 | [[#528a6d20]] | getReferencingProjects |
3 | 2 | [[#528a6d20]] | getReferencedProjects |
4 | 1 | [[#528a6cc0]] | candidate |
4 | 2 | [[#528a6cc0]] | focus |
5 | 1 | [[#53086660]] | focus |
5 | 2 | [[#53086660]] | candidate |
6 | 1 | [[#528a6d40]] | addRelatedReferenced |
6 | 2 | [[#528a6d40]] | addRelatedReferencing |