package annotations.util;

/*>>>
import org.checkerframework.checker.nullness.qual.*;
*/

/**
 * {@link Strings} provides useful static methods related to strings.
 */
public abstract class Strings {
    private Strings() {}

    /**
     * Returns the given string, escaped and quoted according to Java
     * conventions.  Currently, only newlines, backslashes, tabs, and
     * single and double quotes are escaped.  Perhaps nonprinting
     * characters should also be escaped somehow.
     */
    public static String escape(String in) {
        StringBuilder out = new StringBuilder("\"");
        for (int pos = 0; pos < in.length(); pos++) {
            switch (in.charAt(pos)) {
            case '\n':
                out.append("\\n");
            }
                break;
            case '\t':
                out.append("\\t");
                break;
            case '\\':
                out.append("\\\\");
                break;
            case '\'':
                out.append("\\\'");
                break;
            case '\"':
                out.append("\\\"");
                break;
            default:
                out.append(in.charAt(pos));
            }
        out.append('\"');
        return out.toString();
    }
}

@@ -739,30 +739,16 @@
 %22%5C%5Cn%22);%0A
-            %7D%0A
         
@@ -1168,32 +1168,36 @@
       %7D%0A        
+    
 out.append('%5C%22')
@@ -1198,16 +1198,20 @@
 ('%5C%22');%0A
+    
         
@@ -1233,16 +1233,26 @@
 ring();%0A
+        %7D%0A
     %7D%0A%7D%0A

Fix misplaced curly brace