package rabbit;

public class CommandCreator {

    public String createCommand(String userCommand) {
        String[] tokens =  userCommand.split("\\s+");

        switch(tokens[0]) {
            case "availability":
                return "nmap -sV " + tokens[1];
            case "security":
                switch (tokens[1]) {
                    case "tls":
                        return "nmap --script ssl-enum-ciphers -p 443 " + tokens[2];
                    case "ecrypt2lvl":
                        return "nmap --script ssl-enum-ciphers -p 443" + tokens[2];
                    case "open_ports":
                        return "nmap " + tokens[2];
                    default :
                        return null;
                }
            default :
                return null;
        }
    }
}

@@ -182,89 +182,8 @@
 ) %7B%0A
-            case %22availability%22:%0A                return %22nmap -sV %22 + tokens%5B1%5D;%0A
     

Remove check for "availability" command because this case is treated separately.