CloneSet666


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
16250.973class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1162830
plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
2162854
plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
Clone Instance
1
Line Count
16
Source Line
2830
Source File
plugins/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java

        /**
         * Method parseIntValue.
         * @param token
         */
        private int parseIntValue(String token) {
                int tokenLength = token.length();
                if (tokenLength < 10) {
                        // Integer.decode can handle tokens with less than 10 digits
                        return Integer.decode(token).intValue();
                }
                switch (getBase(token)) {
                        case 8:
                                return (Integer.decode(token.substring(0, tokenLength - 1)).intValue() << 3)|  Integer.decode("0" + token.charAt(tokenLength - 1)).intValue(); //$NON-NLS-1$
                        case 10:
                                return Integer.decode(token).intValue();
                        case 16:
                                return (Integer.decode(token.substring(0, tokenLength - 1)).intValue() << 4)|  Integer.decode("0x" + token.charAt(tokenLength - 1)).intValue(); //$NON-NLS-1$
                        default:
                                // getBase(String) only returns 8, 10, or 16. This code is unreachable
                                return 0;
                      }
        }


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

        /**
         * Method parseLongValue.
         * @param token
         */
        private long parseLongValue(String token) {
                int tokenLength = token.length();
                if (tokenLength < 18) {
                        // Long.decode can handle tokens with less than 18 digits
                        return Long.decode(token).longValue();
                }
                switch (getBase(token)) {
                        case 8:
                                return (Long.decode(token.substring(0, tokenLength - 1)).longValue() << 3)|  Long.decode("0" + token.charAt(tokenLength - 1)).longValue(); //$NON-NLS-1$
                        case 10:
                                return Long.decode(token).longValue();
                        case 16:
                                return (Long.decode(token.substring(0, tokenLength - 1)).longValue() << 4)|  Long.decode("0x" + token.charAt(tokenLength - 1)).longValue(); //$NON-NLS-1$
                        default:
                                // getBase(String) only returns 8, 10, or 16. This code is unreachable
                                return 0;
                      }
        }


Clone AbstractionParameter Count: 5Parameter Bindings

/**
         * Method parseIntValue.
         * @param token
         */
/**
         * Method parseLongValue.
         * @param token
         */
private [[#variableb6993a40]]  [[#variableb6993960]](String token) {
  int tokenLength = token.length();
  if (tokenLength <  [[#variableb69938c0]]) {
    // Integer.decode can handle tokens with less than 10 digits
    // Long.decode can handle tokens with less than 18 digits
    return [[#variableb6993820]].decode(token). [[#variableb69938a0]]();
  }
  switch (getBase(token)) {
    case 8:
      return ( [[#variableb6993820]].decode(token.substring(0, tokenLength - 1)). [[#variableb69938a0]]() << 3)| [[#variableb6993820]].decode("0" + token.charAt(tokenLength - 1)). [[#variableb69938a0]](); //$NON-NLS-1$
    case 10:
      return [[#variableb6993820]].decode(token). [[#variableb69938a0]]();
    case 16:
      return ( [[#variableb6993820]].decode(token.substring(0, tokenLength - 1)). [[#variableb69938a0]]() << 4)| [[#variableb6993820]].decode("0x" + token.charAt(tokenLength - 1)). [[#variableb69938a0]](); //$NON-NLS-1$
    default:
      // getBase(String) only returns 8, 10, or 16. This code is unreachable
      return 0;
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b6993a40]]
int 
12[[#b6993a40]]
long 
21[[#b6993960]]
parseIntValue 
22[[#b6993960]]
parseLongValue 
31[[#b69938c0]]
10 
32[[#b69938c0]]
18 
41[[#b6993820]]
Integer 
42[[#b6993820]]
Long 
51[[#b69938a0]]
intValue 
52[[#b69938a0]]
longValue