<commit_before><?php
class Category {
	private $id = null;
	private $name = "";
	private $description = "";
	public function __construct($id = null) {
		if ($this->id) {
			$this->loadByID ( $id );
		}
	}
	public function loadByID($id) {
		$sql = "select * from {prefix}categories where id = ?";
		$args = array (
				intval ( $id ) 
		);
		$query = Database::pQuery ( $sql, $args, true );
		$this->fillVars ( $query );
	}
	public function fillVars($query) {
		$this->id = null;
		$this->name = null;
		$this->description = null;
		
		if ($query and Database::getNumRows ( $query ) > 0) {
			$this->id = $result->id;
			$this->name = $result->name;
			$this->description = $result->description;
		}
	}
	public function save() {
		if ($this->id) {
			$this->update ();
		} else {
			$this->insert ();<commit_msg>konstruktur repariert<commit_after><?php
class Category {
	private $id = null;
	private $name = "";
	private $description = "";
	public function __construct($id = null) {
		if ($id) {
			$this->loadByID ( $id );
		}
	}
	public function loadByID($id) {
		$sql = "select * from {prefix}categories where id = ?";
		$args = array (
				intval ( $id ) 
		);
		$query = Database::pQuery ( $sql, $args, true );
		$this->fillVars ( $query );
	}
	public function fillVars($query) {
		$this->id = null;
		$this->name = null;
		$this->description = null;
		
		if ($query and Database::getNumRows ( $query ) > 0) {
			$this->id = $result->id;
			$this->name = $result->name;
			$this->description = $result->description;
		}
	}
	public function save() {
		if ($this->id) {
			$this->update ();
		} else {
			$this->insert ();
{'fraction_non_alphanumeric': 0.1933497536945813, 'fraction_numerical': 0.0012315270935960591, 'mean_word_length': 3.198966408268734, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 34, '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': '7381358', 'n_tokens_mistral': 646, 'n_tokens_neox': 582, 'n_words': 135}