<commit_before><?php
// Copyright: All contributers to the Umple Project
// This file is made available subject to the open source license found at:
// http://umple.org/license
//
// Utility functions invoked primarily by compiler.php and umple.php
//
// To run UmpleOnline locally, you may need to set the following constants
// based on your home computer settings

// Windows installations of UmpleOnline Server
//$GLOBALS["JAVA_HOME"] = "C:\Program Files\Java\jdk1.6.0_17";
//$GLOBALS["ANT_EXEC"] = "C:\Ant\apache-ant-1.8.1\bin\ant";
//$GLOBALS["OS"] = "Windows";

// CRUISE SERVER and MAC OS installations
$GLOBALS["JAVA_HOME"] = "/usr/bin/";
$GLOBALS["ANT_EXEC"] = "/h/ralph/cruise/dev/apps/apache-ant-1.8.1/bin/ant";
$GLOBALS["OS"] = "Linux";


// JAVA EXECUTION SERVER 
$GLOBALS["EXECUTION_SERVER"]= "http://localhost:4400";

// For compatibility with systems that do not have UmpleOnline's shell
// dependencies in their $PATH, add /usr/bin and /usr/local/bin to $PATH
// in the hopes that the programs will be at those locations.
// We gracefully do nothing if the paths are already present.
// If the executables are not in fact at those locations but elsewhere
// and already accessible via $PATH search, adding these redundant
// paths to $PATH will have no effect.
// Note: we append to PATH so that the original system paths still take
// precedence, or we might unwittingly override system administrators'
// settings to prefer different executables than the ones at these paths.
$PATH = getenv("PATH");
if(strpos($PATH, "/usr/bin") == FALSE){
    $PATH .= ":/usr/bin";
}
if(strpos($PATH, "/usr/local/bin") == FALSE){
    $PATH .= ":/usr/local/bin";
}
putenv("PATH=$PATH");

// If we don't set the default timezone we get E_NOTICEs
date_default_timezone_set('UTC');

// Trick to find the root directory of this copy of UmpleOnline<commit_msg>making compiler_config use same port as execution server<commit_after><?php
// Copyright: All contributers to the Umple Project
// This file is made available subject to the open source license found at:
// http://umple.org/license
//
// Utility functions invoked primarily by compiler.php and umple.php
//
// To run UmpleOnline locally, you may need to set the following constants
// based on your home computer settings

// Windows installations of UmpleOnline Server
//$GLOBALS["JAVA_HOME"] = "C:\Program Files\Java\jdk1.6.0_17";
//$GLOBALS["ANT_EXEC"] = "C:\Ant\apache-ant-1.8.1\bin\ant";
//$GLOBALS["OS"] = "Windows";

// CRUISE SERVER and MAC OS installations
$GLOBALS["JAVA_HOME"] = "/usr/bin/";
$GLOBALS["ANT_EXEC"] = "/h/ralph/cruise/dev/apps/apache-ant-1.8.1/bin/ant";
$GLOBALS["OS"] = "Linux";


// JAVA EXECUTION SERVER
$configfile="../../UmpleCodeExecution/config.cfg";
$portToUse=4400; // default
$handle = fopen($configfile, "r");
if ($handle) {
  while (($line = fgets($handle)) !== false) {
    if(substr($line,0,10) == "portToUse=") {
      $portToUse=substr($line,10);
    }
  }
}

$GLOBALS["EXECUTION_SERVER"]= "http://localhost:$portToUse";

// For compatibility with systems that do not have UmpleOnline's shell
// dependencies in their $PATH, add /usr/bin and /usr/local/bin to $PATH
// in the hopes that the programs will be at those locations.
// We gracefully do nothing if the paths are already present.
// If the executables are not in fact at those locations but elsewhere
// and already accessible via $PATH search, adding these redundant
// paths to $PATH will have no effect.
// Note: we append to PATH so that the original system paths still take
// precedence, or we might unwittingly override system administrators'
// settings to prefer different executables than the ones at these paths.
$PATH = getenv("PATH");
if(strpos($PATH, "/usr/bin") == FALSE){
    $PATH .= ":/usr/bin";
}
if(strpos($PATH, "/usr/local/bin") == FALSE){
    $PATH .= ":/usr/local/bin";
}
putenv("PATH=$PATH");

// If we don't set the default timezone we get E_NOTICEs
date_default_timezone_set('UTC');

// Trick to find the root directory of this copy of UmpleOnline
{'fraction_non_alphanumeric': 0.14133399454500373, 'fraction_numerical': 0.008678403173816018, 'mean_word_length': 3.992574257425743, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 3, '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': '4612802', 'n_tokens_mistral': 1282, 'n_tokens_neox': 1229, 'n_words': 447}