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

package cx2x.xcodeml.xelement;

import cx2x.xcodeml.helper.XelementHelper;
import org.w3c.dom.Element;

/**
 * The XmoduleDef represents the FmoduleDefinition (5.7) element in XcodeML
 * intermediate representation.
 *
 * Elements: (symbols?, declarations?, FcontainsStatement?)
 * - Optional:
 *   - symbols (XsymbolTable)
 *   - declarations  (XdeclTable)
 *   - FcontainsStatement // TODO
 *
 * Attributes:
 * - Required: name (text)
 *
 * Can have lineno and file attributes
 *
 * @author clementval
 */
public class XmoduleDef extends XbaseElement {

  private String _name;
  private XsymbolTable _symbols;
  private XdeclTable _declarations;

  /**
   * Xelement standard ctor. Pass the base element to the base class and read
   * inner information (elements and attributes).
   * @param baseElement The root element of the Xelement
   */
  public XmoduleDef(Element baseElement){
    super(baseElement);

    _name = XelementHelper.getAttributeValue(this, XelementName.ATTR_NAME);
    _symbols = XelementHelper.findSymbols(this, false);
    _declarations = XelementHelper.findDeclarations(this, false);
  }

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


}<commit_msg>Inherits from XenhancedElement for lineno/file attr<commit_after>/*
 * This file is released under terms of BSD license
 * See LICENSE file for more information
 */

package cx2x.xcodeml.xelement;

import cx2x.xcodeml.helper.XelementHelper;
import org.w3c.dom.Element;

/**
 * The XmoduleDef represents the FmoduleDefinition (5.7) element in XcodeML
 * intermediate representation.
 *
 * Elements: (symbols?, declarations?, FcontainsStatement?)
 * - Optional:
 *   - symbols (XsymbolTable)
 *   - declarations  (XdeclTable)
 *   - FcontainsStatement // TODO
 *
 * Attributes:
 * - Required: name (text)
 *
 * Can have lineno and file attributes
 *
 * @author clementval
 */
public class XmoduleDef extends XenhancedElement {

  private String _name;
  private XsymbolTable _symbols;
  private XdeclTable _declarations;

  /**
   * Xelement standard ctor. Pass the base element to the base class and read
   * inner information (elements and attributes).
   * @param baseElement The root element of the Xelement
   */
  public XmoduleDef(Element baseElement){
    super(baseElement);

    _name = XelementHelper.getAttributeValue(this, XelementName.ATTR_NAME);
    _symbols = XelementHelper.findSymbols(this, false);
    _declarations = XelementHelper.findDeclarations(this, false);
  }

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


}
{'fraction_non_alphanumeric': 0.09325108853410741, 'fraction_numerical': 0.00362844702467344, 'mean_word_length': 3.7289879931389365, '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': '5319822', 'n_tokens_mistral': 838, 'n_tokens_neox': 813, 'n_words': 245}