CloneSet31


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
83230.989class_body_declarations[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
183519
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/GuiPackage.java
283509
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportGuiPackage.java
Next
Last
Clone Instance
1
Line Count
83
Source Line
519
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/GuiPackage.java

/**
 * Set the listener for JMeter's test tree.
 * 
 * @param newTreeListener
 *            the new JMeter test tree listener
 */
public void setTreeListener(JMeterTreeListener newTreeListener) {
  treeListener = newTreeListener;
}

/**
 * Get the listener for JMeter's test tree.
 * 
 * @return the JMeter test tree listener
 */
public JMeterTreeListener getTreeListener() {
  return treeListener;
}

/**
 * Display the specified popup menu with the source component and location
 * from the specified mouse event.
 * 
 * @param e
 *            the mouse event causing this popup to be displayed
 * @param popup
 *            the popup menu to display
 */
public void displayPopUp(MouseEvent e, JPopupMenu popup) {
  displayPopUp((Component) e.getSource(), e, popup);
}

/**
 * Display the specified popup menu at the location specified by a mouse
 * event with the specified source component.
 * 
 * @param invoker
 *            the source component
 * @param e
 *            the mouse event causing this popup to be displayed
 * @param popup
 *            the popup menu to display
 */
public void displayPopUp(Component invoker, MouseEvent e, JPopupMenu popup) {
  if (popup != null) {
    log.debug("Showing pop up for " + invoker + " at x,y = " + e.getX() + "," + e.getY());
    popup.pack();
    popup.show(invoker, e.getX(), e.getY());
    popup.setVisible(true);
    popup.requestFocus();
  }
}

/*
 * (non-Javadoc)
 * 
 * @see org.apache.jmeter.util.LocaleChangeListener#localeChanged(org.apache.jmeter.util.LocaleChangeEvent)
 */
public void localeChanged(LocaleChangeEvent event) {
  // FIrst make sure we save the content of the current GUI (since we
  // will flush it away):
  updateCurrentNode();
  // Forget about all GUIs we've created so far: we'll need to re-created
  // them all!
  guis = new HashMap();
  nodesToGui = new HashMap();
  testBeanGUIs = new HashMap();
  // BeanInfo objects also contain locale-sensitive data -- flush them
  // away:
  Introspector.flushCaches();
  // Now put the current GUI in place. [This code was copied from the
  // EditCommand action -- we can't just trigger the action because that
  // would populate the current node with the contents of the new GUI --
  // which is empty.]
  MainFrame mf = getMainFrame(); // Fetch once
  if (mf == null) // Probably caused by unit testing on headless system
  {
    log.warn("Mainframe is null");
  }
  else {
    mf.setMainPanel((javax.swing.JComponent) getCurrentGui());
    mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());
  }
}

private String testPlanFile;


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

/**
 * Set the listener for JMeter's test tree.
 * 
 * @param newTreeListener
 *            the new JMeter test tree listener
 */
public void setTreeListener(ReportTreeListener newTreeListener) {
  treeListener = newTreeListener;
}

/**
 * Get the listener for JMeter's test tree.
 * 
 * @return the JMeter test tree listener
 */
public ReportTreeListener getTreeListener() {
  return treeListener;
}

/**
 * Display the specified popup menu with the source component and location
 * from the specified mouse event.
 * 
 * @param e
 *            the mouse event causing this popup to be displayed
 * @param popup
 *            the popup menu to display
 */
public void displayPopUp(MouseEvent e, JPopupMenu popup) {
  displayPopUp((Component) e.getSource(), e, popup);
}

/**
 * Display the specified popup menu at the location specified by a mouse
 * event with the specified source component.
 * 
 * @param invoker
 *            the source component
 * @param e
 *            the mouse event causing this popup to be displayed
 * @param popup
 *            the popup menu to display
 */
public void displayPopUp(Component invoker, MouseEvent e, JPopupMenu popup) {
  if (popup != null) {
    log.debug("Showing pop up for " + invoker + " at x,y = " + e.getX() + "," + e.getY());
    popup.pack();
    popup.show(invoker, e.getX(), e.getY());
    popup.setVisible(true);
    popup.requestFocus();
  }
}

