CloneSet2


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
153201.000class_body_declarations[10]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1153100
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/ActionRouter.java
215393
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportActionRouter.java
Next
Last
Clone Instance
1
Line Count
153
Source Line
100
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/ActionRouter.java

/**
 * To execute an action immediately in the current thread.
 * 
 * @param e
 *            the action to execute
 */
public void doActionNow(ActionEvent e) {
  performAction(e);
}

public Set getAction(String actionName) {
  Set set = new HashSet();
  Set commandObjects = (Set) commands.get(actionName);
  Iterator iter = commandObjects.iterator();
  while (iter.hasNext()) {
    try {
      set.add(iter.next());
    }
    catch (Exception
           err) {
      log.error("", err);
    }
  }
  return set;
}

public Command getAction(String actionName, Class actionClass) {
  Set commandObjects = (Set) commands.get(actionName);
  Iterator iter = commandObjects.iterator();
  while (iter.hasNext()) {
    try {
      Command com = (Command) iter.next();
      if (com.getClass().equals(actionClass)) {
        return com;
      }
    }
    catch (Exception
           err) {
      log.error("", err);
    }
  }
  return null;
}

public Command getAction(String actionName, String className) {
  Set commandObjects = (Set) commands.get(actionName);
  Iterator iter = commandObjects.iterator();
  while (iter.hasNext()) {
    try {
      Command com = (Command) iter.next();
      if (com.getClass().getName().equals(className)) {
        return com;
      }
    }
    catch (Exception
           err) {
      log.error("", err);
    }
  }
  return null;
}

/**
 * Allows an ActionListener to receive notification of a command being
 * executed prior to the actual execution of the command.
 * 
 * @param action
 *            the Class of the command for which the listener will
 *            notifications for. Class must extend
 *            org.apache.jmeter.gui.action.Command.
 * @param listener
 *            the ActionListener to receive the notifications
 */
public void addPreActionListener(Class action, ActionListener listener) {
  if (action != null) {
    HashSet set = (HashSet) preActionListeners.get(action.getName());
    if (set == null) {
      set = new HashSet();
    }
    set.add(listener);
    preActionListeners.put(action.getName(), set);
  }
}

/**
 * Allows an ActionListener to be removed from receiving notifications of a
 * command being executed prior to the actual execution of the command.
 * 
 * @param action
 *            the Class of the command for which the listener will
 *            notifications for. Class must extend
 *            org.apache.jmeter.gui.action.Command.
 * @param listener
 *            the ActionListener to receive the notifications
 */
public void removePreActionListener(Class action, ActionListener listener) {
  if (action != null) {
    HashSet set = (HashSet) preActionListeners.get(action.getName());
    if (set != null) {
      set.remove(listener);
      preActionListeners.put(action.getName(), set);
    }
  }
}

/**
 * Allows an ActionListener to receive notification of a command being
 * executed after the command has executed.
 * 
 * @param action
 *            the Class of the command for which the listener will
 *            notifications for. Class must extend
 *            org.apache.jmeter.gui.action.Command.
 * @param listener
 */
public void addPostActionListener(Class action, ActionListener listener) {
  if (action != null) {
    HashSet set = (HashSet) postActionListeners.get(action.getName());
    if (set == null) {
      set = new HashSet();
    }
    set.add(listener);
    postActionListeners.put(action.getName(), set);
  }
}

/**
 * Allows an ActionListener to be removed from receiving notifications of a
 * command being executed after the command has executed.
 * 
 * @param action
 *            the Class of the command for which the listener will
 *            notifications for. Class must extend
 *            org.apache.jmeter.gui.action.Command.
 * @param listener
 */
public void removePostActionListener(Class action, ActionListener listener) {
  if (action != null) {
    HashSet set = (HashSet) postActionListeners.get(action.getName());
    if (set != null) {
      set.remove(listener);
      postActionListeners.put(action.getName(), set);
    }
  }
}

protected void preActionPerformed(Class action, ActionEvent e) {
  if (action != null) {
    HashSet listenerSet = (HashSet) preActionListeners.get(action.getName());
    if (listenerSet != null && listenerSet.size() > 0) {
      Object[] listeners = listenerSet.toArray();
      for (int i = 0; i < listeners.length; i++) {
        ((ActionListener) listeners[i]).actionPerformed(e);
      }
    }
  }
}

protected void postActionPerformed(Class action, ActionEvent e) {
  if (action != null) {
    HashSet listenerSet = (HashSet) postActionListeners.get(action.getName());
    if (listenerSet != null && listenerSet.size() > 0) {
      Object[] listeners = listenerSet.toArray();
      for (int i = 0; i < listeners.length; i++) {
        ((ActionListener) listeners[i]).actionPerformed(e);
      }
    }
  }
}


First
Previous
Clone Instance
2
Line Count
153
Source Line
93
Source File
E:/TSE/Projects-CloneDR/jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportActionRouter.java

/**
 * To execute an action immediately in the current thread.
 * 
 * @param e
 *            the action to execute
 */
public void doActionNow(ActionEvent e) {
  performAction(e);
}

