test_class.declarator: xaDataSourceDefinition
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private XADataSourceDefinition xaDataSourceDefinition;
test_class.type: XADataSourceDefinition
test_class.var_name: xaDataSourceDefinition
test_class.declarator: swapper
test_class.modifier: private
test_class.original_string: private DataSourceSwapper swapper;
test_class.type: DataSourceSwapper
test_class.var_name: swapper
test_class.file: shardingsphere-transaction/shardingsphere-transaction-2pc/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/test/java/org/apache/shardingsphere/transaction/xa/jta/datasource/swapper/DataSourceSwapperTest.java
test_class.identifier: DataSourceSwapperTest
test_case.body: @Test
      public void assertSwapByDefaultProvider() {
          swapper = new DataSourceSwapper(xaDataSourceDefinition);
          assertResult(swapper.swap(createDBCPDataSource()));
      }
test_case.class_method_signature: DataSourceSwapperTest.assertSwapByDefaultProvider()
test_case.full_signature: @Test public void assertSwapByDefaultProvider()
test_case.identifier: assertSwapByDefaultProvider
test_case.invocations: assertResult swap createDBCPDataSource
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertSwapByDefaultProvider()
focal_class.declarator: GETTER_PREFIX = "get"
focal_class.modifier: private static final
focal_class.original_string: private static final String GETTER_PREFIX = "get";
focal_class.type: String
focal_class.var_name: GETTER_PREFIX
focal_class.declarator: SETTER_PREFIX = "set"
focal_class.modifier: private static final
focal_class.original_string: private static final String SETTER_PREFIX = "set";
focal_class.type: String
focal_class.var_name: SETTER_PREFIX
focal_class.declarator: xaDataSourceDefinition
focal_class.modifier: private final
focal_class.original_string: private final XADataSourceDefinition xaDataSourceDefinition;
focal_class.type: XADataSourceDefinition
focal_class.var_name: xaDataSourceDefinition
focal_class.file: shardingsphere-transaction/shardingsphere-transaction-2pc/shardingsphere-transaction-xa/shardingsphere-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/swapper/DataSourceSwapper.java
focal_class.identifier: DataSourceSwapper
focal_class.class_method_signature: DataSourceSwapper.swap(final DataSource dataSource)
focal_class.full_signature: public XADataSource swap(final DataSource dataSource)
focal_class.identifier: swap
focal_class.modifiers: public
focal_class.parameters: (final DataSource dataSource)
focal_class.return: XADataSource
focal_class.signature: XADataSource swap(final DataSource dataSource)
focal_class.class_method_signature: DataSourceSwapper.createXADataSource()
focal_class.full_signature: private XADataSource createXADataSource()
focal_class.identifier: createXADataSource
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: XADataSource
focal_class.signature: XADataSource createXADataSource()
focal_class.class_method_signature: DataSourceSwapper.loadXADataSource(final String xaDataSourceClassName)
focal_class.full_signature: private XADataSource loadXADataSource(final String xaDataSourceClassName)
focal_class.identifier: loadXADataSource
focal_class.modifiers: private
focal_class.parameters: (final String xaDataSourceClassName)
focal_class.return: XADataSource
focal_class.signature: XADataSource loadXADataSource(final String xaDataSourceClassName)
focal_class.class_method_signature: DataSourceSwapper.getDatabaseAccessConfiguration(final DataSource dataSource)
focal_class.full_signature: private Map<String, Object> getDatabaseAccessConfiguration(final DataSource dataSource)
focal_class.identifier: getDatabaseAccessConfiguration
focal_class.modifiers: private
focal_class.parameters: (final DataSource dataSource)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> getDatabaseAccessConfiguration(final DataSource dataSource)
focal_class.class_method_signature: DataSourceSwapper.setProperties(final XADataSource xaDataSource, final Map<String, Object> databaseAccessConfig)
focal_class.full_signature: @SneakyThrows(ReflectiveOperationException.class) private void setProperties(final XADataSource xaDataSource, final Map<String, Object> databaseAccessConfig)
focal_class.identifier: setProperties
focal_class.modifiers: @SneakyThrows(ReflectiveOperationException.class) private
focal_class.parameters: (final XADataSource xaDataSource, final Map<String, Object> databaseAccessConfig)
focal_class.return: void
focal_class.signature: void setProperties(final XADataSource xaDataSource, final Map<String, Object> databaseAccessConfig)
focal_class.class_method_signature: DataSourceSwapper.findGetterMethod(final DataSource dataSource, final String propertyName)
focal_class.full_signature: private Method findGetterMethod(final DataSource dataSource, final String propertyName)
focal_class.identifier: findGetterMethod
focal_class.modifiers: private
focal_class.parameters: (final DataSource dataSource, final String propertyName)
focal_class.return: Method
focal_class.signature: Method findGetterMethod(final DataSource dataSource, final String propertyName)
focal_class.class_method_signature: DataSourceSwapper.findSetterMethod(final Method[] methods, final String property)
focal_class.full_signature: private Optional<Method> findSetterMethod(final Method[] methods, final String property)
focal_class.identifier: findSetterMethod
focal_class.modifiers: private
focal_class.parameters: (final Method[] methods, final String property)
focal_class.return: Optional<Method>
focal_class.signature: Optional<Method> findSetterMethod(final Method[] methods, final String property)
focal_method.body: public XADataSource swap(final DataSource dataSource) {
          XADataSource result = createXADataSource();
          setProperties(result, getDatabaseAccessConfiguration(dataSource));
          return result;
      }
focal_method.class_method_signature: DataSourceSwapper.swap(final DataSource dataSource)
focal_method.full_signature: public XADataSource swap(final DataSource dataSource)
focal_method.identifier: swap
focal_method.invocations: createXADataSource setProperties getDatabaseAccessConfiguration
focal_method.modifiers: public
focal_method.parameters: (final DataSource dataSource)
focal_method.return: XADataSource
focal_method.signature: XADataSource swap(final DataSource dataSource)