other = other.convertToInteger(); if (other instanceof RubyBignum) { return bignorm(getRuntime(), value.and(((RubyBignum) other).value)); } else if (other instanceof RubyFixnum) { return bignorm(getRuntime(), value.and(fix2big((RubyFixnum)other))); } return coerceBin(context, "&", other);
other = other.convertToInteger(); if (other instanceof RubyBignum) { return bignorm(getRuntime(), value.xor(((RubyBignum) other).value)); } if (other instanceof RubyFixnum) { return bignorm(getRuntime(), value.xor(BigInteger.valueOf(((RubyFixnum) other).getLongValue()))); } return coerceBin(context, "^", other);
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyBignum.java File path: /jruby-1.4.0/src/org/jruby/RubyBignum.java
Method name: IRubyObject op_and(ThreadContext, IRubyObject) Method name: IRubyObject op_xor(ThreadContext, IRubyObject)
Number of AST nodes: 6 Number of AST nodes: 6
1
other = other.convertToInteger();
1
other = other.convertToInteger();
2
        if (other instanceof RubyBignum) {
2
        if (other instanceof RubyBignum) {
3
            return bignorm(getRuntime(), value.and(((RubyBignum) other).value));
3
            return bignorm(getRuntime(), value.xor(((RubyBignum) other).value));
4
        } else
4
        }
5
 if (other instanceof RubyFixnum) {
5
        if (other instanceof RubyFixnum) {
6
            return bignorm(getRuntime(), value.and(fix2big((RubyFixnum)other)));
6
            return bignorm(getRuntime(), value.xor(BigInteger.valueOf(((RubyFixnum) other).getLongValue())));
7
        }
7
        }
8
        return coerceBin(context, "&", other);
8
        return coerceBin(context, "^", other);
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are declared in the same class
Number of node comparisons4