/*
 * (non-Javadoc)
 * 
 * @see org.apache.jmeter.util.LocaleChangeListener#localeChanged(org.apache.jmeter.util.LocaleChangeEvent)
 */
public void localeChanged(LocaleChangeEvent event) {
  // FIrst make sure we save the content of the current GUI (since we
  // will flush it away):
  updateCurrentNode();
  // Forget about all GUIs we've created so far: we'll need to re-created
  // them all!
  guis = new HashMap();
  nodesToGui = new HashMap();
  testBeanGUIs = new HashMap();
  // BeanInfo objects also contain locale-sensitive data -- flush them
  // away:
  Introspector.flushCaches();
  // Now put the current GUI in place. [This code was copied from the
  // EditCommand action -- we can't just trigger the action because that
  // would populate the current node with the contents of the new GUI --
  // which is empty.]
  ReportMainFrame mf = getMainFrame(); // Fetch once
  if (mf == null) // Probably caused by unit testing on headless system
  {
    log.warn("Mainframe is null");
  }
  else {
    mf.setMainPanel((javax.swing.JComponent) getCurrentGui());
    mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());
  }
}

private String reportPlanFile;


Clone AbstractionParameter Count: 3Parameter Bindings

/**
         * Set the listener for JMeter's test tree.
         * 
         * @param newTreeListener
         *            the new JMeter test tree listener
         */
public void setTreeListener( [[#variabledfba660]] newTreeListener) {
  treeListener = newTreeListener;
}

/**
         * Get the listener for JMeter's test tree.
         * 
         * @return the JMeter test tree listener
         */
public [[#variabledfba660]] getTreeListener() {
  return treeListener;
}

/**
         * Display the specified popup menu with the source component and location
         * from the specified mouse event.
         * 
         * @param e
         *            the mouse event causing this popup to be displayed
         * @param popup
         *            the popup menu to display
         */
public void displayPopUp(MouseEvent e, JPopupMenu popup) {
  displayPopUp((Component) e.getSource(), e, popup);
}

/**
         * Display the specified popup menu at the location specified by a mouse
         * event with the specified source component.
         * 
         * @param invoker
         *            the source component
         * @param e
         *            the mouse event causing this popup to be displayed
         * @param popup
         *            the popup menu to display
         */
public void displayPopUp(Component invoker, MouseEvent e, JPopupMenu popup) {
  if (popup != null) {
    log.debug("Showing pop up for " + invoker + " at x,y = " + e.getX() + "," + e.getY());
    popup.pack();
    popup.show(invoker, e.getX(), e.getY());
    popup.setVisible(true);
    popup.requestFocus();
  }
}

/*
         * (non-Javadoc)
         * 
         * @see org.apache.jmeter.util.LocaleChangeListener#localeChanged(org.apache.jmeter.util.LocaleChangeEvent)
         */
public void localeChanged(LocaleChangeEvent event) {
  // FIrst make sure we save the content of the current GUI (since we
  // will flush it away):
  updateCurrentNode();
  // Forget about all GUIs we've created so far: we'll need to re-created
  // them all!
  guis = new HashMap();
  nodesToGui = new HashMap();
  testBeanGUIs = new HashMap();
  // BeanInfo objects also contain locale-sensitive data -- flush them
  // away:
  Introspector.flushCaches();
   [[#variabledfb8680]] mf = getMainFrame(); // Fetch once
  if (mf == null) // Probably caused by unit testing on headless system
  {
    log.warn("Mainframe is null");
  }
  else {
    mf.setMainPanel((javax.swing.JComponent) getCurrentGui());
    mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());
  }
}

private String  [[#variabledfbaa00]];
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#dfba660]]
JMeterTreeListener 
12[[#dfba660]]
ReportTreeListener 
21[[#dfb8680]]
// Now put the current GUI in place. [This code was copied from the
// EditCommand action -- we can't just trigger the action because that
// would populate the current node with the contents of the new GUI --
// which is empty.]
MainFrame 
22[[#dfb8680]]
// Now put the current GUI in place. [This code was copied from the
// EditCommand action -- we can't just trigger the action because that
// would populate the current node with the contents of the new GUI --
// which is empty.]
ReportMainFrame 
31[[#dfbaa00]]
testPlanFile 
32[[#dfbaa00]]
reportPlanFile