test_class.declarator: queueListener
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private QueueListener queueListener;
test_class.type: QueueListener
test_class.var_name: queueListener
test_class.declarator: eventBus
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private EventBus eventBus;
test_class.type: EventBus
test_class.var_name: eventBus
test_class.declarator: executionMessageConverter
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private ExecutionMessageConverter executionMessageConverter;
test_class.type: ExecutionMessageConverter
test_class.var_name: executionMessageConverter
test_class.declarator: scoreEventFactory
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private ScoreEventFactory scoreEventFactory;
test_class.type: ScoreEventFactory
test_class.var_name: scoreEventFactory
test_class.declarator: executionStateService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private ExecutionStateService executionStateService;
test_class.type: ExecutionStateService
test_class.var_name: executionStateService
test_class.declarator: splitJoinService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private SplitJoinService splitJoinService;
test_class.type: SplitJoinService
test_class.var_name: splitJoinService
test_class.file: engine/queue/score-queue-impl/src/test/java/io/cloudslang/engine/queue/services/QueueListenerImplTest.java
test_class.identifier: QueueListenerImplTest
test_case.body: @Test
  	public void testOnFailedBranchExecution() {
  		List<ExecutionMessage> messages = new ArrayList<>();
  		Execution execution1 = createBranchExecution();
  		Execution execution2 = createBranchExecution();
  		messages.add(createExecutionMessage(execution1));
  		messages.add(createExecutionMessage(execution2));
  
  		queueListener.onFailed(messages);
  
  		verify(splitJoinService, times(1)).endBranch((List<Execution>) argThat(hasItem(execution1)));
  		verify(splitJoinService, times(1)).endBranch((List<Execution>) argThat(hasItem(execution2)));
  	}
