CloneSet492


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
36230.982statement_sequence[10]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1361896
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
2354924
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
Clone Instance
1
Line Count
36
Source Line
1896
Source File
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);
                        }


Clone Instance
2
Line Count
35
Source Line
4924
Source File
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, refBinding.qualifiedSourceName(), IAccessRule.K_ACCESSIBLE, CharOperation.NO_CHAR, relevance);
                        }


Clone AbstractionParameter Count: 3Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#526f9140]]
{
  return;
} 
12[[#526f9140]]
return; 
21[[#753af5a0]]
typeName 
22[[#753af5a0]]
refBinding.qualifiedSourceName() 
31[[#753af580]]
accessibility 
32[[#753af580]]
IAccessRule.K_ACCESSIBLE