<commit_before><?php

include_once( 'errors.inc.php' );
include_once( 'db.pg.class.php' );
include_once( 'session.class.php' );
include_once( 'tools.inc.php' );
include_once( 'json.inc.php' );

$db =& getDB();
$ses =& getSession();

$pid = isset( $_REQUEST[ 'pid' ] ) ? intval( $_REQUEST[ 'pid' ] ) : 0;
$uid = $ses->isSessionValid() ? $ses->getId() : 0;

$tnid = isset( $_REQUEST[ 'tnid' ] ) ? intval( $_REQUEST[ 'tnid' ] ) : -1;

if ( $pid )
{
	if ( $uid )
	{
        $query = "SELECT tn.id AS id, ".
            "            (tn.location).x as x, (tn.location).y as y, (tn.location).z AS z, ".
            "             greatest(tn.creation_time, tn.edition_time) AS most_recent ".
            "FROM treenode_class_instance tcn, relation r, treenode_class_instance tcn2, treenode tn ".
            "WHERE ".
            "  tcn.treenode_id = $tnid AND ".
            "  r.relation_name = 'element_of' AND ".<commit_msg>Remember to check that project ID is right<commit_after><?php

include_once( 'errors.inc.php' );
include_once( 'db.pg.class.php' );
include_once( 'session.class.php' );
include_once( 'tools.inc.php' );
include_once( 'json.inc.php' );

$db =& getDB();
$ses =& getSession();

$pid = isset( $_REQUEST[ 'pid' ] ) ? intval( $_REQUEST[ 'pid' ] ) : 0;
$uid = $ses->isSessionValid() ? $ses->getId() : 0;

$tnid = isset( $_REQUEST[ 'tnid' ] ) ? intval( $_REQUEST[ 'tnid' ] ) : -1;

if ( $pid )
{
	if ( $uid )
	{
        $query = "SELECT tn.id AS id, ".
            "            (tn.location).x as x, (tn.location).y as y, (tn.location).z AS z, ".
            "             greatest(tn.creation_time, tn.edition_time) AS most_recent ".
            "FROM treenode_class_instance tcn, relation r, treenode_class_instance tcn2, treenode tn ".
            "WHERE ".
            "  tcn.treenode_id = $tnid AND ".
            "  tcn.project_id = $pid AND ".
            "  r.relation_name = 'element_of' AND ".
{'fraction_non_alphanumeric': 0.18067885117493473, 'fraction_numerical': 0.004177545691906005, 'mean_word_length': 2.4899817850637525, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6874022', 'n_tokens_mistral': 720, 'n_tokens_neox': 714, 'n_words': 156}