CloneSet628


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
37220.993class_body_declarations[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
13782
plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/LayoutUtil.java
23772
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/LayoutUtil.java
Clone Instance
1
Line Count
37
Source Line
82
Source File
plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/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;
                }
        }


Clone Instance
2
Line Count
37
Source Line
72
Source File
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 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;
                }
        }


Clone AbstractionParameter Count: 2Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#9a4d0540]]
setHorizontalIndent 
12[[#9a4d0540]]
setHeightHint 
21[[#9a4d0520]]
horizontalIndent 
22[[#9a4d0520]]
heightHint