File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/converters/TestElementConverter.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/converters/TestElementPropertyConverter.java | |||
Method name: void marshal(Object, HierarchicalStreamWriter, MarshallingContext)
|
Method name: void marshal(Object, HierarchicalStreamWriter, MarshallingContext)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | while (iter.hasNext()) {↵ | 1 | while (iter.hasNext()) {↵ | |
2 | JMeterProperty jmp=iter.next();↵ | 2 | JMeterProperty jmp=iter.next();↵ | |
3 | // Skip special properties if required↵ | 3 | // Skip special properties if required↵ | |
4 | if (!testFormat22 || !ConversionHelp.isSpecialProperty(jmp.getName())) ↵ | 4 | if (!testFormat22 || !ConversionHelp.isSpecialProperty(jmp.getName())) ↵ | |
5 | {↵ | 5 | {↵ | |
6 | // Don't save empty comments - except for the TestPlan (to maintain compatibility)↵ | 6 | // Don't save empty comments↵ | |
7 | if (!(↵ | 7 | if (!(↵ | |
8 | TestElement.COMMENTS.equals(jmp.getName())↵ | 8 | TestElement.COMMENTS.equals(jmp.getName())↵ | |
9 | && jmp.getStringValue().length()==0↵ | 9 | && jmp.getStringValue().length()==0↵ | |
10 | && !el.getClass().equals(TestPlan.class)↵ | |||
11 | ))↵ | 10 | ))↵ | |
12 | {↵ | 11 | {↵ | |
13 | writeItem(jmp, context, writer);↵ | 12 | writeItem(jmp, context, writer);↵ | |
14 | }↵ | 13 | }↵ | |
15 | }↵ | 14 | }↵ | |
16 | } | 15 |
| |
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.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 8.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | while (iter.hasNext()) | 9 | while (iter.hasNext()) | ||||||||||||||||
6 | JMeterProperty jmp = iter.next(); | 10 | JMeterProperty jmp = iter.next(); | ||||||||||||||||
7 | if (!testFormat22 || !ConversionHelp.isSpecialProperty(jmp.getName())) | 11 | if (!testFormat22 || !ConversionHelp.isSpecialProperty(jmp.getName())) | ||||||||||||||||
8 | if (!(TestElement.COMMENTS.equals(jmp.getName()) && jmp.getStringValue().length() == 0 && !el.getClass().equals(TestPlan.class))) |
| 12 | if (!(TestElement.COMMENTS.equals(jmp.getName()) && jmp.getStringValue().length() == 0)) | |||||||||||||||
9 | writeItem(jmp, context, writer); | 13 | writeItem(jmp, context, writer); |
Row | Violation |
---|---|
1 | Expression TestElement.COMMENTS.equals(jmp.getName()) && jmp.getStringValue().length() == 0 && !el.getClass().equals(TestPlan.class) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression TestElement.COMMENTS.equals(jmp.getName()) && jmp.getStringValue().length() == 0 cannot be parameterized, because it has dependencies to/from statements that will be extracted |