CloneSet1598


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
18230.985class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
118117
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddFolderAction.java
21894
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddJarAction.java
Clone Instance
1
Line Count
18
Source Line
117
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddFolderAction.java

        /**
         * Returns a list of resources of currently selected folders
         */
        protected List getSelectedFolders() {
                List list = getEntriesAsList();
                List folders = new ArrayList();
                Iterator iter = list.iterator();
                while (iter.hasNext()) {
                        IRuntimeClasspathEntry entry = (IRuntimeClasspathEntry) iter.next();
                        if (entry.getType() == IRuntimeClasspathEntry.ARCHIVE) {
                                IResource res = entry.getResource();
                                if (res != null && res instanceof IContainer) {
                                        folders.add(res);
                                }
                        }
                }
                return folders;
        }

        protected int getActionType() {
                return ADD;
        }


Clone Instance
2
Line Count
18
Source Line
94
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/AddJarAction.java

        /**
         * Returns a list of resources of currently selected jars
         */
        protected List getSelectedJars() {
                List list = getEntriesAsList();
                List jars = new ArrayList();
                Iterator iter = list.iterator();
                while (iter.hasNext()) {
                        IRuntimeClasspathEntry entry = (IRuntimeClasspathEntry) iter.next();
                        if (entry.getType() == IRuntimeClasspathEntry.ARCHIVE) {
                                IResource res = entry.getResource();
                                if (res != null && res instanceof IFile) {
                                        jars.add(res);
                                }
                        }
                }
                return jars;
        }

        protected int getActionType() {
                return ADD;
        }


Clone AbstractionParameter Count: 3Parameter Bindings

/**
         * Returns a list of resources of currently selected folders
         */
/**
         * Returns a list of resources of currently selected jars
         */
protected List  [[#variable6340f460]]() {
  List list = getEntriesAsList();
  List  [[#variable6340f420]]= new ArrayList();
  Iterator iter = list.iterator();
  while (iter.hasNext()) {
    IRuntimeClasspathEntry entry = (IRuntimeClasspathEntry) iter.next();
    if (entry.getType() == IRuntimeClasspathEntry.ARCHIVE) {
      IResource res = entry.getResource();
      if (res != null && res instanceof [[#variable6340f480]]) {
         [[#variable6340f420]].add(res);
      }
    }
  }
  return [[#variable6340f420]];
}

protected int getActionType() {
  return ADD;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6340f460]]
getSelectedFolders 
12[[#6340f460]]
getSelectedJars 
21[[#6340f420]]
folders 
22[[#6340f420]]
jars 
31[[#6340f480]]
IContainer 
32[[#6340f480]]
IFile