<commit_before><?php

if ( count( $argv ) < 2 )
{
    die( "Missing input directory.\n" );
}

if ( count( $argv ) < 3 )
{
    die( "Missing output file.\n" );
}

$inDir = $argv[1];
$outFile = $argv[2];

if ( !is_dir( $inDir ) || !is_readable( $inDir ) )
{
    die( "Could not open '$inDir'." );
}

$fileMap = array(
    '_request_body.xml'     => array( 'request', 'body' ),
    '_request_server.php'   => array( 'request', 'server' ),
    '_response_status.txt'  => array( 'response', 'status' ),
    '_response_headers.php' => array( 'response', 'headers' ),
    '_response_body.xml'    => array( 'response', 'body' ),
);

$data = array();

foreach ( glob( "$inDir/*_request_body.xml" ) as $file )
{
    $fileName = basename( $file );
    if ( !preg_match( '(^(([0-9]+)_[A-Z]+)_.*$)', $fileName, $matches ) )
    {<commit_msg>- Adjusted order to test run order.<commit_after><?php

if ( count( $argv ) < 2 )
{
    die( "Missing input directory.\n" );
}

if ( count( $argv ) < 3 )
{
    die( "Missing output file.\n" );
}

$inDir = $argv[1];
$outFile = $argv[2];

if ( !is_dir( $inDir ) || !is_readable( $inDir ) )
{
    die( "Could not open '$inDir'." );
}

$fileMap = array(
    '_request_body.xml'     => array( 'request', 'body' ),
    '_request_server.php'   => array( 'request', 'server' ),
    '_response_body.xml'    => array( 'response', 'body' ),
    '_response_headers.php' => array( 'response', 'headers' ),
    '_response_status.txt'  => array( 'response', 'status' ),
);

$data = array();

foreach ( glob( "$inDir/*_request_body.xml" ) as $file )
{
    $fileName = basename( $file );
    if ( !preg_match( '(^(([0-9]+)_[A-Z]+)_.*$)', $fileName, $matches ) )
    {
{'fraction_non_alphanumeric': 0.23122765196662692, 'fraction_numerical': 0.007151370679380214, 'mean_word_length': 3.316195372750643, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '3503671', 'n_tokens_mistral': 653, 'n_tokens_neox': 648, 'n_words': 142}