Document doc = event.getDocument();
try {
lastFilter = doc.getText(0, doc.getLength());
filter(lastFilter);
} catch (BadLocationException ble) {
System.err.println("Bad location: " + ble);
}
Document doc = event.getDocument();
try {
lastFilter = doc.getText(0, doc.getLength());
filter(lastFilter);
} catch (BadLocationException ble) {
System.err.println("Bad location: " + ble);
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/box/FilteringModel.java
|
|
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/box/FilteringModel.java
|
Method name: void removeUpdate(DocumentEvent)
|
|
Method name: void insertUpdate(DocumentEvent)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | Document doc = event.getDocument();↵ | | 1 | Document doc = event.getDocument();↵
|
2 | try {↵ | | 2 | try {↵
|
3 | lastFilter = doc.getText(0, doc.getLength());↵ | | 3 | lastFilter = doc.getText(0, doc.getLength());↵
|
4 | filter(lastFilter);↵ | | 4 | filter(lastFilter);↵
|
5 | } catch (BadLocationException ble) {↵ | | 5 | } catch (BadLocationException ble) {↵
|
6 | System.err.println("Bad location: " + ble);↵ | | 6 | System.err.println("Bad location: " + ble);↵
|
7 | } | | 7 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | Document doc = event.getDocument(); | | 1 | Document doc = event.getDocument(); |
2 | try | | 2 | try |
3 | lastFilter = doc.getText(0, doc.getLength()); | | 3 | lastFilter = doc.getText(0, doc.getLength()); |
4 | | | 4 | |
Precondition Violations (0)
Row |
Violation |