CloneSet963


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
30220.993class_body_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
130516
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java
230458
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/TreeListDialogField.java
Clone Instance
1
Line Count
30
Source Line
516
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/ListDialogField.java

        /*
         * @see DialogField#updateEnableState
         */
        protected void updateEnableState() {
                super.updateEnableState();

                boolean enabled = isEnabled();
                if (isOkToUse(fTableControl)) {
                        if ( !enabled) {
                                fSelectionWhenEnabled = fTable.getSelection();
                                selectElements(null);
                        }
                        else   {
                                selectElements(fSelectionWhenEnabled);
                                fSelectionWhenEnabled = null;
                        }
                        fTableControl.setEnabled(enabled);
                }
                updateButtonState();
        }

        /**
         * Sets a button enabled or disabled.
         */
        public void enableButton(int index, boolean enable) {
                if (fButtonsEnabled != null && index < fButtonsEnabled.length) {
                        fButtonsEnabled[index] = enable;
                        updateButtonState();
                }
        }

        private boolean isButtonEnabled(ISelection sel, int index) {
                boolean extraState = getManagedButtonState(sel, index);
                return isEnabled() && extraState && fButtonsEnabled[index];
        }


Clone Instance
2
Line Count
30
Source Line
458
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/dialogfields/TreeListDialogField.java

        /*
        * @see DialogField#updateEnableState
        */
        protected void updateEnableState() {
                super.updateEnableState();

                boolean enabled = isEnabled();
                if (isOkToUse(fTreeControl)) {
                        if ( !enabled) {
                                fSelectionWhenEnabled = fTree.getSelection();
                                selectElements(null);
                        }
                        else   {
                                selectElements(fSelectionWhenEnabled);
                                fSelectionWhenEnabled = null;
                        }
                        fTreeControl.setEnabled(enabled);
                }
                updateButtonState();
        }

        /**
        * Sets a button enabled or disabled.
        */
        public void enableButton(int index, boolean enable) {
                if (fButtonsEnabled != null && index < fButtonsEnabled.length) {
                        fButtonsEnabled[index] = enable;
                        updateButtonState();
                }
        }

        private boolean isButtonEnabled(ISelection sel, int index) {
                boolean extraState = getManagedButtonState(sel, index);
                return isEnabled() && extraState && fButtonsEnabled[index];
        }


Clone AbstractionParameter Count: 2Parameter Bindings

/*
         * @see DialogField#updateEnableState
         */
/*
        * @see DialogField#updateEnableState
        */
protected void updateEnableState() {
  super.updateEnableState();
  boolean enabled = isEnabled();
  if (isOkToUse( [[#variablebadb31a0]])) {
    if ( !enabled) {
      fSelectionWhenEnabled = [[#variable62a24bc0]].getSelection();
      selectElements(null);
    }
    else {
      selectElements(fSelectionWhenEnabled);
      fSelectionWhenEnabled = null;
    }
     [[#variablebadb31a0]].setEnabled(enabled);
  }
  updateButtonState();
}

/**
         * Sets a button enabled or disabled.
         */
/**
        * Sets a button enabled or disabled.
        */
public void enableButton(int index, boolean enable) {
  if (fButtonsEnabled != null && index < fButtonsEnabled.length) {
    fButtonsEnabled[index] = enable;
    updateButtonState();
  }
}

private boolean isButtonEnabled(ISelection sel, int index) {
  boolean extraState = getManagedButtonState(sel, index);
  return isEnabled() && extraState && fButtonsEnabled[index];
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#badb31a0]]
fTableControl 
12[[#badb31a0]]
fTreeControl 
21[[#62a24bc0]]
fTable 
22[[#62a24bc0]]
fTree