test_class.declarator: workerManager
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private WorkerManager workerManager;
test_class.type: WorkerManager
test_class.var_name: workerManager
test_class.declarator: workerNodeService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private WorkerNodeService workerNodeService;
test_class.type: WorkerNodeService
test_class.var_name: workerNodeService
test_class.declarator: workerRecoveryManager
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private WorkerRecoveryManager workerRecoveryManager;
test_class.type: WorkerRecoveryManager
test_class.var_name: workerRecoveryManager
test_class.declarator: engineVersionService
test_class.modifier: @Autowired
  	private
test_class.original_string: @Autowired
  	private EngineVersionService engineVersionService;
test_class.type: EngineVersionService
test_class.var_name: engineVersionService
test_class.declarator: CREDENTIAL_UUID = "uuid"
test_class.modifier: static final
test_class.original_string: static final String CREDENTIAL_UUID = "uuid";
test_class.type: String
test_class.var_name: CREDENTIAL_UUID
test_class.file: worker/worker-manager/score-worker-manager-impl/src/test/java/io/cloudslang/worker/management/services/WorkerManagerTest.java
test_class.identifier: WorkerManagerTest
test_case.body: @Test
  	public void testResolveDotnetVersion() {
  		String version = WorkerManager.resolveDotNetVersion();
  		System.out.println("Dotnet version is: " + version);
  		assertThat(version).isNotEmpty();
  	}
