Installation Instructions | Video Demo | Background | User Manual | Theoretical Background | Developer Guide | Tippers' List
Y. Gil and M. Orrú, “Code spartanization: One Rational Approach for Resolving Religious Style Wars” in Proc. of SAC’17, the 32nd ACM Symposium on Applied Computing, Marrakesh, Morocco, April 3–7 2017.
Y. Gil and M. Orrù, "The Spartanizer: Massive automatic refactoring," 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER), Klagenfurt, 2017, pp. 477-481. doi: 10.1109/SANER.2017.7884657 IEEExplore
The Spartanizer applies the principles of Spartan Programming to your Java code. It applies many different tippers, which are little rules that provide suggestions on how to shorten and simplify your code, e.g, by using fewer variables, factoring out common structures, more efficient use of control flow, etc.
The Spartanizer help you make a sequence small, nano-refactorings of your code, to make it shorter, and more conforming to a language of nano-patterns. The resulting code is not just shorter, it is more regular. The spartanization process tries to remove as many distracting details and variations from the code, stripping it to its bare bone.
This includes removal of piles of syntactic baggage, which is code that does nothing, except for being there: curly brackets around one statement, initializations which reiterate the default, modifiers which do not change the semantics, implicit call to super()
which every constructor has, fancy, but uselessly long variable names, variables which never vary and contain temporaries and many more. Overall, the Spartanizer has over 100 tippers.
This project was conceived as an academic project in the [Technion - Israel Institute of Technology], and was later developed for several years by different students and members of the Computer Science faculty.
The refactorings made by this plug-in are based on the concept of Spartan Programming, which suggests guidelines for writing short, clean code. There's a lot of reading material on the subject in the project wiki.
The project is available under the MIT License