Buggy code:
public class BoundaryErrorEventTest extends PluggableProcessEngineTestCase { @ Deployment public void testCatchErrorOnEmbeddedSubprocess ( ) { } public void testThrowErrorWithoutErrorCode ( ) { } public void testThrowErrorWithEmptyErrorCode ( ) { } @ Deployment public void testCatchErrorOnEmbeddedSubprocessWithEmptyErrorCode ( ) { } @ Deployment public void testCatchErrorOnEmbeddedSubprocessWithoutErrorCode ( ) { } @ Deployment public void testCatchErrorOfInnerSubprocessOnOuterSubprocess ( ) { } @ Deployment public void testCatchErrorInConcurrentEmbeddedSubprocesses ( ) { } @ Deployment public void testCatchErrorInConcurrentEmbeddedSubprocessesThrownByScriptTask ( ) { } private void assertErrorCaughtInConcurrentEmbeddedSubprocesses ( String processDefinitionKey ) { } @ Deployment public void testDeeplyNestedErrorThrown ( ) { } @ Deployment public void testDeeplyNestedErrorThrownOnlyAutomaticSteps ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorOnCallActivity-parent.bpmn20.xml" , "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.subprocess.bpmn20.xml" } ) public void testCatchErrorOnCallActivity ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorOnCallActivity-parent.bpmn20.xml" , "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.subprocess.bpmn20.xml" } ) public void FAILING_testCatchErrorOnCallActivityShouldEndCalledProcessProperly ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.subprocess.bpmn20.xml" } ) public void testUncaughtError ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testUncaughtErrorOnCallActivity-parent.bpmn20.xml" , "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.subprocess.bpmn20.xml" } ) public void testUncaughtErrorOnCallActivity ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByCallActivityOnSubprocess.bpmn20.xml" , "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.subprocess.bpmn20.xml" } ) public void testCatchErrorThrownByCallActivityOnSubprocess ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByCallActivityOnCallActivity.bpmn20.xml" , "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.subprocess2ndLevel.bpmn20.xml" , "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.subprocess.bpmn20.xml" } ) public void testCatchErrorThrownByCallActivityOnCallActivity ( ) throws InterruptedException { } @ Deployment public void testCatchErrorOnParallelMultiInstance ( ) { } @ Deployment public void testCatchErrorOnSequentialMultiInstance ( ) { } @ Deployment public void testCatchErrorThrownByJavaDelegateOnServiceTask ( ) { } @ Deployment public void testCatchErrorThrownByJavaDelegateOnServiceTaskNotCancelActivity ( ) { } @ Deployment public void testCatchErrorThrownByJavaDelegateOnServiceTaskWithErrorCode ( ) { } @ Deployment public void testCatchErrorThrownByJavaDelegateOnEmbeddedSubProcess ( ) { } @ Deployment public void testCatchErrorThrownByJavaDelegateOnEmbeddedSubProcessInduction ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByJavaDelegateOnCallActivity-parent.bpmn20.xml" , "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByJavaDelegateOnCallActivity-child.bpmn20.xml" } ) public void testCatchErrorThrownByJavaDelegateOnCallActivity ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByJavaDelegateOnCallActivity-child.bpmn20.xml" } ) public void testUncaughtErrorThrownByJavaDelegateOnServiceTask ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByAbstractBpmnActivityBehavior.bpmn20.xml" } ) public void testCatchExceptionThrownByExecuteOfAbstractBpmnActivityBehavior ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByAbstractBpmnActivityBehavior.bpmn20.xml" } ) public void testCatchErrorThrownByExecuteOfAbstractBpmnActivityBehavior ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByAbstractBpmnActivityBehavior.bpmn20.xml" } ) public void testCatchExceptionThrownBySignalMethodOfAbstractBpmnActivityBehavior ( ) { } @ Deployment public void FAILING_testCatchExceptionExpressionThrownByFollowUpTask ( ) { } @ Deployment public void FAILING_testCatchExceptionClassDelegateThrownByFollowUpTask ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByAbstractBpmnActivityBehavior.bpmn20.xml" } ) public void testCatchErrorThrownBySignalOfAbstractBpmnActivityBehavior ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByDelegateExpression.bpmn20.xml" } ) public void testCatchExceptionThrownByExecuteOfDelegateExpression ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByDelegateExpression.bpmn20.xml" } ) public void testCatchErrorThrownByExecuteOfDelegateExpression ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByDelegateExpression.bpmn20.xml" } ) public void testCatchExceptionThrownBySignalMethodOfDelegateExpression ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByDelegateExpression.bpmn20.xml" } ) public void testCatchErrorThrownBySignalOfDelegateExpression ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testUncaughtErrorThrownByJavaDelegateOnCallActivity-parent.bpmn20.xml" , "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByJavaDelegateOnCallActivity-child.bpmn20.xml" } ) public void testUncaughtErrorThrownByJavaDelegateOnCallActivity ( ) { } @ Deployment public void testCatchErrorThrownByJavaDelegateOnMultiInstanceServiceTaskSequential ( ) { } @ Deployment public void testCatchErrorThrownByJavaDelegateOnMultiInstanceServiceTaskParallel ( ) { } @ Deployment public void testErrorThrownByJavaDelegateNotCaughtByOtherEventType ( ) { } private void assertThatErrorHasBeenCaught ( String procId ) { } private void assertThatExceptionHasBeenCaught ( String procId ) { } @ Deployment public void testConcurrentExecutionsInterruptedOnDestroyScope ( ) { } @ Deployment public void testCatchErrorThrownByExpressionOnServiceTask ( ) { } @ Deployment public void testCatchErrorThrownByDelegateExpressionOnServiceTask ( ) { } @ Deployment public void testCatchErrorThrownByJavaDelegateProvidedByDelegateExpressionOnServiceTask ( ) { } @ Deployment public void testCatchExceptionThrownByExpressionOnServiceTask ( ) { } @ Deployment public void testCatchExceptionThrownByScriptTask ( ) { } @ Deployment public void testCatchSpecializedExceptionThrownByDelegate ( ) { } @ Deployment public void testUncaughtRuntimeException ( ) { } @ Deployment public void testUncaughtBusinessExceptionWrongErrorCode ( ) { } @ Deployment public void testCatchErrorOnSubprocessThrownByNonInterruptingEventSubprocess ( ) { } @ Deployment public void testCatchErrorOnSubprocessThrownByInterruptingEventSubprocess ( ) { } @ Deployment public void testCatchErrorOnSubprocessThrownByNestedEventSubprocess ( ) { } @ Deployment public void testCatchErrorOnSubprocessSetsErrorCodeVariable ( ) { } @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//ThrowErrorProcess.bpmn" , "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchErrorThrownByCallActivityOnSubprocessSetsErrorCodeVariable.bpmn" } ) public void testCatchErrorThrownByCallActivityOnSubprocessSetsErrorCodeVariable ( ) { } @ Deployment public void testCatchErrorThrownByMultiInstanceSubProcessSetsErrorCodeVariable ( ) { } private void checkErrorCodeVariable ( String variableName , Object expectedValue ) { } <START_BUG> @ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchBpmnErrorThrownByJavaDelegateInCallActivityOnSubprocessSetsErrorCodeVariable.bpmn" , "org//camunda//bpm//engine//test//bpmn//callActivity//subProcessWithThrownError.bpmn" } ) <END_BUG> public void testCatchBpmnErrorThrownByJavaDelegateInCallActivityOnSubprocessSetsErrorCodeVariable ( ) { runtimeService . startProcessInstanceByKey ( "Process_1" ) ; Task task = taskService . createTaskQuery ( ) . singleResult ( ) ; taskService . complete ( task . getId ( ) ) ; String variableName = "errorCode" ; Object errorCode = "errorCode" ; checkErrorCodeVariable ( variableName , errorCode ) ; } }

Fix:
@ Deployment ( resources = { "org//camunda//bpm//engine//test//bpmn//event//error//BoundaryErrorEventTest.testCatchBpmnErrorThrownByJavaDelegateInCallActivityOnSubprocessSetsErrorCodeVariable.bpmn" , "org//camunda//bpm//engine//test//bpmn//callactivity//subProcessWithThrownError.bpmn" } )