Consider the following:
package p
class C { String s }
void test() {
}
The source range (and hence fold region) for the implicit run method starts at the first method or statement and ends at the last method or statement. Thus it often overlaps with script methods and so collapse works strangely.

Consider the following:
The source range (and hence fold region) for the implicit
runmethod starts at the first method or statement and ends at the last method or statement. Thus it often overlaps with script methods and so collapse works strangely.