File path: /jEdit-4.2/src/installer/VariableGridLayout.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/VariableGridLayout.java | |||
Method name: void update(Container)
|
Method name: void update(Container)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | int ncomponents = container.getComponentCount();↵ | 1 | int ncomponents = container.getComponentCount();↵ | |
2 | int old_nrows = nrows;↵ | 2 | int old_nrows = nrows;↵ | |
3 | int old_ncols = ncols;↵ | 3 | int old_ncols = ncols;↵ | |
4 | if (this.mode == FIXED_NUM_ROWS) {↵ | 4 | if (this.mode == FIXED_NUM_ROWS) {↵ | |
5 | nrows = this.size;↵ | 5 | nrows = this.size;↵ | |
6 | ncols = (ncomponents + nrows - 1) / nrows;↵ | 6 | ncols = (ncomponents + nrows - 1) / nrows;↵ | |
7 | } else {↵ | 7 | } else {↵ | |
8 | ncols = this.size;↵ | 8 | ncols = this.size;↵ | |
9 | nrows = (ncomponents + ncols - 1) / ncols;↵ | 9 | nrows = (ncomponents + ncols - 1) / ncols;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (old_nrows != nrows) {↵ | 11 | if (old_nrows != nrows) {↵ | |
12 | row_heights = new int[nrows];↵ | 12 | row_heights = new int[nrows];↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (old_ncols != ncols) {↵ | 14 | if (old_ncols != ncols) {↵ | |
15 | col_widths = new int[ncols];↵ | 15 | col_widths = new int[ncols];↵ | |
16 | } | 16 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 2.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 69 |
Number of mapped statements | 12 |
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) | 12.4 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | int ncomponents = container.getComponentCount(); | 1 | int ncomponents = container.getComponentCount(); | |
2 | int old_nrows = nrows; | 2 | int old_nrows = nrows; | |
3 | int old_ncols = ncols; | 3 | int old_ncols = ncols; | |
4 | if (this.mode == FIXED_NUM_ROWS) | 4 | if (this.mode == FIXED_NUM_ROWS) | |
5 | nrows = this.size; | 5 | nrows = this.size; | |
6 | ncols = (ncomponents + nrows - 1) / nrows; | 6 | ncols = (ncomponents + nrows - 1) / nrows; | |
else | else | |||
7 | ncols = this.size; | 7 | ncols = this.size; | |
8 | nrows = (ncomponents + ncols - 1) / ncols; | 8 | nrows = (ncomponents + ncols - 1) / ncols; | |
9 | if (old_nrows != nrows) | 9 | if (old_nrows != nrows) | |
10 | row_heights = new int[nrows]; | 10 | row_heights = new int[nrows]; | |
11 | if (old_ncols != ncols) | 11 | if (old_ncols != ncols) | |
12 | col_widths = new int[ncols]; | 12 | col_widths = new int[ncols]; |
Row | Violation |
---|