CloneSet1340


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
13201.000class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
113214
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSSourceModifier.java
213153
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSUtil.java
Clone Instance
1
Line Count
13
Source Line
214
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSSourceModifier.java

        private static boolean isPositionInElement(NLSElement element, int position) {
                Region elementPosition = element.getPosition();
                return (elementPosition.getOffset() <= position && position <= elementPosition.getOffset() + elementPosition.getLength());
        }

        private static NLSElement findElement(NLSLine line, int position) {
                NLSElement[] elements = line.getElements();
                for (int i = 0; i < elements.length; i++) {
                        NLSElement element = elements[i];
                        if (isPositionInElement(element, position))
                                return element;
                }
                return null;
        }


Clone Instance
2
Line Count
13
Source Line
153
Source File
plugins/org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/NLSUtil.java

        private static boolean isPositionInElement(NLSElement element, int position) {
                Region elementPosition = element.getPosition();
                return (elementPosition.getOffset() <= position && position <= elementPosition.getOffset() + elementPosition.getLength());
        }

        private static NLSElement findElement(NLSLine line, int position) {
                NLSElement[] elements = line.getElements();
                for (int i = 0; i < elements.length; i++) {
                        NLSElement element = elements[i];
                        if (isPositionInElement(element, position))
                                return element;
                }
                return null;
        }


Clone AbstractionParameter Count: 0Parameter Bindings

private static boolean isPositionInElement(NLSElement element, int position) {
  Region elementPosition = element.getPosition();
  return (elementPosition.getOffset() <= position && position <= elementPosition.getOffset() + elementPosition.getLength());
}

private static NLSElement findElement(NLSLine line, int position) {
  NLSElement[] elements = line.getElements();
  for (int i = 0; i < elements.length; i++) {
    NLSElement element = elements[i];
    if (isPositionInElement(element, position))
      return element;
  }
  return null;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None