File path: /jEdit-4.2/src/bsh/NameSpace.java | File path: /jEdit-4.2/src/bsh/NameSpace.java | |||
Method name: int getInvocationLine()
|
Method name: String getInvocationText()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | SimpleNode node = getNode();↵ | 1 | SimpleNode node = getNode();↵ | |
2 | if ( node != null )↵ | 2 | if ( node != null )↵ | |
3 | return node.getLineNumber();↵ | 3 | return node.getText();↵ | |
4 | else↵ | 4 | else↵ | |
5 | return -1; | 5 | return "<invoked from Java code>"; | |
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 | 10 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
1 | SimpleNode node = getNode(); | 1 | SimpleNode node = getNode(); | |||||
2 | if (node != null) | 2 | if (node != null) | |||||
|
| 3 | return node.getText(); | |||||
3 | return node.getLineNumber(); |
| | |||||
else | | |||||||
|
| 4 | return "<invoked from Java code>"; | |||||
4 | return -1; |
| |
Row | Violation |
---|---|
1 | Unmatched statement return node.getText(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched return node.getText(); |
3 | Unmatched statement return node.getLineNumber(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched return node.getLineNumber(); |
5 | Unmatched return "<invoked from Java code>"; |
6 | Unmatched return -1; |