public void propertyChange(PropertyChangeEvent e) { Object o = e.getNewValue(); if (o instanceof JComponent) focusOwner = (JComponent) o; else focusOwner = null; } /** * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */ public void actionPerformed(ActionEvent e) { if (focusOwner == null) return; String action = (String) e.getActionCommand(); Action a = focusOwner.getActionMap().get(action); if (a != null) a.actionPerformed(new ActionEvent(focusOwner, ActionEvent.ACTION_PERFORMED, null)); } /** * @see org.columba.core.gui.action.AbstractColumbaAction#isSingleton() */ public boolean isSingleton() { return true
public void propertyChange(PropertyChangeEvent e) { Object o = e.getNewValue(); if (o instanceof JComponent) focusOwner = (JComponent) o; else focusOwner = null; } /** * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */ public void actionPerformed(ActionEvent e) { if (focusOwner == null) return; String action = (String) e.getActionCommand(); Action a = focusOwner.getActionMap().get(action); if (a != null) a.actionPerformed(new ActionEvent(focusOwner, ActionEvent.ACTION_PERFORMED, null)); } /** * @see org.columba.core.gui.action.AbstractColumbaAction#isSingleton() */ public boolean isSingleton() { return true
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/globalactions/CutAction.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/globalactions/PasteAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void propertyChange(PropertyChangeEvent e) {
1
public void propertyChange(PropertyChangeEvent e) {
2
		Object o = e.getNewValue();
2
		Object o = e.getNewValue();
3
		if (o instanceof JComponent)
3
		if (o instanceof JComponent)
4
			focusOwner = (JComponent) o;
4
			focusOwner = (JComponent) o;
5
		else
5
		else
6
			focusOwner = null;
6
			focusOwner = null;
7
	}
7
	}
8
	/**
8
	/**
9
	 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
9
	 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
10
	 */
10
	 */
11
	public void actionPerformed(ActionEvent e) {
11
	public void actionPerformed(ActionEvent e) {
12
		if (focusOwner == null)
12
		if (focusOwner == null)
13
			return;
13
			return;
14
		String action = (String) e.getActionCommand();
14
		String action = (String) e.getActionCommand();
15
		Action a = focusOwner.getActionMap().get(action);
15
		Action a = focusOwner.getActionMap().get(action);
16
		if (a != null)
16
		if (a != null)
17
			a.actionPerformed(new ActionEvent(focusOwner,
17
			a.actionPerformed(new ActionEvent(focusOwner,
18
					ActionEvent.ACTION_PERFORMED, null));
18
					ActionEvent.ACTION_PERFORMED, null));
19
	}
19
	}
20
	/**
20
	/**
21
	 * @see org.columba.core.gui.action.AbstractColumbaAction#isSingleton()
21
	 * @see org.columba.core.gui.action.AbstractColumbaAction#isSingleton()
22
	 */
22
	 */
23
	public boolean isSingleton() {
23
	public boolean isSingleton() {
24
		return true
24
		return true
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0