[java] fixed the bytes offset convertion problems.
[java] CodeCompletion implementation.