File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/editor/SWTAxisEditor.java | File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/editor/SWTTitleEditor.java | |||
Method name: void SWTAxisEditor(Composite, int, Axis)
|
Method name: void SWTTitleEditor(Composite, int, Title)
|
|||
Number of AST nodes: 1 | Number of AST nodes: 1 | |||
1 | selectColorButton.addSelectionListener(↵ | 1 | this.selectColorButton.addSelectionListener(↵ | |
2 | new SelectionAdapter() {↵ | 2 | new SelectionAdapter() {↵ | |
3 | public void widgetSelected(SelectionEvent event) {↵ | 3 | public void widgetSelected(SelectionEvent event) {↵ | |
4 | // Create the color-change dialog↵ | 4 | // Create the color-change dialog↵ | |
5 | ColorDialog dlg = new ColorDialog(getShell());↵ | 5 | ColorDialog dlg = new ColorDialog(getShell());↵ | |
6 | dlg.setText(localizationResources.getString(↵ | 6 | dlg.setText(localizationResources.getString(↵ | |
7 | "Title_Color"));↵ | 7 | "Title_Color"));↵ | |
8 | dlg.setRGB(SWTAxisEditor.this.labelPaintColor.getRGB());↵ | 8 | dlg.setRGB(SWTTitleEditor.this.titleColor.getRGB());↵ | |
9 | RGB rgb = dlg.open();↵ | 9 | RGB rgb = dlg.open();↵ | |
10 | if (rgb != null) {↵ | 10 | if (rgb != null) {↵ | |
11 | // create the new color and set it to the ↵ | 11 | // create the new color and set it to the ↵ | |
12 | // SwtPaintCanvas↵ | 12 | // SwtPaintCanvas↵ | |
13 | SWTAxisEditor.this.labelPaintColor = new Color(↵ | 13 | SWTTitleEditor.this.titleColor = new Color(↵ | |
14 | getDisplay(), rgb);↵ | 14 | getDisplay(), rgb);↵ | |
15 | colorCanvas.setColor(↵ | 15 | colorCanvas.setColor(↵ | |
16 | SWTAxisEditor.this.labelPaintColor);↵ | 16 | SWTTitleEditor.this.titleColor);↵ | |
17 | }↵ | 17 | }↵ | |
18 | }↵ | 18 | }↵ | |
19 | }↵ | 19 | }↵ | |
20 | ); | 20 |
| |
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 1 |
Number of mapped statements | 1 |
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) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
32 | selectColorButton.addSelectionListener(new SelectionAdapter() {...}); |
| 40 | this.selectColorButton.addSelectionListener(new SelectionAdapter() {...}); |
Row | Violation |
---|---|
1 | Expression SWTAxisEditor cannot be unified with expression SWTTitleEditor , because common superclass org.eclipse.swt.widgets.Composite does not declare member(s) protected static java.util.ResourceBundle localizationResources |
2 | Expression SWTAxisEditor.this.labelPaintColor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression SWTTitleEditor.this.titleColor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression SWTAxisEditor cannot be unified with expression SWTTitleEditor , because common superclass org.eclipse.swt.widgets.Composite does not declare member(s) protected static java.util.ResourceBundle localizationResources |
5 | Expression SWTAxisEditor.this.labelPaintColor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression SWTTitleEditor.this.titleColor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression SWTAxisEditor.this.labelPaintColor is a field being modified, and thus it cannot be parameterized |
8 | Expression SWTTitleEditor.this.titleColor is a field being modified, and thus it cannot be parameterized |
9 | Expression SWTAxisEditor cannot be unified with expression SWTTitleEditor , because common superclass org.eclipse.swt.widgets.Composite does not declare member(s) protected static java.util.ResourceBundle localizationResources |
10 | Expression SWTAxisEditor.this.labelPaintColor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression SWTTitleEditor.this.titleColor cannot be parameterized, because it has dependencies to/from statements that will be extracted |