CloneSet203


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
27201.000statement_sequence[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
127767
libraries/joomla/installer/installer.php
227959
libraries/joomla/installer/installer.php
Clone Instance
1
Line Count
27
Source Line
767
Source File
libraries/joomla/installer/installer.php

                // Process each file in the $files array (children of $tagName).
                foreach ($files as $file)
                {
                        $path['src']=     $source
                                          .       DS
                                          .          $file->data();
                        $path['dest']=    $destination
                                          .            DS
                                          .               $file->data();
                        // Is this path a file or folder?
                        $path['type']=    ($file->name() == 'folder')
                                          ?                             'folder'
                                          :                                        'file';
                        /*
                         * Before we can add a file to the copyfiles array we need to ensure
                         * that the folder we are copying our file to exits and if it doesn't,
                         * we need to create it.
                         */
                        if (basename($path['dest']) != $path['dest']) {
                                $newdir=  dirname($path['dest']);

                                if (!JFolder::create($newdir)) {
                                        JError::raiseWarning(1, 'JInstaller::install: '
                                                                .                       JText::_('Failed to create directory')
                                                                .                                                              ' "'
                                                                .                                                                   $newdir
                                                                .                                                                           '"');
                                        return FALSE;
                                      }
                              }
                        // Add the file to the copyfiles array
                        $copyfiles[]=  $path;
                      }
                return $this->copyFiles($copyfiles);


Clone Instance
2
Line Count
27
Source Line
959
Source File
libraries/joomla/installer/installer.php

                // Process each file in the $files array (children of $tagName).
                foreach ($files as $file)
                {
                        $path['src']=     $source
                                          .       DS
                                          .          $file->data();
                        $path['dest']=    $destination
                                          .            DS
                                          .               $file->data();
                        // Is this path a file or folder?
                        $path['type']=    ($file->name() == 'folder')
                                          ?                             'folder'
                                          :                                        'file';
                        /*
                         * Before we can add a file to the copyfiles array we need to ensure
                         * that the folder we are copying our file to exits and if it doesn't,
                         * we need to create it.
                         */
                        if (basename($path['dest']) != $path['dest']) {
                                $newdir=  dirname($path['dest']);

                                if (!JFolder::create($newdir)) {
                                        JError::raiseWarning(1, 'JInstaller::install: '
                                                                .                       JText::_('Failed to create directory')
                                                                .                                                              ' "'
                                                                .                                                                   $newdir
                                                                .                                                                           '"');
                                        return FALSE;
                                      }
                              }
                        // Add the file to the copyfiles array
                        $copyfiles[]=  $path;
                      }
                return $this->copyFiles($copyfiles);


Clone AbstractionParameter Count: 0Parameter Bindings

// Process each file in the $files array (children of $tagName).
foreach ($files as $file) {
  $path['src']=$source
               . DS
               . $file->data();
  $path['dest']=$destination
                . DS
                . $file->data();
  // Is this path a file or folder?
  $path['type']=($file->name() == 'folder')
                ? 'folder'
                : 'file';
  /*
                           * Before we can add a file to the copyfiles array we need to ensure
                           * that the folder we are copying our file to exits and if it doesn't,
                           * we need to create it.
                           */
  if (basename($path['dest']) != $path['dest']) {
    $newdir=dirname($path['dest']);
    if (!JFolder::create($newdir)) {
      JError::raiseWarning(1,'JInstaller::install: '
                             . JText::_('Failed to create directory')
                             . ' "'
                             . $newdir
                             . '"');
      return FALSE;
    }
  }
  // Add the file to the copyfiles array
  $copyfiles[]=$path;
}
return $this->copyFiles($copyfiles);
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None