Change the Input2Node.java. Fix bugs.

Signed-off-by: Pengfei Zhang <pzhang11@stevens.edu>