Refactored statement.java