package ru.aserdyuchenko.bot;

import java.io.PrintWriter;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author Anton Serdyuchenko (anton415@gmail.com)
 */
public class Server {
/**
 * @param socket				socket.
 */
	private final Socket socket;
/**
 * @param NUMBERPORT			NUMBERPORT.
 */
	public static final int NUMBERPORT = 5000;
/**
 * @param socket					server socket.
 */
	public Server(Socket socket) {
		this.socket = socket;
	}
/**
 * @param args					args.
 * @throws IOException			exception.
 */
	public static void main(String[] args) throws IOException {
		try (final Socket socket = new ServerSocket(NUMBERPORT).accept()) {
			new Server(socket);
		}
	}
/**
 * @throws IOException	 		IOException.
 */
	public void startServer() throws IOException {
		PrintWriter out = new PrintWriter(this.socket.getOutputStream(), true);
		BufferedReader in = new BufferedReader(new InputStreamReader(this.socket.getInputStream()));
		String ask = null;
		do {
   			System.out.println("wait command ...");
    		ask = in.readLine();
    		System.out.println(ask);
			if (ask.equals("Hello oracle")) {
       			out.println("Hello, dear friend, I'm a oracle.");
        		out.println();
    		} else if (!(ask.equals("exit"))) {
				out.println("I don`t understand.");
				out.println();
			}
		} while (!("exit".equals(ask)));
	}
}

@@ -1169,27 +1169,16 @@
 ;%0A%09%09%09if 
-(ask.equals
 (%22Hello 
@@ -1184,16 +1184,27 @@
  oracle%22
+.equals(ask
 )) %7B%0A   
@@ -1308,19 +1308,22 @@
  (!(
-ask
+%22exit%22
 .equals(
 %22exi
@@ -1318,22 +1318,19 @@
 .equals(
-%22exit%22
+ask
 ))) %7B%0A%09%09

Edit if statement in part three, in bot.