int readCount = reader.read(characters);
if (readCount > 0)
{
writer.write(characters, 0, readCount);
}
count = 0;
index = 0;
pos = 0;
write(b);
int readCount = reader.read(characters);
if (readCount > 0)
{
writer.write(characters, 0, readCount);
}
count = 0;
index = 0;
pos = 0;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/URIConverter.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/URIConverter.java
|
Method name: void write(int)
|
|
Method name: void flush()
|
Number of AST nodes: 7
|
|
Number of AST nodes: 6
|
|
1 | int readCount = reader.read(characters);↵ | | 1 | int readCount = reader.read(characters);↵
|
2 | if (readCount > 0)↵ | | 2 | if (readCount > 0)↵
|
3 | {↵ | | 3 | ↵
|
4 | ↵ | | 4 | {↵
|
5 | writer.write(characters, 0, readCount);↵ | | 5 | writer.write(characters, 0, readCount);↵
|
6 | }↵ | | 6 | }↵
|
7 | count = 0;↵ | | 7 | count = 0;↵
|
8 | index = 0;↵ | | 8 | index = 0;↵
|
9 | pos = 0;↵ | | 9 | pos = 0;
|
10 | write(b); | | | |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 18 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | int readCount = reader.read(characters); | | 1 | int readCount = reader.read(characters); |
4 | if (readCount > 0) | | 2 | if (readCount > 0) |
5 | writer.write(characters, 0, readCount); | | 3 | writer.write(characters, 0, readCount); |
6 | count = 0; | | 4 | count = 0; |
7 | index = 0; | | 5 | index = 0; |
8 | pos = 0; | | 6 | pos = 0; |
9 | write(b); | | | |
Precondition Violations (0)
Row |
Violation |