test_class.declarator: props
test_class.modifier: private static
test_class.original_string: private static ApiLoggingProperties props;
test_class.type: ApiLoggingProperties
test_class.var_name: props
test_class.declarator: point
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ProceedingJoinPoint point;
test_class.type: ProceedingJoinPoint
test_class.var_name: point
test_class.declarator: apiController
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ApiController apiController;
test_class.type: ApiController
test_class.var_name: apiController
test_class.declarator: methodSignature
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private MethodSignature methodSignature;
test_class.type: MethodSignature
test_class.var_name: methodSignature
test_class.declarator: loggingAspect = new ApiLoggingAspect(props)
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private ApiLoggingAspect loggingAspect = new ApiLoggingAspect(props);
test_class.type: ApiLoggingAspect
test_class.var_name: loggingAspect
test_class.declarator: logbackVerifier = new LogbackVerifier()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public LogbackVerifier logbackVerifier = new LogbackVerifier();
test_class.type: LogbackVerifier
test_class.var_name: logbackVerifier
test_class.file: neo-starter/src/test/java/eu/neoteric/starter/mvc/logging/ApiLoggingAspectTest.java
test_class.identifier: ApiLoggingAspectTest
test_case.body: @Test
      public void jsonApiObjectReturned() throws Throwable {
          prepareTest();
          when(point.getArgs()).thenReturn(new Object[]{});
          when(methodSignature.getName()).thenReturn("findById");
          when(methodSignature.getParameterNames()).thenReturn(new String[]{});
          when(methodSignature.getParameterTypes()).thenReturn(new Class[]{});
          when(point.proceed()).thenReturn(JsonApiObject.wrap(Duty.newBuilder().setName("abc").setValue(5).build()).build());
  
          logbackVerifier.expectMessage(INFO, "[JobOffer] Find by id.");
          logbackVerifier.expectMessage(INFO, "[JobOffer] Returning [Duty(");
          logbackVerifier.expectMessage(INFO, "[JobOffer] Find by id took");
  
          loggingAspect.around(point, apiController);
      }
