<commit_before>package com.hp.oo.execution.services;

import com.hp.oo.broker.entities.BranchContextHolder;
import com.hp.oo.broker.entities.RunningExecutionPlan;
import com.hp.oo.broker.services.RuntimeValueService;
import com.hp.oo.enginefacade.execution.ExecutionEnums.ExecutionStatus;
import com.hp.oo.enginefacade.execution.ExecutionEnums.LogLevelCategory;
import com.hp.oo.enginefacade.execution.ExecutionSummary;
import com.hp.oo.enginefacade.execution.PauseReason;
import com.hp.oo.execution.reflection.ReflectionAdapter;
import com.hp.oo.execution.services.dbsupport.WorkerDbSupportService;
import com.hp.oo.internal.sdk.execution.Execution;
import com.hp.oo.internal.sdk.execution.ExecutionConstants;
import com.hp.oo.internal.sdk.execution.OOContext;
import com.hp.oo.internal.sdk.execution.events.EventBus;
import com.hp.oo.orchestrator.services.CancelExecutionService;
import com.hp.oo.orchestrator.services.PauseResumeService;
import com.hp.oo.orchestrator.services.configuration.WorkerConfigurationService;
import com.hp.score.api.ExecutionStep;
import com.hp.score.api.ScoreEvent;
import com.hp.score.api.StartBranchDataContainer;
import com.hp.score.lang.SystemContext;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.Serializable;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

/**
 * Date: 8/1/11
 *
 * @author <NAME>
 */
public final class ExecutionServiceImpl implements ExecutionService {
    private final Logger logger = Logger.getLogger(getClass());
    private static final String SYSTEM_CONTEXT = "systemContext";
    private static final String EXECUTION = "execution";

    // max amount of aggregated events
    private static final int EVENT_AGGREGATION_AMOUNT_THRESHOLD = 50;

    // timeout for event dump
    private static final long EVENT_AGGREGATION_TIME_THRESHOLD = 2 * 60 * 1000;
    private static final long EVENT_AGGREGATION_DEBUGGER_TIME_THRESHOLD = 750;

    @Autowired
    private PauseResumeService pauseService;

    @Autowired
    private ReflectionAdapter reflectionAdapter;

    @Autowired
    private WorkerDbSupportService workerDbSupportService;

    @Autowired
    private WorkerConfigurationService configurationService;

    @Autowired
    private CancelExecutionService cancelExecutionService;

    @Autowired
    private RuntimeValueService runtimeValueService;<commit_msg>clean<commit_after>package com.hp.oo.execution.services;

import com.hp.oo.broker.entities.BranchContextHolder;
import com.hp.oo.broker.entities.RunningExecutionPlan;
import com.hp.oo.broker.services.RuntimeValueService;
import com.hp.oo.enginefacade.execution.ExecutionEnums.ExecutionStatus;
import com.hp.oo.enginefacade.execution.ExecutionEnums.LogLevelCategory;
import com.hp.oo.enginefacade.execution.ExecutionSummary;
import com.hp.oo.enginefacade.execution.PauseReason;
import com.hp.oo.execution.reflection.ReflectionAdapter;
import com.hp.oo.execution.services.dbsupport.WorkerDbSupportService;
import com.hp.oo.internal.sdk.execution.Execution;
import com.hp.oo.internal.sdk.execution.ExecutionConstants;
import com.hp.oo.internal.sdk.execution.OOContext;
import com.hp.oo.internal.sdk.execution.events.EventBus;
import com.hp.oo.orchestrator.services.CancelExecutionService;
import com.hp.oo.orchestrator.services.PauseResumeService;
import com.hp.oo.orchestrator.services.configuration.WorkerConfigurationService;
import com.hp.score.api.ExecutionStep;
import com.hp.score.api.ScoreEvent;
import com.hp.score.api.StartBranchDataContainer;
import com.hp.score.lang.SystemContext;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.Serializable;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

/**
 * Date: 8/1/11
 *
 * @author <NAME>
 */
public final class ExecutionServiceImpl implements ExecutionService {
    private final Logger logger = Logger.getLogger(getClass());
    private static final String SYSTEM_CONTEXT = "systemContext";
    private static final String EXECUTION = "execution";

    @Autowired
    private PauseResumeService pauseService;

    @Autowired
    private ReflectionAdapter reflectionAdapter;

    @Autowired
    private WorkerDbSupportService workerDbSupportService;

    @Autowired
    private WorkerConfigurationService configurationService;

    @Autowired
    private CancelExecutionService cancelExecutionService;

    @Autowired
    private RuntimeValueService runtimeValueService;
{'fraction_non_alphanumeric': 0.09124844462878473, 'fraction_numerical': 0.004562422231439237, 'mean_word_length': 5.52638700947226, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '685622', 'n_tokens_mistral': 1430, 'n_tokens_neox': 1420, 'n_words': 258}