<commit_before>package unit.verifier.core;

import java.util.List;

import org.antlr.v4.runtime.tree.TerminalNode;

import unit.verifier.core.CoreParser.TupleContext;

/**
 * Created by emre.kirmizi on 23.10.2015.
 */
@SuppressWarnings("rawtypes")
public class ArityCheckVisitor extends CoreBaseVisitor {

  private MyVocabulary vocab;

  public ArityCheckVisitor() {
    super();
    this.vocab = new MyVocabulary();
  }

  @Override
  public Object visitSet(CoreParser.SetContext ctx) {
    int ac = 0;
    List<TupleContext> tuples = ctx.tuple();

    for (int i = 0; i < tuples.size(); i++) {
      TupleContext context = tuples.get(i);

      for (TerminalNode node : context.IDENTIFIER()) {
        if (!this.vocab.getAtomList().contains(node.toString())) {
          this.vocab.getAtomList().add(node.toString());
        }
      }

      int count = context.IDENTIFIER().size();
      int offset = context.IDENTIFIER().get(0).getSymbol().getCharPositionInLine();
      int line = context.IDENTIFIER().get(0).getSymbol().getLine();

      if (ac == 0) {<commit_msg>Minor changes on ArityCheckVisitor.<commit_after>package unit.verifier.core;

import org.antlr.v4.runtime.tree.TerminalNode;

import unit.verifier.core.CoreParser.TupleContext;

/**
 * Created by emre.kirmizi on 23.10.2015.
 */
@SuppressWarnings("rawtypes")
public class ArityCheckVisitor extends CoreBaseVisitor {

  private MyVocabulary vocab;

  public ArityCheckVisitor() {
    super();
    this.vocab = new MyVocabulary();
  }

  @Override
  public Object visitSet(CoreParser.SetContext ctx) {
    int ac = 0;
    int count;
    int offset;
    int line;

    for (TupleContext context : ctx.tuple()) {

      for (TerminalNode node : context.IDENTIFIER()) {
        if (!this.vocab.getAtomList().contains(node.toString())) {
          this.vocab.getAtomList().add(node.toString());
        }
      }

      count = context.IDENTIFIER().size();
      offset = context.IDENTIFIER().get(0).getSymbol().getCharPositionInLine();
      line = context.IDENTIFIER().get(0).getSymbol().getLine();

      if (ac == 0) {
{'fraction_non_alphanumeric': 0.14087206516530906, 'fraction_numerical': 0.012937230474365118, 'mean_word_length': 3.3409563409563408, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '7391738', 'n_tokens_mistral': 698, 'n_tokens_neox': 669, 'n_words': 131}