test_class.declarator: sigar
test_class.modifier: private
test_class.original_string: private Sigar sigar;
test_class.type: Sigar
test_class.var_name: sigar
test_class.declarator: swap
test_class.modifier: private
test_class.original_string: private Swap swap;
test_class.type: Swap
test_class.var_name: swap
test_class.declarator: cpuPerc
test_class.modifier: private
test_class.original_string: private CpuPerc cpuPerc;
test_class.type: CpuPerc
test_class.var_name: cpuPerc
test_class.declarator: cpuInfo
test_class.modifier: private
test_class.original_string: private CpuInfo cpuInfo;
test_class.type: CpuInfo
test_class.var_name: cpuInfo
test_class.declarator: mem
test_class.modifier: private
test_class.original_string: private Mem mem;
test_class.type: Mem
test_class.var_name: mem
test_class.declarator: machineStatsChecker
test_class.modifier: private
test_class.original_string: private MachineStatsChecker machineStatsChecker;
test_class.type: MachineStatsChecker
test_class.var_name: machineStatsChecker
test_class.file: micro-machine-stats/src/test/java/com/oath/micro/server/machine/stats/sigar/MachineStatsCheckerTest.java
test_class.identifier: MachineStatsCheckerTest
test_case.body: @Test
  	public void testGetStatsSigarExceptio() throws SigarException {
  		when(sigar.getSwap()).thenThrow(new SigarException());		
  		machineStatsChecker.getStats(sigar);
  		verify(sigar, times(1)).getSwap();
  		verify(sigar, times(1)).close();
  	}
test_case.class_method_signature: MachineStatsCheckerTest.testGetStatsSigarExceptio()
test_case.full_signature: @Test public void testGetStatsSigarExceptio()
test_case.identifier: testGetStatsSigarExceptio
test_case.invocations: thenThrow when getSwap getStats getSwap verify times close verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetStatsSigarExceptio()
focal_class.declarator: logger = LoggerFactory.getLogger(this.getClass())
focal_class.modifier: private final
focal_class.original_string: private final Logger logger = LoggerFactory.getLogger(this.getClass());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: micro-machine-stats/src/main/java/com/oath/micro/server/machine/stats/sigar/MachineStatsChecker.java
focal_class.identifier: MachineStatsChecker
focal_class.class_method_signature: MachineStatsChecker.getStats(Sigar sigar)
focal_class.full_signature: public MachineStats getStats(Sigar sigar)
focal_class.identifier: getStats
focal_class.modifiers: public
focal_class.parameters: (Sigar sigar)
focal_class.return: MachineStats
focal_class.signature: MachineStats getStats(Sigar sigar)
focal_class.class_method_signature: MachineStatsChecker.cpuStats(Sigar sigar)
focal_class.full_signature:  CpuStats cpuStats(Sigar sigar)
focal_class.identifier: cpuStats
focal_class.parameters: (Sigar sigar)
focal_class.return: CpuStats
focal_class.signature: CpuStats cpuStats(Sigar sigar)
focal_class.class_method_signature: MachineStatsChecker.getSwapStats(Sigar sigar)
focal_class.full_signature: private SwapStats getSwapStats(Sigar sigar)
focal_class.identifier: getSwapStats
focal_class.modifiers: private
focal_class.parameters: (Sigar sigar)
focal_class.return: SwapStats
focal_class.signature: SwapStats getSwapStats(Sigar sigar)
focal_class.class_method_signature: MachineStatsChecker.getCpuStats(Sigar sigar)
focal_class.full_signature: private CpuStats getCpuStats(Sigar sigar)
focal_class.identifier: getCpuStats
focal_class.modifiers: private
focal_class.parameters: (Sigar sigar)
focal_class.return: CpuStats
focal_class.signature: CpuStats getCpuStats(Sigar sigar)
focal_class.class_method_signature: MachineStatsChecker.getMemoryStats(Sigar sigar)
focal_class.full_signature: private MemoryStats getMemoryStats(Sigar sigar)
focal_class.identifier: getMemoryStats
focal_class.modifiers: private
focal_class.parameters: (Sigar sigar)
focal_class.return: MemoryStats
focal_class.signature: MemoryStats getMemoryStats(Sigar sigar)
focal_class.class_method_signature: MachineStatsChecker.getMachineStats(SwapStats swapStats, CpuStats cpuStats, MemoryStats memoryStats)
focal_class.full_signature: private MachineStats getMachineStats(SwapStats swapStats, CpuStats cpuStats, MemoryStats memoryStats)
focal_class.identifier: getMachineStats
focal_class.modifiers: private
focal_class.parameters: (SwapStats swapStats, CpuStats cpuStats, MemoryStats memoryStats)
focal_class.return: MachineStats
focal_class.signature: MachineStats getMachineStats(SwapStats swapStats, CpuStats cpuStats, MemoryStats memoryStats)
focal_method.body: public MachineStats getStats(Sigar sigar) {
          CpuStats cpuStats = CpuStats.builder()
                                      .build();
          SwapStats swapStats = SwapStats.builder()
                                         .build();
          MemoryStats memoryStats = MemoryStats.builder()
                                               .build();
          try {
              swapStats = getSwapStats(sigar);
              cpuStats = getCpuStats(sigar);
              getMemoryStats(sigar);
  
          } catch (SigarException | UnsatisfiedLinkError e) {
              logger.error("Error during sigar stats operation", e);
          } finally {
              sigar.close();
          }
  
          return getMachineStats(swapStats, cpuStats, memoryStats);
  
      }
focal_method.class_method_signature: MachineStatsChecker.getStats(Sigar sigar)
focal_method.full_signature: public MachineStats getStats(Sigar sigar)
focal_method.identifier: getStats
focal_method.invocations: build builder build builder build builder getSwapStats getCpuStats getMemoryStats error close getMachineStats
focal_method.modifiers: public
focal_method.parameters: (Sigar sigar)
focal_method.return: MachineStats
focal_method.signature: MachineStats getStats(Sigar sigar)