int l = StringSupport.preciseLength(enc, tr.buf, tr.p, tr.pend);
if (enc.mbcToCode(tr.buf, tr.p, tr.pend) == '^') {
cflag = true;
tr.p += l;
}
int cl = StringSupport.preciseLength(enc, trSrc.buf, trSrc.p, trSrc.pend);
if (enc.mbcToCode(trSrc.buf, trSrc.p, trSrc.pend) == '^' && trSrc.p + cl < trSrc.pend) {
cflag = true;
trSrc.p += cl;
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyString.java
|
|
File path: /jruby-1.4.0/src/org/jruby/RubyString.java
|
Method name: TrTables trSetupTable(Ruby, boolean[], TrTables, boolean, Encoding)
|
|
Method name: IRubyObject trTrans19(ThreadContext, IRubyObject, IRubyObject, boolean)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | int l = StringSupport.preciseLength(enc, tr.buf, tr.p, tr.pend);↵ | | 1 | int cl = StringSupport.preciseLength(enc, trSrc.buf, trSrc.p, trSrc.pend);↵
|
2 | if (enc.mbcToCode(tr.buf, tr.p, tr.pend) == '^') {↵ | | 2 | if (enc.mbcToCode(trSrc.buf, trSrc.p, trSrc.pend) == '^' && trSrc.p + cl < trSrc.pend) {↵
|
3 | cflag = true;↵ | | 3 | cflag = true;↵
|
4 | tr.p += l;↵ | | 4 | trSrc.p += cl;↵
|
5 | } | | 5 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 1 |