CrLf c = new CrLf();
c.setValue(value);
return c;
CacheName cn = new CacheName();
cn.setValue(value);
setCache(cn);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/filters/FixCrLfFilter.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
|
Method name: CrLf newInstance(String)
|
|
Method name: void useParameter(Parameter)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | CrLf c = new CrLf();↵ | | 1 | CacheName cn = new CacheName();↵
|
2 | c.setValue(value);↵ | | 2 | cn.setValue(value);↵
|
3 | return c; | | 3 | setCache(cn);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | CrLf c = new CrLf(); | | 4 | CacheName cn = new CacheName(); |
2 | c.setValue(value); | | 5 | cn.setValue(value); |
3 | return c; | | | |
| | | 6 | setCache(cn); |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variable c with type org.apache.tools.ant.filters.FixCrLfFilter.CrLf , while Clone fragment #2 returns variable cn with type org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector.CacheName |