import java.util.List;
import java.util.Map;

public class SLS_Sample {
    private String name;
    private int age;
    private int height;

    SLS_Sample hasIt(List<SLS_Sample> l, String n) {

        SLS_Sample found = null;
        for (SLS_Sample s : l) {
            if (s.name.equals(n)) {
                found = s;
            }
        }

        return found;
    }

    SLS_Sample hasAge(List<SLS_Sample> l, int age) {

        SLS_Sample found = null;
        for (SLS_Sample s : l) {
            if (s.age == age) {
                found = s;
            }
        }

        return found;
    }

    SLS_Sample fpBreak(List<SLS_Sample> l, String n) {

        SLS_Sample found = null;
        for (SLS_Sample s : l) {
            if (s.name.equals(n)) {
                found = s;
                break;
            }
        }

        return found;
    }

    SLS_Sample fpReturn(List<SLS_Sample> l, String n) {

        SLS_Sample found = null;
        for (SLS_Sample s : l) {
            if (s.name.equals(n)) {
                found = s;
                return found;
            }
        }

        return found;
    }

    boolean fpSetFlag(Map<String, SLS_Sample> m, String name) {
        boolean found = false;
        for (SLS_Sample s : m.values()) {
            if ((s == null) || s.name.equals(name)) {
                found = true;
                s.age = 1;
            }
        }

        return found;
    }

    int fpCalcTotal(List<SLS_Sample> l, String name) {
        int total = 0;
        for (SLS_Sample s : l) {
            if (s.name.equals(name)) {
                total += s.age;
            }
        }

        return total;
    }

    void fpTwoSets(List<SLS_Sample> l, String name, int age, int height) {
        String n = null;
        int a = 0;
        int h = 0;

        for (SLS_Sample s : l) {
            if (s.name.equals(name)) {
                n = s.name;
            } else if (s.age == age) {
                a = s.age;
            } else if (s.height == height) {
                h = s.height;
            }
        }

        System.out.println("Found: " + n + " " + a + " " + h);
    }

    enum State {
        A, B, C
    }

    void fpStateMachine(char[] args, String val) {
        State state = State.A;

        for (char c : args) {
            switch (state) {
                case A:
                    if (val.equals(String.valueOf(c))) {
                        state = State.B;
                    } else {
                        return;
                    }
                break;
                case B:
                    if (val.equals(String.valueOf(c))) {
                        state = State.C;
                    }
                break;

                default:
                    if (val.equals(String.valueOf(c))) {
                        state = State.A;
                    }
                break;
            }
        }
    }

}

@@ -1,24 +1,83 @@
+import java.io.BufferedReader;%0Aimport java.io.IOException;%0A
 import java.util.List;%0Ai
@@ -2987,10 +2987,424 @@
 %0A    %7D%0A%0A
+    public int fpContinue(BufferedReader reader) throws IOException %7B%0A        String line;%0A        int mode = 0;%0A        while ((line = reader.readLine()) != null) %7B%0A%0A            if (line.equals(%22foo%22)) %7B%0A                mode = 1;%0A                continue;%0A            %7D%0A            if (line.equals(%22bar%22)) %7B%0A                mode = 2;%0A                continue;%0A            %7D%0A        %7D%0A%0A        return mode;%0A    %7D%0A%0A
 %7D%0A

add fp for SLS