import java.util.*;

public class Command
{
    public static final String MASK = "mask";
    public static final String MEM = "mem";
    public static final String OPEN_BRACE = "[";
    public static final String CLOSE_BRACE = "]";
    public static final String EQUALS = "=";

    public Command (String mask, Vector<String> cmds)
    {
        _mask = mask;
        _commands = cmds;
    }

    public void execute (HashMap<Long, Long> memory)
    {
        String theMask = _mask.substring(_mask.indexOf(EQUALS) +1).trim();
    }

    @Override
    public String toString ()
    {
        String str = _mask;

        for (int i = 0; i < _commands.size(); i++)
        {
            str += "\n" + _commands.elementAt(i);
        }

        return str;
    }

    private String _mask;
    private Vector<String> _commands;
}
@@ -324,18 +324,33 @@
 ng%3E cmds
+, boolean debug
 )%0A
-
     %7B%0A  
@@ -395,16 +395,40 @@
 = cmds;%0A
+        _debug = debug;%0A
     %7D%0A%0A 
@@ -559,16 +559,709 @@
 .trim();
+%0A%0A        if (_debug)%0A            System.out.println(%22Bitmask is: %22+theMask);%0A%0A        for (int i = 0; i %3C _commands.size(); i++)%0A        %7B%0A            int startIndex = _commands.elementAt(i).indexOf(OPEN_BRACE);%0A            int endIndex = _commands.elementAt(i).indexOf(CLOSE_BRACE);%0A            String addr = _commands.elementAt(i).substring(startIndex +1, endIndex);%0A%0A            if (_debug)%0A                System.out.println(%22Memory address: %22+addr);%0A%0A            startIndex = _commands.elementAt(i).indexOf(EQUALS);%0A%0A            String value = _commands.elementAt(i).substring(startIndex +1).trim();%0A%0A            if (_debug)%0A                System.out.println(%22Value: %22+value);%0A        %7D
 %0A    %7D%0A%0A
@@ -1510,24 +1510,24 @@
 ring _mask;%0A
-
     private 
@@ -1552,9 +1552,37 @@
 mmands;%0A
+    private boolean _debug;%0A
 %7D

Update Command.java