public Set getAction(String actionName) {
  Set set = new HashSet();
  Set commandObjects = (Set) commands.get(actionName);
  Iterator iter = commandObjects.iterator();
  while (iter.hasNext()) {
    try {
      set.add(iter.next());
    }
    catch (Exception
           err) {
      log.error("", err);
    }
  }
  return set;
}

public Command getAction(String actionName, Class actionClass) {
  Set commandObjects = (Set) commands.get(actionName);
  Iterator iter = commandObjects.iterator();
  while (iter.hasNext()) {
    try {
      Command com = (Command) iter.next();
      if (com.getClass().equals(actionClass)) {
        return com;
      }
    }
    catch (Exception
           err) {
      log.error("", err);
    }
  }
  return null;
}

public Command getAction(String actionName, String className) {
  Set commandObjects = (Set) commands.get(actionName);
  Iterator iter = commandObjects.iterator();
  while (iter.hasNext()) {
    try {
      Command com = (Command) iter.next();
      if (com.getClass().getName().equals(className)) {
        return com;
      }
    }
    catch (Exception
           err) {
      log.error("", err);
    }
  }
  return null;
}

/**
 * Allows an ActionListener to receive notification of a command being
 * executed prior to the actual execution of the command.
 * 
 * @param action
 *            the Class of the command for which the listener will
 *            notifications for. Class must extend
 *            org.apache.jmeter.report.gui.action.Command.
 * @param listener
 *            the ActionListener to receive the notifications
 */
public void addPreActionListener(Class action, ActionListener listener) {
  if (action != null) {
    HashSet set = (HashSet) preActionListeners.get(action.getName());
    if (set == null) {
      set = new HashSet();
    }
    set.add(listener);
    preActionListeners.put(action.getName(), set);
  }
}

/**
 * Allows an ActionListener to be removed from receiving notifications of a
 * command being executed prior to the actual execution of the command.
 * 
 * @param action
 *            the Class of the command for which the listener will
 *            notifications for. Class must extend
 *            org.apache.jmeter.report.gui.action.Command.
 * @param listener
 *            the ActionListener to receive the notifications
 */
public void removePreActionListener(Class action, ActionListener listener) {
  if (action != null) {
    HashSet set = (HashSet) preActionListeners.get(action.getName());
    if (set != null) {
      set.remove(listener);
      preActionListeners.put(action.getName(), set);
    }
  }
}

/**
 * Allows an ActionListener to receive notification of a command being
 * executed after the command has executed.
 * 
 * @param action
 *            the Class of the command for which the listener will
 *            notifications for. Class must extend
 *            org.apache.jmeter.report.gui.action.Command.
 * @param listener
 */
public void addPostActionListener(Class action, ActionListener listener) {
  if (action != null) {
    HashSet set = (HashSet) postActionListeners.get(action.getName());
    if (set == null) {
      set = new HashSet();
    }
    set.add(listener);
    postActionListeners.put(action.getName(), set);
  }
}

/**
 * Allows an ActionListener to be removed from receiving notifications of a
 * command being executed after the command has executed.
 * 
 * @param action
 *            the Class of the command for which the listener will
 *            notifications for. Class must extend
 *            org.apache.jmeter.report.gui.action.Command.
 * @param listener
 */
public void removePostActionListener(Class action, ActionListener listener) {
  if (action != null) {
    HashSet set = (HashSet) postActionListeners.get(action.getName());
    if (set != null) {
      set.remove(listener);
      postActionListeners.put(action.getName(), set);
    }
  }
}

protected void preActionPerformed(Class action, ActionEvent e) {
  if (action != null) {
    HashSet listenerSet = (HashSet) preActionListeners.get(action.getName());
    if (listenerSet != null && listenerSet.size() > 0) {
      Object[] listeners = listenerSet.toArray();
      for (int i = 0; i < listeners.length; i++) {
        ((ActionListener) listeners[i]).actionPerformed(e);
      }
    }
  }
}

protected void postActionPerformed(Class action, ActionEvent e) {
  if (action != null) {
    HashSet listenerSet = (HashSet) postActionListeners.get(action.getName());
    if (listenerSet != null && listenerSet.size() > 0) {
      Object[] listeners = listenerSet.toArray();
      for (int i = 0; i < listeners.length; i++) {
        ((ActionListener) listeners[i]).actionPerformed(e);
      }
    }
  }
}


Clone AbstractionParameter Count: 0Parameter Bindings

/**
         * To execute an action immediately in the current thread.
         * 
         * @param e
         *            the action to execute
         */
public void doActionNow(ActionEvent e) {
  performAction(e);
}

public Set getAction(String actionName) {
  Set set = new HashSet();
  Set commandObjects = (Set) commands.get(actionName);
  Iterator iter = commandObjects.iterator();
  while (iter.hasNext()) {
    try {
      set.add(iter.next());
    }
    catch (Exception
           err) {
      log.error("", err);
    }
  }
  return set;
}

