| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 36 | 2 | 3 | 0.982 | statement_sequence[10] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 36 | 1896 | plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java |
| 2 | 35 | 4924 | plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java |
| ||||
if (this.options.checkDeprecation &&
refBinding.isViewedAsDeprecated() &&
!scope.isDefinedInSameUnit(refBinding)) {
return;
}
int accessibility = IAccessRule.K_ACCESSIBLE;
if (refBinding.hasRestrictedAccess()) {
AccessRestriction accessRestriction = lookupEnvironment.getAccessRestriction(refBinding);
if (accessRestriction != null) {
switch (accessRestriction.getProblemId()) {
case IProblem.ForbiddenReference:
if (this.options.checkForbiddenReference) {
return;
}
accessibility = IAccessRule.K_NON_ACCESSIBLE;
break;
case IProblem.DiscouragedReference:
if (this.options.checkDiscouragedReference) {
return;
}
accessibility = IAccessRule.K_DISCOURAGED;
break;
}
}
}
int relevance = computeBaseRelevance();
relevance += computeRelevanceForInterestingProposal();
relevance += computeRelevanceForCaseMatching(refBinding.sourceName, refBinding.sourceName);
relevance += computeRelevanceForExpectingType(refBinding);
relevance += computeRelevanceForQualification(false);
relevance += computeRelevanceForRestrictions(accessibility); // no access restriction for type in the current unit
if ( !this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
createTypeProposal(refBinding, typeName, accessibility, CharOperation.NO_CHAR, relevance);
}
|
| ||||
if (this.options.checkDeprecation &&
refBinding.isViewedAsDeprecated() &&
!scope.isDefinedInSameUnit(refBinding))
return;
int accessibility = IAccessRule.K_ACCESSIBLE;
if (refBinding.hasRestrictedAccess()) {
AccessRestriction accessRestriction = lookupEnvironment.getAccessRestriction(refBinding);
if (accessRestriction != null) {
switch (accessRestriction.getProblemId()) {
case IProblem.ForbiddenReference:
if (this.options.checkForbiddenReference) {
return;
}
accessibility = IAccessRule.K_NON_ACCESSIBLE;
break;
case IProblem.DiscouragedReference:
if (this.options.checkDiscouragedReference) {
return;
}
accessibility = IAccessRule.K_DISCOURAGED;
break;
}
}
}
int relevance = computeBaseRelevance();
relevance += computeRelevanceForInterestingProposal();
relevance += computeRelevanceForCaseMatching(refBinding.sourceName, refBinding.sourceName);
relevance += computeRelevanceForExpectingType(refBinding);
relevance += computeRelevanceForQualification(false);
relevance += computeRelevanceForRestrictions(accessibility); // no access restriction for type in the current unit
if ( !this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
createTypeProposal(refBinding, refBinding.qualifiedSourceName(), IAccessRule.K_ACCESSIBLE, CharOperation.NO_CHAR, relevance);
}
|
| |||
if (this.options.checkDeprecation && refBinding.isViewedAsDeprecated() && !scope.isDefinedInSameUnit(refBinding))
[[#variable526f9140]]
int accessibility = IAccessRule.K_ACCESSIBLE;
if (refBinding.hasRestrictedAccess()) {
AccessRestriction accessRestriction = lookupEnvironment.getAccessRestriction(refBinding);
if (accessRestriction != null) {
switch (accessRestriction.getProblemId()) {
case IProblem.ForbiddenReference:
if (this.options.checkForbiddenReference) {
return;
}
accessibility = IAccessRule.K_NON_ACCESSIBLE;
break;
case IProblem.DiscouragedReference:
if (this.options.checkDiscouragedReference) {
return;
}
accessibility = IAccessRule.K_DISCOURAGED;
break;
}
}
}
int relevance = computeBaseRelevance();
relevance += computeRelevanceForInterestingProposal();
relevance += computeRelevanceForCaseMatching(refBinding.sourceName, refBinding.sourceName);
relevance += computeRelevanceForExpectingType(refBinding);
relevance += computeRelevanceForQualification(false);
relevance += computeRelevanceForRestrictions(accessibility); // no access restriction for type in the current unit
if ( !this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
createTypeProposal(refBinding, [[#variable753af5a0]], [[#variable753af580]], CharOperation.NO_CHAR, relevance);
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#526f9140]] | {
return;
} |
| 1 | 2 | [[#526f9140]] | return; |
| 2 | 1 | [[#753af5a0]] | typeName |
| 2 | 2 | [[#753af5a0]] | refBinding.qualifiedSourceName() |
| 3 | 1 | [[#753af580]] | accessibility |
| 3 | 2 | [[#753af580]] | IAccessRule.K_ACCESSIBLE |