Auxiliary tools are not required for the lab session itself, but they may be useful to get additional information (or alternatives) on a project. Use them at your own discretion.
First, make sure to fork the JPacman from the TA's repository into your GitHub account. It is necessary to fork the project because the free version of CodeScene can only see projects from your own account.
Second, go into CodeScene, and click on the "Login" menu (top-right corner). You can choose the option "Login with Github" at the bottom of that page. Once logged in, you can choose to create a new project, where CodeScene will show all the GitHub projects in your account. Select JPacman and go do the next part until it finishes (it might take a while, depending on the project).
Download/Clone the JPacman project and open it on IntelliJ; build it. JPacman uses Gradle as a built/dependency manager. Make sure you can build and run it before doing any source code modification. Since this lecturer is all about visualization, we will not make any changes to the code. But you may need that on future lessons.
Also if have not already, download the book for this course "Object-Oriented Reengineering Patterns" (Note: OORP, p.xx refers to a page in the pdf version of this book)
This first task has two goals: (i) to help familiarize yourself with the CodeScene interface; and (ii) to observe that not every visualization is useful for refactoring.
Visit the CodeScene website and click at the Showcases. These are examples (from a full version of CodeScene and not only the free version we are using) of projects analyzed by CodeScene. Select the React project.
Visit the JsCity website and look at the examples. You may want to select a simple example first to get acquainted. But after that, also select the "React" project to visualize (and be patient because it may take a while).
For the second task, the goal is to start getting acquainted with the JPacman source code. Download/clone the repository and run the application. Now look at the source code and try to understand its internal structure. In the "docs/uml" folder there are two simplified UML diagrams.
As stated in the book (OORP, p.36), this is your "First Contact" with the software that needs reengineering activities. As often we ask ourselves "Where do I start?" (OORP, p.37).
Well, JPacman is a java implementation that is supposed to replicate the original Pacman Game. What features are missing in Jpacman (compared to the original)?
Is it possible to implement those features right now; or should we reengineer the project to make it easier to add the new features? The last question is rhetorical for this task, but you should think about it when doing a reengineering project.
The third task is to use our visualization tool of choice (CodeScene) to identify possible reengineering targets. Since we already had the "First Contact", now we should move to the "Initial Understanding" (OORP, p.83) of the system. One important reengineering pattern is to Study the Exception Entities (OORP, p.107).
Using CodeScene, can you identify artifacts that appear to be out of place? Could they benefit from refactoring activities? How is the complexity measurements for such artifacts compared to others?