java,matlab: remove unused code