Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
13 | 3 | 2 | 0.992 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 13 | 187 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddProjectAction.java |
2 | 13 | 170 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/JavaProjectSourceContainerBrowser.java |
3 | 13 | 336 | plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaSourceLocator.java |
| ||||
/** * Adds all projects required by <code>proj</code> to the list * <code>res</code> * * @param proj the project for which to compute required * projects * @param res the list to add all required projects too */ protected void collectRequiredProjects(IJavaProject proj, List res) throws JavaModelException { if ( !res.contains(proj)) { res.add(proj); IJavaModel model = proj.getJavaModel(); IClasspathEntry[] entries = proj.getRawClasspath(); for (int i = 0; i < entries.length; i++) { IClasspathEntry curr = entries[i]; if (curr.getEntryKind() == IClasspathEntry.CPE_PROJECT) { IJavaProject ref = model.getJavaProject(curr.getPath().segment(0)); if (ref.exists()) { collectRequiredProjects(ref, res); } } } } } |
| ||||
/** * Adds all projects required by <code>proj</code> to the list * <code>res</code> * * @param proj the project for which to compute required * projects * @param res the list to add all required projects too */ protected void collectRequiredProjects(IJavaProject proj, List res) throws JavaModelException { if ( !res.contains(proj)) { res.add(proj); IJavaModel model = proj.getJavaModel(); IClasspathEntry[] entries = proj.getRawClasspath(); for (int i = 0; i < entries.length; i++) { IClasspathEntry curr = entries[i]; if (curr.getEntryKind() == IClasspathEntry.CPE_PROJECT) { IJavaProject ref = model.getJavaProject(curr.getPath().segment(0)); if (ref.exists()) { collectRequiredProjects(ref, res); } } } } } |
| ||||
/** * Adds all projects required by <code>proj</code> to the list * <code>res</code> * * @param proj the project for which to compute required * projects * @param res the list to add all required projects too */ protected static void collectRequiredProjects(IJavaProject proj, ArrayList res) throws JavaModelException { if ( !res.contains(proj)) { res.add(proj); IJavaModel model = proj.getJavaModel(); IClasspathEntry[] entries = proj.getRawClasspath(); for (int i = 0; i < entries.length; i++) { IClasspathEntry curr = entries[i]; if (curr.getEntryKind() == IClasspathEntry.CPE_PROJECT) { IJavaProject ref = model.getJavaProject(curr.getPath().segment(0)); if (ref.exists()) { collectRequiredProjects(ref, res); } } } } } |
| |||
[[#variablebcd24fc0]]void collectRequiredProjects(IJavaProject proj, [[#variablebcd24f40]] res) throws JavaModelException { if ( !res.contains(proj)) { res.add(proj); IJavaModel model = proj.getJavaModel(); IClasspathEntry[] entries = proj.getRawClasspath(); for (int i = 0; i < entries.length; i++) { IClasspathEntry curr = entries[i]; if (curr.getEntryKind() == IClasspathEntry.CPE_PROJECT) { IJavaProject ref = model.getJavaProject(curr.getPath().segment(0)); if (ref.exists()) { collectRequiredProjects(ref, res); } } } } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#bcd24fc0]] | /** * Adds all projects required by <code>proj</code> to the list * <code>res</code> * * @param proj the project for which to compute required * projects * @param res the list to add all required projects too */ protected |
1 | 2 | [[#bcd24fc0]] | /** * Adds all projects required by <code>proj</code> to the list * <code>res</code> * * @param proj the project for which to compute required * projects * @param res the list to add all required projects too */ protected static |
1 | 3 | [[#bcd24fc0]] | /** * Adds all projects required by <code>proj</code> to the list * <code>res</code> * * @param proj the project for which to compute required * projects * @param res the list to add all required projects too */ protected |
2 | 1 | [[#bcd24f40]] | List |
2 | 2 | [[#bcd24f40]] | ArrayList |
2 | 3 | [[#bcd24f40]] | List |