CloneSet21


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
80201.000class_body_declarations[7]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
181209
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/MainFrame.java
280167
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportMainFrame.java
Next
Last
Clone Instance
1
Line Count
81
Source Line
209
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/MainFrame.java

/**
 * Set the menu that should be used for the Edit menu.
 * 
 * @param menu
 *            the new Edit menu
 */
public void setEditMenu(JPopupMenu menu) {
  menuBar.setEditMenu(menu);
}

/**
 * Specify whether or not the Edit menu item should be enabled.
 * 
 * @param enabled
 *            true if the menu item should be enabled, false otherwise
 */
public void setEditEnabled(boolean enabled) {
  menuBar.setEditEnabled(enabled);
}

/**
 * Set the menu that should be used for the Edit|Add menu.
 * 
 * @param menu
 *            the new Edit|Add menu
 */
public void setEditAddMenu(JMenu menu) {
  menuBar.setEditAddMenu(menu);
}

/**
 * Specify whether or not the Edit|Add menu item should be enabled.
 * 
 * @param enabled
 *            true if the menu item should be enabled, false otherwise
 */
public void setEditAddEnabled(boolean enabled) {
  menuBar.setEditAddEnabled(enabled);
}

/**
 * Specify whether or not the Edit|Remove menu item should be enabled.
 * 
 * @param enabled
 *            true if the menu item should be enabled, false otherwise
 */
public void setEditRemoveEnabled(boolean enabled) {
  menuBar.setEditRemoveEnabled(enabled);
}

/**
 * Close the currently selected menu.
 */
public void closeMenu() {
  if (menuBar.isSelected()) {
    MenuElement[] menuElement = menuBar.getSubElements();
    if (menuElement != null) {
      for (int i = 0; i < menuElement.length; i++) {
        JMenu menu = (JMenu) menuElement[i];
        if (menu.isSelected()) {
          menu.setPopupMenuVisible(false);
          menu.setSelected(false);
          break;
        }
      }
    }
  }
}

/**
 * Show a dialog indicating that JMeter threads are stopping on a particular
 * host.
 * 
 * @param host
 *            the host where JMeter threads are stopping
 */
public void showStoppingMessage(String host) {
  stoppingMessage = new JDialog(this, JMeterUtils.getResString("stopping_test_title"), true); //$NON-NLS-1$
  JLabel stopLabel = new JLabel(JMeterUtils.getResString("stopping_test") + ": " + host); //$NON-NLS-1$$NON-NLS-2$
  stopLabel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
  stoppingMessage.getContentPane().add(stopLabel);
  stoppingMessage.pack();
  ComponentUtil.centerComponentInComponent(this, stoppingMessage);
  SwingUtilities.invokeLater(new Runnable() {
                               public void run() {
                                 if (stoppingMessage != null) { // TODO - how can this be null?
                                   stoppingMessage.show();
                                 }
                               }
                             } );
}


First
Previous
Clone Instance
2
Line Count
80
Source Line
167
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportMainFrame.java

/**
 * Set the menu that should be used for the Edit menu.
 * 
 * @param menu
 *            the new Edit menu
 */
public void setEditMenu(JPopupMenu menu) {
  menuBar.setEditMenu(menu);
}

/**
 * Specify whether or not the Edit menu item should be enabled.
 * 
 * @param enabled
 *            true if the menu item should be enabled, false otherwise
 */
public void setEditEnabled(boolean enabled) {
  menuBar.setEditEnabled(enabled);
}

/**
 * Set the menu that should be used for the Edit|Add menu.
 * 
 * @param menu
 *            the new Edit|Add menu
 */
public void setEditAddMenu(JMenu menu) {
  menuBar.setEditAddMenu(menu);
}

/**
 * Specify whether or not the Edit|Add menu item should be enabled.
 * 
 * @param enabled
 *            true if the menu item should be enabled, false otherwise
 */
public void setEditAddEnabled(boolean enabled) {
  menuBar.setEditAddEnabled(enabled);
}

/**
 * Specify whether or not the Edit|Remove menu item should be enabled.
 * 
 * @param enabled
 *            true if the menu item should be enabled, false otherwise
 */
public void setEditRemoveEnabled(boolean enabled) {
  menuBar.setEditRemoveEnabled(enabled);
}

/**
 * Close the currently selected menu.
 */
