<commit_before>import java.util.List;

import processing.data.Table;
import processing.data.TableRow;

import heronarts.lx.model.LXAbstractFixture;
import heronarts.lx.model.LXModel;
import heronarts.lx.model.LXPoint;

class Model extends LXModel {

  final List<LED> leds;

  final Heart heart;
  final Leaves leaves;
  final Trunks trunks;
  final Roots roots;

  @SuppressWarnings("unchecked")
  Model(Table ledData, Table ppStripData) {
    super(new Fixture(ledData, ppStripData));
    Fixture fixture = (Fixture)fixtures.get(0);
    leds = (List)fixture.getPoints();
    heart = fixture.heart;
    leaves = fixture.leaves;
    trunks = fixture.trunks;
    roots = fixture.roots;
  }

  static class Fixture extends LXAbstractFixture {
    final Heart heart;
    final Leaves leaves;
    final Trunks trunks;
    final Roots roots;
    Fixture(Table ledData, Table ppStripData) {
      addPoints(heart = new Heart(ledData, ppStripData));
      addPoints(leaves = new Leaves(ledData, ppStripData));
      addPoints(trunks = new Trunks(ledData, ppStripData));
      addPoints(roots = new Roots(ledData, ppStripData));
    }
  }

}

class Heart extends LXModel {

  final List<HeartLED> leds;

  @SuppressWarnings("unchecked")
  Heart(Table ledData, Table ppStripData) {
    super(new Fixture(ledData, ppStripData));
    Fixture fixture = (Fixture)fixtures.get(0);
    leds = (List)fixture.getPoints();
  }

  static class Fixture extends LXAbstractFixture {
    Fixture(Table ledData, Table ppStripData) {
      for (TableRow row : ledData.rows()) {
        if (!row.getString("section").equals("heart")) continue;
        addPoint(new HeartLED(row, ppStripData));
      }
    }
  }

}

class Leaves extends LXModel {

  final List<LeafLED> leds;

  @SuppressWarnings("unchecked")
  Leaves(Table ledData, Table ppStripData) {
    super(new Fixture(ledData, ppStripData));
    Fixture fixture = (Fixture)fixtures.get(0);
    leds = (List)fixture.getPoints();
  }

  static class Fixture extends LXAbstractFixture {
    Fixture(Table ledData, Table ppStripData) {<commit_msg>Add frontLEDs and backLEDs to heart<commit_after>import java.util.ArrayList;
import java.util.List;

import processing.data.Table;
import processing.data.TableRow;

import heronarts.lx.model.LXAbstractFixture;
import heronarts.lx.model.LXModel;
import heronarts.lx.model.LXPoint;

class Model extends LXModel {

  final List<LED> leds;

  final Heart heart;
  final Leaves leaves;
  final Trunks trunks;
  final Roots roots;

  @SuppressWarnings("unchecked")
  Model(Table ledData, Table ppStripData) {
    super(new Fixture(ledData, ppStripData));
    Fixture fixture = (Fixture)fixtures.get(0);
    leds = (List)fixture.getPoints();
    heart = fixture.heart;
    leaves = fixture.leaves;
    trunks = fixture.trunks;
    roots = fixture.roots;
  }

  static class Fixture extends LXAbstractFixture {
    final Heart heart;
    final Leaves leaves;
    final Trunks trunks;
    final Roots roots;
    Fixture(Table ledData, Table ppStripData) {
      addPoints(heart = new Heart(ledData, ppStripData));
      addPoints(leaves = new Leaves(ledData, ppStripData));
      addPoints(trunks = new Trunks(ledData, ppStripData));
      addPoints(roots = new Roots(ledData, ppStripData));
    }
  }

}

class Heart extends LXModel {

  final List<HeartLED> leds;
  final List<HeartLED> frontLEDs = new ArrayList<HeartLED>();
  final List<HeartLED> backLEDs = new ArrayList<HeartLED>();

  @SuppressWarnings("unchecked")
  Heart(Table ledData, Table ppStripData) {
    super(new Fixture(ledData, ppStripData));
    Fixture fixture = (Fixture)fixtures.get(0);
    leds = (List)fixture.getPoints();
    for (HeartLED led : leds) {
      if (led.isFront) {
        frontLEDs.add(led);
      } else {
        backLEDs.add(led);
      }
    }
  }

  static class Fixture extends LXAbstractFixture {
    Fixture(Table ledData, Table ppStripData) {
      for (TableRow row : ledData.rows()) {
        if (!row.getString("section").equals("heart")) continue;
        addPoint(new HeartLED(row, ppStripData));
      }
    }
  }

}

class Leaves extends LXModel {

  final List<LeafLED> leds;

  @SuppressWarnings("unchecked")
  Leaves(Table ledData, Table ppStripData) {
    super(new Fixture(ledData, ppStripData));
    Fixture fixture = (Fixture)fixtures.get(0);
    leds = (List)fixture.getPoints();
  }

  static class Fixture extends LXAbstractFixture {
    Fixture(Table ledData, Table ppStripData) {
{'fraction_non_alphanumeric': 0.10859829825347067, 'fraction_numerical': 0.0013434841021047917, 'mean_word_length': 3.8083961248654465, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '7419655', 'n_tokens_mistral': 1494, 'n_tokens_neox': 1488, 'n_words': 340}