Parameter[] params = getParameters();
if (params != null) {
for (int i = 0; i < params.length; i++) {
if (COMMENTS_KEY.equals(params[i].getType())) {
comments.addElement(params[i].getValue());
}
}
}
if (params != null) {
for (int i = 0; i < params.length; i++) {
if (CONTAINS_KEY.equals(params[i].getType())) {
contains.addElement(params[i].getValue());
} else if (NEGATE_KEY.equals(params[i].getType())) {
setNegate(Project.toBoolean(params[i].getValue()));
}
}
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/filters/StripLineComments.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/filters/LineContains.java
|
Method name: void initialize()
|
|
Method name: void initialize()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 6
|
|
1 | Parameter[] params = getParameters();↵ | | |
|
2 | if (params != null) {↵ | | 1 | if (params != null) {↵
|
3 | for (int i = 0; i < params.length; i++) {↵ | | 2 | for (int i = 0; i < params.length; i++) {↵
|
4 | if (COMMENTS_KEY.equals(params[i].getType())) {↵ | | 3 | if (CONTAINS_KEY.equals(params[i].getType())) {↵
|
5 | comments.addElement(params[i].getValue());↵ | | 4 | contains.addElement(params[i].getValue());↵
|
| | | 5 | } else if (NEGATE_KEY.equals(params[i].getType())) {↵
|
| | | 6 | setNegate(Project.toBoolean(params[i].getValue()));↵
|
6 | }↵ | | 7 | }↵
|
7 | }↵ | | 8 | }↵
|
8 | } | | 9 | }
|
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 in different classes having the same super class |
Number of node comparisons | 2 |