CloneSet76


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
31360.983switch_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
131178
administrator/components/com_users/controllers/group.php
231175
administrator/components/com_users/controllers/level.php
331182
administrator/components/com_users/controllers/user.php
Clone Instance
1
Line Count
31
Source Line
178
Source File
administrator/components/com_users/controllers/group.php

                // Redirect the user and adjust session state based on the chosen task.
                switch ($this->_task) {

                        case 'apply':
                                // Set the row data in the session.
                                $app->setUserState('com_users.edit.group.id',   $model->getState('group.id'));
                                $app->setUserState('com_users.edit.group.data', NULL);

                                // Redirect back to the edit screen.
                                $this->setMessage(JText::_('USERS_GROUP_SAVE_SUCCESS'));
                                $this->setRedirect(JRoute::_('index.php?option=com_users&view=group&layout=edit', FALSE));
                                break;

                        case 'save2new':
                                // Clear the group id and data from the session.
                                $app->setUserState('com_users.edit.group.id', NULL);
                                $app->setUserState('com_users.edit.group.data', NULL);

                                // Redirect back to the edit screen.
                                $this->setMessage(JText::_('USERS_GROUP_SAVE_SUCCESS'));
                                $this->setRedirect(JRoute::_('index.php?option=com_users&view=group&layout=edit', FALSE));
                                break;

                        default :
                                // Clear the group id and data from the session.
                                $app->setUserState('com_users.edit.group.id', NULL);
                                $app->setUserState('com_users.edit.group.data', NULL);

                                // Redirect to the list screen.
                                $this->setMessage(JText::_('USERS_GROUP_SAVE_SUCCESS'));
                                $this->setRedirect(JRoute::_('index.php?option=com_users&view=groups', FALSE));
                                break;
                      }


Clone Instance
2
Line Count
31
Source Line
175
Source File
administrator/components/com_users/controllers/level.php

                // Redirect the user and adjust session state based on the chosen task.
                switch ($this->_task) {

                        case 'apply':
                                // Set the row data in the session.
                                $app->setUserState('com_users.edit.level.id',   $model->getState('level.id'));
                                $app->setUserState('com_users.edit.level.data', NULL);

                                // Redirect back to the edit screen.
                                $this->setMessage(JText::_('USERS_LEVEL_SAVE_SUCCESS'));
                                $this->setRedirect(JRoute::_('index.php?option=com_users&view=level&layout=edit', FALSE));
                                break;

                        case 'save2new':
                                // Clear the level id and data from the session.
                                $app->setUserState('com_users.edit.level.id', NULL);
                                $app->setUserState('com_users.edit.level.data', NULL);

                                // Redirect back to the edit screen.
                                $this->setMessage(JText::_('USERS_LEVEL_SAVE_SUCCESS'));
                                $this->setRedirect(JRoute::_('index.php?option=com_users&view=level&layout=edit', FALSE));
                                break;

                        default :
                                // Clear the level id and data from the session.
                                $app->setUserState('com_users.edit.level.id', NULL);
                                $app->setUserState('com_users.edit.level.data', NULL);

                                // Redirect to the list screen.
                                $this->setMessage(JText::_('USERS_LEVEL_SAVE_SUCCESS'));
                                $this->setRedirect(JRoute::_('index.php?option=com_users&view=levels', FALSE));
                                break;
                      }


Clone Instance
3
Line Count
31
Source Line
182
Source File
administrator/components/com_users/controllers/user.php

                // Redirect the user and adjust session state based on the chosen task.
                switch ($this->_task) {

                        case 'apply':
                                // Set the row data in the session.
                                $app->setUserState('com_users.edit.user.id',    $model->getState('user.id'));
                                $app->setUserState('com_users.edit.user.data',  NULL);

                                // Redirect back to the edit screen.
                                $this->setMessage(JText::_('USERS_MEMBER_SAVE_SUCCESS'));
                                $this->setRedirect(JRoute::_('index.php?option=com_users&view=user&layout=edit', FALSE));
                                break;

                        case 'save2new':
                                // Clear the user id and data from the session.
                                $app->setUserState('com_users.edit.user.id', NULL);
                                $app->setUserState('com_users.edit.user.data', NULL);

                                // Redirect back to the edit screen.
                                $this->setMessage(JText::_('USERS_MEMBER_SAVE_SUCCESS'));
                                $this->setRedirect(JRoute::_('index.php?option=com_users&view=user&layout=edit', FALSE));
                                break;

                        default :
                                // Clear the user id and data from the session.
                                $app->setUserState('com_users.edit.user.id', NULL);
                                $app->setUserState('com_users.edit.user.data', NULL);

                                // Redirect to the list screen.
                                $this->setMessage(JText::_('USERS_MEMBER_SAVE_SUCCESS'));
                                $this->setRedirect(JRoute::_('index.php?option=com_users&view=users', FALSE));
                                break;
                      }


Clone AbstractionParameter Count: 6Parameter Bindings

// Redirect the user and adjust session state based on the chosen task.
switch ($this->_task) {
  case 'apply':
    // Set the row data in the session.
    $app->setUserState( [[#variable3c631fc0]],$model->getState( [[#variable3c631f00]]));
    $app->setUserState( [[#variable3c631e40]],NULL);
    // Redirect back to the edit screen.
    $this->setMessage(JText::_( [[#variable3c631dc0]]));
    $this->setRedirect(JRoute::_( [[#variable3c631d60]],FALSE));
    break;
  case 'save2new':
    // Clear the group id and data from the session.
    // Clear the level id and data from the session.
    // Clear the user id and data from the session.
    $app->setUserState( [[#variable3c631fc0]],NULL);
    $app->setUserState( [[#variable3c631e40]],NULL);
    // Redirect back to the edit screen.
    $this->setMessage(JText::_( [[#variable3c631dc0]]));
    $this->setRedirect(JRoute::_( [[#variable3c631d60]],FALSE));
    break;
  default :
    // Clear the group id and data from the session.
    // Clear the level id and data from the session.
    // Clear the user id and data from the session.
    $app->setUserState( [[#variable3c631fc0]],NULL);
    $app->setUserState( [[#variable3c631e40]],NULL);
    // Redirect to the list screen.
    $this->setMessage(JText::_( [[#variable3c631dc0]]));
    $this->setRedirect(JRoute::_( [[#variable3c631d00]],FALSE));
    break;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#3c631fc0]]
'com_users.edit.group.id' 
12[[#3c631fc0]]
'com_users.edit.level.id' 
13[[#3c631fc0]]
'com_users.edit.user.id' 
21[[#3c631f00]]
'group.id' 
22[[#3c631f00]]
'level.id' 
23[[#3c631f00]]
'user.id' 
31[[#3c631e40]]
'com_users.edit.group.data' 
32[[#3c631e40]]
'com_users.edit.level.data' 
33[[#3c631e40]]
'com_users.edit.user.data' 
41[[#3c631dc0]]
'USERS_GROUP_SAVE_SUCCESS' 
42[[#3c631dc0]]
'USERS_LEVEL_SAVE_SUCCESS' 
43[[#3c631dc0]]
'USERS_MEMBER_SAVE_SUCCESS' 
51[[#3c631d60]]
'index.php?option=com_users&view=group&layout=edit' 
52[[#3c631d60]]
'index.php?option=com_users&view=level&layout=edit' 
53[[#3c631d60]]
'index.php?option=com_users&view=user&layout=edit' 
61[[#3c631d00]]
'index.php?option=com_users&view=groups' 
62[[#3c631d00]]
'index.php?option=com_users&view=levels' 
63[[#3c631d00]]
'index.php?option=com_users&view=users'