CloneSet1255


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
16201.000class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11644
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaContextType.java
216175
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaContextType.java
Clone Instance
1
Line Count
16
Source Line
44
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaContextType.java

                /*
                 * @see org.eclipse.jface.text.templates.TemplateVariableResolver#resolve(org.eclipse.jface.text.templates.TemplateVariable, org.eclipse.jface.text.templates.TemplateContext)
                 */
                public void resolve(TemplateVariable variable, TemplateContext context) {
                        if (variable instanceof MultiVariable) {
                                JavaContext jc = (JavaContext) context;
                                MultiVariable mv = (MultiVariable) variable;
                                String[] bindings = resolveAll(context);
                                if (bindings.length > 0) {
                                        mv.setValues(bindings);
                                        MultiVariableGuess guess = new MultiVariableGuess(mv);
                                        jc.setMultiVariableGuess(guess);
                                }
                                if (bindings.length > 1)
                                        variable.setUnambiguous(false);
                                else
                                        variable.setUnambiguous(isUnambiguous(context));
                        }
                        else    super.resolve(variable, context);
                }


Clone Instance
2
Line Count
16
Source Line
175
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaContextType.java

                /*
                 * @see org.eclipse.jface.text.templates.TemplateVariableResolver#resolve(org.eclipse.jface.text.templates.TemplateVariable, org.eclipse.jface.text.templates.TemplateContext)
                 */
                public void resolve(TemplateVariable variable, TemplateContext context) {
                        if (variable instanceof MultiVariable) {
                                JavaContext jc = (JavaContext) context;
                                MultiVariable mv = (MultiVariable) variable;
                                String[] bindings = resolveAll(context);
                                if (bindings.length > 0) {
                                        mv.setValues(bindings);
                                        MultiVariableGuess guess = new MultiVariableGuess(mv);
                                        jc.setMultiVariableGuess(guess);
                                }
                                if (bindings.length > 1)
                                        variable.setUnambiguous(false);
                                else
                                        variable.setUnambiguous(isUnambiguous(context));
                        }
                        else    super.resolve(variable, context);
                }


Clone AbstractionParameter Count: 0Parameter Bindings

/*
                 * @see org.eclipse.jface.text.templates.TemplateVariableResolver#resolve(org.eclipse.jface.text.templates.TemplateVariable, org.eclipse.jface.text.templates.TemplateContext)
                 */
public void resolve(TemplateVariable variable, TemplateContext context) {
  if (variable instanceof MultiVariable) {
    JavaContext jc = (JavaContext) context;
    MultiVariable mv = (MultiVariable) variable;
    String[] bindings = resolveAll(context);
    if (bindings.length > 0) {
      mv.setValues(bindings);
      MultiVariableGuess guess = new MultiVariableGuess(mv);
      jc.setMultiVariableGuess(guess);
    }
    if (bindings.length > 1)
      variable.setUnambiguous(false);
    else
      variable.setUnambiguous(isUnambiguous(context));
  }
  else
    super.resolve(variable, context);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None