test_case.class_method_signature: ApiLoggingAspectTest.jsonApiObjectReturned()
test_case.full_signature: @Test public void jsonApiObjectReturned()
test_case.identifier: jsonApiObjectReturned
test_case.invocations: prepareTest thenReturn when getArgs thenReturn when getName thenReturn when getParameterNames thenReturn when getParameterTypes thenReturn when proceed build wrap build setValue setName newBuilder expectMessage expectMessage expectMessage around
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void jsonApiObjectReturned()
focal_class.declarator: INITIAL_JOINER_LENGTH = 2
focal_class.modifier: private static final
focal_class.original_string: private static final int INITIAL_JOINER_LENGTH = 2;
focal_class.type: int
focal_class.var_name: INITIAL_JOINER_LENGTH
focal_class.declarator: apiLoggingProperties
focal_class.modifier: private final
focal_class.original_string: private final ApiLoggingProperties apiLoggingProperties;
focal_class.type: ApiLoggingProperties
focal_class.var_name: apiLoggingProperties
focal_class.file: neo-starter/src/main/java/eu/neoteric/starter/mvc/logging/ApiLoggingAspect.java
focal_class.identifier: ApiLoggingAspect
focal_class.class_method_signature: ApiLoggingAspect.publicMethod()
focal_class.full_signature: @Pointcut("execution(public * *(..))") public void publicMethod()
focal_class.identifier: publicMethod
focal_class.modifiers: @Pointcut("execution(public * *(..))") public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void publicMethod()
focal_class.class_method_signature: ApiLoggingAspect.around(ProceedingJoinPoint point, ApiController apiController)
focal_class.full_signature: @Around("publicMethod() && @within(apiController)") public Object around(ProceedingJoinPoint point, ApiController apiController)
focal_class.identifier: around
focal_class.modifiers: @Around("publicMethod() && @within(apiController)") public
focal_class.parameters: (ProceedingJoinPoint point, ApiController apiController)
focal_class.return: Object
focal_class.signature: Object around(ProceedingJoinPoint point, ApiController apiController)
focal_class.class_method_signature: ApiLoggingAspect.evaluateResponse(ApiLogger apiLogger, Object proceed)
focal_class.full_signature: private Object evaluateResponse(ApiLogger apiLogger, Object proceed)
focal_class.identifier: evaluateResponse
focal_class.modifiers: private
focal_class.parameters: (ApiLogger apiLogger, Object proceed)
focal_class.return: Object
focal_class.signature: Object evaluateResponse(ApiLogger apiLogger, Object proceed)
focal_class.class_method_signature: ApiLoggingAspect.evaluateParamJoiner(StringJoiner paramJoiner)
focal_class.full_signature: private String evaluateParamJoiner(StringJoiner paramJoiner)
focal_class.identifier: evaluateParamJoiner
focal_class.modifiers: private
focal_class.parameters: (StringJoiner paramJoiner)
focal_class.return: String
focal_class.signature: String evaluateParamJoiner(StringJoiner paramJoiner)
focal_method.body: @Around("publicMethod() && @within(apiController)")
      public Object around(ProceedingJoinPoint point, ApiController apiController) throws Throwable {
          StopWatch watch = new StopWatch();
          watch.start();
  
          ApiLogger apiLogger = new ApiLogger(apiLoggingProperties, apiController.resourceName(),
                  LoggerFactory.getLogger(point.getTarget().getClass()));
  
          MethodSignature signature = (MethodSignature) point.getSignature();
  
          Object[] args = point.getArgs();
          String[] parameterNames = signature.getParameterNames();
          Class[] parameterTypes = signature.getParameterTypes();
          String normalizedMethodName = capitalize(decamelize(signature.getName()));
  
          List<Integer> complexTypeIndexes = Lists.newArrayList();
          StringJoiner parametersJoiner = new StringJoiner(", ", "[", "]");
          if (parameterTypes.length > 0) {
              for (int i = 0; i < parameterTypes.length; i++) {
                  if (parameterTypes[i].isPrimitive() || parameterTypes[i].getName().startsWith("java")) {
                      parametersJoiner.add(String.join(": ", parameterNames[i], String.valueOf(args[i])));
                  } else {
                      complexTypeIndexes.add(i);
                  }
              }
          }
          apiLogger.logEntryPoint(normalizedMethodName, evaluateParamJoiner(parametersJoiner));
  
          if (!complexTypeIndexes.isEmpty()) {
              StringJoiner complexParamsJoiner = new StringJoiner(", ", "[", "]");
              complexTypeIndexes.stream()
                      .forEach(index -> complexParamsJoiner.add(String.join(": ", parameterNames[index], String.valueOf(args[index]))));
              apiLogger.logCustomObjectDetails(evaluateParamJoiner(complexParamsJoiner));
          }
  
          try {
              return evaluateResponse(apiLogger, point.proceed());
          } finally {
              watch.stop();
              apiLogger.logExitPoint(normalizedMethodName, evaluateParamJoiner(parametersJoiner), watch.getTotalTimeSeconds());
          }
      }
focal_method.class_method_signature: ApiLoggingAspect.around(ProceedingJoinPoint point, ApiController apiController)
focal_method.full_signature: @Around("publicMethod() && @within(apiController)") public Object around(ProceedingJoinPoint point, ApiController apiController)
focal_method.identifier: around
focal_method.invocations: start resourceName getLogger getClass getTarget getSignature getArgs getParameterNames getParameterTypes capitalize decamelize getName newArrayList isPrimitive startsWith getName add join valueOf add logEntryPoint evaluateParamJoiner isEmpty forEach stream add join valueOf logCustomObjectDetails evaluateParamJoiner evaluateResponse proceed stop logExitPoint evaluateParamJoiner getTotalTimeSeconds
focal_method.modifiers: @Around("publicMethod() && @within(apiController)") public
focal_method.parameters: (ProceedingJoinPoint point, ApiController apiController)
focal_method.return: Object
focal_method.signature: Object around(ProceedingJoinPoint point, ApiController apiController)