CloneSet231


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
42201.000statement_sequence[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1422704
plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
2423387
plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
Clone Instance
1
Line Count
42
Source Line
2704
Source File
plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java

                List arguments = node.arguments();
                int argCount = arguments.size();
                if (methodBinding.isVarargs() && !(paramCount == argCount && parameterTypes[paramCount - 1].getDimensions() == ((Expression) arguments.get(argCount - 1)).resolveTypeBinding().getDimensions())) {
                        // if this method is a varargs, and if the method is invoked using the varargs syntax
                        // (multiple arguments) and not an array
                        Iterator iterator = arguments.iterator();
                        // process the first arguments (no part of the var argument)
                        for (int i = 0; i < paramCount - 1; i++) {
                                Expression argument = (Expression) iterator.next();
                                boolean storeRequired = checkAutoBoxing(argument.resolveTypeBinding(), parameterTypes[i]);
                                argument.accept(this );
                                if (storeRequired) {
                                        storeInstruction();
                                }
                        }
                        // create a array of the remainder arguments
                        ITypeBinding varargsParameterType = parameterTypes[paramCount - 1];
                        ITypeBinding varargsElementType = varargsParameterType.getElementType();
                        push(new ArrayInitializerInstruction(getTypeSignature(varargsElementType), argCount - paramCount + 1, varargsParameterType.getDimensions(), fCounter));
                        while (iterator.hasNext()) {
                                Expression argument = (Expression) iterator.next();
                                boolean storeRequired = checkAutoBoxing(argument.resolveTypeBinding(), varargsElementType);
                                argument.accept(this );
                                if (storeRequired) {
                                        storeInstruction();
                                }
                        }
                        storeInstruction();
                }
                else   {
                        Iterator iterator = arguments.iterator();
                        int i = 0;
                        while (iterator.hasNext()) {
                                Expression argument = (Expression) iterator.next();
                                boolean storeRequired = checkAutoBoxing(argument.resolveTypeBinding(), parameterTypes[i++ ]);
                                argument.accept(this );
                                if (storeRequired) {
                                        storeInstruction();
                                }
                        }
                }
                return false;


Clone Instance
2
Line Count
42
Source Line
3387
Source File
plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java

                List arguments = node.arguments();
                int argCount = arguments.size();
                if (methodBinding.isVarargs() && !(paramCount == argCount && parameterTypes[paramCount - 1].getDimensions() == ((Expression) arguments.get(argCount - 1)).resolveTypeBinding().getDimensions())) {
                        // if this method is a varargs, and if the method is invoked using the varargs syntax
                        // (multiple arguments) and not an array
                        Iterator iterator = arguments.iterator();
                        // process the first arguments (no part of the var argument)
                        for (int i = 0; i < paramCount - 1; i++) {
                                Expression argument = (Expression) iterator.next();
                                boolean storeRequired = checkAutoBoxing(argument.resolveTypeBinding(), parameterTypes[i]);
                                argument.accept(this );
                                if (storeRequired) {
                                        storeInstruction();
                                }
                        }
                        // create a array of the remainder arguments
                        ITypeBinding varargsParameterType = parameterTypes[paramCount - 1];
                        ITypeBinding varargsElementType = varargsParameterType.getElementType();
                        push(new ArrayInitializerInstruction(getTypeSignature(varargsElementType), argCount - paramCount + 1, varargsParameterType.getDimensions(), fCounter));
                        while (iterator.hasNext()) {
                                Expression argument = (Expression) iterator.next();
                                boolean storeRequired = checkAutoBoxing(argument.resolveTypeBinding(), varargsElementType);
                                argument.accept(this );
                                if (storeRequired) {
                                        storeInstruction();
                                }
                        }
                        storeInstruction();
                }
                else   {
                        Iterator iterator = arguments.iterator();
                        int i = 0;
                        while (iterator.hasNext()) {
                                Expression argument = (Expression) iterator.next();
                                boolean storeRequired = checkAutoBoxing(argument.resolveTypeBinding(), parameterTypes[i++ ]);
                                argument.accept(this );
                                if (storeRequired) {
                                        storeInstruction();
                                }
                        }
                }
                return false;


Clone AbstractionParameter Count: 0Parameter Bindings

List arguments = node.arguments();
int argCount = arguments.size();
if (methodBinding.isVarargs() && !(paramCount == argCount && parameterTypes[paramCount - 1].getDimensions() == ((Expression) arguments.get(argCount - 1)).resolveTypeBinding().getDimensions())) {
  // if this method is a varargs, and if the method is invoked using the varargs syntax
  // (multiple arguments) and not an array
  Iterator iterator = arguments.iterator();
  // process the first arguments (no part of the var argument)
  for (int i = 0; i < paramCount - 1; i++) {
    Expression argument = (Expression) iterator.next();
    boolean storeRequired = checkAutoBoxing(argument.resolveTypeBinding(), parameterTypes[i]);
    argument.accept(this );
    if (storeRequired) {
      storeInstruction();
    }
  }
  // create a array of the remainder arguments
  ITypeBinding varargsParameterType = parameterTypes[paramCount - 1];
  ITypeBinding varargsElementType = varargsParameterType.getElementType();
  push(new ArrayInitializerInstruction(getTypeSignature(varargsElementType), argCount - paramCount + 1, varargsParameterType.getDimensions(), fCounter));
  while (iterator.hasNext()) {
    Expression argument = (Expression) iterator.next();
    boolean storeRequired = checkAutoBoxing(argument.resolveTypeBinding(), varargsElementType);
    argument.accept(this );
    if (storeRequired) {
      storeInstruction();
    }
  }
  storeInstruction();
}
else {
  Iterator iterator = arguments.iterator();
  int i = 0;
  while (iterator.hasNext()) {
    Expression argument = (Expression) iterator.next();
    boolean storeRequired = checkAutoBoxing(argument.resolveTypeBinding(), parameterTypes[i++ ]);
    argument.accept(this );
    if (storeRequired) {
      storeInstruction();
    }
  }
}
return false;
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None