| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 9 | 2 | 4 | 0.953 | statement_sequence[3] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 9 | 660 | plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/NameLookup.java |
| 2 | 9 | 103 | 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.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, '/'));
}
}
|
| ||||
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, '/'));
}
}
|
| |||
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 Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#603032c0]] | this.nameLookup |
| 1 | 2 | [[#603032c0]] | this |
| 2 | 1 | [[#60303320]] | packageName |
| 2 | 2 | [[#60303320]] | packageName.toCharArray() |
| 3 | 1 | [[#603033c0]] | fileWithoutExtension |
| 3 | 2 | [[#603033c0]] | typeChars |
| 4 | 1 | [[#60303220]] | type.getElementName() |
| 4 | 2 | [[#60303220]] | typeName |