test_case.class_method_signature: WorkerManagerTest.testResolveDotnetVersion()
test_case.full_signature: @Test public void testResolveDotnetVersion()
test_case.identifier: testResolveDotnetVersion
test_case.invocations: resolveDotNetVersion println isNotEmpty assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testResolveDotnetVersion()
focal_class.declarator: logger = Logger.getLogger(WorkerManager.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = Logger.getLogger(WorkerManager.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: KEEP_ALIVE_FAIL_LIMIT = 5
focal_class.modifier: private static final
focal_class.original_string: private static final int KEEP_ALIVE_FAIL_LIMIT = 5;
focal_class.type: int
focal_class.var_name: KEEP_ALIVE_FAIL_LIMIT
focal_class.declarator: DOTNET_PATH = System.getenv("WINDIR") + "/Microsoft.NET/Framework"
focal_class.modifier: private static final
focal_class.original_string: private static final String DOTNET_PATH = System.getenv("WINDIR") + "/Microsoft.NET/Framework";
focal_class.type: String
focal_class.var_name: DOTNET_PATH
focal_class.declarator: workerUuid
focal_class.modifier: @Resource
      private
focal_class.original_string: @Resource
      private String workerUuid;
focal_class.type: String
focal_class.var_name: workerUuid
focal_class.declarator: workerNodeService
focal_class.modifier: @Autowired
      protected
focal_class.original_string: @Autowired
      protected WorkerNodeService workerNodeService;
focal_class.type: WorkerNodeService
focal_class.var_name: workerNodeService
focal_class.declarator: engineVersionService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private EngineVersionService engineVersionService;
focal_class.type: EngineVersionService
focal_class.var_name: engineVersionService
focal_class.declarator: workerConfigurationService
focal_class.modifier: @Autowired
      protected
focal_class.original_string: @Autowired
      protected WorkerConfigurationService workerConfigurationService;
focal_class.type: WorkerConfigurationService
focal_class.var_name: workerConfigurationService
focal_class.declarator: recoveryManager
focal_class.modifier: @Autowired
      protected
focal_class.original_string: @Autowired
      protected WorkerRecoveryManager recoveryManager;
focal_class.type: WorkerRecoveryManager
focal_class.var_name: recoveryManager
focal_class.declarator: workerVersionService
focal_class.modifier: @Autowired
      protected
focal_class.original_string: @Autowired
      protected WorkerVersionService workerVersionService;
focal_class.type: WorkerVersionService
focal_class.var_name: workerVersionService
focal_class.declarator: inBuffer
focal_class.modifier: private
focal_class.original_string: private BlockingQueue<Runnable> inBuffer;
focal_class.type: BlockingQueue<Runnable>
focal_class.var_name: inBuffer
focal_class.declarator: numberOfThreads
focal_class.modifier: @Autowired
      @Qualifier("numberOfExecutionThreads")
      private
focal_class.original_string: @Autowired
      @Qualifier("numberOfExecutionThreads")
      private Integer numberOfThreads;
focal_class.type: Integer
focal_class.var_name: numberOfThreads
focal_class.declarator: initStartUpSleep = 15 * 1000L
focal_class.modifier: @Autowired(required = false)
      @Qualifier("initStartUpSleep")
      private
focal_class.original_string: @Autowired(required = false)
      @Qualifier("initStartUpSleep")
      private Long initStartUpSleep = 15 * 1000L;
focal_class.type: Long
focal_class.var_name: initStartUpSleep
focal_class.declarator: maxStartUpSleep = 10 * 60 * 1000L
focal_class.modifier: @Autowired(required = false)
      @Qualifier("maxStartUpSleep")
      private
focal_class.original_string: @Autowired(required = false)
      @Qualifier("maxStartUpSleep")
      private Long maxStartUpSleep = 10 * 60 * 1000L;
focal_class.type: Long
focal_class.var_name: maxStartUpSleep
focal_class.declarator: workerConfigurationUtils
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private WorkerConfigurationUtils workerConfigurationUtils;
focal_class.type: WorkerConfigurationUtils
focal_class.var_name: workerConfigurationUtils
focal_class.declarator: capacity
focal_class.modifier: @Autowired
      @Qualifier("inBufferCapacity")
      private
focal_class.original_string: @Autowired
      @Qualifier("inBufferCapacity")
      private Integer capacity;
focal_class.type: Integer
focal_class.var_name: capacity
focal_class.declarator: workerStateUpdateService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private WorkerStateUpdateService workerStateUpdateService;
focal_class.type: WorkerStateUpdateService
focal_class.var_name: workerStateUpdateService
focal_class.declarator: keepAliveFailCount = 0
focal_class.modifier: private
focal_class.original_string: private int keepAliveFailCount = 0;
focal_class.type: int
focal_class.var_name: keepAliveFailCount
focal_class.declarator: executorService
focal_class.modifier: private
focal_class.original_string: private ExecutorService executorService;
focal_class.type: ExecutorService
focal_class.var_name: executorService
focal_class.declarator: mapOfRunningTasks
focal_class.modifier: private
focal_class.original_string: private ConcurrentMap<Long, Queue<Future>> mapOfRunningTasks;
focal_class.type: ConcurrentMap<Long, Queue<Future>>
focal_class.var_name: mapOfRunningTasks
focal_class.declarator: endOfInit = false
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean endOfInit = false;
focal_class.type: boolean
focal_class.var_name: endOfInit
focal_class.declarator: initStarted = false
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean initStarted = false;
focal_class.type: boolean
focal_class.var_name: initStarted
focal_class.declarator: up = false
focal_class.modifier: private
focal_class.original_string: private boolean up = false;
focal_class.type: boolean
focal_class.var_name: up
focal_class.declarator: threadPoolVersion = 0
focal_class.modifier: private
focal_class.original_string: private int threadPoolVersion = 0;
focal_class.type: int
focal_class.var_name: threadPoolVersion
focal_class.declarator: newCancelBehaviour
focal_class.modifier: private
focal_class.original_string: private boolean newCancelBehaviour;
focal_class.type: boolean
focal_class.var_name: newCancelBehaviour
focal_class.file: worker/worker-manager/score-worker-manager-impl/src/main/java/io/cloudslang/worker/management/services/WorkerManager.java
focal_class.identifier: WorkerManager
focal_class.interfaces: implements ApplicationListener, EndExecutionCallback, WorkerRecoveryListener
focal_class.class_method_signature: WorkerManager.init()
focal_class.full_signature: @PostConstruct private void init()
focal_class.identifier: init
focal_class.modifiers: @PostConstruct private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void init()
focal_class.class_method_signature: WorkerManager.addExecution(long executionId, Runnable runnable)
focal_class.full_signature: public void addExecution(long executionId, Runnable runnable)
focal_class.identifier: addExecution
focal_class.modifiers: public
focal_class.parameters: (long executionId, Runnable runnable)
focal_class.return: void
focal_class.signature: void addExecution(long executionId, Runnable runnable)
focal_class.class_method_signature: WorkerManager.newQueue(Future future)
focal_class.full_signature: private Queue<Future> newQueue(Future future)
focal_class.identifier: newQueue
focal_class.modifiers: private
focal_class.parameters: (Future future)
focal_class.return: Queue<Future>
focal_class.signature: Queue<Future> newQueue(Future future)
focal_class.class_method_signature: WorkerManager.addLists(Queue<Future> oldValue, Queue<Future> newValue)
focal_class.full_signature: private Queue<Future> addLists(Queue<Future> oldValue, Queue<Future> newValue)
focal_class.identifier: addLists
focal_class.modifiers: private
focal_class.parameters: (Queue<Future> oldValue, Queue<Future> newValue)
focal_class.return: Queue<Future>
focal_class.signature: Queue<Future> addLists(Queue<Future> oldValue, Queue<Future> newValue)
focal_class.class_method_signature: WorkerManager.endExecution(long executionId)
focal_class.full_signature: @Override public void endExecution(long executionId)
focal_class.identifier: endExecution
focal_class.modifiers: @Override public
focal_class.parameters: (long executionId)
focal_class.return: void
focal_class.signature: void endExecution(long executionId)
focal_class.class_method_signature: WorkerManager.getInBufferSize()
focal_class.full_signature: public int getInBufferSize()
focal_class.identifier: getInBufferSize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getInBufferSize()
focal_class.class_method_signature: WorkerManager.interruptCanceledExecutions()
focal_class.full_signature: @SuppressWarnings("unused") // Scheduled in scoreWorkerSchedulerContext.xml public void interruptCanceledExecutions()
focal_class.identifier: interruptCanceledExecutions
focal_class.modifiers: @SuppressWarnings("unused") // Scheduled in scoreWorkerSchedulerContext.xml public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void interruptCanceledExecutions()
focal_class.class_method_signature: WorkerManager.workerKeepAlive()
focal_class.full_signature: @SuppressWarnings("unused") // Scheduled in xml public void workerKeepAlive()
focal_class.identifier: workerKeepAlive
focal_class.modifiers: @SuppressWarnings("unused") // Scheduled in xml public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void workerKeepAlive()
focal_class.class_method_signature: WorkerManager.logStatistics()
focal_class.full_signature: @SuppressWarnings("unused") // called by scheduler public void logStatistics()
focal_class.identifier: logStatistics
focal_class.modifiers: @SuppressWarnings("unused") // called by scheduler public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void logStatistics()
focal_class.class_method_signature: WorkerManager.getWorkerUuid()
focal_class.full_signature: public String getWorkerUuid()
focal_class.identifier: getWorkerUuid
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getWorkerUuid()
focal_class.class_method_signature: WorkerManager.getRunningTasksCount()
focal_class.full_signature: public int getRunningTasksCount()
focal_class.identifier: getRunningTasksCount
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getRunningTasksCount()
focal_class.class_method_signature: WorkerManager.getExecutionThreadsCount()
focal_class.full_signature: public int getExecutionThreadsCount()
focal_class.identifier: getExecutionThreadsCount
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getExecutionThreadsCount()
focal_class.class_method_signature: WorkerManager.onApplicationEvent(final ApplicationEvent applicationEvent)
focal_class.full_signature: @Override public void onApplicationEvent(final ApplicationEvent applicationEvent)
focal_class.identifier: onApplicationEvent
focal_class.modifiers: @Override public
focal_class.parameters: (final ApplicationEvent applicationEvent)
focal_class.return: void
focal_class.signature: void onApplicationEvent(final ApplicationEvent applicationEvent)
focal_class.class_method_signature: WorkerManager.doStartup()
focal_class.full_signature: private void doStartup()
focal_class.identifier: doStartup
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void doStartup()
focal_class.class_method_signature: WorkerManager.doShutdown()
focal_class.full_signature: private void doShutdown()
focal_class.identifier: doShutdown
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void doShutdown()
focal_class.class_method_signature: WorkerManager.resolveDotNetVersion()
focal_class.full_signature: protected static String resolveDotNetVersion()
focal_class.identifier: resolveDotNetVersion
focal_class.modifiers: protected static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String resolveDotNetVersion()
focal_class.class_method_signature: WorkerManager.isUp()
focal_class.full_signature: public boolean isUp()
focal_class.identifier: isUp
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isUp()
focal_class.class_method_signature: WorkerManager.isFromCurrentThreadPool(String threadName)
focal_class.full_signature: public synchronized boolean isFromCurrentThreadPool(String threadName)
focal_class.identifier: isFromCurrentThreadPool
focal_class.modifiers: public synchronized
focal_class.parameters: (String threadName)
focal_class.return: boolean
focal_class.signature: boolean isFromCurrentThreadPool(String threadName)
focal_class.class_method_signature: WorkerManager.doRecovery()
focal_class.full_signature: public void doRecovery()
focal_class.identifier: doRecovery
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void doRecovery()
focal_class.class_method_signature: WorkerManager.getTreadPoolVersion()
focal_class.full_signature: private synchronized int getTreadPoolVersion()
focal_class.identifier: getTreadPoolVersion
focal_class.modifiers: private synchronized
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getTreadPoolVersion()
focal_class.class_method_signature: WorkerManager.incrementAndGetTreadPoolVersion()
focal_class.full_signature: private synchronized int incrementAndGetTreadPoolVersion()
focal_class.identifier: incrementAndGetTreadPoolVersion
focal_class.modifiers: private synchronized
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int incrementAndGetTreadPoolVersion()
focal_method.body: protected static String resolveDotNetVersion() {
          File dotNetHome = new File(DOTNET_PATH);
          if (dotNetHome.isDirectory()) {
              File[] versionFolders = dotNetHome.listFiles(new FileFilter() {
  
                  @Override
                  public boolean accept(File file) {
                      return file.isDirectory() && file.getName().startsWith("v");
                  }
              });
              if (!ArrayUtils.isEmpty(versionFolders)) {
                  String maxVersion = max(versionFolders, on(File.class).getName()).substring(1);
                  return maxVersion.substring(0, 1) + ".x";
              }
          }
          return "N/A";
      }
focal_method.class_method_signature: WorkerManager.resolveDotNetVersion()
focal_method.full_signature: protected static String resolveDotNetVersion()
focal_method.identifier: resolveDotNetVersion
focal_method.invocations: isDirectory listFiles isDirectory startsWith getName isEmpty substring max getName on substring
focal_method.modifiers: protected static
focal_method.parameters: ()
focal_method.return: String
focal_method.signature: String resolveDotNetVersion()