this.wrap = wrap;
hardWrap = wrap.equals("hard");
if(displayManager != null && !bufferChanging)
{
displayManager.firstLine.callReset = true;
displayManager.scrollLineCount.callReset = true;
}
invalidateCachedScreenLineCounts = true;
this.maxLineLen = maxLineLen;
if(displayManager != null && !bufferChanging)
{
displayManager.firstLine.callReset = true;
displayManager.scrollLineCount.callReset = true;
}
invalidateCachedScreenLineCounts = true;
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 propertiesChanged()
|
|
Method name: void propertiesChanged()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 5
|
|
1 | this.wrap = wrap;↵ | | 1 | this.↵
|
2 | hardWrap = wrap.equals("hard");↵ | | 2 | maxLineLen = maxLineLen;↵
|
3 | if(displayManager != null && !bufferChanging)↵ | | 3 | if(displayManager != null && !bufferChanging)↵
|
4 | {↵ | | 4 | {↵
|
5 | displayManager.firstLine.callReset = true;↵ | | 5 | displayManager.firstLine.callReset = true;↵
|
6 | displayManager.scrollLineCount.callReset = true;↵ | | 6 | displayManager.scrollLineCount.callReset = true;↵
|
7 | }↵ | | 7 | }↵
|
8 | invalidateCachedScreenLineCounts = true; | | 8 | invalidateCachedScreenLineCounts = true;
|
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 16 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.6 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
12 | this.wrap = wrap; | | | |
13 | hardWrap = wrap.equals("hard"); | | | |
| | | 20 | this.maxLineLen = maxLineLen; |
14 | if (displayManager != null && !bufferChanging) | | 21 | if (displayManager != null && !bufferChanging) |
15 | displayManager.firstLine.callReset = true; | | 22 | displayManager.firstLine.callReset = true; |
16 | displayManager.scrollLineCount.callReset = true; | | 23 | displayManager.scrollLineCount.callReset = true; |
17 | invalidateCachedScreenLineCounts = true; | | 24 | invalidateCachedScreenLineCounts = true; |
Precondition Violations (0)
Row |
Violation |