test_case.class_method_signature: QueueListenerImplTest.testOnFailedBranchExecution()
test_case.full_signature: @Test public void testOnFailedBranchExecution()
test_case.identifier: testOnFailedBranchExecution
test_case.invocations: createBranchExecution createBranchExecution add createExecutionMessage add createExecutionMessage onFailed endBranch verify times argThat hasItem endBranch verify times argThat hasItem
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOnFailedBranchExecution()
focal_class.declarator: logger = Logger.getLogger(QueueListenerImpl.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger logger = Logger.getLogger(QueueListenerImpl.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: FLOW_TERMINATION_TYPE = "FLOW_TERMINATION_TYPE"
focal_class.modifier: private static final
focal_class.original_string: private static final String FLOW_TERMINATION_TYPE = "FLOW_TERMINATION_TYPE";
focal_class.type: String
focal_class.var_name: FLOW_TERMINATION_TYPE
focal_class.declarator: STEP_TYPE = "STEP_TYPE"
focal_class.modifier: private static final
focal_class.original_string: private static final String STEP_TYPE = "STEP_TYPE";
focal_class.type: String
focal_class.var_name: STEP_TYPE
focal_class.declarator: MULTI_INSTANCE = "MULTI_INSTANCE"
focal_class.modifier: private static final
focal_class.original_string: private static final String MULTI_INSTANCE = "MULTI_INSTANCE";
focal_class.type: String
focal_class.var_name: MULTI_INSTANCE
focal_class.declarator: executionStateService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ExecutionStateService executionStateService;
focal_class.type: ExecutionStateService
focal_class.var_name: executionStateService
focal_class.declarator: executionMessageConverter
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ExecutionMessageConverter executionMessageConverter;
focal_class.type: ExecutionMessageConverter
focal_class.var_name: executionMessageConverter
focal_class.declarator: eventBus
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private EventBus eventBus;
focal_class.type: EventBus
focal_class.var_name: eventBus
focal_class.declarator: splitJoinService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SplitJoinService splitJoinService;
focal_class.type: SplitJoinService
focal_class.var_name: splitJoinService
focal_class.declarator: scoreEventFactory
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ScoreEventFactory scoreEventFactory;
focal_class.type: ScoreEventFactory
focal_class.var_name: scoreEventFactory
focal_class.declarator: pauseResumeService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private PauseResumeService pauseResumeService;
focal_class.type: PauseResumeService
focal_class.var_name: pauseResumeService
focal_class.file: engine/queue/score-queue-impl/src/main/java/io/cloudslang/engine/queue/services/QueueListenerImpl.java
focal_class.identifier: QueueListenerImpl
focal_class.interfaces: implements QueueListener
focal_class.class_method_signature: QueueListenerImpl.prePersist(List<ExecutionMessage> messages)
focal_class.full_signature: @Override public void prePersist(List<ExecutionMessage> messages)
focal_class.identifier: prePersist
focal_class.modifiers: @Override public
focal_class.parameters: (List<ExecutionMessage> messages)
focal_class.return: void
focal_class.signature: void prePersist(List<ExecutionMessage> messages)
focal_class.class_method_signature: QueueListenerImpl.onEnqueue(List<ExecutionMessage> messages, int queueSize)
focal_class.full_signature: @Override public void onEnqueue(List<ExecutionMessage> messages, int queueSize)
focal_class.identifier: onEnqueue
focal_class.modifiers: @Override public
focal_class.parameters: (List<ExecutionMessage> messages, int queueSize)
focal_class.return: void
focal_class.signature: void onEnqueue(List<ExecutionMessage> messages, int queueSize)
focal_class.class_method_signature: QueueListenerImpl.onPoll(List<ExecutionMessage> messages, int queueSize)
focal_class.full_signature: @Override public void onPoll(List<ExecutionMessage> messages, int queueSize)
focal_class.identifier: onPoll
focal_class.modifiers: @Override public
focal_class.parameters: (List<ExecutionMessage> messages, int queueSize)
focal_class.return: void
focal_class.signature: void onPoll(List<ExecutionMessage> messages, int queueSize)
focal_class.class_method_signature: QueueListenerImpl.onTerminated(List<ExecutionMessage> messages)
focal_class.full_signature: @Override public void onTerminated(List<ExecutionMessage> messages)
focal_class.identifier: onTerminated
focal_class.modifiers: @Override public
focal_class.parameters: (List<ExecutionMessage> messages)
focal_class.return: void
focal_class.signature: void onTerminated(List<ExecutionMessage> messages)
focal_class.class_method_signature: QueueListenerImpl.handleTerminatedMessages(List<ExecutionMessage> messages)
focal_class.full_signature: private ScoreEvent[] handleTerminatedMessages(List<ExecutionMessage> messages)
focal_class.identifier: handleTerminatedMessages
focal_class.modifiers: private
focal_class.parameters: (List<ExecutionMessage> messages)
focal_class.return: ScoreEvent[]
focal_class.signature: ScoreEvent[] handleTerminatedMessages(List<ExecutionMessage> messages)
focal_class.class_method_signature: QueueListenerImpl.isBranch(Execution execution)
focal_class.full_signature: private boolean isBranch(Execution execution)
focal_class.identifier: isBranch
focal_class.modifiers: private
focal_class.parameters: (Execution execution)
focal_class.return: boolean
focal_class.signature: boolean isBranch(Execution execution)
focal_class.class_method_signature: QueueListenerImpl.extractExecution(ExecutionMessage executionMessage)
focal_class.full_signature: private Execution extractExecution(ExecutionMessage executionMessage)
focal_class.identifier: extractExecution
focal_class.modifiers: private
focal_class.parameters: (ExecutionMessage executionMessage)
focal_class.return: Execution
focal_class.signature: Execution extractExecution(ExecutionMessage executionMessage)
focal_class.class_method_signature: QueueListenerImpl.onFailed(List<ExecutionMessage> messages)
focal_class.full_signature: @Override public void onFailed(List<ExecutionMessage> messages)
focal_class.identifier: onFailed
focal_class.modifiers: @Override public
focal_class.parameters: (List<ExecutionMessage> messages)
focal_class.return: void
focal_class.signature: void onFailed(List<ExecutionMessage> messages)
focal_class.class_method_signature: QueueListenerImpl.onPersistMessage(List<ExecutionMessage> messages)
focal_class.full_signature: @Override public void onPersistMessage(List<ExecutionMessage> messages)
focal_class.identifier: onPersistMessage
focal_class.modifiers: @Override public
focal_class.parameters: (List<ExecutionMessage> messages)
focal_class.return: void
focal_class.signature: void onPersistMessage(List<ExecutionMessage> messages)
focal_class.class_method_signature: QueueListenerImpl.pauseExecution(Execution execution, PauseReason pauseReason)
focal_class.full_signature: private Long pauseExecution(Execution execution, PauseReason pauseReason)
focal_class.identifier: pauseExecution
focal_class.modifiers: private
focal_class.parameters: (Execution execution, PauseReason pauseReason)
focal_class.return: Long
focal_class.signature: Long pauseExecution(Execution execution, PauseReason pauseReason)
focal_class.class_method_signature: QueueListenerImpl.createFailureEvents(List<ExecutionMessage> messages)
focal_class.full_signature: private ScoreEvent[] createFailureEvents(List<ExecutionMessage> messages)
focal_class.identifier: createFailureEvents
focal_class.modifiers: private
focal_class.parameters: (List<ExecutionMessage> messages)
focal_class.return: ScoreEvent[]
focal_class.signature: ScoreEvent[] createFailureEvents(List<ExecutionMessage> messages)
focal_class.class_method_signature: QueueListenerImpl.deleteExecutionStateObjects(List<ExecutionMessage> messages)
focal_class.full_signature: private void deleteExecutionStateObjects(List<ExecutionMessage> messages)
focal_class.identifier: deleteExecutionStateObjects
focal_class.modifiers: private
focal_class.parameters: (List<ExecutionMessage> messages)
focal_class.return: void
focal_class.signature: void deleteExecutionStateObjects(List<ExecutionMessage> messages)
focal_class.class_method_signature: QueueListenerImpl.failedBecauseNoWorker(Execution execution)
focal_class.full_signature: private boolean failedBecauseNoWorker(Execution execution)
focal_class.identifier: failedBecauseNoWorker
focal_class.modifiers: private
focal_class.parameters: (Execution execution)
focal_class.return: boolean
focal_class.signature: boolean failedBecauseNoWorker(Execution execution)
focal_class.class_method_signature: QueueListenerImpl.failedBecausePreconditionNotFulfilled(Execution execution)
focal_class.full_signature: private boolean failedBecausePreconditionNotFulfilled(Execution execution)
focal_class.identifier: failedBecausePreconditionNotFulfilled
focal_class.modifiers: private
focal_class.parameters: (Execution execution)
focal_class.return: boolean
focal_class.signature: boolean failedBecausePreconditionNotFulfilled(Execution execution)
focal_method.body: @Override
      public void onFailed(List<ExecutionMessage> messages) {
          deleteExecutionStateObjects(messages);
          ScoreEvent[] events = createFailureEvents(messages);
          if (events.length > 0) {
              try {
                  eventBus.dispatch(events);
              } catch (InterruptedException e) {
                  logger.error("Thread is interrupted. Ignoring... ", e);
              }
          }
      }
focal_method.class_method_signature: QueueListenerImpl.onFailed(List<ExecutionMessage> messages)
focal_method.full_signature: @Override public void onFailed(List<ExecutionMessage> messages)
focal_method.identifier: onFailed
focal_method.invocations: deleteExecutionStateObjects createFailureEvents dispatch error
focal_method.modifiers: @Override public
focal_method.parameters: (List<ExecutionMessage> messages)
focal_method.return: void
focal_method.signature: void onFailed(List<ExecutionMessage> messages)