<commit_before>package com.intellij.codeInsight.template.impl;

import com.intellij.codeInsight.lookup.LookupItem;
import com.intellij.codeInsight.template.Expression;
import com.intellij.codeInsight.template.ExpressionContext;
import com.intellij.codeInsight.template.Macro;
import com.intellij.codeInsight.template.Result;

import java.util.ArrayList;

/**
 *
 */
public class MacroCallNode implements Expression {
  public Macro getMacro() {
    return myMacro;
  }

  private Macro myMacro;
  private ArrayList myParameters = new ArrayList();

  public MacroCallNode(Macro macro) {
    myMacro = macro;
  }

  public void addParameter(Expression node) {
    myParameters.add(node);
  }

  public Result calculateResult(ExpressionContext context) {
    Expression[] parameters = (Expression[])myParameters.toArray(new Expression[myParameters.size()]);
    return myMacro.calculateResult(parameters, context);
  }

  public Result calculateQuickResult(ExpressionContext context) {
    Expression[] parameters = (Expression[])myParameters.toArray(new Expression[myParameters.size()]);
    return myMacro.calculateQuickResult(parameters, context);
  }

  public LookupItem[] calculateLookupItems(ExpressionContext context) {
    Expression[] parameters = (Expression[])myParameters.toArray(new Expression[myParameters.size()]);
    return myMacro.calculateLookupItems(parameters, context);
  }

}<commit_msg>generify<commit_after>package com.intellij.codeInsight.template.impl;

import com.intellij.codeInsight.lookup.LookupItem;
import com.intellij.codeInsight.template.Expression;
import com.intellij.codeInsight.template.ExpressionContext;
import com.intellij.codeInsight.template.Macro;
import com.intellij.codeInsight.template.Result;

import java.util.ArrayList;

/**
 *
 */
public class MacroCallNode implements Expression {
  public Macro getMacro() {
    return myMacro;
  }

  private Macro myMacro;
  private ArrayList<Expression> myParameters = new ArrayList<Expression>();

  public MacroCallNode(Macro macro) {
    myMacro = macro;
  }

  public void addParameter(Expression node) {
    myParameters.add(node);
  }

  public Result calculateResult(ExpressionContext context) {
    Expression[] parameters = myParameters.toArray(new Expression[myParameters.size()]);
    return myMacro.calculateResult(parameters, context);
  }

  public Result calculateQuickResult(ExpressionContext context) {
    Expression[] parameters = myParameters.toArray(new Expression[myParameters.size()]);
    return myMacro.calculateQuickResult(parameters, context);
  }

  public LookupItem[] calculateLookupItems(ExpressionContext context) {
    Expression[] parameters = myParameters.toArray(new Expression[myParameters.size()]);
    return myMacro.calculateLookupItems(parameters, context);
  }

}
{'fraction_non_alphanumeric': 0.10096670247046187, 'fraction_numerical': 0.0, 'mean_word_length': 5.636579572446556, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5453742', 'n_tokens_mistral': 792, 'n_tokens_neox': 778, 'n_words': 150}