CloneSet706


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
32230.987class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1322971
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
2323014
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
Clone Instance
1
Line Count
32
Source Line
2971
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java

        /**
         * Returns whether the given marker references the given Java element.
         * Used for markers, which denote a Java element rather than a resource.
         *
         * @param element the element
         * @param marker the marker
         * @return <code>true</code> if the marker references the element, false otherwise
         * @exception CoreException if the <code>IMarker.getAttribute</code> on the marker fails         
         */
        public static boolean isReferencedBy(IJavaElement element, IMarker marker) throws CoreException {

                // only match units or classfiles
                if (element instanceof IMember) {
                        IMember member = (IMember) element;
                        if (member.isBinary()) {
                                element = member.getClassFile();
                        }
                        else   {
                                element = member.getCompilationUnit();
                        }
                }
                if (element == null) return false;
                if (marker == null) return false;
                String markerHandleId = (String) marker.getAttribute(ATT_HANDLE_ID);
                if (markerHandleId == null) return false;

                IJavaElement markerElement = JavaCore.create(markerHandleId);
                while (true) {
                        if (element.equals(markerElement)) return true; // external elements may still be equal with different handleIDs.

                        // cycle through enclosing types in case marker is associated with a classfile (15568)
                        if (markerElement instanceof IClassFile) {
                                IType enclosingType = ((IClassFile) markerElement).getType().getDeclaringType();
                                if (enclosingType != null) {
                                        markerElement = enclosingType.getClassFile(); // retry with immediate enclosing classfile
                                        continue ;
                                }
                        }
                        break;
                }
                return false;
        }


Clone Instance
2
Line Count
32
Source Line
3014
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java

        /**
         * Returns whether the given marker delta references the given Java element.
         * Used for markers deltas, which denote a Java element rather than a resource.
         *
         * @param element the element
         * @param markerDelta the marker delta
         * @return <code>true</code> if the marker delta references the element
         * @exception CoreException if the  <code>IMarkerDelta.getAttribute</code> on the marker delta fails     
         */
        public static boolean isReferencedBy(IJavaElement element, IMarkerDelta markerDelta) throws CoreException {

                // only match units or classfiles
                if (element instanceof IMember) {
                        IMember member = (IMember) element;
                        if (member.isBinary()) {
                                element = member.getClassFile();
                        }
                        else   {
                                element = member.getCompilationUnit();
                        }
                }
                if (element == null) return false;
                if (markerDelta == null) return false;
                String markerDeltarHandleId = (String) markerDelta.getAttribute(ATT_HANDLE_ID);
                if (markerDeltarHandleId == null) return false;

                IJavaElement markerElement = JavaCore.create(markerDeltarHandleId);
                while (true) {
                        if (element.equals(markerElement)) return true; // external elements may still be equal with different handleIDs.

                        // cycle through enclosing types in case marker is associated with a classfile (15568)
                        if (markerElement instanceof IClassFile) {
                                IType enclosingType = ((IClassFile) markerElement).getType().getDeclaringType();
                                if (enclosingType != null) {
                                        markerElement = enclosingType.getClassFile(); // retry with immediate enclosing classfile
                                        continue ;
                                }
                        }
                        break;
                }
                return false;
        }


Clone AbstractionParameter Count: 3Parameter Bindings

/**
         * Returns whether the given marker references the given Java element.
         * Used for markers, which denote a Java element rather than a resource.
         *
         * @param element the element
         * @param marker the marker
         * @return <code>true</code> if the marker references the element, false otherwise
         * @exception CoreException if the <code>IMarker.getAttribute</code> on the marker fails         
         */
/**
         * Returns whether the given marker delta references the given Java element.
         * Used for markers deltas, which denote a Java element rather than a resource.
         *
         * @param element the element
         * @param markerDelta the marker delta
         * @return <code>true</code> if the marker delta references the element
         * @exception CoreException if the  <code>IMarkerDelta.getAttribute</code> on the marker delta fails     
         */
public static boolean isReferencedBy(IJavaElement element, [[#variable8f5f5860]]  [[#variable8f5f57e0]]) throws CoreException {
  // only match units or classfiles
  if (element instanceof IMember) {
    IMember member = (IMember) element;
    if (member.isBinary()) {
      element = member.getClassFile();
    }
    else {
      element = member.getCompilationUnit();
    }
  }
  if (element == null)
    return false;
  if ( [[#variable8f5f57e0]]== null)
    return false;
  String  [[#variable8f5f5780]]= (String)  [[#variable8f5f57e0]].getAttribute(ATT_HANDLE_ID);
  if ( [[#variable8f5f5780]]== null)
    return false;
  IJavaElement markerElement = JavaCore.create( [[#variable8f5f5780]]);
  while (true) {
    if (element.equals(markerElement))
      return true; // external elements may still be equal with different handleIDs.
    // cycle through enclosing types in case marker is associated with a classfile (15568)
    if (markerElement instanceof IClassFile) {
      IType enclosingType = ((IClassFile) markerElement).getType().getDeclaringType();
      if (enclosingType != null) {
        markerElement = enclosingType.getClassFile(); // retry with immediate enclosing classfile
        continue ;
      }
    }
    break;
  }
  return false;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#8f5f5860]]
IMarker 
12[[#8f5f5860]]
IMarkerDelta 
21[[#8f5f57e0]]
marker 
22[[#8f5f57e0]]
markerDelta 
31[[#8f5f5780]]
markerHandleId 
32[[#8f5f5780]]
markerDeltarHandleId