public Command getAction(String actionName, Class actionClass) {
  Set commandObjects = (Set) commands.get(actionName);
  Iterator iter = commandObjects.iterator();
  while (iter.hasNext()) {
    try {
      Command com = (Command) iter.next();
      if (com.getClass().equals(actionClass)) {
        return com;
      }
    }
    catch (Exception
           err) {
      log.error("", err);
    }
  }
  return null;
}

public Command getAction(String actionName, String className) {
  Set commandObjects = (Set) commands.get(actionName);
  Iterator iter = commandObjects.iterator();
  while (iter.hasNext()) {
    try {
      Command com = (Command) iter.next();
      if (com.getClass().getName().equals(className)) {
        return com;
      }
    }
    catch (Exception
           err) {
      log.error("", err);
    }
  }
  return null;
}

/**
         * Allows an ActionListener to receive notification of a command being
         * executed prior to the actual execution of the command.
         * 
         * @param action
         *            the Class of the command for which the listener will
         *            notifications for. Class must extend
         *            org.apache.jmeter.report.gui.action.Command.
         * @param listener
         *            the ActionListener to receive the notifications
         */
/**
         * Allows an ActionListener to receive notification of a command being
         * executed prior to the actual execution of the command.
         * 
         * @param action
         *            the Class of the command for which the listener will
         *            notifications for. Class must extend
         *            org.apache.jmeter.gui.action.Command.
         * @param listener
         *            the ActionListener to receive the notifications
         */
public void addPreActionListener(Class action, ActionListener listener) {
  if (action != null) {
    HashSet set = (HashSet) preActionListeners.get(action.getName());
    if (set == null) {
      set = new HashSet();
    }
    set.add(listener);
    preActionListeners.put(action.getName(), set);
  }
}

/**
         * Allows an ActionListener to be removed from receiving notifications of a
         * command being executed prior to the actual execution of the command.
         * 
         * @param action
         *            the Class of the command for which the listener will
         *            notifications for. Class must extend
         *            org.apache.jmeter.report.gui.action.Command.
         * @param listener
         *            the ActionListener to receive the notifications
         */
/**
         * Allows an ActionListener to be removed from receiving notifications of a
         * command being executed prior to the actual execution of the command.
         * 
         * @param action
         *            the Class of the command for which the listener will
         *            notifications for. Class must extend
         *            org.apache.jmeter.gui.action.Command.
         * @param listener
         *            the ActionListener to receive the notifications
         */
public void removePreActionListener(Class action, ActionListener listener) {
  if (action != null) {
    HashSet set = (HashSet) preActionListeners.get(action.getName());
    if (set != null) {
      set.remove(listener);
      preActionListeners.put(action.getName(), set);
    }
  }
}

/**
         * Allows an ActionListener to receive notification of a command being
         * executed after the command has executed.
         * 
         * @param action
         *            the Class of the command for which the listener will
         *            notifications for. Class must extend
         *            org.apache.jmeter.report.gui.action.Command.
         * @param listener
         */
/**
         * Allows an ActionListener to receive notification of a command being
         * executed after the command has executed.
         * 
         * @param action
         *            the Class of the command for which the listener will
         *            notifications for. Class must extend
         *            org.apache.jmeter.gui.action.Command.
         * @param listener
         */
public void addPostActionListener(Class action, ActionListener listener) {
  if (action != null) {
    HashSet set = (HashSet) postActionListeners.get(action.getName());
    if (set == null) {
      set = new HashSet();
    }
    set.add(listener);
    postActionListeners.put(action.getName(), set);
  }
}

/**
         * Allows an ActionListener to be removed from receiving notifications of a
         * command being executed after the command has executed.
         * 
         * @param action
         *            the Class of the command for which the listener will
         *            notifications for. Class must extend
         *            org.apache.jmeter.report.gui.action.Command.
         * @param listener
         */
/**
         * Allows an ActionListener to be removed from receiving notifications of a
         * command being executed after the command has executed.
         * 
         * @param action
         *            the Class of the command for which the listener will
         *            notifications for. Class must extend
         *            org.apache.jmeter.gui.action.Command.
         * @param listener
         */
public void removePostActionListener(Class action, ActionListener listener) {
  if (action != null) {
    HashSet set = (HashSet) postActionListeners.get(action.getName());
    if (set != null) {
      set.remove(listener);
      postActionListeners.put(action.getName(), set);
    }
  }
}

protected void preActionPerformed(Class action, ActionEvent e) {
  if (action != null) {
    HashSet listenerSet = (HashSet) preActionListeners.get(action.getName());
    if (listenerSet != null && listenerSet.size() > 0) {
      Object[] listeners = listenerSet.toArray();
      for (int i = 0; i < listeners.length; i++) {
        ((ActionListener) listeners[i]).actionPerformed(e);
      }
    }
  }
}

protected void postActionPerformed(Class action, ActionEvent e) {
  if (action != null) {
    HashSet listenerSet = (HashSet) postActionListeners.get(action.getName());
    if (listenerSet != null && listenerSet.size() > 0) {
      Object[] listeners = listenerSet.toArray();
      for (int i = 0; i < listeners.length; i++) {
        ((ActionListener) listeners[i]).actionPerformed(e);
      }
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None