A minor smell for readability rule:
Both the Sun and Google Java style guides recommend setting off keywords with spaces in order to make them stand out, and not be mistaken for method calls, which should not have a space between the method name and the argument list (to be consistent with how functions are written in mathematical notation). Similarly, braces that are part of a control structure should have spaces. So, something like
if(foo (bar) > 5){
i–;
}else{
i++;
}
should be replaced with
if (foo(bar) > 5) {
i–;
} else {
i++;
}
(Of course, the braces part would contradict rule java:S1106, which says put them on separate lines, but that rule seems optional at this time.)
Parameterizing would be even better (some people may want it the opposite way).