<commit_before><?php
/**
 * For Updating composer.Json data of extensions. 
 *
 * @package extensionmanager
 */
class JsonUpdateTask extends DailyTask {
	
	function process() {
		$this->updateJson();
	}

	function updateJson() {
		$jsonFile = ExtensionData::get();
		$count = 0;
		if ($jsonFile && !empty($jsonFile)) {
			$count = $jsonFile->Count();
			foreach ($jsonFile as $jsonFile) {
				$json = new JsonHandler();
				$jsonData = $json->cloneJson($jsonFile->Url);
				$updateJson = $json->UpdateJson();               
				if($updateJson) {
					echo "<br />{$jsonFile->Name}  is updated <br />" ;
				}
				else {
					echo  "{$jsonFile->Name}  could not updated <br />" ;
				}
			}
			echo "<br /><br /><strong>{$count} Json File processed...</strong><br />";
		} else { 
			echo 'No jsonFile found...';
		}	
	}
}

/**
 * For Manually Updating composer.Json data of extensions. 
 *
 * @package extensionmanager
 */
class JsonUpdateTask_Manual extends BuildTask {

	function run($request) {
		echo "Running Json Data Update - Rebuilding the Database entries of all Json Files \n\n";
		$update = new JsonUpdateTask();
		$update->process();
	}
}<commit_msg>modification in task for updating version of extension<commit_after><?php
/**
 * For Updating composer.Json data of extensions. 
 *
 * @package extensionmanager
 */
class JsonUpdateTask extends DailyTask {
	
	function process() {
		$this->updateJson();
	}

	function updateJson() {
		$extensionData = ExtensionData::get();
		$count = 0;
		if ($extensionData && !empty($extensionData)) {
			$count = $extensionData->Count();
			foreach ($extensionData as $extension) {
				$json = new JsonHandler();
				$jsonData = $json->cloneJson($extension->Url);
				$updateJson = $json->UpdateJson();               
				if($updateJson) {
					$id = $updateJson;
					$deleteVersion = $json->deleteVersionData($id);
					if($deleteVersion){
						$saveVersion = $json->saveVersionData($id);
						if($saveVersion){
						echo "<br />$$extension->Name is updated <br />" ;
						}
					}	
				}
				else {
					echo  "$extension->Name  could not updated <br />" ;
				}
			}
			echo "<br /><br /><strong>{$count} Json File processed...</strong><br />";
		} else { 
			echo 'No Extension found...';
		}	
	}
}

/**
 * For Manually Updating composer.Json data of extensions. 
 *
 * @package extensionmanager
 */
class JsonUpdateTask_Manual extends BuildTask {

	function run($request) {
		echo "Running Json Data Update - Rebuilding the Database entries of all Json Files \n\n";
		$update = new JsonUpdateTask();
		$update->process();
	}
}
{'fraction_non_alphanumeric': 0.15750773993808048, 'fraction_numerical': 0.0007739938080495357, 'mean_word_length': 3.1031746031746033, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 37, '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': '5753346', 'n_tokens_mistral': 930, 'n_tokens_neox': 783, 'n_words': 209}