Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
47 | 3 | 2 | 0.985 | class_body_declarations[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 44 | 812 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java |
2 | 44 | 895 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java |
3 | 47 | 981 | plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java |
| ||||
/** * Searches for all declarations of the fields accessed in the given element. * The element can be a compilation unit, a source type, or a source method. * Reports the field declarations using the given requestor. * <p> * Consider the following code: * <code> * <pre> * class A { * int field1; * } * class B extends A { * String value; * } * class X { * void test() { * B b = new B(); * System.out.println(b.value + b.field1); * }; * } * </pre> * </code> * then searching for declarations of accessed fields in method * <code>X.test()</code> would collect the fields * <code>B.value</code> and <code>A.field1</code>. * </p> * * @param enclosingElement the method, type, or compilation unit to be searched in * @param requestor a callback object to which each match is reported * @param monitor the progress monitor used to report progress * @exception JavaModelException if the search failed. Reasons include: * <ul> * <li>the element doesn't exist</li> * <li>the classpath is incorrectly set</li> * </ul> * @since 3.0 */ public void searchDeclarationsOfAccessedFields(IJavaElement enclosingElement, SearchRequestor requestor, IProgressMonitor monitor) throws JavaModelException { this.basicEngine.searchDeclarationsOfAccessedFields(enclosingElement, requestor, monitor); } /** * Searches for all declarations of the fields accessed in the given element. * The element can be a compilation unit, a source type, or a source method. * Reports the field declarations using the given collector. * <p> * Consider the following code: * <code> * <pre> * class A { * int field1; * } * class B extends A { * String value; * } * class X { * void test() { * B b = new B(); * System.out.println(b.value + b.field1); * }; * } * </pre> * </code> * then searching for declarations of accessed fields in method * <code>X.test()</code> would collect the fields * <code>B.value</code> and <code>A.field1</code>. * </p> * * @param workspace the workspace * @param enclosingElement the method, type, or compilation unit to be searched in * @param resultCollector a callback object to which each match is reported * @exception JavaModelException if the search failed. Reasons include: * <ul> * <li>the element doesn't exist</li> * <li>the classpath is incorrectly set</li> * </ul> * @deprecated Use {@link #searchDeclarationsOfAccessedFields(IJavaElement, SearchRequestor, IProgressMonitor)} instead. */ public void searchDeclarationsOfAccessedFields(IWorkspace workspace, IJavaElement enclosingElement, IJavaSearchResultCollector resultCollector) throws JavaModelException { SearchPattern pattern = new DeclarationOfAccessedFieldsPattern(enclosingElement); this.basicEngine.searchDeclarations(enclosingElement, new ResultCollectorAdapter(resultCollector), pattern, resultCollector.getProgressMonitor()); } |
| ||||
/** * Searches for all declarations of the types referenced in the given element. * The element can be a compilation unit, a source type, or a source method. * Reports the type declarations using the given requestor. * <p> * Consider the following code: * <code> * <pre> * class A { * } * class B extends A { * } * interface I { * int VALUE = 0; * } * class X { * void test() { * B b = new B(); * this.foo(b, I.VALUE); * }; * } * </pre> * </code> * then searching for declarations of referenced types in method <code>X.test()</code> * would collect the class <code>B</code> and the interface <code>I</code>. * </p> * * @param enclosingElement the method, type, or compilation unit to be searched in * @param requestor a callback object to which each match is reported * @param monitor the progress monitor used to report progress * @exception JavaModelException if the search failed. Reasons include: * <ul> * <li>the element doesn't exist</li> * <li>the classpath is incorrectly set</li> * </ul> * @since 3.0 */ public void searchDeclarationsOfReferencedTypes(IJavaElement enclosingElement, SearchRequestor requestor, IProgressMonitor monitor) throws JavaModelException { this.basicEngine.searchDeclarationsOfReferencedTypes(enclosingElement, requestor, monitor); } /** * Searches for all declarations of the types referenced in the given element. * The element can be a compilation unit, a source type, or a source method. * Reports the type declarations using the given collector. * <p> * Consider the following code: * <code> * <pre> * class A { * } * class B extends A { * } * interface I { * int VALUE = 0; * } * class X { * void test() { * B b = new B(); * this.foo(b, I.VALUE); * }; * } * </pre> * </code> * then searching for declarations of referenced types in method <code>X.test()</code> * would collect the class <code>B</code> and the interface <code>I</code>. * </p> * * @param workspace the workspace * @param enclosingElement the method, type, or compilation unit to be searched in * @param resultCollector a callback object to which each match is reported * @exception JavaModelException if the search failed. Reasons include: * <ul> * <li>the element doesn't exist</li> * <li>the classpath is incorrectly set</li> * </ul> * @deprecated Use {@link #searchDeclarationsOfReferencedTypes(IJavaElement, SearchRequestor, IProgressMonitor)} instead. */ public void searchDeclarationsOfReferencedTypes(IWorkspace workspace, IJavaElement enclosingElement, IJavaSearchResultCollector resultCollector) throws JavaModelException { SearchPattern pattern = new DeclarationOfReferencedTypesPattern(enclosingElement); this.basicEngine.searchDeclarations(enclosingElement, new ResultCollectorAdapter(resultCollector), pattern, resultCollector.getProgressMonitor()); } |
| ||||
/** * Searches for all declarations of the methods invoked in the given element. * The element can be a compilation unit, a source type, or a source method. * Reports the method declarations using the given requestor. * <p> * Consider the following code: * <code> * <pre> * class A { * void foo() {}; * void bar() {}; * } * class B extends A { * void foo() {}; * } * class X { * void test() { * A a = new B(); * a.foo(); * B b = (B)a; * b.bar(); * }; * } * </pre> * </code> * then searching for declarations of sent messages in method * <code>X.test()</code> would collect the methods * <code>A.foo()</code>, <code>B.foo()</code>, and <code>A.bar()</code>. * </p> * * @param enclosingElement the method, type, or compilation unit to be searched in * @param requestor a callback object to which each match is reported * @param monitor the progress monitor used to report progress * @exception JavaModelException if the search failed. Reasons include: * <ul> * <li>the element doesn't exist</li> * <li>the classpath is incorrectly set</li> * </ul> * @since 3.0 */ public void searchDeclarationsOfSentMessages(IJavaElement enclosingElement, SearchRequestor requestor, IProgressMonitor monitor) throws JavaModelException { this.basicEngine.searchDeclarationsOfSentMessages(enclosingElement, requestor, monitor); } /** * Searches for all declarations of the methods invoked in the given element. * The element can be a compilation unit, a source type, or a source method. * Reports the method declarations using the given collector. * <p> * Consider the following code: * <code> * <pre> * class A { * void foo() {}; * void bar() {}; * } * class B extends A { * void foo() {}; * } * class X { * void test() { * A a = new B(); * a.foo(); * B b = (B)a; * b.bar(); * }; * } * </pre> * </code> * then searching for declarations of sent messages in method * <code>X.test()</code> would collect the methods * <code>A.foo()</code>, <code>B.foo()</code>, and <code>A.bar()</code>. * </p> * * @param workspace the workspace * @param enclosingElement the method, type, or compilation unit to be searched in * @param resultCollector a callback object to which each match is reported * @exception JavaModelException if the search failed. Reasons include: * <ul> * <li>the element doesn't exist</li> * <li>the classpath is incorrectly set</li> * </ul> * @deprecated Use {@link #searchDeclarationsOfSentMessages(IJavaElement, SearchRequestor, IProgressMonitor)} instead. */ public void searchDeclarationsOfSentMessages(IWorkspace workspace, IJavaElement enclosingElement, IJavaSearchResultCollector resultCollector) throws JavaModelException { SearchPattern pattern = new DeclarationOfReferencedMethodsPattern(enclosingElement); this.basicEngine.searchDeclarations(enclosingElement, new ResultCollectorAdapter(resultCollector), pattern, resultCollector.getProgressMonitor()); } |
| |||
/** * Searches for all declarations of the methods invoked in the given element. * The element can be a compilation unit, a source type, or a source method. * Reports the method declarations using the given requestor. * <p> * Consider the following code: * <code> * <pre> * class A { * void foo() {}; * void bar() {}; * } * class B extends A { * void foo() {}; * } * class X { * void test() { * A a = new B(); * a.foo(); * B b = (B)a; * b.bar(); * }; * } * </pre> * </code> * then searching for declarations of sent messages in method * <code>X.test()</code> would collect the methods * <code>A.foo()</code>, <code>B.foo()</code>, and <code>A.bar()</code>. * </p> * * @param enclosingElement the method, type, or compilation unit to be searched in * @param requestor a callback object to which each match is reported * @param monitor the progress monitor used to report progress * @exception JavaModelException if the search failed. Reasons include: * <ul> * <li>the element doesn't exist</li> * <li>the classpath is incorrectly set</li> * </ul> * @since 3.0 */ /** * Searches for all declarations of the types referenced in the given element. * The element can be a compilation unit, a source type, or a source method. * Reports the type declarations using the given requestor. * <p> * Consider the following code: * <code> * <pre> * class A { * } * class B extends A { * } * interface I { * int VALUE = 0; * } * class X { * void test() { * B b = new B(); * this.foo(b, I.VALUE); * }; * } * </pre> * </code> * then searching for declarations of referenced types in method <code>X.test()</code> * would collect the class <code>B</code> and the interface <code>I</code>. * </p> * * @param enclosingElement the method, type, or compilation unit to be searched in * @param requestor a callback object to which each match is reported * @param monitor the progress monitor used to report progress * @exception JavaModelException if the search failed. Reasons include: * <ul> * <li>the element doesn't exist</li> * <li>the classpath is incorrectly set</li> * </ul> * @since 3.0 */ /** * Searches for all declarations of the fields accessed in the given element. * The element can be a compilation unit, a source type, or a source method. * Reports the field declarations using the given requestor. * <p> * Consider the following code: * <code> * <pre> * class A { * int field1; * } * class B extends A { * String value; * } * class X { * void test() { * B b = new B(); * System.out.println(b.value + b.field1); * }; * } * </pre> * </code> * then searching for declarations of accessed fields in method * <code>X.test()</code> would collect the fields * <code>B.value</code> and <code>A.field1</code>. * </p> * * @param enclosingElement the method, type, or compilation unit to be searched in * @param requestor a callback object to which each match is reported * @param monitor the progress monitor used to report progress * @exception JavaModelException if the search failed. Reasons include: * <ul> * <li>the element doesn't exist</li> * <li>the classpath is incorrectly set</li> * </ul> * @since 3.0 */ public void [[#variable5b3d1c20]](IJavaElement enclosingElement, SearchRequestor requestor, IProgressMonitor monitor) throws JavaModelException { this.basicEngine. [[#variable5b3d1c20]](enclosingElement, requestor, monitor); } /** * Searches for all declarations of the methods invoked in the given element. * The element can be a compilation unit, a source type, or a source method. * Reports the method declarations using the given collector. * <p> * Consider the following code: * <code> * <pre> * class A { * void foo() {}; * void bar() {}; * } * class B extends A { * void foo() {}; * } * class X { * void test() { * A a = new B(); * a.foo(); * B b = (B)a; * b.bar(); * }; * } * </pre> * </code> * then searching for declarations of sent messages in method * <code>X.test()</code> would collect the methods * <code>A.foo()</code>, <code>B.foo()</code>, and <code>A.bar()</code>. * </p> * * @param workspace the workspace * @param enclosingElement the method, type, or compilation unit to be searched in * @param resultCollector a callback object to which each match is reported * @exception JavaModelException if the search failed. Reasons include: * <ul> * <li>the element doesn't exist</li> * <li>the classpath is incorrectly set</li> * </ul> * @deprecated Use {@link #searchDeclarationsOfSentMessages(IJavaElement, SearchRequestor, IProgressMonitor)} instead. */ /** * Searches for all declarations of the types referenced in the given element. * The element can be a compilation unit, a source type, or a source method. * Reports the type declarations using the given collector. * <p> * Consider the following code: * <code> * <pre> * class A { * } * class B extends A { * } * interface I { * int VALUE = 0; * } * class X { * void test() { * B b = new B(); * this.foo(b, I.VALUE); * }; * } * </pre> * </code> * then searching for declarations of referenced types in method <code>X.test()</code> * would collect the class <code>B</code> and the interface <code>I</code>. * </p> * * @param workspace the workspace * @param enclosingElement the method, type, or compilation unit to be searched in * @param resultCollector a callback object to which each match is reported * @exception JavaModelException if the search failed. Reasons include: * <ul> * <li>the element doesn't exist</li> * <li>the classpath is incorrectly set</li> * </ul> * @deprecated Use {@link #searchDeclarationsOfReferencedTypes(IJavaElement, SearchRequestor, IProgressMonitor)} instead. */ /** * Searches for all declarations of the fields accessed in the given element. * The element can be a compilation unit, a source type, or a source method. * Reports the field declarations using the given collector. * <p> * Consider the following code: * <code> * <pre> * class A { * int field1; * } * class B extends A { * String value; * } * class X { * void test() { * B b = new B(); * System.out.println(b.value + b.field1); * }; * } * </pre> * </code> * then searching for declarations of accessed fields in method * <code>X.test()</code> would collect the fields * <code>B.value</code> and <code>A.field1</code>. * </p> * * @param workspace the workspace * @param enclosingElement the method, type, or compilation unit to be searched in * @param resultCollector a callback object to which each match is reported * @exception JavaModelException if the search failed. Reasons include: * <ul> * <li>the element doesn't exist</li> * <li>the classpath is incorrectly set</li> * </ul> * @deprecated Use {@link #searchDeclarationsOfAccessedFields(IJavaElement, SearchRequestor, IProgressMonitor)} instead. */ public void [[#variable5b3d1c20]](IWorkspace workspace, IJavaElement enclosingElement, IJavaSearchResultCollector resultCollector) throws JavaModelException { SearchPattern pattern = new [[#variablec27872e0]](enclosingElement); this.basicEngine.searchDeclarations(enclosingElement, new ResultCollectorAdapter(resultCollector), pattern, resultCollector.getProgressMonitor()); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#5b3d1c20]] | searchDeclarationsOfSentMessages |
1 | 2 | [[#5b3d1c20]] | searchDeclarationsOfReferencedTypes |
1 | 3 | [[#5b3d1c20]] | searchDeclarationsOfAccessedFields |
2 | 1 | [[#c27872e0]] | DeclarationOfReferencedMethodsPattern |
2 | 2 | [[#c27872e0]] | DeclarationOfReferencedTypesPattern |
2 | 3 | [[#c27872e0]] | DeclarationOfAccessedFieldsPattern |