CloneSet82


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
43260.994if_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
14340
components/com_users/controllers/reset.php
243169
components/com_users/controllers/reset.php
Clone Instance
1
Line Count
43
Source Line
40
Source File
components/com_users/controllers/reset.php

                // Check for a hard error.
                if (JError::isError($return))
                {
                        // Get the error message to display.
                        if ($app->getCfg('error_reporting')) {
                                $message=  $return->getMessage();
                              }
                        else   {
                                $message=  JText::_('USERS_RESET_REQUEST_ERROR');
                              }
                        // Get the route to the next page.
                        $itemid=  UsersHelperRoute::getResetRoute();
                        $itemid=  $itemid !== NULL
                                  ?                  '&Itemid='
                                                     .          $itemid
                                  :                                       '';
                        $route=   'index.php?option=com_users&view=reset'
                                  .                                       $itemid;
                        // Go back to the request form.
                        $this->setRedirect(JRoute::_($route, FALSE), $message, 'error');
                        return FALSE;
                      }
                // The request failed.
                elseif ($return === FALSE)
                {
                        // Get the route to the next page.
                        $itemid=  UsersHelperRoute::getResetRoute();
                        $itemid=  $itemid !== NULL
                                  ?                  '&Itemid='
                                                     .          $itemid
                                  :                                       '';
                        $route=   'index.php?option=com_users&view=reset'
                                  .                                       $itemid;
                        // Go back to the request form.
                        $message=  JText::sprintf('USERS_RESET_REQUEST_FAILED', $model->getError());
                        $this->setRedirect(JRoute::_($route, FALSE), $message, 'notice');
                        return FALSE;
                      }
                // The request succeeded.
                else {
                        // Get the route to the next page.
                        $itemid=  UsersHelperRoute::getResetRoute();
                        $itemid=  $itemid !== NULL
                                  ?                  '&Itemid='
                                                     .          $itemid
                                  :                                       '';
                        $route=   'index.php?option=com_users&view=reset&layout=confirm'
                                  .                                                      $itemid;
                        // Proceed to step two.
                        $message=  JText::_('USERS_RESET_REQUEST_SUCCESS');
                        $this->setRedirect(JRoute::_($route, FALSE), $message);
                        return TRUE;
                      }


Clone Instance
2
Line Count
43
Source Line
169
Source File
components/com_users/controllers/reset.php

                // Check for a hard error.
                if (JError::isError($return))
                {
                        // Get the error message to display.
                        if ($app->getCfg('error_reporting')) {
                                $message=  $return->getMessage();
                              }
                        else   {
                                $message=  JText::_('USERS_RESET_COMPLETE_ERROR');
                              }
                        // Get the route to the next page.
                        $itemid=  UsersHelperRoute::getResetRoute();
                        $itemid=  $itemid !== NULL
                                  ?                  '&Itemid='
                                                     .          $itemid
                                  :                                       '';
                        $route=   'index.php?option=com_users&view=reset&layout=complete'
                                  .                                                       $itemid;
                        // Go back to the complete form.
                        $this->setRedirect(JRoute::_($route, FALSE), $message, 'error');
                        return FALSE;
                      }
                // Complete failed.
                elseif ($return === FALSE)
                {
                        // Get the route to the next page.
                        $itemid=  UsersHelperRoute::getResetRoute();
                        $itemid=  $itemid !== NULL
                                  ?                  '&Itemid='
                                                     .          $itemid
                                  :                                       '';
                        $route=   'index.php?option=com_users&view=reset&layout=complete'
                                  .                                                       $itemid;
                        // Go back to the complete form.
                        $message=  JText::sprintf('USERS_RESET_COMPLETE_FAILED', $model->getError());
                        $this->setRedirect(JRoute::_($route, FALSE), $message, 'notice');
                        return FALSE;
                      }
                // Complete succeeded.
                else {
                        // Get the route to the next page.
                        $itemid=  UsersHelperRoute::getLoginRoute();
                        $itemid=  $itemid !== NULL
                                  ?                  '&Itemid='
                                                     .          $itemid
                                  :                                       '';
                        $route=   'index.php?option=com_users&view=login'
                                  .                                       $itemid;
                        // Proceed to the login form.
                        $message=  JText::_('USERS_RESET_COMPLETE_SUCCESS');
                        $this->setRedirect(JRoute::_($route, FALSE), $message);
                        return TRUE;
                      }


Clone AbstractionParameter Count: 6Parameter Bindings

// Check for a hard error.
if (JError::isError($return)) {
  // Get the error message to display.
  if ($app->getCfg('error_reporting')) {
    $message=$return->getMessage();
  }
  else {
    $message=JText::_( [[#variable479a0640]]);
  }
  // Get the route to the next page.
  $itemid=UsersHelperRoute::getResetRoute();
  $itemid=$itemid !== NULL
          ? '&Itemid='
            . $itemid
          : '';
  $route= [[#variable479a05c0]]
         . $itemid;
  // Go back to the request form.
  // Go back to the complete form.
  $this->setRedirect(JRoute::_($route,FALSE),$message,'error');
  return FALSE;
}
// The request failed.
// Complete failed.
elseif ($return === FALSE) {
  // Get the route to the next page.
  $itemid=UsersHelperRoute::getResetRoute();
  $itemid=$itemid !== NULL
          ? '&Itemid='
            . $itemid
          : '';
  $route= [[#variable479a05c0]]
         . $itemid;
  // Go back to the request form.
  // Go back to the complete form.
  $message=JText::sprintf( [[#variable479a0560]],$model->getError());
  $this->setRedirect(JRoute::_($route,FALSE),$message,'notice');
  return FALSE;
}
// The request succeeded.
// Complete succeeded.
else {
  // Get the route to the next page.
  $itemid=UsersHelperRoute:: [[#variable479a0500]]();
  $itemid=$itemid !== NULL
          ? '&Itemid='
            . $itemid
          : '';
  $route= [[#variable479a0380]]
         . $itemid;
  // Proceed to step two.
  // Proceed to the login form.
  $message=JText::_( [[#variable479a02a0]]);
  $this->setRedirect(JRoute::_($route,FALSE),$message);
  return TRUE;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#479a0640]]
'USERS_RESET_REQUEST_ERROR' 
12[[#479a0640]]
'USERS_RESET_COMPLETE_ERROR' 
21[[#479a05c0]]
'index.php?option=com_users&view=reset' 
22[[#479a05c0]]
'index.php?option=com_users&view=reset&layout=complete' 
31[[#479a0560]]
'USERS_RESET_REQUEST_FAILED' 
32[[#479a0560]]
'USERS_RESET_COMPLETE_FAILED' 
41[[#479a0500]]
getResetRoute 
42[[#479a0500]]
getLoginRoute 
51[[#479a0380]]
'index.php?option=com_users&view=reset&layout=confirm' 
52[[#479a0380]]
'index.php?option=com_users&view=login' 
61[[#479a02a0]]
'USERS_RESET_REQUEST_SUCCESS' 
62[[#479a02a0]]
'USERS_RESET_COMPLETE_SUCCESS'