Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
33 | 2 | 2 | 0.997 | class_member |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 33 | 290 | libraries/joomla/database/database/mysql.php |
2 | 33 | 306 | libraries/joomla/database/database/mysqli.php |
| ||||
/** * Diagnostic function * * @access public * @return string */ public function explain() { $temp= $this->_sql; $this->_sql = "EXPLAIN $this->_sql"; if (!($cur= $this->query())) { return NULL; } $first= TRUE; $buffer= '<table id="explain-sql">'; $buffer.= '<thead><tr><td colspan="99">' . $this->getQuery() . '</td></tr>'; while ($row= mysql_fetch_assoc($cur)) { if ($first) { $buffer.= '<tr>'; foreach ($row as $k => $v) { $buffer.= '<th>' . $k . '</th>'; } $buffer.= '</tr>'; $first= FALSE; } $buffer.= '</thead><tbody><tr>'; foreach ($row as $k => $v) { $buffer.= '<td>' . $v . '</td>'; } $buffer.= '</tr>'; } $buffer.= '</tbody></table>'; mysql_free_result($cur); $this->_sql = $temp; return $buffer; } |
| ||||
/** * Diagnostic function * * @access public * @return string */ public function explain() { $temp= $this->_sql; $this->_sql = "EXPLAIN $this->_sql"; if (!($cur= $this->query())) { return NULL; } $first= TRUE; $buffer= '<table id="explain-sql">'; $buffer.= '<thead><tr><td colspan="99">' . $this->getQuery() . '</td></tr>'; while ($row= mysqli_fetch_assoc($cur)) { if ($first) { $buffer.= '<tr>'; foreach ($row as $k => $v) { $buffer.= '<th>' . $k . '</th>'; } $buffer.= '</tr>'; $first= FALSE; } $buffer.= '</thead><tbody><tr>'; foreach ($row as $k => $v) { $buffer.= '<td>' . $v . '</td>'; } $buffer.= '</tr>'; } $buffer.= '</tbody></table>'; mysqli_free_result($cur); $this->_sql = $temp; return $buffer; } |
| |||
/** * Diagnostic function * * @access public * @return string */ /** * Diagnostic function * * @access public * @return string */ public function explain() { $temp=$this->_sql; $this->_sql = "EXPLAIN $this->_sql"; if (!($cur=$this->query())) { return NULL; } $first=TRUE; $buffer='<table id="explain-sql">'; $buffer.='<thead><tr><td colspan="99">' . $this->getQuery() . '</td></tr>'; while ($row= [[#variable3f9c3300]]($cur)) { if ($first) { $buffer.='<tr>'; foreach ($row as $k => $v) { $buffer.='<th>' . $k . '</th>'; } $buffer.='</tr>'; $first=FALSE; } $buffer.='</thead><tbody><tr>'; foreach ($row as $k => $v) { $buffer.='<td>' . $v . '</td>'; } $buffer.='</tr>'; } $buffer.='</tbody></table>'; [[#variable3f9c32a0]]($cur); $this->_sql =$temp; return $buffer; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#3f9c3300]] | mysqli_fetch_assoc |
1 | 2 | [[#3f9c3300]] | mysql_fetch_assoc |
2 | 1 | [[#3f9c32a0]] | mysqli_free_result |
2 | 2 | [[#3f9c32a0]] | mysql_free_result |