id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
31587091_46 | {
"fields": [
{
"declarator": "matcher",
"modifier": "private",
"original_string": "private FileExtensionPathMatcher matcher;",
"type": "FileExtensionPathMatcher",
"var_name": "matcher"
},
{
"declarator": "testPath",
"modifier": "private",
"original_string":... | {
"body": "@Test\n public void test() {\n assertEquals(shouldMatch, matcher.matches(testPath));\n }",
"class_method_signature": "FileExtensionPathMatcherTest.test()",
"constructor": false,
"full_signature": "@Test public void test()",
"identifier": "test",
"invocations": [
"assertEquals",
... | {
"fields": [
{
"declarator": "extensions",
"modifier": "private final",
"original_string": "private final Set<String> extensions;",
"type": "Set<String>",
"var_name": "extensions"
}
],
"file": "gestalt-util/src/main/java/org/terasology/gestalt/util/io/FileExtensionPathMatche... | {
"body": "@Override\n public boolean matches(Path path) {\n Path fileName = path.getFileName();\n if (fileName != null) {\n return extensions.contains(Files.getFileExtension(fileName.toString()));\n }\n return false;\n }",
"class_method_signature": "FileExtensionPathMat... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31587091,
"size": 1929,
"stargazer_count": 16,
"stars": null,
"updates": null,
"url": "https://github.com/MovingBlocks/gestalt"
} |
31587091_50 | {
"fields": [
{
"declarator": "unboundInterface",
"modifier": "private",
"original_string": "private List<?> unboundInterface;",
"type": "List<?>",
"var_name": "unboundInterface"
},
{
"declarator": "boundInterface",
"modifier": "private",
"original_string": ... | {
"body": "@Test\n public void correctParameterForBoundClassField() throws Exception {\n Type t = GenericsUtilTest.class.getDeclaredField(\"boundClass\").getGenericType();\n Optional<Type> result = GenericsUtil.getTypeParameterBinding(t, 0);\n assertTrue(result.isPresent());\n assertEqu... | {
"fields": [],
"file": "gestalt-util/src/main/java/org/terasology/gestalt/util/reflection/GenericsUtil.java",
"identifier": "GenericsUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "GenericsUtil.GenericsUtil()",
"constructor": true,
"full_signature": "private Generics... | {
"body": "public static Optional<Type> getTypeParameterBinding(Type target, int index) {\n Class<?> classOfType = getClassOfType(target);\n if (classOfType != null) {\n return getTypeParameterBindingForInheritedClass(target, classOfType, index);\n }\n throw new IllegalArgumentE... | {
"created": null,
"fork": null,
"fork_count": 19,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 31587091,
"size": 1929,
"stargazer_count": 16,
"stars": null,
"updates": null,
"url": "https://github.com/MovingBlocks/gestalt"
} |
17575379_16 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testJoinOneNullElement() {\n Set<String> elements = new LinkedHashSet<>();\n String separator = \",\";\n elements.add(null);\n elements.add(\"peace\");\n String join = CORSFilter.join(elements, separator);\n Assert.assertTrue(\",peace\".equal... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static String join(final Collection<String> elements,\n\t\t\tfinal String joinSeparator) {\n\t\tString separator = \",\";\n\t\tif (elements == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (joinSeparator != null) {\n\t\t\tseparator = joinSeparator;\n\t\t}\n\t\tStringBuilder buffer = new StringBuilder()... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_3 | {
"fields": [],
"file": "para-server/src/test/java/com/erudika/para/rest/RestUtilsTest.java",
"identifier": "RestUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testExtractResourcePath() {\n\t\tHttpServletRequest req = Mockito.mock(HttpServletRequest.class);\n\t\tMockito.when(req.getRequestURI()).thenReturn(\"\");\n\t\tassertEquals(extractResourcePath(null), \"\");\n\t\tassertEquals(extractResourcePath(req), \"\");\n\n\t\tMockito.when(req.getR... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(RestUtils.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(RestUtils.class);",
"type": "Logger",
"var_name": "logger"
}
],
"file": "par... | {
"body": "public static String extractResourcePath(HttpServletRequest request) {\n\t\tif (request == null || request.getRequestURI().length() <= 3) {\n\t\t\treturn \"\";\n\t\t}\n\t\t// get request path, strip first slash '/'\n\t\tString uri = request.getRequestURI().substring(1);\n\t\t// skip to the end of API versi... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_20 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test(expected = ServletException.class)\n public void testWithFilterConfigInvalidPreflightAge()\n throws ServletException {\n CORSFilter corsFilter = new CORSFilter();\n corsFilter.init(TestConfigs\n .getFilterConfigInvalidMaxPreflightAge());\n }",
"class_me... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "@Override\n\tpublic void init(final FilterConfig filterConfig) throws ServletException {\n\t\t// Initialize defaults\n\t\tparseAndStore(DEFAULT_ALLOWED_ORIGINS, DEFAULT_ALLOWED_HTTP_METHODS,\n\t\t\t\tDEFAULT_ALLOWED_HTTP_HEADERS, DEFAULT_EXPOSED_HEADERS,\n\t\t\t\tDEFAULT_SUPPORTS_CREDENTIALS, DEFAULT_PREFL... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_21 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testValidOrigin() {\n Assert.assertTrue(CORSFilter.isValidOrigin(\"http://www.w3.org\"));\n }",
"class_method_signature": "CORSFilterTest.testValidOrigin()",
"constructor": false,
"full_signature": "@Test public void testValidOrigin()",
"identifier": "testValidOrigi... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static boolean isValidOrigin(String origin) {\n\t\t// Checks for encoded characters. Helps prevent CRLF injection.\n\t\tif (origin.contains(\"%\")) {\n\t\t\treturn false;\n\t\t}\n\n\t\tURI originURI;\n\n\t\ttry {\n\t\t\toriginURI = new URI(origin);\n\t\t} catch (URISyntaxException e) {\n\t\t\treturn... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_2 | {
"fields": [],
"file": "para-server/src/test/java/com/erudika/para/rest/RestUtilsTest.java",
"identifier": "RestUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testExtractAccessKey() {\n\t\tHttpServletRequest req = Mockito.mock(HttpServletRequest.class);\n\t\tMockito.when(req.getHeader(HttpHeaders.AUTHORIZATION)).thenReturn(null);\n\t\tString appid = \"app:test-123\";\n\n\t\tassertEquals(\"\", extractAccessKey(null));\n\t\tassertEquals(null, ... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(RestUtils.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(RestUtils.class);",
"type": "Logger",
"var_name": "logger"
}
],
"file": "par... | {
"body": "public static String extractAccessKey(HttpServletRequest request) {\n\t\tif (request == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\tString accessKey = \"\";\n\t\tString auth = request.getHeader(HttpHeaders.AUTHORIZATION);\n\t\tboolean isAnonymousRequest = isAnonymousRequest(request);\n\t\tif (StringUtils.isBla... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_17 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testJoinAllNullElements() {\n Set<String> elements = new LinkedHashSet<>();\n String separator = \",\";\n elements.add(null);\n elements.add(null);\n String join = CORSFilter.join(elements, separator);\n Assert.assertTrue(\"\".equals(join));\... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static String join(final Collection<String> elements,\n\t\t\tfinal String joinSeparator) {\n\t\tString separator = \",\";\n\t\tif (elements == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (joinSeparator != null) {\n\t\t\tseparator = joinSeparator;\n\t\t}\n\t\tStringBuilder buffer = new StringBuilder()... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_26 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testDestroy() {\n // Nothing to test.\n // NO-OP\n }",
"class_method_signature": "CORSFilterTest.testDestroy()",
"constructor": false,
"full_signature": "@Test public void testDestroy()",
"identifier": "testDestroy",
"invocations": [],
"modifiers": "@Test... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "@Override\n\tpublic void destroy() {\n\t\t// NOOP\n\t}",
"class_method_signature": "CORSFilter.destroy()",
"constructor": false,
"full_signature": "@Override public void destroy()",
"identifier": "destroy",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",
"return": "v... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_9 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testDecorateCORSPropertiesCORSRequestTypeNotCORS() {\n MockHttpServletRequest request = new MockHttpServletRequest();\n CORSFilter.decorateCORSProperties(request,\n CORSFilter.CORSRequestType.NOT_CORS);\n Assert.assertFalse((Boolean) request\n ... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static void decorateCORSProperties(final HttpServletRequest request,\n\t\t\tfinal CORSRequestType corsRequestType) {\n\t\tif (request == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"HttpServletRequest object is null\");\n\t\t}\n\n\t\tif (corsRequestType == null) {\n\t\t\tthrow new... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_10 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testDecorateCORSPropertiesCORSRequestTypeInvalidCORS() {\n MockHttpServletRequest request = new MockHttpServletRequest();\n CORSFilter\n .decorateCORSProperties(request,\n CORSFilter.CORSRequestType.INVALID_CORS);\n Assert.as... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static void decorateCORSProperties(final HttpServletRequest request,\n\t\t\tfinal CORSRequestType corsRequestType) {\n\t\tif (request == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"HttpServletRequest object is null\");\n\t\t}\n\n\t\tif (corsRequestType == null) {\n\t\t\tthrow new... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_5 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test(expected = ServletException.class)\n public void testInitInvalidFilterConfig() throws IOException,\n ServletException {\n CORSFilter corsFilter = new CORSFilter();\n corsFilter.init(TestConfigs.getFilterConfigInvalidMaxPreflightAge());\n // If we don't get an except... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "@Override\n\tpublic void init(final FilterConfig filterConfig) throws ServletException {\n\t\t// Initialize defaults\n\t\tparseAndStore(DEFAULT_ALLOWED_ORIGINS, DEFAULT_ALLOWED_HTTP_METHODS,\n\t\t\t\tDEFAULT_ALLOWED_HTTP_HEADERS, DEFAULT_EXPOSED_HEADERS,\n\t\t\t\tDEFAULT_SUPPORTS_CREDENTIALS, DEFAULT_PREFL... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_4 | {
"fields": [],
"file": "para-server/src/test/java/com/erudika/para/rest/RestUtilsTest.java",
"identifier": "RestUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testReadResourcePath() {\n\t\tString appid = \"test-app-1\";\n\t\tApp app = new App(appid);\n\t\tSysprop s = new Sysprop();\n\t\ts.setAppid(appid);\n\t\ts.setName(\"noname\");\n\n\t\tapp.create();\n\t\tPara.getDAO().create(appid, s);\n\n\t\tassertNull(readResourcePath(appid, null));\n\... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(RestUtils.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(RestUtils.class);",
"type": "Logger",
"var_name": "logger"
}
],
"file": "par... | {
"body": "public static ParaObject readResourcePath(String appid, String path) {\n\t\tif (StringUtils.isBlank(appid) || StringUtils.isBlank(path) || !path.contains(\"/\")) {\n\t\t\treturn null;\n\t\t}\n\t\ttry {\n\t\t\tURI uri = new URI(path);\n\t\t\tif (path.length() > 1) {\n\t\t\t\tpath = path.startsWith(\"/\") ? ... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_11 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testCheckRequestTypeNull() throws ServletException {\n HttpServletRequest request = null;\n CORSFilter corsFilter = new CORSFilter();\n corsFilter.checkRequestType(request);\n }",
"class_method_signature": "CORSFilt... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public CORSRequestType checkRequestType(final HttpServletRequest request) {\n\t\tCORSRequestType requestType = CORSRequestType.INVALID_CORS;\n\t\tif (request == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"HttpServletRequest object is null\");\n\t\t}\n\t\tString originHeader = request.ge... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_8 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testDecorateCORSPropertiesValidRequestNullRequestType() {\n MockHttpServletRequest request = new MockHttpServletRequest();\n CORSFilter.decorateCORSProperties(request, null);\n }",
"class_method_signature": "CORSFilterTest... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static void decorateCORSProperties(final HttpServletRequest request,\n\t\t\tfinal CORSRequestType corsRequestType) {\n\t\tif (request == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"HttpServletRequest object is null\");\n\t\t}\n\n\t\tif (corsRequestType == null) {\n\t\t\tthrow new... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_24 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testInValidOriginEncodedCRLF2() {\n Assert.assertFalse(CORSFilter.isValidOrigin(\"http://www.w3.org%0D%0A\"));\n }",
"class_method_signature": "CORSFilterTest.testInValidOriginEncodedCRLF2()",
"constructor": false,
"full_signature": "@Test public void testInValidOrigi... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static boolean isValidOrigin(String origin) {\n\t\t// Checks for encoded characters. Helps prevent CRLF injection.\n\t\tif (origin.contains(\"%\")) {\n\t\t\treturn false;\n\t\t}\n\n\t\tURI originURI;\n\n\t\ttry {\n\t\t\toriginURI = new URI(origin);\n\t\t} catch (URISyntaxException e) {\n\t\t\treturn... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_7 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testDecorateCORSPropertiesNullRequestValidCORSRequestType() {\n CORSFilter.decorateCORSProperties(null,\n CORSFilter.CORSRequestType.SIMPLE);\n }",
"class_method_signature": "CORSFilterTest.testDecorateCORSProperti... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static void decorateCORSProperties(final HttpServletRequest request,\n\t\t\tfinal CORSRequestType corsRequestType) {\n\t\tif (request == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"HttpServletRequest object is null\");\n\t\t}\n\n\t\tif (corsRequestType == null) {\n\t\t\tthrow new... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_12 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testJoin() {\n Set<String> elements = new LinkedHashSet<>();\n String separator = \",\";\n elements.add(\"world\");\n elements.add(\"peace\");\n String join = CORSFilter.join(elements, separator);\n Assert.assertTrue(\"world,peace\".equals(jo... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static String join(final Collection<String> elements,\n\t\t\tfinal String joinSeparator) {\n\t\tString separator = \",\";\n\t\tif (elements == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (joinSeparator != null) {\n\t\t\tseparator = joinSeparator;\n\t\t}\n\t\tStringBuilder buffer = new StringBuilder()... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_13 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testJoinSingleElement() {\n Set<String> elements = new LinkedHashSet<>();\n String separator = \",\";\n elements.add(\"world\");\n String join = CORSFilter.join(elements, separator);\n Assert.assertTrue(\"world\".equals(join));\n }",
"class_met... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static String join(final Collection<String> elements,\n\t\t\tfinal String joinSeparator) {\n\t\tString separator = \",\";\n\t\tif (elements == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (joinSeparator != null) {\n\t\t\tseparator = joinSeparator;\n\t\t}\n\t\tStringBuilder buffer = new StringBuilder()... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_6 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testDecorateCORSPropertiesNullRequestNullCORSRequestType() {\n CORSFilter.decorateCORSProperties(null, null);\n }",
"class_method_signature": "CORSFilterTest.testDecorateCORSPropertiesNullRequestNullCORSRequestType()",
"constru... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static void decorateCORSProperties(final HttpServletRequest request,\n\t\t\tfinal CORSRequestType corsRequestType) {\n\t\tif (request == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"HttpServletRequest object is null\");\n\t\t}\n\n\t\tif (corsRequestType == null) {\n\t\t\tthrow new... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_25 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testInValidOriginEncodedCRLF3() {\n Assert.assertFalse(CORSFilter\n .isValidOrigin(\"http://www.w3.org%0%0d%0ad%0%0d%0aa\"));\n }",
"class_method_signature": "CORSFilterTest.testInValidOriginEncodedCRLF3()",
"constructor": false,
"full_signature": "@Tes... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static boolean isValidOrigin(String origin) {\n\t\t// Checks for encoded characters. Helps prevent CRLF injection.\n\t\tif (origin.contains(\"%\")) {\n\t\t\treturn false;\n\t\t}\n\n\t\tURI originURI;\n\n\t\ttry {\n\t\t\toriginURI = new URI(origin);\n\t\t} catch (URISyntaxException e) {\n\t\t\treturn... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_1 | {
"fields": [],
"file": "para-server/src/test/java/com/erudika/para/rest/RestUtilsTest.java",
"identifier": "RestUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testGetJSONResponse() {\n\t\tassertEquals(Status.BAD_REQUEST.getStatusCode(), getStatusResponse(null).getStatus());\n\t\tassertEquals(Status.OK.getStatusCode(), getStatusResponse(Status.OK).getStatus());\n\t}",
"class_method_signature": "RestUtilsTest.testGetJSONResponse()",
"const... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(RestUtils.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(RestUtils.class);",
"type": "Logger",
"var_name": "logger"
}
],
"file": "par... | {
"body": "public static Response getStatusResponse(Response.Status status, String... messages) {\n\t\tif (status == null) {\n\t\t\treturn Response.status(Response.Status.BAD_REQUEST).build();\n\t\t}\n\t\tString msg = StringUtils.join(messages, \". \");\n\t\tif (StringUtils.isBlank(msg)) {\n\t\t\tmsg = status.getReas... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_14 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testJoinSepNull() {\n Set<String> elements = new LinkedHashSet<>();\n String separator = null;\n elements.add(\"world\");\n elements.add(\"peace\");\n String join = CORSFilter.join(elements, separator);\n Assert.assertTrue(\"world,peace\".equ... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static String join(final Collection<String> elements,\n\t\t\tfinal String joinSeparator) {\n\t\tString separator = \",\";\n\t\tif (elements == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (joinSeparator != null) {\n\t\t\tseparator = joinSeparator;\n\t\t}\n\t\tStringBuilder buffer = new StringBuilder()... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_18 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testJoinAllEmptyElements() {\n Set<String> elements = new LinkedHashSet<>();\n String separator = \",\";\n elements.add(\"\");\n elements.add(\"\");\n String join = CORSFilter.join(elements, separator);\n Assert.assertTrue(\"\".equals(join));... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static String join(final Collection<String> elements,\n\t\t\tfinal String joinSeparator) {\n\t\tString separator = \",\";\n\t\tif (elements == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (joinSeparator != null) {\n\t\t\tseparator = joinSeparator;\n\t\t}\n\t\tStringBuilder buffer = new StringBuilder()... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_22 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testInValidOriginCRLF() {\n Assert.assertFalse(CORSFilter.isValidOrigin(\"http://www.w3.org\\r\\n\"));\n }",
"class_method_signature": "CORSFilterTest.testInValidOriginCRLF()",
"constructor": false,
"full_signature": "@Test public void testInValidOriginCRLF()",
"ide... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static boolean isValidOrigin(String origin) {\n\t\t// Checks for encoded characters. Helps prevent CRLF injection.\n\t\tif (origin.contains(\"%\")) {\n\t\t\treturn false;\n\t\t}\n\n\t\tURI originURI;\n\n\t\ttry {\n\t\t\toriginURI = new URI(origin);\n\t\t} catch (URISyntaxException e) {\n\t\t\treturn... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_23 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testInValidOriginEncodedCRLF1() {\n Assert.assertFalse(CORSFilter.isValidOrigin(\"http://www.w3.org%0d%0a\"));\n }",
"class_method_signature": "CORSFilterTest.testInValidOriginEncodedCRLF1()",
"constructor": false,
"full_signature": "@Test public void testInValidOrigi... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static boolean isValidOrigin(String origin) {\n\t\t// Checks for encoded characters. Helps prevent CRLF injection.\n\t\tif (origin.contains(\"%\")) {\n\t\t\treturn false;\n\t\t}\n\n\t\tURI originURI;\n\n\t\ttry {\n\t\t\toriginURI = new URI(origin);\n\t\t} catch (URISyntaxException e) {\n\t\t\treturn... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_19 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testJoinPipeSeparator() {\n Set<String> elements = new LinkedHashSet<>();\n String separator = \"|\";\n elements.add(\"world\");\n elements.add(\"peace\");\n String join = CORSFilter.join(elements, separator);\n Assert.assertTrue(\"world|peac... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static String join(final Collection<String> elements,\n\t\t\tfinal String joinSeparator) {\n\t\tString separator = \",\";\n\t\tif (elements == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (joinSeparator != null) {\n\t\t\tseparator = joinSeparator;\n\t\t}\n\t\tStringBuilder buffer = new StringBuilder()... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_15 | {
"fields": [
{
"declarator": "filterChain = new MockFilterChain()",
"modifier": "private",
"original_string": "private FilterChain filterChain = new MockFilterChain();",
"type": "FilterChain",
"var_name": "filterChain"
}
],
"file": "para-server/src/test/java/com/erudika/para... | {
"body": "@Test\n public void testJoinElementsNull() {\n Set<String> elements = null;\n String separator = \",\";\n String join = CORSFilter.join(elements, separator);\n\n Assert.assertNull(join);\n }",
"class_method_signature": "CORSFilterTest.testJoinElementsNull()",
"construc... | {
"fields": [
{
"declarator": "filterConfig",
"modifier": "private",
"original_string": "private FilterConfig filterConfig;",
"type": "FilterConfig",
"var_name": "filterConfig"
},
{
"declarator": "allowedOrigins",
"modifier": "private final",
"original_strin... | {
"body": "public static String join(final Collection<String> elements,\n\t\t\tfinal String joinSeparator) {\n\t\tString separator = \",\";\n\t\tif (elements == null) {\n\t\t\treturn null;\n\t\t}\n\t\tif (joinSeparator != null) {\n\t\t\tseparator = joinSeparator;\n\t\t}\n\t\tStringBuilder buffer = new StringBuilder()... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
17575379_0 | {
"fields": [],
"file": "para-server/src/test/java/com/erudika/para/rest/RestUtilsTest.java",
"identifier": "RestUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testGetReadResponse() {\n\t\tApp app = new App(\"test\");\n\t\tApp root = new App(Config.getConfigParam(\"app_name\", \"\"));\n\t\tassertEquals(Status.NOT_FOUND.getStatusCode(), getReadResponse(null, null).getStatus());\n\t\tassertEquals(Status.OK.getStatusCode(), getReadResponse(app, ... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(RestUtils.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(RestUtils.class);",
"type": "Logger",
"var_name": "logger"
}
],
"file": "par... | {
"body": "public static Response getReadResponse(App app, ParaObject content) {\n\t\ttry (Metrics.Context context = Metrics.time(app == null ? null : app.getAppid(),\n\t\t\t\tRestUtils.class, \"crud\", \"read\")) {\n\t\t\t// app can't modify other apps except itself\n\t\t\tif (app != null && content != null &&\n\t\t... | {
"created": "3/9/2014 10:31:26 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 17575379,
"size": null,
"stargazer_count": null,
"stars": 323,
"updates": "2020-01-26T05:16:52+00:00",
"url": "https://github.com/Erudika/para"
} |
69381318_3 | {
"fields": [],
"file": "spring-kafka-avro/src/test/java/com/codenotfound/kafka/serializer/AvroDeserializerTest.java",
"identifier": "AvroDeserializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDeserialize() {\n User user = User.newBuilder().setName(\"John Doe\").setFavoriteColor(\"green\")\n .setFavoriteNumber(null).build();\n\n byte[] data = DatatypeConverter.parseHexBinary(\"104A6F686E20446F6502000A677265656E\");\n\n AvroDeserializer<User> avroDeseriali... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(AvroDeserializer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AvroDeserializer.class);",
"type": "Logger",
"var_name": "LOGGER"
},
... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Override\n public T deserialize(String topic, byte[] data) {\n try {\n T result = null;\n\n if (data != null) {\n LOGGER.debug(\"data='{}'\", DatatypeConverter.printHexBinary(data));\n\n DatumReader<GenericRecord> datumReader =\n n... | {
"created": null,
"fork": null,
"fork_count": 391,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 69381318,
"size": 143,
"stargazer_count": 186,
"stars": null,
"updates": null,
"url": "https://github.com/code-not-found/spring-kafka"
} |
69381318_2 | {
"fields": [],
"file": "spring-kafka-avro/src/test/java/com/codenotfound/kafka/serializer/AvroSerializerTest.java",
"identifier": "AvroSerializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSerialize() {\n User user = User.newBuilder().setName(\"John Doe\").setFavoriteColor(\"green\")\n .setFavoriteNumber(null).build();\n\n AvroSerializer<User> avroSerializer = new AvroSerializer<>();\n assertThat(avroSerializer.serialize(\"avro.t\", user))\n .i... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(AvroSerializer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AvroSerializer.class);",
"type": "Logger",
"var_name": "LOGGER"
}
],
"f... | {
"body": "@Override\n public byte[] serialize(String topic, T data) {\n try {\n byte[] result = null;\n\n if (data != null) {\n LOGGER.debug(\"data='{}'\", data);\n\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n BinaryEncoder binaryEncoder =\n ... | {
"created": null,
"fork": null,
"fork_count": 391,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 69381318,
"size": 143,
"stargazer_count": 186,
"stars": null,
"updates": null,
"url": "https://github.com/code-not-found/spring-kafka"
} |
69381318_1 | {
"fields": [],
"file": "spring-kafka-avro-bijection/src/test/java/com/codenotfound/kafka/serializer/AvroDeserializerTest.java",
"identifier": "AvroDeserializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDeserialize() {\n User user = User.newBuilder().setName(\"John Doe\").setFavoriteColor(\"green\")\n .setFavoriteNumber(null).build();\n\n byte[] data = DatatypeConverter.parseHexBinary(\"104A6F686E20446F6502000A677265656E\");\n AvroDeserializer<User> avroDeserialize... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(AvroDeserializer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AvroDeserializer.class);",
"type": "Logger",
"var_name": "LOGGER"
},
... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Override\n public T deserialize(String topic, byte[] data) {\n LOGGER.debug(\"data to deserialize='{}'\", DatatypeConverter.printHexBinary(data));\n try {\n // get the schema\n Schema schema = targetType.newInstance().getSchema();\n\n Injection<Gen... | {
"created": null,
"fork": null,
"fork_count": 391,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 69381318,
"size": 143,
"stargazer_count": 186,
"stars": null,
"updates": null,
"url": "https://github.com/code-not-found/spring-kafka"
} |
69381318_0 | {
"fields": [],
"file": "spring-kafka-avro-bijection/src/test/java/com/codenotfound/kafka/serializer/AvroSerializerTest.java",
"identifier": "AvroSerializerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSerialize() {\n User user = User.newBuilder().setName(\"John Doe\").setFavoriteColor(\"green\")\n .setFavoriteNumber(null).build();\n\n AvroSerializer<User> avroSerializer = new AvroSerializer<>();\n\n assertThat(avroSerializer.serialize(\"avro-bijection.t\", user))... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(AvroSerializer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(AvroSerializer.class);",
"type": "Logger",
"var_name": "LOGGER"
}
],
"f... | {
"body": "@Override\n public byte[] serialize(String topic, T data) {\n LOGGER.debug(\"data to serialize='{}'\", data);\n\n Injection<GenericRecord, byte[]> genericRecordInjection =\n GenericAvroCodecs.toBinary(data.getSchema());\n byte[] result = genericRecordInjection.apply(data);\n\n LOGGER.de... | {
"created": null,
"fork": null,
"fork_count": 391,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 69381318,
"size": 143,
"stargazer_count": 186,
"stars": null,
"updates": null,
"url": "https://github.com/code-not-found/spring-kafka"
} |
92919239_2 | {
"fields": [],
"file": "library/src/test/java/com/github/amuyu/logger/LoggerTest.java",
"identifier": "LoggerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test public void dontAddLogPrinter() {\n String message = \"Hello, world!\";\n Logger.d(message);\n assertLog()\n .hasNoMoreMessages();\n }",
"class_method_signature": "LoggerTest.dontAddLogPrinter()",
"constructor": false,
"full_signature": "@Test public void ... | {
"fields": [
{
"declarator": "logAdapter = new LogAdapter()",
"modifier": "private static",
"original_string": "private static LogAdapter logAdapter = new LogAdapter();",
"type": "LogAdapter",
"var_name": "logAdapter"
}
],
"file": "library/src/main/java/com/github/amuyu/logg... | {
"body": "public static void d(String msg, Object...args) {\n logAdapter.d(msg, args);\n }",
"class_method_signature": "Logger.d(String msg, Object...args)",
"constructor": false,
"full_signature": "public static void d(String msg, Object...args)",
"identifier": "d",
"invocations": [
"d"
],... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92919239,
"size": 190,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/amuyu/Logger"
} |
92919239_0 | {
"fields": [],
"file": "library/src/test/java/com/github/amuyu/logger/LoggerTest.java",
"identifier": "LoggerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = NullPointerException.class)\n public void nullAddLogPrinter() {\n Logger.addLogPrinter(null);\n }",
"class_method_signature": "LoggerTest.nullAddLogPrinter()",
"constructor": false,
"full_signature": "@Test(expected = NullPointerException.class) public void nullAddLogPri... | {
"fields": [
{
"declarator": "logAdapter = new LogAdapter()",
"modifier": "private static",
"original_string": "private static LogAdapter logAdapter = new LogAdapter();",
"type": "LogAdapter",
"var_name": "logAdapter"
}
],
"file": "library/src/main/java/com/github/amuyu/logg... | {
"body": "public static void addLogPrinter(AbstractLogPrinter logPrinter) {\n if (logPrinter == null) throw new NullPointerException(\"logPrinter is null\");\n logAdapter.add(logPrinter);\n }",
"class_method_signature": "Logger.addLogPrinter(AbstractLogPrinter logPrinter)",
"constructor": false... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92919239,
"size": 190,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/amuyu/Logger"
} |
92919239_1 | {
"fields": [],
"file": "library/src/test/java/com/github/amuyu/logger/LoggerTest.java",
"identifier": "LoggerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = NullPointerException.class)\n public void nullRemoveLogPrinter() {\n Logger.removeLogPrint(null);\n }",
"class_method_signature": "LoggerTest.nullRemoveLogPrinter()",
"constructor": false,
"full_signature": "@Test(expected = NullPointerException.class) public void nullRe... | {
"fields": [
{
"declarator": "logAdapter = new LogAdapter()",
"modifier": "private static",
"original_string": "private static LogAdapter logAdapter = new LogAdapter();",
"type": "LogAdapter",
"var_name": "logAdapter"
}
],
"file": "library/src/main/java/com/github/amuyu/logg... | {
"body": "public static void removeLogPrint(AbstractLogPrinter logPrinter) {\n if (logPrinter == null) throw new NullPointerException(\"logPrinter is null\");\n logAdapter.remove(logPrinter);\n }",
"class_method_signature": "Logger.removeLogPrint(AbstractLogPrinter logPrinter)",
"constructor": ... | {
"created": null,
"fork": null,
"fork_count": 0,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 92919239,
"size": 190,
"stargazer_count": 7,
"stars": null,
"updates": null,
"url": "https://github.com/amuyu/Logger"
} |
113425021_142 | {
"fields": [
{
"declarator": "NAME = Column.of(\"NAME\", String.class, \"PERSON\")",
"modifier": "private static final",
"original_string": "private static final Column<String> NAME = Column.of(\"NAME\", String.class, \"PERSON\");",
"type": "Column<String>",
"var_name": "NAME"
}... | {
"body": "@Test\n\tpublic void testOpen() throws SQLException, InputCloseException, InputOpenException {\n\t\ttry (Statement statement = connection.createStatement()) {\n\t\t\tString query = \"SELECT * FROM Person\";\n\t\t\tRelation relation = new ResultSetRelation(statement, query);\n\t\t\ttry (RelationalInput inpu... | {
"fields": [
{
"declarator": "statement",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final Statement statement;",
"type": "Statement",
"var_name": "statement"
},
{
"declarator": "query",
"modifier": "@NonNull\n\tprivate final... | {
"body": "@Override\n\tpublic RelationalInput open() throws InputOpenException {\n\t\treturn open(query);\n\t}",
"class_method_signature": "ResultSetRelation.open()",
"constructor": false,
"full_signature": "@Override public RelationalInput open()",
"identifier": "open",
"invocations": [
"open"
],
... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_35 | {
"fields": [],
"file": "ducc/ducc_algorithm/src/test/java/de/metanome/algorithms/ducc/DuccAlgorithmTest.java",
"identifier": "DuccAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExecuteWithHoles()\n throws AlgorithmExecutionException, NoSuchFieldException, SecurityException,\n IllegalArgumentException, IllegalAccessException {\n //Setup\n DuccTestFixtureWithHoles fixture = new DuccTestFixtureWithHoles();\n Random random = mock(Ran... | {
"fields": [
{
"declarator": "found",
"modifier": "public",
"original_string": "public int found;",
"type": "int",
"var_name": "found"
},
{
"declarator": "relationName",
"modifier": "protected",
"original_string": "protected String relationName;",
"ty... | {
"body": "public void run(List<PositionListIndex> pliList) throws AlgorithmExecutionException {\n this.found = 0;\n this.graphTraverser.init(pliList, this.uccReceiver, this.relationName, this.columnNames);\n this.found = this.graphTraverser.traverseGraph();\n }",
"class_method_signature": "DuccAlgorithm.... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_115 | {
"fields": [
{
"declarator": "HASH_FUNCTION = Hashing.goodFastHash(10)",
"modifier": "private static final",
"original_string": "private static final HashFunction HASH_FUNCTION = Hashing.goodFastHash(10);",
"type": "HashFunction",
"var_name": "HASH_FUNCTION"
}
],
"file": "Hy... | {
"body": "@Test\n\tpublic void testPutDouble() {\n\t\tassertThat(Hasher.of(HASH_FUNCTION).putDouble(0.0).putDouble(1.0).hash())\n\t\t\t.isEqualTo(HASH_FUNCTION.newHasher().putDouble(0.0).putDouble(1.0).hash());\n\t}",
"class_method_signature": "HasherTest.testPutDouble()",
"constructor": false,
"full_signature... | {
"fields": [
{
"declarator": "hasher",
"modifier": "private final",
"original_string": "private final com.google.common.hash.Hasher hasher;",
"type": "com.google.common.hash.Hasher",
"var_name": "hasher"
}
],
"file": "HyMD/util/src/main/java/de/hpi/is/md/util/Hasher.java",
... | {
"body": "public Hasher putDouble(double d) {\n\t\thasher.putDouble(d);\n\t\treturn this;\n\t}",
"class_method_signature": "Hasher.putDouble(double d)",
"constructor": false,
"full_signature": "public Hasher putDouble(double d)",
"identifier": "putDouble",
"invocations": [
"putDouble"
],
"modifiers... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_62 | {
"fields": [],
"file": "ORDER/src/test/java/de/metanome/algorithms/order/measurements/StatisticsTest.java",
"identifier": "StatisticsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIncreaseNumApplicationsUniquenessPruning() {\n final Statistics stats = new Statistics(\"test\");\n int level = 3;\n stats.increaseNumApplicationsUniquenessPruning(level);\n stats.increaseNumApplicationsUniquenessPruning(level);\n level += 4;\n stats.increaseNumAp... | {
"fields": [
{
"declarator": "algorithmName",
"modifier": "private",
"original_string": "private String algorithmName;",
"type": "String",
"var_name": "algorithmName"
},
{
"declarator": "typeInferralTime",
"modifier": "private",
"original_string": "private ... | {
"body": "public void increaseNumApplicationsUniquenessPruning(final int level) {\n this.increaseMeasure(this.numApplicationsUniquenessPruning, level);\n }",
"class_method_signature": "Statistics.increaseNumApplicationsUniquenessPruning(final int level)",
"constructor": false,
"full_signature": "public voi... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_103 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n\tpublic final",
"original_string": "@Rule\n\tpublic final TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
},
{
"declarator": "supplier"... | {
"body": "@Test\n\tpublic void testStore() {\n\t\tHashCode hash = Hashing.sha256().newHasher()\n\t\t\t.putBoolean(true)\n\t\t\t.hash();\n\t\twhen(supplier.get()).thenReturn(1);\n\t\twhen(supplier.hash()).thenReturn(hash);\n\t\tFile f = folder.getRoot();\n\t\tDiskCache<Integer> cache = new DiskCache<>(supplier, f);\n... | {
"fields": [
{
"declarator": "supplier",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final CacheableSupplier<T> supplier;",
"type": "CacheableSupplier<T>",
"var_name": "supplier"
},
{
"declarator": "file",
"modifier": "@NonNul... | {
"body": "public T get(boolean store) {\n\t\tfinal T obj;\n\t\tif (store) {\n\t\t\tobj = readOrCreate();\n\t\t} else {\n\t\t\tobj = create();\n\t\t}\n\t\treturn obj;\n\t}",
"class_method_signature": "DiskCache.get(boolean store)",
"constructor": false,
"full_signature": "public T get(boolean store)",
"identi... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_74 | {
"fields": [],
"file": "HyMD/util/src/test/java/de/hpi/is/md/util/OptionalDoubleTest.java",
"identifier": "OptionalDoubleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testIsPresent() {\n\t\tassertThat(OptionalDouble.empty().isPresent()).isFalse();\n\t\tassertThat(OptionalDouble.of(1.0).isPresent()).isTrue();\n\t}",
"class_method_signature": "OptionalDoubleTest.testIsPresent()",
"constructor": false,
"full_signature": "@Test public void testIsP... | {
"fields": [
{
"declarator": "EMPTY = new OptionalDouble()",
"modifier": "private static final",
"original_string": "private static final OptionalDouble EMPTY = new OptionalDouble();",
"type": "OptionalDouble",
"var_name": "EMPTY"
},
{
"declarator": "optional",
"... | {
"body": "public boolean isPresent() {\n\t\treturn optional.isPresent();\n\t}",
"class_method_signature": "OptionalDouble.isPresent()",
"constructor": false,
"full_signature": "public boolean isPresent()",
"identifier": "isPresent",
"invocations": [
"isPresent"
],
"modifiers": "public",
"paramete... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_154 | {
"fields": [],
"file": "HyMD/hybrid/src/test/java/de/hpi/is/md/hybrid/impl/validation/ClassifierTest.java",
"identifier": "ClassifierTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testMinThresholdAndLowerBound() {\n\t\tClassifier classifier = new Classifier(0.5, 0.5);\n\t\tassertThat(classifier.isValidAndMinimal(0.6)).isTrue();\n\t\tassertThat(classifier.isValidAndMinimal(0.5)).isFalse();\n\t}",
"class_method_signature": "ClassifierTest.testMinThresholdAndLowe... | {
"fields": [
{
"declarator": "minThreshold",
"modifier": "private final",
"original_string": "private final double minThreshold;",
"type": "double",
"var_name": "minThreshold"
},
{
"declarator": "lowerBound",
"modifier": "private final",
"original_string": ... | {
"body": "public boolean isValidAndMinimal(double similarity) {\n\t\treturn isValid(similarity) && isMinimal(similarity);\n\t}",
"class_method_signature": "Classifier.isValidAndMinimal(double similarity)",
"constructor": false,
"full_signature": "public boolean isValidAndMinimal(double similarity)",
"identif... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_23 | {
"fields": [
{
"declarator": "fixture = new PruningGraphFixture()",
"modifier": "",
"original_string": "PruningGraphFixture fixture = new PruningGraphFixture();",
"type": "PruningGraphFixture",
"var_name": "fixture"
}
],
"file": "ducc/ducc_algorithm_helper/src/test/java/de/m... | {
"body": "@Test\n public void testAddSimpleInsert() {\n //Setup\n PruningGraph graph = new PruningGraph(5, 10, true);\n\n ColumnCombinationBitset actualColumnCombinationAC = fixture.columnCombinationAC;\n ColumnCombinationBitset actualColumnCombinationBC = fixture.columnCombinationBC;\n\n ColumnCombi... | {
"fields": [
{
"declarator": "OVERFLOW_THRESHOLD",
"modifier": "protected final",
"original_string": "protected final int OVERFLOW_THRESHOLD;",
"type": "int",
"var_name": "OVERFLOW_THRESHOLD"
},
{
"declarator": "containsPositiveFeature",
"modifier": "protected fi... | {
"body": "public void add(ColumnCombinationBitset columnCombination) {\n int initialKeyLength = 1;\n for (int i = 0; i < columnCombination.getNSubsetColumnCombinations(initialKeyLength).size();\n i++) {\n this.addToKey(columnCombination.getNSubsetColumnCombinations(initialKeyLength).get(i),\n ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_6 | {
"fields": [
{
"declarator": "SAMPLE_SIZE = 10",
"modifier": "public static final",
"original_string": "public static final int SAMPLE_SIZE = 10;",
"type": "int",
"var_name": "SAMPLE_SIZE"
},
{
"declarator": "rb = new RelationalInputBuilder(\"testTable\")",
"modi... | {
"body": "@Test\n public void testHasNextTwice() throws Exception {\n rb.setHeader(\"col1\", \"col2\").addRow(\"a\", \"a\");\n VirtualColumnStore cs = createColumnStore(rb.build());\n ColumnIterator rows = cs.getRows();\n\n assertThat(rows.hasNext(), is(true));\n assertThat(rows... | {
"fields": [
{
"declarator": "inputGenerator",
"modifier": "private final",
"original_string": "private final RelationalInputGenerator inputGenerator;",
"type": "RelationalInputGenerator",
"var_name": "inputGenerator"
},
{
"declarator": "isCloseConnectionsRigorously",
... | {
"body": "public ColumnIterator getRows(SimpleColumnCombination activeColumns) {\n this.initHashCaches();\n\n try {\n return new VirtualColumnStore.ColumnIterator(this.inputGenerator.generateNewCopy(), activeColumns);\n } catch (Exception e) {\n throw new RuntimeException(e... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_58 | {
"fields": [],
"file": "DVFM/src/test/java/de/metanome/algorithms/dvfm/DVFMTest.java",
"identifier": "DVFMTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExecute() {\n }",
"class_method_signature": "DVFMTest.testExecute()",
"constructor": false,
"full_signature": "@Test public void testExecute()",
"identifier": "testExecute",
"invocations": [],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"si... | {
"fields": [],
"file": "DVFM/src/main/java/de/metanome/algorithms/dvfm/DVFM.java",
"identifier": "DVFM",
"interfaces": "implements BasicStatisticsAlgorithm, RelationalInputParameterAlgorithm, StringParameterAlgorithm",
"methods": [
{
"class_method_signature": "DVFM.getConfigurationRequirements()",
... | {
"body": "@Override\n\tpublic void execute() throws AlgorithmExecutionException {\n\t\tsuper.execute();\n\t}",
"class_method_signature": "DVFM.execute()",
"constructor": false,
"full_signature": "@Override public void execute()",
"identifier": "execute",
"invocations": [
"execute"
],
"modifiers": "... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_206 | {
"fields": [
{
"declarator": "A = Column.of(\"a\", Integer.class)",
"modifier": "private static final",
"original_string": "private static final Column<Integer> A = Column.of(\"a\", Integer.class);",
"type": "Column<Integer>",
"var_name": "A"
},
{
"declarator": "B = Co... | {
"body": "@Test\n\tpublic void test() {\n\t\tSchemaMapper schemaMapper = new SelfSchemaMapper();\n\t\tList<Column<?>> columns = Arrays.asList(A, B, C);\n\t\tSchema schema = Schema.of(columns);\n\t\twhen(relation.getSchema()).thenReturn(schema);\n\t\tCollection<ColumnPair<?>> mapping = schemaMapper.create(relation);\... | {
"fields": [],
"file": "HyMD/mapping/src/main/java/de/hpi/is/md/mapping/impl/SelfSchemaMapper.java",
"identifier": "SelfSchemaMapper",
"interfaces": "implements SchemaMapper",
"methods": [
{
"class_method_signature": "SelfSchemaMapper.toPair(Column<T> column)",
"constructor": false,
"fu... | {
"body": "@Override\n\tpublic Collection<ColumnPair<?>> create(Schema schema) {\n\t\tList<Column<?>> columns = schema.getColumns();\n\t\treturn columns.stream()\n\t\t\t.map(SelfSchemaMapper::toPair)\n\t\t\t.collect(Collectors.toList());\n\t}",
"class_method_signature": "SelfSchemaMapper.create(Schema schema)",
"... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_197 | {
"fields": [],
"file": "HyMD/hybrid/src/test/java/de/hpi/is/md/hybrid/impl/level/StatisticsTest.java",
"identifier": "StatisticsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testGroupedValidations() {\n\t\tStatistics statistics = new Statistics();\n\t\tassertThat(statistics.getGroupedValidations()).isEqualTo(0);\n\t\tstatistics.groupedValidation();\n\t\tassertThat(statistics.getGroupedValidations()).isEqualTo(1);\n\t}",
"class_method_signature": "Statist... | {
"fields": [
{
"declarator": "invalid = 0",
"modifier": "private",
"original_string": "private int invalid = 0;",
"type": "int",
"var_name": "invalid"
},
{
"declarator": "notSupported = 0",
"modifier": "private",
"original_string": "private int notSupported... | {
"body": "public void groupedValidation() {\n\t\tgroupedValidations++;\n\t}",
"class_method_signature": "Statistics.groupedValidation()",
"constructor": false,
"full_signature": "public void groupedValidation()",
"identifier": "groupedValidation",
"invocations": [],
"modifiers": "public",
"parameters":... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_178 | {
"fields": [
{
"declarator": "A = Column.of(\"a\", String.class)",
"modifier": "private static final",
"original_string": "private static final Column<String> A = Column.of(\"a\", String.class);",
"type": "Column<String>",
"var_name": "A"
},
{
"declarator": "B = Column... | {
"body": "@Test(expected = RuntimeException.class)\n\tpublic void testInputOpenException() throws InputOpenException {\n\t\tdoThrow(InputOpenException.class).when(relation).open();\n\t\tcompress();\n\t\tfail();\n\t}",
"class_method_signature": "CompressorTest.testInputOpenException()",
"constructor": false,
"f... | {
"fields": [
{
"declarator": "columnCompressors",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final Collection<ColumnCompressor<?>> columnCompressors;",
"type": "Collection<ColumnCompressor<?>>",
"var_name": "columnCompressors"
},
{
... | {
"body": "CompressedRelation compress(Iterable<Row> input) {\n\t\tinput.forEach(this::add);\n\t\treturn toRelation();\n\t}",
"class_method_signature": "Compressor.compress(Iterable<Row> input)",
"constructor": false,
"full_signature": " CompressedRelation compress(Iterable<Row> input)",
"identifier": "compre... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_251 | {
"fields": [],
"file": "DVHyperLogLog/src/test/java/de/metanome/algorithms/dvhyperloglog/DVHyperLogLogTest.java",
"identifier": "DVHyperLogLogTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetConfigurationRequirements() {\n }",
"class_method_signature": "DVHyperLogLogTest.testGetConfigurationRequirements()",
"constructor": false,
"full_signature": "@Test public void testGetConfigurationRequirements()",
"identifier": "testGetConfigurationRequirements",
"inv... | {
"fields": [],
"file": "DVHyperLogLog/src/main/java/de/metanome/algorithms/dvhyperloglog/DVHyperLogLog.java",
"identifier": "DVHyperLogLog",
"interfaces": "implements BasicStatisticsAlgorithm, RelationalInputParameterAlgorithm, StringParameterAlgorithm",
"methods": [
{
"class_method_signature": "DV... | {
"body": "@Override\n\tpublic ArrayList<ConfigurationRequirement<?>> getConfigurationRequirements() {\n\t\tArrayList<ConfigurationRequirement<?>> conf = new ArrayList<>();\n\t\tconf.add(new ConfigurationRequirementRelationalInput(DVHyperLogLog.Identifier.INPUT_GENERATOR.name()));\n\t\tConfigurationRequirementString ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_19 | {
"fields": [
{
"declarator": "TABLE = 0",
"modifier": "private static final",
"original_string": "private static final int TABLE = 0;",
"type": "int",
"var_name": "TABLE"
},
{
"declarator": "algo",
"modifier": "",
"original_string": "FAIDACore algo;",
... | {
"body": "@Test\n public void testExecuteTrinary() throws Exception {\n algo = new FAIDACore(Arity.N_ARY, new IdentityRowSampler(), t, sampleGoal);\n RelationalInputGenerator[] inputs = new RelationalInputGenerator[1];\n String[] header = {\"c0\", \"c1\", \"c2\", \"c3\", \"c4\", \"c5\"};\n ... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(getClass())",
"modifier": "private final",
"original_string": "private final Logger logger = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "detectNary",
... | {
"body": "public List<SimpleInd> execute(RelationalInputGenerator[] fileInputGenerators,\n InclusionDependencyResultReceiver resultReceiver)\n throws InputGenerationException, InputIterationException, AlgorithmConfigurationException {\n\n // Probably for row scalab... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_181 | {
"fields": [
{
"declarator": "A = Column.of(\"a\", Integer.class)",
"modifier": "private static final",
"original_string": "private static final Column<Integer> A = Column.of(\"a\", Integer.class);",
"type": "Column<Integer>",
"var_name": "A"
},
{
"declarator": "B = Co... | {
"body": "@Test\n\tpublic void testGetAllSimilarRightRecords() {\n\t\tList<PreprocessedColumnPair> columnPairs = create();\n\t\tPreprocessedColumnPair ab = columnPairs.get(0);\n\t\tassertThat(ab.getAllSimilarRightRecords(new int[]{4}, 0.5)).hasSize(4);\n\t\tassertThat(ab.getAllSimilarRightRecords(new int[]{4}, 0.5))... | {
"fields": [
{
"declarator": "serialVersionUID = -4122856934192664031L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = -4122856934192664031L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "lef... | {
"body": "@Timed\n\t@Override\n\tpublic IntCollection getAllSimilarRightRecords(int[] left, double threshold) {\n\t\tint leftValue = left[leftColumn];\n\t\treturn getAllSimilarRightRecords(leftValue, threshold);\n\t}",
"class_method_signature": "PreprocessedColumnPairImpl.getAllSimilarRightRecords(int[] left, doub... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_247 | {
"fields": [],
"file": "CFDFinder/src/test/java/de/metanome/algorithms/cfdfinder/expansion/ConstantPatternExpansionStrategyTest.java",
"identifier": "ConstantPatternExpansionStrategyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetChildPatternsFromExistingPattern() {\n int[][] values = new int[][] {\n new int[] {0, 1, 2},\n new int[] {0, 3, 4}\n };\n Pattern pattern = new Pattern(createAttributeMap(new int[] {0, -1, -1}));\n\n List<IntArrayList> ... | {
"fields": [],
"file": "CFDFinder/src/main/java/de/metanome/algorithms/cfdfinder/expansion/ConstantPatternExpansionStrategy.java",
"identifier": "ConstantPatternExpansionStrategy",
"interfaces": "",
"methods": [
{
"class_method_signature": "ConstantPatternExpansionStrategy.ConstantPatternExpansionS... | {
"body": "@Override\n public List<Pattern> getChildPatterns(Pattern currentPattern) {\n List<Pattern> result = new LinkedList<>();\n for (IntArrayList cluster : currentPattern.getCover()) {\n result.addAll(getChildPatterns(currentPattern, cluster));\n }\n return result;\n ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_139 | {
"fields": [
{
"declarator": "A = Column.of(\"a\", String.class)",
"modifier": "private static final",
"original_string": "private static final Column<String> A = Column.of(\"a\", String.class);",
"type": "Column<String>",
"var_name": "A"
},
{
"declarator": "B = Column... | {
"body": "@Test\n\tpublic void testGet() {\n\t\tRow row = createRow();\n\t\tOptional<String> a = row.get(A);\n\t\tassertThat(a).hasValue(\"foo\");\n\t\tOptional<Integer> b = row.get(B);\n\t\tassertThat(b).hasValue(Integer.valueOf(0));\n\t\tassertThat(row.get(C)).isEmpty();\n\t}",
"class_method_signature": "RowImpl... | {
"fields": [
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final BetterMap<Column<?>, Object> values;",
"type": "BetterMap<Column<?>, Object>",
"var_name": "values"
}
],
"file": "HyMD/db/src/main/java/de/hpi/is/md/relational/RowImpl.java"... | {
"body": "@Override\n\tpublic <T> Optional<T> get(Column<T> column) {\n\t\treturn values.get(column)\n\t\t\t.map(CastUtils::as);\n\t}",
"class_method_signature": "RowImpl.get(Column<T> column)",
"constructor": false,
"full_signature": "@Override public Optional<T> get(Column<T> column)",
"identifier": "get",... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_210 | {
"fields": [],
"file": "HyMD/demo/src/test/java/de/hpi/is/md/jcommander/JCommanderRunnerTest.java",
"identifier": "JCommanderRunnerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testRunWithHelp() {\n\t\tTestApplication app = new TestApplication();\n\t\tJCommanderRunner runner = createRunner(app);\n\t\trunner.run(\"--help\");\n\t\tassertThat(app.ran).isFalse();\n\t}",
"class_method_signature": "JCommanderRunnerTest.testRunWithHelp()",
"constructor": false,
... | {
"fields": [
{
"declarator": "app",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final Application app;",
"type": "Application",
"var_name": "app"
},
{
"declarator": "jc",
"modifier": "@NonNull\n\tprivate final",
"origina... | {
"body": "public void run(String... args) {\n\t\tboolean success = parse(args);\n\t\tif (!success || needsHelp()) {\n\t\t\tprintUsage();\n\t\t\treturn;\n\t\t}\n\t\tapp.run();\n\t}",
"class_method_signature": "JCommanderRunner.run(String... args)",
"constructor": false,
"full_signature": "public void run(String... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_39 | {
"fields": [
{
"declarator": "ducc",
"modifier": "protected",
"original_string": "protected Ducc ducc;",
"type": "Ducc",
"var_name": "ducc"
}
],
"file": "ducc/ducc_for_metanome/src/test/java/de/metanome/algorithms/ducc/DuccTest.java",
"identifier": "DuccTest",
"interface... | {
"body": "@Test\n public void testSetConfigurationValueNullEqualsNull()\n throws AlgorithmConfigurationException {\n boolean nullEqualsNull = false;\n\n ducc.setBooleanConfigurationValue(Ducc.NULL_EQUALS_NULL, nullEqualsNull);\n assertEquals(nullEqualsNull, ducc.nullEqualsNull);\n }",
"class_method... | {
"fields": [
{
"declarator": "INPUT_HANDLE = \"Relational Input\"",
"modifier": "protected static final",
"original_string": "protected static final String INPUT_HANDLE = \"Relational Input\";",
"type": "String",
"var_name": "INPUT_HANDLE"
},
{
"declarator": "NULL_EQUA... | {
"body": "@Override\n public void setBooleanConfigurationValue(String identifier, Boolean... values)\n throws AlgorithmConfigurationException {\n if (identifier.equals(NULL_EQUALS_NULL)) {\n this.nullEqualsNull = values[0];\n } else {\n throw new AlgorithmConfigurationException(\"Operation shou... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_230 | {
"fields": [],
"file": "fun/fun_algorithm/src/test/java/de/uni_potsdam/hpi/metanome/algorithms/fun/FunAlgorithmTest.java",
"identifier": "FunAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testYieldsAllFDsAndUCCs() throws InputIterationException, CouldNotReceiveResultException, InputGenerationException, AlgorithmConfigurationException, ColumnNameMismatchException {\n\t\t// Setup\n\t\tAlgorithmTestFixture fixture = new AlgorithmTestFixture();\n\t\tRelationalInput relation... | {
"fields": [
{
"declarator": "plis",
"modifier": "protected",
"original_string": "protected Map<ColumnCombinationBitset, PositionListIndex> plis;",
"type": "Map<ColumnCombinationBitset, PositionListIndex>",
"var_name": "plis"
},
{
"declarator": "rDash",
"modifier... | {
"body": "public void run(List<PositionListIndex> pliList)\n throws InputIterationException, CouldNotReceiveResultException, ColumnNameMismatchException {\n\n LinkedList<FunQuadruple> lkminusOne = new LinkedList<>();\n lkminusOne.add(new FunQuadruple(new ColumnCombinationBitset(), Long.MAX_V... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_81 | {
"fields": [
{
"declarator": "ANNOTATED = \"annotated\"",
"modifier": "private static final",
"original_string": "private static final String ANNOTATED = \"annotated\";",
"type": "String",
"var_name": "ANNOTATED"
},
{
"declarator": "NOT_ANNOTATED = \"notAnnotated\"",
... | {
"body": "@Test\n\tpublic void testGetDefaultValue() {\n\t\tassertThat(ReflectionUtils.getDefaultValue(HelperAnnotation.class, \"property\"))\n\t\t\t.hasValue(\"foo\");\n\t}",
"class_method_signature": "ReflectionUtilsTest.testGetDefaultValue()",
"constructor": false,
"full_signature": "@Test public void testG... | {
"fields": [],
"file": "HyMD/util/src/main/java/de/hpi/is/md/util/ReflectionUtils.java",
"identifier": "ReflectionUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ReflectionUtils.accessible(A accessibleObject)",
"constructor": false,
"full_signature": "public static M... | {
"body": "public static <T> Optional<T> getDefaultValue(Class<? extends Annotation> annotation,\n\t\tString property) {\n\t\ttry {\n\t\t\tObject defaultValue = annotation.getDeclaredMethod(property).getDefaultValue();\n\t\t\treturn Optional.ofNullable(defaultValue)\n\t\t\t\t.map(CastUtils::as);\n\t\t} catch (NoSuchM... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_119 | {
"fields": [
{
"declarator": "HASH_FUNCTION = Hashing.goodFastHash(10)",
"modifier": "private static final",
"original_string": "private static final HashFunction HASH_FUNCTION = Hashing.goodFastHash(10);",
"type": "HashFunction",
"var_name": "HASH_FUNCTION"
}
],
"file": "Hy... | {
"body": "@Test\n\tpublic void testPutShort() {\n\t\tassertThat(Hasher.of(HASH_FUNCTION).putShort((short) 0).putShort((short) 1).hash())\n\t\t\t.isEqualTo(HASH_FUNCTION.newHasher().putShort((short) 0).putShort((short) 1).hash());\n\t}",
"class_method_signature": "HasherTest.testPutShort()",
"constructor": false,... | {
"fields": [
{
"declarator": "hasher",
"modifier": "private final",
"original_string": "private final com.google.common.hash.Hasher hasher;",
"type": "com.google.common.hash.Hasher",
"var_name": "hasher"
}
],
"file": "HyMD/util/src/main/java/de/hpi/is/md/util/Hasher.java",
... | {
"body": "public Hasher putShort(short s) {\n\t\thasher.putShort(s);\n\t\treturn this;\n\t}",
"class_method_signature": "Hasher.putShort(short s)",
"constructor": false,
"full_signature": "public Hasher putShort(short s)",
"identifier": "putShort",
"invocations": [
"putShort"
],
"modifiers": "publi... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_97 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n\tpublic final",
"original_string": "@Rule\n\tpublic final TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
}
],
"file": "HyMD/util/src/test/ja... | {
"body": "@Test\n\tpublic void testWriteLines() throws IOException {\n\t\tWithFile withFile = FileUtils.with(folder.newFile());\n\t\twithFile.writeLines(Arrays.asList(\"foo\", \"bar\"));\n\t\tOptional<Collection<String>> lines = withFile.readLines();\n\t\tassertThat(lines, isPresentAnd(hasSize(2)));\n\t\tassertThat(... | {
"fields": [
{
"declarator": "CHARSET = Charset.defaultCharset()",
"modifier": "private static final",
"original_string": "private static final Charset CHARSET = Charset.defaultCharset();",
"type": "Charset",
"var_name": "CHARSET"
}
],
"file": "HyMD/util/src/main/java/de/hpi... | {
"body": "public static WithFile with(File file) {\n\t\treturn new WithFile(file);\n\t}",
"class_method_signature": "FileUtils.with(File file)",
"constructor": false,
"full_signature": "public static WithFile with(File file)",
"identifier": "with",
"invocations": [],
"modifiers": "public static",
"para... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_78 | {
"fields": [],
"file": "HyMD/util/src/test/java/de/hpi/is/md/util/OptionalDoubleTest.java",
"identifier": "OptionalDoubleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testOrElse() {\n\t\tassertThat(OptionalDouble.empty().orElse(2.0)).isEqualTo(2.0);\n\t\tassertThat(OptionalDouble.of(1.0).orElse(2.0)).isEqualTo(1.0);\n\t}",
"class_method_signature": "OptionalDoubleTest.testOrElse()",
"constructor": false,
"full_signature": "@Test public void te... | {
"fields": [
{
"declarator": "EMPTY = new OptionalDouble()",
"modifier": "private static final",
"original_string": "private static final OptionalDouble EMPTY = new OptionalDouble();",
"type": "OptionalDouble",
"var_name": "EMPTY"
},
{
"declarator": "optional",
"... | {
"body": "public double orElse(double other) {\n\t\treturn optional.orElse(other);\n\t}",
"class_method_signature": "OptionalDouble.orElse(double other)",
"constructor": false,
"full_signature": "public double orElse(double other)",
"identifier": "orElse",
"invocations": [
"orElse"
],
"modifiers": ... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_158 | {
"fields": [
{
"declarator": "lattice",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate Lattice lattice;",
"type": "Lattice",
"var_name": "lattice"
},
{
"declarator": "notSupported",
"modifier": "@Mock\n\tprivate",
"original_string": "@... | {
"body": "@Test\n\tpublic void testGetDepth() {\n\t\tFullLattice fullLattice = new FullLattice(lattice, notSupported);\n\t\twhen(Integer.valueOf(lattice.getDepth())).thenReturn(Integer.valueOf(2));\n\t\tassertThat(fullLattice.getDepth()).isEqualTo(2);\n\t\tverify(lattice).getDepth();\n\t}",
"class_method_signature... | {
"fields": [
{
"declarator": "lattice",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final Lattice lattice;",
"type": "Lattice",
"var_name": "lattice"
},
{
"declarator": "notSupported",
"modifier": "@NonNull\n\tprivate final",
... | {
"body": "public int getDepth() {\n\t\treturn lattice.getDepth();\n\t}",
"class_method_signature": "FullLattice.getDepth()",
"constructor": false,
"full_signature": "public int getDepth()",
"identifier": "getDepth",
"invocations": [
"getDepth"
],
"modifiers": "public",
"parameters": "()",
"retu... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_54 | {
"fields": [],
"file": "DVAKMV/src/test/java/de/metanome/algorithms/dvakmv/DVAKMVTest.java",
"identifier": "DVAKMVTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExecute() {\n }",
"class_method_signature": "DVAKMVTest.testExecute()",
"constructor": false,
"full_signature": "@Test public void testExecute()",
"identifier": "testExecute",
"invocations": [],
"modifiers": "@Test public",
"parameters": "()",
"return": "void",
"... | {
"fields": [],
"file": "DVAKMV/src/main/java/de/metanome/algorithms/dvakmv/DVAKMV.java",
"identifier": "DVAKMV",
"interfaces": "implements BasicStatisticsAlgorithm, RelationalInputParameterAlgorithm, StringParameterAlgorithm",
"methods": [
{
"class_method_signature": "DVAKMV.getConfigurationRequire... | {
"body": "@Override\n\tpublic void execute() throws AlgorithmExecutionException {\n\t\tsuper.execute();\n\t}",
"class_method_signature": "DVAKMV.execute()",
"constructor": false,
"full_signature": "@Override public void execute()",
"identifier": "execute",
"invocations": [
"execute"
],
"modifiers":... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_123 | {
"fields": [],
"file": "HyMD/util/src/test/java/de/hpi/is/md/util/MathUtilsTest.java",
"identifier": "MathUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testIncrement() {\n\t\tassertThat(MathUtils.increment(8L)).isEqualTo(9L);\n\t\tassertThat(MathUtils.increment(0L)).isEqualTo(1L);\n\t\tassertThat(MathUtils.increment(-8L)).isEqualTo(-7L);\n\t}",
"class_method_signature": "MathUtilsTest.testIncrement()",
"constructor": false,
"ful... | {
"fields": [],
"file": "HyMD/util/src/main/java/de/hpi/is/md/util/MathUtils.java",
"identifier": "MathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MathUtils.divide(double dividend, double divisor)",
"constructor": false,
"full_signature": "public static double div... | {
"body": "public static long increment(long l) {\n\t\treturn l + 1;\n\t}",
"class_method_signature": "MathUtils.increment(long l)",
"constructor": false,
"full_signature": "public static long increment(long l)",
"identifier": "increment",
"invocations": [],
"modifiers": "public static",
"parameters": "... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_174 | {
"fields": [
{
"declarator": "A = Column.of(\"a\", String.class)",
"modifier": "private static final",
"original_string": "private static final Column<String> A = Column.of(\"a\", String.class);",
"type": "Column<String>",
"var_name": "A"
},
{
"declarator": "B = Column... | {
"body": "@Test\n\tpublic void testDictionaryB() {\n\t\tmock();\n\t\tCompressedRelation compressed = compress();\n\t\tCompressedColumn<Integer> column = compressed.getColumn(1);\n\t\tDictionary<Integer> dictionary = column.getDictionary();\n\t\tassertThat(dictionary.values()).hasSize(2);\n\t\tassertThat(dictionary.v... | {
"fields": [
{
"declarator": "columnCompressors",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final Collection<ColumnCompressor<?>> columnCompressors;",
"type": "Collection<ColumnCompressor<?>>",
"var_name": "columnCompressors"
},
{
... | {
"body": "CompressedRelation compress(Iterable<Row> input) {\n\t\tinput.forEach(this::add);\n\t\treturn toRelation();\n\t}",
"class_method_signature": "Compressor.compress(Iterable<Row> input)",
"constructor": false,
"full_signature": " CompressedRelation compress(Iterable<Row> input)",
"identifier": "compre... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_15 | {
"fields": [
{
"declarator": "TABLE = 0",
"modifier": "public static final",
"original_string": "public static final int TABLE = 0;",
"type": "int",
"var_name": "TABLE"
}
],
"file": "FAIDA/FAIDAAlgorithm/src/test/java/de/hpi/mpss2015n/approxind/utils/SimpleColumnCombinationT... | {
"body": "@Test\n public void testFlipOff() throws Exception {\n SimpleColumnCombination a = SimpleColumnCombination.create(TABLE, 1,2,3);\n SimpleColumnCombination b = a.flipOff(0);\n SimpleColumnCombination c = a.flipOff(1);\n SimpleColumnCombination d = a.flipOff(2);\n\n asse... | {
"fields": [
{
"declarator": "COMPARATOR = Ints.lexicographicalComparator()",
"modifier": "private static final",
"original_string": "private static final Comparator<int[]> COMPARATOR = Ints.lexicographicalComparator();",
"type": "Comparator<int[]>",
"var_name": "COMPARATOR"
},
... | {
"body": "public SimpleColumnCombination flipOff(int position) {\n int[] newColumns = new int[columns.length - 1];\n System.arraycopy(columns, 0, newColumns, 0, position);\n System.arraycopy(columns, position + 1, newColumns, position, columns.length - position - 1);\n return new SimpleCo... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_162 | {
"fields": [
{
"declarator": "latticeMd",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate LatticeMD latticeMd;",
"type": "LatticeMD",
"var_name": "latticeMd"
},
{
"declarator": "lhs",
"modifier": "@Mock\n\tprivate",
"original_string": "... | {
"body": "@Test\n\tpublic void testNotMinimal() {\n\t\tint rhsAttr = 0;\n\t\tdouble threshold = 0.1;\n\t\tThresholdLowerer task = new ThresholdLowerer(latticeMd);\n\t\twhen(Boolean.valueOf(latticeMd.wouldBeMinimal(new MDElementImpl(rhsAttr, threshold)))).thenReturn(Boolean.FALSE);\n\t\twhen(latticeMd.getLhs()).thenR... | {
"fields": [
{
"declarator": "latticeMd",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final LatticeMD latticeMd;",
"type": "LatticeMD",
"var_name": "latticeMd"
}
],
"file": "HyMD/hybrid/src/main/java/de/hpi/is/md/hybrid/impl/infer/Thresho... | {
"body": "public void lowerThreshold(int rhsAttr, double threshold) {\n\t\tMDElement rhs = new MDElementImpl(rhsAttr, threshold);\n\t\tlowerThreshold(rhs);\n\t}",
"class_method_signature": "ThresholdLowerer.lowerThreshold(int rhsAttr, double threshold)",
"constructor": false,
"full_signature": "public void low... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_42 | {
"fields": [
{
"declarator": "ducc",
"modifier": "protected",
"original_string": "protected Ducc ducc;",
"type": "Ducc",
"var_name": "ducc"
}
],
"file": "ducc/ducc_for_metanome/src/test/java/de/metanome/algorithms/ducc/DuccTest.java",
"identifier": "DuccTest",
"interface... | {
"body": "@Test\n public void testSetResultReceiverUniqueColumnCombinationResultReceiver() {\n // Setup\n // Expected values\n UniqueColumnCombinationResultReceiver\n expectedResultReceiver =\n mock(UniqueColumnCombinationResultReceiver.class);\n\n // Execute functionality\n ducc.setRes... | {
"fields": [
{
"declarator": "INPUT_HANDLE = \"Relational Input\"",
"modifier": "protected static final",
"original_string": "protected static final String INPUT_HANDLE = \"Relational Input\";",
"type": "String",
"var_name": "INPUT_HANDLE"
},
{
"declarator": "NULL_EQUA... | {
"body": "@Override\n public void setResultReceiver(UniqueColumnCombinationResultReceiver receiver) {\n this.resultReceiver = receiver;\n }",
"class_method_signature": "Ducc.setResultReceiver(UniqueColumnCombinationResultReceiver receiver)",
"constructor": false,
"full_signature": "@Override public void s... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_135 | {
"fields": [],
"file": "HyMD/util/src/test/java/de/hpi/is/md/util/CollectionUtilsTest.java",
"identifier": "CollectionUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testIntersection() {\n\t\tList<IntCollection> clusters = ImmutableList.<IntCollection>builder()\n\t\t\t.add(new IntOpenHashSet(Arrays.asList(1, 2, 3, 4)))\n\t\t\t.add(new IntOpenHashSet(Arrays.asList(2, 3, 4, 5)))\n\t\t\t.add(new IntOpenHashSet(Arrays.asList(1, 3, 4)))\n\t\t\t.build();... | {
"fields": [
{
"declarator": "CLUSTER_COMPARATOR = Comparator\n\t\t.comparingInt(Collection::size)",
"modifier": "private static final",
"original_string": "private static final Comparator<IntCollection> CLUSTER_COMPARATOR = Comparator\n\t\t.comparingInt(Collection::size);",
"type": "Comp... | {
"body": "public static Optional<IntCollection> intersection(Collection<IntCollection> clusters) {\n\t\t//shrink result as early as possible\n\t\tList<IntCollection> sorted = sort(clusters, CLUSTER_COMPARATOR);\n\t\treturn createIntersector(sorted).map(HeadAndTailIntersector::intersect);\n\t}",
"class_method_signa... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_43 | {
"fields": [],
"file": "DVPCSA/src/test/java/de/metanome/algorithms/dvpcsa/DVPCSATest.java",
"identifier": "DVPCSATest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetConfigurationRequirements() {\n }",
"class_method_signature": "DVPCSATest.testGetConfigurationRequirements()",
"constructor": false,
"full_signature": "@Test public void testGetConfigurationRequirements()",
"identifier": "testGetConfigurationRequirements",
"invocation... | {
"fields": [],
"file": "DVPCSA/src/main/java/de/metanome/algorithms/dvpcsa/DVPCSA.java",
"identifier": "DVPCSA",
"interfaces": "implements BasicStatisticsAlgorithm, RelationalInputParameterAlgorithm, StringParameterAlgorithm",
"methods": [
{
"class_method_signature": "DVPCSA.getConfigurationRequire... | {
"body": "@Override\n\tpublic ArrayList<ConfigurationRequirement<?>> getConfigurationRequirements() {\n\t\tArrayList<ConfigurationRequirement<?>> conf = new ArrayList<>();\n\t\tconf.add(new ConfigurationRequirementRelationalInput(DVPCSA.Identifier.INPUT_GENERATOR.name()));\n\t\tConfigurationRequirementString inputst... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_134 | {
"fields": [],
"file": "HyMD/util/src/test/java/de/hpi/is/md/util/CollectionUtilsTest.java",
"identifier": "CollectionUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testFirst() {\n\t\tassertThat(CollectionUtils.first(DoubleSortedSets.EMPTY_SET).boxed()).isEmpty();\n\t\tassertThat(\n\t\t\tCollectionUtils.first(new DoubleRBTreeSet(Sets.newTreeSet(Arrays.asList(2.0, 1.0))))\n\t\t\t\t.boxed()).hasValue(1.0);\n\t}",
"class_method_signature": "Collect... | {
"fields": [
{
"declarator": "CLUSTER_COMPARATOR = Comparator\n\t\t.comparingInt(Collection::size)",
"modifier": "private static final",
"original_string": "private static final Comparator<IntCollection> CLUSTER_COMPARATOR = Comparator\n\t\t.comparingInt(Collection::size);",
"type": "Comp... | {
"body": "public static OptionalDouble first(DoubleSortedSet set) {\n\t\tif (set.isEmpty()) {\n\t\t\treturn OptionalDouble.empty();\n\t\t}\n\t\tdouble first = set.firstDouble();\n\t\treturn OptionalDouble.of(first);\n\t}",
"class_method_signature": "CollectionUtils.first(DoubleSortedSet set)",
"constructor": fal... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_14 | {
"fields": [
{
"declarator": "TABLE = 0",
"modifier": "public static final",
"original_string": "public static final int TABLE = 0;",
"type": "int",
"var_name": "TABLE"
}
],
"file": "FAIDA/FAIDAAlgorithm/src/test/java/de/hpi/mpss2015n/approxind/utils/SimpleColumnCombinationT... | {
"body": "@Test\n public void testCombineWith() throws Exception {\n SimpleColumnCombination a = SimpleColumnCombination.create(TABLE, 2,3,6);\n SimpleColumnCombination b = SimpleColumnCombination.create(TABLE, 2,3,7);\n\n SimpleColumnCombination result = SimpleColumnCombination.create(TABLE,... | {
"fields": [
{
"declarator": "COMPARATOR = Ints.lexicographicalComparator()",
"modifier": "private static final",
"original_string": "private static final Comparator<int[]> COMPARATOR = Ints.lexicographicalComparator();",
"type": "Comparator<int[]>",
"var_name": "COMPARATOR"
},
... | {
"body": "public SimpleColumnCombination combineWith(SimpleColumnCombination other, Map<SimpleColumnCombination, SimpleColumnCombination> columnCombinations) {\n Verify.verify(table == other.table, \"only merge inside a table\");\n SimpleColumnCombination combinedCombination = new SimpleColumnCombinati... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_163 | {
"fields": [
{
"declarator": "latticeMd",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate LatticeMD latticeMd;",
"type": "LatticeMD",
"var_name": "latticeMd"
},
{
"declarator": "lhs",
"modifier": "@Mock\n\tprivate",
"original_string": "... | {
"body": "@Test\n\tpublic void testTrivial() {\n\t\tint rhsAttr = 0;\n\t\tdouble threshold = 0.1;\n\t\tThresholdLowerer task = new ThresholdLowerer(latticeMd);\n\t\twhen(Boolean.valueOf(latticeMd.wouldBeMinimal(new MDElementImpl(rhsAttr, threshold)))).thenReturn(Boolean.TRUE);\n\t\twhen(latticeMd.getLhs()).thenRetur... | {
"fields": [
{
"declarator": "latticeMd",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final LatticeMD latticeMd;",
"type": "LatticeMD",
"var_name": "latticeMd"
}
],
"file": "HyMD/hybrid/src/main/java/de/hpi/is/md/hybrid/impl/infer/Thresho... | {
"body": "public void lowerThreshold(int rhsAttr, double threshold) {\n\t\tMDElement rhs = new MDElementImpl(rhsAttr, threshold);\n\t\tlowerThreshold(rhs);\n\t}",
"class_method_signature": "ThresholdLowerer.lowerThreshold(int rhsAttr, double threshold)",
"constructor": false,
"full_signature": "public void low... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_175 | {
"fields": [
{
"declarator": "A = Column.of(\"a\", String.class)",
"modifier": "private static final",
"original_string": "private static final Column<String> A = Column.of(\"a\", String.class);",
"type": "Column<String>",
"var_name": "A"
},
{
"declarator": "B = Column... | {
"body": "@Test\n\tpublic void testDictionaryRecords() {\n\t\tmock();\n\t\tCompressedRelation compressed = compress();\n\t\tDictionaryRecords dictionaryRecords = compressed.getDictionaryRecords();\n\t\tassertThat(dictionaryRecords.getAll()).hasSize(3);\n\t\tassertThat(dictionaryRecords.get(0).length).isEqualTo(2);\n... | {
"fields": [
{
"declarator": "columnCompressors",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final Collection<ColumnCompressor<?>> columnCompressors;",
"type": "Collection<ColumnCompressor<?>>",
"var_name": "columnCompressors"
},
{
... | {
"body": "CompressedRelation compress(Iterable<Row> input) {\n\t\tinput.forEach(this::add);\n\t\treturn toRelation();\n\t}",
"class_method_signature": "Compressor.compress(Iterable<Row> input)",
"constructor": false,
"full_signature": " CompressedRelation compress(Iterable<Row> input)",
"identifier": "compre... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_55 | {
"fields": [],
"file": "DVMinCount/src/test/java/de/metanome/algorithms/dvmincount/DVMinCountTest.java",
"identifier": "DVMinCountTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetConfigurationRequirements() {\n }",
"class_method_signature": "DVMinCountTest.testGetConfigurationRequirements()",
"constructor": false,
"full_signature": "@Test public void testGetConfigurationRequirements()",
"identifier": "testGetConfigurationRequirements",
"invoca... | {
"fields": [],
"file": "DVMinCount/src/main/java/de/metanome/algorithms/dvmincount/DVMinCount.java",
"identifier": "DVMinCount",
"interfaces": "implements BasicStatisticsAlgorithm, RelationalInputParameterAlgorithm, StringParameterAlgorithm",
"methods": [
{
"class_method_signature": "DVMinCount.get... | {
"body": "@Override\n\tpublic ArrayList<ConfigurationRequirement<?>> getConfigurationRequirements() {\n\t\tArrayList<ConfigurationRequirement<?>> conf = new ArrayList<>();\n\t\tconf.add(new ConfigurationRequirementRelationalInput(DVMinCount.Identifier.INPUT_GENERATOR.name()));\n\t\tConfigurationRequirementString inp... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_122 | {
"fields": [],
"file": "HyMD/util/src/test/java/de/hpi/is/md/util/MathUtilsTest.java",
"identifier": "MathUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testDivide() {\n\t\tassertThat(MathUtils.divide(8.0, 2.0)).isEqualTo(4.0);\n\t\tassertThat(MathUtils.divide(0.0, 2.0)).isEqualTo(0.0);\n\t\tassertThat(MathUtils.divide(8.0, 0.0)).isEqualTo(0.0);\n\t}",
"class_method_signature": "MathUtilsTest.testDivide()",
"constructor": false,
... | {
"fields": [],
"file": "HyMD/util/src/main/java/de/hpi/is/md/util/MathUtils.java",
"identifier": "MathUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "MathUtils.divide(double dividend, double divisor)",
"constructor": false,
"full_signature": "public static double div... | {
"body": "public static double divide(double dividend, double divisor) {\n\t\treturn divisor == 0.0 ? 0.0 : dividend / divisor;\n\t}",
"class_method_signature": "MathUtils.divide(double dividend, double divisor)",
"constructor": false,
"full_signature": "public static double divide(double dividend, double divi... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_159 | {
"fields": [
{
"declarator": "lattice",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate Lattice lattice;",
"type": "Lattice",
"var_name": "lattice"
},
{
"declarator": "notSupported",
"modifier": "@Mock\n\tprivate",
"original_string": "@... | {
"body": "@Test\n\tpublic void testGetLevel() {\n\t\tFullLattice fullLattice = new FullLattice(lattice, notSupported);\n\t\tLatticeMD latticeMD = Mockito.mock(LatticeMD.class);\n\t\twhen(lattice.getLevel(1)).thenReturn(Collections.singletonList(latticeMD));\n\t\tCollection<LatticeMD> level = fullLattice.getLevel(1);... | {
"fields": [
{
"declarator": "lattice",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final Lattice lattice;",
"type": "Lattice",
"var_name": "lattice"
},
{
"declarator": "notSupported",
"modifier": "@NonNull\n\tprivate final",
... | {
"body": "public Collection<LatticeMD> getLevel(int level) {\n\t\tCollection<LatticeMD> candidates = lattice.getLevel(level);\n\t\treturn StreamUtils.seq(candidates)\n\t\t\t.filter(this::isSupported)\n\t\t\t.toList();\n\t}",
"class_method_signature": "FullLattice.getLevel(int level)",
"constructor": false,
"fu... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_96 | {
"fields": [],
"file": "HyMD/util/src/test/java/de/hpi/is/md/util/ObjectUtilsTest.java",
"identifier": "ObjectUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testEitherNull() {\n\t\tassertThat(ObjectUtils.eitherNull(null, null)).isTrue();\n\t\tassertThat(ObjectUtils.eitherNull(\"\", null)).isTrue();\n\t\tassertThat(ObjectUtils.eitherNull(null, \"\")).isTrue();\n\t\tassertThat(ObjectUtils.eitherNull(\"\", \"\")).isFalse();\n\t}",
"class_me... | {
"fields": [],
"file": "HyMD/util/src/main/java/de/hpi/is/md/util/ObjectUtils.java",
"identifier": "ObjectUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ObjectUtils.bothNull(Object obj1, Object obj2)",
"constructor": false,
"full_signature": "public static boolean b... | {
"body": "public static boolean eitherNull(Object obj1, Object obj2) {\n\t\treturn obj1 == null || obj2 == null;\n\t}",
"class_method_signature": "ObjectUtils.eitherNull(Object obj1, Object obj2)",
"constructor": false,
"full_signature": "public static boolean eitherNull(Object obj1, Object obj2)",
"identifi... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_79 | {
"fields": [
{
"declarator": "ANNOTATED = \"annotated\"",
"modifier": "private static final",
"original_string": "private static final String ANNOTATED = \"annotated\";",
"type": "String",
"var_name": "ANNOTATED"
},
{
"declarator": "NOT_ANNOTATED = \"notAnnotated\"",
... | {
"body": "@Test\n\tpublic void testGet() throws NoSuchFieldException {\n\t\tHelperClass obj = new HelperClass();\n\t\tField field = HelperClass.class.getDeclaredField(ACCESSIBLE);\n\t\tboolean accessible = true;\n\t\tobj.setAccessible(accessible);\n\t\tassertThat(obj.getAccessible()).isEqualTo(accessible);\n\t\tasse... | {
"fields": [],
"file": "HyMD/util/src/main/java/de/hpi/is/md/util/ReflectionUtils.java",
"identifier": "ReflectionUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ReflectionUtils.accessible(A accessibleObject)",
"constructor": false,
"full_signature": "public static M... | {
"body": "@SuppressWarnings(\"unchecked\")\n\tpublic static <T> Optional<T> get(Field field, Object obj) {\n\t\ttry {\n\t\t\tT value = (T) field.get(obj);\n\t\t\treturn Optional.ofNullable(value);\n\t\t} catch (Exception e) {\n\t\t\treturn Optional.empty();\n\t\t}\n\t}",
"class_method_signature": "ReflectionUtils.... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_227 | {
"fields": [],
"file": "fun/fun_algorithm_helper/src/test/java/de/uni_potsdam/hpi/metanome/ma2013n2/algorithm_helper/data_structures/HoleFinderTest.java",
"identifier": "HoleFinderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUpdateFirst() {\n HoleFinder finder = new HoleFinder(5);\n\n ColumnCombinationBitset mNUCC = new ColumnCombinationBitset(1, 3, 4);\n finder.update(mNUCC);\n\n ColumnCombinationBitset oneColumn0 = new ColumnCombinationBitset(0);\n ColumnCombinati... | {
"fields": [
{
"declarator": "complementarySet",
"modifier": "protected",
"original_string": "protected Set<ColumnCombinationBitset> complementarySet;",
"type": "Set<ColumnCombinationBitset>",
"var_name": "complementarySet"
},
{
"declarator": "allBitsSet",
"modif... | {
"body": "public void update(ColumnCombinationBitset maximalNegative) {\n ColumnCombinationBitset singleComplementMaxNegative = this.allBitsSet.minus(maximalNegative);\n\n if (this.complementarySet.size() == 0) {\n for (ColumnCombinationBitset combination : singleComplementMaxNegative.getCon... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_80 | {
"fields": [
{
"declarator": "ANNOTATED = \"annotated\"",
"modifier": "private static final",
"original_string": "private static final String ANNOTATED = \"annotated\";",
"type": "String",
"var_name": "ANNOTATED"
},
{
"declarator": "NOT_ANNOTATED = \"notAnnotated\"",
... | {
"body": "@Test\n\tpublic void testGetAnnotationIfPresent() throws NoSuchFieldException {\n\t\tField annotated = HelperClass.class.getDeclaredField(ANNOTATED);\n\t\tField notAnnotated = HelperClass.class.getDeclaredField(NOT_ANNOTATED);\n\t\tassertThat(ReflectionUtils.getAnnotationIfPresent(annotated, Deprecated.cla... | {
"fields": [],
"file": "HyMD/util/src/main/java/de/hpi/is/md/util/ReflectionUtils.java",
"identifier": "ReflectionUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ReflectionUtils.accessible(A accessibleObject)",
"constructor": false,
"full_signature": "public static M... | {
"body": "public static <T extends Annotation> Optional<T> getAnnotationIfPresent(\n\t\tAnnotatedElement annotatedElement, Class<T> annotationClass) {\n\t\tif (annotatedElement.isAnnotationPresent(annotationClass)) {\n\t\t\tT annotation = annotatedElement.getAnnotation(annotationClass);\n\t\t\treturn Optional.of(ann... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_118 | {
"fields": [
{
"declarator": "HASH_FUNCTION = Hashing.goodFastHash(10)",
"modifier": "private static final",
"original_string": "private static final HashFunction HASH_FUNCTION = Hashing.goodFastHash(10);",
"type": "HashFunction",
"var_name": "HASH_FUNCTION"
}
],
"file": "Hy... | {
"body": "@Test\n\tpublic void testPutLong() {\n\t\tassertThat(Hasher.of(HASH_FUNCTION).putLong(0L).putLong(1L).hash())\n\t\t\t.isEqualTo(HASH_FUNCTION.newHasher().putLong(0L).putLong(1L).hash());\n\t}",
"class_method_signature": "HasherTest.testPutLong()",
"constructor": false,
"full_signature": "@Test public... | {
"fields": [
{
"declarator": "hasher",
"modifier": "private final",
"original_string": "private final com.google.common.hash.Hasher hasher;",
"type": "com.google.common.hash.Hasher",
"var_name": "hasher"
}
],
"file": "HyMD/util/src/main/java/de/hpi/is/md/util/Hasher.java",
... | {
"body": "public Hasher putLong(long l) {\n\t\thasher.putLong(l);\n\t\treturn this;\n\t}",
"class_method_signature": "Hasher.putLong(long l)",
"constructor": false,
"full_signature": "public Hasher putLong(long l)",
"identifier": "putLong",
"invocations": [
"putLong"
],
"modifiers": "public",
"pa... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_231 | {
"fields": [],
"file": "fun/fun_algorithm/src/test/java/de/uni_potsdam/hpi/metanome/algorithms/fun/FunAlgorithmTest.java",
"identifier": "FunAlgorithmTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testFunFastCount() throws CouldNotReceiveResultException, InputGenerationException, InputIterationException, AlgorithmConfigurationException, ColumnNameMismatchException {\n\t\t// Setup\n\t\tFunFastCountFixture fixture = new FunFastCountFixture();\n\t\tRelationalInput relationalInput =... | {
"fields": [
{
"declarator": "plis",
"modifier": "protected",
"original_string": "protected Map<ColumnCombinationBitset, PositionListIndex> plis;",
"type": "Map<ColumnCombinationBitset, PositionListIndex>",
"var_name": "plis"
},
{
"declarator": "rDash",
"modifier... | {
"body": "public void run(List<PositionListIndex> pliList)\n throws InputIterationException, CouldNotReceiveResultException, ColumnNameMismatchException {\n\n LinkedList<FunQuadruple> lkminusOne = new LinkedList<>();\n lkminusOne.add(new FunQuadruple(new ColumnCombinationBitset(), Long.MAX_V... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_38 | {
"fields": [
{
"declarator": "ducc",
"modifier": "protected",
"original_string": "protected Ducc ducc;",
"type": "Ducc",
"var_name": "ducc"
}
],
"file": "ducc/ducc_for_metanome/src/test/java/de/metanome/algorithms/ducc/DuccTest.java",
"identifier": "DuccTest",
"interface... | {
"body": "@Test\n public void testSetConfigurationValueStringSimpleRelationalInputGenerator()\n throws AlgorithmConfigurationException {\n RelationalInputGenerator expectedInputGenerator = mock(RelationalInputGenerator.class);\n\n ducc.setRelationalInputConfigurationValue(Ducc.INPUT_HANDLE, expectedInput... | {
"fields": [
{
"declarator": "INPUT_HANDLE = \"Relational Input\"",
"modifier": "protected static final",
"original_string": "protected static final String INPUT_HANDLE = \"Relational Input\";",
"type": "String",
"var_name": "INPUT_HANDLE"
},
{
"declarator": "NULL_EQUA... | {
"body": "@Override\n public void setRelationalInputConfigurationValue(String identifier, RelationalInputGenerator... values)\n throws AlgorithmConfigurationException {\n if (identifier.equals(INPUT_HANDLE)) {\n inputGenerator = values[0];\n } else {\n throw new AlgorithmConfigurationException(... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_211 | {
"fields": [],
"file": "HyMD/demo/src/test/java/de/hpi/is/md/jcommander/JCommanderRunnerTest.java",
"identifier": "JCommanderRunnerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testRunWithRequired() {\n\t\tTestApplication app = new TestApplication();\n\t\tJCommanderRunner runner = createRunner(app);\n\t\trunner.run(\"-r\");\n\t\tassertThat(app.ran).isTrue();\n\t}",
"class_method_signature": "JCommanderRunnerTest.testRunWithRequired()",
"constructor": fals... | {
"fields": [
{
"declarator": "app",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final Application app;",
"type": "Application",
"var_name": "app"
},
{
"declarator": "jc",
"modifier": "@NonNull\n\tprivate final",
"origina... | {
"body": "public void run(String... args) {\n\t\tboolean success = parse(args);\n\t\tif (!success || needsHelp()) {\n\t\t\tprintUsage();\n\t\t\treturn;\n\t\t}\n\t\tapp.run();\n\t}",
"class_method_signature": "JCommanderRunner.run(String... args)",
"constructor": false,
"full_signature": "public void run(String... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_138 | {
"fields": [],
"file": "HyMD/util/src/test/java/de/hpi/is/md/util/BigDecimalUtilsTest.java",
"identifier": "BigDecimalUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void test() {\n\t\tassertThat(BigDecimalUtils.valueOf(0).intValue()).isEqualTo(0);\n\t\tassertThat(BigDecimalUtils.valueOf(100).intValue()).isEqualTo(100);\n\t\tassertThat(BigDecimalUtils.valueOf(1000).intValue()).isEqualTo(1000);\n\t}",
"class_method_signature": "BigDecimalUtilsTest.test... | {
"fields": [
{
"declarator": "NUMBERS = new BigDecimal[500]",
"modifier": "private static final",
"original_string": "private static final BigDecimal[] NUMBERS = new BigDecimal[500];",
"type": "BigDecimal[]",
"var_name": "NUMBERS"
}
],
"file": "HyMD/util/src/main/java/de/hpi... | {
"body": "public static BigDecimal valueOf(int number) {\n\t\treturn 0 <= number && number < NUMBERS.length ? NUMBERS[number]\n\t\t\t: BigDecimal.valueOf(number);\n\t}",
"class_method_signature": "BigDecimalUtils.valueOf(int number)",
"constructor": false,
"full_signature": "public static BigDecimal valueOf(in... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_246 | {
"fields": [],
"file": "CFDFinder/src/test/java/de/metanome/algorithms/cfdfinder/expansion/ConstantPatternExpansionStrategyTest.java",
"identifier": "ConstantPatternExpansionStrategyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNullPatternGenerationNoneSet() {\n ConstantPatternExpansionStrategy out = new ConstantPatternExpansionStrategy(new int[][] {});\n Pattern nullPattern = out.generateNullPattern(createAttributes(3, new int[] {}));\n PatternEntry[] patternEntries = nullPattern.g... | {
"fields": [],
"file": "CFDFinder/src/main/java/de/metanome/algorithms/cfdfinder/expansion/ConstantPatternExpansionStrategy.java",
"identifier": "ConstantPatternExpansionStrategy",
"interfaces": "",
"methods": [
{
"class_method_signature": "ConstantPatternExpansionStrategy.ConstantPatternExpansionS... | {
"body": "@Override\n public Pattern generateNullPattern(BitSet attributes) {\n Map<Integer, PatternEntry> allVariables = new HashMap<>();\n for (int i = attributes.nextSetBit(0); i >= 0; i = attributes.nextSetBit(i + 1)) {\n allVariables.put(Integer.valueOf(i), new VariablePatternEntry()... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_18 | {
"fields": [
{
"declarator": "TABLE = 0",
"modifier": "private static final",
"original_string": "private static final int TABLE = 0;",
"type": "int",
"var_name": "TABLE"
},
{
"declarator": "algo",
"modifier": "",
"original_string": "FAIDACore algo;",
... | {
"body": "@Test\n public void testExecuteBinary() throws Exception {\n algo = new FAIDACore(Arity.N_ARY, new IdentityRowSampler(), t, sampleGoal);\n RelationalInputGenerator[] inputs = new RelationalInputGenerator[1];\n String[] header = {\"c0\", \"c1\", \"c2\", \"c3\"};\n String table... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(getClass())",
"modifier": "private final",
"original_string": "private final Logger logger = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "detectNary",
... | {
"body": "public List<SimpleInd> execute(RelationalInputGenerator[] fileInputGenerators,\n InclusionDependencyResultReceiver resultReceiver)\n throws InputGenerationException, InputIterationException, AlgorithmConfigurationException {\n\n // Probably for row scalab... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_180 | {
"fields": [
{
"declarator": "A = Column.of(\"a\", String.class)",
"modifier": "private static final",
"original_string": "private static final Column<String> A = Column.of(\"a\", String.class);",
"type": "Column<String>",
"var_name": "A"
},
{
"declarator": "B = Column... | {
"body": "@Test\n\tpublic void testPliB() {\n\t\tmock();\n\t\tCompressedRelation compressed = compress();\n\t\tCompressedColumn<Integer> column = compressed.getColumn(1);\n\t\tPositionListIndex pli = column.getPli();\n\t\tassertThat(pli.get(0)).hasSize(1);\n\t\tassertThat(pli.get(1)).hasSize(2);\n\t\tassertThat(pli.... | {
"fields": [
{
"declarator": "columnCompressors",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final Collection<ColumnCompressor<?>> columnCompressors;",
"type": "Collection<ColumnCompressor<?>>",
"var_name": "columnCompressors"
},
{
... | {
"body": "CompressedRelation compress(Iterable<Row> input) {\n\t\tinput.forEach(this::add);\n\t\treturn toRelation();\n\t}",
"class_method_signature": "Compressor.compress(Iterable<Row> input)",
"constructor": false,
"full_signature": " CompressedRelation compress(Iterable<Row> input)",
"identifier": "compre... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_250 | {
"fields": [],
"file": "DVSuperLogLog/src/test/java/de/metanome/algorithms/dvsuperloglog/DVSuperLogLogTest.java",
"identifier": "DVSuperLogLogTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExecute() {\n }",
"class_method_signature": "DVSuperLogLogTest.testExecute()",
"constructor": false,
"full_signature": "@Test public void testExecute()",
"identifier": "testExecute",
"invocations": [],
"modifiers": "@Test public",
"parameters": "()",
"return": "voi... | {
"fields": [],
"file": "DVSuperLogLog/src/main/java/de/metanome/algorithms/dvsuperloglog/DVSuperLogLog.java",
"identifier": "DVSuperLogLog",
"interfaces": "implements BasicStatisticsAlgorithm, RelationalInputParameterAlgorithm, StringParameterAlgorithm",
"methods": [
{
"class_method_signature": "DV... | {
"body": "@Override\n\tpublic void execute() throws AlgorithmExecutionException {\n\t\tsuper.execute();\n\t}",
"class_method_signature": "DVSuperLogLog.execute()",
"constructor": false,
"full_signature": "@Override public void execute()",
"identifier": "execute",
"invocations": [
"execute"
],
"modi... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_196 | {
"fields": [],
"file": "HyMD/hybrid/src/test/java/de/hpi/is/md/hybrid/impl/level/StatisticsTest.java",
"identifier": "StatisticsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testFound() {\n\t\tStatistics statistics = new Statistics();\n\t\tassertThat(statistics.getFound()).isEqualTo(0);\n\t\tstatistics.found();\n\t\tassertThat(statistics.getFound()).isEqualTo(1);\n\t}",
"class_method_signature": "StatisticsTest.testFound()",
"constructor": false,
"fu... | {
"fields": [
{
"declarator": "invalid = 0",
"modifier": "private",
"original_string": "private int invalid = 0;",
"type": "int",
"var_name": "invalid"
},
{
"declarator": "notSupported = 0",
"modifier": "private",
"original_string": "private int notSupported... | {
"body": "public void found() {\n\t\tfound++;\n\t}",
"class_method_signature": "Statistics.found()",
"constructor": false,
"full_signature": "public void found()",
"identifier": "found",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "void",
"signature": "void found()",
"... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_179 | {
"fields": [
{
"declarator": "A = Column.of(\"a\", String.class)",
"modifier": "private static final",
"original_string": "private static final Column<String> A = Column.of(\"a\", String.class);",
"type": "Column<String>",
"var_name": "A"
},
{
"declarator": "B = Column... | {
"body": "@Test\n\tpublic void testPliA() {\n\t\tmock();\n\t\tCompressedRelation compressed = compress();\n\t\tCompressedColumn<String> column = compressed.getColumn(0);\n\t\tPositionListIndex pli = column.getPli();\n\t\tassertThat(pli.get(0)).hasSize(1);\n\t\tassertThat(pli.get(1)).hasSize(1);\n\t\tassertThat(pli.g... | {
"fields": [
{
"declarator": "columnCompressors",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final Collection<ColumnCompressor<?>> columnCompressors;",
"type": "Collection<ColumnCompressor<?>>",
"var_name": "columnCompressors"
},
{
... | {
"body": "CompressedRelation compress(Iterable<Row> input) {\n\t\tinput.forEach(this::add);\n\t\treturn toRelation();\n\t}",
"class_method_signature": "Compressor.compress(Iterable<Row> input)",
"constructor": false,
"full_signature": " CompressedRelation compress(Iterable<Row> input)",
"identifier": "compre... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_207 | {
"fields": [
{
"declarator": "A = Column.of(\"a\", Integer.class)",
"modifier": "private static final",
"original_string": "private static final Column<Integer> A = Column.of(\"a\", Integer.class);",
"type": "Column<Integer>",
"var_name": "A"
},
{
"declarator": "B = Co... | {
"body": "@Test\n\tpublic void test() {\n\t\tMultimap<Column<?>, Column<?>> map = ImmutableMultimap.<Column<?>, Column<?>>builder()\n\t\t\t.put(A, B)\n\t\t\t.put(A, C)\n\t\t\t.put(B, A)\n\t\t\t.build();\n\t\tSchemaMapper schemaMapper = new FixedSchemaMapper(map);\n\t\tList<Column<?>> columns = Arrays.asList(A, B, C)... | {
"fields": [
{
"declarator": "pairs",
"modifier": "@NonNull\n\t@JsonDeserialize(converter = ColumnMappingsConverter.class)\n\tprivate final",
"original_string": "@NonNull\n\t@JsonDeserialize(converter = ColumnMappingsConverter.class)\n\tprivate final Multimap<Column<?>, Column<?>> pairs;",
... | {
"body": "@Override\n\tpublic Collection<ColumnPair<?>> create(Schema schema1, Schema schema2) {\n\t\tList<Column<?>> columns = schema1.getColumns();\n\t\treturn columns.stream()\n\t\t\t.flatMap(this::getMatching)\n\t\t\t.collect(Collectors.toList());\n\t}",
"class_method_signature": "FixedSchemaMapper.create(Sche... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_59 | {
"fields": [
{
"declarator": "csvFileFixture",
"modifier": "protected",
"original_string": "protected TestCsvFileFixture csvFileFixture;",
"type": "TestCsvFileFixture",
"var_name": "csvFileFixture"
},
{
"declarator": "testFile",
"modifier": "protected",
"or... | {
"body": "@Test\n public void testCreatePartitionFromLongtypeNatural() {\n // Setup\n final Comparator<Long> longComparator = null; // use natural ordering of Long\n final Datatype type = new DatatypeLong(longComparator);\n // Expected values\n final ArrayList<SortedPartition> expectedSortedPartition... | {
"fields": [],
"file": "ORDER/src/main/java/de/metanome/algorithms/order/sorting/partitions/SortedPartitionCreator.java",
"identifier": "SortedPartitionCreator",
"interfaces": "",
"methods": [
{
"class_method_signature": "SortedPartitionCreator.createPartition(final List<RowIndexedValue> data,\n ... | {
"body": "public static SortedPartition createPartition(final List<RowIndexedValue> data,\n final Datatype type) {\n final Comparator<RowIndexedValue> indexedComparator = type.getIndexedComparator();\n\n if (indexedComparator == null) {\n throw new IllegalStateException(\"Comparator could not be crea... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_7 | {
"fields": [
{
"declarator": "SAMPLE_SIZE = 10",
"modifier": "public static final",
"original_string": "public static final int SAMPLE_SIZE = 10;",
"type": "int",
"var_name": "SAMPLE_SIZE"
},
{
"declarator": "rb = new RelationalInputBuilder(\"testTable\")",
"modi... | {
"body": "@Test\n public void testHashCache() throws Exception {\n rb.setHeader(\"col1\").addRow(\"a\").addRow(\"a\");\n VirtualColumnStore cs = createColumnStore(rb.build());\n ColumnIterator rows = cs.getRows();\n\n assertThat(rows.hasNext(), is(true));\n long[] row1 = rows.ne... | {
"fields": [
{
"declarator": "inputGenerator",
"modifier": "private final",
"original_string": "private final RelationalInputGenerator inputGenerator;",
"type": "RelationalInputGenerator",
"var_name": "inputGenerator"
},
{
"declarator": "isCloseConnectionsRigorously",
... | {
"body": "public ColumnIterator getRows(SimpleColumnCombination activeColumns) {\n this.initHashCaches();\n\n try {\n return new VirtualColumnStore.ColumnIterator(this.inputGenerator.generateNewCopy(), activeColumns);\n } catch (Exception e) {\n throw new RuntimeException(e... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_155 | {
"fields": [
{
"declarator": "lattice",
"modifier": "@Mock\n\tprivate",
"original_string": "@Mock\n\tprivate Lattice lattice;",
"type": "Lattice",
"var_name": "lattice"
},
{
"declarator": "notSupported",
"modifier": "@Mock\n\tprivate",
"original_string": "@... | {
"body": "@Test\n\tpublic void testAddNotSupported() {\n\t\tFullLattice fullLattice = new FullLattice(lattice, notSupported);\n\t\tint columnPairs = 4;\n\t\tMDSite lhs = new MDSiteImpl(columnPairs).set(0, 0.5);\n\t\twhen(Boolean.valueOf(notSupported.containsMdOrGeneralization(lhs))).thenReturn(Boolean.TRUE);\n\t\tMD... | {
"fields": [
{
"declarator": "lattice",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final Lattice lattice;",
"type": "Lattice",
"var_name": "lattice"
},
{
"declarator": "notSupported",
"modifier": "@NonNull\n\tprivate final",
... | {
"body": "public Optional<LatticeMD> addIfMinimalAndSupported(MD md) {\n\t\tMDSite lhs = md.getLhs();\n\t\tif (notSupported.containsMdOrGeneralization(lhs)) {\n\t\t\treturn Optional.empty();\n\t\t}\n\t\treturn lattice.addIfMinimal(md);\n\t}",
"class_method_signature": "FullLattice.addIfMinimalAndSupported(MD md)",... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_22 | {
"fields": [
{
"declarator": "TABLE = 0",
"modifier": "private static final",
"original_string": "private static final int TABLE = 0;",
"type": "int",
"var_name": "TABLE"
},
{
"declarator": "algo",
"modifier": "",
"original_string": "FAIDACore algo;",
... | {
"body": "@Test\n public void testExecuteWdcPlanetsSmall() throws Exception {\n algo = new FAIDACore(Arity.N_ARY, new IdentityRowSampler(), t, sampleGoal);\n RelationalInputGenerator[] inputs = new RelationalInputGenerator[1];\n String[] header = {\"Domicile\", \"Detriment\", \"Exaltation\", ... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(getClass())",
"modifier": "private final",
"original_string": "private final Logger logger = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "detectNary",
... | {
"body": "public List<SimpleInd> execute(RelationalInputGenerator[] fileInputGenerators,\n InclusionDependencyResultReceiver resultReceiver)\n throws InputGenerationException, InputIterationException, AlgorithmConfigurationException {\n\n // Probably for row scalab... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_102 | {
"fields": [
{
"declarator": "folder = new TemporaryFolder()",
"modifier": "@Rule\n\tpublic final",
"original_string": "@Rule\n\tpublic final TemporaryFolder folder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "folder"
},
{
"declarator": "supplier"... | {
"body": "@Test\n\tpublic void testNoStore() {\n\t\twhen(supplier.get()).thenReturn(1);\n\t\tFile f = folder.getRoot();\n\t\tDiskCache<Integer> cache = new DiskCache<>(supplier, f);\n\t\tassertThat(cache.get(false)).isEqualTo(1);\n\t\tverify(supplier).get();\n\t\tassertThat(f.list()).isEmpty();\n\t}",
"class_metho... | {
"fields": [
{
"declarator": "supplier",
"modifier": "@NonNull\n\tprivate final",
"original_string": "@NonNull\n\tprivate final CacheableSupplier<T> supplier;",
"type": "CacheableSupplier<T>",
"var_name": "supplier"
},
{
"declarator": "file",
"modifier": "@NonNul... | {
"body": "public T get(boolean store) {\n\t\tfinal T obj;\n\t\tif (store) {\n\t\t\tobj = readOrCreate();\n\t\t} else {\n\t\t\tobj = create();\n\t\t}\n\t\treturn obj;\n\t}",
"class_method_signature": "DiskCache.get(boolean store)",
"constructor": false,
"full_signature": "public T get(boolean store)",
"identi... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_75 | {
"fields": [],
"file": "HyMD/util/src/test/java/de/hpi/is/md/util/OptionalDoubleTest.java",
"identifier": "OptionalDoubleTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testMap() {\n\t\tassertThat(OptionalDouble.empty().map(d -> 1)).isEmpty();\n\t\tassertThat(OptionalDouble.of(2.0).map(d -> 1)).hasValue(1);\n\t}",
"class_method_signature": "OptionalDoubleTest.testMap()",
"constructor": false,
"full_signature": "@Test public void testMap()",
"i... | {
"fields": [
{
"declarator": "EMPTY = new OptionalDouble()",
"modifier": "private static final",
"original_string": "private static final OptionalDouble EMPTY = new OptionalDouble();",
"type": "OptionalDouble",
"var_name": "EMPTY"
},
{
"declarator": "optional",
"... | {
"body": "public <T> Optional<T> map(@NonNull DoubleFunction<T> mapper) {\n\t\treturn optional.isPresent() ? Optional.ofNullable(mapper.apply(optional.getAsDouble()))\n\t\t\t: Optional.empty();\n\t}",
"class_method_signature": "OptionalDouble.map(@NonNull DoubleFunction<T> mapper)",
"constructor": false,
"full... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
113425021_114 | {
"fields": [
{
"declarator": "HASH_FUNCTION = Hashing.goodFastHash(10)",
"modifier": "private static final",
"original_string": "private static final HashFunction HASH_FUNCTION = Hashing.goodFastHash(10);",
"type": "HashFunction",
"var_name": "HASH_FUNCTION"
}
],
"file": "Hy... | {
"body": "@Test\n\tpublic void testPutClass() {\n\t\tassertThat(Hasher.of(HASH_FUNCTION)\n\t\t\t\t.putClass(HasherTest.class)\n\t\t\t\t.putClass(Hasher.class)\n\t\t\t.hash())\n\t\t\t.isEqualTo(HASH_FUNCTION.newHasher().putUnencodedChars(HasherTest.class.getName())\n\t\t\t\t.putUnencodedChars(Hasher.class.getName()).... | {
"fields": [
{
"declarator": "hasher",
"modifier": "private final",
"original_string": "private final com.google.common.hash.Hasher hasher;",
"type": "com.google.common.hash.Hasher",
"var_name": "hasher"
}
],
"file": "HyMD/util/src/main/java/de/hpi/is/md/util/Hasher.java",
... | {
"body": "public Hasher putClass(Class<?> type) {\n\t\tOptional.ofNullable(type)\n\t\t\t.map(Class::getName)\n\t\t\t.ifPresent(hasher::putUnencodedChars);\n\t\treturn this;\n\t}",
"class_method_signature": "Hasher.putClass(Class<?> type)",
"constructor": false,
"full_signature": "public Hasher putClass(Class<?... | {
"created": null,
"fork": null,
"fork_count": 9,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 113425021,
"size": 1701,
"stargazer_count": 25,
"stars": null,
"updates": null,
"url": "https://github.com/HPI-Information-Systems/metanome-algorithms"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.