Eclipse plugin that performs automatic refactoring of Java source code, making it shorter, more idiomatic and more readable
Java TeX Lex Makefile Awk Python
Latest commit 4f8475c Mar 5, 2018
Permalink
Failed to load latest commit information.
.settings sync Nov 19, 2017
SpartanizerPlugin Renaming Jun 25, 2017
fluent.ly Work on #1399 May 27, 2017
gradle/wrapper #1420, renamed more projects May 25, 2017
il.org.spartan.fluent.ly.test sync Nov 19, 2017
il.org.spartan.fluent.ly added an empty map Nov 25, 2017
il.org.spartan.intellij-spartanizer.test sync Nov 19, 2017
il.org.spartan.intellij-spartanizer sync Nov 19, 2017
il.org.spartan.metatester sync Mar 5, 2018
il.org.spartan.spartan.test sync Nov 19, 2017
il.org.spartan.spartan sync Nov 19, 2017
il.org.spartan.spartanizer-plugin.test sync Nov 19, 2017
il.org.spartan.spartanizer-plugin sync Mar 5, 2018
target.p2 trying to fix the widget for release Jul 1, 2017
.gitignore project infrastructure fixes Jun 27, 2017
.project Research Sync Nov 18, 2017
.travis.yml fixing build Apr 7, 2017
README.md video demo Apr 29, 2017
_config.yml Set theme jekyll-theme-leap-day Mar 25, 2017
build.gradle added target.p2 local maven repo as repository to all subprojects May 22, 2017
codecov.yml Update codecov.yml Apr 8, 2017
gradle.properties added target.p2 and IntelliJ-Spartanizer subproject; will cause long … May 21, 2017
gradlew added gradlew permission u+x May 21, 2017
gradlew.bat setup May 2, 2017
package blueprint.github sync May 5, 2017
plugin.enjoyable Update of Configuration Jun 3, 2017
settings.gradle Merged the MetaTester Nov 15, 2017
sonar-project.properties added sonar properties conf file. Sep 12, 2016
spartanizer.xml trying to fix the widget for release Jul 1, 2017

README.md

Installation Instructions | Video Demo | Background | User Manual | Theoretical Background | Developer Guide | Tippers' List

Development Status

Build Status codecov

Articles

  • 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 on IEEE Software Blog

The Spartanizer is:

  • An Eclipse plugin
  • Offers in the problems view tips for simplifying your code
  • Make your code laconic: say much in few words.
  • Platform for other research: nano-patterns, source to source transformation, and The Athenizer

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.

License

The project is available under the MIT License