test_class.declarator: environmentHealerStepDefinitions
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private EnvironmentHealerStepDefinitions environmentHealerStepDefinitions;
test_class.type: EnvironmentHealerStepDefinitions
test_class.var_name: environmentHealerStepDefinitions
test_class.declarator: ssmRaider
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private   SSMRaiderImpl ssmRaider;
test_class.type: SSMRaiderImpl
test_class.var_name: ssmRaider
test_class.declarator: scriptExecutor
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private   ScriptExecutor scriptExecutor;
test_class.type: ScriptExecutor
test_class.var_name: scriptExecutor
test_class.declarator: executionStateCache
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private ExecutionStateCache executionStateCache;
test_class.type: ExecutionStateCache
test_class.var_name: executionStateCache
test_class.file: cloudraider-core/src/test/java/com/intuit/cloudraider/cucumber/steps/EnvironmentHealerStepDefinitionsTest.java
test_class.identifier: EnvironmentHealerStepDefinitionsTest
test_case.body: @Test
      public void testRecoverSSMFailures() throws Exception
      {
           executionStateCache.setSsmCommandInvocationInstances(createInstances());
           executionStateCache.setHealProcess(true);
           executionStateCache.addProcessName("nginx");
           executionStateCache.setRamDiskFull(true);
           executionStateCache.addPortNum(1234);
           executionStateCache.setHealNetwork(true);
           executionStateCache.setBlockPort(true);
           executionStateCache.setBlockedDomains(Arrays.asList("yahoo.com"));
          executionStateCache.setCpuSpiked(true);
  
           environmentHealerStepDefinitions.recover();
  
  
      }
test_case.class_method_signature: EnvironmentHealerStepDefinitionsTest.testRecoverSSMFailures()
test_case.full_signature: @Test public void testRecoverSSMFailures()
test_case.identifier: testRecoverSSMFailures
test_case.invocations: setSsmCommandInvocationInstances createInstances setHealProcess addProcessName setRamDiskFull addPortNum setHealNetwork setBlockPort setBlockedDomains asList setCpuSpiked recover
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRecoverSSMFailures()
focal_class.declarator: scriptExecutor
focal_class.modifier: @Autowired
      @Qualifier("scriptExecutor")
      private
focal_class.original_string: @Autowired
      @Qualifier("scriptExecutor")
      private ScriptExecutor scriptExecutor;
focal_class.type: ScriptExecutor
focal_class.var_name: scriptExecutor
focal_class.declarator: logger = LoggerFactory.getLogger(this.getClass())
focal_class.original_string: Logger logger = LoggerFactory.getLogger(this.getClass());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: ssmRaider
focal_class.modifier: @Autowired
      @Qualifier("ssmRaiderBean")
      private
focal_class.original_string: @Autowired
      @Qualifier("ssmRaiderBean")
      private SSMRaider ssmRaider;
