extraEndVirt = (int)(
(x - dragStartLineWidth)
/ charWidth);
if(!getPainter().isBlockCaretEnabled()
&& !isOverwriteEnabled()
&& (x - getHorizontalOffset()) % charWidth > charWidth / 2)
{
extraEndVirt++;
}
extraEndVirt = (int)((x - dotLineWidth) / charWidth);
if(!getPainter().isBlockCaretEnabled()
&& !isOverwriteEnabled()
&& (x - getHorizontalOffset()) % charWidth > charWidth / 2)
extraEndVirt++;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/JEditTextArea.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/JEditTextArea.java
|
Method name: void doSingleClick(MouseEvent)
|
|
Method name: void doSingleDrag(MouseEvent)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | extraEndVirt = (int)(↵ | | 1 | extraEndVirt = (int)(↵
|
2 | (x - dragStartLineWidth)↵ | | 2 | (x - dotLineWidth)↵
|
3 | / charWidth);↵ | | 3 | / charWidth);↵
|
4 | if(!getPainter().isBlockCaretEnabled()↵ | | 4 | if(!getPainter().isBlockCaretEnabled()↵
|
5 | && !isOverwriteEnabled()↵ | | 5 | && !isOverwriteEnabled()↵
|
6 | && (x - getHorizontalOffset()) % charWidth > charWidth / 2)↵ | | 6 | && (x - getHorizontalOffset()) % charWidth > charWidth / 2)↵
|
7 | {↵ | | 7 | ↵
|
8 | extraEndVirt++;↵ | | 8 | extraEndVirt++;
|
9 | } | | | |
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 6 |
-
{Refactorable}
Mapping Summary
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) | 1.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
6 | extraEndVirt = (int)((x - dragStartLineWidth) / charWidth); | | 14 | extraEndVirt = (int)((x - dotLineWidth) / charWidth); |
7 | if (!getPainter().isBlockCaretEnabled() && !isOverwriteEnabled() && (x - getHorizontalOffset()) % charWidth > charWidth / 2) | | 15 | if (!getPainter().isBlockCaretEnabled() && !isOverwriteEnabled() && (x - getHorizontalOffset()) % charWidth > charWidth / 2) |
8 | | | 16 | |
Precondition Violations (0)
Row |
Violation |