I do understand why you have such error. I can not re-produce the same error.
It is working fine with my EJS version 4.2

It should be
public boolean _method_for_shape2_enabledPosition () {  return _isPaused(); }
instead of
public int _method_for_shape2_enabledPosition () {  return _isPaused(); }

Please try to quit your EJS. re-run it and comiple the same file again.