Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
17 | 2 | 6 | 0.978 | statement_sequence[5] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 17 | 103 | libraries/joomla/database/tablenested.php |
2 | 17 | 138 | libraries/joomla/database/tablenested.php |
| ||||
// Get the path from the node to the root. $select= ($diagnostic) ? 'SELECT p.' . $k . ', p.parent_id, p.level, p.lft, p.rgt' : 'SELECT p.*'; $this->_db->setQuery( $select . ' FROM `' . $this->_tbl . '` AS n, `' . $this->_tbl . '` AS p' . ' WHERE n.lft BETWEEN p.lft AND p.rgt' . ' AND n.' . $k . ' = ' . (int) $pk . ' ORDER BY p.lft'); $path= $this->_db->loadObjectList(); // Check for a database error. if ($this->_db->getErrorNum()) { $this->setError($this->_db->getErrorMsg()); return FALSE; } return $path; |
| ||||
// Get the node and children as a tree. $select= ($diagnostic) ? 'SELECT n.' . $k . ', n.parent_id, n.level, n.lft, n.rgt' : 'SELECT n.*'; $this->_db->setQuery( $select . ' FROM `' . $this->_tbl . '` AS n, `' . $this->_tbl . '` AS p' . ' WHERE n.lft BETWEEN p.lft AND p.rgt' . ' AND p.' . $k . ' = ' . (int) $pk . ' ORDER BY n.lft'); $tree= $this->_db->loadObjectList(); // Check for a database error. if ($this->_db->getErrorNum()) { $this->setError($this->_db->getErrorMsg()); return FALSE; } return $tree; |
| |||
// Get the node and children as a tree. // Get the path from the node to the root. $select=($diagnostic) ? [[#variable241867c0]] . $k . [[#variable24186740]] : [[#variable241866a0]]; $this->_db->setQuery($select . ' FROM `' . $this->_tbl . '` AS n, `' . $this->_tbl . '` AS p' . ' WHERE n.lft BETWEEN p.lft AND p.rgt' . [[#variable24186640]] . $k . ' = ' . (int) $pk . [[#variable24186620]]); [[#variable24186520]]=$this->_db->loadObjectList(); // Check for a database error. if ($this->_db->getErrorNum()) { $this->setError($this->_db->getErrorMsg()); return FALSE; } return [[#variable24186520]]; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#241867c0]] | 'SELECT n.' |
1 | 2 | [[#241867c0]] | 'SELECT p.' |
2 | 1 | [[#24186740]] | ', n.parent_id, n.level, n.lft, n.rgt' |
2 | 2 | [[#24186740]] | ', p.parent_id, p.level, p.lft, p.rgt' |
3 | 1 | [[#241866a0]] | 'SELECT n.*' |
3 | 2 | [[#241866a0]] | 'SELECT p.*' |
4 | 1 | [[#24186640]] | ' AND p.' |
4 | 2 | [[#24186640]] | ' AND n.' |
5 | 1 | [[#24186620]] | ' ORDER BY n.lft' |
5 | 2 | [[#24186620]] | ' ORDER BY p.lft' |
6 | 1 | [[#24186520]] | $tree |
6 | 2 | [[#24186520]] | $path |