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/SWTAxisEditor.java | |||
Method name: void SWTAxisEditor(Composite, int, Axis)
|
Method name: void SWTAxisEditor(Composite, int, Axis)
|
|||
Number of AST nodes: 1 | Number of AST nodes: 1 | |||
1 | selectFontButton.addSelectionListener(↵ | 1 | selectTickLabelFontButton.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 | SWTAxisEditor.this.tickLabelFont});↵ | |
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 (SWTAxisEditor.this.font != null) {↵ | |
13 | SWTAxisEditor.this.font.dispose();↵ | 13 | SWTAxisEditor.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 | SWTAxisEditor.this.font = new Font(↵ | |
18 | getShell().getDisplay(), dlg.getFontList());↵ | 18 | getShell().getDisplay(), dlg.getFontList());↵ | |
19 | //label.setFont(font);↵ | 19 | //tickLabelFontField.setFont(font);↵ | |
20 | SWTAxisEditor.this.labelFontField.setText(↵ | 20 | SWTAxisEditor.this.tickLabelFontField.setText(↵ | |
21 | SWTAxisEditor.this.font.getFontData()[0]↵ | 21 | SWTAxisEditor.this.font.getFontData()[0]↵ | |
22 | .toString());↵ | 22 | .toString());↵ | |
23 | SWTAxisEditor.this.labelFont ↵ | 23 | SWTAxisEditor.this.tickLabelFont ↵ | |
24 | = SWTAxisEditor.this.font.getFontData()[0];↵ | 24 | = SWTAxisEditor.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 the same method |
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() {...}); |
| 53 | selectTickLabelFontButton.addSelectionListener(new SelectionAdapter() {...}); |
Row | Violation |
---|---|
1 | Expression SWTAxisEditor.this.labelFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression SWTAxisEditor.this.tickLabelFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression SWTAxisEditor.this.labelFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression SWTAxisEditor.this.tickLabelFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression SWTAxisEditor.this.labelFont is a field being modified, and thus it cannot be parameterized |
6 | Expression SWTAxisEditor.this.tickLabelFont is a field being modified, and thus it cannot be parameterized |