CloneSet1174


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
47320.985class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
144812
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java
244895
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java
347981
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java
Clone Instance
1
Line Count
44
Source Line
812
Source File
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());
        }


Clone Instance
2
Line Count
44
Source Line
895
Source File
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java

        /**
         * 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());
        }


Clone Instance
3
Line Count
47
Source Line
981
Source File
plugins/org.eclipse.jdt.core/search/org/eclipse/jdt/core/search/SearchEngine.java

        /**
         * 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());
        }


Clone AbstractionParameter Count: 2Parameter Bindings

/**
         * 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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#5b3d1c20]]
searchDeclarationsOfSentMessages 
12[[#5b3d1c20]]
searchDeclarationsOfReferencedTypes 
13[[#5b3d1c20]]
searchDeclarationsOfAccessedFields 
21[[#c27872e0]]
DeclarationOfReferencedMethodsPattern 
22[[#c27872e0]]
DeclarationOfReferencedTypesPattern 
23[[#c27872e0]]
DeclarationOfAccessedFieldsPattern