BigInteger result = value.add(BigInteger.valueOf(other)); if (other > 0 && value.signum() > 0) return new RubyBignum(getRuntime(), result); return bignorm(getRuntime(), result);
BigInteger result = value.subtract(BigInteger.valueOf(other)); if (value.signum() < 0 && other > 0) return new RubyBignum(getRuntime(), result); return bignorm(getRuntime(), result);
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 addFixnum(long) Method name: IRubyObject subtractFixnum(long)
Number of AST nodes: 4 Number of AST nodes: 4
1
BigInteger result = value.add(BigInteger.valueOf(other));
1
BigInteger result = value.subtract(BigInteger.valueOf(other));
2
        if (other > 0 && value.signum() > 0) return new RubyBignum(getRuntime(), result);
2
        if (value.signum() < 0 && other > 0) return new RubyBignum(getRuntime(), result);
3
        return bignorm(getRuntime(), result);
3
        return bignorm(getRuntime(), result);
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.1
Clones locationClones are declared in the same class
Number of node comparisons1