CloneSet311


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

        /**
         * Returns the SourceRange for the name of the given element, or
         * {-1, -1} if no source range is known for the name of the element.
         */
        public SourceRange getNameRange(IJavaElement element) {
                switch (element.getElementType()) {
                        case IJavaElement.METHOD:
                                if (((IMember) element).isBinary()) {
                                        IJavaElement[] el = getUnqualifiedMethodHandle((IMethod) element, false);
                                        if (el[1] != null && this.sourceRanges.get(el[0]) == null) {
                                                element = getUnqualifiedMethodHandle((IMethod) element, true)[0];
                                        }
                                        else   {
                                                element = el[0];
                                        }
                                }
                                break;
                        case IJavaElement.TYPE_PARAMETER:
                                IJavaElement parent = element.getParent();
                                if (parent.getElementType() == IJavaElement.METHOD) {
                                        IMethod method = (IMethod) parent;
                                        if (method.isBinary()) {
                                                IJavaElement[] el = getUnqualifiedMethodHandle(method, false);
                                                if (el[1] != null && this.sourceRanges.get(el[0]) == null) {
                                                        method = (IMethod) getUnqualifiedMethodHandle(method, true)[0];
                                                }
                                                else   {
                                                        method = (IMethod) el[0];
                                                }
                                                element = method.getTypeParameter(element.getElementName());
                                        }
                                }
                      }
                SourceRange[] ranges = (SourceRange[]) this.sourceRanges.get(element);
                if (ranges == null) {
                        return UNKNOWN_RANGE;
                }
                else   {
                        return ranges[1];
                }
        }


Clone Instance
2
Line Count
32
Source Line
1009
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java

        /**
         * Returns the <code>SourceRange</code> for the given element, or
         * {-1, -1} if no source range is known for the element.
         */
        public SourceRange getSourceRange(IJavaElement element) {
                switch (element.getElementType()) {
                        case IJavaElement.METHOD:
                                if (((IMember) element).isBinary()) {
                                        IJavaElement[] el = getUnqualifiedMethodHandle((IMethod) element, false);
                                        if (el[1] != null && this.sourceRanges.get(el[0]) == null) {
                                                element = getUnqualifiedMethodHandle((IMethod) element, true)[0];
                                        }
                                        else   {
                                                element = el[0];
                                        }
                                }
                                break;
                        case IJavaElement.TYPE_PARAMETER:
                                IJavaElement parent = element.getParent();
                                if (parent.getElementType() == IJavaElement.METHOD) {
                                        IMethod method = (IMethod) parent;
                                        if (method.isBinary()) {
                                                IJavaElement[] el = getUnqualifiedMethodHandle(method, false);
                                                if (el[1] != null && this.sourceRanges.get(el[0]) == null) {
                                                        method = (IMethod) getUnqualifiedMethodHandle(method, true)[0];
                                                }
                                                else   {
                                                        method = (IMethod) el[0];
                                                }
                                                element = method.getTypeParameter(element.getElementName());
                                        }
                                }
                      }
                SourceRange[] ranges = (SourceRange[]) this.sourceRanges.get(element);
                if (ranges == null) {
                        return UNKNOWN_RANGE;
                }
                else   {
                        return ranges[0];
                }
        }


Clone AbstractionParameter Count: 2Parameter Bindings

/**
         * Returns the SourceRange for the name of the given element, or
         * {-1, -1} if no source range is known for the name of the element.
         */
/**
         * Returns the <code>SourceRange</code> for the given element, or
         * {-1, -1} if no source range is known for the element.
         */
public SourceRange  [[#variablebadc1840]](IJavaElement element) {
  switch (element.getElementType()) {
    case IJavaElement.METHOD:
      if (((IMember) element).isBinary()) {
        IJavaElement[] el = getUnqualifiedMethodHandle((IMethod) element, false);
        if (el[1] != null && this.sourceRanges.get(el[0]) == null) {
          element = getUnqualifiedMethodHandle((IMethod) element, true)[0];
        }
        else {
          element = el[0];
        }
      }
      break;
    case IJavaElement.TYPE_PARAMETER:
      IJavaElement parent = element.getParent();
      if (parent.getElementType() == IJavaElement.METHOD) {
        IMethod method = (IMethod) parent;
        if (method.isBinary()) {
          IJavaElement[] el = getUnqualifiedMethodHandle(method, false);
          if (el[1] != null && this.sourceRanges.get(el[0]) == null) {
            method = (IMethod) getUnqualifiedMethodHandle(method, true)[0];
          }
          else {
            method = (IMethod) el[0];
          }
          element = method.getTypeParameter(element.getElementName());
        }
      }
  }
  SourceRange[] ranges = (SourceRange[]) this.sourceRanges.get(element);
  if (ranges == null) {
    return UNKNOWN_RANGE;
  }
  else {
    return ranges[ [[#variablebadc1720]]];
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#badc1840]]
getNameRange 
12[[#badc1840]]
getSourceRange 
21[[#badc1720]]
1 
22[[#badc1720]]
0