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 | selectFontButton.addSelectionListener(↵ | 1 | this.selectFontButton.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 font-change dialog↵ | |
5 | FontDialog dlg = new FontDialog(getShell());↵ | 5 | FontDialog dlg = new FontDialog(getShell());↵ | |
6 | dlg.setText(localizationResources.getString(↵ | 6 | dlg.setText(localizationResources.getString(↵ | |
7 | "Font_Selection"));↵ | 7 | "Font_Selection"));↵ | |
8 | dlg.setFontList(new FontData[] { ↵ | 8 | dlg.setFontList(new FontData[] { ↵ | |
9 | SWTAxisEditor.this.labelFont });↵ | 9 | SWTTitleEditor.this.titleFont });↵ | |
10 | if (dlg.open() != null) {↵ | 10 | if (dlg.open() != null) {↵ | |
11 | // Dispose of any fonts we have created↵ | 11 | // Dispose of any fonts we have created↵ | |
12 | if (SWTAxisEditor.this.font != null) {↵ | 12 | if (SWTTitleEditor.this.font != null) {↵ | |
13 | SWTAxisEditor.this.font.dispose();↵ | 13 | SWTTitleEditor.this.font.dispose();↵ | |
14 | }↵ | 14 | }↵ | |
15 | // Create the new font and set it into the title ↵ | 15 | // Create the new font and set it into the title ↵ | |
16 | // label↵ | 16 | // label↵ | |
17 | SWTAxisEditor.this.font = new Font(↵ | 17 | SWTTitleEditor.this.font = new Font(↵ | |
18 | getShell().getDisplay(), dlg.getFontList());↵ | 18 | getShell().getDisplay(), dlg.getFontList());↵ | |
19 | //label.setFont(font);↵ | 19 | //titleField.setFont(font);↵ | |
20 | SWTAxisEditor.this.labelFontField.setText(↵ | 20 | SWTTitleEditor.this.fontField.setText(↵ | |
21 | SWTAxisEditor.this.font.getFontData()[0]↵ | 21 | SWTTitleEditor.this.font.getFontData()[0]↵ | |
22 | .toString());↵ | 22 | .toString());↵ | |
23 | SWTAxisEditor.this.labelFont ↵ | 23 | SWTTitleEditor.this.titleFont ↵ | |
24 | = SWTAxisEditor.this.font.getFontData()[0];↵ | 24 | = SWTTitleEditor.this.font.getFontData()[0];↵ | |
25 | }↵ | 25 | }↵ | |
26 | }↵ | 26 | }↵ | |
27 | }↵ | 27 | }↵ | |
28 | ); | 28 |
| |
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
24 | selectFontButton.addSelectionListener(new SelectionAdapter() {...}); |
| 32 | this.selectFontButton.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.labelFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression SWTTitleEditor.this.titleFont 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 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 |
6 | 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 |
7 | 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 |
8 | 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 |
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.labelFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression SWTTitleEditor.this.titleFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression SWTAxisEditor.this.labelFont is a field being modified, and thus it cannot be parameterized |
13 | Expression SWTTitleEditor.this.titleFont is a field being modified, and thus it cannot be parameterized |
14 | 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 |