id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
15374337_32
{ "fields": [ { "declarator": "ENGINE_CONF", "modifier": "static", "original_string": "static EngineConfiguration ENGINE_CONF;", "type": "EngineConfiguration", "var_name": "ENGINE_CONF" } ], "file": "easydao-maven-plugin/src/test/java/hu/vanio/easydao/modelbuilder/ModelBuilde...
{ "body": "@Test\n public void testCreateJavaName_PrefixAndPostfixButNoPrefixInDatabaseName() {\n System.out.println(\"testCreateJavaName_PrefixAndPostfixButNoPrefixInDatabaseName\");\n String dbName = \"CUSTOMER\";\n ModelBuilder instance = new ModelBuilder(null, ENGINE_CONF, new PostgreSql9M...
{ "fields": [ { "declarator": "EMPTY_COMMENT", "modifier": "protected", "original_string": "protected String EMPTY_COMMENT;", "type": "String", "var_name": "EMPTY_COMMENT" }, { "declarator": "SKIPPED_FROM_MODEL = \"**************************** SKIPPED FROM MODEL! Check ...
{ "body": "final protected String createJavaName(String dbName,\n boolean firstCharToUpperCase,\n boolean hasPrefix,\n boolean hasPostFix) {\n\n String result = \"\";\n if (dbName.contains(\"_\")) {\n String[] sArray = dbName.toLowerCase().split(\"_\");\n ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_24
{ "fields": [ { "declarator": "ENGINE_CONF", "modifier": "static", "original_string": "static EngineConfiguration ENGINE_CONF;", "type": "EngineConfiguration", "var_name": "ENGINE_CONF" } ], "file": "easydao-maven-plugin/src/test/java/hu/vanio/easydao/modelbuilder/ModelBuilde...
{ "body": "@Test\n public void testCreateJavaName_StringWithPrefix() {\n System.out.println(\"testCreateJavaName_SimpleString\");\n String dbName = \"CUS_CUSTOMER\";\n ModelBuilder instance = new ModelBuilder(null, ENGINE_CONF, new PostgreSql9ModelBuilderConfig(), new LocalisedMessages(\"messa...
{ "fields": [ { "declarator": "EMPTY_COMMENT", "modifier": "protected", "original_string": "protected String EMPTY_COMMENT;", "type": "String", "var_name": "EMPTY_COMMENT" }, { "declarator": "SKIPPED_FROM_MODEL = \"**************************** SKIPPED FROM MODEL! Check ...
{ "body": "final protected String createJavaName(String dbName,\n boolean firstCharToUpperCase,\n boolean hasPrefix,\n boolean hasPostFix) {\n\n String result = \"\";\n if (dbName.contains(\"_\")) {\n String[] sArray = dbName.toLowerCase().split(\"_\");\n ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_28
{ "fields": [ { "declarator": "ENGINE_CONF", "modifier": "static", "original_string": "static EngineConfiguration ENGINE_CONF;", "type": "EngineConfiguration", "var_name": "ENGINE_CONF" } ], "file": "easydao-maven-plugin/src/test/java/hu/vanio/easydao/modelbuilder/ModelBuilde...
{ "body": "@Test\n public void testCreateJavaName_StringWithoutPrefixAndPostfix() {\n System.out.println(\"testCreateJavaName_StringWithoutPrefixAndPostfix\");\n String dbName = \"CUSTOMER\";\n ModelBuilder instance = new ModelBuilder(null, ENGINE_CONF, new PostgreSql9ModelBuilderConfig(), new...
{ "fields": [ { "declarator": "EMPTY_COMMENT", "modifier": "protected", "original_string": "protected String EMPTY_COMMENT;", "type": "String", "var_name": "EMPTY_COMMENT" }, { "declarator": "SKIPPED_FROM_MODEL = \"**************************** SKIPPED FROM MODEL! Check ...
{ "body": "final protected String createJavaName(String dbName,\n boolean firstCharToUpperCase,\n boolean hasPrefix,\n boolean hasPostFix) {\n\n String result = \"\";\n if (dbName.contains(\"_\")) {\n String[] sArray = dbName.toLowerCase().split(\"_\");\n ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_12
{ "fields": [], "file": "easydao-maven-plugin/src/test/java/hu/vanio/maven/plugins/easydao/GeneratorTest.java", "identifier": "GeneratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = MojoExecutionException.class)\n public void testValidatePackageName_WRONG2() throws Exception {\n System.out.println(\"testValidatePackageName_WRONG1\");\n Generator instance = new Generator();\n instance.packageOfJavaModel = \" \";\n instance.validatePack...
{ "fields": [ { "declarator": "GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\"", "modifier": "final static protected", "original_string": "final static protected String GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\";", "type": "String", "v...
{ "body": "protected void validatePackageName(String name, String value) throws MojoExecutionException {\n if (value == null\n || value.trim().length() == 0\n || !value.matches(PACKAGE_PATTERN)) {\n throw new MojoExecutionException(\"EasyDao engine configuration excepti...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_13
{ "fields": [], "file": "easydao-maven-plugin/src/test/java/hu/vanio/maven/plugins/easydao/GeneratorTest.java", "identifier": "GeneratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = MojoExecutionException.class)\n public void testValidateBoolean_WRONG1() throws Exception {\n System.out.println(\"testValidateBoolean_WRONG1\");\n Generator instance = new Generator();\n instance.tablePrefix = \"tuer\";\n instance.validateBoolean(\"tablePref...
{ "fields": [ { "declarator": "GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\"", "modifier": "final static protected", "original_string": "final static protected String GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\";", "type": "String", "v...
{ "body": "protected void validateBoolean(String name, String value) throws MojoExecutionException {\n if (!\"true\".equalsIgnoreCase(value) && !\"false\".equalsIgnoreCase(value)) {\n throw new MojoExecutionException(\"EasyDao engine configuration exception: wrong \" + name + \" . Valid value is tru...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_29
{ "fields": [ { "declarator": "ENGINE_CONF", "modifier": "static", "original_string": "static EngineConfiguration ENGINE_CONF;", "type": "EngineConfiguration", "var_name": "ENGINE_CONF" } ], "file": "easydao-maven-plugin/src/test/java/hu/vanio/easydao/modelbuilder/ModelBuilde...
{ "body": "@Test\n public void testCreateJavaName_MoreStringWithoutPrefixAndPostfix() {\n System.out.println(\"testCreateJavaName_MoreStringWithoutPrefixAndPostfix\");\n String dbName = \"CUSTOMER_ORDERS\";\n ModelBuilder instance = new ModelBuilder(null, ENGINE_CONF, new PostgreSql9ModelBuild...
{ "fields": [ { "declarator": "EMPTY_COMMENT", "modifier": "protected", "original_string": "protected String EMPTY_COMMENT;", "type": "String", "var_name": "EMPTY_COMMENT" }, { "declarator": "SKIPPED_FROM_MODEL = \"**************************** SKIPPED FROM MODEL! Check ...
{ "body": "final protected String createJavaName(String dbName,\n boolean firstCharToUpperCase,\n boolean hasPrefix,\n boolean hasPostFix) {\n\n String result = \"\";\n if (dbName.contains(\"_\")) {\n String[] sArray = dbName.toLowerCase().split(\"_\");\n ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_25
{ "fields": [ { "declarator": "ENGINE_CONF", "modifier": "static", "original_string": "static EngineConfiguration ENGINE_CONF;", "type": "EngineConfiguration", "var_name": "ENGINE_CONF" } ], "file": "easydao-maven-plugin/src/test/java/hu/vanio/easydao/modelbuilder/ModelBuilde...
{ "body": "@Test\n public void testCreateJavaName_StringWithPostfix() {\n System.out.println(\"testCreateJavaName_StringWithPostfix\");\n String dbName = \"CUSTOMER_CUS\";\n ModelBuilder instance = new ModelBuilder(null, ENGINE_CONF, new PostgreSql9ModelBuilderConfig(), new LocalisedMessages(\...
{ "fields": [ { "declarator": "EMPTY_COMMENT", "modifier": "protected", "original_string": "protected String EMPTY_COMMENT;", "type": "String", "var_name": "EMPTY_COMMENT" }, { "declarator": "SKIPPED_FROM_MODEL = \"**************************** SKIPPED FROM MODEL! Check ...
{ "body": "final protected String createJavaName(String dbName,\n boolean firstCharToUpperCase,\n boolean hasPrefix,\n boolean hasPostFix) {\n\n String result = \"\";\n if (dbName.contains(\"_\")) {\n String[] sArray = dbName.toLowerCase().split(\"_\");\n ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_6
{ "fields": [], "file": "easydao-maven-plugin/src/test/java/hu/vanio/maven/plugins/easydao/GeneratorTest.java", "identifier": "GeneratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = MojoExecutionException.class)\n public void testValidateDbName_WRONG5() throws Exception {\n System.out.println(\"testValidateDbName_WRONG5\");\n Generator instance = new Generator();\n instance.dbName = \" \";\n instance.validateDbName();\n }", "clas...
{ "fields": [ { "declarator": "GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\"", "modifier": "final static protected", "original_string": "final static protected String GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\";", "type": "String", "v...
{ "body": "protected void validateDbName() throws MojoExecutionException {\n if (dbName == null || dbName.trim().length() == 0 || !dbName.matches(DBNAME_PATTERN)) {\n throw new MojoExecutionException(\"EasyDao engine configuration exception: wrong dbName. Required field, max. 16 characters, regExp: ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_33
{ "fields": [ { "declarator": "ENGINE_CONF", "modifier": "static", "original_string": "static EngineConfiguration ENGINE_CONF;", "type": "EngineConfiguration", "var_name": "ENGINE_CONF" } ], "file": "easydao-maven-plugin/src/test/java/hu/vanio/easydao/modelbuilder/ModelBuilde...
{ "body": "@Test\n public void testIsRestrictedWord() {\n System.out.println(\"testIsRestrictedWord\");\n ModelBuilder instance = new ModelBuilder(null, ENGINE_CONF, new PostgreSql9ModelBuilderConfig(), new LocalisedMessages(\"messages\", null));\n// class|this|int|long|byte|short|float|double...
{ "fields": [ { "declarator": "EMPTY_COMMENT", "modifier": "protected", "original_string": "protected String EMPTY_COMMENT;", "type": "String", "var_name": "EMPTY_COMMENT" }, { "declarator": "SKIPPED_FROM_MODEL = \"**************************** SKIPPED FROM MODEL! Check ...
{ "body": "protected boolean isRestrictedWord(String word) {\n return word.matches(\"class|interface|public|private|protected|package|this|int|long|byte|short|float|double|boolean|for|while|goto|if|do\");\n }", "class_method_signature": "ModelBuilder.isRestrictedWord(String word)", "constructor": false,...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_38
{ "fields": [ { "declarator": "propertiesName = \"test-config-oracle11.properties\"", "modifier": "private", "original_string": "private String propertiesName = \"test-config-oracle11.properties\";", "type": "String", "var_name": "propertiesName" } ], "file": "easydao-maven-p...
{ "body": "@Test\n public void testCreateFromProperties_String() throws Exception {\n System.out.println(\"createFromProperties\");\n \n EngineConfiguration result = EngineConfiguration.createFromProperties(propertiesName);\n assertProperties(result);\n }", "class_method_signature"...
{ "fields": [ { "declarator": "MISSING_LICENSE_TEXT = \"/** No license specified */\"", "modifier": "static public final", "original_string": "static public final String MISSING_LICENSE_TEXT = \"/** No license specified */\";", "type": "String", "var_name": "MISSING_LICENSE_TEXT" ...
{ "body": "static public EngineConfiguration createFromProperties(String propertiesName) throws IOException {\n Properties props = new Properties();\n props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesName));\n return createFromProperties(props);\n }", "...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_14
{ "fields": [], "file": "easydao-maven-plugin/src/test/java/hu/vanio/maven/plugins/easydao/GeneratorTest.java", "identifier": "GeneratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = MojoExecutionException.class)\n public void testValidateBoolean_WRONG2() throws Exception {\n System.out.println(\"testValidateBoolean_WRONG2\");\n Generator instance = new Generator();\n instance.tablePrefix = \" \";\n instance.validateBoolean(\"tablePrefi...
{ "fields": [ { "declarator": "GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\"", "modifier": "final static protected", "original_string": "final static protected String GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\";", "type": "String", "v...
{ "body": "protected void validateBoolean(String name, String value) throws MojoExecutionException {\n if (!\"true\".equalsIgnoreCase(value) && !\"false\".equalsIgnoreCase(value)) {\n throw new MojoExecutionException(\"EasyDao engine configuration exception: wrong \" + name + \" . Valid value is tru...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_34
{ "fields": [ { "declarator": "ENGINE_CONF", "modifier": "static", "original_string": "static EngineConfiguration ENGINE_CONF;", "type": "EngineConfiguration", "var_name": "ENGINE_CONF" } ], "file": "easydao-maven-plugin/src/test/java/hu/vanio/easydao/modelbuilder/ModelBuilde...
{ "body": "@Test\n public void testGetSequenceName() throws IOException {\n System.out.println(\"testGetSequenceName\");\n EngineConfiguration engineConf = EngineConfiguration.createFromProperties(\"test-config-oracle11.properties\");\n ModelBuilder instance = new ModelBuilder(null, engineConf...
{ "fields": [ { "declarator": "EMPTY_COMMENT", "modifier": "protected", "original_string": "protected String EMPTY_COMMENT;", "type": "String", "var_name": "EMPTY_COMMENT" }, { "declarator": "SKIPPED_FROM_MODEL = \"**************************** SKIPPED FROM MODEL! Check ...
{ "body": "protected String getSequenceName(Table table) {\n List<Field> pkFields = table.getPkFields();\n String sequenceName = null;\n if (pkFields.size() == 1) {\n Field pkField = table.getPkField();\n if (pkField.isInteger()) {\n switch (engineConf.getSequ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_1
{ "fields": [], "file": "easydao-maven-plugin/src/test/java/hu/vanio/maven/plugins/easydao/GeneratorTest.java", "identifier": "GeneratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValidateDbName_GOOD2() throws Exception {\n System.out.println(\"testValidateDbName_GOOD2\");\n Generator instance = new Generator();\n instance.dbName = \"callisto1111\";\n instance.validateDbName();\n }", "class_method_signature": "GeneratorTest...
{ "fields": [ { "declarator": "GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\"", "modifier": "final static protected", "original_string": "final static protected String GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\";", "type": "String", "v...
{ "body": "protected void validateDbName() throws MojoExecutionException {\n if (dbName == null || dbName.trim().length() == 0 || !dbName.matches(DBNAME_PATTERN)) {\n throw new MojoExecutionException(\"EasyDao engine configuration exception: wrong dbName. Required field, max. 16 characters, regExp: ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_22
{ "fields": [], "file": "easydao-maven-plugin/src/test/java/hu/vanio/maven/plugins/easydao/GeneratorTest.java", "identifier": "GeneratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = MojoExecutionException.class)\n public void testValidateDbType_WRONG_postgres() throws Exception {\n System.out.println(\"testValidateDbType_WRONG_postgres\");\n Generator instance = new Generator();\n instance.dbType = \"postgres\";\n instance.validateDbType...
{ "fields": [ { "declarator": "GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\"", "modifier": "final static protected", "original_string": "final static protected String GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\";", "type": "String", "v...
{ "body": "protected void validateDbType() throws MojoExecutionException {\n // dbType\n if (dbType == null || dbType.trim().length() == 0) {\n throw new MojoExecutionException(\"EasyDao engine configuration exception: wrong dbType. Valid values are: ORACLE10, ORACLE11, POSTGRESQL9\");\n ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_18
{ "fields": [], "file": "easydao-maven-plugin/src/test/java/hu/vanio/maven/plugins/easydao/GeneratorTest.java", "identifier": "GeneratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValidateBoolean_false() throws Exception {\n System.out.println(\"testValidateBoolean_false\");\n Generator instance = new Generator();\n instance.tablePrefix = \"false\";\n instance.validateBoolean(\"tablePrefix\", instance.tablePrefix);\n }", "c...
{ "fields": [ { "declarator": "GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\"", "modifier": "final static protected", "original_string": "final static protected String GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\";", "type": "String", "v...
{ "body": "protected void validateBoolean(String name, String value) throws MojoExecutionException {\n if (!\"true\".equalsIgnoreCase(value) && !\"false\".equalsIgnoreCase(value)) {\n throw new MojoExecutionException(\"EasyDao engine configuration exception: wrong \" + name + \" . Valid value is tru...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_19
{ "fields": [], "file": "easydao-maven-plugin/src/test/java/hu/vanio/maven/plugins/easydao/GeneratorTest.java", "identifier": "GeneratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValidateDbType_ORACLE11() throws Exception {\n System.out.println(\"testValidateDbType_ORACLE11\");\n Generator instance = new Generator();\n instance.dbType = \"ORACLE11\";\n instance.validateDbType();\n }", "class_method_signature": "GeneratorTe...
{ "fields": [ { "declarator": "GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\"", "modifier": "final static protected", "original_string": "final static protected String GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\";", "type": "String", "v...
{ "body": "protected void validateDbType() throws MojoExecutionException {\n // dbType\n if (dbType == null || dbType.trim().length() == 0) {\n throw new MojoExecutionException(\"EasyDao engine configuration exception: wrong dbType. Valid values are: ORACLE10, ORACLE11, POSTGRESQL9\");\n ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_23
{ "fields": [], "file": "easydao-maven-plugin/src/test/java/hu/vanio/easydao/EngineTest.java", "identifier": "EngineTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInitEngineConfiguration() throws Exception {\n System.out.println(\"testInitEngineConfiguration\");\n \n Properties props = new Properties();\n props.put(\"database.name\", \"callisto\");\n props.put(\"databaseType\", \"POSTGRESQL9\");\n ...
{ "fields": [ { "declarator": "fileSeparator = System.getProperty(\"file.separator\")", "modifier": "static final private", "original_string": "static final private String fileSeparator = System.getProperty(\"file.separator\");", "type": "String", "var_name": "fileSeparator" }, ...
{ "body": "public EngineConfiguration getEngineConfiguration() {\n return engineConfiguration;\n }", "class_method_signature": "Engine.getEngineConfiguration()", "constructor": false, "full_signature": "public EngineConfiguration getEngineConfiguration()", "identifier": "getEngineConfiguration", "...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_35
{ "fields": [ { "declarator": "testParam", "modifier": "private", "original_string": "private TestParams testParam;", "type": "TestParams", "var_name": "testParam" } ], "file": "easydao-maven-plugin/src/test/java/hu/vanio/easydao/modelbuilder/PostgreSql9ModelBuilderConfigTest...
{ "body": "@Test\n public void testGetJavaType() {\n PostgreSql9ModelBuilderConfig instance = new PostgreSql9ModelBuilderConfig();\n String expResult = testParam.expectedJavaType;\n String result = instance.getJavaType(testParam.dbType);\n System.out.println(\"testGetJavaType: \" + test...
{ "fields": [ { "declarator": "selectForTableList = \"select c.relname as TABLE_NAME, obj_description(c.oid) as COMMENTS from pg_catalog.pg_class c\"\n + \" where c.relname like '%' and c.relname not like 'sql_%' and c.relname not like 'pg_%' and c.relkind = 'r' order by TABLE_NAME;\"", "mo...
{ "body": "@Override\n public String getJavaType(String dbType) throws IllegalArgumentException {\n return convertToJavaType(JAVA_TYPE_MAP, dbType);\n }", "class_method_signature": "PostgreSql9ModelBuilderConfig.getJavaType(String dbType)", "constructor": false, "full_signature": "@Override public ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_0
{ "fields": [], "file": "easydao-maven-plugin/src/test/java/hu/vanio/maven/plugins/easydao/GeneratorTest.java", "identifier": "GeneratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValidateDbName_GOOD1() throws Exception {\n System.out.println(\"testValidateDbName_GOOD1\");\n Generator instance = new Generator();\n instance.dbName = \"callisto\";\n instance.validateDbName();\n }", "class_method_signature": "GeneratorTest.tes...
{ "fields": [ { "declarator": "GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\"", "modifier": "final static protected", "original_string": "final static protected String GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\";", "type": "String", "v...
{ "body": "protected void validateDbName() throws MojoExecutionException {\n if (dbName == null || dbName.trim().length() == 0 || !dbName.matches(DBNAME_PATTERN)) {\n throw new MojoExecutionException(\"EasyDao engine configuration exception: wrong dbName. Required field, max. 16 characters, regExp: ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_15
{ "fields": [], "file": "easydao-maven-plugin/src/test/java/hu/vanio/maven/plugins/easydao/GeneratorTest.java", "identifier": "GeneratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValidateBoolean_TRUE() throws Exception {\n System.out.println(\"testValidateBoolean_TRUE\");\n Generator instance = new Generator();\n instance.tablePrefix = \"TRUE\";\n instance.validateBoolean(\"tablePrefix\", instance.tablePrefix);\n }", "clas...
{ "fields": [ { "declarator": "GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\"", "modifier": "final static protected", "original_string": "final static protected String GENERATED_SOURCE_PATH = \"/target/generated-sources/easydao-classes\";", "type": "String", "v...
{ "body": "protected void validateBoolean(String name, String value) throws MojoExecutionException {\n if (!\"true\".equalsIgnoreCase(value) && !\"false\".equalsIgnoreCase(value)) {\n throw new MojoExecutionException(\"EasyDao engine configuration exception: wrong \" + name + \" . Valid value is tru...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
15374337_39
{ "fields": [ { "declarator": "propertiesName = \"test-config-oracle11.properties\"", "modifier": "private", "original_string": "private String propertiesName = \"test-config-oracle11.properties\";", "type": "String", "var_name": "propertiesName" } ], "file": "easydao-maven-p...
{ "body": "@Test\n public void testCreateFromProperties_Properties() throws Exception {\n System.out.println(\"createFromProperties\");\n Properties props = new Properties();\n props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesName));\n EngineConfig...
{ "fields": [ { "declarator": "MISSING_LICENSE_TEXT = \"/** No license specified */\"", "modifier": "static public final", "original_string": "static public final String MISSING_LICENSE_TEXT = \"/** No license specified */\";", "type": "String", "var_name": "MISSING_LICENSE_TEXT" ...
{ "body": "static public EngineConfiguration createFromProperties(String propertiesName) throws IOException {\n Properties props = new Properties();\n props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesName));\n return createFromProperties(props);\n }", "...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 15374337, "size": 5277, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/vanioinformatika/easydao" }
196110471_18
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRenderByteToHex()\n {\n char[] ach = new char[2];\n Assert.assertEquals(2, renderByteToHex(0x1F, ach, 0));\n Assert.assertEquals(\"1F\", new String(ach));\n }", "class_method_signature": "HandyTest.testRenderByteToHex()", "constructor": fals...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static int renderByteToHex(int n, char[] ach, int of)\n {\n ach[of ] = nibbleToChar(n >> 4);\n ach[of+1] = nibbleToChar(n);\n return of + 2;\n }", "class_method_signature": "Handy.renderByteToHex(int n, char[] ach, int of)", "constructor": false, "full_signa...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_0
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/PackedIntegerTest.java", "identifier": "PackedIntegerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWritePackedLong()\n throws IOException\n {\n // tiny\n for (int i = -64; i <= 63; ++i)\n {\n StringBuilder sb = new StringBuilder();\n writeLong(dos(sb), i);\n Assert.assertEquals(\"i=\"+i, 2, sb.length()...
{ "fields": [ { "declarator": "m_fInitialized", "modifier": "private", "original_string": "private boolean m_fInitialized;", "type": "boolean", "var_name": "m_fInitialized" }, { "declarator": "m_fBig", "modifier": "private", "original_string": "private boole...
{ "body": "public static void writeLong(DataOutput out, long l)\n throws IOException\n {\n // test for Tiny\n if (l <= 63 && l >= -64)\n {\n out.writeByte(((int) l) << 1 | 0x01);\n return;\n }\n\n final int cBits = 65 - Long.numberOfLe...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_22
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIndentLines()\n {\n Assert.assertEquals(\"\", indentLines(\"\", \" \"));\n Assert.assertEquals(\" x\", indentLines(\"x\", \" \"));\n Assert.assertEquals(\"..x\\n..y\", indentLines(\"x\\ny\", \"..\"));\n }", "class_method_signature": "Handy...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static String indentLines(String sText, String sIndent)\n {\n int cchOld = sText.length();\n if (cchOld == 0)\n {\n return \"\";\n }\n\n int cLines = countChar(sText, '\\n') + 1;\n int cchNew = cchOld + cLines * sIndent.length();\n ...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_14
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCountHexDigits2()\n {\n Assert.assertEquals(1, countHexDigits(0x00000000L));\n Assert.assertEquals(1, countHexDigits(0x00000007L));\n Assert.assertEquals(2, countHexDigits(0x000000FFL));\n Assert.assertEquals(3, countHexDigits(0x00000A18L));\n ...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static int countHexDigits(int n)\n {\n return Math.max((32 - Integer.numberOfLeadingZeros(n) + 3) / 4, 1);\n }", "class_method_signature": "Handy.countHexDigits(int n)", "constructor": false, "full_signature": "public static int countHexDigits(int n)", "identifier": "cou...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_15
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAppendLongAsHex()\n {\n StringBuilder sb = new StringBuilder();\n\n Assert.assertEquals(sb, appendLongAsHex(sb, 0x123456789ABCDEF0L));\n Assert.assertEquals(sb.toString(), \"123456789ABCDEF0\");\n }", "class_method_signature": "HandyTest.testA...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static StringBuilder appendLongAsHex(StringBuilder sb, long n, int cch)\n {\n assert cch >= 0 && cch <= 16;\n for (int cBits = (cch-1) * 4; cBits >= 0; cBits -= 4)\n {\n sb.append(nibbleToChar((int) (n >> cBits)));\n }\n return sb;\n ...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_23
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsDigit()\n {\n Assert.assertTrue(isDigit('0'));\n Assert.assertTrue(isDigit('1'));\n Assert.assertTrue(isDigit('2'));\n Assert.assertTrue(isDigit('3'));\n Assert.assertTrue(isDigit('4'));\n Assert.assertTrue(isDigit('5'));\n ...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static boolean isDigit(char ch)\n {\n return ch >= '0' & ch <= '9';\n }", "class_method_signature": "Handy.isDigit(char ch)", "constructor": false, "full_signature": "public static boolean isDigit(char ch)", "identifier": "isDigit", "invocations": [], "modifiers": "p...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_1
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNibbleToChar()\n {\n Assert.assertEquals(nibbleToChar(0x00), '0');\n Assert.assertEquals(nibbleToChar(0x01), '1');\n Assert.assertEquals(nibbleToChar(0x02), '2');\n Assert.assertEquals(nibbleToChar(0x03), '3');\n Assert.assertEquals(nibbl...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static char nibbleToChar(int n)\n {\n n = n & 0xF;\n return (n <= 9)\n ? (char) ('0' + n)\n : (char) ('A' - 0xA + n);\n }", "class_method_signature": "Handy.nibbleToChar(int n)", "constructor": false, "full_signature": "public static ch...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_19
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRenderIntToHex()\n {\n char[] ach = new char[4];\n Assert.assertEquals(4, renderIntToHex(0x1F2EABCD, ach, 0, 4));\n Assert.assertEquals(\"ABCD\", new String(ach));\n\n ach = new char[10];\n Arrays.fill(ach, ' ');\n Assert.assertEqu...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static int renderIntToHex(int n, char[] ach, int of, int cch)\n {\n for (int i = 0; i < cch; ++i)\n {\n ach[of+cch-i-1] = nibbleToChar(n);\n n >>>= 4;\n }\n return of + cch;\n }", "class_method_signature": "Handy.renderIntToHe...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_12
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAppendIntAsHex2()\n {\n StringBuilder sb = new StringBuilder();\n\n Assert.assertEquals(sb, appendIntAsHex(sb, 0x12345678, 4));\n Assert.assertEquals(sb.toString(), \"5678\");\n }", "class_method_signature": "HandyTest.testAppendIntAsHex2()", ...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static StringBuilder appendIntAsHex(StringBuilder sb, int n, int cch)\n {\n assert cch >= 0 && cch <= 8;\n for (int cBits = (cch-1) * 4; cBits >= 0; cBits -= 4)\n {\n sb.append(nibbleToChar(n >> cBits));\n }\n return sb;\n }", "cl...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_28
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAppendChar()\n {\n StringBuilder sb = new StringBuilder();\n Assert.assertEquals(sb, appendChar(sb, 'x'));\n Assert.assertEquals(sb, appendChar(sb, '\\t'));\n Assert.assertEquals(sb, appendChar(sb, '\\n'));\n Assert.assertEquals(sb, appen...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static StringBuilder appendChar(StringBuilder sb, char ch)\n {\n if (isCharEscaped(ch))\n {\n switch (ch)\n {\n case '\\\\':\n return sb.append(\"\\\\\\\\\");\n case '\\b':\n return...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_32
{ "fields": [], "file": "javatools/src/test/java/org/xvm/asm/VersionTest.java", "identifier": "VersionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSubstitutables()\n {\n Assert.assertTrue (new Version(\"0\" ).isSubstitutableFor(new Version(\"beta\" )));\n Assert.assertTrue (new Version(\"1\" ).isSubstitutableFor(new Version(\"beta\" )));\n Assert.assertTrue (new Version(\"0\...
{ "fields": [ { "declarator": "PREFIX = {\"CI\", \"Dev\", \"QC\", \"alpha\", \"beta\", \"rc\"}", "modifier": "private static final", "original_string": "private static final String[] PREFIX = {\"CI\", \"Dev\", \"QC\", \"alpha\", \"beta\", \"rc\"};", "type": "String[]", "var_name": "P...
{ "body": "public boolean isSubstitutableFor(Version that)\n {\n if (this.equals(that))\n {\n return true;\n }\n\n // check all of the shared version parts (except for the last shared version part) to make\n // sure that they are identical; for example, whe...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_6
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testByteArrayToHexString()\n {\n Assert.assertEquals(byteArrayToHexString(new byte[] {}), \"0x\");\n Assert.assertEquals(byteArrayToHexString(new byte[] {0x01, (byte) 0xFF, 0x78, 0x5A}), \"0x01FF785A\");\n Assert.assertEquals(byteArrayToHexString(new byte[...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static String byteArrayToHexString(byte[] ab, int of, int cb)\n {\n return appendByteArrayAsHex(new StringBuilder(2 + cb * 2).append(\"0x\"),\n ab, of, cb).toString();\n }", "class_method_signature": "Handy.byteArrayToHexString(byte[] ab, int of, int cb)", "co...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_24
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDigitValue()\n {\n Assert.assertEquals(0, digitValue('0'));\n Assert.assertEquals(1, digitValue('1'));\n Assert.assertEquals(2, digitValue('2'));\n Assert.assertEquals(3, digitValue('3'));\n Assert.assertEquals(4, digitValue('4'));\n ...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static int digitValue(char ch)\n {\n assert isDigit(ch);\n return ch - '0';\n }", "class_method_signature": "Handy.digitValue(char ch)", "constructor": false, "full_signature": "public static int digitValue(char ch)", "identifier": "digitValue", "invocations": [...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_25
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsHexit()\n {\n Assert.assertTrue(isHexit('0'));\n Assert.assertTrue(isHexit('1'));\n Assert.assertTrue(isHexit('2'));\n Assert.assertTrue(isHexit('3'));\n Assert.assertTrue(isHexit('4'));\n Assert.assertTrue(isHexit('5'));\n ...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static boolean isHexit(char ch)\n {\n // hexits in the unicode range appear in this order:\n // {..., 0, ..., 9, ..., A, ..., F, ..., a, ..., f, ...}\n // so a hexit has to be in the range 0..f, and the entire character\n // range from 0..f is only 0x36 (so it fi...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_7
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testHexStringToByteArray()\n {\n Assert.assertTrue(Arrays.equals(hexStringToByteArray(\"01FF785A\"),\n new byte[] {0x01, (byte) 0xFF, 0x78, 0x5A}));\n Assert.assertTrue(Arrays.equals(hexStringToByteArray(\"0x01FF785A\"),\n new byte[]...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static byte[] hexStringToByteArray(String s)\n {\n int ofch = 0;\n int cch = s.length();\n int ofb = 0;\n int cb = (cch + 1) / 2;\n\n // check for (and skip) the \"0x\" prefix\n if (s.charAt(0) == '0' && (s.charAt(1) == 'x' || s.charAt(1) == 'X'))...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_29
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testQuotedChar()\n {\n Assert.assertEquals(\"'x'\", quotedChar('x'));\n Assert.assertEquals(\"'\\\\n'\", quotedChar('\\n'));\n Assert.assertEquals(\"'\\\\\".concat(\"u0000'\"), quotedChar((char) 0));\n }", "class_method_signature": "HandyTest.test...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static String quotedChar(char ch)\n {\n return appendChar(new StringBuilder(9).append('\\''), ch).append('\\'').toString();\n }", "class_method_signature": "Handy.quotedChar(char ch)", "constructor": false, "full_signature": "public static String quotedChar(char ch)", "i...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_13
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIntToHexString()\n {\n Assert.assertEquals(intToHexString(0), \"0x00000000\");\n Assert.assertEquals(intToHexString(0x12345678), \"0x12345678\");\n Assert.assertEquals(intToHexString(-1), \"0xFFFFFFFF\");\n }", "class_method_signature": "Handy...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static String intToHexString(int n)\n {\n return appendIntAsHex(new StringBuilder(10).append(\"0x\"), n).toString();\n }", "class_method_signature": "Handy.intToHexString(int n)", "constructor": false, "full_signature": "public static String intToHexString(int n)", "iden...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_8
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testByteArrayToHexDump()\n throws IOException\n {\n Assert.assertEquals(\"00: 41 42 AB\\n02: 43 C \", byteArrayToHexDump(\"ABC\".getBytes(), 2));\n }", "class_method_signature": "HandyTest.testByteArrayToHexDump()", "constructor": false, "full...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static String byteArrayToHexDump(byte[] ab, int of, int cb, int cBytesPerLine)\n {\n assert ab != null;\n assert of >= 0 && cb >= 0 && of + cb <= ab.length;\n assert cBytesPerLine > 0;\n\n // first figure out how many digits it will take to show the address\n ...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_10
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCountHexDigits()\n {\n Assert.assertEquals(1, countHexDigits(0x00000000));\n Assert.assertEquals(1, countHexDigits(0x00000007));\n Assert.assertEquals(2, countHexDigits(0x000000FF));\n Assert.assertEquals(3, countHexDigits(0x00000A18));\n ...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static int countHexDigits(int n)\n {\n return Math.max((32 - Integer.numberOfLeadingZeros(n) + 3) / 4, 1);\n }", "class_method_signature": "Handy.countHexDigits(int n)", "constructor": false, "full_signature": "public static int countHexDigits(int n)", "identifier": "cou...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_26
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testHexitValue()\n {\n Assert.assertEquals(0, hexitValue('0'));\n Assert.assertEquals(1, hexitValue('1'));\n Assert.assertEquals(2, hexitValue('2'));\n Assert.assertEquals(3, hexitValue('3'));\n Assert.assertEquals(4, hexitValue('4'));\n ...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static int hexitValue(char ch)\n {\n assert isHexit(ch);\n return ch <= '9' ? ch - '0' : (ch | 0x20) - ('a' - 0xA);\n }", "class_method_signature": "Handy.hexitValue(char ch)", "constructor": false, "full_signature": "public static int hexitValue(char ch)", "ident...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_4
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAppendByteArrayAsHex()\n {\n StringBuilder sb = new StringBuilder();\n Assert.assertEquals(sb, appendByteArrayAsHex(sb,\n new byte[] {0x01, (byte) 0xFF, 0x78, 0x5A}));\n Assert.assertEquals(sb.toString(), \"01FF785A\");\n }", "c...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static StringBuilder appendByteArrayAsHex(StringBuilder sb, byte[] ab, int of, int cb)\n {\n sb.ensureCapacity(sb.length() + cb * 2);\n while (--cb >= 0)\n {\n int n = ab[of++];\n sb.append(nibbleToChar(n >> 4))\n .append(nibbleToCha...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_30
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAppendString()\n {\n StringBuilder sb = new StringBuilder();\n Assert.assertEquals(sb, appendString(sb, \"hello\\nworld\"));\n Assert.assertEquals(\"hello\\\\nworld\", sb.toString());\n }", "class_method_signature": "HandyTest.testAppendString...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static StringBuilder appendString(StringBuilder sb, String s)\n {\n for (int of = 0, cch = s.length(); of < cch; ++of)\n {\n appendChar(sb, s.charAt(of));\n }\n return sb;\n }", "class_method_signature": "Handy.appendString(StringBuilder...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_31
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testQuotedString()\n {\n Assert.assertEquals(\"\\\"x\\\\ny\\\"\", quotedString(\"x\\ny\"));\n }", "class_method_signature": "HandyTest.testQuotedString()", "constructor": false, "full_signature": "@Test public void testQuotedString()", "identifier": "test...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static String quotedString(String s)\n {\n return appendString(new StringBuilder(s.length() + 2).append('\\\"'), s).append(\n '\\\"').toString();\n }", "class_method_signature": "Handy.quotedString(String s)", "constructor": false, "full_signature": "public ...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_5
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAppendByteArrayAsHex2()\n {\n StringBuilder sb = new StringBuilder();\n Assert.assertEquals(sb, appendByteArrayAsHex(sb, new byte[] {0x01, (byte) 0xFF, 0x78, 0x5A}, 1, 2));\n Assert.assertEquals(sb.toString(), \"FF78\");\n }", "class_method_si...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static StringBuilder appendByteArrayAsHex(StringBuilder sb, byte[] ab, int of, int cb)\n {\n sb.ensureCapacity(sb.length() + cb * 2);\n while (--cb >= 0)\n {\n int n = ab[of++];\n sb.append(nibbleToChar(n >> 4))\n .append(nibbleToCha...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_27
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsCharEscaped()\n {\n // the automatically-escaped portion of the ascii range\n for (int i = 0; i < 0x20; ++i)\n {\n Assert.assertTrue(isCharEscaped((char) i));\n }\n\n // the rest of the ascii range\n for (int i...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static boolean isCharEscaped(char ch)\n {\n if (ch < 0x80)\n {\n return ch < 0x20 || ch == '\\'' || ch == '\\\"' || ch == '\\\\' || ch == 0x7F;\n }\n else\n {\n return !Character.isValidCodePoint(ch) ||\n ...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_11
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAppendIntAsHex()\n {\n StringBuilder sb = new StringBuilder();\n\n Assert.assertEquals(sb, appendIntAsHex(sb, 0x12345678));\n Assert.assertEquals(sb.toString(), \"12345678\");\n }", "class_method_signature": "HandyTest.testAppendIntAsHex()", ...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static StringBuilder appendIntAsHex(StringBuilder sb, int n, int cch)\n {\n assert cch >= 0 && cch <= 8;\n for (int cBits = (cch-1) * 4; cBits >= 0; cBits -= 4)\n {\n sb.append(nibbleToChar(n >> cBits));\n }\n return sb;\n }", "cl...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_9
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testByteArrayToHexDump2()\n throws IOException\n {\n byte[] ab = new byte[0x700];\n ab[0x500] = (byte) 'A';\n ab[0x501] = (byte) 'B';\n ab[0x502] = (byte) 'C';\n Assert.assertEquals(\"0500: 41 42 43 00 ABC.\\n0504: 00 00 00 ... ...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static String byteArrayToHexDump(byte[] ab, int of, int cb, int cBytesPerLine)\n {\n assert ab != null;\n assert of >= 0 && cb >= 0 && of + cb <= ab.length;\n assert cBytesPerLine > 0;\n\n // first figure out how many digits it will take to show the address\n ...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_20
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRenderLongToHex()\n {\n char[] ach = new char[4];\n Assert.assertEquals(4, renderLongToHex(0x1F2EABCDL, ach, 0, 4));\n Assert.assertEquals(\"ABCD\", new String(ach));\n\n ach = new char[18];\n Arrays.fill(ach, ' ');\n Assert.assert...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static int renderLongToHex(long n, char[] ach, int of, int cch)\n {\n for (int i = 0; i < cch; ++i)\n {\n ach[of+cch-i-1] = nibbleToChar((int) n);\n n >>>= 4;\n }\n return of + cch;\n }", "class_method_signature": "Handy.rende...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_2
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAppendByteAsHex()\n {\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"0x\");\n Assert.assertEquals(sb, appendByteAsHex(sb, 0x12345678));\n Assert.assertEquals(sb.toString(), \"0x78\");\n }", "class_method_signature": "HandyTes...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static StringBuilder appendByteAsHex(StringBuilder sb, int n)\n {\n return sb.append(nibbleToChar(n >> 4))\n .append(nibbleToChar(n));\n }", "class_method_signature": "Handy.appendByteAsHex(StringBuilder sb, int n)", "constructor": false, "full_signature": ...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_16
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAppendLongAsHex2()\n {\n StringBuilder sb = new StringBuilder();\n\n Assert.assertEquals(sb, appendLongAsHex(sb, 0x123456789ABCDEF0L, 9));\n Assert.assertEquals(sb.toString(), \"89ABCDEF0\");\n }", "class_method_signature": "HandyTest.testAppe...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static StringBuilder appendLongAsHex(StringBuilder sb, long n, int cch)\n {\n assert cch >= 0 && cch <= 16;\n for (int cBits = (cch-1) * 4; cBits >= 0; cBits -= 4)\n {\n sb.append(nibbleToChar((int) (n >> cBits)));\n }\n return sb;\n ...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_17
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLongToHexString()\n {\n Assert.assertEquals(\"0x0000000000000000\", longToHexString(0));\n Assert.assertEquals(\"0x123456789ABCDEF0\", longToHexString(0x123456789ABCDEF0L));\n Assert.assertEquals(\"0xFFFFFFFFFFFFFFFF\", longToHexString(-1));\n }...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static String longToHexString(long n)\n {\n return appendLongAsHex(new StringBuilder(18).append(\"0x\"), n).toString();\n }", "class_method_signature": "Handy.longToHexString(long n)", "constructor": false, "full_signature": "public static String longToHexString(long n)", ...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_3
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testByteToHexString()\n {\n Assert.assertEquals(byteToHexString(0), \"0x00\");\n Assert.assertEquals(byteToHexString(0x12345678), \"0x78\");\n Assert.assertEquals(byteToHexString(0xFF), \"0xFF\");\n }", "class_method_signature": "HandyTest.testByt...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static String byteToHexString(int n)\n {\n return appendByteAsHex(new StringBuilder(4).append(\"0x\"), n).toString();\n }", "class_method_signature": "Handy.byteToHexString(int n)", "constructor": false, "full_signature": "public static String byteToHexString(int n)", "i...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
196110471_21
{ "fields": [], "file": "utils/src/test/java/org/xvm/util/HandyTest.java", "identifier": "HandyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCountChar()\n {\n Assert.assertEquals(0, countChar(\"\", '.'));\n Assert.assertEquals(1, countChar(\".\", '.'));\n Assert.assertEquals(1, countChar(\"x.\", '.'));\n Assert.assertEquals(1, countChar(\".x\", '.'));\n Assert.assertEquals(2, ...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static", "original_string": "public static byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_CHAR_ARRAY = new char[0]", ...
{ "body": "public static int countChar(String s, char ch)\n {\n int c = 0;\n int of = s.indexOf(ch);\n while (of >= 0)\n {\n ++c;\n of = s.indexOf(ch, of + 1);\n }\n return c;\n }", "class_method_signature": "Handy.countChar(Stri...
{ "created": "7/10/2019 1:46:15 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 196110471, "size": null, "stargazer_count": null, "stars": 47, "updates": "2020-01-27T02:21:27+00:00", "url": "https://github.com/xtclang/xvm" }
48056143_0
{ "fields": [], "file": "apex-benchmarks/src/test/java/apex/benchmark/ApplicationWithDCWithoutDeserializerTest.java", "identifier": "ApplicationWithDCWithoutDeserializerTest", "interfaces": "", "superclass": "extends ApplicationWithDCWithoutDeserializer" }
{ "body": "@Test\n public void test() throws Exception\n {\n Configuration conf = new Configuration(false);\n conf.set(PROP_STORE_PATH, \"target/tmp\");\n\n LocalMode lma = LocalMode.newInstance();\n DAG dag = lma.getDAG();\n\n super.populateDAG(dag, conf);\n\n StreamingApplication app = new Strea...
{ "fields": [ { "declarator": "APP_NAME = \"AppWithDCWithoutDe\"", "modifier": "public static final", "original_string": "public static final String APP_NAME = \"AppWithDCWithoutDe\";", "type": "String", "var_name": "APP_NAME" }, { "declarator": "PARTITION_NUM = 20", ...
{ "body": "@Override\n public void populateDAG(DAG dag, Configuration configuration)\n {\n redisServer = configuration.get(\"dt.application.AppWithDCWithoutDe.redisServer\");\n \n DefaultOutputPort<DimensionTuple> upstreamOutput = populateUpstreamDAG(dag, configuration);\n\n //populateHardCodedDimension...
{ "created": null, "fork": null, "fork_count": 279, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 48056143, "size": 103, "stargazer_count": 497, "stars": null, "updates": null, "url": "https://github.com/yahoo/streaming-benchmarks" }
69255078_10
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RangeLockTest.java", "identifier": "RangeLockTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLockUnlock() {\n RangeLock rangeLock = new RangeLock(8192);\n Lock l = rangeLock.tryWriteLock(0, 8192 * 2).get();\n l.unlock();\n }", "class_method_signature": "RangeLockTest.testLockUnlock()", "constructor": false, "full_signature": "@Test public vo...
{ "fields": [ { "declarator": "LOGGER = getLogger(RangeLock.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = getLogger(RangeLock.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "blockSize", "...
{ "body": "public Optional<Lock> tryWriteLock(long position, long length) {\n return fromNullable(lockWrite0(position, length));\n }", "class_method_signature": "RangeLock.tryWriteLock(long position, long length)", "constructor": false, "full_signature": "public Optional<Lock> tryWriteLock(long positi...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_3
{ "fields": [ { "declarator": "path", "modifier": "private", "original_string": "private Path path;", "type": "Path", "var_name": "path" }, { "declarator": "rule = new RunTestOnContextRx()", "modifier": "@Rule\n public final", "original_string": "@Rule\n ...
{ "body": "@Test\n public void testSingleWriteReadHashSizeAckDeleteTtlCreateDateTime(TestContext context) {\n\n SfsVertx sfsVertx = new SfsVertxImpl(rule.vertx(), backgroundPool, ioPool);\n\n final Buffer expectedBuffer = Buffer.buffer(\"HELLO\");\n final VolumeV1 sfsDataV1 = new VolumeV1(path...
{ "fields": [ { "declarator": "logger", "modifier": "private final", "original_string": "private final Logger logger;", "type": "Logger", "var_name": "logger" }, { "declarator": "MAX_GC_AGE = TimeUnit.DAYS.toMillis(4)", "modifier": "public static final", "or...
{ "body": "@Override\n public Observable<Void> open(SfsVertx vertx) {\n final VolumeV1 _this = this;\n return Defer.aVoid()\n .doOnNext(aVoid -> Preconditions.checkState(volumeState.compareAndSet(Status.STOPPED, Status.STARTING)))\n .doOnNext(aVoid -> logger.info(\"Start...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_2
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/math/RoundingTest.java", "identifier": "RoundingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDown() {\n int blockSize = 8 * 1024;\n // less\n Assert.assertEquals(0, Rounding.down(0, blockSize));\n Assert.assertEquals(0, Rounding.down(1, blockSize));\n Assert.assertEquals(0, Rounding.down(2, blockSize));\n\n // equals\n Ass...
{ "fields": [], "file": "sfs-server/src/main/java/org/sfs/math/Rounding.java", "identifier": "Rounding", "interfaces": "", "methods": [ { "class_method_signature": "Rounding.up(long num, int factor)", "constructor": false, "full_signature": "public static long up(long num, int factor)", ...
{ "body": "public static long down(long num, int factor) {\n if (num < factor) {\n return 0;\n } else if (num % factor == 0) {\n return num;\n } else {\n return num / factor * factor;\n }\n }", "class_method_signature": "Rounding.down(long num, int fac...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_11
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RangeLockTest.java", "identifier": "RangeLockTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFirstWriterLockSecondWriterLock() {\n RangeLock rangeLock = new RangeLock(8192);\n Optional<Lock> l = rangeLock.tryWriteLock(0, 8192 * 2);\n Optional<Lock> l2 = rangeLock.tryWriteLock(0, 8192 * 2);\n assertTrue(l.isPresent());\n assertFalse(l2.i...
{ "fields": [ { "declarator": "LOGGER = getLogger(RangeLock.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = getLogger(RangeLock.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "blockSize", "...
{ "body": "public Optional<Lock> tryWriteLock(long position, long length) {\n return fromNullable(lockWrite0(position, length));\n }", "class_method_signature": "RangeLock.tryWriteLock(long position, long length)", "constructor": false, "full_signature": "public Optional<Lock> tryWriteLock(long positi...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_5
{ "fields": [ { "declarator": "path", "modifier": "private", "original_string": "private Path path;", "type": "Path", "var_name": "path" }, { "declarator": "rule = new RunTestOnContextRx()", "modifier": "@Rule\n public final", "original_string": "@Rule\n ...
{ "body": "@Test\n public void testSingleSweeperUnacknowledgedRealloc(TestContext context) {\n\n SfsVertx sfsVertx = new SfsVertxImpl(rule.vertx(), backgroundPool, ioPool);\n\n final Buffer expectedBuffer = Buffer.buffer(\"HELLO\");\n final VolumeV1 sfsDataV1 = new VolumeV1(path);\n\n f...
{ "fields": [ { "declarator": "logger", "modifier": "private final", "original_string": "private final Logger logger;", "type": "Logger", "var_name": "logger" }, { "declarator": "MAX_GC_AGE = TimeUnit.DAYS.toMillis(4)", "modifier": "public static final", "or...
{ "body": "@Override\n public Observable<Void> open(SfsVertx vertx) {\n final VolumeV1 _this = this;\n return Defer.aVoid()\n .doOnNext(aVoid -> Preconditions.checkState(volumeState.compareAndSet(Status.STOPPED, Status.STARTING)))\n .doOnNext(aVoid -> logger.info(\"Start...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_20
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RangeTest.java", "identifier": "RangeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRemove4() {\n Range rangeOne = new Range(0, 100);\n try {\n Range[] rangeTwo = rangeOne.remove(-1, 5);\n fail();\n } catch (Throwable e) {\n assertTrue(e instanceof IllegalStateException);\n }\n }", "class_method_s...
{ "fields": [ { "declarator": "first", "modifier": "private final", "original_string": "private final long first;", "type": "long", "var_name": "first" }, { "declarator": "last", "modifier": "private final", "original_string": "private final long last;", ...
{ "body": "public Range[] remove(Range toRemove) {\n return remove(toRemove.first, toRemove.last);\n }", "class_method_signature": "Range.remove(Range toRemove)", "constructor": false, "full_signature": "public Range[] remove(Range toRemove)", "identifier": "remove", "invocations": [ "remove" ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_16
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RangeTest.java", "identifier": "RangeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRemove0() {\n Range rangeOne = new Range(6, 15);\n Range[] rangeTwo = rangeOne.remove(6, 6);\n assertArrayEquals(new Range[]{new Range(7, 15)}, rangeTwo);\n }", "class_method_signature": "RangeTest.testRemove0()", "constructor": false, "full_signatur...
{ "fields": [ { "declarator": "first", "modifier": "private final", "original_string": "private final long first;", "type": "long", "var_name": "first" }, { "declarator": "last", "modifier": "private final", "original_string": "private final long last;", ...
{ "body": "public Range[] remove(Range toRemove) {\n return remove(toRemove.first, toRemove.last);\n }", "class_method_signature": "Range.remove(Range toRemove)", "constructor": false, "full_signature": "public Range[] remove(Range toRemove)", "identifier": "remove", "invocations": [ "remove" ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_9
{ "fields": [ { "declarator": "accountName = \"testaccount\"", "modifier": "private final", "original_string": "private final String accountName = \"testaccount\";", "type": "String", "var_name": "accountName" }, { "declarator": "containerName = \"testcontainer\"", ...
{ "body": "@Test\n public void testReEncrypt(TestContext context) {\n runOnServerContext(context, () -> {\n ContainerKeys containerKeys = vertxContext().verticle().containerKeys();\n\n return prepareContainer(context)\n .map(aVoid -> fromPaths(accountName).accountPat...
{ "fields": [ { "declarator": "LOGGER = getLogger(ContainerKeys.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = getLogger(ContainerKeys.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "DEFAULT_PAD...
{ "body": "protected Observable<Void> reEncrypt(VertxContext<Server> vertxContext, PersistentContainerKey persistentContainerKey) {\n return defer(() -> {\n boolean isDebugEnabled = LOGGER.isDebugEnabled();\n if (isDebugEnabled) {\n LOGGER.debug(\"Starting reEncrypt of key ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_8
{ "fields": [ { "declarator": "rule = new RunTestOnContextRx()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final RunTestOnContextRx rule = new RunTestOnContextRx();", "type": "RunTestOnContextRx", "var_name": "rule" } ], "file": "sfs-server/...
{ "body": "@Test\n public void testIterateManyNoStackOverflow(TestContext context) {\n Vertx vertx = rule.vertx();\n int size = 100000;\n List<Integer> expectedList = newArrayListWithCapacity(size);\n for (int i = 0; i < size; i++) {\n expectedList.add(i);\n }\n ...
{ "fields": [], "file": "sfs-server/src/main/java/org/sfs/rx/RxHelper.java", "identifier": "RxHelper", "interfaces": "", "methods": [ { "class_method_signature": "RxHelper.onErrorResumeNext(int count, Func0<Observable<T>> func0)", "constructor": false, "full_signature": "public static Ob...
{ "body": "public static <A> Observable<Boolean> iterate(Vertx vertx, final Iterable<? extends A> items, final Func1<A, Observable<Boolean>> func1) {\n ObservableFuture<Boolean> handler = RxHelper.observableFuture();\n Observable.from(items)\n .concatMap(func1::call)\n .sub...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_17
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RangeTest.java", "identifier": "RangeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRemove1() {\n Range rangeOne = new Range(5, 15);\n Range[] rangeTwo = rangeOne.remove(5, 15);\n assertArrayEquals(new Range[]{}, rangeTwo);\n }", "class_method_signature": "RangeTest.testRemove1()", "constructor": false, "full_signature": "@Test publ...
{ "fields": [ { "declarator": "first", "modifier": "private final", "original_string": "private final long first;", "type": "long", "var_name": "first" }, { "declarator": "last", "modifier": "private final", "original_string": "private final long last;", ...
{ "body": "public Range[] remove(Range toRemove) {\n return remove(toRemove.first, toRemove.last);\n }", "class_method_signature": "Range.remove(Range toRemove)", "constructor": false, "full_signature": "public Range[] remove(Range toRemove)", "identifier": "remove", "invocations": [ "remove" ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_21
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RangeTest.java", "identifier": "RangeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRemove5() {\n Range rangeOne = new Range(0, 100);\n try {\n Range[] rangeTwo = rangeOne.remove(-1, 101);\n fail();\n } catch (Throwable e) {\n assertTrue(e instanceof IllegalStateException);\n }\n }", "class_method...
{ "fields": [ { "declarator": "first", "modifier": "private final", "original_string": "private final long first;", "type": "long", "var_name": "first" }, { "declarator": "last", "modifier": "private final", "original_string": "private final long last;", ...
{ "body": "public Range[] remove(Range toRemove) {\n return remove(toRemove.first, toRemove.last);\n }", "class_method_signature": "Range.remove(Range toRemove)", "constructor": false, "full_signature": "public Range[] remove(Range toRemove)", "identifier": "remove", "invocations": [ "remove" ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_4
{ "fields": [ { "declarator": "path", "modifier": "private", "original_string": "private Path path;", "type": "Path", "var_name": "path" }, { "declarator": "rule = new RunTestOnContextRx()", "modifier": "@Rule\n public final", "original_string": "@Rule\n ...
{ "body": "@Test\n public void testSingleDeleteRealloc(TestContext context) {\n\n SfsVertx sfsVertx = new SfsVertxImpl(rule.vertx(), backgroundPool, ioPool);\n\n final Buffer expectedBuffer = Buffer.buffer(\"HELLO\");\n final VolumeV1 sfsDataV1 = new VolumeV1(path);\n\n long inThePast =...
{ "fields": [ { "declarator": "logger", "modifier": "private final", "original_string": "private final Logger logger;", "type": "Logger", "var_name": "logger" }, { "declarator": "MAX_GC_AGE = TimeUnit.DAYS.toMillis(4)", "modifier": "public static final", "or...
{ "body": "@Override\n public Observable<Void> open(SfsVertx vertx) {\n final VolumeV1 _this = this;\n return Defer.aVoid()\n .doOnNext(aVoid -> Preconditions.checkState(volumeState.compareAndSet(Status.STOPPED, Status.STARTING)))\n .doOnNext(aVoid -> logger.info(\"Start...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_22
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RecyclingAllocatorTest.java", "identifier": "RecyclingAllocatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetBytesFree(TestContext context) {\n int blockSize = 8 * 1024;\n RecyclingAllocator allocator = new RecyclingAllocator(blockSize);\n\n Async async = context.async();\n just((Void) null)\n .map(aVoid -> {\n allocator.a...
{ "fields": [ { "declarator": "mutex = new Object()", "modifier": "private final", "original_string": "private final Object mutex = new Object();", "type": "Object", "var_name": "mutex" }, { "declarator": "numberOfFreeRanges = new AtomicLong(0)", "modifier": "priv...
{ "body": "public long getBytesFree(long useableSpace) {\n synchronized (mutex) {\n useableSpace = Math.max(0, useableSpace);\n long free = 0;\n Range last = byPosition.lastEntry().getValue();\n for (Range range : byPosition.values()) {\n if (range == ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_7
{ "fields": [ { "declarator": "rule = new RunTestOnContextRx()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final RunTestOnContextRx rule = new RunTestOnContextRx();", "type": "RunTestOnContextRx", "var_name": "rule" } ], "file": "sfs-server/...
{ "body": "@Test\n public void testEarlyExit(TestContext context) {\n Vertx vertx = rule.vertx();\n List<Integer> expectedList = newArrayList(1, 2, 3, 4, 5, 6);\n List<Integer> actualList = new ArrayList<>();\n Async async = context.async();\n iterate(\n vertx,\n ...
{ "fields": [], "file": "sfs-server/src/main/java/org/sfs/rx/RxHelper.java", "identifier": "RxHelper", "interfaces": "", "methods": [ { "class_method_signature": "RxHelper.onErrorResumeNext(int count, Func0<Observable<T>> func0)", "constructor": false, "full_signature": "public static Ob...
{ "body": "public static <A> Observable<Boolean> iterate(Vertx vertx, final Iterable<? extends A> items, final Func1<A, Observable<Boolean>> func1) {\n ObservableFuture<Boolean> handler = RxHelper.observableFuture();\n Observable.from(items)\n .concatMap(func1::call)\n .sub...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_18
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RangeTest.java", "identifier": "RangeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRemove2() {\n Range rangeOne = new Range(0, 100);\n Range[] rangeTwo = rangeOne.remove(5, 15);\n assertArrayEquals(new Range[]{new Range(0, 4), new Range(16, 100)}, rangeTwo);\n }", "class_method_signature": "RangeTest.testRemove2()", "constructor": fa...
{ "fields": [ { "declarator": "first", "modifier": "private final", "original_string": "private final long first;", "type": "long", "var_name": "first" }, { "declarator": "last", "modifier": "private final", "original_string": "private final long last;", ...
{ "body": "public Range[] remove(Range toRemove) {\n return remove(toRemove.first, toRemove.last);\n }", "class_method_signature": "Range.remove(Range toRemove)", "constructor": false, "full_signature": "public Range[] remove(Range toRemove)", "identifier": "remove", "invocations": [ "remove" ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_14
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RangeLockTest.java", "identifier": "RangeLockTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLockRangeInBetween1() {\n RangeLock rangeLock = new RangeLock(8192);\n Lock l0 = rangeLock.tryWriteLock(0, 8192).get();\n Lock l1 = rangeLock.tryWriteLock(8192 * 2, 8192).get();\n Lock l2 = rangeLock.tryWriteLock(8192, 8192).get();\n\n }", "class_...
{ "fields": [ { "declarator": "LOGGER = getLogger(RangeLock.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = getLogger(RangeLock.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "blockSize", "...
{ "body": "public Optional<Lock> tryWriteLock(long position, long length) {\n return fromNullable(lockWrite0(position, length));\n }", "class_method_signature": "RangeLock.tryWriteLock(long position, long length)", "constructor": false, "full_signature": "public Optional<Lock> tryWriteLock(long positi...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_15
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RangeLockTest.java", "identifier": "RangeLockTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLockRangeInBetween2() {\n RangeLock rangeLock = new RangeLock(8192);\n Lock l0 = rangeLock.tryWriteLock(0, 8192).get();\n Lock l1 = rangeLock.tryWriteLock(8192 * 2, 8192 * 2).get();\n assertFalse(rangeLock.tryWriteLock(8192 * 3, 8192).isPresent());\n\n...
{ "fields": [ { "declarator": "LOGGER = getLogger(RangeLock.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = getLogger(RangeLock.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "blockSize", "...
{ "body": "public Optional<Lock> tryWriteLock(long position, long length) {\n return fromNullable(lockWrite0(position, length));\n }", "class_method_signature": "RangeLock.tryWriteLock(long position, long length)", "constructor": false, "full_signature": "public Optional<Lock> tryWriteLock(long positi...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_19
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RangeTest.java", "identifier": "RangeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRemove3() {\n Range rangeOne = new Range(0, 100);\n try {\n Range[] rangeTwo = rangeOne.remove(5, 101);\n fail();\n } catch (Throwable e) {\n assertTrue(e instanceof IllegalStateException);\n }\n }", "class_method_...
{ "fields": [ { "declarator": "first", "modifier": "private final", "original_string": "private final long first;", "type": "long", "var_name": "first" }, { "declarator": "last", "modifier": "private final", "original_string": "private final long last;", ...
{ "body": "public Range[] remove(Range toRemove) {\n return remove(toRemove.first, toRemove.last);\n }", "class_method_signature": "Range.remove(Range toRemove)", "constructor": false, "full_signature": "public Range[] remove(Range toRemove)", "identifier": "remove", "invocations": [ "remove" ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_6
{ "fields": [ { "declarator": "rule = new RunTestOnContextRx()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final RunTestOnContextRx rule = new RunTestOnContextRx();", "type": "RunTestOnContextRx", "var_name": "rule" } ], "file": "sfs-server/...
{ "body": "@Test\n public void testIterate(TestContext context) {\n Vertx vertx = rule.vertx();\n List<Integer> expectedList = newArrayList(1, 2, 3, 4, 5, 6);\n List<Integer> actualList = new ArrayList<>();\n Async async = context.async();\n iterate(\n vertx,\n ...
{ "fields": [], "file": "sfs-server/src/main/java/org/sfs/rx/RxHelper.java", "identifier": "RxHelper", "interfaces": "", "methods": [ { "class_method_signature": "RxHelper.onErrorResumeNext(int count, Func0<Observable<T>> func0)", "constructor": false, "full_signature": "public static Ob...
{ "body": "public static <A> Observable<Boolean> iterate(Vertx vertx, final Iterable<? extends A> items, final Func1<A, Observable<Boolean>> func1) {\n ObservableFuture<Boolean> handler = RxHelper.observableFuture();\n Observable.from(items)\n .concatMap(func1::call)\n .sub...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_23
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RecyclingAllocatorTest.java", "identifier": "RecyclingAllocatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAllocRandomPositions(TestContext context) {\n\n int blockSize = 8 * 1024;\n RecyclingAllocator allocator = new RecyclingAllocator(blockSize);\n\n Async async = context.async();\n just((Void) null)\n .map(aVoid -> allocator.allocNextAvail...
{ "fields": [ { "declarator": "mutex = new Object()", "modifier": "private final", "original_string": "private final Object mutex = new Object();", "type": "Object", "var_name": "mutex" }, { "declarator": "numberOfFreeRanges = new AtomicLong(0)", "modifier": "priv...
{ "body": "public long allocNextAvailable(long length) {\n Range match = null;\n synchronized (mutex) {\n Map.Entry<Long, NavigableSet<Range>> entry = bySize.ceilingEntry(length);\n if (entry != null) {\n long numberOfBlocks = entry.getKey();\n Navigab...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_12
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RangeLockTest.java", "identifier": "RangeLockTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFirstReaderLockSecondReaderLock() {\n RangeLock rangeLock = new RangeLock(8192);\n Optional<Lock> l = rangeLock.tryReadLock(0, 8192 * 2);\n Optional<Lock> l2 = rangeLock.tryReadLock(0, 8192 * 2);\n assertTrue(l.isPresent());\n assertTrue(l2.isPr...
{ "fields": [ { "declarator": "LOGGER = getLogger(RangeLock.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = getLogger(RangeLock.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "blockSize", "...
{ "body": "public Optional<Lock> tryReadLock(long position, long length) {\n return fromNullable(lockRead0(position, length));\n }", "class_method_signature": "RangeLock.tryReadLock(long position, long length)", "constructor": false, "full_signature": "public Optional<Lock> tryReadLock(long position, ...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_1
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/math/RoundingTest.java", "identifier": "RoundingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUp() {\n int blockSize = 8 * 1024;\n // less\n Assert.assertEquals(blockSize, Rounding.up(0, blockSize));\n Assert.assertEquals(blockSize, Rounding.up(1, blockSize));\n Assert.assertEquals(blockSize, Rounding.up(2, blockSize));\n\n // equ...
{ "fields": [], "file": "sfs-server/src/main/java/org/sfs/math/Rounding.java", "identifier": "Rounding", "interfaces": "", "methods": [ { "class_method_signature": "Rounding.up(long num, int factor)", "constructor": false, "full_signature": "public static long up(long num, int factor)", ...
{ "body": "public static long up(long num, int factor) {\n if (num <= factor) {\n return factor;\n } else if (num % factor == 0) {\n return num;\n } else {\n return LongMath.checkedAdd(num / factor * factor, factor);\n }\n }", "class_method_signature":...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_0
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/math/RoundingTest.java", "identifier": "RoundingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test(){\n System.out.println(Rounding.up(136359, 8192));\n }", "class_method_signature": "RoundingTest.test()", "constructor": false, "full_signature": "@Test public void test()", "identifier": "test", "invocations": [ "println", "up" ], "modifiers": "...
{ "fields": [], "file": "sfs-server/src/main/java/org/sfs/math/Rounding.java", "identifier": "Rounding", "interfaces": "", "methods": [ { "class_method_signature": "Rounding.up(long num, int factor)", "constructor": false, "full_signature": "public static long up(long num, int factor)", ...
{ "body": "public static long up(long num, int factor) {\n if (num <= factor) {\n return factor;\n } else if (num % factor == 0) {\n return num;\n } else {\n return LongMath.checkedAdd(num / factor * factor, factor);\n }\n }", "class_method_signature":...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
69255078_13
{ "fields": [], "file": "sfs-server/src/test/java/org/sfs/block/RangeLockTest.java", "identifier": "RangeLockTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLockRangeInBetween0() {\n RangeLock rangeLock = new RangeLock(8192);\n Lock l0 = rangeLock.tryWriteLock(0, 8192).get();\n Lock l1 = rangeLock.tryWriteLock(8192 * 4, 8192).get();\n assertFalse(rangeLock.tryWriteLock(8192 * 3, 8192 * 2).isPresent());\n ...
{ "fields": [ { "declarator": "LOGGER = getLogger(RangeLock.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = getLogger(RangeLock.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "blockSize", "...
{ "body": "public Optional<Lock> tryWriteLock(long position, long length) {\n return fromNullable(lockWrite0(position, length));\n }", "class_method_signature": "RangeLock.tryWriteLock(long position, long length)", "constructor": false, "full_signature": "public Optional<Lock> tryWriteLock(long positi...
{ "created": null, "fork": null, "fork_count": 11, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 69255078, "size": 2105, "stargazer_count": 70, "stars": null, "updates": null, "url": "https://github.com/pitchpoint-solutions/sfs" }
68883930_2
{ "fields": [ { "declarator": "dimentionsModel", "modifier": "private", "original_string": "private DimensionsModel dimentionsModel;", "type": "DimensionsModel", "var_name": "dimentionsModel" }, { "declarator": "frameModel", "modifier": "@Mock", "original_st...
{ "body": "@Test\n public void calculateDimentions_ShouldReturnBean(){\n BeanShade2 beanShade2Result = ShadeTwo.calculateDimentions\n (frameModel, dimentionsModel.params[0],\n dimentionsModel.params[1],\n dimentionsModel.params[2],\n dimentionsMode...
{ "fields": [ { "declarator": "WIDTH_1 = 0", "modifier": "private static", "original_string": "private static float WIDTH_1 = 0, WIDTH_2 = 0, HEIGHT_1 = 0, HEIGHT_2 = 0;", "type": "float", "var_name": "WIDTH_1" } ], "file": "bitframe/src/main/java/proj/me/bitframe/shading_two...
{ "body": "static BeanShade2 calculateDimentions(FrameModel frameModel, float width1, float height1, float width2, float height2){\n WIDTH_1 = 0; WIDTH_2 = 0; HEIGHT_1 = 0; HEIGHT_2 = 0;\n BeanShade2 beanShade2 = new BeanShade2();\n //width1 amount to required width\n float amountW1 = widt...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "Apache License 2.0", "repo_id": 68883930, "size": 739, "stargazer_count": 8, "stars": null, "updates": null, "url": "https://github.com/deepaktwr/BitFrames" }
68883930_0
{ "fields": [ { "declarator": "dimentionsModel", "modifier": "private", "original_string": "private MultiDimensionModel dimentionsModel;", "type": "MultiDimensionModel", "var_name": "dimentionsModel" }, { "declarator": "frameModel", "modifier": "@Mock", "ori...
{ "body": "@Test\n public void calculateDimentions_ShouldReturnBean() {\n BeanShade4 beanShade4Result = ShadeFour.calculateDimentions(frameModel,\n dimentionsModel.params[0], dimentionsModel.params[1],\n dimentionsModel.params[2], dimentionsModel.params[3],\n dim...
{ "fields": [ { "declarator": "WIDTH_1", "modifier": "private static", "original_string": "private static float WIDTH_1, WIDTH_2, WIDTH_3, HEIGHT_1, HEIGHT_2, HEIGHT_3, WIDTH_4, HEIGHT_4;", "type": "float", "var_name": "WIDTH_1" }, { "declarator": "MIN_WIDTH", "mo...
{ "body": "static BeanShade4 calculateDimentions(FrameModel frameModel, float width1, float height1, float width2, float height2, float width3, float height3,\n float width4, float height4){\n WIDTH_1 = 0; WIDTH_2 = 0; WIDTH_3 = 0; HEIGHT_1 = 0; HEIGHT_2 = 0; HEI...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "Apache License 2.0", "repo_id": 68883930, "size": 739, "stargazer_count": 8, "stars": null, "updates": null, "url": "https://github.com/deepaktwr/BitFrames" }
68883930_1
{ "fields": [ { "declarator": "dimentionsModel", "modifier": "private", "original_string": "private MultiDimensionModel dimentionsModel;", "type": "MultiDimensionModel", "var_name": "dimentionsModel" }, { "declarator": "frameModel", "modifier": "@Mock", "ori...
{ "body": "@Test\n public void calculateDimentions_ShouldReturnBean(){\n\n BeanShade3 beanShade3Result = ShadeThree.calculateDimentions(frameModel,\n dimentionsModel.params[0], dimentionsModel.params[1],\n dimentionsModel.params[2], dimentionsModel.params[3],\n d...
{ "fields": [ { "declarator": "WIDTH_1 = 0", "modifier": "private static", "original_string": "private static float WIDTH_1 = 0, WIDTH_2 = 0, WIDTH_3 = 0, HEIGHT_1 = 0, HEIGHT_2 = 0, HEIGHT_3 = 0;", "type": "float", "var_name": "WIDTH_1" } ], "file": "bitframe/src/main/java/p...
{ "body": "static BeanShade3 calculateDimentions(FrameModel frameModel, float width1, float height1, float width2, float height2, float width3, float height3){\n WIDTH_1 = 0; WIDTH_2 = 0; WIDTH_3 = 0; HEIGHT_1 = 0; HEIGHT_2 = 0; HEIGHT_3 = 0;\n BeanShade3 beanShade3 = new BeanShade3();\n\n List<I...
{ "created": null, "fork": null, "fork_count": 2, "is_fork": false, "language": "Java", "license": "Apache License 2.0", "repo_id": 68883930, "size": 739, "stargazer_count": 8, "stars": null, "updates": null, "url": "https://github.com/deepaktwr/BitFrames" }
14333932_53
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/settings/InboundSettingsTest.java", "identifier": "InboundSettingsTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void testNoSetting() {\n InboundSettings.create(ConfigUtils.getDefaultConfig());\n }", "class_method_signature": "InboundSettingsTest.testNoSetting()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.cla...
{ "fields": [ { "declarator": "columnNames", "modifier": "private final", "original_string": "private final List<String> columnNames;", "type": "List<String>", "var_name": "columnNames" }, { "declarator": "idColumns", "modifier": "private final", "original_s...
{ "body": "public static InboundSettings create(Config config) {\n Config inbound = config.getConfig(\"inbound\");\n\n List<String> columnNames = inbound.getStringList(\"column-names\");\n\n Function<Object,Integer> lookup = new LookupFunction(columnNames);\n\n Iterable<Integer> allColumns = Collections2....
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_102
{ "fields": [], "file": "rdf-common/src/test/java/com/cloudera/oryx/rdf/common/information/InformationTest.java", "identifier": "InformationTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testEmptyClassInformation() {\n assertNaN(Information.entropy(new int[] {0}));\n }", "class_method_signature": "InformationTest.testEmptyClassInformation()", "constructor": false, "full_signature": "@Test public void testEmptyClassInformation()", "identifier": "testEmptyCla...
{ "fields": [], "file": "rdf-common/src/main/java/com/cloudera/oryx/rdf/common/information/Information.java", "identifier": "Information", "interfaces": "", "methods": [ { "class_method_signature": "Information.Information()", "constructor": true, "full_signature": "private Information(...
{ "body": "public static double entropy(int[] counts) {\n // Entropy is really, over all counts:\n // sum (-p_i * ln p_i)\n // where p_i = count_i / total\n // terms where count is 0 or 1 are 0, so can go away\n // Here we actually compute total as we go and account for it later, which avoids\n // ...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_12
{ "fields": [], "file": "als-common/src/test/java/com/cloudera/oryx/als/common/TopNTest.java", "identifier": "TopNTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testTopExactly() {\n List<NumericIDValue> candidates = makeNCandidates(3);\n List<NumericIDValue> top3 = TopN.selectTopN(candidates.iterator(), 3);\n assertNotNull(top3);\n assertEquals(3, top3.size());\n assertEquals(3L, top3.get(0).getID());\n assertEquals(3.0f, top...
{ "fields": [], "file": "als-common/src/main/java/com/cloudera/oryx/als/common/TopN.java", "identifier": "TopN", "interfaces": "", "methods": [ { "class_method_signature": "TopN.TopN()", "constructor": true, "full_signature": "private TopN()", "identifier": "TopN", "modifier...
{ "body": "public static List<NumericIDValue> selectTopN(Iterator<NumericIDValue> values, int n) {\n Queue<NumericIDValue> topN = initialQueue(n);\n selectTopNIntoQueue(topN, values, n);\n return selectTopNFromQueue(topN, n);\n }", "class_method_signature": "TopN.selectTopN(Iterator<NumericIDValue> values...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_45
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/math/MatrixUtilsTest.java", "identifier": "MatrixUtilsTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testAccess() {\n double[][] data = { new double[] {1}, };\n RealMatrix matrix = new Array2DRowRealMatrix(data, false);\n assertSame(data, MatrixUtils.accessMatrixDataDirectly(matrix));\n }", "class_method_signature": "MatrixUtilsTest.testAccess()", "constructor": false, ...
{ "fields": [ { "declarator": "MATRIX_DATA_FIELD = ClassUtils.loadField(Array2DRowRealMatrix.class, \"data\")", "modifier": "private static final", "original_string": "private static final Field MATRIX_DATA_FIELD = ClassUtils.loadField(Array2DRowRealMatrix.class, \"data\");", "type": "Fiel...
{ "body": "public static double[][] accessMatrixDataDirectly(RealMatrix matrix) {\n try {\n return (double[][]) MATRIX_DATA_FIELD.get(matrix);\n } catch (IllegalAccessException iae) {\n throw new IllegalStateException(iae);\n }\n }", "class_method_signature": "MatrixUtils.accessMatrixDataDirectl...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_86
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/collection/LongFloatMapTest.java", "identifier": "LongFloatMapTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testRehash() {\n LongFloatMap map = buildTestFastMap();\n map.remove(500000L);\n map.rehash();\n assertNaN(map.get(500000L));\n assertEquals(3.0f, map.get(47L));\n }", "class_method_signature": "LongFloatMapTest.testRehash()", "constructor": false, "full_signature...
{ "fields": [ { "declarator": "LOAD_FACTOR = 1.25", "modifier": "private static final", "original_string": "private static final double LOAD_FACTOR = 1.25;", "type": "double", "var_name": "LOAD_FACTOR" }, { "declarator": "MAX_SIZE = (int) (RandomUtils.MAX_INT_SMALLER_TW...
{ "body": "public void rehash() {\n rehash(RandomUtils.nextTwinPrime((int) (LOAD_FACTOR * numEntries) + 1));\n }", "class_method_signature": "LongFloatMap.rehash()", "constructor": false, "full_signature": "public void rehash()", "identifier": "rehash", "invocations": [ "rehash", "nextTwinPrime"...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_69
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/LangUtilsTest.java", "identifier": "LangUtilsTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void testDoubleInf() {\n LangUtils.parseDouble(\"Infinity\");\n }", "class_method_signature": "LangUtilsTest.testDoubleInf()", "constructor": false, "full_signature": "@Test(expected = IllegalArgumentException.class) public void testDoubl...
{ "fields": [], "file": "common/src/main/java/com/cloudera/oryx/common/LangUtils.java", "identifier": "LangUtils", "interfaces": "", "methods": [ { "class_method_signature": "LangUtils.LangUtils()", "constructor": true, "full_signature": "private LangUtils()", "identifier": "LangU...
{ "body": "public static double parseDouble(String s) {\n double value = Double.parseDouble(s);\n Preconditions.checkArgument(Doubles.isFinite(value), \"Bad value: %s\", value);\n return value;\n }", "class_method_signature": "LangUtils.parseDouble(String s)", "constructor": false, "full_signature": "...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_90
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/collection/LongSetTest.java", "identifier": "LongSetTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testRehash() {\n LongSet set = buildTestFastSet();\n set.remove(1);\n set.rehash();\n assertFalse(set.contains(1));\n }", "class_method_signature": "LongSetTest.testRehash()", "constructor": false, "full_signature": "@Test public void testRehash()", "identifier": "...
{ "fields": [ { "declarator": "LOAD_FACTOR = 1.25", "modifier": "private static final", "original_string": "private static final double LOAD_FACTOR = 1.25;", "type": "double", "var_name": "LOAD_FACTOR" }, { "declarator": "MAX_SIZE = (int) (RandomUtils.MAX_INT_SMALLER_TW...
{ "body": "public void rehash() {\n rehash(RandomUtils.nextTwinPrime((int) (LOAD_FACTOR * numEntries) + 1));\n }", "class_method_signature": "LongSet.rehash()", "constructor": false, "full_signature": "public void rehash()", "identifier": "rehash", "invocations": [ "rehash", "nextTwinPrime" ],...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_28
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/io/DelimitedDataUtilsTest.java", "identifier": "DelimitedDataUtilsTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testEncodeDelimiters() {\n assertEquals(\"\\\"foo,bing\\\",bar\", DelimitedDataUtils.encode(\"foo,bing\", \"bar\"));\n }", "class_method_signature": "DelimitedDataUtilsTest.testEncodeDelimiters()", "constructor": false, "full_signature": "@Test public void testEncodeDelimiter...
{ "fields": [ { "declarator": "DELIMITER = ConfigUtils.getDefaultConfig().getString(\"inbound.delim\").charAt(0)", "modifier": "public static final", "original_string": "public static final char DELIMITER = ConfigUtils.getDefaultConfig().getString(\"inbound.delim\").charAt(0);", "type": "c...
{ "body": "public static String encode(Object... columns) {\n return encode(columns, DELIMITER);\n }", "class_method_signature": "DelimitedDataUtils.encode(Object... columns)", "constructor": false, "full_signature": "public static String encode(Object... columns)", "identifier": "encode", "invocations"...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_2
{ "fields": [ { "declarator": "VECS = MemPipeline.typedCollectionOf(\n MLAvros.vector(),\n Vectors.of(2.0, 1.0),\n Vectors.of(1.0, 1.0),\n Vectors.of(5.0, 4.0),\n Vectors.of(4.0, 3.0),\n Vectors.of(2.0, 1.0),\n Vectors.of(1.0, 1.0),\n Vectors.of(5.0, 4.0),\n Vect...
{ "body": "@Test\n public void testLloyds() throws Exception {\n List<Centers> centers = ImmutableList.of(\n new Centers(ImmutableList.of(Vectors.of(1.0, 1.0), Vectors.of(5.0, 4.0))));\n List<Centers> res = kmp.lloydsAlgorithm(VECS, centers, 0, false);\n assertEquals(centers, res);\n \n res = k...
{ "fields": [ { "declarator": "projectionBits", "modifier": "private final", "original_string": "private final int projectionBits;", "type": "int", "var_name": "projectionBits" }, { "declarator": "projectionSamples", "modifier": "private final", "original_st...
{ "body": "public <V extends RealVector> List<Centers> lloydsAlgorithm(PCollection<V> points, List<Centers> centers,\n int numIterations, boolean approx) {\n PTypeFamily tf = points.getTypeFamily();\n PTableType<Pair<Integer, Integer>, Pair<V, Long>> ptt = tf.tableOf(tf.pairs(tf.ints(), tf.ints()),\n ...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_49
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/math/VectorsTest.java", "identifier": "VectorsTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testDense() {\n RealVector dense = Vectors.dense(10);\n assertEquals(10, dense.getDimension());\n }", "class_method_signature": "VectorsTest.testDense()", "constructor": false, "full_signature": "@Test public void testDense()", "identifier": "testDense", "invocations":...
{ "fields": [], "file": "common/src/main/java/com/cloudera/oryx/common/math/Vectors.java", "identifier": "Vectors", "interfaces": "", "methods": [ { "class_method_signature": "Vectors.of(double... values)", "constructor": false, "full_signature": "public static RealVector of(double... va...
{ "body": "public static RealVector dense(int dimension) {\n return new ArrayRealVector(dimension);\n }", "class_method_signature": "Vectors.dense(int dimension)", "constructor": false, "full_signature": "public static RealVector dense(int dimension)", "identifier": "dense", "invocations": [], "modifi...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_32
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/io/DelimitedDataUtilsTest.java", "identifier": "DelimitedDataUtilsTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testDecodeDelimiters() {\n assertArrayEquals(new String[] {\"foo,bing\",\"bar\"}, DelimitedDataUtils.decode(\"\\\"foo,bing\\\",bar\"));\n }", "class_method_signature": "DelimitedDataUtilsTest.testDecodeDelimiters()", "constructor": false, "full_signature": "@Test public void ...
{ "fields": [ { "declarator": "DELIMITER = ConfigUtils.getDefaultConfig().getString(\"inbound.delim\").charAt(0)", "modifier": "public static final", "original_string": "public static final char DELIMITER = ConfigUtils.getDefaultConfig().getString(\"inbound.delim\").charAt(0);", "type": "c...
{ "body": "public static String[] decode(CharSequence line) {\n return decode(line, DELIMITER);\n }", "class_method_signature": "DelimitedDataUtils.decode(CharSequence line)", "constructor": false, "full_signature": "public static String[] decode(CharSequence line)", "identifier": "decode", "invocations...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_65
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/parallel/ExecutorUtilsTest.java", "identifier": "ExecutorUtilsTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testWait() {\n final AtomicInteger count = new AtomicInteger();\n ExecutorService executor = Executors.newSingleThreadExecutor();\n executor.submit(new Callable<Object>() {\n @Override\n public Void call() throws InterruptedException {\n Thread.sleep(500L);\n ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(ExecutorUtils.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(ExecutorUtils.class);", "type": "Logger", "var_name": "log" } ], "file": "comm...
{ "body": "public static void shutdownAndAwait(ExecutorService executor) {\n if (!executor.isTerminated()) {\n if (!executor.isShutdown()) {\n executor.shutdown();\n }\n await(executor);\n }\n }", "class_method_signature": "ExecutorUtils.shutdownAndAwait(ExecutorService executor)", "c...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_73
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/collection/SamplingLongPrimitiveIteratorTest.java", "identifier": "SamplingLongPrimitiveIteratorTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testSample3() {\n RandomGenerator random = RandomManager.getRandom();\n LongSet set = new LongSet();\n set.addAll(new long[] {1,2,4,7,15});\n Iterator<?> sampling = new SamplingLongPrimitiveIterator(random, set.iterator(), 0.0001);\n assertFalse(sampling.hasNext());\n }...
{ "fields": [ { "declarator": "geometricDistribution", "modifier": "private final", "original_string": "private final IntegerDistribution geometricDistribution;", "type": "IntegerDistribution", "var_name": "geometricDistribution" }, { "declarator": "delegate", "mo...
{ "body": "@Override\n public boolean hasNext() {\n return hasNext;\n }", "class_method_signature": "SamplingLongPrimitiveIterator.hasNext()", "constructor": false, "full_signature": "@Override public boolean hasNext()", "identifier": "hasNext", "invocations": [], "modifiers": "@Override public", "...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_24
{ "fields": [], "file": "kmeans-common/src/test/java/com/cloudera/oryx/kmeans/common/WeightedTest.java", "identifier": "WeightedTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testSmallerCollectionThanSize() throws Exception {\n RandomGenerator rand = RandomManager.getRandom();\n Collection<Weighted<Integer>> things = Lists.newArrayList();\n for (int i = 0; i < 5; i++) {\n things.add(new Weighted<Integer>(i, rand.nextDouble()));\n }\n Lis...
{ "fields": [ { "declarator": "thing", "modifier": "private final", "original_string": "private final T thing;", "type": "T", "var_name": "thing" }, { "declarator": "weight", "modifier": "private final", "original_string": "private final double weight;", ...
{ "body": "public static <T extends Weighted<?>> List<T> sample(Iterable<T> things, int size, RandomGenerator random) {\n if (random == null) {\n random = RandomManager.getRandom();\n }\n SortedMap<Double, T> sampled = Maps.newTreeMap();\n for (T thing : things) {\n if (thing.weight() > 0) {\n ...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_25
{ "fields": [ { "declarator": "THRESH = 0.001", "modifier": "private static final", "original_string": "private static final double THRESH = 0.001;", "type": "double", "var_name": "THRESH" }, { "declarator": "a = Vectors.of(17.0, 29.0)", "modifier": "private final...
{ "body": "@Test\n public void testSingleton() throws Exception {\n Centers centers = new Centers(a);\n assertEquals(0.0, centers.getDistance(a).getSquaredDistance(), THRESH);\n assertEquals(5.0, centers.getDistance(b).getSquaredDistance(), THRESH);\n assertEquals(17.0, centers.getDistance(c).getSquaredD...
{ "fields": [ { "declarator": "centers", "modifier": "private final", "original_string": "private final List<RealVector> centers;", "type": "List<RealVector>", "var_name": "centers" } ], "file": "kmeans-common/src/main/java/com/cloudera/oryx/kmeans/common/Centers.java", "id...
{ "body": "public Distance getDistance(RealVector point) {\n double min = Double.POSITIVE_INFINITY;\n int index = -1;\n for (int i = 0; i < centers.size(); i++) {\n RealVector c = centers.get(i);\n double distance = c.getDistance(point);\n double distanceSquared = distance * distance;\n i...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_72
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/LangUtilsTest.java", "identifier": "LangUtilsTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testFloat() {\n assertEquals(3.1f, LangUtils.parseFloat(\"3.1\"));\n }", "class_method_signature": "LangUtilsTest.testFloat()", "constructor": false, "full_signature": "@Test public void testFloat()", "identifier": "testFloat", "invocations": [ "assertEquals", "pa...
{ "fields": [], "file": "common/src/main/java/com/cloudera/oryx/common/LangUtils.java", "identifier": "LangUtils", "interfaces": "", "methods": [ { "class_method_signature": "LangUtils.LangUtils()", "constructor": true, "full_signature": "private LangUtils()", "identifier": "LangU...
{ "body": "public static float parseFloat(String s) {\n float value = Float.parseFloat(s);\n Preconditions.checkArgument(Floats.isFinite(value), \"Bad value: %s\", value);\n return value;\n }", "class_method_signature": "LangUtils.parseFloat(String s)", "constructor": false, "full_signature": "public ...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_64
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/parallel/ExecutorUtilsTest.java", "identifier": "ExecutorUtilsTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testNow() {\n final AtomicInteger count = new AtomicInteger();\n ExecutorService executor = Executors.newSingleThreadExecutor();\n executor.submit(new Callable<Object>() {\n @Override\n public Void call() throws InterruptedException {\n Thread.sleep(500L);\n ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(ExecutorUtils.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory.getLogger(ExecutorUtils.class);", "type": "Logger", "var_name": "log" } ], "file": "comm...
{ "body": "public static void shutdownNowAndAwait(ExecutorService executor) {\n if (!executor.isTerminated()) {\n if (!executor.isShutdown()) {\n executor.shutdownNow();\n }\n await(executor);\n }\n }", "class_method_signature": "ExecutorUtils.shutdownNowAndAwait(ExecutorService executo...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }
14333932_33
{ "fields": [], "file": "common/src/test/java/com/cloudera/oryx/common/io/DelimitedDataUtilsTest.java", "identifier": "DelimitedDataUtilsTest", "interfaces": "", "superclass": "extends OryxTest" }
{ "body": "@Test\n public void testDecodeQuote() {\n assertArrayEquals(new String[] {\"foo\", \"bar\\\"bing\"}, DelimitedDataUtils.decode(\"foo,\\\"bar\\\"\\\"bing\\\"\"));\n }", "class_method_signature": "DelimitedDataUtilsTest.testDecodeQuote()", "constructor": false, "full_signature": "@Test public void...
{ "fields": [ { "declarator": "DELIMITER = ConfigUtils.getDefaultConfig().getString(\"inbound.delim\").charAt(0)", "modifier": "public static final", "original_string": "public static final char DELIMITER = ConfigUtils.getDefaultConfig().getString(\"inbound.delim\").charAt(0);", "type": "c...
{ "body": "public static String[] decode(CharSequence line) {\n return decode(line, DELIMITER);\n }", "class_method_signature": "DelimitedDataUtils.decode(CharSequence line)", "constructor": false, "full_signature": "public static String[] decode(CharSequence line)", "identifier": "decode", "invocations...
{ "created": null, "fork": null, "fork_count": 382, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 14333932, "size": 64, "stargazer_count": 7, "stars": null, "updates": null, "url": "https://github.com/apsaltis/oryx" }