CloneSet599


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
13320.992class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
113187
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddProjectAction.java
213170
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/JavaProjectSourceContainerBrowser.java
313336
plugins/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/sourcelookup/JavaSourceLocator.java
Clone Instance
1
Line Count
13
Source Line
187
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddProjectAction.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);
                                        }
                                }
                        }
                }
        }


Clone Instance
2
Line Count
13
Source Line
170
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/JavaProjectSourceContainerBrowser.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);
                                        }
                                }
                        }
                }
        }


Clone Instance
3
Line Count
13
Source Line
336
Source File
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 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);
                                        }
                                }
                        }
                }
        }


Clone AbstractionParameter Count: 2Parameter Bindings

 [[#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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#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 
12[[#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 
13[[#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 
21[[#bcd24f40]]
List 
22[[#bcd24f40]]
ArrayList 
23[[#bcd24f40]]
List