public void closeMenu() {
  if (menuBar.isSelected()) {
    MenuElement[] menuElement = menuBar.getSubElements();
    if (menuElement != null) {
      for (int i = 0; i < menuElement.length; i++) {
        JMenu menu = (JMenu) menuElement[i];
        if (menu.isSelected()) {
          menu.setPopupMenuVisible(false);
          menu.setSelected(false);
          break;
        }
      }
    }
  }
}

/**
 * Show a dialog indicating that JMeter threads are stopping on a particular
 * host.
 * 
 * @param host
 *            the host where JMeter threads are stopping
 */
public void showStoppingMessage(String host) {
  stoppingMessage = new JDialog(this, JMeterUtils.getResString("stopping_test_title"), true); // $NON-NLS-1$
  JLabel stopLabel = new JLabel(JMeterUtils.getResString("stopping_test") + ": " + host); // $NON-NLS-1$
  stopLabel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
  stoppingMessage.getContentPane().add(stopLabel);
  stoppingMessage.pack();
  ComponentUtil.centerComponentInComponent(this, stoppingMessage);
  SwingUtilities.invokeLater(new Runnable() {
                               public void run() {
                                 if (stoppingMessage != null) {
                                   stoppingMessage.show();
                                 }
                               }
                             } );
}


Clone AbstractionParameter Count: 0Parameter Bindings

/**
         * Set the menu that should be used for the Edit menu.
         * 
         * @param menu
         *            the new Edit menu
         */
public void setEditMenu(JPopupMenu menu) {
  menuBar.setEditMenu(menu);
}

/**
         * Specify whether or not the Edit menu item should be enabled.
         * 
         * @param enabled
         *            true if the menu item should be enabled, false otherwise
         */
public void setEditEnabled(boolean enabled) {
  menuBar.setEditEnabled(enabled);
}

/**
         * Set the menu that should be used for the Edit|Add menu.
         * 
         * @param menu
         *            the new Edit|Add menu
         */
public void setEditAddMenu(JMenu menu) {
  menuBar.setEditAddMenu(menu);
}

/**
         * Specify whether or not the Edit|Add menu item should be enabled.
         * 
         * @param enabled
         *            true if the menu item should be enabled, false otherwise
         */
public void setEditAddEnabled(boolean enabled) {
  menuBar.setEditAddEnabled(enabled);
}

/**
         * Specify whether or not the Edit|Remove menu item should be enabled.
         * 
         * @param enabled
         *            true if the menu item should be enabled, false otherwise
         */
public void setEditRemoveEnabled(boolean enabled) {
  menuBar.setEditRemoveEnabled(enabled);
}

/**
     * Close the currently selected menu.
     */
/**
         * Close the currently selected menu.
         */
public void closeMenu() {
  if (menuBar.isSelected()) {
    MenuElement[] menuElement = menuBar.getSubElements();
    if (menuElement != null) {
      for (int i = 0; i < menuElement.length; i++) {
        JMenu menu = (JMenu) menuElement[i];
        if (menu.isSelected()) {
          menu.setPopupMenuVisible(false);
          menu.setSelected(false);
          break;
        }
      }
    }
  }
}

/**
     * Show a dialog indicating that JMeter threads are stopping on a particular
     * host.
     * 
     * @param host
     *            the host where JMeter threads are stopping
     */
/**
         * Show a dialog indicating that JMeter threads are stopping on a particular
         * host.
         * 
         * @param host
         *            the host where JMeter threads are stopping
         */
public void showStoppingMessage(String host) {
  stoppingMessage = new JDialog(this, JMeterUtils.getResString("stopping_test_title"), true); // $NON-NLS-1$ //$NON-NLS-1$
  JLabel stopLabel = new JLabel(JMeterUtils.getResString("stopping_test") + ": " + host); // $NON-NLS-1$ //$NON-NLS-1$$NON-NLS-2$
  stopLabel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
  stoppingMessage.getContentPane().add(stopLabel);
  stoppingMessage.pack();
  ComponentUtil.centerComponentInComponent(this, stoppingMessage);
  SwingUtilities.invokeLater(new Runnable() {
                               public void run() {
                                 if (stoppingMessage != null) { // TODO - how can this be null?
                                   stoppingMessage.show();
                                 }
                               }
                             } );
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None