File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resolver/ApacheCatalog.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resolver/ApacheCatalog.java | |||
Method name: void addEntry(CatalogEntry)
|
Method name: void addEntry(CatalogEntry)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 6 | |||
1 | String publicid = PublicId.↵ | 1 | if (type == URI) {↵ | |
2 | normalize(entry.getEntryArg(0));↵ | 2 | String uri = normalizeURI(entry.getEntryArg(0));↵ | |
3 | String systemid = normalizeURI(entry.getEntryArg(1));↵ | 3 | String altURI = normalizeURI(entry.getEntryArg(1));↵ | |
4 | if (resolver == null) {↵ | 4 | if (resolver == null) {↵ | |
5 | catalogManager.debug↵ | 5 | catalogManager.debug↵ | |
6 | .message(1, "Internal Error: null ApacheCatalogResolver");↵ | 6 | .message(1, "Internal Error: null ApacheCatalogResolver");↵ | |
7 | } else {↵ | 7 | } else {↵ | |
8 | resolver.addPublicEntry(publicid, systemid, base);↵ | 8 | resolver.addURIEntry(uri, altURI, base);↵ | |
9 | ↵ | 9 | }↵ | |
10 | } | 10 |
| |
See real code fragment | See real code fragment |
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 14 |
Number of mapped statements | 5 |
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 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | String publicid = PublicId.normalize(entry.getEntryArg(0)); |
| 9 | String uri = normalizeURI(entry.getEntryArg(0)); | ||||||||||||||||||||
4 | String systemid = normalizeURI(entry.getEntryArg(1)); |
| 10 | String altURI = normalizeURI(entry.getEntryArg(1)); | ||||||||||||||||||||
5 | if (resolver == null) | 11 | if (resolver == null) | |||||||||||||||||||||
6 | catalogManager.debug.message(1, "Internal Error: null ApacheCatalogResolver"); | 12 | catalogManager.debug.message(1, "Internal Error: null ApacheCatalogResolver"); | |||||||||||||||||||||
else | else | |||||||||||||||||||||||
7 | resolver.addPublicEntry(publicid, systemid, base); |
| 13 | resolver.addURIEntry(uri, altURI, base); |
Row | Violation |
---|---|
1 | Expression resolver.addPublicEntry(publicid,systemid,base) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression resolver.addURIEntry(uri,altURI,base) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression resolver.addPublicEntry(publicid,systemid,base) is a void method call, and thus it cannot be parameterized |
4 | Expression resolver.addURIEntry(uri,altURI,base) is a void method call, and thus it cannot be parameterized |