File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/parser/XCSDocumentParser.java | File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/parser/XCSDocumentParser.java | |||
Method name: void set(String, String)
|
Method name: String get(String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | Element child = getParentElement().getChild(key);↵ | 1 | Element child = getParentElement().getChild(key);↵ | |
2 | if (child == null) {↵ | 2 | if (child == null) {↵ | |
3 | child = new Element(key);↵ | 3 | child = new Element(key);↵ | |
4 | getParentElement().addContent(child);↵ | 4 | getParentElement().addContent(child);↵ | |
5 | }↵ | 5 | }↵ | |
6 | child.setText(value); | 6 | return child.getTextNormalize(); | |
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 declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 4 |
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) | 1.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
1 | Element child = getParentElement().getChild(key); | 1 | Element child = getParentElement().getChild(key); | |||||
2 | if (child == null) | 2 | if (child == null) | |||||
3 | child = new Element(key); | 3 | child = new Element(key); | |||||
4 | getParentElement().addContent(child); | 4 | getParentElement().addContent(child); | |||||
|
| 5 | return child.getTextNormalize(); | |||||
5 | child.setText(value); |
| |
Row | Violation |
---|---|
1 | Unmatched statement return child.getTextNormalize(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched return child.getTextNormalize(); |
3 | Unmatched statement child.setText(value); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |