import java.util.Objects;

public class MovementRoutine
{
    public MovementRoutine (String command, int numberOfCommands)
    {
        _command = command;
        _numberOfCommands = numberOfCommands;

        System.out.println("NumberOfCommands "+numberOfCommands);

        if ((command == null) || (command.equals("")))
        {
            System.out.println("OOPS");
            System.exit(0);
        }
    }

    public boolean containsRoutine (MovementRoutine compare)
    {
        return (_command.indexOf(compare.getCommand()) != -1);
    }

    public void removeRoutine (MovementRoutine compare)
    {
        System.out.println("Removing "+compare.getCommand()+" from "+_command);

        _command = _command.replace(compare.getCommand(), "");
        _numberOfCommands -= compare.numberOfCommands();
    }

    public String getCommand ()
    {
        return _command;
    }

    public int getLength ()
    {
        return ((_command == null) ? 0 : _command.length());
    }
    
    public int numberOfCommands ()
    {
        return _numberOfCommands;
    }

    @Override
    public String toString ()
    {
        return _command;
    }

    @Override
    public int hashCode ()
    {
        return Objects.hash(_command, _numberOfCommands);
    }

    @Override
    public boolean equals (Object obj)
    {
        if (obj == null)
            return false;

        if (this == obj)
            return true;
        
        if (getClass() == obj.getClass())
        {
            MovementRoutine temp = (MovementRoutine) obj;

            return (_command.equals(temp._command));
        }

        return false;
    }

    private String _command;
    private int _numberOfCommands;
}
@@ -201,151 +201,90 @@
 ds;%0A
-%0A
     
+%7D%0A%0A
     
-System.out.println(%22NumberOfCommands %22+numberOfCommands);%0A%0A        if ((command == null) %7C%7C (command.equals(%22%22)))%0A        %7B%0A  
+public boolean containsRoutine (MovementRoutine compare)%0A    %7B%0A
         
   Sy
@@ -275,26 +275,24 @@
   %7B%0A        
-  
 System.out.p
@@ -303,127 +303,61 @@
 ln(%22
-OOPS%22);%0A            System.exit(0);%0A        %7D%0A    %7D%0A%0A    public boolean containsRoutine (MovementRoutine compare)%0A    %7B
+contains %22+compare.getCommand().contains(_command));%0A
 %0A   

Update MovementRoutine.java