<commit_before>package arcs.api;

public interface Arcs {
  String MESSAGE_FIELD = "message";
  String RUN_ARC_MESSAGE = "runArc";
  String STOP_ARC_MESSAGE = "stopArc";
  String ARC_ID_FIELD = "arcId";
  String PEC_ID_FIELD = "pecId";
  String RECIPE_FIELD = "recipe";
  String PARTICLES_FIELD = "particles";
  String PARTICLE_ID_FIELD = "id";
  String PARTICLE_NAME_FIELD = "name";
  String PROVIDED_SLOT_ID_FIELD = "providedSlotId";

  default ArcData runArc(String recipe) {
    ArcData arcData = new ArcData.Builder().setRecipe(recipe).build();
    runArc(arcData);
    return arcData;
  }

  default ArcData runArc(String recipe, Particle particle) {
    ArcData arcData =
        new ArcData.Builder()
            .setRecipe(recipe)
            .addParticleData(new ArcData.ParticleData().setParticle(particle))
            .build();
    runArc(arcData);
    return arcData;
  }

  default ArcData runArc(String recipe, String arcId, String pecId) {
    ArcData arcData =
        new ArcData.Builder().setRecipe(recipe).setArcId(arcId).setPecId(pecId).build();
    runArc(arcData);
    return arcData;
  }

  default ArcData runArc(String recipe, String arcId, String pecId, Particle particle) {
    ArcData arcData =
        new ArcData.Builder()
            .setRecipe(recipe)
            .setArcId(arcId)
            .setPecId(pecId)
            .addParticleData(new ArcData.ParticleData().setParticle(particle))
            .build();
    runArc(arcData);
    return arcData;
  }

  void runArc(ArcData arcData);

  void stopArc(ArcData arcData);
<commit_msg>Support multiple particles at the Arcs APIs (#3803)<commit_after>package arcs.api;

import java.util.List;

public interface Arcs {
  String MESSAGE_FIELD = "message";
  String RUN_ARC_MESSAGE = "runArc";
  String STOP_ARC_MESSAGE = "stopArc";
  String ARC_ID_FIELD = "arcId";
  String PEC_ID_FIELD = "pecId";
  String RECIPE_FIELD = "recipe";
  String PARTICLES_FIELD = "particles";
  String PARTICLE_ID_FIELD = "id";
  String PARTICLE_NAME_FIELD = "name";
  String PROVIDED_SLOT_ID_FIELD = "providedSlotId";

  default ArcData runArc(String recipe) {
    ArcData arcData = new ArcData.Builder().setRecipe(recipe).build();
    runArc(arcData);
    return arcData;
  }

  default ArcData runArc(String recipe, Particle particle) {
    ArcData arcData =
        new ArcData.Builder()
            .setRecipe(recipe)
            .addParticleData(new ArcData.ParticleData().setParticle(particle))
            .build();
    runArc(arcData);
    return arcData;
  }

  default ArcData runArc(String recipe, List<? extends Particle> particles) {
    ArcData.Builder builder = new ArcData.Builder().setRecipe(recipe);
    particles.forEach(particle -> builder.addParticleData(
        new ArcData.ParticleData().setParticle(particle)
    ));
    ArcData arcData = builder.build();
    runArc(arcData);
    return arcData;
  }

  default ArcData runArc(String recipe, String arcId, String pecId) {
    ArcData arcData =
        new ArcData.Builder().setRecipe(recipe).setArcId(arcId).setPecId(pecId).build();
    runArc(arcData);
    return arcData;
  }

  default ArcData runArc(String recipe, String arcId, String pecId, Particle particle) {
    ArcData arcData =
        new ArcData.Builder()
            .setRecipe(recipe)
            .setArcId(arcId)
            .setPecId(pecId)
            .addParticleData(new ArcData.ParticleData().setParticle(particle))
            .build();
    runArc(arcData);
    return arcData;
  }

  default ArcData runArc(String recipe, String arcId, String pecId,
                         List<? extends Particle> particles) {
    ArcData.Builder builder =
        new ArcData.Builder()
            .setRecipe(recipe)
            .setArcId(arcId)
            .setPecId(pecId);
    particles.forEach(particle -> builder.addParticleData(
        new ArcData.ParticleData().setParticle(particle)
    ));
    ArcData arcData = builder.build();
    runArc(arcData);
    return arcData;
  }

  void runArc(ArcData arcData);

  void stopArc(ArcData arcData);

{'fraction_non_alphanumeric': 0.10474308300395258, 'fraction_numerical': 0.0009881422924901185, 'mean_word_length': 3.152820512820513, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '955578', 'n_tokens_mistral': 1313, 'n_tokens_neox': 1274, 'n_words': 274}