File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/Mappings.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/Mappings.java | |||
Method name: String getPhysicalColumnName(String, Table)
|
Method name: String getLogicalColumnName(String, Table)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | ColumnNames binding = (ColumnNames) columnNameBindingPerTable.get(currentTable);↵ | 1 | ColumnNames binding = (ColumnNames) columnNameBindingPerTable.get(currentTable);↵ | |
2 | if (binding != null) {↵ | 2 | if (binding != null) {↵ | |
3 | finalName = (String) binding.logicalToPhysical.get( logicalName );↵ | 3 | logical = (String) binding.physicalToLogical.get( physicalName );↵ | |
4 | }↵ | 4 | }↵ | |
5 | String key = buildTableNameKey( currentTable.getSchema(), currentTable.getCatalog(), currentTable.getName() );↵ | 5 | String key = buildTableNameKey( currentTable.getSchema(), currentTable.getCatalog(), currentTable.getName() );↵ | |
6 | TableDescription description = (TableDescription) tableNameBinding.get(key);↵ | 6 | description = (TableDescription) tableNameBinding.get(key);↵ | |
7 | if (description != null) currentTable = description.denormalizedSupertable; | 7 |
| |
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 23 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 5.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | ColumnNames binding = (ColumnNames)columnNameBindingPerTable.get(currentTable); | 4 | ColumnNames binding = (ColumnNames)columnNameBindingPerTable.get(currentTable); | |||||||||||||||||||
5 | if (binding != null) | 5 | if (binding != null) | |||||||||||||||||||
6 | finalName = (String)binding.logicalToPhysical.get(logicalName); |
| 6 | logical = (String)binding.physicalToLogical.get(physicalName); | ||||||||||||||||||
7 | String key = buildTableNameKey(currentTable.getSchema(), currentTable.getCatalog(), currentTable.getName()); | 7 | String key = buildTableNameKey(currentTable.getSchema(), currentTable.getCatalog(), currentTable.getName()); | |||||||||||||||||||
8 | TableDescription description = (TableDescription)tableNameBinding.get(key); | 8 | description = (TableDescription)tableNameBinding.get(key); | |||||||||||||||||||
9 | if (description != null) | 9 | if (description != null) | |||||||||||||||||||
10 | currentTable = description.denormalizedSupertable; | 10 | currentTable = description.denormalizedSupertable; |
Row | Violation |
---|---|
1 | Expression binding.logicalToPhysical cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression binding.physicalToLogical cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variables finalName, currentTable , while Clone fragment #2 returns variables logical, description, currentTable |