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 startElement(String, AttributeList)
|
Method name: void endElement(String)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 15 | |||
1 | this.currentElement = name↵ | 1 | processElement();↵ | |
2 | ;↵ | 2 | currentText = "";↵ | |
3 | currentText = "";↵ | 3 | this.currentElement = "";↵ | |
4 | if (name.equals(EJB_REF) || name.equals(EJB_LOCAL_REF)) {↵ | 4 | if (name.equals(EJB_REF) || name.equals(EJB_LOCAL_REF)) {↵ | |
5 | inEJBRef = true;↵ | 5 | inEJBRef = false;↵ | |
6 | } else if (parseState == STATE_LOOKING_EJBJAR && name.equals(EJB_JAR)) {↵ | 6 | } else if (parseState == STATE_IN_ENTITY && name.equals(ENTITY_BEAN)) {↵ | |
7 | parseState = STATE_IN_EJBJAR;↵ | 7 | parseState = STATE_IN_BEANS;↵ | |
8 | } else if (parseState == STATE_IN_EJBJAR && name.equals(ENTERPRISE_BEANS)) {↵ | 8 | } else if (parseState == STATE_IN_SESSION && name.equals(SESSION_BEAN)) {↵ | |
9 | parseState = STATE_IN_BEANS;↵ | 9 | parseState = STATE_IN_BEANS;↵ | |
10 | } else if (parseState == STATE_IN_BEANS && name.equals(SESSION_BEAN)) {↵ | 10 | } else if (parseState == STATE_IN_MESSAGE && name.equals(MESSAGE_BEAN)) {↵ | |
11 | parseState = STATE_IN_SESSION;↵ | 11 | parseState = STATE_IN_BEANS;↵ | |
12 | } else if (parseState == STATE_IN_BEANS && name.equals(ENTITY_BEAN)) {↵ | 12 | } else if (parseState == STATE_IN_BEANS && name.equals(ENTERPRISE_BEANS)) {↵ | |
13 | parseState = STATE_IN_ENTITY;↵ | 13 | parseState = STATE_IN_EJBJAR;↵ | |
14 | } else if (parseState == STATE_IN_BEANS && name.equals(MESSAGE_BEAN)) {↵ | 14 | } else if (parseState == STATE_IN_EJBJAR && name.equals(EJB_JAR)) {↵ | |
15 | parseState = STATE_IN_MESSAGE;↵ | 15 | parseState = STATE_LOOKING_EJBJAR;↵ | |
16 | } | 16 |
| |
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) | 3.9 |
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 | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 3.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | processElement(); | |||||||||||||||
1 | this.currentElement = name; |
| 3 | this.currentElement = ""; | |||||||||||||
2 | currentText = ""; | 2 | currentText = ""; | ||||||||||||||
3 | if (name.equals(EJB_REF) || name.equals(EJB_LOCAL_REF)) | 4 | if (name.equals(EJB_REF) || name.equals(EJB_LOCAL_REF)) | ||||||||||||||
4 | inEJBRef = true; |
| 5 | inEJBRef = false; | |||||||||||||
5 | else if (parseState == STATE_LOOKING_EJBJAR && name.equals(EJB_JAR)) |
| 12 | else if (parseState == STATE_IN_BEANS && name.equals(ENTERPRISE_BEANS)) | |||||||||||||
6 | parseState = STATE_IN_EJBJAR; | 13 | parseState = STATE_IN_EJBJAR; | ||||||||||||||
7 | else if (parseState == STATE_IN_EJBJAR && name.equals(ENTERPRISE_BEANS)) |
| 6 | else if (parseState == STATE_IN_ENTITY && name.equals(ENTITY_BEAN)) | |||||||||||||
8 | parseState = STATE_IN_BEANS; | 7 | parseState = STATE_IN_BEANS; | ||||||||||||||
9 | else if (parseState == STATE_IN_BEANS && name.equals(SESSION_BEAN)) |
| 8 | else if (parseState == STATE_IN_SESSION && name.equals(SESSION_BEAN)) | |||||||||||||
10 | parseState = STATE_IN_SESSION; |
| 9 | parseState = STATE_IN_BEANS; | |||||||||||||
11 | else if (parseState == STATE_IN_BEANS && name.equals(ENTITY_BEAN)) |
| 10 | else if (parseState == STATE_IN_MESSAGE && name.equals(MESSAGE_BEAN)) | |||||||||||||
12 | parseState = STATE_IN_ENTITY; |
| 11 | parseState = STATE_IN_BEANS; | |||||||||||||
13 | else if (parseState == STATE_IN_BEANS && name.equals(MESSAGE_BEAN)) |
| 14 | else if (parseState == STATE_IN_EJBJAR && name.equals(EJB_JAR)) | |||||||||||||
14 | parseState = STATE_IN_MESSAGE; |
| 15 | parseState = STATE_LOOKING_EJBJAR; |
Row | Violation |
---|