This paper presents an approach of static and dynamic visualizations synchronized along with source code in a web-based programming environment, JavelinaCode. Using JavelinaCode, student programmers can write Java programs directly in a frontend web browser without any software or plug-in installation. They are provided with a view of the static state of a Java program in UML class diagrams and the dynamic run-time state of the program by stepping forwards and backwards through program execution. A case study has revealed that our approach is useful, in particular, to trace and detect an object flow anomaly caused by method overriding and polymorphism. A preliminary comparison test result also has shown that through our web-based platform-independent environment, student programmers are freed from concern with continuous version changes and evolutions of the Java language, plug-ins, and operating systems.