CloneSet239


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
20210.998statement_sequence[7]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12063
libraries/joomla/form/rules/email.php
22037
libraries/joomla/form/rules/username.php
Clone Instance
1
Line Count
20
Source Line
63
Source File
libraries/joomla/form/rules/email.php

                        $key=     $field->attributes('field');
                        $value=   isset ($values[$key])
                                  ?                      $values[$key]
                                  :                                      0;
                        // Check the rule.
                        if (!$key) {
                                return new JException('Invalid Form Rule :: '
                                                      .                       get_class($this));
                              }
                        // Check if the username is unique.
                        $db=  &JFactory::getDbo();
                        $db->setQuery(
                                'SELECT count(*) FROM `#__users`'
                                . ' WHERE `email` = '
                                .                   $db->Quote($values[$name])
                                . ' AND '
                                .       $db->nameQuote($key)
                                .                            ' != '
                                .                                   $db->Quote($value));
                        $duplicate=  (bool) $db->loadResult();
                        // Check for a database error.
                        if ($db->getErrorNum()) {
                                return new JException('Database Error :: '
                                                      .                    $db->getErrorMsg());
                              }


Clone Instance
2
Line Count
20
Source Line
37
Source File
libraries/joomla/form/rules/username.php

                $key=     $field->attributes('field');
                $value=   isset ($values[$key])
                          ?                      $values[$key]
                          :                                      0;
                // Check the rule.
                if (!$key) {
                        return new JException('Invalid Form Rule :: '
                                              .                       get_class($this));
                      }
                // Check if the username is unique.
                $db=  &JFactory::getDbo();
                $db->setQuery(
                        'SELECT count(*) FROM `#__users`'
                        . ' WHERE `username` = '
                        .                      $db->Quote($values[$name])
                        . ' AND '
                        .       $db->nameQuote($key)
                        .                            ' != '
                        .                                   $db->Quote($value));
                $duplicate=  (bool) $db->loadResult();
                // Check for a database error.
                if ($db->getErrorNum()) {
                        return new JException('Database Error :: '
                                              .                    $db->getErrorMsg());
                      }


Clone AbstractionParameter Count: 1Parameter Bindings

$key=$field->attributes('field');
$value= isset ($values[$key])
        ? $values[$key]
        : 0;
// Check the rule.
if (!$key) {
  return new JException('Invalid Form Rule :: '
                        . get_class($this));
}
// Check if the username is unique.
$db= &JFactory::getDbo();
$db->setQuery('SELECT count(*) FROM `#__users`'
              .  [[#variable4e4d4e00]]
              . $db->Quote($values[$name])
              . ' AND '
              . $db->nameQuote($key)
              . ' != '
              . $db->Quote($value));
$duplicate= (bool) $db->loadResult();
// Check for a database error.
if ($db->getErrorNum()) {
  return new JException('Database Error :: '
                        . $db->getErrorMsg());
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4e4d4e00]]
' WHERE `username` = ' 
12[[#4e4d4e00]]
' WHERE `email` = '