Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
26 | 2 | 3 | 0.980 | class_member_list[2] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 26 | 133 | libraries/joomla/database/database/mysql.php |
2 | 26 | 150 | libraries/joomla/database/database/mysqli.php |
| ||||
/** * Select a database for use * * @access public * @param string $database * @return boolean True if the database has been successfully selected * @since 1.5 */ public function select($database) { if (! $database) { return FALSE; } if (!mysql_select_db($database, $this->_resource)) { $this->_errorNum = 3; $this->_errorMsg = 'Could not connect to database'; return FALSE; } return TRUE; } /** * Determines UTF support * * @access public * @return boolean True - UTF is supported */ public function hasUTF() { $verParts= explode('.', $this->getVersion()); return ($verParts[0] == 5 || ($verParts[0] == 4 && $verParts[1] == 1 && (int) $verParts[2]>= 2)); } |
| ||||
/** * Select a database for use * * @access public * @param string $database * @return boolean True if the database has been successfully selected * @since 1.5 */ public function select($database) { if (! $database) { return FALSE; } if (!mysqli_select_db($this->_resource ,$database)) { $this->_errorNum = 3; $this->_errorMsg = 'Could not connect to database'; return FALSE; } return TRUE; } /** * Determines UTF support * * @access public * @return boolean True - UTF is supported */ public function hasUTF() { $verParts= explode('.', $this->getVersion()); return ($verParts[0] == 5 || ($verParts[0] == 4 && $verParts[1] == 1 && (int) $verParts[2]>= 2)); } |
| |||
/** * Select a database for use * * @access public * @param string $database * @return boolean True if the database has been successfully selected * @since 1.5 */ public function select($database) { if (!$database) { return FALSE; } if (! [[#variable3c64ad40]]( [[#variable3eafdd00]], [[#variable3c64ac00]])) { $this->_errorNum =3; $this->_errorMsg ='Could not connect to database'; return FALSE; } return TRUE; } /** * Determines UTF support * * @access public * @return boolean True - UTF is supported */ /** * Determines UTF support * * @access public * @return boolean True - UTF is supported */ public function hasUTF() { $verParts=explode('.',$this->getVersion()); return ($verParts[0] == 5 || ($verParts[0] == 4 && $verParts[1] == 1 && (int) $verParts[2]>=2)); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#3c64ad40]] | mysql_select_db |
1 | 2 | [[#3c64ad40]] | mysqli_select_db |
2 | 1 | [[#3eafdd00]] | $database |
2 | 2 | [[#3eafdd00]] | $this->_resource |
3 | 1 | [[#3c64ac00]] | $this->_resource |
3 | 2 | [[#3c64ac00]] | $database |