super();
addListSelectionListener(this);
dropTarget = new DropTarget(this, this);
dragSource = DragSource.getDefaultDragSource();
if (acceptDrop == true) {
dragSource.createDefaultDragGestureRecognizer(this,
DnDConstants.ACTION_COPY_OR_MOVE, this);
} else {
dragSource.createDefaultDragGestureRecognizer(this,
DnDConstants.ACTION_COPY, this);
}
super();
addListSelectionListener(this);
dropTarget = new DropTarget(this, this);
dragSource = DragSource.getDefaultDragSource();
if (acceptDrop == true) {
dragSource.createDefaultDragGestureRecognizer(this,
DnDConstants.ACTION_COPY_OR_MOVE, this);
} else {
dragSource.createDefaultDragGestureRecognizer(this,
DnDConstants.ACTION_COPY, this);
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/list/AddressbookDNDListView.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/contact/list/ContactDNDListView.java
|
Method name: void AddressbookDNDListView()
|
|
Method name: void ContactDNDListView()
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | super();↵ | | 1 | super();↵
|
|
2 | addListSelectionListener(this);↵ | | 2 | addListSelectionListener(this);↵
|
|
3 | dropTarget = new DropTarget(this, this);↵ | | 3 | dropTarget = new DropTarget(this, this);↵
|
4 | dragSource = DragSource.getDefaultDragSource();↵ | | 4 | dragSource = DragSource.getDefaultDragSource();↵
|
|
5 | if (acceptDrop == true) {↵ | | 5 | if (acceptDrop == true) {↵
|
6 | dragSource.createDefaultDragGestureRecognizer(this,↵ | | 6 | dragSource.createDefaultDragGestureRecognizer(this,↵
|
7 | DnDConstants.ACTION_COPY_OR_MOVE, this);↵ | | 7 | DnDConstants.ACTION_COPY_OR_MOVE, this);↵
|
8 | } else {↵ | | 8 | } else {↵
|
9 | dragSource.createDefaultDragGestureRecognizer(this,↵ | | 9 | dragSource.createDefaultDragGestureRecognizer(this,↵
|
10 | DnDConstants.ACTION_COPY, this);↵ | | 10 | DnDConstants.ACTION_COPY, this);↵
|
11 | } | | 11 | }
|
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 16 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super(); | | 1 | super(); |
2 | addListSelectionListener(this); | | 2 | addListSelectionListener(this); |
3 | dropTarget = new DropTarget(this, this); | | 3 | dropTarget = new DropTarget(this, this); |
4 | dragSource = DragSource.getDefaultDragSource(); | | 4 | dragSource = DragSource.getDefaultDragSource(); |
5 | if (acceptDrop == true) | | 5 | if (acceptDrop == true) |
6 | dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY_OR_MOVE, this); | | 6 | dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY_OR_MOVE, this); |
| | | | |
7 | dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, this); | | 7 | dragSource.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, this); |
Precondition Violations (0)
Row |
Violation |