CloneSet276


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
80210.999class_body_declarations[5]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
18062
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewEnumWizardPage.java
27961
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewInterfaceWizardPage.java
Clone Instance
1
Line Count
80
Source Line
62
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewEnumWizardPage.java

        // -------- Initialization ---------
        /**
         * The wizard owning this page is responsible for calling this method with the
         * current selection. The selection is used to initialize the fields of the wizard 
         * page.
         * 
         * @param selection used to initialize the fields
         */
        public void init(IStructuredSelection selection) {
            IJavaElement jelem = getInitialJavaElement(selection);

                initContainerPage(jelem);
                initTypePage(jelem);

                doStatusUpdate();
        }

        // ------ validation --------

        private void doStatusUpdate() {
                // all used component status
                IStatus[] status = new IStatus[] {
                         fContainerStatus,
                         isEnclosingTypeSelected() ? fEnclosingTypeStatus:  fPackageStatus,
                         fTypeNameStatus,
                         fModifierStatus,
                         fSuperInterfacesStatus
                                                 };

                // the mode severe status will be displayed and the OK button enabled/disabled.
                updateStatus(status);
        }


        /*
         * @see NewContainerWizardPage#handleFieldChanged
         */
        protected void handleFieldChanged(String fieldName) {
                super.handleFieldChanged(fieldName);

                doStatusUpdate();
        }


        // ------ UI --------

        /*
         * @see WizardPage#createControl
         */
        public void createControl(Composite parent) {
                initializeDialogUnits(parent);

                Composite composite = new Composite(parent, SWT.NONE);
                composite.setFont(parent.getFont());

                int nColumns = 4;

                GridLayout layout = new GridLayout();
                layout.numColumns = nColumns;
                composite.setLayout(layout);

                createContainerControls(composite, nColumns);
                createPackageControls(composite, nColumns);
                createEnclosingTypeControls(composite, nColumns);

                createSeparator(composite, nColumns);

                createTypeNameControls(composite, nColumns);
                createModifierControls(composite, nColumns);

                createSuperInterfacesControls(composite, nColumns);

                createCommentControls(composite, nColumns);
                enableCommentControl(true);

                setControl(composite);

                Dialog.applyDialogFont(composite);
                PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.NEW_ENUM_WIZARD_PAGE);
        }

        /*
         * @see WizardPage#becomesVisible
         */
        public void setVisible(boolean visible) {
                super.setVisible(visible);
                if (visible) {
                        setFocus();
                }
        }


Clone Instance
2
Line Count
79
Source Line
61
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewInterfaceWizardPage.java

        // -------- Initialization ---------
        /**
         * The wizard owning this page is responsible for calling this method with the
         * current selection. The selection is used to initialize the fields of the wizard 
         * page.
         * 
         * @param selection used to initialize the fields
         */
        public void init(IStructuredSelection selection) {
                IJavaElement jelem = getInitialJavaElement(selection);

                initContainerPage(jelem);
                initTypePage(jelem);
                doStatusUpdate();
        }

        // ------ validation --------

        private void doStatusUpdate() {
                // all used component status
                IStatus[] status = new IStatus[] {
                         fContainerStatus,
                         isEnclosingTypeSelected() ? fEnclosingTypeStatus:  fPackageStatus,
                         fTypeNameStatus,
                         fModifierStatus,
                         fSuperInterfacesStatus
                                                 };

                // the mode severe status will be displayed and the OK button enabled/disabled.
                updateStatus(status);
        }


        /*
         * @see NewContainerWizardPage#handleFieldChanged
         */
        protected void handleFieldChanged(String fieldName) {
                super.handleFieldChanged(fieldName);

                doStatusUpdate();
        }


        // ------ UI --------

        /*
         * @see WizardPage#createControl
         */
        public void createControl(Composite parent) {
                initializeDialogUnits(parent);

                Composite composite = new Composite(parent, SWT.NONE);
                composite.setFont(parent.getFont());

                int nColumns = 4;

                GridLayout layout = new GridLayout();
                layout.numColumns = nColumns;
                composite.setLayout(layout);

                createContainerControls(composite, nColumns);
                createPackageControls(composite, nColumns);
                createEnclosingTypeControls(composite, nColumns);

                createSeparator(composite, nColumns);

                createTypeNameControls(composite, nColumns);
                createModifierControls(composite, nColumns);

                createSuperInterfacesControls(composite, nColumns);

                createCommentControls(composite, nColumns);
                enableCommentControl(true);

                setControl(composite);

                Dialog.applyDialogFont(composite);
                PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.NEW_INTERFACE_WIZARD_PAGE);
        }

        /*
         * @see WizardPage#becomesVisible
         */
        public void setVisible(boolean visible) {
                super.setVisible(visible);
                if (visible) {
                        setFocus();
                }
        }


Clone AbstractionParameter Count: 1Parameter Bindings

// -------- Initialization ---------
/**
         * The wizard owning this page is responsible for calling this method with the
         * current selection. The selection is used to initialize the fields of the wizard 
         * page.
         * 
         * @param selection used to initialize the fields
         */
public void init(IStructuredSelection selection) {
  IJavaElement jelem = getInitialJavaElement(selection);
  initContainerPage(jelem);
  initTypePage(jelem);
  doStatusUpdate();
}

// ------ validation --------
private void doStatusUpdate() {
  // all used component status
  IStatus[] status = new IStatus[] {
                                     fContainerStatus,
                                     isEnclosingTypeSelected() ? fEnclosingTypeStatus: fPackageStatus,
                                     fTypeNameStatus,
                                     fModifierStatus,
                                     fSuperInterfacesStatus
                                   };
  // the mode severe status will be displayed and the OK button enabled/disabled.
  updateStatus(status);
}

/*
         * @see NewContainerWizardPage#handleFieldChanged
         */
protected void handleFieldChanged(String fieldName) {
  super.handleFieldChanged(fieldName);
  doStatusUpdate();
}

// ------ UI --------
/*
         * @see WizardPage#createControl
         */
public void createControl(Composite parent) {
  initializeDialogUnits(parent);
  Composite composite = new Composite(parent, SWT.NONE);
  composite.setFont(parent.getFont());
  int nColumns = 4;
  GridLayout layout = new GridLayout();
  layout.numColumns = nColumns;
  composite.setLayout(layout);
  createContainerControls(composite, nColumns);
  createPackageControls(composite, nColumns);
  createEnclosingTypeControls(composite, nColumns);
  createSeparator(composite, nColumns);
  createTypeNameControls(composite, nColumns);
  createModifierControls(composite, nColumns);
  createSuperInterfacesControls(composite, nColumns);
  createCommentControls(composite, nColumns);
  enableCommentControl(true);
  setControl(composite);
  Dialog.applyDialogFont(composite);
  PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds. [[#variablebd6e6e80]]);
}

/*
         * @see WizardPage#becomesVisible
         */
public void setVisible(boolean visible) {
  super.setVisible(visible);
  if (visible) {
    setFocus();
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bd6e6e80]]
NEW_ENUM_WIZARD_PAGE 
12[[#bd6e6e80]]
NEW_INTERFACE_WIZARD_PAGE