CloneSet98


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
26201.000statement_block
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1261188
libraries/joomla/client/ftp.php
2261217
libraries/joomla/client/ftp.php
Clone Instance
1
Line Count
26
Source Line
1188
Source File
libraries/joomla/client/ftp.php

                                       {
                        foreach ($contents as $file) {
                                $tmp_array=  NULL;
                                if (ereg($regexp, $file, $regs)) {
                                        $fType=  (int) strpos("-dl", $regs[1]{  0});
                                        //$tmp_array['line'] = $regs[0];
                                        $tmp_array['type']=  $fType;
                                        $tmp_array['rights']=  $regs[1];
                                        //$tmp_array['number'] = $regs[2];
                                        $tmp_array['user']=  $regs[3];
                                        $tmp_array['group']=  $regs[4];
                                        $tmp_array['size']=  $regs[5];
                                        $tmp_array['date']=  date("m-d", strtotime($regs[6]));
                                        $tmp_array['time']=  $regs[7];
                                        $tmp_array['name']=  $regs[9];
                                      }
                                // If we just want files, do not add a folder
                                if ($type == 'files'
                                    &&                  $tmp_array['type'] == 1) {
                                        continue;
                                      }
                                // If we just want folders, do not add a file
                                if ($type == 'folders'
                                    &&                    $tmp_array['type'] == 0) {
                                        continue;
                                      }
                                if (is_array($tmp_array)
                                    &&                      $tmp_array['name'] != '.'
                                    &&                                                   $tmp_array['name'] != '..') {
                                        $dir_list[]=  $tmp_array;
                                      }
                              }
                      }


Clone Instance
2
Line Count
26
Source Line
1217
Source File
libraries/joomla/client/ftp.php

                                          {
                        foreach ($contents as $file) {
                                $tmp_array=  NULL;
                                if (ereg($regexp, $file, $regs)) {
                                        $fType=  (int) strpos("-dl", $regs[1]{  0});
                                        //$tmp_array['line'] = $regs[0];
                                        $tmp_array['type']=  $fType;
                                        $tmp_array['rights']=  $regs[1];
                                        //$tmp_array['number'] = $regs[2];
                                        $tmp_array['user']=  $regs[3];
                                        $tmp_array['group']=  $regs[4];
                                        $tmp_array['size']=  $regs[5];
                                        $tmp_array['date']=  date("m-d", strtotime($regs[6]));
                                        $tmp_array['time']=  $regs[7];
                                        $tmp_array['name']=  $regs[9];
                                      }
                                // If we just want files, do not add a folder
                                if ($type == 'files'
                                    &&                  $tmp_array['type'] == 1) {
                                        continue;
                                      }
                                // If we just want folders, do not add a file
                                if ($type == 'folders'
                                    &&                    $tmp_array['type'] == 0) {
                                        continue;
                                      }
                                if (is_array($tmp_array)
                                    &&                      $tmp_array['name'] != '.'
                                    &&                                                   $tmp_array['name'] != '..') {
                                        $dir_list[]=  $tmp_array;
                                      }
                              }
                      }


Clone AbstractionParameter Count: 0Parameter Bindings

{
  foreach ($contents as $file) {
    $tmp_array=NULL;
    if (ereg($regexp,$file,$regs)) {
      $fType= (int) strpos("-dl",$regs[1]{ 0});
      //$tmp_array['line'] = $regs[0];
      $tmp_array['type']=$fType;
      $tmp_array['rights']=$regs[1];
      //$tmp_array['number'] = $regs[2];
      $tmp_array['user']=$regs[3];
      $tmp_array['group']=$regs[4];
      $tmp_array['size']=$regs[5];
      $tmp_array['date']=date("m-d",strtotime($regs[6]));
      $tmp_array['time']=$regs[7];
      $tmp_array['name']=$regs[9];
    }
    // If we just want files, do not add a folder
    if ($type == 'files'
        && $tmp_array['type'] == 1) {
      continue;
    }
    // If we just want folders, do not add a file
    if ($type == 'folders'
        && $tmp_array['type'] == 0) {
      continue;
    }
    if (is_array($tmp_array)
        && $tmp_array['name'] != '.'
        && $tmp_array['name'] != '..') {
      $dir_list[]=$tmp_array;
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None