File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/DescriptorHandler.java | |||
Method name: void endElement(String)
|
Method name: void startElement(String, AttributeList)
|
|||
Number of AST nodes: 15 | Number of AST nodes: 14 | |||
1 | processElement();↵ | |||
2 | currentText = "";↵ | 1 | this.currentElement = name;↵ | |
3 | this.currentElement = "";↵ | 2 | currentText = "";↵ | |
4 | if (name.equals(EJB_REF) || name.equals(EJB_LOCAL_REF)) {↵ | 3 | if (name.equals(EJB_REF) || name.equals(EJB_LOCAL_REF)) {↵ | |
5 | inEJBRef = false;↵ | 4 | inEJBRef = true;↵ | |
6 | } else if (parseState == STATE_IN_ENTITY && name.equals(ENTITY_BEAN)) {↵ | 5 | } else if (parseState == STATE_LOOKING_EJBJAR && name.equals(EJB_JAR)) {↵ | |
7 | parseState = STATE_IN_BEANS;↵ | 6 | parseState = STATE_IN_EJBJAR;↵ | |
8 | } else if (parseState == STATE_IN_SESSION && name.equals(SESSION_BEAN)) {↵ | 7 | } else if (parseState == STATE_IN_EJBJAR && name.equals(ENTERPRISE_BEANS)) {↵ | |
9 | parseState = STATE_IN_BEANS;↵ | 8 | parseState = STATE_IN_BEANS;↵ | |
10 | } else if (parseState == STATE_IN_MESSAGE && name.equals(MESSAGE_BEAN)) {↵ | 9 | } else if (parseState == STATE_IN_BEANS && name.equals(SESSION_BEAN)) {↵ | |
11 | parseState = STATE_IN_BEANS;↵ | 10 | parseState = STATE_IN_SESSION;↵ | |
12 | } else if (parseState == STATE_IN_BEANS && name.equals(ENTERPRISE_BEANS)) {↵ | 11 | } else if (parseState == STATE_IN_BEANS && name.equals(ENTITY_BEAN)) {↵ | |
13 | parseState = STATE_IN_EJBJAR;↵ | 12 | parseState = STATE_IN_ENTITY;↵ | |
14 | } else if (parseState == STATE_IN_EJBJAR && name.equals(EJB_JAR)) {↵ | 13 | } else if (parseState == STATE_IN_BEANS && name.equals(MESSAGE_BEAN)) {↵ | |
15 | parseState = STATE_LOOKING_EJBJAR;↵ | 14 | parseState = STATE_IN_MESSAGE;↵ | |
16 | } | 15 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 4.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 102 |
Number of mapped statements | 14 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 4.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | processElement(); | | |||||||||||||||
2 | currentText = ""; | 2 | currentText = ""; | ||||||||||||||
3 | this.currentElement = ""; |
| 1 | this.currentElement = name; | |||||||||||||
4 | if (name.equals(EJB_REF) || name.equals(EJB_LOCAL_REF)) | 3 | if (name.equals(EJB_REF) || name.equals(EJB_LOCAL_REF)) | ||||||||||||||
5 | inEJBRef = false; |
| 4 | inEJBRef = true; | |||||||||||||
6 | else if (parseState == STATE_IN_ENTITY && name.equals(ENTITY_BEAN)) |
| 7 | else if (parseState == STATE_IN_EJBJAR && name.equals(ENTERPRISE_BEANS)) | |||||||||||||
7 | parseState = STATE_IN_BEANS; | 8 | parseState = STATE_IN_BEANS; | ||||||||||||||
8 | else if (parseState == STATE_IN_SESSION && name.equals(SESSION_BEAN)) |
| 9 | else if (parseState == STATE_IN_BEANS && name.equals(SESSION_BEAN)) | |||||||||||||
9 | parseState = STATE_IN_BEANS; |
| 10 | parseState = STATE_IN_SESSION; | |||||||||||||
10 | else if (parseState == STATE_IN_MESSAGE && name.equals(MESSAGE_BEAN)) |
| 13 | else if (parseState == STATE_IN_BEANS && name.equals(MESSAGE_BEAN)) | |||||||||||||
11 | parseState = STATE_IN_BEANS; |
| 14 | parseState = STATE_IN_MESSAGE; | |||||||||||||
12 | else if (parseState == STATE_IN_BEANS && name.equals(ENTERPRISE_BEANS)) |
| 11 | else if (parseState == STATE_IN_BEANS && name.equals(ENTITY_BEAN)) | |||||||||||||
13 | parseState = STATE_IN_EJBJAR; |
| 12 | parseState = STATE_IN_ENTITY; | |||||||||||||
14 | else if (parseState == STATE_IN_EJBJAR && name.equals(EJB_JAR)) |
| 5 | else if (parseState == STATE_LOOKING_EJBJAR && name.equals(EJB_JAR)) | |||||||||||||
15 | parseState = STATE_LOOKING_EJBJAR; |
| 6 | parseState = STATE_IN_EJBJAR; |
Row | Violation |
---|