id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
163387337_160
{ "fields": [ { "declarator": "core", "modifier": "private static", "original_string": "private static DefaultCore core;", "type": "DefaultCore", "var_name": "core" }, { "declarator": "remotingServer", "modifier": "private static", "original_string": "privat...
{ "body": "@Test\n public void beginTest() throws Exception {\n String xid = core.begin(applicationId, txServiceGroup, txName, timeout);\n globalSession = SessionHolder.findGlobalSession(xid);\n Assertions.assertNotNull(globalSession);\n\n }", "class_method_signature": "DefaultCoreTest.be...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(DefaultCore.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(DefaultCore.class);", "type": "Logger", "var_name": "LOGGER" }, { "d...
{ "body": "@Override\n public String begin(String applicationId, String transactionServiceGroup, String name, int timeout)\n throws TransactionException {\n GlobalSession session = GlobalSession.createGlobalSession(applicationId, transactionServiceGroup, name,\n timeout);\n session....
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_20
{ "fields": [], "file": "serializer/seata-serializer-protobuf/src/test/java/io/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertorTest.java", "identifier": "GlobalBeginRequestConvertorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void convert2Proto() {\n GlobalBeginRequest globalBeginRequest = new GlobalBeginRequest();\n globalBeginRequest.setTimeout(3000);\n globalBeginRequest.setTransactionName(\"taa\");\n\n GlobalBeginRequestConvertor convertor = new GlobalBeginRequestConvertor();\n ...
{ "fields": [], "file": "serializer/seata-serializer-protobuf/src/main/java/io/seata/serializer/protobuf/convertor/GlobalBeginRequestConvertor.java", "identifier": "GlobalBeginRequestConvertor", "interfaces": "implements PbConvertor<GlobalBeginRequest, GlobalBeginRequestProto>", "methods": [ { "clas...
{ "body": "@Override\n public GlobalBeginRequestProto convert2Proto(GlobalBeginRequest globalBeginRequest) {\n final short typeCode = globalBeginRequest.getTypeCode();\n\n final AbstractMessageProto abstractMessage = AbstractMessageProto.newBuilder().setMessageType(\n MessageTypeProto.forN...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_176
{ "fields": [ { "declarator": "returnValueColumnLabels = Lists.newArrayList(\"id\", \"name\")", "modifier": "private static", "original_string": "private static List<String> returnValueColumnLabels = Lists.newArrayList(\"id\", \"name\");", "type": "List<String>", "var_name": "returnV...
{ "body": "@Test\n public void testGetConnectionProxy() {\n Assertions.assertNotNull(statementProxy.getConnectionProxy());\n }", "class_method_signature": "StatementProxyTest.testGetConnectionProxy()", "constructor": false, "full_signature": "@Test public void testGetConnectionProxy()", "identifi...
{ "fields": [], "file": "rm-datasource/src/main/java/io/seata/rm/datasource/StatementProxy.java", "identifier": "StatementProxy", "interfaces": "", "methods": [ { "class_method_signature": "StatementProxy.StatementProxy(AbstractConnectionProxy connectionWrapper, T targetStatement, String targetSQL)"...
{ "body": "@Override\n public ConnectionProxy getConnectionProxy() {\n return (ConnectionProxy) super.getConnectionProxy();\n }", "class_method_signature": "StatementProxy.getConnectionProxy()", "constructor": false, "full_signature": "@Override public ConnectionProxy getConnectionProxy()", "iden...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_36
{ "fields": [], "file": "serializer/seata-serializer-protobuf/src/test/java/io/seata/serializer/protobuf/convertor/BranchReportRequestConvertorTest.java", "identifier": "BranchReportRequestConvertorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void convert2Proto() {\n\n BranchReportRequest branchReportRequest = new BranchReportRequest();\n\n branchReportRequest.setApplicationData(\"data\");\n branchReportRequest.setBranchId(123);\n branchReportRequest.setResourceId(\"resourceId\");\n branchRep...
{ "fields": [], "file": "serializer/seata-serializer-protobuf/src/main/java/io/seata/serializer/protobuf/convertor/BranchReportRequestConvertor.java", "identifier": "BranchReportRequestConvertor", "interfaces": "implements PbConvertor<BranchReportRequest, BranchReportRequestProto>", "methods": [ { "...
{ "body": "@Override\n public BranchReportRequestProto convert2Proto(BranchReportRequest branchReportRequest) {\n final short typeCode = branchReportRequest.getTypeCode();\n\n final AbstractMessageProto abstractMessage = AbstractMessageProto.newBuilder().setMessageType(\n MessageTypeProto....
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_199
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/sql/struct/ColumnMetaTest.java", "identifier": "ColumnMetaTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testColumnMeta() {\n ColumnMeta columnMeta = new ColumnMeta();\n Assertions.assertNotNull(columnMeta.toString());\n Assertions.assertEquals(columnMeta, new ColumnMeta());\n columnMeta.setIsAutoincrement(\"Yes\");\n Assertions.assertTrue(columnMeta.i...
{ "fields": [ { "declarator": "tableCat", "modifier": "private", "original_string": "private String tableCat;", "type": "String", "var_name": "tableCat" }, { "declarator": "tableSchemaName", "modifier": "private", "original_string": "private String tableSche...
{ "body": "public ColumnMeta() {\n }", "class_method_signature": "ColumnMeta.ColumnMeta()", "constructor": true, "full_signature": "public ColumnMeta()", "identifier": "ColumnMeta", "invocations": [], "modifiers": "public", "parameters": "()", "return": "", "signature": " ColumnMeta()", "testc...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_121
{ "fields": [], "file": "common/src/test/java/io/seata/common/loader/EnhancedServiceLoaderTest.java", "identifier": "EnhancedServiceLoaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getMultipleExtensionInstance(){\n Hello hello1 = EnhancedServiceLoader.load(Hello.class, \"LatinHello\");\n Hello hello2 = EnhancedServiceLoader.load(Hello.class, \"LatinHello\");\n assertThat(hello1 == hello2).isFalse();\n }", "class_method_signature": "Enh...
{ "fields": [], "file": "common/src/main/java/io/seata/common/loader/EnhancedServiceLoader.java", "identifier": "EnhancedServiceLoader", "interfaces": "", "methods": [ { "class_method_signature": "EnhancedServiceLoader.load(Class<S> service, ClassLoader loader)", "constructor": false, "f...
{ "body": "public static <S> S load(Class<S> service, ClassLoader loader) throws EnhancedServiceNotFoundException {\n return InnerEnhancedServiceLoader.getServiceLoader(service).load(loader);\n }", "class_method_signature": "EnhancedServiceLoader.load(Class<S> service, ClassLoader loader)", "constructor...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_61
{ "fields": [], "file": "tm/src/test/java/io/seata/tm/TransactionManagerHolderTest.java", "identifier": "TransactionManagerHolderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void getTest() {\n Assertions.assertThrows(ShouldNeverHappenException.class, () -> { TransactionManagerHolder.set(null);\n TransactionManagerHolder.get();});\n }", "class_method_signature": "TransactionManagerHolderTest.getTest()", "constructor": false, "full_signatu...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(TransactionManagerHolder.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(TransactionManagerHolder.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public static TransactionManager get() {\n if (SingletonHolder.INSTANCE == null) {\n throw new ShouldNeverHappenException(\"TransactionManager is NOT ready!\");\n }\n return SingletonHolder.INSTANCE;\n }", "class_method_signature": "TransactionManagerHolder.get()", "c...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_208
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/undo/oracle/OracleUndoDeleteExecutorTest.java", "identifier": "OracleUndoDeleteExecutorTest", "interfaces": "", "superclass": "extends BaseExecutorTest" }
{ "body": "@Test\n public void buildUndoSQL() {\n OracleUndoDeleteExecutor executor = upperCase();\n\n String sql = executor.buildUndoSQL();\n Assertions.assertNotNull(sql);\n Assertions.assertTrue(sql.contains(\"INSERT\"));\n Assertions.assertTrue(sql.contains(\"ID\"));\n ...
{ "fields": [ { "declarator": "INSERT_SQL_TEMPLATE = \"INSERT INTO %s (%s) VALUES (%s)\"", "modifier": "private static final", "original_string": "private static final String INSERT_SQL_TEMPLATE = \"INSERT INTO %s (%s) VALUES (%s)\";", "type": "String", "var_name": "INSERT_SQL_TEMPLA...
{ "body": "@Override\n protected String buildUndoSQL() {\n TableRecords beforeImage = sqlUndoLog.getBeforeImage();\n List<Row> beforeImageRows = beforeImage.getRows();\n if (CollectionUtils.isEmpty(beforeImageRows)) {\n throw new ShouldNeverHappenException(\"Invalid UNDO LOG\");\n ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_0
{ "fields": [], "file": "discovery/seata-discovery-consul/src/test/java/io/seata/discovery/registry/consul/ConsulRegistryServiceImplTest.java", "identifier": "ConsulRegistryServiceImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRegister() throws Exception {\n RegistryService registryService = mock(ConsulRegistryServiceImpl.class);\n InetSocketAddress inetSocketAddress = new InetSocketAddress(\"127.0.0.1\", 8091);\n registryService.register(inetSocketAddress);\n verify(registr...
{ "fields": [ { "declarator": "instance", "modifier": "private static volatile", "original_string": "private static volatile ConsulRegistryServiceImpl instance;", "type": "ConsulRegistryServiceImpl", "var_name": "instance" }, { "declarator": "client", "modifier": ...
{ "body": "@Override\n public void register(InetSocketAddress address) throws Exception {\n NetUtil.validAddress(address);\n getConsulClient().agentServiceRegister(createService(address));\n }", "class_method_signature": "ConsulRegistryServiceImpl.register(InetSocketAddress address)", "constru...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_224
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/DataCompareUtilsTest.java", "identifier": "DataCompareUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void isFieldEquals() {\n Field field0 = new Field(\"name\", 0, \"111\");\n Field field1 = new Field(\"name\", 1, \"111\");\n Field field2 = new Field(\"name\", 0, \"222\");\n Field field3 = new Field(\"age\", 0, \"222\");\n Field field4 = new Field(\"nam...
{ "fields": [], "file": "rm-datasource/src/main/java/io/seata/rm/datasource/DataCompareUtils.java", "identifier": "DataCompareUtils", "interfaces": "", "methods": [ { "class_method_signature": "DataCompareUtils.DataCompareUtils()", "constructor": true, "full_signature": "private DataCom...
{ "body": "public static Result<Boolean> isFieldEquals(Field f0, Field f1) {\n if (f0 == null) {\n return Result.build(f1 == null);\n } else {\n if (f1 == null) {\n return Result.build(false);\n } else {\n if (StringUtils.equalsIgnoreCase(f0...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_232
{ "fields": [ { "declarator": "GLOBAL_TRANSACTION_SCANNER = new GlobalTransactionScanner(\n \"global-trans-scanner-test\")", "modifier": "private static final", "original_string": "private static final GlobalTransactionScanner GLOBAL_TRANSACTION_SCANNER = new GlobalTransactionScanner(\n ...
{ "body": "@Test\n public void testSetMethod() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {\n MethodDesc methodDesc = getMethodDesc();\n assertThat(methodDesc.getMethod()).isNotNull();\n methodDesc.setMethod(null);\n assertThat(methodDesc.getMethod()...
{ "fields": [ { "declarator": "transactionAnnotation", "modifier": "private", "original_string": "private GlobalTransactional transactionAnnotation;", "type": "GlobalTransactional", "var_name": "transactionAnnotation" }, { "declarator": "method", "modifier": "priv...
{ "body": "public void setMethod(Method method) {\n this.method = method;\n }", "class_method_signature": "MethodDesc.setMethod(Method method)", "constructor": false, "full_signature": "public void setMethod(Method method)", "identifier": "setMethod", "invocations": [], "modifiers": "public", ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_212
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/undo/oracle/OracleUndoInsertExecutorTest.java", "identifier": "OracleUndoInsertExecutorTest", "interfaces": "", "superclass": "extends BaseExecutorTest" }
{ "body": "@Test\n public void buildUndoSQL() {\n OracleUndoInsertExecutor executor = upperCase();\n String sql = executor.buildUndoSQL();\n Assertions.assertNotNull(sql);\n Assertions.assertTrue(sql.contains(\"DELETE\"));\n Assertions.assertTrue(sql.contains(\"ID\"));\n A...
{ "fields": [ { "declarator": "DELETE_SQL_TEMPLATE = \"DELETE FROM %s WHERE %s \"", "modifier": "private static final", "original_string": "private static final String DELETE_SQL_TEMPLATE = \"DELETE FROM %s WHERE %s \";", "type": "String", "var_name": "DELETE_SQL_TEMPLATE" } ],...
{ "body": "@Override\n protected String buildUndoSQL() {\n TableRecords afterImage = sqlUndoLog.getAfterImage();\n List<Row> afterImageRows = afterImage.getRows();\n if (CollectionUtils.isEmpty(afterImageRows)) {\n throw new ShouldNeverHappenException(\"Invalid UNDO LOG\");\n ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_94
{ "fields": [], "file": "common/src/test/java/io/seata/common/util/BlobUtilsTest.java", "identifier": "BlobUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void blob2Bytes() throws UnsupportedEncodingException, SQLException {\n assertNull(BlobUtils.blob2Bytes(null));\n byte[] bs = \"xxaaadd\".getBytes(Constants.DEFAULT_CHARSET_NAME);\n assertThat(BlobUtils.blob2Bytes(new SerialBlob(bs))).isEqualTo(\n bs);\n }"...
{ "fields": [], "file": "common/src/main/java/io/seata/common/util/BlobUtils.java", "identifier": "BlobUtils", "interfaces": "", "methods": [ { "class_method_signature": "BlobUtils.BlobUtils()", "constructor": true, "full_signature": "private BlobUtils()", "identifier": "BlobUtils...
{ "body": "public static byte[] blob2Bytes(Blob blob) {\n if (blob == null) {\n return null;\n }\n\n try {\n return blob.getBytes((long) 1, (int) blob.length());\n } catch (Exception e) {\n throw new ShouldNeverHappenException(e);\n }\n }", "cla...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_183
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/exec/BaseTransactionalExecutorTest.java", "identifier": "BaseTransactionalExecutorTest", "interfaces": "", "superclass": "" }
{ "body": "@SuppressWarnings({\"rawtypes\", \"unchecked\"})\n @Test\n public void testExecuteWithGlobalLockSet() throws Exception {\n\n //initial objects\n ConnectionProxy connectionProxy = new ConnectionProxy(null, null);\n StatementProxy statementProxy = new StatementProxy<>(connectionPro...
{ "fields": [ { "declarator": "statementProxy", "modifier": "protected", "original_string": "protected StatementProxy<S> statementProxy;", "type": "StatementProxy<S>", "var_name": "statementProxy" }, { "declarator": "statementCallback", "modifier": "protected", ...
{ "body": "@Override\n public T execute(Object... args) throws Throwable {\n if (RootContext.inGlobalTransaction()) {\n String xid = RootContext.getXID();\n statementProxy.getConnectionProxy().bind(xid);\n }\n\n statementProxy.getConnectionProxy().setGlobalLockRequire(Roo...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_195
{ "fields": [ { "declarator": "COLUMN_ID=\"id\"", "modifier": "private final", "original_string": "private final String COLUMN_ID=\"id\";", "type": "String", "var_name": "COLUMN_ID" }, { "declarator": "COLUMN_USERCODE=\"userCode\"", "modifier": "private final", ...
{ "body": "@Test\n public void testContainsPK() {\n TableMeta tableMeta = new TableMeta();\n Assertions.assertFalse(tableMeta.containsPK(null));\n Throwable exception = Assertions.assertThrows(NotSupportYetException.class, () -> tableMeta.containsPK(Lists.newArrayList(\"id\")));\n Asser...
{ "fields": [ { "declarator": "tableName", "modifier": "private", "original_string": "private String tableName;", "type": "String", "var_name": "tableName" }, { "declarator": "allColumns = new LinkedHashMap<String, ColumnMeta>()", "modifier": "private", "ori...
{ "body": "public boolean containsPK(List<String> cols) {\n if (cols == null) {\n return false;\n }\n\n List<String> pk = getPrimaryKeyOnlyName();\n if (pk.isEmpty()) {\n return false;\n }\n\n\n //at least contain one pk\n if (cols.containsAll(pk)...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_204
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/undo/AbstractUndoExecutorTest.java", "identifier": "AbstractUndoExecutorTest", "interfaces": "", "superclass": "extends BaseH2Test" }
{ "body": "@Test\n public void dataValidationDelete() throws SQLException {\n execSQL(\"INSERT INTO table_name(id, name) VALUES (12345,'aaa');\");\n execSQL(\"INSERT INTO table_name(id, name) VALUES (12346,'aaa');\");\n\n TableRecords beforeImage = execQuery(tableMeta, \"SELECT * FROM table_na...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AbstractUndoExecutor.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AbstractUndoExecutor.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "protected boolean dataValidationAndGoOn(Connection conn) throws SQLException {\n\n TableRecords beforeRecords = sqlUndoLog.getBeforeImage();\n TableRecords afterRecords = sqlUndoLog.getAfterImage();\n\n // Compare current data with before data\n // No need undo if the before dat...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_82
{ "fields": [ { "declarator": "ipv4 = new InetSocketAddress(Inet4Address.getLocalHost().getHostName(), 3902)", "modifier": "private", "original_string": "private InetSocketAddress ipv4 = new InetSocketAddress(Inet4Address.getLocalHost().getHostName(), 3902);", "type": "InetSocketAddress", ...
{ "body": "@Test\n public void testToStringAddress2() {\n assertThat(NetUtil.toStringAddress(ipv4)).isEqualTo(\n ipv4.getAddress().getHostAddress() + \":\" + ipv4.getPort());\n assertThat(NetUtil.toStringAddress(ipv6)).isEqualTo(\n ipv6.getAddress().getHostAddress() + \":\" + ip...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(NetUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NetUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarato...
{ "body": "public static String toStringAddress(SocketAddress address) {\n if (address == null) {\n return StringUtils.EMPTY;\n }\n return toStringAddress((InetSocketAddress) address);\n }", "class_method_signature": "NetUtil.toStringAddress(SocketAddress address)", "constructor...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_16
{ "fields": [], "file": "compressor/seata-compressor-zip/src/test/java/io/seata/compressor/zip/ZipUtilTest.java", "identifier": "ZipUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_decompress() {\n Assertions.assertThrows(NullPointerException.class, () -> {\n ZipUtil.decompress(null);\n });\n }", "class_method_signature": "ZipUtilTest.test_decompress()", "constructor": false, "full_signature": "@Test public void test_decom...
{ "fields": [ { "declarator": "BUFFER_SIZE = 8192", "modifier": "private static final", "original_string": "private static final int BUFFER_SIZE = 8192;", "type": "int", "var_name": "BUFFER_SIZE" } ], "file": "compressor/seata-compressor-zip/src/main/java/io/seata/compressor/...
{ "body": "public static byte[] decompress(byte[] bytes) {\n if (bytes == null) {\n throw new NullPointerException(\"bytes is null\");\n }\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n try (ZipInputStream zip = new ZipInputStream(new ByteArrayInputStream(bytes))) ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_156
{ "fields": [ { "declarator": "DEFAULT_XID = \"default_xid\"", "modifier": "private final", "original_string": "private final String DEFAULT_XID = \"default_xid\";", "type": "String", "var_name": "DEFAULT_XID" }, { "declarator": "DEFAULT_BRANCH_TYPE = BranchType.AT", ...
{ "body": "@Test\n public void testInTccBranch() {\n RootContext.bind(DEFAULT_XID);\n assertThat(RootContext.inTccBranch()).isFalse();\n RootContext.bindBranchType(BranchType.TCC);\n assertThat(RootContext.inTccBranch()).isTrue();\n RootContext.unbindBranchType();\n assert...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(RootContext.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(RootContext.class);", "type": "Logger", "var_name": "LOGGER" }, { "d...
{ "body": "public static boolean inTccBranch() {\n return BranchType.TCC == getBranchType();\n }", "class_method_signature": "RootContext.inTccBranch()", "constructor": false, "full_signature": "public static boolean inTccBranch()", "identifier": "inTccBranch", "invocations": [ "getBranchType"...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_228
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/DataCompareUtilsTest.java", "identifier": "DataCompareUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRowListToMapWithMultipPk(){\n List<String> primaryKeyList = new ArrayList<>();\n primaryKeyList.add(\"id1\");\n primaryKeyList.add(\"id2\");\n\n List<Row> rows = new ArrayList<>();\n Field field1 = new Field(\"id1\", 1, \"1\");\n Field fi...
{ "fields": [], "file": "rm-datasource/src/main/java/io/seata/rm/datasource/DataCompareUtils.java", "identifier": "DataCompareUtils", "interfaces": "", "methods": [ { "class_method_signature": "DataCompareUtils.DataCompareUtils()", "constructor": true, "full_signature": "private DataCom...
{ "body": "public static Map<String, Map<String, Field>> rowListToMap(List<Row> rowList, List<String> primaryKeyList) {\n // {value of primaryKey, value of all columns}\n Map<String, Map<String, Field>> rowMap = new HashMap<>();\n for (Row row : rowList) {\n //ensure the order of colum...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_41
{ "fields": [ { "declarator": "DEFAULT_XID = \"1234567890\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_XID = \"1234567890\";", "type": "String", "var_name": "DEFAULT_XID" } ], "file": "tm/src/test/java/io/seata/tm/api/GlobalT...
{ "body": "@Test\n void reloadTest() throws TransactionException {\n GlobalTransaction tx = GlobalTransactionContext.getCurrentOrCreate();\n tx = GlobalTransactionContext.reload(DEFAULT_XID);\n GlobalTransaction finalTx = tx;\n Assertions.assertThrows(IllegalStateException.class, finalT...
{ "fields": [], "file": "tm/src/main/java/io/seata/tm/api/GlobalTransactionContext.java", "identifier": "GlobalTransactionContext", "interfaces": "", "methods": [ { "class_method_signature": "GlobalTransactionContext.GlobalTransactionContext()", "constructor": true, "full_signature": "pr...
{ "body": "public static GlobalTransaction reload(String xid) throws TransactionException {\n return new DefaultGlobalTransaction(xid, GlobalStatus.UnKnown, GlobalTransactionRole.Launcher) {\n @Override\n public void begin(int timeout, String name) throws TransactionException {\n ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_101
{ "fields": [], "file": "common/src/test/java/io/seata/common/util/NumberUtilsTest.java", "identifier": "NumberUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToInReturnDefaultValueWithNull() {\n Assertions.assertEquals(10, NumberUtils.toInt(null, 10));\n }", "class_method_signature": "NumberUtilsTest.testToInReturnDefaultValueWithNull()", "constructor": false, "full_signature": "@Test public void testToInReturnDefaultV...
{ "fields": [], "file": "common/src/main/java/io/seata/common/util/NumberUtils.java", "identifier": "NumberUtils", "interfaces": "", "methods": [ { "class_method_signature": "NumberUtils.toInt(final String str, final int defaultValue)", "constructor": false, "full_signature": "public sta...
{ "body": "public static int toInt(final String str, final int defaultValue) {\n if (str == null) {\n return defaultValue;\n }\n try {\n return Integer.parseInt(str);\n } catch (NumberFormatException nfe) {\n return defaultValue;\n }\n }", "clas...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_57
{ "fields": [], "file": "tm/src/test/java/io/seata/tm/api/transaction/RollbackRuleTest.java", "identifier": "RollbackRuleTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void equalsTest(){\n RollbackRule otherRollbackRuleByName = new RollbackRule(Exception.class.getName());\n RollbackRule otherRollbackRuleByName2 = new NoRollbackRule(Exception.class.getName());\n\n Assertions.assertNotEquals(\"\", otherRollbackRuleByName);\n As...
{ "fields": [ { "declarator": "exceptionName", "modifier": "private final", "original_string": "private final String exceptionName;", "type": "String", "var_name": "exceptionName" } ], "file": "tm/src/main/java/io/seata/tm/api/transaction/RollbackRule.java", "identifier": "...
{ "body": "@Override\n public boolean equals(Object other) {\n if (this == other) {\n return true;\n }\n if (!(other instanceof RollbackRule)) {\n return false;\n }\n RollbackRule rhs = (RollbackRule) other;\n return this.exceptionName.equals(rhs.exce...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_117
{ "fields": [], "file": "common/src/test/java/io/seata/common/loader/EnhancedServiceLoaderTest.java", "identifier": "EnhancedServiceLoaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLoadByClassAndClassLoaderAndActivateName() {\n Hello englishHello = EnhancedServiceLoader\n .load(Hello.class, \"EnglishHello\", EnhancedServiceLoaderTest.class.getClassLoader());\n assertThat(englishHello.say()).isEqualTo(\"hello!\");\n }", "cla...
{ "fields": [], "file": "common/src/main/java/io/seata/common/loader/EnhancedServiceLoader.java", "identifier": "EnhancedServiceLoader", "interfaces": "", "methods": [ { "class_method_signature": "EnhancedServiceLoader.load(Class<S> service, ClassLoader loader)", "constructor": false, "f...
{ "body": "public static <S> S load(Class<S> service, ClassLoader loader) throws EnhancedServiceNotFoundException {\n return InnerEnhancedServiceLoader.getServiceLoader(service).load(loader);\n }", "class_method_signature": "EnhancedServiceLoader.load(Class<S> service, ClassLoader loader)", "constructor...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_140
{ "fields": [ { "declarator": "nettyPoolKey", "modifier": "private", "original_string": "private NettyPoolKey nettyPoolKey;", "type": "NettyPoolKey", "var_name": "nettyPoolKey" }, { "declarator": "RM_ROLE = NettyPoolKey.TransactionRole.RMROLE", "modifier": "privat...
{ "body": "@Test\n public void setTransactionRole() {\n nettyPoolKey.setTransactionRole(TM_ROLE);\n Assertions.assertEquals(nettyPoolKey.getTransactionRole(), TM_ROLE);\n }", "class_method_signature": "NettyPoolKeyTest.setTransactionRole()", "constructor": false, "full_signature": "@Test pub...
{ "fields": [ { "declarator": "transactionRole", "modifier": "private", "original_string": "private TransactionRole transactionRole;", "type": "TransactionRole", "var_name": "transactionRole" }, { "declarator": "address", "modifier": "private", "original_str...
{ "body": "public NettyPoolKey setTransactionRole(TransactionRole transactionRole) {\n this.transactionRole = transactionRole;\n return this;\n }", "class_method_signature": "NettyPoolKey.setTransactionRole(TransactionRole transactionRole)", "constructor": false, "full_signature": "public Netty...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_7
{ "fields": [], "file": "compressor/seata-compressor-bzip2/src/test/java/io/seata/compressor/bzip2/BZip2UtilTest.java", "identifier": "BZip2UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_compress() {\n Assertions.assertThrows(NullPointerException.class, () -> {\n BZip2Util.compress(null);\n });\n }", "class_method_signature": "BZip2UtilTest.test_compress()", "constructor": false, "full_signature": "@Test public void test_compres...
{ "fields": [ { "declarator": "BUFFER_SIZE = 8192", "modifier": "private static final", "original_string": "private static final int BUFFER_SIZE = 8192;", "type": "int", "var_name": "BUFFER_SIZE" } ], "file": "compressor/seata-compressor-bzip2/src/main/java/io/seata/compresso...
{ "body": "public static byte[] compress(byte[] bytes) {\n if (bytes == null) {\n throw new NullPointerException(\"bytes is null\");\n }\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n try (CBZip2OutputStream bzip2 = new CBZip2OutputStream(bos)) {\n bzip2...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_223
{ "fields": [ { "declarator": "executor", "modifier": "private static", "original_string": "private static MySQLUndoUpdateExecutor executor;", "type": "MySQLUndoUpdateExecutor", "var_name": "executor" } ], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/undo/mysql...
{ "body": "@Test\n public void getUndoRows() {\n Assertions.assertEquals(executor.getUndoRows(), executor.getSqlUndoLog().getBeforeImage());\n }", "class_method_signature": "MySQLUndoUpdateExecutorTest.getUndoRows()", "constructor": false, "full_signature": "@Test public void getUndoRows()", "ide...
{ "fields": [ { "declarator": "UPDATE_SQL_TEMPLATE = \"UPDATE %s SET %s WHERE %s \"", "modifier": "private static final", "original_string": "private static final String UPDATE_SQL_TEMPLATE = \"UPDATE %s SET %s WHERE %s \";", "type": "String", "var_name": "UPDATE_SQL_TEMPLATE" } ...
{ "body": "@Override\n protected TableRecords getUndoRows() {\n return sqlUndoLog.getBeforeImage();\n }", "class_method_signature": "MySQLUndoUpdateExecutor.getUndoRows()", "constructor": false, "full_signature": "@Override protected TableRecords getUndoRows()", "identifier": "getUndoRows", "in...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_89
{ "fields": [ { "declarator": "ipv4 = new InetSocketAddress(Inet4Address.getLocalHost().getHostName(), 3902)", "modifier": "private", "original_string": "private InetSocketAddress ipv4 = new InetSocketAddress(Inet4Address.getLocalHost().getHostName(), 3902);", "type": "InetSocketAddress", ...
{ "body": "@Test\n public void testGetLocalHost() {\n assertThat(NetUtil.getLocalHost()).isNotNull();\n }", "class_method_signature": "NetUtilTest.testGetLocalHost()", "constructor": false, "full_signature": "@Test public void testGetLocalHost()", "identifier": "testGetLocalHost", "invocations"...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(NetUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NetUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarato...
{ "body": "public static String getLocalHost() {\n InetAddress address = getLocalAddress();\n return address == null ? \"localhost\" : address.getHostName();\n }", "class_method_signature": "NetUtil.getLocalHost()", "constructor": false, "full_signature": "public static String getLocalHost()", ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_126
{ "fields": [ { "declarator": "THREAD_TOTAL_SIZE = 3", "modifier": "private static final", "original_string": "private static final int THREAD_TOTAL_SIZE = 3;", "type": "int", "var_name": "THREAD_TOTAL_SIZE" }, { "declarator": "DEFAULT_THREAD_PREFIX_COUNTER = 1", ...
{ "body": "@Test\n public void testThreadNameHasCounterWithPrefixCounter() {\n NamedThreadFactory factory = new NamedThreadFactory(\"prefix\", THREAD_TOTAL_SIZE, true);\n for (int i = 0; i < THREAD_TOTAL_SIZE; i ++) {\n Thread thread = factory.newThread(() -> {});\n\n\n // the f...
{ "fields": [ { "declarator": "PREFIX_COUNTER = new ConcurrentHashMap<>()", "modifier": "private final static", "original_string": "private final static Map<String, AtomicInteger> PREFIX_COUNTER = new ConcurrentHashMap<>();", "type": "Map<String, AtomicInteger>", "var_name": "PREFIX_...
{ "body": "@Override\n public Thread newThread(Runnable r) {\n String name = prefix + \"_\" + counter.incrementAndGet();\n if (totalSize > 1) {\n name += \"_\" + totalSize;\n }\n Thread thread = new FastThreadLocalThread(r, name);\n\n thread.setDaemon(makeDaemons);\n ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_66
{ "fields": [], "file": "common/src/test/java/io/seata/common/util/StringUtilsTest.java", "identifier": "StringUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsNullOrEmpty() {\n\n assertThat(StringUtils.isNullOrEmpty(null)).isTrue();\n assertThat(StringUtils.isNullOrEmpty(\"abc\")).isFalse();\n assertThat(StringUtils.isNullOrEmpty(\"\")).isTrue();\n assertThat(StringUtils.isNullOrEmpty(\" \")).isFalse();\n ...
{ "fields": [ { "declarator": "EMPTY = \"\"", "modifier": "public static final", "original_string": "public static final String EMPTY = \"\";", "type": "String", "var_name": "EMPTY" } ], "file": "common/src/main/java/io/seata/common/util/StringUtils.java", "identifier": "St...
{ "body": "public static boolean isNullOrEmpty(String str) {\n return (str == null) || (str.isEmpty());\n }", "class_method_signature": "StringUtils.isNullOrEmpty(String str)", "constructor": false, "full_signature": "public static boolean isNullOrEmpty(String str)", "identifier": "isNullOrEmpty", ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_171
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/util/JdbcUtilsTest.java", "identifier": "JdbcUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDbTypeParserLoading() {\n DbTypeParser dbTypeParser = JdbcUtils.getDbTypeParser();\n Assertions.assertNotNull(dbTypeParser);\n }", "class_method_signature": "JdbcUtilsTest.testDbTypeParserLoading()", "constructor": false, "full_signature": "@Test public voi...
{ "fields": [ { "declarator": "dbTypeParser", "modifier": "private static volatile", "original_string": "private static volatile DbTypeParser dbTypeParser;", "type": "DbTypeParser", "var_name": "dbTypeParser" } ], "file": "rm-datasource/src/main/java/io/seata/rm/datasource/ut...
{ "body": "static DbTypeParser getDbTypeParser() {\n if (dbTypeParser == null) {\n synchronized (JdbcUtils.class) {\n if (dbTypeParser == null) {\n String sqlparserType = ConfigurationFactory.getInstance().getConfig(ConfigurationKeys.SQL_PARSER_TYPE, SqlParserType.S...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_31
{ "fields": [], "file": "serializer/seata-serializer-protobuf/src/test/java/io/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertorTest.java", "identifier": "BranchRollbackResponseConvertorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void convert2Proto() {\n\n BranchRollbackResponse branchRollbackResponse = new BranchRollbackResponse();\n branchRollbackResponse.setTransactionExceptionCode(TransactionExceptionCode.BranchTransactionNotExist);\n branchRollbackResponse.setResultCode(ResultCode.Success...
{ "fields": [], "file": "serializer/seata-serializer-protobuf/src/main/java/io/seata/serializer/protobuf/convertor/BranchRollbackResponseConvertor.java", "identifier": "BranchRollbackResponseConvertor", "interfaces": "implements PbConvertor<BranchRollbackResponse, BranchRollbackResponseProto>", "methods": [ ...
{ "body": "@Override\n public BranchRollbackResponseProto convert2Proto(BranchRollbackResponse branchRollbackResponse) {\n final short typeCode = branchRollbackResponse.getTypeCode();\n\n final AbstractMessageProto abstractMessage = AbstractMessageProto.newBuilder().setMessageType(\n Messa...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_167
{ "fields": [ { "declarator": "returnValueColumnLabels = Lists.newArrayList(\"id\", \"name\")", "modifier": "private static", "original_string": "private static List<String> returnValueColumnLabels = Lists.newArrayList(\"id\", \"name\");", "type": "List<String>", "var_name": "returnV...
{ "body": "@Test\n public void testExecute() throws SQLException {\n preparedStatementProxy.execute();\n }", "class_method_signature": "PreparedStatementProxyTest.testExecute()", "constructor": false, "full_signature": "@Test public void testExecute()", "identifier": "testExecute", "invocations...
{ "fields": [], "file": "rm-datasource/src/main/java/io/seata/rm/datasource/PreparedStatementProxy.java", "identifier": "PreparedStatementProxy", "interfaces": "implements PreparedStatement, ParametersHolder", "methods": [ { "class_method_signature": "PreparedStatementProxy.getParameters()", "...
{ "body": "@Override\n public boolean execute() throws SQLException {\n return ExecuteTemplate.execute(this, (statement, args) -> statement.execute());\n }", "class_method_signature": "PreparedStatementProxy.execute()", "constructor": false, "full_signature": "@Override public boolean execute()", ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_188
{ "fields": [ { "declarator": "connectionProxy", "modifier": "private", "original_string": "private ConnectionProxy connectionProxy;", "type": "ConnectionProxy", "var_name": "connectionProxy" }, { "declarator": "executor", "modifier": "private", "original_st...
{ "body": "@Test\n public void testOnlySupportMysqlWhenUseMultiPk(){\n Mockito.when(connectionProxy.getContext())\n .thenReturn(new ConnectionContext());\n PreparedStatementProxy statementProxy = Mockito.mock(PreparedStatementProxy.class);\n Mockito.when(statementProxy.getConnec...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AbstractDMLBaseExecutor.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AbstractDMLBaseExecutor.class);", "type": "Logger", "var_name": "LOGGE...
{ "body": "protected T executeAutoCommitFalse(Object[] args) throws Exception {\n if (!JdbcConstants.MYSQL.equalsIgnoreCase(getDbType()) && getTableMeta().getPrimaryKeyOnlyName().size() > 1)\n {\n throw new NotSupportYetException(\"multi pk only support mysql!\");\n }\n TableRec...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_27
{ "fields": [], "file": "serializer/seata-serializer-protobuf/src/test/java/io/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertorTest.java", "identifier": "GlobalLockQueryRequestConvertorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void convert2Proto() {\n\n GlobalLockQueryRequest globalLockQueryRequest = new GlobalLockQueryRequest();\n globalLockQueryRequest.setApplicationData(\"data\");\n globalLockQueryRequest.setBranchType(BranchType.AT);\n globalLockQueryRequest.setLockKey(\"localKey...
{ "fields": [], "file": "serializer/seata-serializer-protobuf/src/main/java/io/seata/serializer/protobuf/convertor/GlobalLockQueryRequestConvertor.java", "identifier": "GlobalLockQueryRequestConvertor", "interfaces": "implements PbConvertor<GlobalLockQueryRequest, GlobalLockQueryRequestProto>", "methods": [ ...
{ "body": "@Override\n public GlobalLockQueryRequestProto convert2Proto(GlobalLockQueryRequest globalLockQueryRequest) {\n final short typeCode = globalLockQueryRequest.getTypeCode();\n\n final AbstractMessageProto abstractMessage = AbstractMessageProto.newBuilder().setMessageType(\n Messa...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_219
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/undo/mysql/keyword/MySQLKeywordCheckerTest.java", "identifier": "MySQLKeywordCheckerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCheck() {\n KeywordChecker keywordChecker = KeywordCheckerFactory.getKeywordChecker(JdbcConstants.MYSQL);\n Assertions.assertTrue(keywordChecker.check(\"desc\"));\n }", "class_method_signature": "MySQLKeywordCheckerTest.testCheck()", "constructor": false, "...
{ "fields": [ { "declarator": "keywordSet = Arrays.stream(MySQLKeyword.values()).map(MySQLKeyword::name).collect(Collectors.toSet())", "modifier": "private", "original_string": "private Set<String> keywordSet = Arrays.stream(MySQLKeyword.values()).map(MySQLKeyword::name).collect(Collectors.toSet...
{ "body": "@Override\n public boolean check(String fieldOrTableName) {\n if (keywordSet.contains(fieldOrTableName)) {\n return true;\n }\n if (fieldOrTableName != null) {\n fieldOrTableName = fieldOrTableName.toUpperCase();\n }\n return keywordSet.contains(f...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_130
{ "fields": [], "file": "common/src/test/java/io/seata/common/XIDTest.java", "identifier": "XIDTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetIpAddress() {\n XID.setIpAddress(\"127.0.0.1\");\n assertThat(XID.getIpAddress()).isEqualTo(\"127.0.0.1\");\n }", "class_method_signature": "XIDTest.testSetIpAddress()", "constructor": false, "full_signature": "@Test public void testSetIpAddress()", "i...
{ "fields": [ { "declarator": "port", "modifier": "private static", "original_string": "private static int port;", "type": "int", "var_name": "port" }, { "declarator": "ipAddress", "modifier": "private static", "original_string": "private static String ipAdd...
{ "body": "public static void setIpAddress(String ipAddress) {\n XID.ipAddress = ipAddress;\n }", "class_method_signature": "XID.setIpAddress(String ipAddress)", "constructor": false, "full_signature": "public static void setIpAddress(String ipAddress)", "identifier": "setIpAddress", "invocations"...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_70
{ "fields": [], "file": "common/src/test/java/io/seata/common/util/StringUtilsTest.java", "identifier": "StringUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void testEqualsIgnoreCase() {\n Assertions.assertTrue(StringUtils.equalsIgnoreCase(\"a\", \"a\"));\n Assertions.assertTrue(StringUtils.equalsIgnoreCase(\"a\", \"A\"));\n Assertions.assertTrue(StringUtils.equalsIgnoreCase(\"A\", \"a\"));\n Assertions.assertFalse(String...
{ "fields": [ { "declarator": "EMPTY = \"\"", "modifier": "public static final", "original_string": "public static final String EMPTY = \"\";", "type": "String", "var_name": "EMPTY" } ], "file": "common/src/main/java/io/seata/common/util/StringUtils.java", "identifier": "St...
{ "body": "public static boolean equalsIgnoreCase(String a, String b) {\n if (a == null) {\n return b == null;\n }\n return a.equalsIgnoreCase(b);\n }", "class_method_signature": "StringUtils.equalsIgnoreCase(String a, String b)", "constructor": false, "full_signature": "publi...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_147
{ "fields": [ { "declarator": "channelManager", "modifier": "private", "original_string": "private NettyClientChannelManager channelManager;", "type": "NettyClientChannelManager", "var_name": "channelManager" }, { "declarator": "poolableFactory", "modifier": "@Moc...
{ "body": "@Test\n @SuppressWarnings(\"unchecked\")\n void assertReleaseChannelWhichCacheIsEmpty() throws Exception {\n setNettyClientKeyPool();\n setUpReleaseChannel();\n channelManager.releaseChannel(channel, \"127.0.0.1:8091\");\n verify(keyedObjectPool).returnObject(nettyPoolKey,...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(NettyClientChannelManager.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NettyClientChannelManager.class);", "type": "Logger", "var_name": "L...
{ "body": "void releaseChannel(Channel channel, String serverAddress) {\n if (channel == null || serverAddress == null) { return; }\n try {\n synchronized (channelLocks.get(serverAddress)) {\n Channel ch = channels.get(serverAddress);\n if (ch == null) {\n ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_50
{ "fields": [ { "declarator": "IO_EXCEPTION_SHORT_NAME = \"IOException\"", "modifier": "private static final", "original_string": "private static final String IO_EXCEPTION_SHORT_NAME = \"IOException\";", "type": "String", "var_name": "IO_EXCEPTION_SHORT_NAME" }, { "decl...
{ "body": "@Test\n public void testRollBackOn() {\n TransactionInfo txInfo = new TransactionInfo();\n\n //default true\n assertThat(txInfo.rollbackOn(new IllegalArgumentException())).isTrue();\n assertThat(txInfo.rollbackOn(new Exception())).isTrue();\n assertThat(txInfo.rollback...
{ "fields": [ { "declarator": "timeOut", "modifier": "private", "original_string": "private int timeOut;", "type": "int", "var_name": "timeOut" }, { "declarator": "name", "modifier": "private", "original_string": "private String name;", "type": "String...
{ "body": "public boolean rollbackOn(Throwable ex) {\n\n RollbackRule winner = null;\n int deepest = Integer.MAX_VALUE;\n\n if (CollectionUtils.isNotEmpty(rollbackRules)) {\n winner = NoRollbackRule.DEFAULT_NO_ROLLBACK_RULE;\n for (RollbackRule rule : this.rollbackRules) {\n...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_110
{ "fields": [], "file": "common/src/test/java/io/seata/common/util/CollectionUtilsTest.java", "identifier": "CollectionUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCollectionToString() {\n List<String> emptyCollection = new ArrayList<>();\n List<String> filledCollection = new ArrayList<>();\n\n filledCollection.add(\"Foo\");\n filledCollection.add(\"Bar\");\n\n Assertions.assertEquals(\"\", CollectionUtils...
{ "fields": [ { "declarator": "KV_SPLIT = \"=\"", "modifier": "private static final", "original_string": "private static final String KV_SPLIT = \"=\";", "type": "String", "var_name": "KV_SPLIT" }, { "declarator": "PAIR_SPLIT = \"&\"", "modifier": "private static ...
{ "body": "public static String toString(Collection<?> col) {\n if (isEmpty(col)) {\n return \"\";\n }\n StringBuilder sb = new StringBuilder();\n sb.append(\"[\");\n for (Object obj : col) {\n sb.append(StringUtils.toString(obj));\n sb.append(\",\")...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_46
{ "fields": [], "file": "tm/src/test/java/io/seata/tm/api/transaction/TransactionHookManagerTest.java", "identifier": "TransactionHookManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRegisterHook() {\n TransactionHookAdapter transactionHookAdapter = new TransactionHookAdapter();\n TransactionHookManager.registerHook(transactionHookAdapter);\n List<TransactionHook> hooks = TransactionHookManager.getHooks();\n assertThat(hooks).isNot...
{ "fields": [ { "declarator": "LOCAL_HOOKS = new ThreadLocal<>()", "modifier": "private static final", "original_string": "private static final ThreadLocal<List<TransactionHook>> LOCAL_HOOKS = new ThreadLocal<>();", "type": "ThreadLocal<List<TransactionHook>>", "var_name": "LOCAL_HOO...
{ "body": "public static void registerHook(TransactionHook transactionHook) {\n if (transactionHook == null) {\n throw new NullPointerException(\"transactionHook must not be null\");\n }\n List<TransactionHook> transactionHooks = LOCAL_HOOKS.get();\n if (transactionHooks == null...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_106
{ "fields": [], "file": "common/src/test/java/io/seata/common/util/CollectionUtilsTest.java", "identifier": "CollectionUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void decodeMap() {\n Assertions.assertNull(CollectionUtils.decodeMap(null));\n\n Map<String, String> map = CollectionUtils.decodeMap(\"\");\n Assertions.assertEquals(0, map.size());\n\n map = CollectionUtils.decodeMap(\"&\");\n Assertions.assertEquals(0,...
{ "fields": [ { "declarator": "KV_SPLIT = \"=\"", "modifier": "private static final", "original_string": "private static final String KV_SPLIT = \"=\";", "type": "String", "var_name": "KV_SPLIT" }, { "declarator": "PAIR_SPLIT = \"&\"", "modifier": "private static ...
{ "body": "public static Map<String, String> decodeMap(String data) {\n if (data == null) {\n return null;\n }\n Map<String, String> map = new HashMap<>();\n if (StringUtils.isBlank(data)) {\n return map;\n }\n String[] kvPairs = data.split(PAIR_SPLIT);\...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_11
{ "fields": [], "file": "compressor/seata-compressor-lz4/src/test/java/io/seata/compressor/lz4/Lz4UtilTest.java", "identifier": "Lz4UtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCompress() {\n Assertions.assertThrows(NullPointerException.class, () -> {\n Lz4Util.compress(null);\n });\n }", "class_method_signature": "Lz4UtilTest.testCompress()", "constructor": false, "full_signature": "@Test public void testCompress()", ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Lz4Util.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Lz4Util.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarato...
{ "body": "public static byte[] compress(byte[] bytes) {\n if (bytes == null) {\n throw new NullPointerException(\"bytes is null\");\n }\n LZ4Compressor compressor = LZ4Factory.fastestInstance().fastCompressor();\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream()...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_151
{ "fields": [], "file": "core/src/test/java/io/seata/core/protocol/RegisterRMRequestTest.java", "identifier": "RegisterRMRequestTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getTypeCode() {\n RegisterRMRequest registerRMRequest = new RegisterRMRequest();\n assertThat(MessageType.TYPE_REG_RM).isEqualTo(registerRMRequest.getTypeCode());\n }", "class_method_signature": "RegisterRMRequestTest.getTypeCode()", "constructor": false, "full...
{ "fields": [ { "declarator": "resourceIds", "modifier": "private", "original_string": "private String resourceIds;", "type": "String", "var_name": "resourceIds" } ], "file": "core/src/main/java/io/seata/core/protocol/RegisterRMRequest.java", "identifier": "RegisterRMReques...
{ "body": "@Override\n public short getTypeCode() {\n return MessageType.TYPE_REG_RM;\n }", "class_method_signature": "RegisterRMRequest.getTypeCode()", "constructor": false, "full_signature": "@Override public short getTypeCode()", "identifier": "getTypeCode", "invocations": [], "modifiers":...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_85
{ "fields": [ { "declarator": "ipv4 = new InetSocketAddress(Inet4Address.getLocalHost().getHostName(), 3902)", "modifier": "private", "original_string": "private InetSocketAddress ipv4 = new InetSocketAddress(Inet4Address.getLocalHost().getHostName(), 3902);", "type": "InetSocketAddress", ...
{ "body": "@Test\n public void testToInetSocketAddress1() {\n assertThat(NetUtil.toInetSocketAddress(\"kadfskl\").getHostName()).isEqualTo(\"kadfskl\");\n }", "class_method_signature": "NetUtilTest.testToInetSocketAddress1()", "constructor": false, "full_signature": "@Test public void testToInetSoc...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(NetUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NetUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarato...
{ "body": "public static InetSocketAddress toInetSocketAddress(String address) {\n int i = address.indexOf(':');\n String host;\n int port;\n if (i > -1) {\n host = address.substring(0, i);\n port = Integer.parseInt(address.substring(i + 1));\n } else {\n ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_203
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/undo/AbstractUndoExecutorTest.java", "identifier": "AbstractUndoExecutorTest", "interfaces": "", "superclass": "extends BaseH2Test" }
{ "body": "@Test\n public void dataValidationInsert() throws SQLException {\n TableRecords beforeImage = execQuery(tableMeta, \"SELECT * FROM table_name WHERE id IN (12345, 12346);\");\n\n execSQL(\"INSERT INTO table_name(id, name) VALUES (12345,'aaa');\");\n execSQL(\"INSERT INTO table_name(i...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AbstractUndoExecutor.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AbstractUndoExecutor.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "protected boolean dataValidationAndGoOn(Connection conn) throws SQLException {\n\n TableRecords beforeRecords = sqlUndoLog.getBeforeImage();\n TableRecords afterRecords = sqlUndoLog.getAfterImage();\n\n // Compare current data with before data\n // No need undo if the before dat...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_192
{ "fields": [ { "declarator": "COLUMN_ID=\"id\"", "modifier": "private final", "original_string": "private final String COLUMN_ID=\"id\";", "type": "String", "var_name": "COLUMN_ID" }, { "declarator": "COLUMN_USERCODE=\"userCode\"", "modifier": "private final", ...
{ "body": "@Test\n public void testGetAutoIncreaseColumn() {\n TableMeta tableMeta = new TableMeta();\n ColumnMeta id = new ColumnMeta();\n id.setIsAutoincrement(\"YES\");\n tableMeta.getAllColumns().put(\"id\", id);\n Assertions.assertNotNull(tableMeta.getAutoIncreaseColumn());\...
{ "fields": [ { "declarator": "tableName", "modifier": "private", "original_string": "private String tableName;", "type": "String", "var_name": "tableName" }, { "declarator": "allColumns = new LinkedHashMap<String, ColumnMeta>()", "modifier": "private", "ori...
{ "body": "public ColumnMeta getAutoIncreaseColumn() {\n // TODO: how about auto increment but not pk?\n for (Entry<String, ColumnMeta> entry : allColumns.entrySet()) {\n ColumnMeta col = entry.getValue();\n if (\"YES\".equalsIgnoreCase(col.getIsAutoincrement())) {\n ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_184
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/exec/BaseTransactionalExecutorTest.java", "identifier": "BaseTransactionalExecutorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBuildLockKey() {\n //build expect data\n String tableName = \"test_name\";\n String fieldOne = \"1\";\n String fieldTwo = \"2\";\n String split1 = \":\";\n String split2 = \",\";\n String pkColumnName=\"id\";\n //test_name:1...
{ "fields": [ { "declarator": "statementProxy", "modifier": "protected", "original_string": "protected StatementProxy<S> statementProxy;", "type": "StatementProxy<S>", "var_name": "statementProxy" }, { "declarator": "statementCallback", "modifier": "protected", ...
{ "body": "protected String buildLockKey(TableRecords rowsIncludingPK) {\n if (rowsIncludingPK.size() == 0) {\n return null;\n }\n\n StringBuilder sb = new StringBuilder();\n sb.append(rowsIncludingPK.getTableMeta().getTableName());\n sb.append(\":\");\n int filedS...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_93
{ "fields": [], "file": "common/src/test/java/io/seata/common/util/BlobUtilsTest.java", "identifier": "BlobUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void bytes2Blob() throws UnsupportedEncodingException, SQLException {\n assertNull(BlobUtils.bytes2Blob(null));\n byte[] bs = \"xxaaadd\".getBytes(Constants.DEFAULT_CHARSET_NAME);\n assertThat(BlobUtils.bytes2Blob(bs)).isEqualTo(\n new SerialBlob(bs));\n }"...
{ "fields": [], "file": "common/src/main/java/io/seata/common/util/BlobUtils.java", "identifier": "BlobUtils", "interfaces": "", "methods": [ { "class_method_signature": "BlobUtils.BlobUtils()", "constructor": true, "full_signature": "private BlobUtils()", "identifier": "BlobUtils...
{ "body": "public static Blob bytes2Blob(byte[] bytes) {\n if (bytes == null) {\n return null;\n }\n\n try {\n return new SerialBlob(bytes);\n } catch (Exception e) {\n throw new ShouldNeverHappenException(e);\n }\n }", "class_method_signature":...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_215
{ "fields": [ { "declarator": "returnValueColumnLabels = Lists.newArrayList(\"log_status\")", "modifier": "", "original_string": "List<String> returnValueColumnLabels = Lists.newArrayList(\"log_status\");", "type": "List<String>", "var_name": "returnValueColumnLabels" }, { ...
{ "body": "@Test\n public void testDeleteUndoLogByLogCreated() throws SQLException {\n Assertions.assertEquals(0, undoLogManager.deleteUndoLogByLogCreated(new Date(), 3000, dataSource.getConnection()));\n Assertions.assertDoesNotThrow(() -> undoLogManager.deleteUndoLogByLogCreated(new Date(), 3000, c...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(MySQLUndoLogManager.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MySQLUndoLogManager.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@Override\n public int deleteUndoLogByLogCreated(Date logCreated, int limitRows, Connection conn) throws SQLException {\n try (PreparedStatement deletePST = conn.prepareStatement(DELETE_UNDO_LOG_BY_CREATE_SQL)) {\n deletePST.setDate(1, new java.sql.Date(logCreated.getTime()));\n ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_214
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/undo/KeywordCheckerFactoryTest.java", "identifier": "KeywordCheckerFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testKeywordCheckerFacotry() {\n KeywordCheckerFactory keywordCheckerFactory = new KeywordCheckerFactory();\n Assertions.assertNotNull(keywordCheckerFactory);\n\n Assertions.assertThrows(EnhancedServiceNotFoundException.class, () -> KeywordCheckerFactory.getKeywor...
{ "fields": [ { "declarator": "KEYWORD_CHECKER_MAP = new ConcurrentHashMap<>()", "modifier": "private static final", "original_string": "private static final Map<String, KeywordChecker> KEYWORD_CHECKER_MAP = new ConcurrentHashMap<>();", "type": "Map<String, KeywordChecker>", "var_nam...
{ "body": "public static KeywordChecker getKeywordChecker(String dbType) {\n if (KEYWORD_CHECKER_MAP.get(dbType) != null) {\n return KEYWORD_CHECKER_MAP.get(dbType);\n }\n KeywordChecker tableMetaCache = EnhancedServiceLoader.load(KeywordChecker.class, dbType);\n KEYWORD_CHECKER...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_92
{ "fields": [], "file": "common/src/test/java/io/seata/common/util/BlobUtilsTest.java", "identifier": "BlobUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBlob2string() throws SQLException {\n assertNull(BlobUtils.blob2string(null));\n assertThat(BlobUtils.blob2string(new SerialBlob(\"123absent\".getBytes(Constants.DEFAULT_CHARSET)))).isEqualTo(\n \"123absent\");\n }", "class_method_signature": "BlobUt...
{ "fields": [], "file": "common/src/main/java/io/seata/common/util/BlobUtils.java", "identifier": "BlobUtils", "interfaces": "", "methods": [ { "class_method_signature": "BlobUtils.BlobUtils()", "constructor": true, "full_signature": "private BlobUtils()", "identifier": "BlobUtils...
{ "body": "public static String blob2string(Blob blob) {\n if (blob == null) {\n return null;\n }\n\n try {\n return new String(blob.getBytes((long) 1, (int) blob.length()), Constants.DEFAULT_CHARSET);\n } catch (Exception e) {\n throw new ShouldNeverHappen...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_185
{ "fields": [ { "declarator": "plainExecutor", "modifier": "private", "original_string": "private PlainExecutor plainExecutor;", "type": "PlainExecutor", "var_name": "plainExecutor" } ], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/exec/PlainExecutorTest.java",...
{ "body": "@Test\n public void testExecute() throws Throwable {\n plainExecutor.execute((Object) null);\n }", "class_method_signature": "PlainExecutorTest.testExecute()", "constructor": false, "full_signature": "@Test public void testExecute()", "identifier": "testExecute", "invocations": [ ...
{ "fields": [ { "declarator": "statementProxy", "modifier": "private", "original_string": "private StatementProxy<S> statementProxy;", "type": "StatementProxy<S>", "var_name": "statementProxy" }, { "declarator": "statementCallback", "modifier": "private", "o...
{ "body": "@Override\n public T execute(Object... args) throws Throwable {\n return statementCallback.execute(statementProxy.getTargetStatement(), args);\n }", "class_method_signature": "PlainExecutor.execute(Object... args)", "constructor": false, "full_signature": "@Override public T execute(Obje...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_193
{ "fields": [ { "declarator": "COLUMN_ID=\"id\"", "modifier": "private final", "original_string": "private final String COLUMN_ID=\"id\";", "type": "String", "var_name": "COLUMN_ID" }, { "declarator": "COLUMN_USERCODE=\"userCode\"", "modifier": "private final", ...
{ "body": "@Test\n public void testGetPrimaryKeyMap() {\n TableMeta tableMeta = new TableMeta();\n\n IndexMeta primary = new IndexMeta();\n primary.setIndextype(IndexType.PRIMARY);\n primary.setValues(Lists.newArrayList(new ColumnMeta()));\n\n tableMeta.getAllIndexes().put(\"id\"...
{ "fields": [ { "declarator": "tableName", "modifier": "private", "original_string": "private String tableName;", "type": "String", "var_name": "tableName" }, { "declarator": "allColumns = new LinkedHashMap<String, ColumnMeta>()", "modifier": "private", "ori...
{ "body": "public Map<String, ColumnMeta> getPrimaryKeyMap() {\n Map<String, ColumnMeta> pk = new HashMap<String, ColumnMeta>();\n for (Entry<String, IndexMeta> entry : allIndexes.entrySet()) {\n IndexMeta index = entry.getValue();\n if (index.getIndextype().value() == IndexType.PR...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_202
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/undo/AbstractUndoExecutorTest.java", "identifier": "AbstractUndoExecutorTest", "interfaces": "", "superclass": "extends BaseH2Test" }
{ "body": "@Test\n public void dataValidationUpdate() throws SQLException {\n execSQL(\"INSERT INTO table_name(id, name) VALUES (12345,'aaa');\");\n execSQL(\"INSERT INTO table_name(id, name) VALUES (12346,'aaa');\");\n\n TableRecords beforeImage = execQuery(tableMeta, \"SELECT * FROM table_na...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(AbstractUndoExecutor.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AbstractUndoExecutor.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "protected boolean dataValidationAndGoOn(Connection conn) throws SQLException {\n\n TableRecords beforeRecords = sqlUndoLog.getBeforeImage();\n TableRecords afterRecords = sqlUndoLog.getAfterImage();\n\n // Compare current data with before data\n // No need undo if the before dat...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_84
{ "fields": [ { "declarator": "ipv4 = new InetSocketAddress(Inet4Address.getLocalHost().getHostName(), 3902)", "modifier": "private", "original_string": "private InetSocketAddress ipv4 = new InetSocketAddress(Inet4Address.getLocalHost().getHostName(), 3902);", "type": "InetSocketAddress", ...
{ "body": "@Test\n public void testToInetSocketAddress() {\n try {\n NetUtil.toInetSocketAddress(\"23939:ks\");\n } catch (Exception e) {\n assertThat(e).isInstanceOf(NumberFormatException.class);\n }\n }", "class_method_signature": "NetUtilTest.testToInetSocketAddre...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(NetUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NetUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarato...
{ "body": "public static InetSocketAddress toInetSocketAddress(String address) {\n int i = address.indexOf(':');\n String host;\n int port;\n if (i > -1) {\n host = address.substring(0, i);\n port = Integer.parseInt(address.substring(i + 1));\n } else {\n ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_10
{ "fields": [], "file": "compressor/seata-compressor-gzip/src/test/java/io/seata/compressor/gzip/GzipUtilTest.java", "identifier": "GzipUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test_decompress() {\n\n Assertions.assertThrows(NullPointerException.class, () -> {\n GzipUtil.decompress(null);\n });\n\n Assertions.assertThrows(RuntimeException.class, () -> {\n GzipUtil.decompress(new byte[0]);\n });\n\n As...
{ "fields": [ { "declarator": "BUFFER_SIZE = 8192", "modifier": "private static final", "original_string": "private static final int BUFFER_SIZE = 8192;", "type": "int", "var_name": "BUFFER_SIZE" } ], "file": "compressor/seata-compressor-gzip/src/main/java/io/seata/compressor...
{ "body": "public static byte[] decompress(byte[] bytes) {\n if (bytes == null) {\n throw new NullPointerException(\"bytes is null\");\n }\n\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n try (GZIPInputStream gunzip = new GZIPInputStream(new ByteArrayInputStream(by...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_150
{ "fields": [ { "declarator": "XID = \"test_xid\"", "modifier": "private final", "original_string": "private final String XID = \"test_xid\";", "type": "String", "var_name": "XID" }, { "declarator": "EXTRA_DATA = \"test_extra_data\"", "modifier": "private final", ...
{ "body": "@Test\n public void testGetTypeCode() {\n GlobalBeginResponse globalBeginResponse = new GlobalBeginResponse();\n Assertions.assertEquals(MessageType.TYPE_GLOBAL_BEGIN_RESULT, globalBeginResponse.getTypeCode());\n }", "class_method_signature": "GlobalBeginResponseTest.testGetTypeCode()...
{ "fields": [ { "declarator": "xid", "modifier": "private", "original_string": "private String xid;", "type": "String", "var_name": "xid" }, { "declarator": "extraData", "modifier": "private", "original_string": "private String extraData;", "type": "St...
{ "body": "@Override\n public short getTypeCode() {\n return MessageType.TYPE_GLOBAL_BEGIN_RESULT;\n }", "class_method_signature": "GlobalBeginResponse.getTypeCode()", "constructor": false, "full_signature": "@Override public short getTypeCode()", "identifier": "getTypeCode", "invocations": [],...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_47
{ "fields": [], "file": "tm/src/test/java/io/seata/tm/api/transaction/TransactionHookManagerTest.java", "identifier": "TransactionHookManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetHooks() {\n assertThat(TransactionHookManager.getHooks()).isEmpty();\n TransactionHookManager.registerHook(new TransactionHookAdapter());\n assertThat(TransactionHookManager.getHooks()).isNotEmpty();\n }", "class_method_signature": "TransactionHookMan...
{ "fields": [ { "declarator": "LOCAL_HOOKS = new ThreadLocal<>()", "modifier": "private static final", "original_string": "private static final ThreadLocal<List<TransactionHook>> LOCAL_HOOKS = new ThreadLocal<>();", "type": "ThreadLocal<List<TransactionHook>>", "var_name": "LOCAL_HOO...
{ "body": "public static List<TransactionHook> getHooks() throws IllegalStateException {\n List<TransactionHook> hooks = LOCAL_HOOKS.get();\n\n if (hooks == null || hooks.isEmpty()) {\n return Collections.emptyList();\n }\n return Collections.unmodifiableList(hooks);\n }", ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_107
{ "fields": [], "file": "common/src/test/java/io/seata/common/util/CollectionUtilsTest.java", "identifier": "CollectionUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToUpperList() {\n List<String> sourceList = null;\n Assertions.assertNull(CollectionUtils.toUpperList(sourceList));\n sourceList = new ArrayList<>();\n Assertions.assertEquals(Collections.EMPTY_LIST, CollectionUtils.toUpperList(sourceList));\n L...
{ "fields": [ { "declarator": "KV_SPLIT = \"=\"", "modifier": "private static final", "original_string": "private static final String KV_SPLIT = \"=\";", "type": "String", "var_name": "KV_SPLIT" }, { "declarator": "PAIR_SPLIT = \"&\"", "modifier": "private static ...
{ "body": "public static List<String> toUpperList(List<String> sourceList) {\n if (isEmpty(sourceList)) { return sourceList; }\n List<String> destList = new ArrayList<>(sourceList.size());\n for (String element : sourceList) {\n if (element != null) {\n destList.add(elem...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_51
{ "fields": [], "file": "tm/src/test/java/io/seata/tm/api/transaction/RollbackRuleTest.java", "identifier": "RollbackRuleTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void foundImmediatelyWithString() {\n RollbackRule rr = new RollbackRule(Exception.class.getName());\n assertThat(rr.getDepth(new Exception())).isEqualTo(0);\n }", "class_method_signature": "RollbackRuleTest.foundImmediatelyWithString()", "constructor": false, "full...
{ "fields": [ { "declarator": "exceptionName", "modifier": "private final", "original_string": "private final String exceptionName;", "type": "String", "var_name": "exceptionName" } ], "file": "tm/src/main/java/io/seata/tm/api/transaction/RollbackRule.java", "identifier": "...
{ "body": "public int getDepth(Throwable ex) {\n return getDepth(ex.getClass(), 0);\n }", "class_method_signature": "RollbackRule.getDepth(Throwable ex)", "constructor": false, "full_signature": "public int getDepth(Throwable ex)", "identifier": "getDepth", "invocations": [ "getDepth", "ge...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_111
{ "fields": [], "file": "common/src/test/java/io/seata/common/util/DurationUtilTest.java", "identifier": "DurationUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParse() {\n Assertions.assertNull(DurationUtil.parse(\"d\"));\n Assertions.assertNull(DurationUtil.parse(\"h\"));\n Assertions.assertNull(DurationUtil.parse(\"m\"));\n Assertions.assertNull(DurationUtil.parse(\"s\"));\n Assertions.assertNull(Dur...
{ "fields": [ { "declarator": "DEFAULT_DURATION = Duration.ofMillis(-1)", "modifier": "public static final", "original_string": "public static final Duration DEFAULT_DURATION = Duration.ofMillis(-1);", "type": "Duration", "var_name": "DEFAULT_DURATION" }, { "declarator"...
{ "body": "public static Duration parse(String str) {\n if (StringUtils.isBlank(str)) {\n return DEFAULT_DURATION;\n }\n\n if (str.contains(MILLIS_SECOND_UNIT)) {\n Long value = doParse(MILLIS_SECOND_UNIT, str);\n return value == null ? null : Duration.ofMillis(va...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_146
{ "fields": [ { "declarator": "channelManager", "modifier": "private", "original_string": "private NettyClientChannelManager channelManager;", "type": "NettyClientChannelManager", "var_name": "channelManager" }, { "declarator": "poolableFactory", "modifier": "@Moc...
{ "body": "@Test\n void assertAcquireChannelFromPool() {\n setupPoolFactory(nettyPoolKey, channel);\n Channel actual = channelManager.acquireChannel(\"localhost\");\n verify(poolableFactory).makeObject(nettyPoolKey);\n Assertions.assertEquals(actual, channel);\n }", "class_method_s...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(NettyClientChannelManager.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NettyClientChannelManager.class);", "type": "Logger", "var_name": "L...
{ "body": "Channel acquireChannel(String serverAddress) {\n Channel channelToServer = channels.get(serverAddress);\n if (channelToServer != null) {\n channelToServer = getExistAliveChannel(channelToServer, serverAddress);\n if (channelToServer != null) {\n return cha...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_131
{ "fields": [], "file": "common/src/test/java/io/seata/common/XIDTest.java", "identifier": "XIDTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetPort() {\n XID.setPort(8080);\n assertThat(XID.getPort()).isEqualTo(8080);\n }", "class_method_signature": "XIDTest.testSetPort()", "constructor": false, "full_signature": "@Test public void testSetPort()", "identifier": "testSetPort", "invocations":...
{ "fields": [ { "declarator": "port", "modifier": "private static", "original_string": "private static int port;", "type": "int", "var_name": "port" }, { "declarator": "ipAddress", "modifier": "private static", "original_string": "private static String ipAdd...
{ "body": "public static void setPort(int port) {\n XID.port = port;\n }", "class_method_signature": "XID.setPort(int port)", "constructor": false, "full_signature": "public static void setPort(int port)", "identifier": "setPort", "invocations": [], "modifiers": "public static", "parameters": ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_71
{ "fields": [], "file": "common/src/test/java/io/seata/common/util/StringUtilsTest.java", "identifier": "StringUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n void testCycleDependency() {\n CycleDependency A = CycleDependency.A;\n try {\n StringUtils.toString(A);\n } catch (StackOverflowError e) {\n Assertions.fail(\"stack overflow error\");\n }\n }", "class_method_signature": "StringUtilsTest.tes...
{ "fields": [ { "declarator": "EMPTY = \"\"", "modifier": "public static final", "original_string": "public static final String EMPTY = \"\";", "type": "String", "var_name": "EMPTY" } ], "file": "common/src/main/java/io/seata/common/util/StringUtils.java", "identifier": "St...
{ "body": "public static String toString(Object obj) {\n if (obj == null) {\n return \"null\";\n }\n if (obj.getClass().isPrimitive()) {\n return String.valueOf(obj);\n }\n if (obj instanceof String) {\n return (String)obj;\n }\n if (ob...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_218
{ "fields": [ { "declarator": "executor", "modifier": "private static", "original_string": "private static MySQLUndoInsertExecutor executor;", "type": "MySQLUndoInsertExecutor", "var_name": "executor" } ], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/undo/mysql...
{ "body": "@Test\n public void getUndoRows() {\n Assertions.assertEquals(executor.getUndoRows(), executor.getSqlUndoLog().getAfterImage());\n }", "class_method_signature": "MySQLUndoInsertExecutorTest.getUndoRows()", "constructor": false, "full_signature": "@Test public void getUndoRows()", "iden...
{ "fields": [ { "declarator": "DELETE_SQL_TEMPLATE = \"DELETE FROM %s WHERE %s \"", "modifier": "private static final", "original_string": "private static final String DELETE_SQL_TEMPLATE = \"DELETE FROM %s WHERE %s \";", "type": "String", "var_name": "DELETE_SQL_TEMPLATE" } ],...
{ "body": "@Override\n protected TableRecords getUndoRows() {\n return sqlUndoLog.getAfterImage();\n }", "class_method_signature": "MySQLUndoInsertExecutor.getUndoRows()", "constructor": false, "full_signature": "@Override protected TableRecords getUndoRows()", "identifier": "getUndoRows", "inv...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_166
{ "fields": [ { "declarator": "returnValueColumnLabels = Lists.newArrayList(\"id\", \"name\")", "modifier": "private static", "original_string": "private static List<String> returnValueColumnLabels = Lists.newArrayList(\"id\", \"name\");", "type": "List<String>", "var_name": "returnV...
{ "body": "@Test\n public void testPreparedStatementProxy() {\n Assertions.assertNotNull(preparedStatementProxy);\n Assertions.assertNotNull(unusedConstructorPreparedStatementProxy);\n }", "class_method_signature": "PreparedStatementProxyTest.testPreparedStatementProxy()", "constructor": false...
{ "fields": [], "file": "rm-datasource/src/main/java/io/seata/rm/datasource/PreparedStatementProxy.java", "identifier": "PreparedStatementProxy", "interfaces": "implements PreparedStatement, ParametersHolder", "methods": [ { "class_method_signature": "PreparedStatementProxy.getParameters()", "...
{ "body": "public PreparedStatementProxy(AbstractConnectionProxy connectionProxy, PreparedStatement targetStatement,\n String targetSQL) throws SQLException {\n super(connectionProxy, targetStatement, targetSQL);\n }", "class_method_signature": "PreparedStatementProxy.Prep...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_189
{ "fields": [], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/sql/SQLVisitorFactoryTest.java", "identifier": "SQLVisitorFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSqlRecognizing() {\n\n //test for ast was null\n Assertions.assertThrows(UnsupportedOperationException.class, () -> SQLVisitorFactory.get(\"\", JdbcConstants.MYSQL));\n\n //test for mysql insert\n String sql = \"insert into t(id) values (1)\";\n ...
{ "fields": [ { "declarator": "SQL_RECOGNIZER_FACTORY", "modifier": "private final static", "original_string": "private final static SQLRecognizerFactory SQL_RECOGNIZER_FACTORY;", "type": "SQLRecognizerFactory", "var_name": "SQL_RECOGNIZER_FACTORY" } ], "file": "rm-datasource...
{ "body": "public static List<SQLRecognizer> get(String sql, String dbType) {\n return SQL_RECOGNIZER_FACTORY.create(sql, dbType);\n }", "class_method_signature": "SQLVisitorFactory.get(String sql, String dbType)", "constructor": false, "full_signature": "public static List<SQLRecognizer> get(String s...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_26
{ "fields": [], "file": "serializer/seata-serializer-protobuf/src/test/java/io/seata/serializer/protobuf/convertor/RegisterRMRequestConvertorTest.java", "identifier": "RegisterRMRequestConvertorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void convert2Proto() {\n RegisterRMRequest registerRMRequest = new RegisterRMRequest();\n registerRMRequest.setResourceIds(\"res1\");\n registerRMRequest.setVersion(\"123\");\n registerRMRequest.setTransactionServiceGroup(\"group\");\n registerRMRequest....
{ "fields": [], "file": "serializer/seata-serializer-protobuf/src/main/java/io/seata/serializer/protobuf/convertor/RegisterRMRequestConvertor.java", "identifier": "RegisterRMRequestConvertor", "interfaces": "implements PbConvertor<RegisterRMRequest, RegisterRMRequestProto>", "methods": [ { "class_me...
{ "body": "@Override\n public RegisterRMRequestProto convert2Proto(RegisterRMRequest registerRMRequest) {\n final short typeCode = registerRMRequest.getTypeCode();\n\n final AbstractMessageProto abstractMessage = AbstractMessageProto.newBuilder().setMessageType(\n MessageTypeProto.forNumbe...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_170
{ "fields": [ { "declarator": "returnValueColumnLabels = Lists.newArrayList(\"id\", \"name\")", "modifier": "private static", "original_string": "private static List<String> returnValueColumnLabels = Lists.newArrayList(\"id\", \"name\");", "type": "List<String>", "var_name": "returnV...
{ "body": "@Test\n public void testSetParam() throws SQLException, MalformedURLException {\n preparedStatementProxy.clearParameters();\n preparedStatementProxy.setNull(1, JDBCType.DECIMAL.getVendorTypeNumber());\n Assertions.assertEquals(Null.get(), preparedStatementProxy.getParamsByIndex(1).g...
{ "fields": [], "file": "rm-datasource/src/main/java/io/seata/rm/datasource/PreparedStatementProxy.java", "identifier": "PreparedStatementProxy", "interfaces": "implements PreparedStatement, ParametersHolder", "methods": [ { "class_method_signature": "PreparedStatementProxy.getParameters()", "...
{ "body": "@Override\n public Map<Integer,ArrayList<Object>> getParameters() {\n return parameters;\n }", "class_method_signature": "PreparedStatementProxy.getParameters()", "constructor": false, "full_signature": "@Override public Map<Integer,ArrayList<Object>> getParameters()", "identifier": "g...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_30
{ "fields": [], "file": "serializer/seata-serializer-protobuf/src/test/java/io/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertorTest.java", "identifier": "BranchRegisterResponseConvertorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void convert2Proto() {\n\n BranchRegisterResponse branchRegisterResponse = new BranchRegisterResponse();\n branchRegisterResponse.setTransactionExceptionCode(TransactionExceptionCode.GlobalTransactionNotActive);\n branchRegisterResponse.setResultCode(ResultCode.Failed...
{ "fields": [], "file": "serializer/seata-serializer-protobuf/src/main/java/io/seata/serializer/protobuf/convertor/BranchRegisterResponseConvertor.java", "identifier": "BranchRegisterResponseConvertor", "interfaces": "implements PbConvertor<BranchRegisterResponse, BranchRegisterResponseProto>", "methods": [ ...
{ "body": "@Override\n public BranchRegisterResponseProto convert2Proto(BranchRegisterResponse branchRegisterResponse) {\n final short typeCode = branchRegisterResponse.getTypeCode();\n\n final AbstractMessageProto abstractMessage = AbstractMessageProto.newBuilder().setMessageType(\n Messa...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_88
{ "fields": [ { "declarator": "ipv4 = new InetSocketAddress(Inet4Address.getLocalHost().getHostName(), 3902)", "modifier": "private", "original_string": "private InetSocketAddress ipv4 = new InetSocketAddress(Inet4Address.getLocalHost().getHostName(), 3902);", "type": "InetSocketAddress", ...
{ "body": "@Test\n public void testGetLocalIp() {\n assertThat(NetUtil.getLocalIp()).isNotNull();\n }", "class_method_signature": "NetUtilTest.testGetLocalIp()", "constructor": false, "full_signature": "@Test public void testGetLocalIp()", "identifier": "testGetLocalIp", "invocations": [ "i...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(NetUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NetUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarato...
{ "body": "public static String getLocalIp() {\n InetAddress address = getLocalAddress();\n return address == null ? LOCALHOST : address.getHostAddress();\n }", "class_method_signature": "NetUtil.getLocalIp()", "constructor": false, "full_signature": "public static String getLocalIp()", "iden...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_127
{ "fields": [], "file": "common/src/test/java/io/seata/common/thread/PositiveAtomicCounterTest.java", "identifier": "PositiveAtomicCounterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIncrementAndGet() {\n PositiveAtomicCounter counter = new PositiveAtomicCounter();\n assertThat(counter.incrementAndGet()).isEqualTo(1);\n }", "class_method_signature": "PositiveAtomicCounterTest.testIncrementAndGet()", "constructor": false, "full_signature...
{ "fields": [ { "declarator": "MASK = 0x7FFFFFFF", "modifier": "private static final", "original_string": "private static final int MASK = 0x7FFFFFFF;", "type": "int", "var_name": "MASK" }, { "declarator": "atom", "modifier": "private final", "original_strin...
{ "body": "public final int incrementAndGet() {\n return atom.incrementAndGet() & MASK;\n }", "class_method_signature": "PositiveAtomicCounter.incrementAndGet()", "constructor": false, "full_signature": "public final int incrementAndGet()", "identifier": "incrementAndGet", "invocations": [ "in...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_67
{ "fields": [], "file": "common/src/test/java/io/seata/common/util/StringUtilsTest.java", "identifier": "StringUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInputStream2String() throws IOException {\n assertNull(StringUtils.inputStream2String(null));\n String data = \"abc\\n\"\n + \":\\\"klsdf\\n\"\n + \"2ks,x:\\\".,-3sd˚ø≤ø¬≥\";\n ByteArrayInputStream inputStream = new ByteArrayInpu...
{ "fields": [ { "declarator": "EMPTY = \"\"", "modifier": "public static final", "original_string": "public static final String EMPTY = \"\";", "type": "String", "var_name": "EMPTY" } ], "file": "common/src/main/java/io/seata/common/util/StringUtils.java", "identifier": "St...
{ "body": "public static String inputStream2String(InputStream is) {\n if (is == null) {\n return null;\n }\n try {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n int i;\n while ((i = is.read()) != -1) {\n baos.write(i);\n ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_6
{ "fields": [ { "declarator": "server = null", "modifier": "protected static", "original_string": "protected static TestingServer server = null;", "type": "TestingServer", "var_name": "server" }, { "declarator": "service = (ZookeeperRegisterServiceImpl) new ZookeeperReg...
{ "body": "@Test\n public void buildZkTest() {\n ZkClient client = service.buildZkClient(\"127.0.0.1:2181\", 5000, 5000);\n Assertions.assertTrue(client.exists(\"/zookeeper\"));\n }", "class_method_signature": "ZookeeperRegisterServiceImplTest.buildZkTest()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(ZookeeperRegisterServiceImpl.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(ZookeeperRegisterServiceImpl.class);", "type": "Logger", "var_nam...
{ "body": "ZkClient buildZkClient(String address, int sessionTimeout, int connectTimeout,String... authInfo) {\n ZkClient zkClient = new ZkClient(address, sessionTimeout, connectTimeout);\n if (authInfo != null && authInfo.length == 2) {\n if (!StringUtils.isBlank(authInfo[0]) && !StringUtils...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
163387337_222
{ "fields": [ { "declarator": "executor", "modifier": "private static", "original_string": "private static MySQLUndoUpdateExecutor executor;", "type": "MySQLUndoUpdateExecutor", "var_name": "executor" } ], "file": "rm-datasource/src/test/java/io/seata/rm/datasource/undo/mysql...
{ "body": "@Test\n public void buildUndoSQL() {\n String sql = executor.buildUndoSQL().toLowerCase();\n Assertions.assertNotNull(sql);\n Assertions.assertTrue(sql.contains(\"update\"));\n Assertions.assertTrue(sql.contains(\"id\"));\n Assertions.assertTrue(sql.contains(\"age\"));...
{ "fields": [ { "declarator": "UPDATE_SQL_TEMPLATE = \"UPDATE %s SET %s WHERE %s \"", "modifier": "private static final", "original_string": "private static final String UPDATE_SQL_TEMPLATE = \"UPDATE %s SET %s WHERE %s \";", "type": "String", "var_name": "UPDATE_SQL_TEMPLATE" } ...
{ "body": "@Override\n protected String buildUndoSQL() {\n TableRecords beforeImage = sqlUndoLog.getBeforeImage();\n List<Row> beforeImageRows = beforeImage.getRows();\n if (CollectionUtils.isEmpty(beforeImageRows)) {\n throw new ShouldNeverHappenException(\"Invalid UNDO LOG\"); // ...
{ "created": "12/28/2018 8:37:22 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 163387337, "size": null, "stargazer_count": null, "stars": 14069, "updates": "2020-01-27T16:13:33+00:00", "url": "https://github.com/seata/seata"...
32377028_133
{ "fields": [ { "declarator": "bufferingLogDataCollectorProxy", "modifier": "private", "original_string": "private BufferingLogDataCollectorProxy bufferingLogDataCollectorProxy;", "type": "BufferingLogDataCollectorProxy", "var_name": "bufferingLogDataCollectorProxy" }, { ...
{ "body": "@Test\n public void testStop() throws InterruptedException {\n LogData data = new LogData();\n AssertJUnit.assertEquals(0, delegate.getLogData().length);\n bufferingLogDataCollectorProxy.add(data);\n Thread.sleep(sleepTime * 2);\n\n AssertJUnit.assertEquals(1, delegate.getLogData().length);...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final LogDataCollector delegate;", "type": "LogDataCollector", "var_name": "delegate" }, { "declarator": "proxyLogDataCollector", "modifier": "private", "origi...
{ "body": "@Override\n public void stop() {\n stop = true;\n\n }", "class_method_signature": "BufferingLogDataCollectorProxy.stop()", "constructor": false, "full_signature": "@Override public void stop()", "identifier": "stop", "invocations": [], "modifiers": "@Override public", "parameters": "()",...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_75
{ "fields": [ { "declarator": "batchProcessingContext", "modifier": "private", "original_string": "private BatchProcessingContext batchProcessingContext;", "type": "BatchProcessingContext", "var_name": "batchProcessingContext" } ], "file": "OtrosLogViewer-app/src/test/java/pl...
{ "body": "@Test\n public void testContainsAttribute() {\n batchProcessingContext.setAttribute(\"A\", \"C\");\n\n AssertJUnit.assertTrue(batchProcessingContext.containsAttribute(\"A\"));\n AssertJUnit.assertFalse(batchProcessingContext.containsAttribute(\"B\"));\n }", "class_method_signature": "BatchProc...
{ "fields": [ { "declarator": "currentFile", "modifier": "private", "original_string": "private FileObject currentFile;", "type": "FileObject", "var_name": "currentFile" }, { "declarator": "allFiles", "modifier": "private", "original_string": "private List<F...
{ "body": "public boolean containsAttribute(String key) {\n return attributes.containsKey(key);\n }", "class_method_signature": "BatchProcessingContext.containsAttribute(String key)", "constructor": false, "full_signature": "public boolean containsAttribute(String key)", "identifier": "containsAttribute",...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_164
{ "fields": [ { "declarator": "p = new Properties()", "modifier": "private", "original_string": "private Properties p = new Properties();", "type": "Properties", "var_name": "p" }, { "declarator": "colorizer", "modifier": "private", "original_string": "priva...
{ "body": "@Test\n public void testGetDescription() {\n assertEquals(\"D\", colorizer.getDescription());\n }", "class_method_signature": "PropertyPatternMessageColorizerTest.testGetDescription()", "constructor": false, "full_signature": "@Test public void testGetDescription()", "identifier": "testGetDesc...
{ "fields": [ { "declarator": "PROP_TYPE = \"type\"", "modifier": "public static final", "original_string": "public static final String PROP_TYPE = \"type\";", "type": "String", "var_name": "PROP_TYPE" }, { "declarator": "PROP_VERSION = \"version\"", "modifier": "...
{ "body": "@Override\n public String getDescription() {\n return description;\n }", "class_method_signature": "PropertyPatternMessageColorizer.getDescription()", "constructor": false, "full_signature": "@Override public String getDescription()", "identifier": "getDescription", "invocations": [], "mod...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_22
{ "fields": [], "file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/filter/RegexFilterTest.java", "identifier": "RegexFilterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testMessageNull(){\n\t\tassertFalse(createFilter(\"A\", false).accept(new LogData(), 1));\n\t}", "class_method_signature": "RegexFilterTest.testMessageNull()", "constructor": false, "full_signature": "@Test public void testMessageNull()", "identifier": "testMessageNull", "inv...
{ "fields": [ { "declarator": "NAME = \"Regex filter\"", "modifier": "private static final", "original_string": "private static final String NAME = \"Regex filter\";", "type": "String", "var_name": "NAME" }, { "declarator": "DESCRIPTION = \"Filtering events based on a r...
{ "body": "@Override\n public boolean accept(LogData logData, int row) {\n if (patternOk && condition.length() > 0) {\n return pattern.matcher(logData.getMessage()).find();\n }\n return condition.length() == 0 || !patternOk;\n }", "class_method_signature": "RegexFilter.accept(LogData logData, int ro...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_172
{ "fields": [ { "declarator": "finder = new StackTraceFinder()", "modifier": "private final", "original_string": "private final StackTraceFinder finder = new StackTraceFinder();", "type": "StackTraceFinder", "var_name": "finder" } ], "file": "OtrosLogViewer-app/src/test/java/...
{ "body": "@Test\n public void testFindStackTraces() throws IOException {\n // given\n String stacktraceFile = IOUtils.toString(StackTraceColorizer.class.getClassLoader().getResourceAsStream(\"stacktrace/stacktrace.txt\"));\n\n // when\n SortedSet<SubText> findStackTraces = finder.findStackTraces(stacktr...
{ "fields": [ { "declarator": "exceptionLine = Pattern.compile(\"(\\\\s*at\\\\s+([\\\\w\\\\d\\\\.]*\\\\.)?([\\\\w\\\\d\\\\$]+)\\\\.([\\\\d\\\\w<>\\\\$]+)\\\\(([\\\\d\\\\w\\\\.\\\\u0020:]+)\\\\))\")", "modifier": "private static final", "original_string": "private static final Pattern exceptionLi...
{ "body": "public SortedSet<SubText> findStackTraces(String text) {\n SortedSet<SubText> set = new TreeSet<>();\n LinkedList<Integer> newLineIndexes = new LinkedList<>();\n newLineIndexes.add(0);\n int newLineIndex = -1;\n while ((newLineIndex = StringUtils.indexOf(text, '\\n', newLineIndex + 1)) > -1)...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_34
{ "fields": [ { "declarator": "d = null", "modifier": "private", "original_string": "private PluginableElementsContainer<PluginableElement> d = null;", "type": "PluginableElementsContainer<PluginableElement>", "var_name": "d" }, { "declarator": "s = null", "modifi...
{ "body": "@Test\n public void testElementChanged() {\n SoapMessageFormatter element = new SoapMessageFormatter();\n s.elementChanged(element);\n verify(d, only()).changeElement(element);\n }", "class_method_signature": "SynchronizePluginableContainerListenerTest.testElementChanged()", "constructor": f...
{ "fields": [ { "declarator": "destination", "modifier": "protected", "original_string": "protected PluginableElementsContainer<T> destination;", "type": "PluginableElementsContainer<T>", "var_name": "destination" } ], "file": "OtrosLogViewer-app/src/main/java/pl/otros/logvie...
{ "body": "@Override\n public void elementChanged(T element) {\n destination.changeElement(element);\n }", "class_method_signature": "SynchronizePluginableContainerListener.elementChanged(T element)", "constructor": false, "full_signature": "@Override public void elementChanged(T element)", "identifier":...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_125
{ "fields": [ { "declarator": "LOG_EVENT_COUNT = 1000", "modifier": "public static final", "original_string": "public static final int LOG_EVENT_COUNT = 1000;", "type": "int", "var_name": "LOG_EVENT_COUNT" }, { "declarator": "TEST_THREAD_POOL_NAME = \"TestThreadPoolName...
{ "body": "@Test\n public void testIsMarked() throws Exception {\n AssertJUnit.assertTrue(store.isMarked(10));\n AssertJUnit.assertTrue(store.isMarked(20));\n AssertJUnit.assertTrue(store.isMarked(300));\n AssertJUnit.assertFalse(store.isMarked(11));\n AssertJUnit.assertFalse(store.isMarked(21));\n ...
{ "fields": [ { "declarator": "logDataStore", "modifier": "private final", "original_string": "private final LogDataStore logDataStore;", "type": "LogDataStore", "var_name": "logDataStore" }, { "declarator": "service", "modifier": "private final", "original_...
{ "body": "@Override\n public boolean isMarked(int row) {\n //TODO filter support\n try {\n return service.submit(new OperationIsMarked(logDataStore, row)).get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n return false;\n }", "class_method_signa...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_63
{ "fields": [ { "declarator": "logData", "modifier": "private", "original_string": "private LogData logData;", "type": "LogData", "var_name": "logData" } ], "file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/PropertyAcceptConditionTest.java", "identifier": "P...
{ "body": "@Test\n public void testRejectValue() throws Exception {\n AssertJUnit.assertFalse(new PropertyAcceptCondition(\"key\",\"value1\").accept(logData));\n }", "class_method_signature": "PropertyAcceptConditionTest.testRejectValue()", "constructor": false, "full_signature": "@Test public void...
{ "fields": [ { "declarator": "propertyKey", "modifier": "private final", "original_string": "private final String propertyKey;", "type": "String", "var_name": "propertyKey" }, { "declarator": "propertyValue", "modifier": "private final", "original_string": ...
{ "body": "@Override\n public boolean accept(LogData ld) {\n return ld.getProperties().containsKey(propertyKey) && StringUtils.equals(propertyValue, ld.getProperties().get(propertyKey));\n }", "class_method_signature": "PropertyAcceptCondition.accept(LogData ld)", "constructor": false, "full_signature": "@...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_18
{ "fields": [], "file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/util/LoggerConfigUtilTest.java", "identifier": "LoggerConfigUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExtractLayoutPatternsJustPatterns() {\n //Given\n String content = \"%-5level %date{dd MMM yyyy;HH:mm:ss.SSS} [%thread] %logger %msg%n\\n\" +\n \" %level %date{dd MMM yyyy;HH:mm:ss.SSS} %thread %file %logger %msg%n\\n\" +\n \"some trash\";\n\n //w...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(LoggerConfigUtil.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(LoggerConfigUtil.class.getName());", "type": "Logger", "var_name": ...
{ "body": "@NotNull\n public static Set<String> extractLayoutPatterns(String content) {\n final LayoutEncoderConverter logbackLayoutEncoderConverter = new LogbackLayoutEncoderConverter();\n\n Set<String> result = new HashSet<>();\n final Matcher logbackMatcher = Pattern.compile(\"<pattern>\\\\s*(.*?)\\\\s*<...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_109
{ "fields": [ { "declarator": "LOG_EVENT_COUNT = 1000", "modifier": "public static final", "original_string": "public static final int LOG_EVENT_COUNT = 1000;", "type": "int", "var_name": "LOG_EVENT_COUNT" }, { "declarator": "TEST_THREAD_POOL_NAME = \"TestThreadPoolName...
{ "body": "@Test\n public void testGetCount() throws Exception {\n AssertJUnit.assertEquals(LOG_EVENT_COUNT, store.getCount());\n\n }", "class_method_signature": "MemoryAsyncLogDataStoreTest.testGetCount()", "constructor": false, "full_signature": "@Test public void testGetCount()", "identifier": "testGe...
{ "fields": [ { "declarator": "logDataStore", "modifier": "private final", "original_string": "private final LogDataStore logDataStore;", "type": "LogDataStore", "var_name": "logDataStore" }, { "declarator": "service", "modifier": "private final", "original_...
{ "body": "@Override\n public int getCount() {\n try {\n return service.submit(new OperationGetCount(logDataStore)).get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n return 0;\n }", "class_method_signature": "MemoryAsyncLogDataStore.getCount()", ...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_220
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(LoadingRunnableTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(LoadingRunnableTest.class);", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "@Test(invocationCount = 5)\n public void testLoadingStopWithLogParser() throws IOException {\n saveLines(Range.closed(0, julSimpleLogLines.size()), julSimpleLogLines, outputStream);\n\n underTest = createLoadingRunnable(getJulLogParser());\n executorService.submit(underTest);\n\n await().until...
{ "fields": [ { "declarator": "LOGGER = org.slf4j.LoggerFactory.getLogger(LoadingRunnable.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(LoadingRunnable.class);", "type": "Logger", "var_name": "L...
{ "body": "public synchronized void stop() {\n stop = true;\n }", "class_method_signature": "LoadingRunnable.stop()", "constructor": false, "full_signature": "public synchronized void stop()", "identifier": "stop", "invocations": [], "modifiers": "public synchronized", "parameters": "()", "return"...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_59
{ "fields": [], "file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/query/org/apache/log4j/rule/LevelInequalityRuleTest.java", "identifier": "LevelInequalityRuleTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test4() throws IOException, ClassNotFoundException {\n Rule rule = (Rule) SerializationTestHelper.serializeClone(LevelInequalityRule.getRule(\"<\", \"info\"));\n LoggingEvent event = new LoggingEvent(\"org.apache.log4j.Logger\", Logger.getRootLogger(), System.currentTimeMillis(),...
{ "fields": [ { "declarator": "levelList", "modifier": "private static", "original_string": "private static List<String> levelList;", "type": "List<String>", "var_name": "levelList" } ], "file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/accept/query/org/apache/log4j/...
{ "body": "public static Rule getRule(final String inequalitySymbol, final String value) {\n\n Level thisLevel;\n\n // if valid util.logging levels are used against events\n // with log4j levels, the\n // DEBUG level is used and an illegalargumentexception won't be generated\n\n // an illegalargumentex...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_148
{ "fields": [], "file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/parser/log4j/Log4jUtilTest.java", "identifier": "Log4jUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseLevel() {\n assertEquals(Level.FINEST, Log4jUtil.parseLevel(\"TRACE\"));\n assertEquals(Level.FINE, Log4jUtil.parseLevel(\"DEBUG\"));\n assertEquals(Level.INFO, Log4jUtil.parseLevel(\"INFO\"));\n assertEquals(Level.WARNING, Log4jUtil.parseLevel(\"WARN\"));\n ass...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Log4jUtil.class.getName())", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Log4jUtil.class.getName());", "type": "Logger", "var_name": "LOGGER" }...
{ "body": "public static Level parseLevel(String s) {\n if (s.equalsIgnoreCase(\"INFO\")) {\n return Level.INFO;\n } else if (s.equalsIgnoreCase(\"ERROR\")) {\n return RenamedLevel.ERROR;\n } else if (s.equalsIgnoreCase(\"FATAL\")) {\n return RenamedLevel.FATAL;\n } else if (s.equalsIgnoreC...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_79
{ "fields": [ { "declarator": "PORT = 45501", "modifier": "private static final", "original_string": "private static final int PORT = 45501;", "type": "int", "var_name": "PORT" }, { "declarator": "HTTP_GZIPPED = \"http://127.0.0.1:\" + PORT + \"/log.txt.gz\"", "mo...
{ "body": "@Test\n public void testLargerGzippedFile() throws IOException {\n try (LoadingInfo logFileContent = new LoadingInfo(asFileObject(\"hierarchy/hierarchy.log.gz\"))) {\n assertTrue(logFileContent.isGzipped());\n assertEquals(69_058, asString(logFileContent).length());\n }\n }", "class_met...
{ "fields": [ { "declarator": "friendlyUrl", "modifier": "private final", "original_string": "private final String friendlyUrl;", "type": "String", "var_name": "friendlyUrl" }, { "declarator": "fileObject", "modifier": "private final", "original_string": "pr...
{ "body": "public boolean isGzipped() {\n return gzipped;\n }", "class_method_signature": "LoadingInfo.isGzipped()", "constructor": false, "full_signature": "public boolean isGzipped()", "identifier": "isGzipped", "invocations": [], "modifiers": "public", "parameters": "()", "return": "boolean", ...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_216
{ "fields": [], "file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/actions/search/FilteredTableNextRowProviderTest.java", "identifier": "FilteredTableNextRowProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetNextRowUp() {\n JTable jTable = new JTable(10, 1);\n NextRowProvider nextRowProvider = NextRowProviderFactory.getPreviousFilteredTableRow(jTable);\n for (int i = 9; i >= 0; i--) {\n nextRowProvider.getNextRow();\n }\n assertEquals(-1, nextRowProvider.getNextR...
{ "fields": [ { "declarator": "table", "modifier": "private final", "original_string": "private final JTable table;", "type": "JTable", "var_name": "table" }, { "declarator": "increase", "modifier": "private final", "original_string": "private final int incr...
{ "body": "@Override\n public int getNextRow() {\n currentRow += increase;\n\n if (rowsChecked++ >= table.getRowCount()) {\n return -1;\n }\n if (currentRow >= table.getRowCount()) {\n currentRow = 0;\n } else if (currentRow < 0) {\n currentRow = table.getRowCount() - 1;\n }\n int...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_96
{ "fields": [ { "declarator": "dataTableModel", "modifier": "public", "original_string": "public LogDataTableModel dataTableModel;", "type": "LogDataTableModel", "var_name": "dataTableModel" }, { "declarator": "logDatas", "modifier": "public", "original_stri...
{ "body": "@Test\n public void testGetValueAt() {\n for (int i = 0; i < logDatas.length; i++) {\n Level level = (Level) dataTableModel.getValueAt(i, TableColumns.LEVEL.getColumn());\n AssertJUnit.assertEquals(logDatas[i].getLevel(), level);\n\n String thread = (String) dataTableModel.getValueAt(i, ...
{ "fields": [ { "declarator": "EMPTY_STRING = \"\"", "modifier": "private static final", "original_string": "private static final String EMPTY_STRING = \"\";", "type": "String", "var_name": "EMPTY_STRING" }, { "declarator": "LOGGER = LoggerFactory.getLogger(LogDataTable...
{ "body": "public Object getValueAt(int rowIndex, int columnIndex) {\n LogData ld = getLogData(rowIndex);\n if (ld == null) {\n System.err.println(\"LogDataTableModel.getValueAt() null form row \" + rowIndex);\n dumpInfo();\n }\n Object result = null;\n TableColumns selectColumn = TableColumn...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_168
{ "fields": [], "file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/message/StackTraceColorizerTest.java", "identifier": "StackTraceColorizerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testColorizingNeeded() throws IOException {\n //given\n String string = IOUtils.toString(getSystemResourceAsStream(\"stacktrace/stacktrace.txt\"), UTF_8);\n StackTraceColorizer colorizer = new StackTraceColorizer(new ThemeConfig(new BaseConfiguration()));\n //when\n bool...
{ "fields": [ { "declarator": "NAME = \"Java stack trace\"", "modifier": "private static final", "original_string": "private static final String NAME = \"Java stack trace\";", "type": "String", "var_name": "NAME" }, { "declarator": "exceptionLine = Pattern.compile(\"(\\...
{ "body": "@Override\n public boolean colorizingNeeded(String message) {\n return exceptionLine.matcher(message).find();\n }", "class_method_signature": "StackTraceColorizer.colorizingNeeded(String message)", "constructor": false, "full_signature": "@Override public boolean colorizingNeeded(String message)...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_187
{ "fields": [], "file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/session/SessionUtilTest.java", "identifier": "SessionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToStringGroupedByServerEmpty() throws Exception {\n //given\n final ArrayList<FileToOpen> filesToOpen = new ArrayList<>();\n Session session = new Session(\"A\", filesToOpen);\n\n //when\n final String actual = SessionUtil.toStringGroupedByServer(session);\n\n //t...
{ "fields": [], "file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/gui/session/SessionUtil.java", "identifier": "SessionUtil", "interfaces": "", "methods": [ { "class_method_signature": "SessionUtil.groupFilesByServer(Session session)", "constructor": false, "full_signature": "st...
{ "body": "public static String toStringGroupedByServer(Session session) {\n final Map<String, List<FileToOpen>> map = groupFilesByServer(session);\n return map.keySet()\n .stream()\n .sorted()\n .map(server -> String.format(\"%s:%n%s%n\", server, map.get(server)\n .stream()\n ...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_38
{ "fields": [], "file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/query/org/apache/log4j/rule/EqualsRuleTest.java", "identifier": "EqualsRuleTest", "interfaces": "", "superclass": "" }
{ "body": "@Test public void test1() {\n Stack<Object> stack = new Stack<>();\n stack.push(\"Hello\");\n try {\n EqualsRule.getRule(stack);\n Assert.fail(\"Should have thrown IllegalArgumentException\");\n } catch (IllegalArgumentException ignored) {\n }\n }...
{ "fields": [ { "declarator": "serialVersionUID = 1712851553477517245L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1712851553477517245L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "RESOL...
{ "body": "public static Rule getRule(final Stack<Object> stack) {\n if (stack.size() < 2) {\n throw new IllegalArgumentException(\"Invalid EQUALS rule - expected two parameters but received \" + stack.size());\n }\n\n String p2 = stack.pop().toString();\n String p1 = stack.pop().toString();\n\n r...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_191
{ "fields": [ { "declarator": "underTest", "modifier": "private", "original_string": "private ClassWrapperRenderer underTest;", "type": "ClassWrapperRenderer", "var_name": "underTest" } ], "file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/gui/renderers/ClassWrapperRe...
{ "body": "@Test\n public void testToMapIfConfIsNull() throws Exception {\n final Map<String, String> treeMap = underTest.toMap(null);\n\n //then\n assertEquals(treeMap.size(), 0);\n }", "class_method_signature": "ClassWrapperRendererTest.testToMapIfConfIsNull()", "constructor": false, "full_signatur...
{ "fields": [ { "declarator": "stringLengthComparator = (o1, o2) -> {\n int result = o2.length() - o1.length();\n if (result == 0) {\n result = o1.compareTo(o2);\n }\n return result;\n }", "modifier": "private final", "original_string": "private final Comparator<String> stringL...
{ "body": "protected SortedMap<String, String> toMap(String configuration) {\n Properties p = new Properties();\n SortedMap<String, String> result = new TreeMap<>(stringLengthComparator);\n try {\n p.load(new StringReader(StringUtils.defaultString(configuration)));\n for (Object o : p.keySet()) {\n...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_80
{ "fields": [ { "declarator": "PORT = 45501", "modifier": "private static final", "original_string": "private static final int PORT = 45501;", "type": "int", "var_name": "PORT" }, { "declarator": "HTTP_GZIPPED = \"http://127.0.0.1:\" + PORT + \"/log.txt.gz\"", "mo...
{ "body": "@Test\n public void testLargerHttp() throws Exception {\n try (LoadingInfo logFileContent = new LoadingInfo(fsManager.resolveFile(HTTP_NOT_GZIPPED))) {\n assertFalse(logFileContent.isGzipped());\n assertEquals(69_058, asString(logFileContent).length());\n }\n }", "class_method_signature...
{ "fields": [ { "declarator": "friendlyUrl", "modifier": "private final", "original_string": "private final String friendlyUrl;", "type": "String", "var_name": "friendlyUrl" }, { "declarator": "fileObject", "modifier": "private final", "original_string": "pr...
{ "body": "public boolean isGzipped() {\n return gzipped;\n }", "class_method_signature": "LoadingInfo.isGzipped()", "constructor": false, "full_signature": "public boolean isGzipped()", "identifier": "isGzipped", "invocations": [], "modifiers": "public", "parameters": "()", "return": "boolean", ...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_200
{ "fields": [ { "declarator": "underTest = new QuerySuggestionSource(new ArrayList<>(0))", "modifier": "private", "original_string": "private QuerySuggestionSource underTest = new QuerySuggestionSource(new ArrayList<>(0));", "type": "QuerySuggestionSource", "var_name": "underTest" ...
{ "body": "@Test(dataProvider = \"getExpectedTypeProvider\", enabled = false)\n\n public void testGetExpectedType(String query, QuerySuggestionSource.ExpectedType expectedType) throws Exception {\n Assert.assertEquals(underTest.getExpectedType(query), Collections.singletonList(expectedType));\n }", "class_meth...
{ "fields": [ { "declarator": "operators = Splitter.on(\" \").splitToList(\"!= == ~= like exists < > <= >=\")", "modifier": "private final", "original_string": "private final List<String> operators = Splitter.on(\" \").splitToList(\"!= == ~= like exists < > <= >=\");", "type": "List<String...
{ "body": "protected List<ExpectedType> getExpectedType(String s) {\n final ArrayList<ExpectedType> result = new ArrayList<>();\n if (s.trim().length() == 0) {\n result.add(ExpectedType.FIELD);\n return result;\n }\n String rest = getLastNotFinishedCondition(s);\n\n String trimmed = rest.trim...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }
32377028_129
{ "fields": [], "file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/store/async/MemoryLogDataStore2Test.java", "identifier": "MemoryLogDataStore2Test", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFilter() throws Exception {\n //given\n MemoryLogDataStore2 logDataStore2 = new MemoryLogDataStore2();\n String[] messages = \"Ala ma kota a kot ma ale\".split(\" \");\n LogData[] logDatas = new LogData[10000*messages.length];\n for (int i=0; i<logDatas.length;i++){\...
{ "fields": [ { "declarator": "viewToModel = new int[0]", "modifier": "private", "original_string": "private int[] viewToModel = new int[0];", "type": "int[]", "var_name": "viewToModel" }, { "declarator": "modelAfterFiltersCount", "modifier": "private", "ori...
{ "body": "@Override\n public FilterResult filter(LogDataFilter logDataFilter) {\n return doFiltering(logDataFilter);\n }", "class_method_signature": "MemoryLogDataStore2.filter(LogDataFilter logDataFilter)", "constructor": false, "full_signature": "@Override public FilterResult filter(LogDataFilter logDat...
{ "created": null, "fork": null, "fork_count": 76, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 32377028, "size": 8314, "stargazer_count": 332, "stars": null, "updates": null, "url": "https://github.com/otros-systems/otroslogviewer" }