while(st.hasMoreTokens()) { String button = st.nextToken(); if(button.equals("-")) toolBar.add(Box.createHorizontalStrut(12)); else { JButton b = loadToolButton(context,button); if(b != null) toolBar.add(b); } }
if(abbrevHash != null) { Enumeration abbrevEnum = abbrevHash.keys(); Enumeration expandEnum = abbrevHash.elements(); while(abbrevEnum.hasMoreElements()) { abbrevs.addElement(new Abbrev((String)abbrevEnum.nextElement(), (String)expandEnum.nextElement())); } sort(0); }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/GUIUtilities.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/AbbrevsOptionPane.java
Method name: Box loadToolBar(ActionContext, String) Method name: void AbbrevsModel(Hashtable)
Number of AST nodes: 7 Number of AST nodes: 6
1
while(st.hasMoreTokens())
1
if(abbrevHash != null)
2
			{
2
		{
3
				String button = st.nextToken();
3
			
4
				if(button.equals("-"))
5
					toolBar.add(Box.createHorizontalStrut(12
4
Enumeration abbrevEnum = abbrevHash.keys();
5
			Enumeration expandEnum = abbrevHash.elements();
6
));
6
			while(abbrevEnum.hasMoreElements())
7
				else
7
			
8
				{
9
					JButton b = loadToolButton(context,button);
10
					if(b != null)
8
{
9
				abbrevs.addElement(new Abbrev((String)abbrevEnum.nextElement(),
10
					(String)expandEnum.nextElement()));
11
						toolBar.add(b);
11
			
12
				}
13
	
12
}
13
			sort(0);
14
		}
14
		}
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 locationClones are in different classes
Number of node comparisons1