CloneSet1355


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
9240.953statement_sequence[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
19660
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/NameLookup.java
29103
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SearchableEnvironmentRequestor.java
Clone Instance
1
Line Count
9
Source Line
660
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/NameLookup.java

                PackageFragmentRoot root = (PackageFragmentRoot) type.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
                ClasspathEntry entry = (ClasspathEntry) this.rootToResolvedEntries.get(root);
                if (entry != null) { // reverse map always contains resolved CP entry
                        AccessRuleSet accessRuleSet = entry.getAccessRuleSet();
                        if (accessRuleSet != null) {
                                // TODO (philippe) improve char[] <-> String conversions to avoid performing them on the fly
                                char[][] packageChars = CharOperation.splitOn('.', packageName.toCharArray());
                                char[] typeChars = typeName.toCharArray();
                                accessRestriction = accessRuleSet.getViolatedRestriction(CharOperation.concatWith(packageChars, typeChars, '/'));
                        }
                }


Clone Instance
2
Line Count
9
Source Line
103
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SearchableEnvironmentRequestor.java

                        PackageFragmentRoot root = (PackageFragmentRoot) type.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
                        ClasspathEntry entry = (ClasspathEntry) this.nameLookup.rootToResolvedEntries.get(root);
                        if (entry != null) { // reverse map always contains resolved CP entry
                                AccessRuleSet accessRuleSet = entry.getAccessRuleSet();
                                if (accessRuleSet != null) {
                                        // TODO (philippe) improve char[] <-> String conversions to avoid performing them on the fly
                                        char[][] packageChars = CharOperation.splitOn('.', packageName);
                                        char[] fileWithoutExtension = type.getElementName().toCharArray();
                                        accessRestriction = accessRuleSet.getViolatedRestriction(CharOperation.concatWith(packageChars, fileWithoutExtension, '/'));
                                }
                        }


Clone AbstractionParameter Count: 4Parameter Bindings

PackageFragmentRoot root = (PackageFragmentRoot) type.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);
ClasspathEntry entry = (ClasspathEntry)  [[#variable603032c0]].rootToResolvedEntries.get(root);
if (entry != null) { // reverse map always contains resolved CP entry
  AccessRuleSet accessRuleSet = entry.getAccessRuleSet();
  if (accessRuleSet != null) {
    // TODO (philippe) improve char[] <-> String conversions to avoid performing them on the fly
    char[][] packageChars = CharOperation.splitOn('.',  [[#variable60303320]]);
    char[]  [[#variable603033c0]]= [[#variable60303220]].toCharArray();
    accessRestriction = accessRuleSet.getViolatedRestriction(CharOperation.concatWith(packageChars,  [[#variable603033c0]], '/'));
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#603032c0]]
this.nameLookup 
12[[#603032c0]]
this 
21[[#60303320]]
packageName 
22[[#60303320]]
packageName.toCharArray() 
31[[#603033c0]]
fileWithoutExtension 
32[[#603033c0]]
typeChars 
41[[#60303220]]
type.getElementName() 
42[[#60303220]]
typeName