File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/regexp/RegexpFactory.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java | |||
Method name: Regexp newRegexp(Project)
|
Method name: RegexpMatcher newRegexpMatcher(Project)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | Throwable cause = null;↵ | 1 | Throwable cause = null;↵ | |
2 | try {↵ | 2 | try {↵ | |
3 | testAvailability("java.util.regex.Matcher");↵ | 3 | testAvailability("java.util.regex.Matcher");↵ | |
4 | return createRegexpInstance("org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp");↵ | 4 | return createInstance("org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher");↵ | |
5 | } catch (BuildException be) {↵ | 5 | } catch (BuildException be) {↵ | |
6 | cause = orCause(cause, be, JavaEnvUtils.getJavaVersionNumber() < 14);↵ | 6 | cause = orCause(cause, be, JavaEnvUtils.getJavaVersionNumber() < 14);↵ | |
7 | }↵ | 7 | }↵ | |
8 | try {↵ | 8 | try {↵ | |
9 | testAvailability("org.apache.oro.text.regex.Pattern");↵ | 9 | testAvailability("org.apache.oro.text.regex.Pattern");↵ | |
10 | return createRegexpInstance("org.apache.tools.ant.util.regexp.JakartaOroRegexp");↵ | 10 | return createInstance("org.apache.tools.ant.util.regexp.JakartaOroMatcher");↵ | |
11 | } catch (BuildException be) {↵ | 11 | } catch (BuildException be) {↵ | |
12 | cause = orCause(cause, be, true);↵ | 12 | cause = orCause(cause, be, true);↵ | |
13 | } | 13 |
| |
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.9 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 29 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
7 | Throwable cause = null; | 7 | Throwable cause = null; | |||||
8 | try | 8 | try | |||||
9 | testAvailability("java.util.regex.Matcher"); | 9 | testAvailability("java.util.regex.Matcher"); | |||||
|
| 10 | return createInstance("org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher"); | |||||
10 | return createRegexpInstance("org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp"); |
| | |||||
11 | try | 11 | try | |||||
12 | testAvailability("org.apache.oro.text.regex.Pattern"); | 12 | testAvailability("org.apache.oro.text.regex.Pattern"); | |||||
|
| 13 | return createInstance("org.apache.tools.ant.util.regexp.JakartaOroMatcher"); | |||||
13 | return createRegexpInstance("org.apache.tools.ant.util.regexp.JakartaOroRegexp"); |
| |
Row | Violation |
---|---|
1 | Unmatched statement return createInstance("org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher"); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
2 | Unmatched return createInstance("org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher"); |
3 | Unmatched statement return createRegexpInstance("org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp"); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
4 | Unmatched return createRegexpInstance("org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp"); |
5 | Unmatched statement return createInstance("org.apache.tools.ant.util.regexp.JakartaOroMatcher"); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
6 | Unmatched return createInstance("org.apache.tools.ant.util.regexp.JakartaOroMatcher"); |
7 | Unmatched statement return createRegexpInstance("org.apache.tools.ant.util.regexp.JakartaOroRegexp"); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
8 | Unmatched return createRegexpInstance("org.apache.tools.ant.util.regexp.JakartaOroRegexp"); |