<commit_before><?php
class import_ScriptDocumentElement extends import_ScriptObjectElement
{
	/**
	 * @var f_persistentdocument_PersistentDocument
	 */
	private $persistentDocument;

	/**
	 * @var String
	 */
	private $tag;

	/**
	 * (non-PHPdoc)
	 * @see persistentdocument/import/import_ScriptObjectElement#getObject()
	 */
	public function getObject()
	{
		return $this->getPersistentDocument();
	}

	/**
	 * @return f_persistentdocument_PersistentDocument
	 */
	public function getPersistentDocument()
	{
		if ($this->persistentDocument === null)
		{
			$document = null;
			if (isset($this->attributes['byTag']))
			{<commit_msg>[NEW] Generically handle byDocumentId attribute on script document elements.<commit_after><?php
class import_ScriptDocumentElement extends import_ScriptObjectElement
{
	/**
	 * @var f_persistentdocument_PersistentDocument
	 */
	private $persistentDocument;

	/**
	 * @var String
	 */
	private $tag;

	/**
	 * (non-PHPdoc)
	 * @see persistentdocument/import/import_ScriptObjectElement#getObject()
	 */
	public function getObject()
	{
		return $this->getPersistentDocument();
	}

	/**
	 * @return f_persistentdocument_PersistentDocument
	 */
	public function getPersistentDocument()
	{
		if ($this->persistentDocument === null)
		{
			$document = null;
			if (isset($this->attributes['byDocumentId']))
			{
				$document = DocumentHelper::getDocumentInstance($this->attributes['byDocumentId']);
				$model = $document->getPersistentModel();
				unset($this->attributes['byDocumentId']);
			}
			else if (isset($this->attributes['byTag']))
			{
{'fraction_non_alphanumeric': 0.13714285714285715, 'fraction_numerical': 0.0, 'mean_word_length': 4.7309090909090905, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '5933397', 'n_tokens_mistral': 516, 'n_tokens_neox': 459, 'n_words': 82}