File path: /jEdit-4.2/src/bsh/NameSpace.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/SyntaxHiliteOptionPane.java | |||
Method name: BshMethod[] flattenMethodCollection(Enumeration)
|
Method name: void save()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 3 | |||
1 | if ( o instanceof BshMethod )↵ | |||
2 | v.addElement( o );↵ | |||
3 | else {↵ | |||
4 | Vector ov = (Vector)o;↵ | |||
5 | for(int i=0; i<ov.size(); i++)↵ | |||
6 | v.addElement( ov.elementAt( i ) );↵ | |||
7 | ↵ | 1 | for(int i = 0; i < styleChoices.size(); i++)↵ | |
2 | {↵ | |||
3 | StyleChoice ch = (StyleChoice)styleChoices↵ | |||
4 | .elementAt(i);↵ | |||
5 | jEdit.setProperty(ch.property,↵ | |||
6 | GUIUtilities.getStyleString(ch.style));↵ | |||
8 | } | 7 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 7 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (o instanceof BshMethod) | | ||||||||||||
5 | v.addElement(o); | | ||||||||||||
else | | |||||||||||||
6 | Vector ov = (Vector)o; |
| | |||||||||||
7 | for (int i = 0; i < ov.size(); i++) |
| 1 | for (int i = 0; i < styleChoices.size(); i++) | ||||||||||
|
| 2 | StyleChoice ch = (StyleChoice)styleChoices.elementAt(i); | |||||||||||
|
| 3 | jEdit.setProperty(ch.property, GUIUtilities.getStyleString(ch.style)); | |||||||||||
8 | v.addElement(ov.elementAt(i)); |
| |
Row | Violation |
---|---|
1 | Unmatched statement Vector ov=(Vector)o; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement StyleChoice ch=(StyleChoice)styleChoices.elementAt(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement jEdit.setProperty(ch.property,GUIUtilities.getStyleString(ch.style)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement v.addElement(ov.elementAt(i)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |