for (int i = 0; i < _out.size(); i++) {
if (_out.get(i) == true) {
count++;
buf.append(' ').append(i);
if (count % 10 == 0)
buf.append("\t\n");
}
}
for (int i = 0; i < _in.size(); i++) {
if (_in.get(i) == true) {
count++;
buf.append(' ').append(i);
if (count % 10 == 0)
buf.append("\t\n");
}
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/compiler/ir/dataflow/analyses/LiveVariableNode.java
|
|
File path: /jruby-1.4.0/src/org/jruby/compiler/ir/dataflow/analyses/LiveVariableNode.java
|
Method name: String toString()
|
|
Method name: String toString()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | for (int i = 0; i < _out.size(); i++) {↵ | | 1 | for (int i = 0; i < _in.size(); i++) {↵
|
2 | if (_out.get(i) == true) {↵ | | 2 | if (_in.get(i) == true) {↵
|
3 | count++;↵ | | 3 | count++;↵
|
4 | buf.append(' ').append(i);↵ | | 4 | buf.append(' ').append(i);↵
|
5 | if (count % 10 == 0)↵ | | 5 | if (count % 10 == 0)↵
|
6 | buf.append("\t\n");↵ | | 6 | buf.append("\t\n");↵
|
7 | }↵ | | 7 | }↵
|
8 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
14 | for (int i = 0; i < _out.size(); i++) | | 4 | for (int i = 0; i < _in.size(); i++) |
15 | | | 5 | |
16 | | | 6 | |
17 | buf.append(' ').append(i); | | 7 | buf.append(' ').append(i); |
18 | | | 8 | |
19 | | | 9 | |
Precondition Violations (0)
Row |
Violation |