focal_class.type: SSMRaider
focal_class.var_name: ssmRaider
focal_class.declarator: executionStateCache
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ExecutionStateCache executionStateCache;
focal_class.type: ExecutionStateCache
focal_class.var_name: executionStateCache
focal_class.file: cloudraider-core/src/main/java/com/intuit/cloudraider/cucumber/steps/EnvironmentHealerStepDefinitions.java
focal_class.identifier: EnvironmentHealerStepDefinitions
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.getExecutionStateCache()
focal_class.full_signature: public ExecutionStateCache getExecutionStateCache()
focal_class.identifier: getExecutionStateCache
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ExecutionStateCache
focal_class.signature: ExecutionStateCache getExecutionStateCache()
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.setExecutionStateCache(ExecutionStateCache executionStateCache)
focal_class.full_signature: public void setExecutionStateCache(ExecutionStateCache executionStateCache)
focal_class.identifier: setExecutionStateCache
focal_class.modifiers: public
focal_class.parameters: (ExecutionStateCache executionStateCache)
focal_class.return: void
focal_class.signature: void setExecutionStateCache(ExecutionStateCache executionStateCache)
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.EnvironmentHealerStepDefinitions()
focal_class.full_signature: public  EnvironmentHealerStepDefinitions()
focal_class.identifier: EnvironmentHealerStepDefinitions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  EnvironmentHealerStepDefinitions()
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.recover()
focal_class.full_signature: @Then("^recover$") public void recover()
focal_class.identifier: recover
focal_class.modifiers: @Then("^recover$") public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void recover()
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.clearCache()
focal_class.full_signature: @Then("^clearCache$") public void clearCache()
focal_class.identifier: clearCache
focal_class.modifiers: @Then("^clearCache$") public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clearCache()
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healGivenInstancesByProcess(String processName, List<EC2InstanceTO> instances)
focal_class.full_signature: public EnvironmentHealerStepDefinitions healGivenInstancesByProcess(String processName, List<EC2InstanceTO> instances)
focal_class.identifier: healGivenInstancesByProcess
focal_class.modifiers: public
focal_class.parameters: (String processName, List<EC2InstanceTO> instances)
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healGivenInstancesByProcess(String processName, List<EC2InstanceTO> instances)
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healGivenInstancesByDomainName(String domainName, List<EC2InstanceTO> instances)
focal_class.full_signature: public EnvironmentHealerStepDefinitions healGivenInstancesByDomainName(String domainName, List<EC2InstanceTO> instances)
focal_class.identifier: healGivenInstancesByDomainName
focal_class.modifiers: public
focal_class.parameters: (String domainName, List<EC2InstanceTO> instances)
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healGivenInstancesByDomainName(String domainName, List<EC2InstanceTO> instances)
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healGivenInstancesByFixingRamDisk(List<EC2InstanceTO> instanceList)
focal_class.full_signature: public EnvironmentHealerStepDefinitions healGivenInstancesByFixingRamDisk(List<EC2InstanceTO> instanceList)
focal_class.identifier: healGivenInstancesByFixingRamDisk
focal_class.modifiers: public
focal_class.parameters: (List<EC2InstanceTO> instanceList)
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healGivenInstancesByFixingRamDisk(List<EC2InstanceTO> instanceList)
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healGivenInstancesByFixingNetworkIssues(List<EC2InstanceTO> instances)
focal_class.full_signature: public EnvironmentHealerStepDefinitions healGivenInstancesByFixingNetworkIssues(List<EC2InstanceTO> instances)
focal_class.identifier: healGivenInstancesByFixingNetworkIssues
focal_class.modifiers: public
focal_class.parameters: (List<EC2InstanceTO> instances)
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healGivenInstancesByFixingNetworkIssues(List<EC2InstanceTO> instances)
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healGivenInstancesByFixingCPU(List<EC2InstanceTO> instances)
focal_class.full_signature: public EnvironmentHealerStepDefinitions healGivenInstancesByFixingCPU(List<EC2InstanceTO> instances)
focal_class.identifier: healGivenInstancesByFixingCPU
focal_class.modifiers: public
focal_class.parameters: (List<EC2InstanceTO> instances)
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healGivenInstancesByFixingCPU(List<EC2InstanceTO> instances)
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healGivenInstancesByFixingPort(List<EC2InstanceTO> instances)
focal_class.full_signature: public EnvironmentHealerStepDefinitions healGivenInstancesByFixingPort(List<EC2InstanceTO> instances)
focal_class.identifier: healGivenInstancesByFixingPort
focal_class.modifiers: public
focal_class.parameters: (List<EC2InstanceTO> instances)
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healGivenInstancesByFixingPort(List<EC2InstanceTO> instances)
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healSSMGivenInstancesByFixingCPU(List<EC2InstanceTO> instanceList)
focal_class.full_signature: public EnvironmentHealerStepDefinitions healSSMGivenInstancesByFixingCPU(List<EC2InstanceTO> instanceList)
focal_class.identifier: healSSMGivenInstancesByFixingCPU
focal_class.modifiers: public
focal_class.parameters: (List<EC2InstanceTO> instanceList)
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healSSMGivenInstancesByFixingCPU(List<EC2InstanceTO> instanceList)
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healSSMGivenInstancesFixingNetworkIssues(List<EC2InstanceTO> instanceList )
focal_class.full_signature: public EnvironmentHealerStepDefinitions healSSMGivenInstancesFixingNetworkIssues(List<EC2InstanceTO> instanceList )
focal_class.identifier: healSSMGivenInstancesFixingNetworkIssues
focal_class.modifiers: public
focal_class.parameters: (List<EC2InstanceTO> instanceList )
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healSSMGivenInstancesFixingNetworkIssues(List<EC2InstanceTO> instanceList )
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healGivenInstancesFixingNetworkIssues(List<EC2InstanceTO> instances )
focal_class.full_signature: public EnvironmentHealerStepDefinitions healGivenInstancesFixingNetworkIssues(List<EC2InstanceTO> instances )
focal_class.identifier: healGivenInstancesFixingNetworkIssues
focal_class.modifiers: public
focal_class.parameters: (List<EC2InstanceTO> instances )
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healGivenInstancesFixingNetworkIssues(List<EC2InstanceTO> instances )
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healSSMGivenInstancesByUnblockingDynamoDB(List<EC2InstanceTO> instanceList )
focal_class.full_signature: public EnvironmentHealerStepDefinitions healSSMGivenInstancesByUnblockingDynamoDB(List<EC2InstanceTO> instanceList )
focal_class.identifier: healSSMGivenInstancesByUnblockingDynamoDB
focal_class.modifiers: public
focal_class.parameters: (List<EC2InstanceTO> instanceList )
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healSSMGivenInstancesByUnblockingDynamoDB(List<EC2InstanceTO> instanceList )
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healSSMGivenInstancesByUnblockingS3(List<EC2InstanceTO> instanceList )
focal_class.full_signature: public EnvironmentHealerStepDefinitions healSSMGivenInstancesByUnblockingS3(List<EC2InstanceTO> instanceList )
focal_class.identifier: healSSMGivenInstancesByUnblockingS3
focal_class.modifiers: public
focal_class.parameters: (List<EC2InstanceTO> instanceList )
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healSSMGivenInstancesByUnblockingS3(List<EC2InstanceTO> instanceList )
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healSSMGivenInstancesByFixingPort(int portNum, List<EC2InstanceTO> instanceList)
focal_class.full_signature: public EnvironmentHealerStepDefinitions healSSMGivenInstancesByFixingPort(int portNum, List<EC2InstanceTO> instanceList)
focal_class.identifier: healSSMGivenInstancesByFixingPort
focal_class.modifiers: public
focal_class.parameters: (int portNum, List<EC2InstanceTO> instanceList)
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healSSMGivenInstancesByFixingPort(int portNum, List<EC2InstanceTO> instanceList)
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healGivenSSMInstancesByProcess(String processName, List<EC2InstanceTO> instanceList)
focal_class.full_signature: public EnvironmentHealerStepDefinitions healGivenSSMInstancesByProcess(String processName, List<EC2InstanceTO> instanceList)
focal_class.identifier: healGivenSSMInstancesByProcess
focal_class.modifiers: public
focal_class.parameters: (String processName, List<EC2InstanceTO> instanceList)
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healGivenSSMInstancesByProcess(String processName, List<EC2InstanceTO> instanceList)
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healSSMGivenInstancesByDomainName(String domainName, List<EC2InstanceTO> instanceList)
focal_class.full_signature: public EnvironmentHealerStepDefinitions healSSMGivenInstancesByDomainName(String domainName, List<EC2InstanceTO> instanceList)
focal_class.identifier: healSSMGivenInstancesByDomainName
focal_class.modifiers: public
focal_class.parameters: (String domainName, List<EC2InstanceTO> instanceList)
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healSSMGivenInstancesByDomainName(String domainName, List<EC2InstanceTO> instanceList)
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healSSMGivenInstancesByFixingRamDisk(List<EC2InstanceTO> instanceList)
focal_class.full_signature: public EnvironmentHealerStepDefinitions healSSMGivenInstancesByFixingRamDisk(List<EC2InstanceTO> instanceList)
focal_class.identifier: healSSMGivenInstancesByFixingRamDisk
focal_class.modifiers: public
focal_class.parameters: (List<EC2InstanceTO> instanceList)
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healSSMGivenInstancesByFixingRamDisk(List<EC2InstanceTO> instanceList)
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healGivenInstancesByUnblockingDynamoDB(List<EC2InstanceTO> instances )
focal_class.full_signature: public EnvironmentHealerStepDefinitions healGivenInstancesByUnblockingDynamoDB(List<EC2InstanceTO> instances )
focal_class.identifier: healGivenInstancesByUnblockingDynamoDB
focal_class.modifiers: public
focal_class.parameters: (List<EC2InstanceTO> instances )
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healGivenInstancesByUnblockingDynamoDB(List<EC2InstanceTO> instances )
focal_class.class_method_signature: EnvironmentHealerStepDefinitions.healGivenInstancesByUnblockingS3(List<EC2InstanceTO> instances )
focal_class.full_signature: public EnvironmentHealerStepDefinitions healGivenInstancesByUnblockingS3(List<EC2InstanceTO> instances )
focal_class.identifier: healGivenInstancesByUnblockingS3
focal_class.modifiers: public
focal_class.parameters: (List<EC2InstanceTO> instances )
focal_class.return: EnvironmentHealerStepDefinitions
focal_class.signature: EnvironmentHealerStepDefinitions healGivenInstancesByUnblockingS3(List<EC2InstanceTO> instances )
focal_method.body: @Then("^recover$")
      public void recover() {
          boolean isSSM = !executionStateCache.getSsmCommandInvocationInstances().isEmpty();
  
          if (executionStateCache.isHealProcess()) {
              List<String> processes = executionStateCache.getProcessNames();
              for (String process : processes) {
                  if (isSSM) {
  
                      healGivenSSMInstancesByProcess(process, executionStateCache.getSsmCommandInvocationInstances());
                  } else {
                      healGivenInstancesByProcess(process, executionStateCache.getUnhealthyInstances());
                  }
              }
          }
  
          if (executionStateCache.isHealNetwork()) {
  
              if (isSSM) {
                  healSSMGivenInstancesFixingNetworkIssues(executionStateCache.getSsmCommandInvocationInstances());
              }
              else {
                  healGivenInstancesFixingNetworkIssues(executionStateCache.getUnhealthyInstances());
              }
          }
  
          if (!executionStateCache.getBlockedDomains().isEmpty()) {
              if (isSSM) {
  
                  executionStateCache.getBlockedDomains().parallelStream()
                          .forEach(domain -> healSSMGivenInstancesByDomainName(domain, executionStateCache.getSsmCommandInvocationInstances()));
              } else {
                  executionStateCache.getBlockedDomains().parallelStream()
                          .forEach(domain -> healGivenInstancesByDomainName(domain, executionStateCache.getUnhealthyInstances()));
              }
          }
  
          if (executionStateCache.isCpuSpiked()) {
              if (isSSM) {
  
                  healSSMGivenInstancesByFixingCPU(executionStateCache.getSsmCommandInvocationInstances());
              } else {
                  healGivenInstancesByFixingCPU(executionStateCache.getUnhealthyInstances());
              }
          }
  
          if (executionStateCache.isBlockPort()) {
              List<Integer> portNums = executionStateCache.getPortNums();
              for (Integer port : portNums) {
                  if (isSSM) {
  
                      healSSMGivenInstancesByFixingPort(port, executionStateCache.getSsmCommandInvocationInstances());
                  } else {
                      healGivenInstancesByFixingPort(executionStateCache.getUnhealthyInstances());
                  }
              }
          }
  
          if (executionStateCache.isRamDiskFull()) {
              if (isSSM) {
                  healSSMGivenInstancesByFixingRamDisk(executionStateCache.getSsmCommandInvocationInstances());
              } else {
                  healGivenInstancesByFixingRamDisk(executionStateCache.getUnhealthyInstances());
              }
          }
  
  
          if (executionStateCache.isBlockDynamoDB())
          {
              if (isSSM) {
  
                  healSSMGivenInstancesByUnblockingDynamoDB(executionStateCache.getSsmCommandInvocationInstances());
              }
              else
              {
                  healGivenInstancesByUnblockingDynamoDB(executionStateCache.getUnhealthyInstances());
  
              }
          }
  
          if (executionStateCache.isBlockS3())
          {
              if (isSSM) {
  
                  healSSMGivenInstancesByUnblockingS3(executionStateCache.getSsmCommandInvocationInstances());
              }
              else
              {
                  healGivenInstancesByUnblockingS3(executionStateCache.getUnhealthyInstances());
  
              }
          }
  
  
      }
