File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/VariableGridLayout.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/VariableGridLayout.java | |||
Method name: void layoutContainer(Container)
|
Method name: void layoutContainer(Container)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (total_width != free_width) {↵ | 1 | if (total_height != free_height) {↵ | |
2 | double dx = ((double)free_width) / ((double)total_width);↵ | 2 | double dy = (double)free_height / (double)total_height;↵ | |
3 | for (int c = 0; c < ncols; c++) {↵ | 3 | for (int r = 0; r < nrows; r++) {↵ | |
4 | col_widths[c] = (int) ((double)col_widths[c] * dx);↵ | 4 | row_heights[r] = (int) ((double)row_heights[r] * dy);↵ | |
5 | }↵ | 5 | }↵ | |
6 | } | 6 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 18 |
Number of mapped statements | 4 |
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.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26 | if (total_width != free_width) |
| 22 | if (total_height != free_height) | ||||||||||||||||||||||||||
27 | double dx = ((double)free_width) / ((double)total_width); |
| 23 | double dy = (double)free_height / (double)total_height; | ||||||||||||||||||||||||||
28 | for (int c = 0; c < ncols; c++) |
| 24 | for (int r = 0; r < nrows; r++) | ||||||||||||||||||||||||||
29 | col_widths[c] = (int)((double)col_widths[c] * dx); |
| 25 | row_heights[r] = (int)((double)row_heights[r] * dy); |
Row | Violation |
---|---|
1 | Expression col_widths cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression row_heights cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression col_widths cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression row_heights cannot be parameterized, because it has dependencies to/from statements that will be extracted |