<commit_before><?php
class packageManager{
     private $package_source;
     public function __construct(){
         $cfg = new config();
         $this -> package_source = $cfg -> getVar("pkg_src");
         $this -> package_source = $this -> replacePlaceHolders($this -> package_source);
         }
    
    
     public function installPackage($file){
         try{
             // Paket entpacken
            $phar = new PharData($file);
             $phar -> extractTo(ULICMS_ROOT, null, true);
            
             $post_install_script = ULICMS_ROOT . DIRECTORY_SEPARATOR . "post-install.php";
            
             // post_install_script ausführen und anschließend
            // entfernen, sofern vorhanden;
            if(file_exists($post_install_script)){
                 include_once $post_install_script;
                 unlink($post_install_script);
                 }
             return true;<commit_msg>Funktion splitPackageName hinzugefügt<commit_after><?php
class packageManager{
     private $package_source;
     public function __construct(){
         $cfg = new config();
         $this -> package_source = $cfg -> getVar("pkg_src");
         $this -> package_source = $this -> replacePlaceHolders($this -> package_source);
         }

      public function splitPackageName($name){
         $name = str_ireplace(".tar.gz", "", $name);
         $name = str_ireplace(".zip", "", $name); 
         $splitted = explode("-", $name);
         $version = array_pop($splitted);
         $name = $splitted;
         return array(join("-", $name), $version);

    }  
    
     public function installPackage($file){
         try{
             // Paket entpacken
            $phar = new PharData($file);
             $phar -> extractTo(ULICMS_ROOT, null, true);
            
             $post_install_script = ULICMS_ROOT . DIRECTORY_SEPARATOR . "post-install.php";
            
             // post_install_script ausführen und anschließend
            // entfernen, sofern vorhanden;
            if(file_exists($post_install_script)){
                 include_once $post_install_script;
                 unlink($post_install_script);
                 }
             return true;
{'fraction_non_alphanumeric': 0.11236973266878116, 'fraction_numerical': 0.0, 'mean_word_length': 1.8976377952755905, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1668207', 'n_tokens_mistral': 608, 'n_tokens_neox': 605, 'n_words': 121}