Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
27 | 3 | 6 | 0.974 | class_body_declarations[4] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 27 | 47 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ReferenceFinderUtil.java |
2 | 27 | 78 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ReferenceFinderUtil.java |
3 | 27 | 109 | plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ReferenceFinderUtil.java |
| ||||
//----- referenced types - public static IType[] getTypesReferencedIn(IJavaElement[] elements, IProgressMonitor pm) throws JavaModelException { SearchMatch[] results = getTypeReferencesIn(elements, null, pm); Set referencedTypes = extractElements(results, IJavaElement.TYPE); return (IType[]) referencedTypes.toArray(new IType[referencedTypes.size()]); } public static IType[] getTypesReferencedIn(IJavaElement[] elements, WorkingCopyOwner owner, IProgressMonitor pm) throws JavaModelException { SearchMatch[] results = getTypeReferencesIn(elements, owner, pm); Set referencedTypes = extractElements(results, IJavaElement.TYPE); return (IType[]) referencedTypes.toArray(new IType[referencedTypes.size()]); } private static SearchMatch[] getTypeReferencesIn(IJavaElement[] elements, WorkingCopyOwner owner, IProgressMonitor pm) throws JavaModelException { List referencedTypes = new ArrayList(); pm.beginTask("", elements.length); //$NON-NLS-1$ for (int i = 0; i < elements.length; i++) { referencedTypes.addAll(getTypeReferencesIn(elements[i], owner, new SubProgressMonitor(pm, 1))); } pm.done(); return (SearchMatch[]) referencedTypes.toArray(new SearchMatch[referencedTypes.size()]); } private static List getTypeReferencesIn(IJavaElement element, WorkingCopyOwner owner, IProgressMonitor pm) throws JavaModelException { CollectingSearchRequestor requestor = new CollectingSearchRequestor(); SearchEngine engine = owner != null ? new SearchEngine(owner): new SearchEngine(); engine.searchDeclarationsOfReferencedTypes(element, requestor, pm); return requestor.getResults(); } |
| ||||
//----- referenced fields ---- public static IField[] getFieldsReferencedIn(IJavaElement[] elements, IProgressMonitor pm) throws JavaModelException { SearchMatch[] results = getFieldReferencesIn(elements, null, pm); Set referencedFields = extractElements(results, IJavaElement.FIELD); return (IField[]) referencedFields.toArray(new IField[referencedFields.size()]); } public static IField[] getFieldsReferencedIn(IJavaElement[] elements, WorkingCopyOwner owner, IProgressMonitor pm) throws JavaModelException { SearchMatch[] results = getFieldReferencesIn(elements, owner, pm); Set referencedFields = extractElements(results, IJavaElement.FIELD); return (IField[]) referencedFields.toArray(new IField[referencedFields.size()]); } private static SearchMatch[] getFieldReferencesIn(IJavaElement[] elements, WorkingCopyOwner owner, IProgressMonitor pm) throws JavaModelException { List referencedFields = new ArrayList(); pm.beginTask("", elements.length); //$NON-NLS-1$ for (int i = 0; i < elements.length; i++) { referencedFields.addAll(getFieldReferencesIn(elements[i], owner, new SubProgressMonitor(pm, 1))); } pm.done(); return (SearchMatch[]) referencedFields.toArray(new SearchMatch[referencedFields.size()]); } private static List getFieldReferencesIn(IJavaElement element, WorkingCopyOwner owner, IProgressMonitor pm) throws JavaModelException { CollectingSearchRequestor requestor = new CollectingSearchRequestor(); SearchEngine engine = owner != null ? new SearchEngine(owner): new SearchEngine(); engine.searchDeclarationsOfAccessedFields(element, requestor, pm); return requestor.getResults(); } |
| ||||
//----- referenced methods ---- public static IMethod[] getMethodsReferencedIn(IJavaElement[] elements, IProgressMonitor pm) throws JavaModelException { SearchMatch[] results = getMethodReferencesIn(elements, null, pm); Set referencedMethods = extractElements(results, IJavaElement.METHOD); return (IMethod[]) referencedMethods.toArray(new IMethod[referencedMethods.size()]); } public static IMethod[] getMethodsReferencedIn(IJavaElement[] elements, WorkingCopyOwner owner, IProgressMonitor pm) throws JavaModelException { SearchMatch[] results = getMethodReferencesIn(elements, owner, pm); Set referencedMethods = extractElements(results, IJavaElement.METHOD); return (IMethod[]) referencedMethods.toArray(new IMethod[referencedMethods.size()]); } private static SearchMatch[] getMethodReferencesIn(IJavaElement[] elements, WorkingCopyOwner owner, IProgressMonitor pm) throws JavaModelException { List referencedMethods = new ArrayList(); pm.beginTask("", elements.length); //$NON-NLS-1$ for (int i = 0; i < elements.length; i++) { referencedMethods.addAll(getMethodReferencesIn(elements[i], owner, new SubProgressMonitor(pm, 1))); } pm.done(); return (SearchMatch[]) referencedMethods.toArray(new SearchMatch[referencedMethods.size()]); } private static List getMethodReferencesIn(IJavaElement element, WorkingCopyOwner owner, IProgressMonitor pm) throws JavaModelException { CollectingSearchRequestor requestor = new CollectingSearchRequestor(); SearchEngine engine = owner != null ? new SearchEngine(owner): new SearchEngine(); engine.searchDeclarationsOfSentMessages(element, requestor, pm); return requestor.getResults(); } |
| |||
//----- referenced methods ---- //----- referenced fields ---- //----- referenced types - public static [[#variableb688cea0]][] [[#variableb688ce20]](IJavaElement[] elements, IProgressMonitor pm) throws JavaModelException { SearchMatch[] results = [[#variableb688cd40]](elements, null, pm); Set [[#variableb688cbc0]]= extractElements(results, IJavaElement. [[#variableb688ccc0]]); return ( [[#variableb688cea0]][]) [[#variableb688cbc0]].toArray(new [[#variableb688cea0]][ [[#variableb688cbc0]].size()]); } public static [[#variableb688cea0]][] [[#variableb688ce20]](IJavaElement[] elements, WorkingCopyOwner owner, IProgressMonitor pm) throws JavaModelException { SearchMatch[] results = [[#variableb688cd40]](elements, owner, pm); Set [[#variableb688cbc0]]= extractElements(results, IJavaElement. [[#variableb688ccc0]]); return ( [[#variableb688cea0]][]) [[#variableb688cbc0]].toArray(new [[#variableb688cea0]][ [[#variableb688cbc0]].size()]); } private static SearchMatch[] [[#variableb688cd40]](IJavaElement[] elements, WorkingCopyOwner owner, IProgressMonitor pm) throws JavaModelException { List [[#variableb688cbc0]]= new ArrayList(); pm.beginTask("", elements.length); //$NON-NLS-1$ for (int i = 0; i < elements.length; i++) { [[#variableb688cbc0]].addAll( [[#variableb688cd40]](elements[i], owner, new SubProgressMonitor(pm, 1))); } pm.done(); return (SearchMatch[]) [[#variableb688cbc0]].toArray(new SearchMatch[ [[#variableb688cbc0]].size()]); } private static List [[#variableb688cd40]](IJavaElement element, WorkingCopyOwner owner, IProgressMonitor pm) throws JavaModelException { CollectingSearchRequestor requestor = new CollectingSearchRequestor(); SearchEngine engine = owner != null ? new SearchEngine(owner): new SearchEngine(); engine. [[#variableb688cba0]](element, requestor, pm); return requestor.getResults(); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b688cea0]] | IMethod |
1 | 2 | [[#b688cea0]] | IField |
1 | 3 | [[#b688cea0]] | IType |
2 | 1 | [[#b688ce20]] | getMethodsReferencedIn |
2 | 2 | [[#b688ce20]] | getFieldsReferencedIn |
2 | 3 | [[#b688ce20]] | getTypesReferencedIn |
3 | 1 | [[#b688cd40]] | getMethodReferencesIn |
3 | 2 | [[#b688cd40]] | getFieldReferencesIn |
3 | 3 | [[#b688cd40]] | getTypeReferencesIn |
4 | 1 | [[#b688cbc0]] | referencedMethods |
4 | 2 | [[#b688cbc0]] | referencedFields |
4 | 3 | [[#b688cbc0]] | referencedTypes |
5 | 1 | [[#b688ccc0]] | METHOD |
5 | 2 | [[#b688ccc0]] | FIELD |
5 | 3 | [[#b688ccc0]] | TYPE |
6 | 1 | [[#b688cba0]] | searchDeclarationsOfSentMessages |
6 | 2 | [[#b688cba0]] | searchDeclarationsOfAccessedFields |
6 | 3 | [[#b688cba0]] | searchDeclarationsOfReferencedTypes |