<commit_before>/*
 * This file is released under terms of BSD license
 * See LICENSE file for more information
 */

package cx2x.xcodeml.xnode;

import org.w3c.dom.Document;

/**
 * The Xmod represents the module information produced by the Fortran front-end
 * of OMNI Compiler.
 *
 * @author clementval
 */
public class Xmod extends XcodeML {

  // Xmod inner elements
  private final String _path;
  private final String _name;

  private XsymbolTable _identifiers = null;

  /**
   * Constructs a basic Xmod object representing the XcodeML module file given
   * in input.
   * @param baseElement XcodeML document.
   * @param name        Name of the module.
   * @param path        Path of the XcodeML module file without the filename.
   */
  public Xmod(Document baseElement, String name, String path){
    super(baseElement);
    _name = name;
    _path = path.endsWith("/") ? path : path + "/";
    _identifiers = new XsymbolTable(find(Xcode.IDENTIFIERS).getElement());
  }

  /**
   * Get the path associated with this XcodeML module.
   * @return Path of the module file.
   */
  public String getPath(){
    return _path;
  }

  /**
   * Get the name of the module.
   * @return Name of the module.
   */
  public String getName() {
    return _name;
  }

  /**
   * Get the identifiers table.
   * @return Identifiers as a symbol table.
   */
  public XsymbolTable getIdentifiers(){
    return _identifiers;
  }
}
<commit_msg>Add getFullPath()<commit_after>/*
 * This file is released under terms of BSD license
 * See LICENSE file for more information
 */

package cx2x.xcodeml.xnode;

import cx2x.translator.common.ClawConstant;
import cx2x.xcodeml.helper.XnodeUtil;
import org.w3c.dom.Document;

/**
 * The Xmod represents the module information produced by the Fortran front-end
 * of OMNI Compiler.
 *
 * @author clementval
 */
public class Xmod extends XcodeML {

  // Xmod inner elements
  private final String _path;
  private final String _name;

  private XsymbolTable _identifiers = null;

  /**
   * Constructs a basic Xmod object representing the XcodeML module file given
   * in input.
   * @param baseElement XcodeML document.
   * @param name        Name of the module.
   * @param path        Path of the XcodeML module file without the filename.
   */
  public Xmod(Document baseElement, String name, String path){
    super(baseElement);
    _name = name;
    _path = path.endsWith("/") ? path : path + "/";
    _identifiers = new XsymbolTable(find(Xcode.IDENTIFIERS).getElement());
  }

  /**
   * Get the path associated with this XcodeML module.
   * @return Path of the module file.
   */
  public String getPath(){
    return _path;
  }

  /**
   * Get the name of the module.
   * @return Name of the module.
   */
  public String getName() {
    return _name;
  }

  /**
   * Get the full path of the module file.
   * @return Module file full path.
   */
  public String getFullPath(){
    return _path + _name + ClawConstant.CLAW_MOD_SUFFIX
        + XnodeUtil.XMOD_FILE_EXTENSION;
  }

  /**
   * Get the identifiers table.
   * @return Identifiers as a symbol table.
   */
  public XsymbolTable getIdentifiers(){
    return _identifiers;
  }
}

{'fraction_non_alphanumeric': 0.09284818067754078, 'fraction_numerical': 0.0018820577164366374, 'mean_word_length': 2.884287454323995, 'pattern_counts': {'":': 0, '<': 3, '<?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': '240832', 'n_tokens_mistral': 984, 'n_tokens_neox': 965, 'n_words': 340}