Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
26 | 2 | 2 | 0.984 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 26 | 376 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/LazyJavaCompletionProposal.java |
2 | 26 | 335 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/CompletionProposalCollector.java |
| ||||
protected int computeRelevance() { final int baseRelevance = fProposal.getRelevance() * 16; switch (fProposal.getKind()) { case CompletionProposal.PACKAGE_REF: return baseRelevance + 0; case CompletionProposal.LABEL_REF: return baseRelevance + 1; case CompletionProposal.KEYWORD: return baseRelevance + 2; case CompletionProposal.TYPE_REF: case CompletionProposal.ANONYMOUS_CLASS_DECLARATION: return baseRelevance + 3; case CompletionProposal.METHOD_REF: case CompletionProposal.METHOD_NAME_REFERENCE: case CompletionProposal.METHOD_DECLARATION: case CompletionProposal.ANNOTATION_ATTRIBUTE_REF: return baseRelevance + 4; case CompletionProposal.POTENTIAL_METHOD_DECLARATION: return baseRelevance + 4 /* + 99 */ ; case CompletionProposal.FIELD_REF: return baseRelevance + 5; case CompletionProposal.LOCAL_VARIABLE_REF: case CompletionProposal.VARIABLE_DECLARATION: return baseRelevance + 6; default: return baseRelevance; } } |
| ||||
/** * Computes the relevance for a given <code>CompletionProposal</code>. * <p> * Subclasses may replace, but usually should not need to. * </p> * @param proposal the proposal to compute the relevance for * @return the relevance for <code>proposal</code> */ protected int computeRelevance(CompletionProposal proposal) { final int baseRelevance = proposal.getRelevance() * 16; switch (proposal.getKind()) { case CompletionProposal.PACKAGE_REF: return baseRelevance + 0; case CompletionProposal.LABEL_REF: return baseRelevance + 1; case CompletionProposal.KEYWORD: return baseRelevance + 2; case CompletionProposal.TYPE_REF: case CompletionProposal.ANONYMOUS_CLASS_DECLARATION: return baseRelevance + 3; case CompletionProposal.METHOD_REF: case CompletionProposal.METHOD_NAME_REFERENCE: case CompletionProposal.METHOD_DECLARATION: case CompletionProposal.ANNOTATION_ATTRIBUTE_REF: return baseRelevance + 4; case CompletionProposal.POTENTIAL_METHOD_DECLARATION: return baseRelevance + 4 /* + 99 */ ; case CompletionProposal.FIELD_REF: return baseRelevance + 5; case CompletionProposal.LOCAL_VARIABLE_REF: case CompletionProposal.VARIABLE_DECLARATION: return baseRelevance + 6; default: return baseRelevance; } } |
| |||
/** * Computes the relevance for a given <code>CompletionProposal</code>. * <p> * Subclasses may replace, but usually should not need to. * </p> * @param proposal the proposal to compute the relevance for * @return the relevance for <code>proposal</code> */ protected int computeRelevance [[#variable642ef720]]{ final int baseRelevance = [[#variable642ef3a0]].getRelevance() * 16; switch ( [[#variable642ef3a0]].getKind()) { case CompletionProposal.PACKAGE_REF: return baseRelevance + 0; case CompletionProposal.LABEL_REF: return baseRelevance + 1; case CompletionProposal.KEYWORD: return baseRelevance + 2; case CompletionProposal.TYPE_REF: case CompletionProposal.ANONYMOUS_CLASS_DECLARATION: return baseRelevance + 3; case CompletionProposal.METHOD_REF: case CompletionProposal.METHOD_NAME_REFERENCE: case CompletionProposal.METHOD_DECLARATION: case CompletionProposal.ANNOTATION_ATTRIBUTE_REF: return baseRelevance + 4; case CompletionProposal.POTENTIAL_METHOD_DECLARATION: return baseRelevance + 4 /* + 99 */ ; case CompletionProposal.FIELD_REF: return baseRelevance + 5; case CompletionProposal.LOCAL_VARIABLE_REF: case CompletionProposal.VARIABLE_DECLARATION: return baseRelevance + 6; default: return baseRelevance; } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#642ef720]] | (CompletionProposal proposal) |
1 | 2 | [[#642ef720]] | () |
2 | 1 | [[#642ef3a0]] | proposal |
2 | 2 | [[#642ef3a0]] | fProposal |