CloneSet99


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22230.972statement_sequence[15]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12244
libraries/joomla/filesystem/helper.php
22280
libraries/joomla/filesystem/helper.php
Clone Instance
1
Line Count
22
Source Line
44
Source File
libraries/joomla/filesystem/helper.php

            $server=  parse_url($url, PHP_URL_HOST);
            $port=  parse_url($url, PHP_URL_PORT);
            $path=  parse_url($url, PHP_URL_PATH);
            $user=  parse_url($url, PHP_URL_USER);
            $pass=  parse_url($url, PHP_URL_PASS);
            if ((!$server)
                ||            (!$path)) {
                                          return FALSE;
                                        }
            if (!$port) {
                          $port=  21;
                        }
            if (!$user) {
                          $user=  "anonymous";
                        }
            if (!$pass) {
                          $pass=  "";
                        }
            switch ($sch) {
                case "ftp":
                    $ftpid=  ftp_connect($server, $port);
                    break;
                case "ftps":
                    $ftpid=  ftp_ssl_connect($server, $port);
                    break;
              }
            if (!$ftpid) {
                           return FALSE;
                         }
            $login=  ftp_login($ftpid, $user, $pass);
            if (!$login) {
                           return FALSE;
                         }
            $ftpsize=  ftp_size($ftpid, $path);
            ftp_close($ftpid);


Clone Instance
2
Line Count
22
Source Line
80
Source File
libraries/joomla/filesystem/helper.php

        $server=  parse_url($url, PHP_URL_HOST);
        $port=  parse_url($url, PHP_URL_PORT);
        $path=  parse_url($url, PHP_URL_PATH);
        $user=  parse_url($url, PHP_URL_USER);
        $pass=  parse_url($url, PHP_URL_PASS);
        if ((!$server)
            ||            (!$path)) {
                                      return FALSE;
                                    }
        if (!$port) {
                      $port=  21;
                    }
        if (!$user) {
                      $user=  "anonymous";
                    }
        if (!$pass) {
                      $pass=  "";
                    }
        switch ($sch) {
            case "ftp":
                $ftpid=  ftp_connect($server, $port);
                break;
            case "ftps":
                $ftpid=  ftp_ssl_connect($server, $port);
                break;
          }
        if (!$ftpid) {
                       return FALSE;
                     }
        $login=  ftp_login($ftpid, $user, $pass);
        if (!$login) {
                       return FALSE;
                     }
        $res=  ftp_chmod($ftpid, $mode, $path);
        ftp_close($ftpid);


Clone AbstractionParameter Count: 3Parameter Bindings

$server=parse_url($url,PHP_URL_HOST);
$port=parse_url($url,PHP_URL_PORT);
$path=parse_url($url,PHP_URL_PATH);
$user=parse_url($url,PHP_URL_USER);
$pass=parse_url($url,PHP_URL_PASS);
if ((!$server)
    || (!$path)) {
  return FALSE;
}
if (!$port) {
  $port=21;
}
if (!$user) {
  $user="anonymous";
}
if (!$pass) {
  $pass="";
}
switch ($sch) {
  case "ftp":
    $ftpid=ftp_connect($server,$port);
    break;
  case "ftps":
    $ftpid=ftp_ssl_connect($server,$port);
    break;
}
if (!$ftpid) {
  return FALSE;
}
$login=ftp_login($ftpid,$user,$pass);
if (!$login) {
  return FALSE;
}
 [[#variable225b26e0]]= [[#variable57f73920]]( [[#variable24bd4780]],$path);
ftp_close($ftpid);
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#225b26e0]]
$res 
12[[#225b26e0]]
$ftpsize 
21[[#57f73920]]
ftp_chmod 
22[[#57f73920]]
ftp_size 
31[[#24bd4780]]
$ftpid,$mode 
32[[#24bd4780]]
$ftpid