test_class.file: stagemonitor-jdbc/src/test/java/org/stagemonitor/jdbc/StagemonitorJdbcEventListenerTest.java
test_class.identifier: StagemonitorJdbcEventListenerTest
test_case.body: @Test
  	public void getMethod() throws Exception {
  		assertSoftly(softly -> {
  			softly.assertThat(StagemonitorJdbcEventListener.getMethod("select * from stagemonitor")).isEqualTo("SELECT");
  			softly.assertThat(StagemonitorJdbcEventListener.getMethod(" update stagemonitor set bug=false")).isEqualTo("UPDATE");
  			softly.assertThat(StagemonitorJdbcEventListener.getMethod("Commit")).isEqualTo("COMMIT");
  			softly.assertThat(StagemonitorJdbcEventListener.getMethod("")).isEqualTo("");
  			softly.assertThat(StagemonitorJdbcEventListener.getMethod(" ")).isEqualTo("");
  			softly.assertThat(StagemonitorJdbcEventListener.getMethod(null)).isNull();
  		});
  	}
test_case.class_method_signature: StagemonitorJdbcEventListenerTest.getMethod()
test_case.full_signature: @Test public void getMethod()
test_case.identifier: getMethod
test_case.invocations: assertSoftly isEqualTo assertThat getMethod isEqualTo assertThat getMethod isEqualTo assertThat getMethod isEqualTo assertThat getMethod isEqualTo assertThat getMethod isNull assertThat getMethod
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getMethod()
focal_class.declarator: logger = LoggerFactory.getLogger(StagemonitorJdbcEventListener.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(StagemonitorJdbcEventListener.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: DB_STATEMENT = "db.statement"
focal_class.modifier: private static final
focal_class.original_string: private static final String DB_STATEMENT = "db.statement";
focal_class.type: String
focal_class.var_name: DB_STATEMENT
focal_class.declarator: MILLISECOND_IN_NANOS = TimeUnit.MILLISECONDS.toNanos(1)
focal_class.modifier: private static final
focal_class.original_string: private static final double MILLISECOND_IN_NANOS = TimeUnit.MILLISECONDS.toNanos(1);
focal_class.type: double
focal_class.var_name: MILLISECOND_IN_NANOS
focal_class.declarator: CONNECTION_WRAPPED_COUNT_ATTRIBUTE = StagemonitorJdbcEventListener.class.getName() + ".wrappedCount"
focal_class.modifier: private static final
focal_class.original_string: private static final String CONNECTION_WRAPPED_COUNT_ATTRIBUTE = StagemonitorJdbcEventListener.class.getName() + ".wrappedCount";
focal_class.type: String
focal_class.var_name: CONNECTION_WRAPPED_COUNT_ATTRIBUTE
focal_class.declarator: TIME_TO_GET_CONNECTION_MS_ATTRIBUTE = StagemonitorJdbcEventListener.class.getName() + ".getTimeToGetConnect"
focal_class.modifier: private static final
focal_class.original_string: private static final String TIME_TO_GET_CONNECTION_MS_ATTRIBUTE = StagemonitorJdbcEventListener.class.getName() + ".getTimeToGetConnect";
focal_class.type: String
focal_class.var_name: TIME_TO_GET_CONNECTION_MS_ATTRIBUTE
focal_class.declarator: jdbcPlugin
focal_class.modifier: private final
focal_class.original_string: private final JdbcPlugin jdbcPlugin;
focal_class.type: JdbcPlugin
focal_class.var_name: jdbcPlugin
focal_class.declarator: getConnectionTemplate = name("get_jdbc_connection").templateFor("url")
focal_class.modifier: private final
focal_class.original_string: private final MetricName.MetricNameTemplate getConnectionTemplate = name("get_jdbc_connection").templateFor("url");
focal_class.type: MetricName.MetricNameTemplate
focal_class.var_name: getConnectionTemplate
focal_class.declarator: dataSourceUrlMap = new ConcurrentHashMap<DataSource, MetaData>()
focal_class.modifier: private final
focal_class.original_string: private final ConcurrentMap<DataSource, MetaData> dataSourceUrlMap = new ConcurrentHashMap<DataSource, MetaData>();
focal_class.type: ConcurrentMap<DataSource, MetaData>
focal_class.var_name: dataSourceUrlMap
focal_class.declarator: corePlugin
focal_class.modifier: private
focal_class.original_string: private CorePlugin corePlugin;
focal_class.type: CorePlugin
focal_class.var_name: corePlugin
focal_class.declarator: tracingPlugin
focal_class.modifier: private
focal_class.original_string: private TracingPlugin tracingPlugin;
focal_class.type: TracingPlugin
focal_class.var_name: tracingPlugin
focal_class.file: stagemonitor-jdbc/src/main/java/org/stagemonitor/jdbc/StagemonitorJdbcEventListener.java
focal_class.identifier: StagemonitorJdbcEventListener
focal_class.class_method_signature: StagemonitorJdbcEventListener.StagemonitorJdbcEventListener()
focal_class.full_signature: public  StagemonitorJdbcEventListener()
focal_class.identifier: StagemonitorJdbcEventListener
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  StagemonitorJdbcEventListener()
focal_class.class_method_signature: StagemonitorJdbcEventListener.StagemonitorJdbcEventListener(ConfigurationRegistry configuration)
focal_class.full_signature: public  StagemonitorJdbcEventListener(ConfigurationRegistry configuration)
focal_class.identifier: StagemonitorJdbcEventListener
focal_class.modifiers: public
focal_class.parameters: (ConfigurationRegistry configuration)
focal_class.signature:  StagemonitorJdbcEventListener(ConfigurationRegistry configuration)
focal_class.class_method_signature: StagemonitorJdbcEventListener.onConnectionWrapped(ConnectionInformation connectionInformation)
focal_class.full_signature: @Override public void onConnectionWrapped(ConnectionInformation connectionInformation)
focal_class.identifier: onConnectionWrapped
focal_class.modifiers: @Override public
focal_class.parameters: (ConnectionInformation connectionInformation)
focal_class.return: void
focal_class.signature: void onConnectionWrapped(ConnectionInformation connectionInformation)
focal_class.class_method_signature: StagemonitorJdbcEventListener.incrementAndGetContextValue(final Span span, final String contextAttributeName, final T incrementValue)
focal_class.full_signature: private static T incrementAndGetContextValue(final Span span, final String contextAttributeName, final T incrementValue)
focal_class.identifier: incrementAndGetContextValue
focal_class.modifiers: private static
focal_class.parameters: (final Span span, final String contextAttributeName, final T incrementValue)
focal_class.return: T
focal_class.signature: T incrementAndGetContextValue(final Span span, final String contextAttributeName, final T incrementValue)
focal_class.class_method_signature: StagemonitorJdbcEventListener.ensureUrlExistsForDataSource(DataSource dataSource, Connection connection)
focal_class.full_signature: private DataSource ensureUrlExistsForDataSource(DataSource dataSource, Connection connection)
focal_class.identifier: ensureUrlExistsForDataSource
focal_class.modifiers: private
focal_class.parameters: (DataSource dataSource, Connection connection)
focal_class.return: DataSource
focal_class.signature: DataSource ensureUrlExistsForDataSource(DataSource dataSource, Connection connection)
focal_class.class_method_signature: StagemonitorJdbcEventListener.onBeforeAnyExecute(StatementInformation statementInformation)
focal_class.full_signature: @Override public void onBeforeAnyExecute(StatementInformation statementInformation)
focal_class.identifier: onBeforeAnyExecute
focal_class.modifiers: @Override public
focal_class.parameters: (StatementInformation statementInformation)
focal_class.return: void
focal_class.signature: void onBeforeAnyExecute(StatementInformation statementInformation)
focal_class.class_method_signature: StagemonitorJdbcEventListener.onAfterAnyExecute(StatementInformation statementInformation, long timeElapsedNanos, SQLException e)
focal_class.full_signature: @Override public void onAfterAnyExecute(StatementInformation statementInformation, long timeElapsedNanos, SQLException e)
focal_class.identifier: onAfterAnyExecute
focal_class.modifiers: @Override public
focal_class.parameters: (StatementInformation statementInformation, long timeElapsedNanos, SQLException e)
focal_class.return: void
focal_class.signature: void onAfterAnyExecute(StatementInformation statementInformation, long timeElapsedNanos, SQLException e)
focal_class.class_method_signature: StagemonitorJdbcEventListener.getMethod(String sql)
focal_class.full_signature: static String getMethod(String sql)
focal_class.identifier: getMethod
focal_class.modifiers: static
focal_class.parameters: (String sql)
focal_class.return: String
focal_class.signature: String getMethod(String sql)
focal_class.class_method_signature: StagemonitorJdbcEventListener.getSql(String prepared, String sql)
focal_class.full_signature: private String getSql(String prepared, String sql)
focal_class.identifier: getSql
focal_class.modifiers: private
focal_class.parameters: (String prepared, String sql)
focal_class.return: String
focal_class.signature: String getSql(String prepared, String sql)
focal_class.superclass: extends SimpleJdbcEventListener
focal_method.body: static String getMethod(String sql) {
  		if (sql == null) {
  			return null;
  		}
  		sql = sql.trim();
  		final int indexOfWhitespace = sql.indexOf(' ');
  		if (indexOfWhitespace > 0) {
  			return sql.substring(0, indexOfWhitespace).toUpperCase();
  		} else {
  			// for example COMMIT
  			return sql.toUpperCase();
  		}
  	}
focal_method.class_method_signature: StagemonitorJdbcEventListener.getMethod(String sql)
focal_method.full_signature: static String getMethod(String sql)
focal_method.identifier: getMethod
focal_method.invocations: trim indexOf toUpperCase substring toUpperCase
focal_method.modifiers: static
focal_method.parameters: (String sql)
focal_method.return: String
focal_method.signature: String getMethod(String sql)