File path: /jakarta-jmeter-2.3.2/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java | File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/junit/JMeterTest.java | |||
Method name: void stateChanged(ChangeEvent)
|
Method name: Collection getObjects(Class)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if ( event.getSource() == filterpkg) {↵ | |||
2 | FILTER.setPackges(JOrphanUtils.split(filterpkg.getText(),",")); //$NON-NLS-1$↵ | |||
3 | classnameCombo.removeAllItems();↵ | |||
4 | // change the classname drop down↵ | |||
5 | Object[] clist = FILTER.filterArray(CLASSLIST);↵ | |||
6 | ↵ | 1 | System.out.println("Class path is:");↵ | |
2 | String cp = System.getProperty("java.class.path");↵ | |||
3 | String cpe[] = JOrphanUtils.split(cp, java.io.File.pathSeparator);↵ | |||
7 | for (int idx=0; idx < clist.length; idx++) {↵ | 4 | for (int i = 0; i < cpe.length; i++) {↵ | |
8 | classnameCombo.addItem(clist[idx]);↵ | |||
9 | }↵ | |||
10 | } | 5 | System.out.println(cpe[i]);↵ | |
6 | }↵ | |||
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 17 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 1.1 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | FILTER.setPackges(JOrphanUtils.split(filterpkg.getText(), ",")); | | |||||||||||||||||||||||||
3 | classnameCombo.removeAllItems(); | | |||||||||||||||||||||||||
4 | Object[] clist = FILTER.filterArray(CLASSLIST); | | |||||||||||||||||||||||||
| 26 | System.out.println("Class path is:"); | |||||||||||||||||||||||||
| 27 | String cp = System.getProperty("java.class.path"); | |||||||||||||||||||||||||
| 28 | String cpe[] = JOrphanUtils.split(cp, java.io.File.pathSeparator); | |||||||||||||||||||||||||
5 | for (int idx = 0; idx < clist.length; idx++) |
| 29 | for (int i = 0; i < cpe.length; i++) | |||||||||||||||||||||||
6 | classnameCombo.addItem(clist[idx]); |
| | ||||||||||||||||||||||||
|
| 30 | System.out.println(cpe[i]); | ||||||||||||||||||||||||
| 31 | classPathShown = true; |
Row | Violation |
---|---|
1 | Type java.lang.Object[] of variable clist does not match with type java.lang.String[] of variable cpe |
2 | Unmatched statement classnameCombo.addItem(clist[idx]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement System.out.println(cpe[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |