package gherkin;

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.List;

public class FixJava {
    public static String join(List<String> strings, String separator) {
        StringBuffer sb = new StringBuffer();
        int i = 0;
        for (String s : strings) {
            if (i != 0) sb.append(separator);
            sb.append(s);
            i++;
        }
        return sb.toString();
    }

    public static String readResourceAsString(String filePath) throws IOException {
        Reader machine = new InputStreamReader(FixJava.class.getResourceAsStream(filePath));

        final char[] buffer = new char[0x10000];
        StringBuilder out = new StringBuilder();
        int read;
        do {
            read = machine.read(buffer, 0, buffer.length);
            if (read > 0) {
                out.append(buffer, 0, read);
            }
        } while (read >= 0);
        return out.toString();
    }
}

@@ -231,18 +231,19 @@
 StringBu
-ff
+ild
 er sb = 
@@ -254,18 +254,19 @@
 StringBu
-ff
+ild
 er();%0A  
@@ -702,19 +702,18 @@
 Builder 
-out
+sb
  = new S
@@ -862,19 +862,18 @@
         
-out
+sb
 .append(
@@ -952,11 +952,10 @@
 urn 
-out
+sb
 .toS

Use faster (unsynchronized) StringBuilder