File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantPool.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/optional/ScriptRunner.java | |||
Method name: int getNameAndTypeEntry(String, String)
|
Method name: void declareBeans(BSFManager)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | Object element = entries.elementAt(i↵ | 1 | String key = (String) i.next();↵ | |
2 | );↵ | 2 | Object value = getBeans().get(key);↵ | |
3 | if (element instanceof NameAndTypeCPInfo) {↵ | 3 | if (↵ | |
4 | NameAndTypeCPInfo nameAndTypeEntry↵ | 4 | value != null) {↵ | |
5 | m.declareBean(key, value, value.getClass());↵ | |||
5 | = (NameAndTypeCPInfo) element;↵ | 6 | ↵ | |
6 | if (nameAndTypeEntry.getName().equals(name)↵ | |||
7 | && nameAndTypeEntry.getType().equals(type)) {↵ | |||
8 | index = i;↵ | |||
9 | }↵ | 7 | } else {↵ | |
8 | // BSF uses a hashtable to store values↵ | |||
9 | // so cannot declareBean with a null value↵ | |||
10 | // So need to remove any bean of this name as↵ | |||
11 | // that bean should not be visible↵ | |||
12 | m.undeclareBean(key);↵ | |||
10 | } | 13 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |