Method code too large

first time I ran the script,it was ok. second time I ran the script,it got error. then i saved the bm1.groovy without any edit,it was ok again

java.lang.RuntimeException: Method code too large!
at groovyjarjarasm.asm.MethodWriter.a(Unknown Source)
at groovyjarjarasm.asm.ClassWriter.toByteArray(Unknown Source)
at org.codehaus.groovy.control.CompilationUnit$6.call(CompilationUnit.java:890)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1188)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:653)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:631)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:608)
at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.processToPhase(GroovyCompilationUnitDeclaration.java:214)
at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.generateCode(GroovyCompilationUnitDeclaration.java:326)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:931)
at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:141)
at java.lang.Thread.run(Thread.java:748)

2019-08-24 15:21:06.005 ERROR c.k.katalon.core.main.TestCaseExecutor - :x: Test Cases/baoming_soccer FAILED.
Reason:
java.lang.Error: Unresolved compilation problem:
General error during class generation: Method code too large!

java.lang.RuntimeException: Method code too large!
at groovyjarjarasm.asm.MethodWriter.a(Unknown Source)
at groovyjarjarasm.asm.ClassWriter.toByteArray(Unknown Source)
at org.codehaus.groovy.control.CompilationUnit$6.call(CompilationUnit.java:890)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1188)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:653)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:631)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:608)
at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.processToPhase(GroovyCompilationUnitDeclaration.java:214)
at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.generateCode(GroovyCompilationUnitDeclaration.java:326)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:931)
at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:141)
at java.lang.Thread.run(Thread.java:748)

at soccer.bm1.<init>(bm1.groovy:1)
at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:46)
at baoming_soccer.run(baoming_soccer:52)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1566631247543.run(TempTestSuite1566631247543.groovy:35)

“Method code too large” problem is well-known.

Search for previous posts; for example