focal_method.class_method_signature: EnvironmentHealerStepDefinitions.recover()
focal_method.full_signature: @Then("^recover$") public void recover()
focal_method.identifier: recover
focal_method.invocations: isEmpty getSsmCommandInvocationInstances isHealProcess getProcessNames healGivenSSMInstancesByProcess getSsmCommandInvocationInstances healGivenInstancesByProcess getUnhealthyInstances isHealNetwork healSSMGivenInstancesFixingNetworkIssues getSsmCommandInvocationInstances healGivenInstancesFixingNetworkIssues getUnhealthyInstances isEmpty getBlockedDomains forEach parallelStream getBlockedDomains healSSMGivenInstancesByDomainName getSsmCommandInvocationInstances forEach parallelStream getBlockedDomains healGivenInstancesByDomainName getUnhealthyInstances isCpuSpiked healSSMGivenInstancesByFixingCPU getSsmCommandInvocationInstances healGivenInstancesByFixingCPU getUnhealthyInstances isBlockPort getPortNums healSSMGivenInstancesByFixingPort getSsmCommandInvocationInstances healGivenInstancesByFixingPort getUnhealthyInstances isRamDiskFull healSSMGivenInstancesByFixingRamDisk getSsmCommandInvocationInstances healGivenInstancesByFixingRamDisk getUnhealthyInstances isBlockDynamoDB healSSMGivenInstancesByUnblockingDynamoDB getSsmCommandInvocationInstances healGivenInstancesByUnblockingDynamoDB getUnhealthyInstances isBlockS3 healSSMGivenInstancesByUnblockingS3 getSsmCommandInvocationInstances healGivenInstancesByUnblockingS3 getUnhealthyInstances
focal_method.modifiers: @Then("^recover$") public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void recover()