File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/editor/ProblemEditorPart.java | File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/editor/ProblemEditorPart.java | |||
Method name: void createPartControl(Composite)
|
Method name: void createPartControl(Composite)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (editorToOpen != null)↵ | 1 | if (markerUtil != null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | Button openButton = new Button(buttonComposite, SWT.PUSH);↵ | 3 | Button createMarkersButton = new Button(buttonComposite, SWT.PUSH);↵ | |
4 | openButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL));↵ | 4 | createMarkersButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL));↵ | |
5 | openButton.setText(CommonUIPlugin.getPlugin().getString("_UI_ErrorEditor_OpenEditor_label"));↵ | 5 | createMarkersButton.setText(CommonUIPlugin.getPlugin().getString("_UI_ErrorEditor_CreateMarkers_label"));↵ | |
6 | openButton.addSelectionListener(new SelectionAdapter()↵ | 6 | createMarkersButton.addSelectionListener(new SelectionAdapter()↵ | |
7 | {↵ | 7 | {↵ | |
8 | @Override↵ | 8 | @Override↵ | |
9 | public void widgetSelected(SelectionEvent e)↵ | 9 | public void widgetSelected(SelectionEvent e)↵ | |
10 | {↵ | 10 | {↵ | |
11 | openEditor();↵ | 11 | createMarkers();↵ | |
12 | }↵ | 12 | }↵ | |
13 | });↵ | 13 | });↵ | |
14 | } | 14 |
| |
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.1 |
Clones location | Clones are in the same method |
Number of node comparisons | 25 |
Number of mapped statements | 5 |
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) | 2.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
27 | if (editorToOpen != null) |
| 32 | if (markerUtil != null) | |||||||||||||||
28 | Button openButton = new Button(buttonComposite, SWT.PUSH); |
| 33 | Button createMarkersButton = new Button(buttonComposite, SWT.PUSH); | |||||||||||||||
29 | openButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL)); |
| 34 | createMarkersButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL)); | |||||||||||||||
30 | openButton.setText(CommonUIPlugin.getPlugin().getString("_UI_ErrorEditor_OpenEditor_label")); |
| 35 | createMarkersButton.setText(CommonUIPlugin.getPlugin().getString("_UI_ErrorEditor_CreateMarkers_label")); | |||||||||||||||
31 | openButton.addSelectionListener(new SelectionAdapter() {...}); |
| 36 | createMarkersButton.addSelectionListener(new SelectionAdapter() {...}); |
Row | Violation |
---|---|
1 | Type java.lang.String of variable editorToOpen does not match with type org.eclipse.emf.common.ui.MarkerHelper of variable markerUtil |
2 | Expression openEditor() is a void method call, and thus it cannot be parameterized |
3 | Expression createMarkers() is a void method call, and thus it cannot be parameterized |