The problem is very simple, it happens when I, for example, create a loop or if condition without braces. The compiler reads the next line as the loop content or the if condition content, and uses the next second next line as it's not included in the loop or the if condition, for example:
In this code, the compiler posts only the i value for 10 times, which of course changes during the loop, and the "Hello" message only once, considering it not in the loop.
The problem in your program, is that when I do this, with 3 loops, the second next line after the loop keeps another indent, for example:
//contents of the last loop
//the next line starts from here, while it should take no indents at all.
I hope you check this and fix it.
In Java this works as expected, reassigning to cnd for evaluation
fixed, change set:
Integrated into 'main-golden', will be available in build *201001100200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Log: fixed BZ#177229 Indent problem with multiple loops or if conditions
verified in trunk build 201001150201
The fix has been ported into the release68_fixes repository.
verified in patch1 candidate