File path: /jEdit-4.2/src/org/gjt/sp/jedit/Macros.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/Java14.java | |||
Method name: void handleMessage(EBMessage)
|
Method name: void handleMessage(EBMessage)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 3 | |||
1 | BufferUpdate bmsg = (BufferUpdate)msg;↵ | 1 | EditPaneUpdate eu = (EditPaneUpdate)msg;↵ | |
2 | if(bmsg.getWhat() == BufferUpdate.CLOSED)↵ | 2 | if(eu.getWhat() == EditPaneUpdate.CREATED)↵ | |
3 | {↵ | 3 | {↵ | |
4 | if(bmsg.getBuffer() == buffer)↵ | 4 | ↵ | |
5 | stopRecording(view↵ | 5 | initTextArea(eu.getEditPane()↵ | |
6 | );↵ | 6 | .getTextArea());↵ | |
7 | } | 7 | } | |
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 35.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 6 | EditPaneUpdate eu = (EditPaneUpdate)msg; | |||||||||||||||||||||||||||
4 | if (bmsg.getBuffer() == buffer) |
| 7 | if (eu.getWhat() == EditPaneUpdate.CREATED) | |||||||||||||||||||||||||
5 | stopRecording(view); |
| 8 | initTextArea(eu.getEditPane().getTextArea()); |
Row | Violation |
---|---|
1 | Expression eu.getWhat() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Type org.gjt.sp.jedit.Buffer of variable bmsg.getBuffer() does not match with type java.lang.Object of variable eu.getWhat() |
3 | Expression bmsg cannot be unified with expression eu , because common superclass org.gjt.sp.jedit.EBMessage does not declare member(s) public org.gjt.sp.jedit.Buffer getBuffer() , public java.lang.Object getWhat() |
4 | Expression eu.getEditPane().getTextArea() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression stopRecording(view) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression initTextArea(eu.getEditPane().getTextArea()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression stopRecording(view) is a void method call, and thus it cannot be parameterized |
8 | Expression initTextArea(eu.getEditPane().getTextArea()) is a void method call, and thus it cannot be parameterized |
9 | The refactoring of the clones is infeasible, because classes org.gjt.sp.jedit.Macros.Recorder and do not have a common superclass |