File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/PresentSelector.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/ContainsSelector.java | |||
Method name: String toString()
|
Method name: String toString()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 1 | |||
1 | /** | 1 | /** | |
2 | * @return a string describing this object | 2 | * @return a string describing this object | |
3 | */ | 3 | */ | |
4 | public String toString() { | 4 | public String toString() { | |
5 | StringBuffer buf = new StringBuffer("{presentselector targetdir: "); | 5 | StringBuffer buf = new StringBuffer("{containsselector text: "); | |
6 | if (targetdir == null) { | 6 | buf.append('"').append(contains).append('"'); | |
7 | buf.append("NOT YET SET"); | 7 | buf.append(" casesensitive: "); | |
8 | } else { | 8 | buf.append(casesensitive ? "true" : "false"); | |
9 | buf.append(targetdir.getName()); | 9 | buf.append(" ignorewhitespace: "); | |
10 | } | 10 | buf.append(ignorewhitespace ? "true" : "false"); | |
11 | buf.append(" present: "); | 11 | buf.append("}"); | |
12 | if (destmustexist) { | 12 | return buf.toString(); | |
13 | buf.append("both"); | 13 | } | |
14 | } else { | |||
15 | buf.append("srconly"); | |||
16 | } | |||
17 | if (map != null) { | |||
18 | buf.append(map.toString()); | |||
19 | } else if (mapperElement != null) { | |||
20 | buf.append(mapperElement.toString()); | |||
21 | } | |||
22 | buf.append("}"); | |||
23 | return buf.toString(); | |||
24 | } | |||
See real code fragment | See real code fragment |
Number of mapped statements | 3 |
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) | 0.0 |
Similarity Score | 1.000 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | if (destmustexist) |
| 4 | buf.append(casesensitive ? "true" : "false"); | ||||||||||||||||
7 | buf.append("both"); |
| | |||||||||||||||||
else | | |||||||||||||||||||
8 | buf.append("srconly"); |
| |
Row | Violation |
---|