private void update(Container container) { int ncomponents = container.getComponentCount(); int old_nrows = nrows; int old_ncols = ncols; if (this.mode == FIXED_NUM_ROWS) { nrows = this.size; ncols = (ncomponents + nrows - 1) / nrows; } else { ncols = this.size; nrows = (ncomponents + ncols - 1) / ncols; } if (old_nrows != nrows) { row_heights = new int[nrows]; } if (old_ncols != ncols) { col_widths = new int[ncols];
private void update(Container container) { int ncomponents = container.getComponentCount(); int old_nrows = nrows; int old_ncols = ncols; if (this.mode == FIXED_NUM_ROWS) { nrows = this.size; ncols = (ncomponents + nrows - 1) / nrows; } else { ncols = this.size; nrows = (ncomponents + ncols - 1) / ncols; } if (old_nrows != nrows) { row_heights = new int[nrows]; } if (old_ncols != ncols) { col_widths = new int[ncols];
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/installer/VariableGridLayout.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/VariableGridLayout.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
private void update(Container container) {
1
private void update(Container container) {
2
		int ncomponents = container.getComponentCount();
2
		int ncomponents = container.getComponentCount();
3
		int old_nrows = nrows;
3
		int old_nrows = nrows;
4
		int old_ncols = ncols;
4
		int old_ncols = ncols;
5
		if (this.mode == FIXED_NUM_ROWS) {
5
		if (this.mode == FIXED_NUM_ROWS) {
6
			nrows = this.size;
6
			nrows = this.size;
7
			ncols = (ncomponents + nrows - 1) / nrows;
7
			ncols = (ncomponents + nrows - 1) / nrows;
8
		} else {
8
		} else {
9
			ncols = this.size;
9
			ncols = this.size;
10
			nrows = (ncomponents + ncols - 1) / ncols;
10
			nrows = (ncomponents + ncols - 1) / ncols;
11
		}
11
		}
12
		if (old_nrows != nrows) {
12
		if (old_nrows != nrows) {
13
			row_heights = new int[nrows];
13
			row_heights = new int[nrows];
14
		}
14
		}
15
		if (old_ncols != ncols) {
15
		if (old_ncols != ncols) {
16
			col_widths = new int[ncols];
16
			col_widths = new int[ncols];
17
		
17
		
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0