Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
37 | 2 | 2 | 0.993 | class_body_declarations[4] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 37 | 82 | plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/LayoutUtil.java |
2 | 37 | 72 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/LayoutUtil.java |
| ||||
private static void modifyLabelSpans(Control[][] controls, int nCulumns) { for (int i = 0; i < controls.length; i++) { setHorizontalSpan(controls[i][0], nCulumns); } } /* * Sets the span of a control. Assumes that MGridData is used. */ public static void setHorizontalSpan(Control control, int span) { Object ld = control.getLayoutData(); if (ld instanceof GridData) { ((GridData) ld).horizontalSpan = span; } else if (span != 1) { GridData gd = new GridData(); gd.horizontalSpan = span; control.setLayoutData(gd); } } /* * Sets the width hint of a control. Assumes that MGridData is used. */ public static void setWidthHint(Control control, int widthHint) { Object ld = control.getLayoutData(); if (ld instanceof GridData) { ((GridData) ld).widthHint = widthHint; } } /* * Sets the horizontal indent of a control. Assumes that MGridData is used. */ public static void setHorizontalIndent(Control control, int horizontalIndent) { Object ld = control.getLayoutData(); if (ld instanceof GridData) { ((GridData) ld).horizontalIndent = horizontalIndent; } } |
| ||||
private static void modifyLabelSpans(Control[][] controls, int nCulumns) { for (int i = 0; i < controls.length; i++) { setHorizontalSpan(controls[i][0], nCulumns); } } /** * Sets the span of a control. Assumes that GridData is used. */ public static void setHorizontalSpan(Control control, int span) { Object ld = control.getLayoutData(); if (ld instanceof GridData) { ((GridData) ld).horizontalSpan = span; } else if (span != 1) { GridData gd = new GridData(); gd.horizontalSpan = span; control.setLayoutData(gd); } } /** * Sets the width hint of a control. Assumes that GridData is used. */ public static void setWidthHint(Control control, int widthHint) { Object ld = control.getLayoutData(); if (ld instanceof GridData) { ((GridData) ld).widthHint = widthHint; } } /** * Sets the heightHint hint of a control. Assumes that GridData is used. */ public static void setHeightHint(Control control, int heightHint) { Object ld = control.getLayoutData(); if (ld instanceof GridData) { ((GridData) ld).heightHint = heightHint; } } |
| |||
private static void modifyLabelSpans(Control[][] controls, int nCulumns) { for (int i = 0; i < controls.length; i++) { setHorizontalSpan(controls[i][0], nCulumns); } } /* * Sets the span of a control. Assumes that MGridData is used. */ /** * Sets the span of a control. Assumes that GridData is used. */ public static void setHorizontalSpan(Control control, int span) { Object ld = control.getLayoutData(); if (ld instanceof GridData) { ((GridData) ld).horizontalSpan = span; } else if (span != 1) { GridData gd = new GridData(); gd.horizontalSpan = span; control.setLayoutData(gd); } } /* * Sets the width hint of a control. Assumes that MGridData is used. */ /** * Sets the width hint of a control. Assumes that GridData is used. */ public static void setWidthHint(Control control, int widthHint) { Object ld = control.getLayoutData(); if (ld instanceof GridData) { ((GridData) ld).widthHint = widthHint; } } /* * Sets the horizontal indent of a control. Assumes that MGridData is used. */ /** * Sets the heightHint hint of a control. Assumes that GridData is used. */ public static void [[#variable9a4d0540]](Control control, int [[#variable9a4d0520]]) { Object ld = control.getLayoutData(); if (ld instanceof GridData) { ((GridData) ld). [[#variable9a4d0520]]= [[#variable9a4d0520]]; } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#9a4d0540]] | setHorizontalIndent |
1 | 2 | [[#9a4d0540]] | setHeightHint |
2 | 1 | [[#9a4d0520]] | horizontalIndent |
2 | 2 | [[#9a4d0520]] | heightHint |