id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
2383782_242
{ "fields": [], "file": "core/src/test/java/org/apache/oozie/util/TestELConstantsFunctions.java", "identifier": "TestELConstantsFunctions", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUrlEncode() {\n assertEquals(\"+\", ELConstantsFunctions.urlEncode(\" \"));\n assertEquals(\"%25\", ELConstantsFunctions.urlEncode(\"%\"));\n }", "class_method_signature": "TestELConstantsFunctions.testUrlEncode()", "constructor": false, "full_signature": "...
{ "fields": [ { "declarator": "KB = 1024", "modifier": "public static final", "original_string": "public static final long KB = 1024;", "type": "long", "var_name": "KB" }, { "declarator": "MB = KB * 1024", "modifier": "public static final", "original_string"...
{ "body": "public static String urlEncode(String input) {\n final String encoding = StandardCharsets.UTF_8.name();\n try {\n return (input == null) ? \"\" : URLEncoder.encode(input, encoding);\n }\n catch (UnsupportedEncodingException uee) {\n throw new RuntimeExcepti...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_307
{ "fields": [ { "declarator": "functionA", "modifier": "private static", "original_string": "private static Method functionA;", "type": "Method", "var_name": "functionA" }, { "declarator": "functionB", "modifier": "private static", "original_string": "privat...
{ "body": "@Test\n public void testFunctionELEvaluationError() throws Exception {\n try {\n ELEvaluator.Context support = new ELEvaluator.Context();\n support.addFunction(\"a\", \"a\", functionError);\n ELEvaluator evaluator = new ELEvaluator(support);\n evaluator...
{ "fields": [ { "declarator": "LOG = XLog.getLog(ELEvaluator.class)", "modifier": "public static final", "original_string": "public static final XLog LOG = XLog.getLog(ELEvaluator.class);", "type": "XLog", "var_name": "LOG" }, { "declarator": "current = new ThreadLocal<...
{ "body": "@SuppressWarnings({\"unchecked\"})\n public <T> T evaluate(String expr, Class<T> clazz) throws Exception {\n ELEvaluator existing = current.get();\n try {\n current.set(this);\n return (T) evaluator.evaluate(expr, clazz, context, context);\n }\n catch (R...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_184
{ "fields": [ { "declarator": "outContent = new ByteArrayOutputStream()", "modifier": "private final", "original_string": "private final ByteArrayOutputStream outContent = new ByteArrayOutputStream();", "type": "ByteArrayOutputStream", "var_name": "outContent" }, { "dec...
{ "body": "@Test\n public void testPropertiesWrite() throws IOException {\n File f = new File(tmp.newFolder(), \"nonExistentFile\");\n assertFalse(f.exists());\n try (FileOutputStream fos = LauncherMain.createStreamIfFileNotExists(f)) {\n Properties p = new Properties();\n ...
{ "fields": [ { "declarator": "ACTION_PREFIX = \"oozie.action.\"", "modifier": "public static final", "original_string": "public static final String ACTION_PREFIX = \"oozie.action.\";", "type": "String", "var_name": "ACTION_PREFIX" }, { "declarator": "EXTERNAL_CHILD_IDS...
{ "body": "static FileOutputStream createStreamIfFileNotExists(File output) throws IOException {\n if (output.exists()) {\n System.out.println(output + \" exists, skipping. The action will use the \"\n + output.getName() + \" defined in the workflow.\");\n return null;\...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_31
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedExcepti...
{ "body": "@Test\n public void testClearArchives() {\n final ActionAttributesBuilder builder = getBuilderInstance();\n\n for (final String archive : ARCHIVES) {\n builder.withArchive(archive);\n }\n\n builder.clearArchives();\n\n final ActionAttributes attributes = bui...
{ "fields": [ { "declarator": "resourceManager", "modifier": "private final", "original_string": "private final ModifyOnce<String> resourceManager;", "type": "ModifyOnce<String>", "var_name": "resourceManager" }, { "declarator": "nameNode", "modifier": "private fi...
{ "body": "void clearArchives() {\n archives.clear();\n }", "class_method_signature": "ActionAttributesBuilder.clearArchives()", "constructor": false, "full_signature": " void clearArchives()", "identifier": "clearArchives", "invocations": [ "clear" ], "modifiers": "", "parameters": "()"...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_239
{ "fields": [], "file": "core/src/test/java/org/apache/oozie/util/TestELConstantsFunctions.java", "identifier": "TestELConstantsFunctions", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testReplaceAll() {\n assertEquals(\"aefefd\", ELConstantsFunctions.replaceAll(\"abcbcd\", \"bc\", \"ef\"));\n assertEquals(\"d1 d2 d3\", ELConstantsFunctions.replaceAll(\"d1,d2,d3\", \",\", \" \"));\n assertEquals(\"ayyycd\", ELConstantsFunctions.replaceAll(\"abc...
{ "fields": [ { "declarator": "KB = 1024", "modifier": "public static final", "original_string": "public static final long KB = 1024;", "type": "long", "var_name": "KB" }, { "declarator": "MB = KB * 1024", "modifier": "public static final", "original_string"...
{ "body": "public static String replaceAll(String src, String regex, String replacement) {\n if (src != null && regex != null) {\n if (replacement == null) {\n replacement = \"\";\n }\n return src.replaceAll(regex, replacement);\n }\n return src;\n ...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_393
{ "fields": [], "file": "core/src/test/java/org/apache/oozie/coord/input/logic/TestInputLogicParser.java", "identifier": "TestInputLogicParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAndCombine() throws JDOMException {\n //@formatter:off\n String xml =\n \"<input-logic>\" +\n \"<and>\" +\n \"<combine>\" +\n \"<data-in dataset=\\\"A\\\" />\" +\n ...
{ "fields": [ { "declarator": "COORD_INPUT_EVENTS_DATA_IN = \"data-in\"", "modifier": "public final static", "original_string": "public final static String COORD_INPUT_EVENTS_DATA_IN = \"data-in\";", "type": "String", "var_name": "COORD_INPUT_EVENTS_DATA_IN" }, { "decla...
{ "body": "public String parse(Element root) {\n return parseWithName(root, null);\n\n }", "class_method_signature": "InputLogicParser.parse(Element root)", "constructor": false, "full_signature": "public String parse(Element root)", "identifier": "parse", "invocations": [ "parseWithName" ],...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_110
{ "fields": [ { "declarator": "NAME_NODE = \"${nameNode}\"", "modifier": "private static final", "original_string": "private static final String NAME_NODE = \"${nameNode}\";", "type": "String", "var_name": "NAME_NODE" }, { "declarator": "JOB_XMLS = {\"jobXml1.xml\", \"j...
{ "body": "@Test\n public void testSameConfigPropertyAddedTwiceThrows() {\n final FSActionBuilder builder = getBuilderInstance();\n builder.withConfigProperty(MAPRED_JOB_QUEUE_NAME, DEFAULT);\n\n expectedException.expect(IllegalStateException.class);\n builder.withConfigProperty(MAPRED_...
{ "fields": [ { "declarator": "attributesBuilder", "modifier": "private final", "original_string": "private final ActionAttributesBuilder attributesBuilder;", "type": "ActionAttributesBuilder", "var_name": "attributesBuilder" } ], "file": "fluent-job/fluent-job-api/src/main/j...
{ "body": "public FSActionBuilder withConfigProperty(final String key, final String value) {\n attributesBuilder.withConfigProperty(key, value);\n return this;\n }", "class_method_signature": "FSActionBuilder.withConfigProperty(final String key, final String value)", "constructor": false, "full...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_405
{ "fields": [ { "declarator": "mockJspHandler", "modifier": "@Mock private", "original_string": "@Mock private JspHandler mockJspHandler;", "type": "JspHandler", "var_name": "mockJspHandler" }, { "declarator": "mockServices", "modifier": "@Mock private", "or...
{ "body": "@Test\n public void testServerSetupTruststorePassSetViaSystemProperty() throws Exception {\n final String trustStorePassword = \"myTrustedPassword\";\n doReturn(String.valueOf(false)).when(mockConfiguration).get(\"oozie.https.enabled\");\n System.setProperty(EmbeddedOozieServer.TRUS...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(EmbeddedOozieServer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(EmbeddedOozieServer.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "public void setup() throws URISyntaxException, IOException, ServiceException {\n conf = serviceController.get(ConfigurationService.class).getConf();\n setContextPath(conf);\n httpPort = getConfigPort(ConfigUtils.OOZIE_HTTP_PORT);\n\n HttpConfiguration httpConfiguration = new Htt...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_281
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, ...
{ "body": "@Test\n public void testSequenceBeforeInvalidPart() throws ELEvaluationException {\n expectedException.expect(ELEvaluationException.class);\n StringUtils.checkStaticExistence(\"${a:a(),b:b(),c:c(}\", \",\");\n }", "class_method_signature": "TestStringUtils.testSequenceBeforeInvalidPar...
{ "fields": [], "file": "core/src/main/java/org/apache/oozie/util/StringUtils.java", "identifier": "StringUtils", "interfaces": "", "methods": [ { "class_method_signature": "StringUtils.trim(String str)", "constructor": false, "full_signature": "public static String trim(String str)", ...
{ "body": "public static boolean checkStaticExistence(String expr, String sequence) throws ELEvaluationException {\n int curlyBracketDept = 0;\n int functionDepth = 0;\n int index = 0;\n boolean foundSequence = false;\n while (index < expr.length()) {\n String substring =...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_147
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedExcepti...
{ "body": "@Test\n public void testRemoveNonexistentParentThrows() {\n final Start parent = new Start(\"parent\");\n final Fork instance = getInstance(\"instance\");\n\n expectedException.expect(IllegalArgumentException.class);\n instance.removeParent(parent);\n }", "class_method_s...
{ "fields": [ { "declarator": "parent", "modifier": "private", "original_string": "private NodeBase parent;", "type": "NodeBase", "var_name": "parent" }, { "declarator": "children", "modifier": "private final", "original_string": "private final List<NodeBase...
{ "body": "@Override\n public void removeParent(final NodeBase parent) {\n Preconditions.checkArgument(this.parent == parent, \"Trying to remove a nonexistent parent.\");\n\n if (this.parent != null) {\n this.parent.removeChild(this);\n }\n\n this.parent = null;\n }", "c...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_297
{ "fields": [], "file": "core/src/test/java/org/apache/oozie/util/TestParamChecker.java", "identifier": "TestParamChecker", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCheckTimeZone() {\n ParamChecker.checkTimeZone(\"UTC\", \"test\");\n try {\n ParamChecker.checkTimeZone(\"UTZ\", \"test\");\n fail();\n }\n catch (Exception ex) {\n }\n ParamChecker.checkTimeZone(\"America/Los_Angele...
{ "fields": [ { "declarator": "MAX_NODE_NAME_LEN = 128", "modifier": "private static final", "original_string": "private static final int MAX_NODE_NAME_LEN = 128;", "type": "int", "var_name": "MAX_NODE_NAME_LEN" } ], "file": "core/src/main/java/org/apache/oozie/util/ParamChec...
{ "body": "public static TimeZone checkTimeZone(String tzStr, String name) {\n TimeZone tz;\n try {\n tz = DateUtils.getTimeZone(tzStr);\n }\n catch (Exception ex) {\n throw new IllegalArgumentException(XLog.format(\"parameter [{0}] = [{1}] must be a valid TZ.\"\n ...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_278
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, ...
{ "body": "@Test\n public void testClosingTooManyCurlyBracket() throws ELEvaluationException {\n expectedException.expect(ELEvaluationException.class);\n StringUtils.checkStaticExistence(\"${a:a()}}\", \",\");\n }", "class_method_signature": "TestStringUtils.testClosingTooManyCurlyBracket()", ...
{ "fields": [], "file": "core/src/main/java/org/apache/oozie/util/StringUtils.java", "identifier": "StringUtils", "interfaces": "", "methods": [ { "class_method_signature": "StringUtils.trim(String str)", "constructor": false, "full_signature": "public static String trim(String str)", ...
{ "body": "public static boolean checkStaticExistence(String expr, String sequence) throws ELEvaluationException {\n int curlyBracketDept = 0;\n int functionDepth = 0;\n int index = 0;\n boolean foundSequence = false;\n while (index < expr.length()) {\n String substring =...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_151
{ "fields": [], "file": "fluent-job/fluent-job-api/src/test/java/org/apache/oozie/fluentjob/api/dag/TestJoiningNodeBase.java", "identifier": "TestJoiningNodeBase", "interfaces": "", "superclass": "extends TestNodeBase<JoiningNodeBase<B>>" }
{ "body": "@Test\n public void testJoinAddedAsParentWhenItAlreadyHasAChildThrows() {\n final J instance = getJoiningInstance(\"instance\");\n final NodeBase child1 = new ExplicitNode(\"child1\", null);\n final NodeBase child2 = new ExplicitNode(\"child2\", null);\n\n child1.addParent(in...
{ "fields": [ { "declarator": "parents", "modifier": "private final", "original_string": "private final List<NodeBase> parents;", "type": "List<NodeBase>", "var_name": "parents" }, { "declarator": "child", "modifier": "private", "original_string": "private N...
{ "body": "@Override\n public void addParent(final NodeBase parent) {\n if (parent != null) {\n parent.addChild(this);\n }\n\n parents.add(parent);\n }", "class_method_signature": "JoiningNodeBase.addParent(final NodeBase parent)", "constructor": false, "full_signature": "@...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_385
{ "fields": [], "file": "core/src/test/java/org/apache/oozie/coord/input/logic/TestInputLogicParser.java", "identifier": "TestInputLogicParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOr() throws JDOMException {\n //@formatter:off\n String xml =\n \"<input-logic>\" +\n \"<or>\" +\n \"<data-in dataset=\\\"A\\\"/> \" +\n \"<data-in dataset=\\\"B\\\"/>\" +\n ...
{ "fields": [ { "declarator": "COORD_INPUT_EVENTS_DATA_IN = \"data-in\"", "modifier": "public final static", "original_string": "public final static String COORD_INPUT_EVENTS_DATA_IN = \"data-in\";", "type": "String", "var_name": "COORD_INPUT_EVENTS_DATA_IN" }, { "decla...
{ "body": "public String parse(Element root) {\n return parseWithName(root, null);\n\n }", "class_method_signature": "InputLogicParser.parse(Element root)", "constructor": false, "full_signature": "public String parse(Element root)", "identifier": "parse", "invocations": [ "parseWithName" ],...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_106
{ "fields": [ { "declarator": "NAME = \"shell-name\"", "modifier": "private static final", "original_string": "private static final String NAME = \"shell-name\";", "type": "String", "var_name": "NAME" }, { "declarator": "NAME_NODE = \"${nameNode}\"", "modifier": "...
{ "body": "@Test\n public void testClearArguments() {\n final ShellActionBuilder builder = getBuilderInstance();\n\n for (final String file : ARGS) {\n builder.withArgument(file);\n }\n\n builder.clearArguments();\n\n final ShellAction action = builder.build();\n\n ...
{ "fields": [ { "declarator": "attributesBuilder", "modifier": "private final", "original_string": "private final ActionAttributesBuilder attributesBuilder;", "type": "ActionAttributesBuilder", "var_name": "attributesBuilder" }, { "declarator": "executable", "modi...
{ "body": "public ShellActionBuilder clearArguments() {\n this.attributesBuilder.clearArgs();\n return this;\n }", "class_method_signature": "ShellActionBuilder.clearArguments()", "constructor": false, "full_signature": "public ShellActionBuilder clearArguments()", "identifier": "clearArgumen...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_171
{ "fields": [ { "declarator": "passwordMasker", "modifier": "private", "original_string": "private PasswordMasker passwordMasker;", "type": "PasswordMasker", "var_name": "passwordMasker" } ], "file": "sharelib/oozie/src/test/java/org/apache/oozie/action/hadoop/TestPasswordMas...
{ "body": "@Test\n public void testMaskJavaSystemPropWithWhiteSpaces() {\n assertEquals(\" -Djava.sysprop.password=***** \",\n passwordMasker.maskPasswordsIfNecessary(\" -Djava.sysprop.password=pwd123 \"));\n }", "class_method_signature": "TestPasswordMasker.testMaskJavaSystemPropWit...
{ "fields": [ { "declarator": "PASSWORD_MASK = \"*****\"", "modifier": "private static final", "original_string": "private static final String PASSWORD_MASK = \"*****\";", "type": "String", "var_name": "PASSWORD_MASK" }, { "declarator": "PASSWORD_KEY = \"pass\"", ...
{ "body": "public String maskPasswordsIfNecessary(String unmasked) {\n if (containsPasswordFragment(unmasked)) {\n return maskPasswordFragments(unmasked);\n } else {\n return unmasked;\n }\n }", "class_method_signature": "PasswordMasker.maskPasswordsIfNecessary(String u...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_258
{ "fields": [ { "declarator": "predicate =\n new PersistenceExceptionSubclassFilterRetryPredicate()", "modifier": "private final", "original_string": "private final PersistenceExceptionSubclassFilterRetryPredicate predicate =\n new PersistenceExceptionSubclassFilterRetryPre...
{ "body": "@Test\n public void testNestedNotFilteredJPAExceptions() {\n assertTrue(predicate.test(wrapCause(new RollbackException())));\n assertTrue(predicate.test(wrapCause(new PersistenceException())));\n }", "class_method_signature": "TestPersistenceExceptionSubclassFilterRetryPredicate.testN...
{ "fields": [ { "declarator": "LOG = XLog.getLog(PersistenceExceptionSubclassFilterRetryPredicate.class)", "modifier": "private static final", "original_string": "private static final XLog LOG = XLog.getLog(PersistenceExceptionSubclassFilterRetryPredicate.class);", "type": "XLog", "v...
{ "body": "@Override\n public boolean test(final Throwable throwable) {\n LOG.trace(\"Retry predicate investigation started. [throwable.class={0}]\", throwable.getClass().getName());\n\n boolean applies = true;\n\n if ((throwable.getCause() == null) && BLACKLIST_WITHOUT_CAUSE.contains(throwabl...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_5
{ "fields": [], "file": "tools/src/test/java/org/apache/oozie/tools/TestECPolicyDisabler.java", "identifier": "TestECPolicyDisabler", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testServerNotSupportsGetName() {\n MockDistributedFileSystem fs = mock(MockDistributedFileSystem.class);\n when(fs.getErasureCodingPolicy(any())).thenReturn(ReplicationPolicy.OTHER);\n\n ReplicationPolicy mockPolicy = mock(ReplicationPolicy.class);\n Syste...
{ "fields": [ { "declarator": "GETREPLICATIONPOLICY_METHOD = \"getReplicationPolicy\"", "modifier": "private static final", "original_string": "private static final String GETREPLICATIONPOLICY_METHOD = \"getReplicationPolicy\";", "type": "String", "var_name": "GETREPLICATIONPOLICY_ME...
{ "body": "static Result check(FileSystem fs, Path path) {\n if (fs instanceof DistributedFileSystem && supportsErasureCoding()) {\n System.out.println(\"Found Hadoop that supports Erasure Coding. Trying to disable Erasure Coding for path: \"+ path);\n DistributedFileSystem dfs = (Distrib...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_126
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedExcepti...
{ "body": "@Test\n public void testWorkflowWithTrivialJoin() {\n final Node a = MapReduceActionBuilder.create().withName(\"A\").build();\n\n final Node b = MapReduceActionBuilder.create().withName(\"B\").withParent(a).build();\n final Node c = MapReduceActionBuilder.create().withName(\"C\").wi...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "start = new Start(\"start\")", "modifier": "private final", "original_string": "priva...
{ "body": "public Collection<NodeBase> getNodes() {\n return nodesByName.values();\n }", "class_method_signature": "Graph.getNodes()", "constructor": false, "full_signature": "public Collection<NodeBase> getNodes()", "identifier": "getNodes", "invocations": [ "values" ], "modifiers": "publ...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_93
{ "fields": [ { "declarator": "NAME = \"map-reduce-name\"", "modifier": "static final", "original_string": "static final String NAME = \"map-reduce-name\";", "type": "String", "var_name": "NAME" }, { "declarator": "expectedException = ExpectedException.none()", "m...
{ "body": "@Test\n public void testClearParents() {\n final N parent1 = Mockito.spy(getBuilderInstance().build());\n final N parent2 = Mockito.spy(getBuilderInstance().build());\n final N parent3 = Mockito.spy(getBuilderInstance().build());\n\n final B builder = getBuilderInstance();\n ...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final ModifyOnce<String> name;", "type": "ModifyOnce<String>", "var_name": "name" }, { "declarator": "credentials", "modifier": "private final", "original_string":...
{ "body": "public B clearParents() {\n parents.clear();\n parentsWithConditions.clear();\n return ensureRuntimeSelfReference();\n }", "class_method_signature": "NodeBuilderBaseImpl.clearParents()", "constructor": false, "full_signature": "public B clearParents()", "identifier": "clearP...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_85
{ "fields": [ { "declarator": "NAME = \"map-reduce-name\"", "modifier": "static final", "original_string": "static final String NAME = \"map-reduce-name\";", "type": "String", "var_name": "NAME" }, { "declarator": "expectedException = ExpectedException.none()", "m...
{ "body": "@Test\n public final void testIncorrectSubclassingThrows() {\n class WrongBuilder extends NodeBuilderBaseImpl<MapReduceActionBuilder> implements Builder<MapReduceAction> {\n\n private WrongBuilder() {\n super();\n }\n\n public MapReduceActionBuilder...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final ModifyOnce<String> name;", "type": "ModifyOnce<String>", "var_name": "name" }, { "declarator": "credentials", "modifier": "private final", "original_string":...
{ "body": "public B withName(final String name) {\n this.name.set(name);\n return ensureRuntimeSelfReference();\n }", "class_method_signature": "NodeBuilderBaseImpl.withName(final String name)", "constructor": false, "full_signature": "public B withName(final String name)", "identifier": "wit...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_130
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedExcepti...
{ "body": "@Test\n public void testSplittingForks() {\n final Node a = MapReduceActionBuilder.create().withName(\"A\").build();\n\n final Node b = MapReduceActionBuilder.create().withName(\"B\").withParent(a).build();\n final Node c = MapReduceActionBuilder.create().withName(\"C\").withParent(...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "start = new Start(\"start\")", "modifier": "private final", "original_string": "priva...
{ "body": "public Collection<NodeBase> getNodes() {\n return nodesByName.values();\n }", "class_method_signature": "Graph.getNodes()", "constructor": false, "full_signature": "public Collection<NodeBase> getNodes()", "identifier": "getNodes", "invocations": [ "values" ], "modifiers": "publ...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_219
{ "fields": [ { "declarator": "CREATED_TIME = \"Thu, 01 Jan 2009 00:00:00 GMT\"", "modifier": "static", "original_string": "static String CREATED_TIME = \"Thu, 01 Jan 2009 00:00:00 GMT\";", "type": "String", "var_name": "CREATED_TIME" }, { "declarator": "START_TIME = \"...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testParseWorkflowJob() {\n JSONObject json = createJsonWorkflowJob();\n WorkflowJob wf = JsonToBean.createWorkflowJob(json);\n\n assertEquals(\"a\", wf.getAppPath());\n assertEquals(\"b\", wf.getAppName());\n as...
{ "fields": [ { "declarator": "WF_JOB = new HashMap<String, Property>()", "modifier": "@VisibleForTesting\n static final", "original_string": "@VisibleForTesting\n static final Map<String, Property> WF_JOB = new HashMap<String, Property>();", "type": "Map<String, Property>", "v...
{ "body": "public static WorkflowJob createWorkflowJob(JSONObject json) {\n return (WorkflowJob) Proxy.newProxyInstance(JsonToBean.class.getClassLoader(),\n new Class[]{WorkflowJob.class},\n new JsonInvocation...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_188
{ "fields": [ { "declarator": "DEFAULT_CONTAINER_ID = \"container_1479473450392_0001_01_000001\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_CONTAINER_ID = \"container_1479473450392_0001_01_000001\";", "type": "String", "var_name": "D...
{ "body": "@Test\n public void testUpdateActionDataFailsWithActionError() throws Exception {\n setupActionOutputContents();\n given(localFsOperationsMock.getLocalFileContentAsString(any(File.class), eq(ACTION_DATA_EXTERNAL_CHILD_IDS), anyInt()))\n .willThrow(new IOException());\n th...
{ "fields": [ { "declarator": "OOZIE_ACTION_CONF_XML = \"oozie.action.conf.xml\"", "modifier": "public static final", "original_string": "public static final String OOZIE_ACTION_CONF_XML = \"oozie.action.conf.xml\";", "type": "String", "var_name": "OOZIE_ACTION_CONF_XML" }, {...
{ "body": "@VisibleForTesting\n Map<String, String> getActionData() {\n return actionData;\n }", "class_method_signature": "LauncherAM.getActionData()", "constructor": false, "full_signature": "@VisibleForTesting Map<String, String> getActionData()", "identifier": "getActionData", "invocations"...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_167
{ "fields": [ { "declarator": "passwordMasker", "modifier": "private", "original_string": "private PasswordMasker passwordMasker;", "type": "PasswordMasker", "var_name": "passwordMasker" } ], "file": "sharelib/oozie/src/test/java/org/apache/oozie/action/hadoop/TestPasswordMas...
{ "body": "@Test\n public void testWhenJavaSystemPropertiesAreAskedPasswordsAppearMasked() throws Exception {\n Map<String, String> masked = passwordMasker.mask(jsonToMap(\"/instrumentation-system-properties.json\"));\n\n assertPasswordValueIsMasked(masked, \"javax.net.ssl.trustStorePassword\");\n ...
{ "fields": [ { "declarator": "PASSWORD_MASK = \"*****\"", "modifier": "private static final", "original_string": "private static final String PASSWORD_MASK = \"*****\";", "type": "String", "var_name": "PASSWORD_MASK" }, { "declarator": "PASSWORD_KEY = \"pass\"", ...
{ "body": "public Map<String, String> mask(Map<String, String> unmasked) {\n return Maps.transformEntries(unmasked, new Maps.EntryTransformer<String, String, String>() {\n @Override\n public String transformEntry(@Nonnull String key, @Nonnull String value) {\n return mask(k...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_46
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedExcepti...
{ "body": "@Test\n public void testWithReducer() {\n final String reducerName = \"reducer-name.sh\";\n\n final StreamingBuilder builder = new StreamingBuilder();\n builder.withReducer(reducerName);\n\n final Streaming streaming = builder.build();\n assertEquals(reducerName, strea...
{ "fields": [ { "declarator": "mapper", "modifier": "private final", "original_string": "private final ModifyOnce<String> mapper;", "type": "ModifyOnce<String>", "var_name": "mapper" }, { "declarator": "reducer", "modifier": "private final", "original_string...
{ "body": "public StreamingBuilder withReducer(final String reducer) {\n this.reducer.set(reducer);\n return this;\n }", "class_method_signature": "StreamingBuilder.withReducer(final String reducer)", "constructor": false, "full_signature": "public StreamingBuilder withReducer(final String redu...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_370
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedExcepti...
{ "body": "@Test\n public void whenMegabytesAreGivenSameReturned() {\n assertEquals(\"megabytes count should remain unchanged\",\n 1L,\n new BytesAndUOMConverter().toMegabytes(\"1M\"));\n }", "class_method_signature": "TestBytesAndUOMConverter.whenMegabytesAreGivenSameRetu...
{ "fields": [ { "declarator": "LOG = XLog.getLog(BytesAndUOMConverter.class)", "modifier": "private static final", "original_string": "private static final XLog LOG = XLog.getLog(BytesAndUOMConverter.class);", "type": "XLog", "var_name": "LOG" } ], "file": "core/src/main/java...
{ "body": "long toMegabytes(final String unitAndUOM) {\n Preconditions.checkArgument(!Strings.isNullOrEmpty(unitAndUOM), \"unitAndUOM should not be empty\");\n Preconditions.checkArgument(unitAndUOM.toUpperCase().endsWith(\"K\")\n || unitAndUOM.toUpperCase().endsWith(\"M\")\n ...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_235
{ "fields": [], "file": "core/src/test/java/org/apache/oozie/util/TestDateUtils.java", "identifier": "TestDateUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void testGetTimeZoneInvalidFormatNull() throws Exception {\n DateUtils.getTimeZone(null);\n }", "class_method_signature": "TestDateUtils.testGetTimeZoneInvalidFormatNull()", "constructor": false, "full_signature": "@Test(expected ...
{ "fields": [ { "declarator": "LOG = XLog.getLog(DateUtils.class)", "modifier": "private static final", "original_string": "private static final XLog LOG = XLog.getLog(DateUtils.class);", "type": "XLog", "var_name": "LOG" }, { "declarator": "GMT_OFFSET_COLON_PATTERN = P...
{ "body": "public static TimeZone getTimeZone(String tzId) {\n if (tzId == null) {\n throw new IllegalArgumentException(\"Invalid TimeZone: \" + tzId);\n }\n tzId = handleGMTOffsetTZNames(tzId); // account for GMT-####\n TimeZone tz = TimeZone.getTimeZone(tzId);\n\n //...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_11
{ "fields": [ { "declarator": "client = new DiagOozieClient(\"testClient\", null)", "modifier": "final", "original_string": "final DiagOozieClient client = new DiagOozieClient(\"testClient\", null);", "type": "DiagOozieClient", "var_name": "client" }, { "declarator": "t...
{ "body": "@Test\n public void testMetricsCanBeRetrieved() throws OozieClientException, IOException {\n String exampleMetrics = \"{\\n\" +\n \" \\\"gauges\\\" : {\\n\" +\n \" \\\"jvm.memory.non-heap.committed\\\" : {\\n\" +\n \" \\\"value\\\" : ...
{ "fields": [ { "declarator": "client", "modifier": "private final", "original_string": "private final OozieClient client;", "type": "OozieClient", "var_name": "client" } ], "file": "tools/src/main/java/org/apache/oozie/tools/diag/MetricsCollector.java", "identifier": "Metr...
{ "body": "void storeMetrics(final File outputDir) {\n try {\n System.out.print(\"Getting Metrics...\");\n final OozieClient.Metrics metrics = client.getMetrics();\n\n if (metrics == null) {\n System.out.println(\"Skipping (Metrics are unavailable)\");\n ...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_327
{ "fields": [ { "declarator": "DEFAULT_TYPE = \"test\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_TYPE = \"test\";", "type": "String", "var_name": "DEFAULT_TYPE" }, { "declarator": "DEFAULT_MAX_ACTIVE_COMMANDS = 5", ...
{ "body": "@Test\n public void testQueueDump() {\n CallableWrapper<?> pendingCallable = mock(CallableWrapper.class);\n CallableWrapper<?> waitingCallable = mock(CallableWrapper.class);\n ScheduledXCallable delayedXCallable = mock(ScheduledXCallable.class);\n @SuppressWarnings(\"unchecke...
{ "fields": [ { "declarator": "MIN_PRIORITY = 0", "modifier": "public static final", "original_string": "public static final int MIN_PRIORITY = 0;", "type": "int", "var_name": "MIN_PRIORITY" }, { "declarator": "ANTI_STARVATION_INTERVAL = 500", "modifier": "public ...
{ "body": "public List<String> getQueueDump() {\n List<CallableWrapper<?>> copyOfPending = new ArrayList<>(100);\n List<String> queueDump = new ArrayList<>(100);\n\n // Safe to iterate\n for (Map.Entry<String, Set<CallableWrapper<?>>> entry : pendingCommandsPerType.entrySet()) {\n ...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_262
{ "fields": [ { "declarator": "testRetryPredicate = new Predicate<Throwable>() {\n @Override\n public boolean test(Throwable input) {\n return input.getClass() == RuntimeException.class;\n }\n }", "modifier": "private final", "original_string": "private final P...
{ "body": "@Test\n public void testNoRetry() throws Exception {\n @SuppressWarnings(\"unchecked\")\n Callable<String> operation = mock(Callable.class);\n given(operation.call()).willReturn(\"dummy\");\n\n retryHandler.executeWithRetry(operation);\n }", "class_method_signature": "Te...
{ "fields": [ { "declarator": "LOG = XLog.getLog(OperationRetryHandler.class)", "modifier": "private static", "original_string": "private static XLog LOG = XLog.getLog(OperationRetryHandler.class);", "type": "XLog", "var_name": "LOG" }, { "declarator": "RETRY_ATTEMPT_ST...
{ "body": "public <V> V executeWithRetry(final Callable<V> operation) throws Exception {\n int retries = 0;\n long waitTime = initialWaitTime;\n Exception lastException = null;\n\n if (!shouldRetry) {\n try {\n LOG.trace(\"Configured not to retry, calling operatio...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_331
{ "fields": [ { "declarator": "DEFAULT_TYPE = \"test\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_TYPE = \"test\";", "type": "String", "var_name": "DEFAULT_TYPE" }, { "declarator": "DEFAULT_MAX_ACTIVE_COMMANDS = 5", ...
{ "body": "@Test\n public void testShutDown() throws InterruptedException {\n when(executor.awaitTermination(anyLong(), any(TimeUnit.class))).thenReturn(true);\n when(scheduledExecutor.awaitTermination(anyLong(), any(TimeUnit.class))).thenReturn(true);\n asyncExecutor.shutdown();\n\n ve...
{ "fields": [ { "declarator": "MIN_PRIORITY = 0", "modifier": "public static final", "original_string": "public static final int MIN_PRIORITY = 0;", "type": "int", "var_name": "MIN_PRIORITY" }, { "declarator": "ANTI_STARVATION_INTERVAL = 500", "modifier": "public ...
{ "body": "public void shutdown() {\n try {\n shutdownExecutor(executor, \"executor\");\n shutdownExecutor(scheduledExecutor, \"scheduled executor\");\n } catch (InterruptedException e) {\n log.warn(\"Interrupted while waiting for executor shutdown\");\n }\n }"...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_274
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedException" }, ...
{ "body": "@Test\n public void testTrimWhitespaceReplacement() {\n assertEquals(\"A string\", StringUtils.trim(\" A string \"));\n }", "class_method_signature": "TestStringUtils.testTrimWhitespaceReplacement()", "constructor": false, "full_signature": "@Test public void testTrimWhitespaceRepla...
{ "fields": [], "file": "core/src/main/java/org/apache/oozie/util/StringUtils.java", "identifier": "StringUtils", "interfaces": "", "methods": [ { "class_method_signature": "StringUtils.trim(String str)", "constructor": false, "full_signature": "public static String trim(String str)", ...
{ "body": "public static String trim(String str) {\n if (str != null) {\n str = str.replaceAll(\"\\\\n\", \"\");\n str = str.replaceAll(\"\\\\t\", \"\");\n str = str.trim();\n }\n return str;\n }", "class_method_signature": "StringUtils.trim(String str)", "...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_50
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedExcepti...
{ "body": "@Test\n public void testWithRecordReaderMapping() {\n final String mapping1 = \"mapping1\";\n final String mapping2 = \"mapping2\";\n\n final StreamingBuilder builder = new StreamingBuilder();\n builder.withRecordReaderMapping(mapping1)\n .withRecordReaderMappin...
{ "fields": [ { "declarator": "mapper", "modifier": "private final", "original_string": "private final ModifyOnce<String> mapper;", "type": "ModifyOnce<String>", "var_name": "mapper" }, { "declarator": "reducer", "modifier": "private final", "original_string...
{ "body": "public StreamingBuilder withRecordReaderMapping(final String recordReaderMapping) {\n this.recordReaderMappings.add(recordReaderMapping);\n return this;\n }", "class_method_signature": "StreamingBuilder.withRecordReaderMapping(final String recordReaderMapping)", "constructor": false, ...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_366
{ "fields": [ { "declarator": "expectedException = ExpectedException.none()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ExpectedException expectedException = ExpectedException.none();", "type": "ExpectedException", "var_name": "expectedExcepti...
{ "body": "@Test\n public void whenNoUnitIsGivenException() {\n expectedException.expect(NumberFormatException.class);\n\n new BytesAndUOMConverter().toMegabytes(\"K\");\n }", "class_method_signature": "TestBytesAndUOMConverter.whenNoUnitIsGivenException()", "constructor": false, "full_signa...
{ "fields": [ { "declarator": "LOG = XLog.getLog(BytesAndUOMConverter.class)", "modifier": "private static final", "original_string": "private static final XLog LOG = XLog.getLog(BytesAndUOMConverter.class);", "type": "XLog", "var_name": "LOG" } ], "file": "core/src/main/java...
{ "body": "long toMegabytes(final String unitAndUOM) {\n Preconditions.checkArgument(!Strings.isNullOrEmpty(unitAndUOM), \"unitAndUOM should not be empty\");\n Preconditions.checkArgument(unitAndUOM.toUpperCase().endsWith(\"K\")\n || unitAndUOM.toUpperCase().endsWith(\"M\")\n ...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_223
{ "fields": [ { "declarator": "CREATED_TIME = \"Thu, 01 Jan 2009 00:00:00 GMT\"", "modifier": "static", "original_string": "static String CREATED_TIME = \"Thu, 01 Jan 2009 00:00:00 GMT\";", "type": "String", "var_name": "CREATED_TIME" }, { "declarator": "START_TIME = \"...
{ "body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testParseCoordinatorJob() {\n JSONObject json = createJsonCoordinatorJob();\n CoordinatorJob job = JsonToBean.createCoordinatorJob(json);\n assertEquals(\"a\", job.getAppPath());\n assertEquals(\"b\", job.getAppName())...
{ "fields": [ { "declarator": "WF_JOB = new HashMap<String, Property>()", "modifier": "@VisibleForTesting\n static final", "original_string": "@VisibleForTesting\n static final Map<String, Property> WF_JOB = new HashMap<String, Property>();", "type": "Map<String, Property>", "v...
{ "body": "public static CoordinatorJob createCoordinatorJob(JSONObject json) {\n return (CoordinatorJob) Proxy.newProxyInstance(JsonToBean.class.getClassLoader(),\n new Class[]{CoordinatorJob.class},\n ...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
2383782_389
{ "fields": [], "file": "core/src/test/java/org/apache/oozie/coord/input/logic/TestInputLogicParser.java", "identifier": "TestInputLogicParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCombine() throws JDOMException {\n //@formatter:off\n String xml =\n \"<input-logic>\" +\n \"<combine name =\\\"test\\\" min=\\\"10\\\">\" +\n \"<data-in dataset=\\\"A\\\"/> \" +\n ...
{ "fields": [ { "declarator": "COORD_INPUT_EVENTS_DATA_IN = \"data-in\"", "modifier": "public final static", "original_string": "public final static String COORD_INPUT_EVENTS_DATA_IN = \"data-in\";", "type": "String", "var_name": "COORD_INPUT_EVENTS_DATA_IN" }, { "decla...
{ "body": "@SuppressWarnings(\"unchecked\")\n public String parseWithName(Element root, String name) {\n if (root == null) {\n return \"\";\n }\n StringBuilder parsedString = new StringBuilder();\n\n List<Element> childrens = root.getChildren();\n for (int i = 0; i < c...
{ "created": "9/14/2011 7:00:10 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 2383782, "size": null, "stargazer_count": null, "stars": 542, "updates": "2020-01-18T12:54:24+00:00", "url": "https://github.com/apache/oozie" }
91855710_1
{ "fields": [ { "declarator": "xssSanitizerService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private XssSanitizerService xssSanitizerService;", "type": "XssSanitizerService", "var_name": "xssSanitizerService" } ], "file": "backend/src/test/j...
{ "body": "@Test\n public void testNoClosed() throws Exception {\n String unsafe = \"<a href='javascript:alert('XSS')'>часто используемый в печати и вэб-дизайне\";\n\n String safe = xssSanitizerService.sanitize(unsafe);\n Assertions.assertEquals(\"часто используемый в печати и вэб-дизайне\", s...
{ "fields": [ { "declarator": "policyFactory", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private PolicyFactory policyFactory;", "type": "PolicyFactory", "var_name": "policyFactory" }, { "declarator": "xssHtmlChangeListener", "modif...
{ "body": "public String sanitize(String html) {\n return policyFactory.sanitize(\n html,\n xssHtmlChangeListener,\n \"ip='\"+ getIpAddressFromRequestContext()+\"'\"\n );\n }", "class_method_signature": "XssSanitizerService.sanitize(String html)", "con...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 91855710, "size": 50141, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/nkonev/blog" }
91855710_0
{ "fields": [ { "declarator": "xssSanitizerService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private XssSanitizerService xssSanitizerService;", "type": "XssSanitizerService", "var_name": "xssSanitizerService" } ], "file": "backend/src/test/j...
{ "body": "@Test\n public void test() throws Exception {\n String unsafe = \"<a href='javascript:alert('XSS')'>часто</a> используемый в печати и вэб-дизайне\";\n\n String safe = xssSanitizerService.sanitize(unsafe);\n Assertions.assertEquals(\"часто используемый в печати и вэб-дизайне\", safe)...
{ "fields": [ { "declarator": "policyFactory", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private PolicyFactory policyFactory;", "type": "PolicyFactory", "var_name": "policyFactory" }, { "declarator": "xssHtmlChangeListener", "modif...
{ "body": "public String sanitize(String html) {\n return policyFactory.sanitize(\n html,\n xssHtmlChangeListener,\n \"ip='\"+ getIpAddressFromRequestContext()+\"'\"\n );\n }", "class_method_signature": "XssSanitizerService.sanitize(String html)", "con...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 91855710, "size": 50141, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/nkonev/blog" }
91855710_7
{ "fields": [ { "declarator": "postConverter", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private PostConverter postConverter;", "type": "PostConverter", "var_name": "postConverter" }, { "declarator": "jdbcTemplate", "modifier": "@A...
{ "body": "@Test\n public void shouldDownloadYoutubePreviewWhenTitleImgEmptyAndContentHasNotImages() {\n PostDTO postDTO = new PostDTO();\n postDTO.setText(\"Hello, I contains youtube videos. \" +\n \" This is first. <iframe allowfullscreen=\\\"true\\\" src=\\\"https://www.youtube.com/...
{ "fields": [ { "declarator": "blogSecurityService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private BlogSecurityService blogSecurityService;", "type": "BlogSecurityService", "var_name": "blogSecurityService" }, { "declarator": "userAc...
{ "body": "String getTitleImg(PostDTO postDTO) {\n String titleImg = postDTO.getTitleImg();\n if (setFirstImageAsTitle && StringUtils.isEmpty(titleImg)) {\n try {\n Document document = Jsoup.parse(postDTO.getText());\n\n // try to get title url from post content'...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 91855710, "size": 50141, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/nkonev/blog" }
91855710_6
{ "fields": [ { "declarator": "postConverter", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private PostConverter postConverter;", "type": "PostConverter", "var_name": "postConverter" }, { "declarator": "jdbcTemplate", "modifier": "@A...
{ "body": "@Test\n public void shouldSetFirstImgWhenTitleImgEmpty() {\n PostDTO postDTO = new PostDTO();\n postDTO.setText(\"Hello, I contains images. This is first. <img src=\\\"http://example.com/image1.png\\\"/> This is second. <img src=\\\"http://example.com/image2.png\\\"/>\");\n postDTO....
{ "fields": [ { "declarator": "blogSecurityService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private BlogSecurityService blogSecurityService;", "type": "BlogSecurityService", "var_name": "blogSecurityService" }, { "declarator": "userAc...
{ "body": "String getTitleImg(PostDTO postDTO) {\n String titleImg = postDTO.getTitleImg();\n if (setFirstImageAsTitle && StringUtils.isEmpty(titleImg)) {\n try {\n Document document = Jsoup.parse(postDTO.getText());\n\n // try to get title url from post content'...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 91855710, "size": 50141, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/nkonev/blog" }
91855710_5
{ "fields": [ { "declarator": "postConverter", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private PostConverter postConverter;", "type": "PostConverter", "var_name": "postConverter" }, { "declarator": "jdbcTemplate", "modifier": "@A...
{ "body": "@Test\n public void testGetYouTubeId() {\n String youtubeVideoId = PostConverter.getYouTubeVideoId(\"https://www.youtube.com/embed/eoDsxos6xhM?showinfo=0\");\n Assertions.assertEquals(\"eoDsxos6xhM\", youtubeVideoId);\n }", "class_method_signature": "PostConverterTest.testGetYouTubeId...
{ "fields": [ { "declarator": "blogSecurityService", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private BlogSecurityService blogSecurityService;", "type": "BlogSecurityService", "var_name": "blogSecurityService" }, { "declarator": "userAc...
{ "body": "public static String getYouTubeVideoId(String iframeSrcUrl) {\n UriComponents build = UriComponentsBuilder.fromHttpUrl(iframeSrcUrl).build();\n List<String> pathSegments = build.getPathSegments();\n return pathSegments.get(pathSegments.size() - 1);\n }", "class_method_signature": ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 91855710, "size": 50141, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/nkonev/blog" }
91855710_4
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(PostControllerTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PostControllerTest.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Test\n public void testAnonymousCannotAddPostUnit() throws Exception {\n Assertions.assertThrows(AuthenticationCredentialsNotFoundException.class, () -> {\n postController.addPost(null, PostDtoBuilder.startBuilding().build());\n });\n }", "class_method_signature": "PostCon...
{ "fields": [ { "declarator": "postRepository", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private PostRepository postRepository;", "type": "PostRepository", "var_name": "postRepository" }, { "declarator": "postService", "modifier":...
{ "body": "@PreAuthorize(\"@blogSecurityService.hasPostPermission(#userAccount, T(com.github.nkonev.blog.security.permissions.PostPermissions).CREATE)\")\n @PostMapping(Constants.Urls.API + Constants.Urls.POST)\n public PostDTOWithAuthorization addPost(\n @AuthenticationPrincipal UserAccountDetailsDT...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 91855710, "size": 50141, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/nkonev/blog" }
91855710_3
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(PostControllerTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PostControllerTest.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@WithUserDetails(TestConstants.USER_ADMIN)\n @Test\n public void testFulltextSearchHostPort() throws Exception {\n final String newPostRendered = \"<body>Post Rendered</body>\";\n mockServer.expect(requestTo(new StringStartsWith(true, \"http://rendertron.example.com:3000/\"+customConfig...
{ "fields": [ { "declarator": "postRepository", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private PostRepository postRepository;", "type": "PostRepository", "var_name": "postRepository" }, { "declarator": "postService", "modifier":...
{ "body": "@PreAuthorize(\"@blogSecurityService.hasPostPermission(#postDTO, #userAccount, T(com.github.nkonev.blog.security.permissions.PostPermissions).EDIT)\")\n @PutMapping(Constants.Urls.API + Constants.Urls.POST)\n public PostDTOWithAuthorization updatePost(\n @AuthenticationPrincipal UserAccoun...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 91855710, "size": 50141, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/nkonev/blog" }
91855710_2
{ "fields": [ { "declarator": "objectMapper", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private ObjectMapper objectMapper;", "type": "ObjectMapper", "var_name": "objectMapper" }, { "declarator": "LOGGER = LoggerFactory.getLogger(Settings...
{ "body": "@Test\n public void getConfig() throws Exception {\n mockMvc.perform(\n get(Constants.Urls.API+ Constants.Urls.CONFIG)\n .contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)\n )\n .andExpect(status().isOk())\n .andExpect(js...
{ "fields": [ { "declarator": "runtimeSettingsRepository", "modifier": "@Autowired\n private", "original_string": "@Autowired\n private RuntimeSettingsRepository runtimeSettingsRepository;", "type": "RuntimeSettingsRepository", "var_name": "runtimeSettingsRepository" }, ...
{ "body": "@GetMapping(API+CONFIG)\n public SettingsDTO getConfig(@AuthenticationPrincipal UserAccountDetailsDTO userAccount){\n\n Iterable<RuntimeSettings> runtimeSettings = runtimeSettingsRepository.findAll();\n\n SettingsDTO settingsDTOPartial = StreamSupport.stream(runtimeSettings.spliterator(), ...
{ "created": null, "fork": null, "fork_count": 0, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 91855710, "size": 50141, "stargazer_count": 6, "stars": null, "updates": null, "url": "https://github.com/nkonev/blog" }
79304189_11
{ "fields": [ { "declarator": "bgTasks", "modifier": "public static", "original_string": "public static ScheduledExecutorService bgTasks;", "type": "ScheduledExecutorService", "var_name": "bgTasks" }, { "declarator": "conf = new HashMap<>()", "modifier": "private"...
{ "body": "@Test\n\tpublic void testConfigure() {\n\t\tStorageEngine engine = new MemStorageEngine();\n\t\ttry {\n\t\t\tengine.writeDataPointWithLock(MiscUtils.buildDataPoint(\"test\", \"ss\", Arrays.asList(\"value\"),\n\t\t\t\t\tArrays.asList(Tag.newBuilder().setTagKey(\"test\").setTagValue(\"2\").build()),\n\t\t\t\...
{ "fields": [ { "declarator": "logger = Logger.getLogger(MemStorageEngine.class.getName())", "modifier": "private static final", "original_string": "private static final Logger logger = Logger.getLogger(MemStorageEngine.class.getName());", "type": "Logger", "var_name": "logger" }...
{ "body": "@Override\n\tpublic void configure(Map<String, String> conf, ScheduledExecutorService bgTaskPool) throws IOException {\n\t\tthis.conf = conf;\n\t\tthis.bgTaskPool = bgTaskPool;\n\t\tthis.defaultRetentionHours = Integer\n\t\t\t\t.parseInt(conf.getOrDefault(RETENTION_HOURS, String.valueOf(DEFAULT_RETENTION_H...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_31
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestInfluxDecoder.java", "identifier": "TestInfluxDecoder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testSinglePointMeasurementValueWithoutTimestamp() {\n\t\tString testPoints = \"cpu value=1i\";\n\t\tList<Point> dps = InfluxDecoder.pointsFromString(\"test\", testPoints);\n\t\tassertEquals(1, dps.size());\n\t\tPoint dp = dps.get(0);\n\t\tassertEquals(\"cpu\", dp.getMeasurementName());...
{ "fields": [ { "declarator": "TAG = Splitter.on('=')", "modifier": "private static final", "original_string": "private static final Splitter TAG = Splitter.on('=');", "type": "Splitter", "var_name": "TAG" }, { "declarator": "SPACE = Splitter.on(Pattern.compile(\"\\\\s+...
{ "body": "public static List<Point> pointsFromString(String dbName, String payload) {\n\t\tList<Point> dps = new ArrayList<>();\n\t\ttry {\n\t\t\tIterable<String> splits = lineFromPayLoad(payload);\n\t\t\tfor (String split : splits) {\n\t\t\t\tBuilder builder = pointFromLine(Point.newBuilder(), dbName, split);\n\t\t...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_27
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestInfluxDecoder.java", "identifier": "TestInfluxDecoder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testIdenticalWriteSinglePoint() {\n\t\tString testPoints = \"cpu,host=server01,region=uswest value=1i 1434055562000000000\";\n\t\tList<Point> dps = InfluxDecoder.pointsFromString(\"test\", testPoints);\n\t\tPoint dp = dps.get(0);\n\t\tassertEquals(\"cpu\", dp.getMeasurementName());\n\t...
{ "fields": [ { "declarator": "TAG = Splitter.on('=')", "modifier": "private static final", "original_string": "private static final Splitter TAG = Splitter.on('=');", "type": "Splitter", "var_name": "TAG" }, { "declarator": "SPACE = Splitter.on(Pattern.compile(\"\\\\s+...
{ "body": "public static List<Point> pointsFromString(String dbName, String payload) {\n\t\tList<Point> dps = new ArrayList<>();\n\t\ttry {\n\t\t\tIterable<String> splits = lineFromPayLoad(payload);\n\t\t\tfor (String split : splits) {\n\t\t\t\tBuilder builder = pointFromLine(Point.newBuilder(), dbName, split);\n\t\t...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_3
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/analytics/TestMathUtils.java", "identifier": "TestMathUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testPPMCC() {\n\t\tdouble[] a = new double[] { 2, 3, 4, 5, 6 };\n\t\tdouble[] b = new double[] { 2.2, 33.2, 44.4, 55.5, 66.6 };\n\t\tPearsonsCorrelation corr = new PearsonsCorrelation();\n\t\tdouble ppmcc = MathUtils.ppmcc(a, b);\n\t\tdouble correlation = corr.correlation(a, b);\n\t\ta...
{ "fields": [], "file": "core/src/main/java/com/srotya/sidewinder/core/analytics/MathUtils.java", "identifier": "MathUtils", "interfaces": "", "methods": [ { "class_method_signature": "MathUtils.ppmcc(double[] a, double[] b)", "constructor": false, "full_signature": "public static double...
{ "body": "public static double ppmcc(double[] a, double[] b) {\n\t\tdouble amean = MathUtils.mean(a);\n\t\tdouble aStdDev = MathUtils.standardDeviation(a, amean);\n\n\t\tdouble bmean = MathUtils.mean(b);\n\t\tdouble bStdDev = MathUtils.standardDeviation(b, bmean);\n\n\t\tdouble cor = (MathUtils.covariance(a, aStdDev...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_2
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/analytics/TestMathUtils.java", "identifier": "TestMathUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testPPMCCMulti() {\n\t\tdouble[][] data = new double[][] { new double[] { 2, 3, 4, 5, 6 }, new double[] { 2.2, 33.2, 44.4, 55.5, 66.6 },\n\t\t\t\tnew double[] { 2, 3, 4, 5, 6 } };\n\t\tPearsonsCorrelation corr = new PearsonsCorrelation();\n\t\tdouble[] ppmcc = MathUtils.ppmcc(data, 0);...
{ "fields": [], "file": "core/src/main/java/com/srotya/sidewinder/core/analytics/MathUtils.java", "identifier": "MathUtils", "interfaces": "", "methods": [ { "class_method_signature": "MathUtils.ppmcc(double[] a, double[] b)", "constructor": false, "full_signature": "public static double...
{ "body": "public static double ppmcc(double[] a, double[] b) {\n\t\tdouble amean = MathUtils.mean(a);\n\t\tdouble aStdDev = MathUtils.standardDeviation(a, amean);\n\n\t\tdouble bmean = MathUtils.mean(b);\n\t\tdouble bStdDev = MathUtils.standardDeviation(b, bmean);\n\n\t\tdouble cor = (MathUtils.covariance(a, aStdDev...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_26
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestMiscUtils.java", "identifier": "TestMiscUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testCreateAggregateFunctionInvalid() throws InstantiationException, IllegalAccessException, Exception {\n\t\ttry {\n\t\t\tString[] parts = new String[] { \"\", \"derivative,10,mean\" };\n\t\t\tMiscUtils.createFunctionChain(parts, 1);\n\t\t\tfail(\"must throw an exception\");\n\t\t} cat...
{ "fields": [ { "declarator": "NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\")", "modifier": "private static final", "original_string": "private static final Pattern NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\");", "type": "Pattern", "var_name": "NUMBER" }, { "d...
{ "body": "public static Function createFunctionChain(String[] parts, int startIndex)\n\t\t\tthrows InstantiationException, IllegalAccessException, Exception {\n\t\tFunction[] arguments = new Function[parts.length - startIndex];\n\t\tfor (int k = startIndex, p = 0; k < parts.length; k++, p++) {\n\t\t\tString[] args =...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_30
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestInfluxDecoder.java", "identifier": "TestInfluxDecoder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testSinglePointMeasurementValue() {\n\t\tString testPoints = \"cpu value=1i 1434055562000000000\";\n\t\tList<Point> dps = InfluxDecoder.pointsFromString(\"test\", testPoints);\n\t\tassertEquals(1, dps.size());\n\t\tPoint dp = dps.get(0);\n\t\tassertEquals(\"cpu\", dp.getMeasurementName...
{ "fields": [ { "declarator": "TAG = Splitter.on('=')", "modifier": "private static final", "original_string": "private static final Splitter TAG = Splitter.on('=');", "type": "Splitter", "var_name": "TAG" }, { "declarator": "SPACE = Splitter.on(Pattern.compile(\"\\\\s+...
{ "body": "public static List<Point> pointsFromString(String dbName, String payload) {\n\t\tList<Point> dps = new ArrayList<>();\n\t\ttry {\n\t\t\tIterable<String> splits = lineFromPayLoad(payload);\n\t\t\tfor (String split : splits) {\n\t\t\t\tBuilder builder = pointFromLine(Point.newBuilder(), dbName, split);\n\t\t...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_10
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/api/grafana/TestGrafanaUtils.java", "identifier": "TestGrafanaUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testMultiFilterExtractor() throws InvalidFilterException {\n\t\tJsonObject element = new JsonObject();\n\t\telement.addProperty(\"target\", \"ticker\");\n\t\tJsonArray array = new JsonArray();\n\t\tJsonObject obj = new JsonObject();\n\t\tobj.addProperty(\"key\", \"testg\");\n\t\tobj.ad...
{ "fields": [ { "declarator": "logger = Logger.getLogger(GrafanaUtils.class.getName())", "modifier": "private static final", "original_string": "private static final Logger logger = Logger.getLogger(GrafanaUtils.class.getName());", "type": "Logger", "var_name": "logger" } ], ...
{ "body": "public static TagFilter extractGrafanaFilter(JsonObject element) throws InvalidFilterException {\n\t\tStack<TagFilter> predicateStack = new Stack<>();\n\t\tJsonArray array = element.get(\"filters\").getAsJsonArray();\n\t\tfor (int i = 0; i < array.size(); i++) {\n\t\t\tJsonObject obj = array.get(i).getAsJs...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_21
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestMiscUtils.java", "identifier": "TestMiscUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testExtractTargetFromQuery() throws Exception {\n\t\tTargetSeries series = MiscUtils.extractTargetFromQuery(\"cpu.value.tes=2|tes=3\");\n\t\tassertEquals(\"cpu\", series.getMeasurementName());\n\t\tassertEquals(\"value\", series.getFieldName());\n\t\t// assertEquals(Arrays.asList(\"tes...
{ "fields": [ { "declarator": "NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\")", "modifier": "private static final", "original_string": "private static final Pattern NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\");", "type": "Pattern", "var_name": "NUMBER" }, { "d...
{ "body": "public static TargetSeries extractTargetFromQuery(String query) throws Exception {\n\t\tif (query == null || query.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tString[] queryParts = query.split(\"<=?\");\n\t\tif (queryParts.length > 1) {\n\t\t\tquery = queryParts[1];\n\t\t}\n\n\t\tString[] parts = query.sp...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_5
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/analytics/TestMathUtils.java", "identifier": "TestMathUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testCovariance() {\n\t\tdouble[] a = new double[] { 2, 3, 4, 5, 6 };\n\t\tdouble[] b = new double[] { 2.2, 33.2, 44.4, 55.5, 66.6 };\n\t\tCovariance cov = new Covariance();\n\t\tdouble covariance = cov.covariance(a, b, false);\n\t\tdouble amean = MathUtils.mean(a);\n\t\tdouble bmean = ...
{ "fields": [], "file": "core/src/main/java/com/srotya/sidewinder/core/analytics/MathUtils.java", "identifier": "MathUtils", "interfaces": "", "methods": [ { "class_method_signature": "MathUtils.ppmcc(double[] a, double[] b)", "constructor": false, "full_signature": "public static double...
{ "body": "public static double covariance(double[] a, double amean, double[] b, double bmean) {\n\t\tdouble t = 0;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tt += (a[i] - amean) * (b[i] - bmean);\n\t\t}\n\t\treturn t / a.length;\n\t}", "class_method_signature": "MathUtils.covariance(double[] a, double amean,...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_9
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/api/grafana/TestGrafanaUtils.java", "identifier": "TestGrafanaUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testFilterExtractor() throws InvalidFilterException {\n\t\tJsonObject element = new JsonObject();\n\t\telement.addProperty(\"target\", \"ticker\");\n\t\tJsonArray array = new JsonArray();\n\t\tJsonObject obj = new JsonObject();\n\t\tobj.addProperty(\"key\", \"test\");\n\t\tobj.addPrope...
{ "fields": [ { "declarator": "logger = Logger.getLogger(GrafanaUtils.class.getName())", "modifier": "private static final", "original_string": "private static final Logger logger = Logger.getLogger(GrafanaUtils.class.getName());", "type": "Logger", "var_name": "logger" } ], ...
{ "body": "public static TagFilter extractGrafanaFilter(JsonObject element) throws InvalidFilterException {\n\t\tStack<TagFilter> predicateStack = new Stack<>();\n\t\tJsonArray array = element.get(\"filters\").getAsJsonArray();\n\t\tfor (int i = 0; i < array.size(); i++) {\n\t\t\tJsonObject obj = array.get(i).getAsJs...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_17
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestTimeUtils.java", "identifier": "TestTimeUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testTimeToNanoSeconds() {\n\t\tlong time = System.currentTimeMillis();\n\t\tlong timeToNano = TimeUtils.timeToNanoSeconds(TimeUnit.MILLISECONDS, time);\n\t\tassertEquals(time * 1000 * 1000, timeToNano);\n\n\t\ttime = System.currentTimeMillis() * 1000 * 1000;\n\t\ttimeToNano = TimeUtils...
{ "fields": [ { "declarator": "MAX_BITS_TO_SHIFT = 63", "modifier": "private static final", "original_string": "private static final int MAX_BITS_TO_SHIFT = 63;", "type": "int", "var_name": "MAX_BITS_TO_SHIFT" }, { "declarator": "ARGUMENT_EXCEPTION = new IllegalArgument...
{ "body": "public static long timeToNanoSeconds(TimeUnit unit, long time) {\n\t\tlong ts;\n\t\tswitch (unit) {\n\t\tcase NANOSECONDS:\n\t\t\tts = time;\n\t\t\tbreak;\n\t\tcase MICROSECONDS:\n\t\t\tts = ((long) time * (1000));\n\t\t\tbreak;\n\t\tcase MILLISECONDS:\n\t\t\tts = (((long) time) * 1000 * 1000);\n\t\t\tbrea...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_16
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestTimeUtils.java", "identifier": "TestTimeUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testTimeToSeconds() {\n\t\tlong time = System.currentTimeMillis() / 1000 / 3600;\n\t\tint timeToSeconds = TimeUtils.timeToSeconds(TimeUnit.HOURS, time);\n\t\tassertEquals(time * 3600, timeToSeconds);\n\n\t\ttime = System.currentTimeMillis() * 1000 * 1000;\n\t\ttimeToSeconds = TimeUtils...
{ "fields": [ { "declarator": "MAX_BITS_TO_SHIFT = 63", "modifier": "private static final", "original_string": "private static final int MAX_BITS_TO_SHIFT = 63;", "type": "int", "var_name": "MAX_BITS_TO_SHIFT" }, { "declarator": "ARGUMENT_EXCEPTION = new IllegalArgument...
{ "body": "public static int timeToSeconds(TimeUnit unit, long time) {\n\t\tint ts;\n\t\tswitch (unit) {\n\t\tcase NANOSECONDS:\n\t\t\tts = (int) (time / (1000 * 1000 * 1000));\n\t\t\tbreak;\n\t\tcase MICROSECONDS:\n\t\t\tts = (int) (time / (1000 * 1000));\n\t\t\tbreak;\n\t\tcase MILLISECONDS:\n\t\t\tts = (int) (time...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_8
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/api/grafana/TestGrafanaUtils.java", "identifier": "TestGrafanaUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testExtractGrafanaAggregation() {\n\n\t}", "class_method_signature": "TestGrafanaUtils.testExtractGrafanaAggregation()", "constructor": false, "full_signature": "@Test public void testExtractGrafanaAggregation()", "identifier": "testExtractGrafanaAggregation", "invocations": ...
{ "fields": [ { "declarator": "logger = Logger.getLogger(GrafanaUtils.class.getName())", "modifier": "private static final", "original_string": "private static final Logger logger = Logger.getLogger(GrafanaUtils.class.getName());", "type": "Logger", "var_name": "logger" } ], ...
{ "body": "public static Function extractGrafanaAggregation(JsonObject jsonElement) {\n\t\tif (!jsonElement.has(\"aggregator\")) {\n\t\t\treturn null;\n\t\t}\n\t\tJsonObject obj = jsonElement.get(\"aggregator\").getAsJsonObject();\n\t\tif (!obj.has(\"name\") || !obj.has(\"args\")) {\n\t\t\treturn null;\n\t\t}\n\t\tSt...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_4
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/analytics/TestMathUtils.java", "identifier": "TestMathUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testMean() {\n\t\tdouble[] a = new double[] { 2, 3, 4, 5, 6 };\n\t\tdouble mean = MathUtils.mean(a);\n\t\tMean cmean = new Mean();\n\t\tassertEquals(cmean.evaluate(a), mean, 0.0001);\n\t}", "class_method_signature": "TestMathUtils.testMean()", "constructor": false, "full_signatur...
{ "fields": [], "file": "core/src/main/java/com/srotya/sidewinder/core/analytics/MathUtils.java", "identifier": "MathUtils", "interfaces": "", "methods": [ { "class_method_signature": "MathUtils.ppmcc(double[] a, double[] b)", "constructor": false, "full_signature": "public static double...
{ "body": "public static double mean(double[] a) {\n\t\tdouble avg = 0;\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tavg += a[i];\n\t\t}\n\t\tavg = avg / a.length;\n\t\treturn avg;\n\t}", "class_method_signature": "MathUtils.mean(double[] a)", "constructor": false, "full_signature": "public static double me...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_20
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestMiscUtils.java", "identifier": "TestMiscUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testBuildDataPoint() {\n\t\tDataPoint dp = MiscUtils.buildDataPoint(10L, 10.1);\n\t\tassertEquals(10L, dp.getTimestamp(), 0);\n\t\tassertEquals(10.1, dp.getValue(), 0);\n\n\t\tdp = MiscUtils.buildDataPoint(10L, 10L);\n\t\tassertEquals(10L, dp.getTimestamp(), 0);\n\t\tassertEquals(10, d...
{ "fields": [ { "declarator": "NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\")", "modifier": "private static final", "original_string": "private static final Pattern NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\");", "type": "Pattern", "var_name": "NUMBER" }, { "d...
{ "body": "public static DataPoint buildDataPoint(long timestamp, long value) {\n\t\tDataPoint dp = new DataPoint();\n\t\tdp.setTimestamp(timestamp);\n\t\tdp.setLongValue(value);\n\t\treturn dp;\n\t}", "class_method_signature": "MiscUtils.buildDataPoint(long timestamp, long value)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_36
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestByteUtils.java", "identifier": "TestByteUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testByteAryToAscii() {\n\t\tint time = 1380327876;\n\t\tSystem.out.println(\"time:\" + new Date((long) time * 1000));\n\t\ttime = Integer.MAX_VALUE - time;\n\t\tSystem.out.println(\"inverted time:\" + time);\n\t\tSystem.out.println(\"inverted time:\" + new Date((long) time * 1000));\n\...
{ "fields": [ { "declarator": "DEF_CHARSET = Charset.forName(\"US-ASCII\")", "modifier": "public static final", "original_string": "public static final Charset DEF_CHARSET = Charset.forName(\"US-ASCII\");", "type": "Charset", "var_name": "DEF_CHARSET" } ], "file": "core/src/m...
{ "body": "public static String byteAryToAscii(byte[] in) {\n\t\treturn new String(in, DEF_CHARSET);\n\t}", "class_method_signature": "ByteUtils.byteAryToAscii(byte[] in)", "constructor": false, "full_signature": "public static String byteAryToAscii(byte[] in)", "identifier": "byteAryToAscii", "invocations"...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_19
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestMiscUtils.java", "identifier": "TestMiscUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testTagToString() {\n\t\tString tagString = MiscUtils.tagToString(Arrays.asList(\"test\", \"test2\"));\n\t\tassertEquals(\"/test/test2\", tagString);\n\t}", "class_method_signature": "TestMiscUtils.testTagToString()", "constructor": false, "full_signature": "@Test public void tes...
{ "fields": [ { "declarator": "NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\")", "modifier": "private static final", "original_string": "private static final Pattern NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\");", "type": "Pattern", "var_name": "NUMBER" }, { "d...
{ "body": "public static String tagToString(List<String> tags) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (String tag : tags) {\n\t\t\tbuilder.append(\"/\");\n\t\t\tbuilder.append(tag);\n\t\t}\n\t\treturn builder.toString();\n\t}", "class_method_signature": "MiscUtils.tagToString(List<String> tags...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_7
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/api/grafana/TestGrafanaUtils.java", "identifier": "TestGrafanaUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testExtractTargetsFromJson() throws InvalidFilterException {\n\t\tList<TargetSeries> targetSeries = new ArrayList<>();\n\t\tString query = \"{\\\"panelId\\\":3,\\\"range\\\":{\\\"from\\\":\\\"2017-02-09T21:20:53.328Z\\\",\\\"to\\\":\\\"2017-02-10T00:20:53.328Z\\\",\\\"raw\\\":{\\\"from...
{ "fields": [ { "declarator": "logger = Logger.getLogger(GrafanaUtils.class.getName())", "modifier": "private static final", "original_string": "private static final Logger logger = Logger.getLogger(GrafanaUtils.class.getName());", "type": "Logger", "var_name": "logger" } ], ...
{ "body": "public static void extractTargetsFromJson(JsonObject json, List<TargetSeries> targetSeries)\n\t\t\tthrows InvalidFilterException {\n\t\tJsonArray targets = json.get(\"targets\").getAsJsonArray();\n\t\tfor (int i = 0; i < targets.size(); i++) {\n\t\t\tJsonObject jsonElement = targets.get(i).getAsJsonObject(...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_23
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestMiscUtils.java", "identifier": "TestMiscUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testReadAllLines() throws IOException {\n\t\tPrintWriter pr = new PrintWriter(new File(\"target/filereadtest.txt\"));\n\t\tpr.append(\"this is a test\\nthis is a test\");\n\t\tpr.close();\n\t\tList<String> lines = MiscUtils.readAllLines(new File(\"target/filereadtest.txt\"));\n\t\tfor ...
{ "fields": [ { "declarator": "NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\")", "modifier": "private static final", "original_string": "private static final Pattern NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\");", "type": "Pattern", "var_name": "NUMBER" }, { "d...
{ "body": "public static List<String> readAllLines(File file) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\tList<String> lines = new ArrayList<>();\n\t\tString temp = null;\n\t\twhile ((temp = reader.readLine()) != null) {\n\t\t\tlines.add(temp);\n\t\t}\n\t\treader.c...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_35
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestByteUtils.java", "identifier": "TestByteUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testJsonArrayToList() {\n\t\tJsonArray ary = new JsonArray();\n\t\tary.add(\"test\");\n\t\tary.add(\"test1\");\n\t\tary.add(\"test2\");\n\t\tList<String> list = ByteUtils.jsonArrayToStringList(ary);\n\t\tassertEquals(\"test\", list.get(0));\n\t\tassertEquals(\"test1\", list.get(1));\n\...
{ "fields": [ { "declarator": "DEF_CHARSET = Charset.forName(\"US-ASCII\")", "modifier": "public static final", "original_string": "public static final Charset DEF_CHARSET = Charset.forName(\"US-ASCII\");", "type": "Charset", "var_name": "DEF_CHARSET" } ], "file": "core/src/m...
{ "body": "public static List<String> jsonArrayToStringList(JsonArray array) {\n\t\tList<String> ary = new ArrayList<>();\n\t\tfor (JsonElement jsonElement : array) {\n\t\t\tary.add(jsonElement.getAsString());\n\t\t}\n\t\treturn ary;\n\t}", "class_method_signature": "ByteUtils.jsonArrayToStringList(JsonArray array)...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_15
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestTimeUtils.java", "identifier": "TestTimeUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testGetTimeBucket() {\n\t\tlong timestamp = System.currentTimeMillis();\n\t\tint timeBucket = TimeUtils.getTimeBucket(TimeUnit.MILLISECONDS, timestamp, 3600);\n\t\tassertEquals(((timestamp / 1000) / 3600) * 3600, timeBucket);\n\t}", "class_method_signature": "TestTimeUtils.testGetTim...
{ "fields": [ { "declarator": "MAX_BITS_TO_SHIFT = 63", "modifier": "private static final", "original_string": "private static final int MAX_BITS_TO_SHIFT = 63;", "type": "int", "var_name": "MAX_BITS_TO_SHIFT" }, { "declarator": "ARGUMENT_EXCEPTION = new IllegalArgument...
{ "body": "public static int getTimeBucket(TimeUnit unit, long timestamp, int bucketSizeInSeconds)\n\t\t\tthrows IllegalArgumentException {\n\t\tint ts = timeToSeconds(unit, timestamp);\n\t\treturn getWindowFlooredNaturalTime(ts, bucketSizeInSeconds);\n\t}", "class_method_signature": "TimeUtils.getTimeBucket(TimeUn...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_14
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestGrafanaStreamingOutput.java", "identifier": "TestGrafanaStreamingOutput", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testJsonValidity() throws WebApplicationException, IOException {\n\t\tGrafanaOutputv2 out1 = new GrafanaOutputv2(\"targetname1\", false);\n\t\tout1.setPointsIterator(new MockDataPointIterator(Arrays.asList(new DataPoint(1L, 2L), new DataPoint(3L, 4L))));\n\t\tGrafanaStreamingOutput out...
{ "fields": [ { "declarator": "targets", "modifier": "private", "original_string": "private List<Iterator<GrafanaOutputv2>> targets;", "type": "List<Iterator<GrafanaOutputv2>>", "var_name": "targets" } ], "file": "core/src/main/java/com/srotya/sidewinder/core/utils/GrafanaStr...
{ "body": "@Override\n\tpublic void write(OutputStream os) throws IOException, WebApplicationException {\n\t\tos = new BufferedOutputStream(os, 8192);\n\t\tos.write('[');\n\t\tif (targets.size() > 0) {\n\t\t\tserializeEntry(os, 0);\n\t\t\tfor (int i = 1; i < targets.size(); i++) {\n\t\t\t\tos.write(',');\n\t\t\t\tser...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_34
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestInfluxDecoder.java", "identifier": "TestInfluxDecoder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testPerf() {\n\t\tString testPoints = \"cpu,host=server01,region=uswest value=1i 1434055562000000000\\ncpu,host=server01,region=uswest value=1i 1434055562000000000\\ncpu,host=server01,region=uswest value=1i 1434055562000000000\\ncpu,host=server01,region=uswest value=1i 1434055562000000...
{ "fields": [ { "declarator": "TAG = Splitter.on('=')", "modifier": "private static final", "original_string": "private static final Splitter TAG = Splitter.on('=');", "type": "Splitter", "var_name": "TAG" }, { "declarator": "SPACE = Splitter.on(Pattern.compile(\"\\\\s+...
{ "body": "public static List<Point> pointsFromString(String dbName, String payload) {\n\t\tList<Point> dps = new ArrayList<>();\n\t\ttry {\n\t\t\tIterable<String> splits = lineFromPayLoad(payload);\n\t\t\tfor (String split : splits) {\n\t\t\t\tBuilder builder = pointFromLine(Point.newBuilder(), dbName, split);\n\t\t...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_22
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestMiscUtils.java", "identifier": "TestMiscUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testSplitNormalizeString() {\n\t\tString[] splits = MiscUtils.splitAndNormalizeString(\"/data/drive1, /data/drive2, /data/drive3\");\n\t\tfor (String split : splits) {\n\t\t\tassertTrue(!split.contains(\" \"));\n\t\t}\n\t\tassertEquals(3, splits.length);\n\t\t\n\t\tsplits = MiscUtils...
{ "fields": [ { "declarator": "NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\")", "modifier": "private static final", "original_string": "private static final Pattern NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\");", "type": "Pattern", "var_name": "NUMBER" }, { "d...
{ "body": "public static String[] splitAndNormalizeString(String input) {\n\t\tString[] split = input.split(\",\");\n\t\tfor (int i = 0; i < split.length; i++) {\n\t\t\tString str = split[i];\n\t\t\tsplit[i] = str.trim();\n\t\t}\n\t\treturn split;\n\t}", "class_method_signature": "MiscUtils.splitAndNormalizeString(...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_6
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/api/TestDatabaseOpsApi.java", "identifier": "TestDatabaseOpsApi", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testQuerySeries() throws IOException {\n\t\tMemStorageEngine engine = new MemStorageEngine();\n\t\tengine.configure(new HashMap<>(), null);\n\t\tengine.startup();\n\n\t\tBuilder dp = Point.newBuilder();\n\t\tdp.setDbName(\"test1\");\n\t\tdp.addFp(false);\n\t\tdp.addValue(1L);\n\t\tdp.s...
{ "fields": [ { "declarator": "DB_NAME = \"dbName\"", "modifier": "public static final", "original_string": "public static final String DB_NAME = \"dbName\";", "type": "String", "var_name": "DB_NAME" }, { "declarator": "storageEngine", "modifier": "private", ...
{ "body": "@Path(\"/{\" + DB_NAME + \"}/query\")\n\t@POST\n\t@Produces({ MediaType.APPLICATION_JSON })\n\t@Consumes({ MediaType.TEXT_PLAIN })\n\tpublic String querySeries(@PathParam(DatabaseOpsApi.DB_NAME) String dbName, String query) {\n\t\ttry {\n\t\t\tString[] queryParts = query.split(\"<=?\");\n\t\t\tSimpleDateFo...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_18
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestTimeUtils.java", "identifier": "TestTimeUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testFlooredNaturalTime() {\n\t\tint time = (int) (System.currentTimeMillis() / 1000);\n\t\tint windowFlooredNaturalTime = TimeUtils.getWindowFlooredNaturalTime(time, 3600);\n\t\tassertEquals((time / 3600) * 3600, windowFlooredNaturalTime);\n\t}", "class_method_signature": "TestTimeUt...
{ "fields": [ { "declarator": "MAX_BITS_TO_SHIFT = 63", "modifier": "private static final", "original_string": "private static final int MAX_BITS_TO_SHIFT = 63;", "type": "int", "var_name": "MAX_BITS_TO_SHIFT" }, { "declarator": "ARGUMENT_EXCEPTION = new IllegalArgument...
{ "body": "public static int getWindowFlooredNaturalTime(int timeInSeconds, int bucketInSeconds) {\n\t\t/**\n\t\t * bit shifting division and multiplication doesn't outperform the JIT compiler\n\t\t */\n\t\t// return (timeInSeconds >> bucketInSeconds) << bucketInSeconds;\n\t\treturn ((timeInSeconds / bucketInSeconds)...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_13
{ "fields": [ { "declarator": "measurement", "modifier": "private", "original_string": "private MockMeasurement measurement;", "type": "MockMeasurement", "var_name": "measurement" }, { "declarator": "fieldId = new LinkedByteString().concat(new ByteString(\"field1\"))", ...
{ "body": "@Test\n\tpublic void testExpandBufferError() throws IOException {\n\t\tmeasurement = new MockMeasurement(149, 100);\n\t\tField field = new ValueField(measurement, fieldId, 121213, new HashMap<>());\n\t\ttry {\n\t\t\tfor (double i = 100; i > 0; i--) {\n\t\t\t\tlong v = Double.doubleToLongBits(3.1417 * i % 7...
{ "fields": [ { "declarator": "START_OFFSET = 2", "modifier": "private static final", "original_string": "private static final int START_OFFSET = 2;", "type": "int", "var_name": "START_OFFSET" }, { "declarator": "logger = Logger.getLogger(ValueField.class.getName())", ...
{ "body": "public void addDataPoint(Measurement measurement, long value) throws IOException {\n\t\tValueWriter timeseriesBucket = getOrCreateValueWriter(measurement);\n\t\ttry {\n\t\t\ttimeseriesBucket.add(value);\n\t\t} catch (RollOverException e) {\n\t\t\taddDataPoint(measurement, value);\n\t\t} catch (NullPointerE...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_29
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestInfluxDecoder.java", "identifier": "TestInfluxDecoder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testDoublePointMeasurementValue() {\n\t\tString testPoints = \"cpu value=1i,value1=2i 1434055562000000000\";\n\t\tList<Point> dps = InfluxDecoder.pointsFromString(\"test\", testPoints);\n\n\t\tassertEquals(1, dps.size());\n\n\t\tPoint dp = dps.get(0);\n\t\tassertEquals(\"cpu\", dp.getM...
{ "fields": [ { "declarator": "TAG = Splitter.on('=')", "modifier": "private static final", "original_string": "private static final Splitter TAG = Splitter.on('=');", "type": "Splitter", "var_name": "TAG" }, { "declarator": "SPACE = Splitter.on(Pattern.compile(\"\\\\s+...
{ "body": "public static List<Point> pointsFromString(String dbName, String payload) {\n\t\tList<Point> dps = new ArrayList<>();\n\t\ttry {\n\t\t\tIterable<String> splits = lineFromPayLoad(payload);\n\t\t\tfor (String split : splits) {\n\t\t\t\tBuilder builder = pointFromLine(Point.newBuilder(), dbName, split);\n\t\t...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_1
{ "fields": [ { "declarator": "engine", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate StorageEngine engine;", "type": "StorageEngine", "var_name": "engine" } ], "file": "ingesters/src/test/java/com/srotya/sidewinder/ingesters/graphite/TestGraphiteDecode...
{ "body": "@Test\n\tpublic void testIncorrectParseSkip() throws IOException {\n\t\tList<Tag> tags = Arrays.asList(Tag.newBuilder().setTagKey(\"app\").setTagValue(\"1\").build(),\n\t\t\t\tTag.newBuilder().setTagKey(\"server\").setTagValue(\"1\").build(),\n\t\t\t\tTag.newBuilder().setTagKey(\"s\").setTagValue(\"jvm\")....
{ "fields": [ { "declarator": "BAD_TAG_EXCEPTION = new RejectException(\"Bad tag\")", "modifier": "private static final", "original_string": "private static final RejectException BAD_TAG_EXCEPTION = new RejectException(\"Bad tag\");", "type": "RejectException", "var_name": "BAD_TAG_E...
{ "body": "public static void parseAndInsertDataPoints(String dbName, String line, StorageEngine storageEngine)\n\t\t\tthrows IOException {\n\t\tString[] parts = line.split(\"\\\\s+\");\n\t\tif (parts.length != 3) {\n\t\t\t// invalid data point\n\t\t\tlogger.fine(\"Ignoring bad metric:\" + line);\n\t\t\treturn;\n\t\t...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_25
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestMiscUtils.java", "identifier": "TestMiscUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testCreateAggregateFunctionValid() throws InstantiationException, IllegalAccessException, Exception {\n\t\tString[] parts = new String[] { \"derivative,10,smean\" };\n\t\tMiscUtils.createFunctionChain(parts, 0);\n\t}", "class_method_signature": "TestMiscUtils.testCreateAggregateFunct...
{ "fields": [ { "declarator": "NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\")", "modifier": "private static final", "original_string": "private static final Pattern NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\");", "type": "Pattern", "var_name": "NUMBER" }, { "d...
{ "body": "public static Function createFunctionChain(String[] parts, int startIndex)\n\t\t\tthrows InstantiationException, IllegalAccessException, Exception {\n\t\tFunction[] arguments = new Function[parts.length - startIndex];\n\t\tfor (int k = startIndex, p = 0; k < parts.length; k++, p++) {\n\t\t\tString[] args =...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_33
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestInfluxDecoder.java", "identifier": "TestInfluxDecoder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testFloatMeasurementValueWithoutTimestamp() {\n\t\tString testPoints = \"cpu value=1.2\";\n\t\tList<Point> dps = InfluxDecoder.pointsFromString(\"test\", testPoints);\n\t\tassertEquals(1, dps.size());\n\t\tPoint dp = dps.get(0);\n\t\tassertEquals(\"cpu\", dp.getMeasurementName());\n\t\...
{ "fields": [ { "declarator": "TAG = Splitter.on('=')", "modifier": "private static final", "original_string": "private static final Splitter TAG = Splitter.on('=');", "type": "Splitter", "var_name": "TAG" }, { "declarator": "SPACE = Splitter.on(Pattern.compile(\"\\\\s+...
{ "body": "public static List<Point> pointsFromString(String dbName, String payload) {\n\t\tList<Point> dps = new ArrayList<>();\n\t\ttry {\n\t\t\tIterable<String> splits = lineFromPayLoad(payload);\n\t\t\tfor (String split : splits) {\n\t\t\t\tBuilder builder = pointFromLine(Point.newBuilder(), dbName, split);\n\t\t...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_32
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestInfluxDecoder.java", "identifier": "TestInfluxDecoder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testSinglePointWithIMeasurementValueWithoutTimestamp() {\n\t\tString testPoints = \"cpu value=1i\\ncpu\\ncpu mem test hello\";\n\t\tList<Point> dps = InfluxDecoder.pointsFromString(\"test\", testPoints);\n\t\tassertEquals(1, dps.size());\n\t\tPoint dp = dps.get(0);\n\t\tassertEquals(\"...
{ "fields": [ { "declarator": "TAG = Splitter.on('=')", "modifier": "private static final", "original_string": "private static final Splitter TAG = Splitter.on('=');", "type": "Splitter", "var_name": "TAG" }, { "declarator": "SPACE = Splitter.on(Pattern.compile(\"\\\\s+...
{ "body": "public static List<Point> pointsFromString(String dbName, String payload) {\n\t\tList<Point> dps = new ArrayList<>();\n\t\ttry {\n\t\t\tIterable<String> splits = lineFromPayLoad(payload);\n\t\t\tfor (String split : splits) {\n\t\t\t\tBuilder builder = pointFromLine(Point.newBuilder(), dbName, split);\n\t\t...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_24
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestMiscUtils.java", "identifier": "TestMiscUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testBuildTagFilter() throws InvalidFilterException {\n\t\tTagFilter filter = MiscUtils.buildTagFilter(\"host=1&test=2|tree=LTS.12\");\n\t\tassertEquals(ComplexTagFilter.class, filter.getClass());\n\t\tComplexTagFilter complex = ((ComplexTagFilter) filter);\n\t\tassertEquals(ComplexFilt...
{ "fields": [ { "declarator": "NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\")", "modifier": "private static final", "original_string": "private static final Pattern NUMBER = Pattern.compile(\"\\\\d+(\\\\.\\\\d+)?\");", "type": "Pattern", "var_name": "NUMBER" }, { "d...
{ "body": "public static TagFilter buildTagFilter(String tagFilter) throws InvalidFilterException {\n\t\tString[] tagSet = tagFilter.split(\"(&|\\\\|)\");\n\t\ttry {\n\t\t\tStack<TagFilter> predicateStack = new Stack<>();\n\t\t\tfor (int i = 0; i < tagSet.length; i++) {\n\t\t\t\tString item = tagSet[i];\n\t\t\t\tif (...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_0
{ "fields": [ { "declarator": "engine", "modifier": "@Mock\n\tprivate", "original_string": "@Mock\n\tprivate StorageEngine engine;", "type": "StorageEngine", "var_name": "engine" } ], "file": "ingesters/src/test/java/com/srotya/sidewinder/ingesters/graphite/TestGraphiteDecode...
{ "body": "@Test\n\tpublic void testParseAndInsert() throws IOException {\n\t\tList<Tag> tags = Arrays.asList(Tag.newBuilder().setTagKey(\"app\").setTagValue(\"1\").build(),\n\t\t\t\tTag.newBuilder().setTagKey(\"server\").setTagValue(\"1\").build(),\n\t\t\t\tTag.newBuilder().setTagKey(\"s\").setTagValue(\"jvm\").buil...
{ "fields": [ { "declarator": "BAD_TAG_EXCEPTION = new RejectException(\"Bad tag\")", "modifier": "private static final", "original_string": "private static final RejectException BAD_TAG_EXCEPTION = new RejectException(\"Bad tag\");", "type": "RejectException", "var_name": "BAD_TAG_E...
{ "body": "public static void parseAndInsertDataPoints(String dbName, String line, StorageEngine storageEngine)\n\t\t\tthrows IOException {\n\t\tString[] parts = line.split(\"\\\\s+\");\n\t\tif (parts.length != 3) {\n\t\t\t// invalid data point\n\t\t\tlogger.fine(\"Ignoring bad metric:\" + line);\n\t\t\treturn;\n\t\t...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_28
{ "fields": [], "file": "core/src/test/java/com/srotya/sidewinder/core/utils/TestInfluxDecoder.java", "identifier": "TestInfluxDecoder", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testIdenticalWriteMultipoints() {\n\t\tString testPoints = \"cpu,host=server01,region=uswest value=1i 1434055562000000000\\ncpu,host=server01,region=uswest value=1i 1434055562000000000\\ncpu,host=server01,region=uswest value=1i 1434055562000000000\";\n\t\tList<Point> dps = InfluxDecode...
{ "fields": [ { "declarator": "TAG = Splitter.on('=')", "modifier": "private static final", "original_string": "private static final Splitter TAG = Splitter.on('=');", "type": "Splitter", "var_name": "TAG" }, { "declarator": "SPACE = Splitter.on(Pattern.compile(\"\\\\s+...
{ "body": "public static List<Point> pointsFromString(String dbName, String payload) {\n\t\tList<Point> dps = new ArrayList<>();\n\t\ttry {\n\t\t\tIterable<String> splits = lineFromPayLoad(payload);\n\t\t\tfor (String split : splits) {\n\t\t\t\tBuilder builder = pointFromLine(Point.newBuilder(), dbName, split);\n\t\t...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
79304189_12
{ "fields": [ { "declarator": "bgTasks", "modifier": "public static", "original_string": "public static ScheduledExecutorService bgTasks;", "type": "ScheduledExecutorService", "var_name": "bgTasks" }, { "declarator": "conf = new HashMap<>()", "modifier": "private"...
{ "body": "@Test\n\tpublic void testGetMeasurementsLike() throws Exception {\n\t\tStorageEngine engine = new MemStorageEngine();\n\t\tengine.configure(conf, bgTasks);\n\t\tengine.writeDataPointWithLock(MiscUtils.buildDataPoint(\"test\", \"cpu\", Arrays.asList(\"value\"),\n\t\t\t\tArrays.asList(Tag.newBuilder().setTag...
{ "fields": [ { "declarator": "logger = Logger.getLogger(MemStorageEngine.class.getName())", "modifier": "private static final", "original_string": "private static final Logger logger = Logger.getLogger(MemStorageEngine.class.getName());", "type": "Logger", "var_name": "logger" }...
{ "body": "@Override\n\tpublic void configure(Map<String, String> conf, ScheduledExecutorService bgTaskPool) throws IOException {\n\t\tthis.conf = conf;\n\t\tthis.bgTaskPool = bgTaskPool;\n\t\tthis.defaultRetentionHours = Integer\n\t\t\t\t.parseInt(conf.getOrDefault(RETENTION_HOURS, String.valueOf(DEFAULT_RETENTION_H...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 79304189, "size": 3818, "stargazer_count": 20, "stars": null, "updates": null, "url": "https://github.com/srotya/sidewinder" }
1867246_18
{ "fields": [ { "declarator": "context", "modifier": "", "original_string": "ApplicationContext context;", "type": "ApplicationContext", "var_name": "context" }, { "declarator": "profile", "modifier": "", "original_string": "WebSSOProfile profile;", "t...
{ "body": "@Test(expected = SAMLException.class)\n public void testNoSPNameSet() throws Exception {\n samlContext.setLocalEntityId(null);\n samlContext.setLocalEntityMetadata(null);\n samlContext.setLocalEntityRole(null);\n samlContext.setLocalEntityRoleMetadata(null);\n replyMoc...
{ "fields": [], "file": "spring-security-saml/saml2-core/src/main/java/org/springframework/security/saml/websso/WebSSOProfileImpl.java", "identifier": "WebSSOProfileImpl", "interfaces": "implements WebSSOProfile", "methods": [ { "class_method_signature": "WebSSOProfileImpl.WebSSOProfileImpl()", ...
{ "body": "public void sendAuthenticationRequest(SAMLMessageContext context, WebSSOProfileOptions options, SAMLMessageStorage messageStorage) throws SAMLException, MetadataProviderException, MessageEncodingException {\n\n // Verify we deal with a local SP\n if (!SPSSODescriptor.DEFAULT_ELEMENT_NAME.equa...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_59
{ "fields": [ { "declarator": "context", "modifier": "", "original_string": "ApplicationContext context;", "type": "ApplicationContext", "var_name": "context" }, { "declarator": "processingFiler", "modifier": "", "original_string": "SAMLProcessingFilter proc...
{ "body": "@Test(expected = SAMLRuntimeException.class)\n public void testErrorDuringProcessing() throws Exception {\n expect(request.getContextPath()).andReturn(\"/saml\");\n expect(processor.retrieveMessage((SAMLMessageContext) notNull())).andThrow(new SAMLException(\"Processing error\"));\n ...
{ "fields": [ { "declarator": "processor", "modifier": "protected", "original_string": "protected SAMLProcessor processor;", "type": "SAMLProcessor", "var_name": "processor" }, { "declarator": "contextProvider", "modifier": "protected", "original_string": "p...
{ "body": "public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException {\n\n try {\n\n SAMLMessageContext context = contextProvider.getLocalEntity(request, response);\n logger.debug(\"Attempting SAML2 authentication\...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_22
{ "fields": [ { "declarator": "context", "modifier": "", "original_string": "ApplicationContext context;", "type": "ApplicationContext", "var_name": "context" }, { "declarator": "profile", "modifier": "", "original_string": "WebSSOProfile profile;", "t...
{ "body": "@Test\n public void testPOSTSigned() throws Exception {\n options.setIdp(null);\n options.setBinding(\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\");\n storage.storeMessage((String) notNull(), (XMLObject) notNull());\n replyMock();\n profile.sendAuthenticationReque...
{ "fields": [], "file": "spring-security-saml/saml2-core/src/main/java/org/springframework/security/saml/websso/WebSSOProfileImpl.java", "identifier": "WebSSOProfileImpl", "interfaces": "implements WebSSOProfile", "methods": [ { "class_method_signature": "WebSSOProfileImpl.WebSSOProfileImpl()", ...
{ "body": "public void sendAuthenticationRequest(SAMLMessageContext context, WebSSOProfileOptions options, SAMLMessageStorage messageStorage) throws SAMLException, MetadataProviderException, MessageEncodingException {\n\n // Verify we deal with a local SP\n if (!SPSSODescriptor.DEFAULT_ELEMENT_NAME.equa...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_63
{ "fields": [ { "declarator": "provider", "modifier": "private", "original_string": "private KerberosServiceAuthenticationProvider provider;", "type": "KerberosServiceAuthenticationProvider", "var_name": "provider" }, { "declarator": "ticketValidator", "modifier":...
{ "body": "@Test(expected=UsernameNotFoundException.class)\n public void testUsernameNotFound() throws Exception {\n // stubbing\n when(ticketValidator.validateTicket(TEST_TOKEN)).thenReturn(TEST_USER);\n when(userDetailsService.loadUserByUsername(TEST_USER)).thenThrow(new UsernameNotFoundExce...
{ "fields": [ { "declarator": "LOG = LogFactory.getLog(KerberosServiceAuthenticationProvider.class)", "modifier": "private static final", "original_string": "private static final Log LOG = LogFactory.getLog(KerberosServiceAuthenticationProvider.class);", "type": "Log", "var_name": "L...
{ "body": "@Override\n public Authentication authenticate(Authentication authentication)\n throws AuthenticationException {\n KerberosServiceRequestToken auth = (KerberosServiceRequestToken) authentication;\n byte[] token = auth.getToken();\n LOG.debug(\"Try to validate Kerberos Tok...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_34
{ "fields": [ { "declarator": "request", "modifier": "", "original_string": "HttpServletRequest request;", "type": "HttpServletRequest", "var_name": "request" }, { "declarator": "response", "modifier": "", "original_string": "HttpServletResponse response;", ...
{ "body": "@Test\n public void testPopulateLocalEntityNoAlias() throws Exception {\n expect(request.getContextPath()).andReturn(\"/SSO\");\n replayMock();\n SAMLMessageContext context = contextProvider.getLocalEntity(request, response);\n assertEquals(metadata.getHostedSPName(), context...
{ "fields": [ { "declarator": "encryptedKeyResolver = new ChainingEncryptedKeyResolver()", "modifier": "private static", "original_string": "private static ChainingEncryptedKeyResolver encryptedKeyResolver = new ChainingEncryptedKeyResolver();", "type": "ChainingEncryptedKeyResolver", ...
{ "body": "public SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response) throws MetadataProviderException {\n\n SAMLMessageContext context = new SAMLMessageContext();\n populateEntityId(context, request.getContextPath());\n populateContext(request, response, c...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_43
{ "fields": [ { "declarator": "assertionObject", "modifier": "", "original_string": "SAMLObject<Assertion> assertionObject;", "type": "SAMLObject<Assertion>", "var_name": "assertionObject" }, { "declarator": "assertion", "modifier": "", "original_string": "A...
{ "body": "@Test\n public void testGetInnerObject() {\n assertEquals(assertion, assertionObject.getObject());\n }", "class_method_signature": "SAMLObjectTest.testGetInnerObject()", "constructor": false, "full_signature": "@Test public void testGetInnerObject()", "identifier": "testGetInnerObject"...
{ "fields": [], "file": "spring-security-saml/saml2-core/src/main/java/org/springframework/security/saml/parser/SAMLObject.java", "identifier": "SAMLObject", "interfaces": "", "methods": [ { "class_method_signature": "SAMLObject.SAMLObject(T object)", "constructor": true, "full_signature...
{ "body": "@Override\n public T getObject() {\n if (object == null) { // Lazy parse\n parse();\n }\n return super.getObject();\n }", "class_method_signature": "SAMLObject.getObject()", "constructor": false, "full_signature": "@Override public T getObject()", "identifier":...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_6
{ "fields": [ { "declarator": "consumer", "modifier": "", "original_string": "WebSSOProfileConsumer consumer;", "type": "WebSSOProfileConsumer", "var_name": "consumer" }, { "declarator": "provider", "modifier": "", "original_string": "SAMLAuthenticationProvi...
{ "body": "@Test(expected = AuthenticationServiceException.class)\n public void testAuthenticateException() throws Exception {\n SAMLMessageContext context = new SAMLMessageContext();\n\n SAMLAuthenticationToken token = new SAMLAuthenticationToken(context, messageStorage);\n SAMLMessageStorage...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(SAMLAuthenticationProvider.class)", "modifier": "private final static", "original_string": "private final static Logger log = LoggerFactory.getLogger(SAMLAuthenticationProvider.class);", "type": "Logger", "var_name": "log" ...
{ "body": "public Authentication authenticate(Authentication authentication) throws AuthenticationException {\n\n if (!supports(authentication.getClass())) {\n throw new IllegalArgumentException(\"Only SAMLAuthenticationToken is supported, \" + authentication.getClass() + \" was attempted\");\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_14
{ "fields": [ { "declarator": "context", "modifier": "", "original_string": "ApplicationContext context;", "type": "ApplicationContext", "var_name": "context" }, { "declarator": "profile", "modifier": "", "original_string": "WebSSOProfileConsumerImpl profile...
{ "body": "@Test\n public void testDefaultAuthNStatementPasses() throws Exception {\n AuthnStatement statement = helper.getValidAuthStatement();\n profile.verifyAuthenticationStatement(statement, null, messageContext);\n }", "class_method_signature": "WebSSOProfileConsumerImplTest.testDefaultAut...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(WebSSOProfileConsumerImpl.class)", "modifier": "private final static", "original_string": "private final static Logger log = LoggerFactory.getLogger(WebSSOProfileConsumerImpl.class);", "type": "Logger", "var_name": "log" ...
{ "body": "protected void verifyAuthenticationStatement(AuthnStatement auth, RequestedAuthnContext requestedAuthnContext, SAMLMessageContext context) throws AuthenticationException {\n\n // Validate that user wasn't authenticated too long time ago\n if (!isDateTimeSkewValid(getMaxAuthenticationAge(), au...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_55
{ "fields": [ { "declarator": "context", "modifier": "private", "original_string": "private ApplicationContext context;", "type": "ApplicationContext", "var_name": "context" }, { "declarator": "keyManager", "modifier": "private", "original_string": "private ...
{ "body": "@Test\n public void testGetKeyNonExistent() {\n assertNull(keyManager.getPublicKey(\"apollo111\"));\n }", "class_method_signature": "JKSKeyManagerTest.testGetKeyNonExistent()", "constructor": false, "full_signature": "@Test public void testGetKeyNonExistent()", "identifier": "testGetKe...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(JKSKeyManager.class)", "modifier": "private final", "original_string": "private final Logger log = LoggerFactory.getLogger(JKSKeyManager.class);", "type": "Logger", "var_name": "log" }, { "declarator": "creden...
{ "body": "public PublicKey getPublicKey(String alias) {\n X509Certificate x509Certificate = getCertificate(alias);\n if (x509Certificate != null) {\n return x509Certificate.getPublicKey();\n } else {\n return null;\n }\n }", "class_method_signature": "JKSKeyMana...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_38
{ "fields": [ { "declarator": "request", "modifier": "", "original_string": "HttpServletRequest request;", "type": "HttpServletRequest", "var_name": "request" }, { "declarator": "response", "modifier": "", "original_string": "HttpServletResponse response;", ...
{ "body": "@Test(expected = MetadataProviderException.class)\n public void testPopulateLocalEntityAliasInvalidRole() throws Exception {\n expect(request.getContextPath()).andReturn(\"/SSO/alias/myAlias/idp\");\n replayMock();\n contextProvider.getLocalEntity(request, response);\n }", "cla...
{ "fields": [ { "declarator": "encryptedKeyResolver = new ChainingEncryptedKeyResolver()", "modifier": "private static", "original_string": "private static ChainingEncryptedKeyResolver encryptedKeyResolver = new ChainingEncryptedKeyResolver();", "type": "ChainingEncryptedKeyResolver", ...
{ "body": "public SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response) throws MetadataProviderException {\n\n SAMLMessageContext context = new SAMLMessageContext();\n populateEntityId(context, request.getContextPath());\n populateContext(request, response, c...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_39
{ "fields": [ { "declarator": "request", "modifier": "", "original_string": "HttpServletRequest request;", "type": "HttpServletRequest", "var_name": "request" }, { "declarator": "response", "modifier": "", "original_string": "HttpServletResponse response;", ...
{ "body": "@Test\n public void testPopulateLocalEntityAliasIDPRole() throws Exception {\n expect(request.getContextPath()).andReturn(\"/SSO/alias/myIdpAlias/iDp\");\n replayMock();\n SAMLMessageContext context = contextProvider.getLocalEntity(request, response);\n assertEquals(\"http://...
{ "fields": [ { "declarator": "encryptedKeyResolver = new ChainingEncryptedKeyResolver()", "modifier": "private static", "original_string": "private static ChainingEncryptedKeyResolver encryptedKeyResolver = new ChainingEncryptedKeyResolver();", "type": "ChainingEncryptedKeyResolver", ...
{ "body": "public SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response) throws MetadataProviderException {\n\n SAMLMessageContext context = new SAMLMessageContext();\n populateEntityId(context, request.getContextPath());\n populateContext(request, response, c...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_54
{ "fields": [ { "declarator": "context", "modifier": "private", "original_string": "private ApplicationContext context;", "type": "ApplicationContext", "var_name": "context" }, { "declarator": "keyManager", "modifier": "private", "original_string": "private ...
{ "body": "@Test\n public void testGetEmptyKey() {\n assertNull(keyManager.getPublicKey(\"\"));\n assertNull(keyManager.getPublicKey(null));\n }", "class_method_signature": "JKSKeyManagerTest.testGetEmptyKey()", "constructor": false, "full_signature": "@Test public void testGetEmptyKey()", ...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(JKSKeyManager.class)", "modifier": "private final", "original_string": "private final Logger log = LoggerFactory.getLogger(JKSKeyManager.class);", "type": "Logger", "var_name": "log" }, { "declarator": "creden...
{ "body": "public PublicKey getPublicKey(String alias) {\n X509Certificate x509Certificate = getCertificate(alias);\n if (x509Certificate != null) {\n return x509Certificate.getPublicKey();\n } else {\n return null;\n }\n }", "class_method_signature": "JKSKeyMana...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_15
{ "fields": [ { "declarator": "context", "modifier": "", "original_string": "ApplicationContext context;", "type": "ApplicationContext", "var_name": "context" }, { "declarator": "profile", "modifier": "", "original_string": "WebSSOProfileConsumerImpl profile...
{ "body": "@Test(expected = CredentialsExpiredException.class)\n public void testAuthNStatementWithExpiredSessionTime() throws Exception {\n AuthnStatement statement = helper.getValidAuthStatement();\n DateTime past = new DateTime();\n past.minusHours(3);\n statement.setSessionNotOnOrAf...
{ "fields": [ { "declarator": "log = LoggerFactory.getLogger(WebSSOProfileConsumerImpl.class)", "modifier": "private final static", "original_string": "private final static Logger log = LoggerFactory.getLogger(WebSSOProfileConsumerImpl.class);", "type": "Logger", "var_name": "log" ...
{ "body": "protected void verifyAuthenticationStatement(AuthnStatement auth, RequestedAuthnContext requestedAuthnContext, SAMLMessageContext context) throws AuthenticationException {\n\n // Validate that user wasn't authenticated too long time ago\n if (!isDateTimeSkewValid(getMaxAuthenticationAge(), au...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_7
{ "fields": [ { "declarator": "context", "modifier": "", "original_string": "ApplicationContext context;", "type": "ApplicationContext", "var_name": "context" }, { "declarator": "entryPoint", "modifier": "", "original_string": "SAMLEntryPoint entryPoint;", ...
{ "body": "@Test\n public void testInitial() {\n assertNull(entryPoint.getIdpSelectionPath());\n assertEquals(ssoProfile, entryPoint.webSSOprofile);\n assertEquals(\"/saml/login\", entryPoint.filterProcessesUrl);\n }", "class_method_signature": "SAMLEntryPointTest.testInitial()", "const...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(SAMLEntryPoint.class)", "modifier": "protected final static", "original_string": "protected final static Logger logger = LoggerFactory.getLogger(SAMLEntryPoint.class);", "type": "Logger", "var_name": "logger" }, ...
{ "body": "public String getIdpSelectionPath() {\n return idpSelectionPath;\n }", "class_method_signature": "SAMLEntryPoint.getIdpSelectionPath()", "constructor": false, "full_signature": "public String getIdpSelectionPath()", "identifier": "getIdpSelectionPath", "invocations": [], "modifiers": ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_42
{ "fields": [ { "declarator": "request", "modifier": "", "original_string": "HttpServletRequest request;", "type": "HttpServletRequest", "var_name": "request" }, { "declarator": "response", "modifier": "", "original_string": "HttpServletResponse response;", ...
{ "body": "@Test(expected = MetadataProviderException.class)\n public void testPopulateCredentialLocalEntity_invalidName() throws Exception {\n replayMock();\n SAMLCredential credential = getCredential(null);\n contextProvider.getLocalEntity(request, response, credential);\n }", "class_me...
{ "fields": [ { "declarator": "encryptedKeyResolver = new ChainingEncryptedKeyResolver()", "modifier": "private static", "original_string": "private static ChainingEncryptedKeyResolver encryptedKeyResolver = new ChainingEncryptedKeyResolver();", "type": "ChainingEncryptedKeyResolver", ...
{ "body": "public SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response) throws MetadataProviderException {\n\n SAMLMessageContext context = new SAMLMessageContext();\n populateEntityId(context, request.getContextPath());\n populateContext(request, response, c...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_35
{ "fields": [ { "declarator": "request", "modifier": "", "original_string": "HttpServletRequest request;", "type": "HttpServletRequest", "var_name": "request" }, { "declarator": "response", "modifier": "", "original_string": "HttpServletResponse response;", ...
{ "body": "@Test\n public void testPopulateLocalEntityAliasNoRole() throws Exception {\n expect(request.getContextPath()).andReturn(\"/SSO/alias/myAlias\");\n replayMock();\n SAMLMessageContext context = contextProvider.getLocalEntity(request, response);\n assertEquals(\"testSP2\", cont...
{ "fields": [ { "declarator": "encryptedKeyResolver = new ChainingEncryptedKeyResolver()", "modifier": "private static", "original_string": "private static ChainingEncryptedKeyResolver encryptedKeyResolver = new ChainingEncryptedKeyResolver();", "type": "ChainingEncryptedKeyResolver", ...
{ "body": "public SAMLMessageContext getLocalEntity(HttpServletRequest request, HttpServletResponse response) throws MetadataProviderException {\n\n SAMLMessageContext context = new SAMLMessageContext();\n populateEntityId(context, request.getContextPath());\n populateContext(request, response, c...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_62
{ "fields": [ { "declarator": "provider", "modifier": "private", "original_string": "private ActiveDirectoryAuthenticationProvider provider;", "type": "ActiveDirectoryAuthenticationProvider", "var_name": "provider" }, { "declarator": "userDetailsService", "modifie...
{ "body": "@Test\n public void testLoginOk() throws Exception {\n when(userDetailsService.loadUserByUsername(TEST_USER)).thenReturn(USER_DETAILS);\n when(ticketValidator.validateTicket(TOKEN)).thenReturn(TEST_USER);\n when(securityIntegration.getUserGroupSids(TOKEN)).thenReturn(GROUP_SIDS);\n ...
{ "fields": [ { "declarator": "ticketValidator", "modifier": "private", "original_string": "private KerberosTicketValidator ticketValidator;", "type": "KerberosTicketValidator", "var_name": "ticketValidator" }, { "declarator": "userDetailsService", "modifier": "pr...
{ "body": "@Override\n public Authentication authenticate(Authentication authentication) throws AuthenticationException {\n KerberosServiceRequestToken auth = (KerberosServiceRequestToken) authentication;\n byte[] token = auth.getToken();\n\n LOG.debug(\"Try to validate Kerberos Token\");\n ...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }
1867246_23
{ "fields": [ { "declarator": "context", "modifier": "", "original_string": "ApplicationContext context;", "type": "ApplicationContext", "var_name": "context" }, { "declarator": "profile", "modifier": "", "original_string": "WebSSOProfile profile;", "t...
{ "body": "@Test\n public void testSentCorrectly() throws Exception {\n\n // Although we set redirect binding, the server only supports POST, so it will be used\n options.setBinding(\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\");\n\n storage.storeMessage((String) notNull(), (XMLObject...
{ "fields": [], "file": "spring-security-saml/saml2-core/src/main/java/org/springframework/security/saml/websso/WebSSOProfileImpl.java", "identifier": "WebSSOProfileImpl", "interfaces": "implements WebSSOProfile", "methods": [ { "class_method_signature": "WebSSOProfileImpl.WebSSOProfileImpl()", ...
{ "body": "public void sendAuthenticationRequest(SAMLMessageContext context, WebSSOProfileOptions options, SAMLMessageStorage messageStorage) throws SAMLException, MetadataProviderException, MessageEncodingException {\n\n // Verify we deal with a local SP\n if (!SPSSODescriptor.DEFAULT_ELEMENT_NAME.equa...
{ "created": null, "fork": null, "fork_count": 7, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 1867246, "size": 1407, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/grantcermak/Spring-Security-Kerberos-with-ActiveDirectory" }