jSparrow

WHAT IS jSPARROW?

Jsparrow is a tool that refactors Java code for you, powered by the Eclipse Java compiler.
Based on a set of rules you can decide which improvements should be applied to your code base. These rules range from removing code smells to the introduction of lambda functionals.

One of the latest additions is the usage of the var keyword for local variables to minimize the boilerplate code and increase readability.
You can execute it as part of your development process as an Eclipse IDE Plug-In or integrate it seamlessly into your CI/CD pipeline as a maven Plugin.

Refactor your Java code.
Improve the code quality.
Apply the latest Java features.
All automatically.

Videos

3 reasons to work with jSparrow

3 reasons to work with jSparrow

Modernisation

jSparrow helps you upgrade your legacy codebase by automatically transforming old Java language constructs to new ones. i.e. While- and For-Loops will be transformed to Java Streams and java.util.Date will be upgraded to java.time.*

Clean Code

Rules like “Rearrange Class Members” or  “Split Multiple Variable Declarations”” help you keep your code structured and readable. We always develop our rules with best practices in mind.

Bug Prevention

Sometimes bugs can be avoided just by tweaking the Java Syntax a bit. i.e. The “Reorder String Equality Check” rule prevents Null Pointer Exceptions when comparing a String Object and a String Literal. Since a String Literal can’t be null, equals() is called on that literal with the String Object as parameter.

Measurement

Measurement

  • jSparrow was able to resolve up to one third of the overall issues measured with third party source code analyzers, on various opensource projects. An estimated human effort of several months could be spared by jSparrow in less than five minutes.

Measured with SonarQube and refactored by jSparrow

[visualizer id=”1488″]

[visualizer id=”1542″]

[visualizer id=”1577″]

[visualizer id=”1530″]

[visualizer id=”1586″]

[visualizer id=”1534″]

[visualizer id=”1618″]

[visualizer id=”1526″]

[visualizer id=”1546″]

[visualizer id=”1582″]

[visualizer id=”1550″]

[visualizer id=”1590″]

[visualizer id=”1594″]

[visualizer id=”1598″]

[visualizer id=”1602″]

[visualizer id=”1606″]

[visualizer id=”1610″]

[visualizer id=”1614″]

9 Groups Definition

9 rule group definitions from jSparrow automatical factoring plugin

5 Groups Definition

5 rule group definitions from jSparrow automatical factoring plugin

jSparrow Rules

jSparrow Rules

JSPARROW'S RULES CREATED TO ASSIST YOU IN YOUR EVERY DAY CODING.

Note: This Table was updated [see table head] which means rules could have already been redone and/or fixed as well as new rules might already be available without shown down below.

[table id=jsparrow_rules /]

Two of our rules are configurable.

This increases readability, allows effective search and provides seamless integration.

 

[table id=jsparrow_configurable_rules /]