CloneSet503


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
17260.978statement_sequence[5]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
117103
libraries/joomla/database/tablenested.php
217138
libraries/joomla/database/tablenested.php
Clone Instance
1
Line Count
17
Source Line
103
Source File
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;


Clone Instance
2
Line Count
17
Source Line
138
Source File
libraries/joomla/database/tablenested.php

                // 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;


Clone AbstractionParameter Count: 6Parameter Bindings

// 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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#241867c0]]
'SELECT n.' 
12[[#241867c0]]
'SELECT p.' 
21[[#24186740]]
', n.parent_id, n.level, n.lft, n.rgt' 
22[[#24186740]]
', p.parent_id, p.level, p.lft, p.rgt' 
31[[#241866a0]]
'SELECT n.*' 
32[[#241866a0]]
'SELECT p.*' 
41[[#24186640]]
' AND p.' 
42[[#24186640]]
' AND n.' 
51[[#24186620]]
' ORDER BY n.lft' 
52[[#24186620]]
' ORDER BY p.lft' 
61[[#24186520]]
$tree 
62[[#24186520]]
$path