for(int i = 0; i < fields.length; i++) { Field field = fields[i]; String name = field.getName(); if(name.startsWith("VK_") && field.getInt(null) == keyCode) { return name.substring(3); } }
for(int i = 0; i < actions.length; i++) { EditAction action = actions[i]; String label = action.getLabel(); if(label == null) continue; listModel.addElement(new ToolBarOptionPane.Button( action.getName(),null,null,label)); }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/GrabKeyDialog.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/ToolBarOptionPane.java
Method name: String getSymbolicName(int) Method name: void updateList()
Number of AST nodes: 5 Number of AST nodes: 6
1
for(int i = 0; i < fields.length; i++)
1
for(int i = 0; i < actions.length; i++)
2
			{
2
		{
3
				Field field = fields[i];
3
			EditAction action = actions[i];
4
				String name = field.getName();
4
			String label = action.getLabel();
5
				if(name.startsWith("VK_")
5
			if(
6
					&& field.getInt(null) == keyCode)
7
				{
8
					return name.substring(3);
9
				}
10
	
6
label == null)
7
				continue;
8
			listModel.addElement(new ToolBarOptionPane.Button(
9
				action.getName(),null,null,label));
11
		}
10
		}
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons1