package training.taylor.timetracker.core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import training.taylor.timetracker.core.dao.TimeEntry;

import java.util.List;

@Component
public class Tracker {
    @Autowired
    private List<TimeEntry> entries;

    public void add(TimeEntry entry) {
        entries.add(entry);
    }

    public void remove(TimeEntry entry) {
        entries.remove(entry);
    }

    public int size() {
        return entries.size();
    }

    public TimeEntry get(int index) {
        return entries.get(index);
    }
}

@@ -423,32 +423,86 @@
 eEntry entry) %7B%0A
+        if (true)%0A            entries.remove(entry);%0A%0A
         entries.
@@ -619,24 +619,178 @@
 nt index) %7B%0A
+        try %7B%0A%0A        %7D catch (Exception e) %7B%0A%0A        %7D%0A%0A        boolean valid = false;%0A%0A        if (valid = true) %7B%0A            // whatever%0A        %7D%0A%0A
         retu

Add back in violations to make things more interesting