File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Project.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/FilterSet.java | |||
Method name: void setSystemProperties()
|
Method name: void readFiltersFromFile(File)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | while (e.hasMoreElements()) {↵ | 1 | while (e.hasMoreElements()) {↵ | |
2 | String propertyName = (String) e.nextElement();↵ | 2 | String strPropName = (String) e.nextElement();↵ | |
3 | String value = systemP.getProperty(propertyName);↵ | 3 | String strValue = props.getProperty(strPropName);↵ | |
4 | this.setPropertyInternal(propertyName, value);↵ | 4 | filts.addElement(new Filter(strPropName, strValue));↵ | |
5 | } | 5 | } | |
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 16 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | while (e.hasMoreElements()) | 14 | while (e.hasMoreElements()) | |||||||||||||||||
4 | String propertyName = (String)e.nextElement(); |
| 15 | String strPropName = (String)e.nextElement(); | ||||||||||||||||
5 | String value = systemP.getProperty(propertyName); |
| 16 | String strValue = props.getProperty(strPropName); | ||||||||||||||||
6 | this.setPropertyInternal(propertyName, value); |
| | |||||||||||||||||
|
| 17 | filts.addElement(new Filter(strPropName, strValue)); |
Row | Violation |
---|---|
1 | Unmatched statement this.setPropertyInternal(propertyName,value); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement filts.addElement(new Filter(strPropName,strValue)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variables propertyName, value , while Clone fragment #2 returns variables strPropName, strValue |