id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
95752629_206
{ "fields": [ { "declarator": "mojo", "modifier": "@Mock\n private", "original_string": "@Mock\n private AbstractWebAppMojo mojo;", "type": "AbstractWebAppMojo", "var_name": "mojo" }, { "declarator": "handler = null", "modifier": "private", "original_s...
{ "body": "@Test(expected = AzureExecutionException.class)\n public void createDeploymentSlotFromOtherDeploymentSlotThrowException() throws AzureExecutionException {\n final WebApp app = mock(WebApp.class);\n\n handler.createDeploymentSlot(app, \"\", \"otherSlot\");\n }", "class_method_signature...
{ "fields": [ { "declarator": "INVALID_SLOT_SETTINGS = \"No <deploymentSlot> is specified in pom.xml. \" +\n \"Please configure it for slot deployment.\"", "modifier": "private static final", "original_string": "private static final String INVALID_SLOT_SETTINGS = \"No <deploymentSlot> is ...
{ "body": "protected void createDeploymentSlot(final WebApp app, final String slotName,\n final String configurationSource) throws AzureExecutionException {\n assureValidSlotName(slotName);\n final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentS...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_94
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/AppSettingsTest.java", "identifier": "AppSettingsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetAppName() {\n final AppSettings app = new AppSettings();\n app.setAppName(\"appName1\");\n assertEquals(\"appName1\", app.getAppName());\n }", "class_method_signature": "AppSettingsTest.testSetAppName()", "constructor": false, "full_signature": "@...
{ "fields": [ { "declarator": "subscriptionId", "modifier": "private", "original_string": "private String subscriptionId;", "type": "String", "var_name": "subscriptionId" }, { "declarator": "clusterName", "modifier": "private", "original_string": "private St...
{ "body": "public void setAppName(String appName) {\n this.appName = appName;\n }", "class_method_signature": "AppSettings.setAppName(String appName)", "constructor": false, "full_signature": "public void setAppName(String appName)", "identifier": "setAppName", "invocations": [], "modifiers": "p...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_82
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/SpringConfigurationTest.java", "identifier": "SpringConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWithAppName() {\n final SpringConfiguration config = new SpringConfiguration();\n config.withAppName(\"appName1\");\n assertEquals(\"appName1\", config.getAppName());\n }", "class_method_signature": "SpringConfigurationTest.testWithAppName()", "constru...
{ "fields": [ { "declarator": "isPublic", "modifier": "private", "original_string": "private Boolean isPublic;", "type": "Boolean", "var_name": "isPublic" }, { "declarator": "subscriptionId", "modifier": "private", "original_string": "private String subscrip...
{ "body": "public SpringConfiguration withAppName(String appName) {\n this.appName = appName;\n return this;\n }", "class_method_signature": "SpringConfiguration.withAppName(String appName)", "constructor": false, "full_signature": "public SpringConfiguration withAppName(String appName)", "id...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_210
{ "fields": [ { "declarator": "config", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebAppConfiguration config;", "type": "WebAppConfiguration", "var_name": "config" }, { "declarator": "azureClient", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void updateAppRuntimeTestV2() throws Exception {\n final WebApp app = mock(WebApp.class);\n final SiteInner siteInner = mock(SiteInner.class);\n doReturn(siteInner).when(app).inner();\n doReturn(\"app,linux\").when(siteInner).kind();\n final WebApp.Updat...
{ "fields": [], "file": "azure-webapp-maven-plugin/src/main/java/com/microsoft/azure/maven/webapp/handlers/runtime/LinuxRuntimeHandlerImpl.java", "identifier": "LinuxRuntimeHandlerImpl", "interfaces": "", "methods": [ { "class_method_signature": "LinuxRuntimeHandlerImpl.LinuxRuntimeHandlerImpl(final...
{ "body": "@Override\n public Update updateAppRuntime(WebApp app) throws AzureExecutionException {\n WebAppUtils.assureLinuxWebApp(app);\n return app.update().withBuiltInImage(runtime);\n }", "class_method_signature": "LinuxRuntimeHandlerImpl.updateAppRuntime(WebApp app)", "constructor": false...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_139
{ "fields": [ { "declarator": "reader = mock(BufferedReader.class)", "modifier": "private final", "original_string": "private final BufferedReader reader = mock(BufferedReader.class);", "type": "BufferedReader", "var_name": "reader" }, { "declarator": "prompter = new De...
{ "body": "@Test\n public void testPromoteYesNo() throws Exception {\n when(reader.readLine()).thenReturn(\"Y\").thenReturn(\"y\").thenReturn(\"n\");\n Boolean result = prompter.promoteYesNo(\"Do you want to continue(y/n)\", null, true);\n assertNotNull(result);\n assertTrue(result);\n\...
{ "fields": [ { "declarator": "EMPTY_REPLACEMENT = \":\"", "modifier": "private static final", "original_string": "private static final String EMPTY_REPLACEMENT = \":\";", "type": "String", "var_name": "EMPTY_REPLACEMENT" }, { "declarator": "REGEX_COMMA_SEPARATED_INTEGE...
{ "body": "public Boolean promoteYesNo(String message, Boolean defaultValue, boolean isRequired) throws IOException {\n final boolean hasDefaultValue = defaultValue != null;\n System.out.print(message);\n System.out.flush();\n\n return loopInput(defaultValue, hasDefaultValue, isRequired, \...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_247
{ "fields": [ { "declarator": "mojo", "modifier": "@Mock", "original_string": "@Mock\n AbstractWebAppMojo mojo;", "type": "AbstractWebAppMojo", "var_name": "mojo" }, { "declarator": "project", "modifier": "private", "original_string": "private MavenProjec...
{ "body": "@Test\n public void getDeploymentSlotHandler() throws AzureExecutionException {\n final HandlerFactory factory = new HandlerFactoryImpl();\n\n final DeploymentSlotHandler handler = factory.getDeploymentSlotHandler(mojo);\n assertNotNull(handler);\n assertTrue(handler instance...
{ "fields": [ { "declarator": "UNKNOWN_DEPLOYMENT_TYPE =\n \"The value of <deploymentType> is unknown, supported values are: jar, war, zip, ftp, auto and none.\"", "modifier": "public static final", "original_string": "public static final String UNKNOWN_DEPLOYMENT_TYPE =\n \"The va...
{ "body": "@Override\n public DeploymentSlotHandler getDeploymentSlotHandler(AbstractWebAppMojo mojo) {\n return new DeploymentSlotHandler(mojo);\n }", "class_method_signature": "HandlerFactoryImpl.getDeploymentSlotHandler(AbstractWebAppMojo mojo)", "constructor": false, "full_signature": "@Overrid...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_181
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/function/utils/CommandUtilsTest.java", "identifier": "CommandUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void isWindows() {\n assertEquals(SystemUtils.IS_OS_WINDOWS, CommandUtils.isWindows());\n }", "class_method_signature": "CommandUtilsTest.isWindows()", "constructor": false, "full_signature": "@Test public void isWindows()", "identifier": "isWindows", "invocations": [ ...
{ "fields": [], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/function/utils/CommandUtils.java", "identifier": "CommandUtils", "interfaces": "", "methods": [ { "class_method_signature": "CommandUtils.isWindows()", "constructor": false, "full_signature": "public sta...
{ "body": "public static boolean isWindows() {\n return SystemUtils.IS_OS_WINDOWS;\n }", "class_method_signature": "CommandUtils.isWindows()", "constructor": false, "full_signature": "public static boolean isWindows()", "identifier": "isWindows", "invocations": [], "modifiers": "public static", ...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_31
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/configuration/AuthConfigurationTest.java", "identifier": "AuthConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetClient() {\n final AuthConfiguration auth = new AuthConfiguration();\n auth.setClient(\"client1\");\n assertEquals(\"client1\", auth.getClient());\n }", "class_method_signature": "AuthConfigurationTest.testSetClient()", "constructor": false, "full...
{ "fields": [ { "declarator": "client", "modifier": "private", "original_string": "private String client;", "type": "String", "var_name": "client" }, { "declarator": "tenant", "modifier": "private", "original_string": "private String tenant;", "type": ...
{ "body": "public void setClient(String client) {\n this.client = client;\n }", "class_method_signature": "AuthConfiguration.setClient(String client)", "constructor": false, "full_signature": "public void setClient(String client)", "identifier": "setClient", "invocations": [], "modifiers": "publ...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_165
{ "fields": [ { "declarator": "handler", "modifier": "private", "original_string": "private MSDeployArtifactHandlerImpl handler;", "type": "MSDeployArtifactHandlerImpl", "var_name": "handler" }, { "declarator": "handlerSpy", "modifier": "private", "original_...
{ "body": "@Test\n public void createZipPackage() throws Exception {\n buildHandler();\n final File zipPackage = handlerSpy.createZipPackage();\n\n assertTrue(zipPackage.exists());\n }", "class_method_signature": "MSDeployArtifactHandlerImplTest.createZipPackage()", "constructor": false...
{ "fields": [ { "declarator": "DEPLOYMENT_PACKAGE_CONTAINER = \"java-functions-deployment-packages\"", "modifier": "public static final", "original_string": "public static final String DEPLOYMENT_PACKAGE_CONTAINER = \"java-functions-deployment-packages\";", "type": "String", "var_nam...
{ "body": "protected File createZipPackage() throws AzureExecutionException {\n Log.prompt(\"\");\n Log.prompt(CREATE_ZIP_START);\n final File zipPackage = FunctionArtifactHelper.createFunctionArtifact(stagingDirectoryPath);\n Log.prompt(CREATE_ZIP_DONE + stagingDirectoryPath.concat(Consta...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_89
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/DeploymentTest.java", "identifier": "DeploymentTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWithJvmOptions() {\n final Deployment deploy = new Deployment();\n deploy.withJvmOptions(\"jvmOptions1\");\n assertEquals(\"jvmOptions1\", deploy.getJvmOptions());\n }", "class_method_signature": "DeploymentTest.testWithJvmOptions()", "constructor": fa...
{ "fields": [ { "declarator": "cpu", "modifier": "private", "original_string": "private Integer cpu;", "type": "Integer", "var_name": "cpu" }, { "declarator": "memoryInGB", "modifier": "private", "original_string": "private Integer memoryInGB;", "type"...
{ "body": "public Deployment withJvmOptions(String jvmOptions) {\n this.jvmOptions = jvmOptions;\n return this;\n }", "class_method_signature": "Deployment.withJvmOptions(String jvmOptions)", "constructor": false, "full_signature": "public Deployment withJvmOptions(String jvmOptions)", "ident...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_66
{ "fields": [ { "declarator": "tempDirectory", "modifier": "private", "original_string": "private File tempDirectory;", "type": "File", "var_name": "tempDirectory" } ], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureAuthHelperTest.java", "identifier"...
{ "body": "@Test\n public void testWriteAzureCredentialsBadParameter() throws Exception {\n final File tempFile = File.createTempFile(\"azure-auth-helper-test\", \".json\");\n try {\n AzureAuthHelper.writeAzureCredentials(null, tempFile);\n fail(\"Should throw IAE here.\");\n ...
{ "fields": [ { "declarator": "UNKNOWN = \"UNKNOWN\"", "modifier": "private static final", "original_string": "private static final String UNKNOWN = \"UNKNOWN\";", "type": "String", "var_name": "UNKNOWN" }, { "declarator": "AUTH_ORDER = {AuthType.SERVICE_PRINCIPAL, Auth...
{ "body": "public static void writeAzureCredentials(AzureCredential cred, File file) throws IOException {\n if (cred == null) {\n throw new IllegalArgumentException(\"Parameter 'cred' cannot be null.\");\n }\n if (file == null) {\n throw new IllegalArgumentException(\"Parame...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_132
{ "fields": [ { "declarator": "builder = new ArtifactHandlerBase.Builder() {\n @Override\n protected ArtifactHandlerBase.Builder self() {\n return this;\n }\n\n @Override\n public ArtifactHandlerBase build() {\n return new ArtifactHandlerBase(builder)...
{ "body": "@Test\n public void assureStagingDirectoryNotEmpty() throws AzureExecutionException {\n buildHandler();\n doNothing().when(handlerSpy).assureStagingDirectoryNotEmpty();\n\n handlerSpy.assureStagingDirectoryNotEmpty();\n\n verify(handlerSpy, times(1)).assureStagingDirectoryNot...
{ "fields": [ { "declarator": "DEPLOY_START = \"Trying to deploy artifact to %s...\"", "modifier": "protected static final", "original_string": "protected static final String DEPLOY_START = \"Trying to deploy artifact to %s...\";", "type": "String", "var_name": "DEPLOY_START" }, ...
{ "body": "protected void assureStagingDirectoryNotEmpty() throws AzureExecutionException {\n final File stagingDirectory = new File(stagingDirectoryPath);\n final File[] files = stagingDirectory.listFiles();\n if (!stagingDirectory.exists() || !stagingDirectory.isDirectory() || files == null || ...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_70
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/VolumeTest.java", "identifier": "VolumeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWithPath() {\n final Volume volume = new Volume();\n volume.withPath(\"/home/shared\");\n assertEquals(\"/home/shared\", volume.getPath());\n }", "class_method_signature": "VolumeTest.testWithPath()", "constructor": false, "full_signature": "@Test pu...
{ "fields": [ { "declarator": "path", "modifier": "private", "original_string": "private String path;", "type": "String", "var_name": "path" }, { "declarator": "size", "modifier": "private", "original_string": "private String size;", "type": "String", ...
{ "body": "public Volume withPath(String path) {\n this.path = path;\n return this;\n }", "class_method_signature": "Volume.withPath(String path)", "constructor": false, "full_signature": "public Volume withPath(String path)", "identifier": "withPath", "invocations": [], "modifiers": "pub...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_124
{ "fields": [ { "declarator": "validator", "modifier": "private", "original_string": "private SchemaValidator validator;", "type": "SchemaValidator", "var_name": "validator" } ], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/validation/SchemaValidatorTe...
{ "body": "@Test\n public void testDuplicateAdd() throws IOException {\n try {\n this.validator.collectSingleProperty(\"Deployment\", \"cpu\", Mockito.mock(JsonNode.class));\n fail(\"should throw IAE\");\n } catch (IllegalArgumentException ex) {\n //expected\n ...
{ "fields": [ { "declarator": "schemaMap = new HashMap<>()", "modifier": "private", "original_string": "private Map<String, Map<String, Object>> schemaMap = new HashMap<>();", "type": "Map<String, Map<String, Object>>", "var_name": "schemaMap" }, { "declarator": "schema...
{ "body": "public void collectSingleProperty(String resource, String property, JsonNode schema) throws JsonProcessingException {\n Preconditions.checkArgument(StringUtils.isNotBlank(resource), \"Parameter 'resource' should not be null or empty.\");\n Preconditions.checkArgument(StringUtils.isNotBlank(pr...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_9
{ "fields": [], "file": "azure-functions-maven-plugin/src/test/java/com/microsoft/azure/maven/function/RunMojoTest.java", "identifier": "RunMojoTest", "interfaces": "", "superclass": "extends MojoTestBase" }
{ "body": "@Test(expected = AzureExecutionException.class)\n public void checkStageDirectoryExistenceWhenIsNotDirectory() throws Exception {\n final RunMojo mojo = getMojoFromPom();\n final RunMojo mojoSpy = spy(mojo);\n\n doReturn(\"./RunMojoTest.java\").when(mojoSpy).getDeploymentStagingDire...
{ "fields": [ { "declarator": "FUNC_CMD = \"func\"", "modifier": "protected static final", "original_string": "protected static final String FUNC_CMD = \"func\";", "type": "String", "var_name": "FUNC_CMD" }, { "declarator": "FUNC_HOST_START_CMD = \"func host start\"", ...
{ "body": "protected void checkStageDirectoryExistence() throws AzureExecutionException {\n final File file = new File(getDeploymentStagingDirectoryPath());\n if (!file.exists() || !file.isDirectory()) {\n throw new AzureExecutionException(STAGE_DIR_NOT_FOUND);\n }\n Log.info(ST...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_27
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureServicePrincipleAuthHelperTest.java", "identifier": "AzureServicePrincipleAuthHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetSPCredentialsNoSubscription() throws Exception {\n final File testConfigDir = new File(this.getClass().getResource(\"/azure-cli/no-subscription/azureProfile.json\").getFile()).getParentFile();\n TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, tes...
{ "fields": [ { "declarator": "AZURE_CLI_GET_SUBSCRIPTION_FAIL = \"Failed to get default subscription of Azure CLI, please login Azure CLI first.\"", "modifier": "private static final", "original_string": "private static final String AZURE_CLI_GET_SUBSCRIPTION_FAIL = \"Failed to get default subs...
{ "body": "static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException {\n final JsonObject subscription = getDefaultSubscriptionObject();\n final String servicePrincipalName = subscription == null ? null : subscription.get(\"user\").get...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_173
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/function/handlers/artifact/FunctionArtifactHelperTest.java", "identifier": "FunctionArtifactHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateFunctionArtifactWithException() {\n String exceptionMessage = null;\n try {\n FunctionArtifactHelper.createFunctionArtifact(\"\");\n } catch (Exception e) {\n exceptionMessage = e.getMessage();\n } finally {\n ass...
{ "fields": [ { "declarator": "STAGE_DIR_NOT_FOUND = \"Azure Functions stage directory not found. \" +\n \"Please run 'mvn clean azure-functions:package' first.\"", "modifier": "private static final", "original_string": "private static final String STAGE_DIR_NOT_FOUND = \"Azure Functi...
{ "body": "public static File createFunctionArtifact(final String stagingDirectoryPath) throws AzureExecutionException {\n final File stageDirectory = new File(stagingDirectoryPath);\n final File zipPackage = new File(stagingDirectoryPath.concat(Constants.ZIP_EXT));\n\n if (!stageDirectory.exists...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_221
{ "fields": [ { "declarator": "config", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebAppConfiguration config;", "type": "WebAppConfiguration", "var_name": "config" }, { "declarator": "azureClient", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void updateAppRuntimeV1() throws Exception {\n final WebApp app = mock(WebApp.class);\n final SiteInner siteInner = mock(SiteInner.class);\n doReturn(\"app,linux\").when(siteInner).kind();\n doReturn(siteInner).when(app).inner();\n final Update update = ...
{ "fields": [ { "declarator": "dockerCredentialProvider", "modifier": "protected", "original_string": "protected IDockerCredentialProvider dockerCredentialProvider;", "type": "IDockerCredentialProvider", "var_name": "dockerCredentialProvider" } ], "file": "azure-webapp-maven-...
{ "body": "@Override\n public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException {\n WebAppUtils.assureLinuxWebApp(app);\n\n return app.update()\n .withPrivateDockerHubImage(image)\n .withCredentials(dockerCredentialProvider.getUsername(), dockerCred...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_108
{ "fields": [ { "declarator": "propertiesNode", "modifier": "private", "original_string": "private Element propertiesNode;", "type": "Element", "var_name": "propertiesNode" } ], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/utils/XmlU...
{ "body": "@Test\n public void testTrimTextBeforeEnd() {\n XmlUtils.removeAllNamespaces(propertiesNode);\n XmlUtils.addDomWithKeyValue(propertiesNode, \"foo\", \"bar\");\n\n final Namespace ns = propertiesNode.getNamespace();\n final Element fooNode = propertiesNode.element(new QName(\"...
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/main/java/com/microsoft/azure/maven/spring/utils/XmlUtils.java", "identifier": "XmlUtils", "interfaces": "", "methods": [ { "class_method_signature": "XmlUtils.getChildValue(Element element, String attribute)", "constructor": false, ...
{ "body": "public static void trimTextBeforeEnd(Element parent, Node target) {\n final List<Node> children = parent.content();\n final int index = children.indexOf(target);\n int pos = index - 1;\n while (pos >= 0 && children.get(pos).getNodeType() == Node.TEXT_NODE) {\n final N...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_260
{ "fields": [ { "declarator": "mojo", "modifier": "@Mock\n protected", "original_string": "@Mock\n protected AbstractWebAppMojo mojo;", "type": "AbstractWebAppMojo", "var_name": "mojo" }, { "declarator": "parser", "modifier": "protected", "original_str...
{ "body": "@Test\n public void getResources() {\n doReturn(null).when(mojo).getDeployment();\n assertNull(parser.getResources());\n\n final List<Resource> resources = new ArrayList<Resource>();\n resources.add(new Resource());\n final Deployment deployment = mock(Deployment.class...
{ "fields": [], "file": "azure-webapp-maven-plugin/src/main/java/com/microsoft/azure/maven/webapp/parser/V2ConfigurationParser.java", "identifier": "V2ConfigurationParser", "interfaces": "", "methods": [ { "class_method_signature": "V2ConfigurationParser.V2ConfigurationParser(AbstractWebAppMojo mojo...
{ "body": "@Override\n protected List<Resource> getResources() {\n final Deployment deployment = mojo.getDeployment();\n return deployment == null ? null : deployment.getResources();\n }", "class_method_signature": "V2ConfigurationParser.getResources()", "constructor": false, "full_signature...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_149
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/utils/TextUtilsTest.java", "identifier": "TextUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRed() {\n System.out.println(\"This is a \" + TextUtils.red(\"red\") + \" text.\");\n assertEquals(\"1b5b33316d611b5b6d\", Hex.encodeHexString(TextUtils.red(\"a\").getBytes()));\n }", "class_method_signature": "TextUtilsTest.testRed()", "constructor": false, ...
{ "fields": [], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/utils/TextUtils.java", "identifier": "TextUtils", "interfaces": "", "methods": [ { "class_method_signature": "TextUtils.applyColorToText(String text, Color colorCode)", "constructor": false, "full_signat...
{ "body": "public static String red(String message) {\n return applyColorToText(message, Color.RED);\n }", "class_method_signature": "TextUtils.red(String message)", "constructor": false, "full_signature": "public static String red(String message)", "identifier": "red", "invocations": [ "apply...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_237
{ "fields": [ { "declarator": "mojo", "modifier": "@Mock\n private", "original_string": "@Mock\n private AbstractWebAppMojo mojo;", "type": "AbstractWebAppMojo", "var_name": "mojo" }, { "declarator": "handler", "modifier": "private", "original_string":...
{ "body": "@Test\n public void prepareDeploymentFiles() throws IOException {\n\n }", "class_method_signature": "JarArtifactHandlerImplTest.prepareDeploymentFiles()", "constructor": false, "full_signature": "@Test public void prepareDeploymentFiles()", "identifier": "prepareDeploymentFiles", "invocatio...
{ "fields": [ { "declarator": "jarFile", "modifier": "private", "original_string": "private String jarFile;", "type": "String", "var_name": "jarFile" }, { "declarator": "FILE_IS_NOT_JAR = \"The deployment file is not a jar typed file.\"", "modifier": "public stati...
{ "body": "protected void prepareDeploymentFiles(File jar) throws IOException {\n final File parent = new File(stagingDirectoryPath);\n parent.mkdirs();\n Files.copy(jar, new File(parent, DEFAULT_APP_SERVICE_JAR_NAME));\n }", "class_method_signature": "JarArtifactHandlerImpl.prepareDeploymen...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_186
{ "fields": [ { "declarator": "ftpUploader = null", "modifier": "private", "original_string": "private FTPUploader ftpUploader = null;", "type": "FTPUploader", "var_name": "ftpUploader" } ], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/FTPUploaderTest....
{ "body": "@Test\n public void getFTPClient() throws Exception {\n Exception caughtException = null;\n try {\n ftpUploader.getFTPClient(\"fakeFTPServer\", \"username\", \"password\");\n } catch (Exception e) {\n caughtException = e;\n } finally {\n asser...
{ "fields": [ { "declarator": "UPLOAD_START = \"Uploading files to FTP server: \"", "modifier": "public static final", "original_string": "public static final String UPLOAD_START = \"Uploading files to FTP server: \";", "type": "String", "var_name": "UPLOAD_START" }, { ...
{ "body": "protected FTPClient getFTPClient(final String ftpServer, final String username, final String password)\n throws IOException {\n final FTPClient ftpClient = new FTPClient();\n ftpClient.connect(ftpServer);\n ftpClient.login(username, password);\n ftpClient.setFileType(...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_169
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/function/handlers/artifact/FunctionArtifactHelperTest.java", "identifier": "FunctionArtifactHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetCloudStorageAccount() throws Exception {\n final String storageConnection =\n \"DefaultEndpointsProtocol=https;AccountName=123456;AccountKey=12345678;EndpointSuffix=core.windows.net\";\n final Map mapSettings = mock(Map.class);\n final Deplo...
{ "fields": [ { "declarator": "STAGE_DIR_NOT_FOUND = \"Azure Functions stage directory not found. \" +\n \"Please run 'mvn clean azure-functions:package' first.\"", "modifier": "private static final", "original_string": "private static final String STAGE_DIR_NOT_FOUND = \"Azure Functi...
{ "body": "public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException {\n final Map<String, AppSetting> settingsMap = target.getAppSettings();\n\n if (settingsMap != null) {\n final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_K...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_240
{ "fields": [ { "declarator": "mojo", "modifier": "@Mock\n private", "original_string": "@Mock\n private AbstractWebAppMojo mojo;", "type": "AbstractWebAppMojo", "var_name": "mojo" }, { "declarator": "handler", "modifier": "private", "original_string":...
{ "body": "@Test(expected = AzureExecutionException.class)\n public void assureJarFileExistedWhenFileNotExist() throws AzureExecutionException {\n buildHandler();\n final File fileMock = mock(File.class);\n\n doReturn(\"test.jar\").when(fileMock).getName();\n doReturn(false).when(fileMo...
{ "fields": [ { "declarator": "jarFile", "modifier": "private", "original_string": "private String jarFile;", "type": "String", "var_name": "jarFile" }, { "declarator": "FILE_IS_NOT_JAR = \"The deployment file is not a jar typed file.\"", "modifier": "public stati...
{ "body": "protected void assureJarFileExisted(File jar) throws AzureExecutionException {\n if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase(\"jar\")) {\n throw new AzureExecutionException(FILE_IS_NOT_JAR);\n }\n\n if (!jar.exists() || !jar.isFile()) {\n throw new...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_217
{ "fields": [ { "declarator": "config", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebAppConfiguration config;", "type": "WebAppConfiguration", "var_name": "config" }, { "declarator": "azureClient", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void updateAppRuntimeV1() throws Exception {\n final SiteInner siteInner = mock(SiteInner.class);\n doReturn(\"app,linux\").when(siteInner).kind();\n final WithCredentials withCredentials = mock(WithCredentials.class);\n final Update update = mock(Update.class)...
{ "fields": [ { "declarator": "dockerCredentialProvider", "modifier": "protected", "original_string": "protected IDockerCredentialProvider dockerCredentialProvider;", "type": "IDockerCredentialProvider", "var_name": "dockerCredentialProvider" } ], "file": "azure-webapp-maven-...
{ "body": "@Override\n public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException {\n WebAppUtils.assureLinuxWebApp(app);\n\n return app.update()\n .withPrivateRegistryImage(image, registryUrl)\n .withCredentials(dockerCredentialProvider.getUsername()...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_85
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/DeploymentTest.java", "identifier": "DeploymentTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWithCpu() {\n final Deployment deploy = new Deployment();\n deploy.withCpu(1);\n assertEquals(1, (int) deploy.getCpu());\n }", "class_method_signature": "DeploymentTest.testWithCpu()", "constructor": false, "full_signature": "@Test public void testWi...
{ "fields": [ { "declarator": "cpu", "modifier": "private", "original_string": "private Integer cpu;", "type": "Integer", "var_name": "cpu" }, { "declarator": "memoryInGB", "modifier": "private", "original_string": "private Integer memoryInGB;", "type"...
{ "body": "public Deployment withCpu(Integer cpu) {\n this.cpu = cpu;\n return this;\n }", "class_method_signature": "Deployment.withCpu(Integer cpu)", "constructor": false, "full_signature": "public Deployment withCpu(Integer cpu)", "identifier": "withCpu", "invocations": [], "modifiers"...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_128
{ "fields": [ { "declarator": "builder = new ZIPArtifactHandlerImpl.Builder()", "modifier": "private", "original_string": "private ZIPArtifactHandlerImpl.Builder builder = new ZIPArtifactHandlerImpl.Builder();", "type": "ZIPArtifactHandlerImpl.Builder", "var_name": "builder" }, ...
{ "body": "@Test\n public void publishThrowResourceNotConfiguredException() throws IOException {\n buildHandler();\n final WebApp app = mock(WebApp.class);\n final DeployTarget target = new DeployTarget(app, DeployTargetType.WEBAPP);\n\n try {\n handlerSpy.publish(target);\n ...
{ "fields": [ { "declarator": "DEFAULT_MAX_RETRY_TIMES = 3", "modifier": "private static final", "original_string": "private static final int DEFAULT_MAX_RETRY_TIMES = 3;", "type": "int", "var_name": "DEFAULT_MAX_RETRY_TIMES" }, { "declarator": "LOCAL_SETTINGS_FILE = \"...
{ "body": "@Override\n public void publish(DeployTarget target) throws AzureExecutionException {\n assureStagingDirectoryNotEmpty();\n\n final File zipFile = getZipFile();\n Log.prompt(String.format(DEPLOY_START, target.getName()));\n\n // Add retry logic here to avoid Kudu's socket tim...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_93
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/AppSettingsTest.java", "identifier": "AppSettingsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetClusterName() {\n final AppSettings app = new AppSettings();\n app.setClusterName(\"clusterName1\");\n assertEquals(\"clusterName1\", app.getClusterName());\n }", "class_method_signature": "AppSettingsTest.testSetClusterName()", "constructor": false...
{ "fields": [ { "declarator": "subscriptionId", "modifier": "private", "original_string": "private String subscriptionId;", "type": "String", "var_name": "subscriptionId" }, { "declarator": "clusterName", "modifier": "private", "original_string": "private St...
{ "body": "public void setClusterName(String clusterName) {\n this.clusterName = clusterName;\n }", "class_method_signature": "AppSettings.setClusterName(String clusterName)", "constructor": false, "full_signature": "public void setClusterName(String clusterName)", "identifier": "setClusterName", ...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_201
{ "fields": [ { "declarator": "PLUGIN_NAME = \"azure-maven-plugin-lib\"", "modifier": "public static final", "original_string": "public static final String PLUGIN_NAME = \"azure-maven-plugin-lib\";", "type": "String", "var_name": "PLUGIN_NAME" }, { "declarator": "PLUGIN...
{ "body": "@Test\n public void getTelemetryProperties() throws Exception {\n final Map map = mojo.getTelemetryProperties();\n\n assertEquals(5, map.size());\n assertTrue(map.containsKey(INSTALLATION_ID_KEY));\n assertTrue(map.containsKey(PLUGIN_NAME_KEY));\n assertTrue(map.contai...
{ "fields": [ { "declarator": "PLUGIN_NAME_KEY = \"pluginName\"", "modifier": "public static final", "original_string": "public static final String PLUGIN_NAME_KEY = \"pluginName\";", "type": "String", "var_name": "PLUGIN_NAME_KEY" }, { "declarator": "PLUGIN_VERSION_KEY...
{ "body": "@Override\n public Map<String, String> getTelemetryProperties() {\n final Map<String, String> map = new HashMap<>();\n map.put(INSTALLATION_ID_KEY, getInstallationId());\n map.put(PLUGIN_NAME_KEY, getPluginName());\n map.put(PLUGIN_VERSION_KEY, getPluginVersion());\n m...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_190
{ "fields": [ { "declarator": "PLUGIN_NAME = \"azure-maven-plugin-lib\"", "modifier": "public static final", "original_string": "public static final String PLUGIN_NAME = \"azure-maven-plugin-lib\";", "type": "String", "var_name": "PLUGIN_NAME" }, { "declarator": "PLUGIN...
{ "body": "@Test\n public void getSession() throws Exception {\n assertEquals(session, mojo.getSession());\n }", "class_method_signature": "AbstractAzureMojoTest.getSession()", "constructor": false, "full_signature": "@Test public void getSession()", "identifier": "getSession", "invocations": [...
{ "fields": [ { "declarator": "PLUGIN_NAME_KEY = \"pluginName\"", "modifier": "public static final", "original_string": "public static final String PLUGIN_NAME_KEY = \"pluginName\";", "type": "String", "var_name": "PLUGIN_NAME_KEY" }, { "declarator": "PLUGIN_VERSION_KEY...
{ "body": "public MavenSession getSession() {\n return session;\n }", "class_method_signature": "AbstractAzureMojo.getSession()", "constructor": false, "full_signature": "public MavenSession getSession()", "identifier": "getSession", "invocations": [], "modifiers": "public", "parameters": "()"...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_256
{ "fields": [ { "declarator": "mojo", "modifier": "@Mock\n protected", "original_string": "@Mock\n protected AbstractWebAppMojo mojo;", "type": "AbstractWebAppMojo", "var_name": "mojo" }, { "declarator": "parser", "modifier": "protected", "original_str...
{ "body": "@Test\n public void getServerId() {\n assertNull(parser.getServerId());\n\n final RuntimeSetting runtime = mock(RuntimeSetting.class);\n doReturn(runtime).when(mojo).getRuntime();\n doReturn(\"serverId\").when(runtime).getServerId();\n assertEquals(\"serverId\", parser...
{ "fields": [], "file": "azure-webapp-maven-plugin/src/main/java/com/microsoft/azure/maven/webapp/parser/V2ConfigurationParser.java", "identifier": "V2ConfigurationParser", "interfaces": "", "methods": [ { "class_method_signature": "V2ConfigurationParser.V2ConfigurationParser(AbstractWebAppMojo mojo...
{ "body": "@Override\n protected String getServerId() {\n final RuntimeSetting runtime = mojo.getRuntime();\n if (runtime == null) {\n return null;\n }\n return runtime.getServerId();\n }", "class_method_signature": "V2ConfigurationParser.getServerId()", "constructor":...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_5
{ "fields": [], "file": "azure-functions-maven-plugin/src/test/java/com/microsoft/azure/maven/function/AddMojoTest.java", "identifier": "AddMojoTest", "interfaces": "", "superclass": "extends MojoTestBase" }
{ "body": "@Test\n public void assureInputFromUser() throws Exception {\n final AddMojo mojo = getMojoFromPom();\n final AddMojo mojoSpy = spy(mojo);\n final Scanner scanner = mock(Scanner.class);\n doReturn(\"2\").when(scanner).nextLine();\n doReturn(scanner).when(mojoSpy).getSc...
{ "fields": [ { "declarator": "LOAD_TEMPLATES = \"Step 1 of 4: Load all function templates\"", "modifier": "private static final", "original_string": "private static final String LOAD_TEMPLATES = \"Step 1 of 4: Load all function templates\";", "type": "String", "var_name": "LOAD_TEMP...
{ "body": "protected void assureInputFromUser(final String prompt, final String initValue, final List<String> options,\n final Consumer<String> setter) {\n final String option = findElementInOptions(options, initValue);\n if (option != null) {\n Log.info(...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_104
{ "fields": [ { "declarator": "wrapper", "modifier": "private", "original_string": "private PromptWrapper wrapper;", "type": "PromptWrapper", "var_name": "wrapper" }, { "declarator": "reader", "modifier": "private", "original_string": "private BufferedReader...
{ "body": "@Test\n public void testClose() throws Exception {\n final IPrompter prompt = mock(IPrompter.class);\n Mockito.doThrow(IOException.class).when(prompt).close();\n FieldUtils.writeField(wrapper, \"prompt\", prompt, true);\n try {\n wrapper.close();\n fail(...
{ "fields": [ { "declarator": "expressionEvaluator", "modifier": "private", "original_string": "private ExpressionEvaluator expressionEvaluator;", "type": "ExpressionEvaluator", "var_name": "expressionEvaluator" }, { "declarator": "prompt", "modifier": "private", ...
{ "body": "public void close() throws IOException {\n this.prompt.close();\n }", "class_method_signature": "PromptWrapper.close()", "constructor": false, "full_signature": "public void close()", "identifier": "close", "invocations": [ "close" ], "modifiers": "public", "parameters": "()",...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_50
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureLoginHelperTest.java", "identifier": "AzureLoginHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAuthorizationUrl() throws Exception {\n String url = AzureLoginHelper.authorizationUrl(AzureEnvironment.AZURE, \"http://localhost:4663\");\n Map<String, String> queryMap = splitQuery(url);\n assertEquals(Constants.CLIENT_ID, queryMap.get(\"client_id\"));\n ...
{ "fields": [ { "declarator": "AZURE_ENVIRONMENT_MAP = new HashMap<>()", "modifier": "private static final", "original_string": "private static final Map<AzureEnvironment, String> AZURE_ENVIRONMENT_MAP = new HashMap<>();", "type": "Map<AzureEnvironment, String>", "var_name": "AZURE_E...
{ "body": "static String authorizationUrl(AzureEnvironment env, String redirectUrl) throws URISyntaxException, MalformedURLException {\n if (env == null) {\n throw new IllegalArgumentException(\"Parameter 'env' cannot be null.\");\n }\n if (StringUtils.isBlank(redirectUrl)) {\n ...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_153
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/utils/TextUtilsTest.java", "identifier": "TextUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSplitLines() {\n final String[] lines = TextUtils.splitLines(\"foo \\n bar \\n baz\");\n assertEquals(3, lines.length);\n assertEquals(\"foo \", lines[0]);\n assertEquals(\" bar \", lines[1]);\n assertEquals(\" baz\", lines[2]);\n }", "clas...
{ "fields": [], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/utils/TextUtils.java", "identifier": "TextUtils", "interfaces": "", "methods": [ { "class_method_signature": "TextUtils.applyColorToText(String text, Color colorCode)", "constructor": false, "full_signat...
{ "body": "public static String[] splitLines(String text) {\n Preconditions.checkNotNull(text, \"The parameter 'text' cannot be null\");\n return text.split(\"\\\\r?\\\\n\");\n }", "class_method_signature": "TextUtils.splitLines(String text)", "constructor": false, "full_signature": "public sta...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_145
{ "fields": [ { "declarator": "reader = mock(BufferedReader.class)", "modifier": "private final", "original_string": "private final BufferedReader reader = mock(BufferedReader.class);", "type": "BufferedReader", "var_name": "reader" }, { "declarator": "prompter = new De...
{ "body": "@Test\n public void testPromoteMultipleEntitiesSelectNone() throws Exception {\n when(reader.readLine()).thenReturn(\"\");\n List<Integer> selected = prompter.promoteMultipleEntities(\"This is header\", \"Please input range\",\n \"You have select no entities\", Collections.s...
{ "fields": [ { "declarator": "EMPTY_REPLACEMENT = \":\"", "modifier": "private static final", "original_string": "private static final String EMPTY_REPLACEMENT = \":\";", "type": "String", "var_name": "EMPTY_REPLACEMENT" }, { "declarator": "REGEX_COMMA_SEPARATED_INTEGE...
{ "body": "public <T> List<T> promoteMultipleEntities(String header, String promotePrefix, String selectNoneMessage, List<T> entities,\n Function<T, String> getNameFunc, boolean allowEmpty, String enterPromote, List<T> defaultValue) throws IOException {\n final boolean hasDefaultValue = defaultValue...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_11
{ "fields": [], "file": "azure-functions-maven-plugin/src/test/java/com/microsoft/azure/maven/function/RunMojoTest.java", "identifier": "RunMojoTest", "interfaces": "", "superclass": "extends MojoTestBase" }
{ "body": "@Test\n public void checkRuntimeExistence() throws Exception {\n final RunMojo mojo = getMojoFromPom();\n final CommandHandler commandHandlerMock = mock(CommandHandlerImpl.class);\n mojo.checkRuntimeExistence(commandHandlerMock);\n\n verify(commandHandlerMock, times(1))\n ...
{ "fields": [ { "declarator": "FUNC_CMD = \"func\"", "modifier": "protected static final", "original_string": "protected static final String FUNC_CMD = \"func\";", "type": "String", "var_name": "FUNC_CMD" }, { "declarator": "FUNC_HOST_START_CMD = \"func host start\"", ...
{ "body": "protected void checkRuntimeExistence(final CommandHandler handler) throws AzureExecutionException {\n handler.runCommandWithReturnCodeCheck(\n getCheckRuntimeCommand(),\n false, /* showStdout */\n null, /* workingDirectory */\n CommandUtils...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_112
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/utils/TemplateUtilsTest.java", "identifier": "TemplateUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEvalPlainText() {\n final Map<String, Object> map = new HashMap<>();\n map.put(\"foo\", Collections.singletonMap(\"bar\", \"true\"));\n assertEquals(\"true\", evalPlainText(\"foo.bar\", map));\n\n map.put(\"foo\", Collections.singletonMap(\"bar\", true...
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/main/java/com/microsoft/azure/maven/spring/utils/TemplateUtils.java", "identifier": "TemplateUtils", "interfaces": "", "methods": [ { "class_method_signature": "TemplateUtils.evalBoolean(String expr, Map<String, Object> variableMap)", ...
{ "body": "public static String evalPlainText(String expr, Map<String, Object> variableMap) {\n String text = expr.contains(\".\") ? evalInline(expr, variableMap) :\n Objects.toString(variableMap.get(expr), null);\n int evalCount = 0;\n while (text != null && text.contains(\"{{\"))...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_46
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureLoginHelperTest.java", "identifier": "AzureLoginHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOauthWithBrowser() throws Exception {\n PowerMockito.mockStatic(Desktop.class);\n final URI uri = new URI(\"http://0.0.0.0\");\n final Desktop mockDesktop = mock(Desktop.class);\n PowerMockito.doNothing().when(mockDesktop).browse(uri);\n PowerMo...
{ "fields": [ { "declarator": "AZURE_ENVIRONMENT_MAP = new HashMap<>()", "modifier": "private static final", "original_string": "private static final Map<AzureEnvironment, String> AZURE_ENVIRONMENT_MAP = new HashMap<>();", "type": "Map<AzureEnvironment, String>", "var_name": "AZURE_E...
{ "body": "static AzureCredential oAuthLogin(AzureEnvironment env)\n throws AzureLoginFailureException, ExecutionException, DesktopNotSupportedException, InterruptedException {\n if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {\n throw new D...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_47
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureLoginHelperTest.java", "identifier": "AzureLoginHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOAuthLoginNoBrowser() throws Exception {\n PowerMockito.mockStatic(Desktop.class);\n PowerMockito.when(Desktop.isDesktopSupported()).thenReturn(false);\n // we cannot test oauth when desktop is not supported\n try {\n AzureLoginHelper.oAuthL...
{ "fields": [ { "declarator": "AZURE_ENVIRONMENT_MAP = new HashMap<>()", "modifier": "private static final", "original_string": "private static final Map<AzureEnvironment, String> AZURE_ENVIRONMENT_MAP = new HashMap<>();", "type": "Map<AzureEnvironment, String>", "var_name": "AZURE_E...
{ "body": "static AzureCredential oAuthLogin(AzureEnvironment env)\n throws AzureLoginFailureException, ExecutionException, DesktopNotSupportedException, InterruptedException {\n if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {\n throw new D...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_113
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/utils/TemplateUtilsTest.java", "identifier": "TemplateUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEvalPlainTextVariable() {\n final Map<String, Object> map = new HashMap<>();\n map.put(\"foo\", \"{{bar}}\");\n map.put(\"bar\", \"hello world\");\n assertEquals(\"hello world\", evalPlainText(\"foo\", map));\n }", "class_method_signature": "Templ...
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/main/java/com/microsoft/azure/maven/spring/utils/TemplateUtils.java", "identifier": "TemplateUtils", "interfaces": "", "methods": [ { "class_method_signature": "TemplateUtils.evalBoolean(String expr, Map<String, Object> variableMap)", ...
{ "body": "public static String evalPlainText(String expr, Map<String, Object> variableMap) {\n String text = expr.contains(\".\") ? evalInline(expr, variableMap) :\n Objects.toString(variableMap.get(expr), null);\n int evalCount = 0;\n while (text != null && text.contains(\"{{\"))...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_10
{ "fields": [], "file": "azure-functions-maven-plugin/src/test/java/com/microsoft/azure/maven/function/RunMojoTest.java", "identifier": "RunMojoTest", "interfaces": "", "superclass": "extends MojoTestBase" }
{ "body": "@Test(expected = AzureExecutionException.class)\n public void checkStageDirectoryExistenceWhenNotExisting() throws Exception {\n final RunMojo mojo = getMojoFromPom();\n final RunMojo mojoSpy = spy(mojo);\n\n doReturn(\"./NotExistFile\").when(mojoSpy).getDeploymentStagingDirectoryPa...
{ "fields": [ { "declarator": "FUNC_CMD = \"func\"", "modifier": "protected static final", "original_string": "protected static final String FUNC_CMD = \"func\";", "type": "String", "var_name": "FUNC_CMD" }, { "declarator": "FUNC_HOST_START_CMD = \"func host start\"", ...
{ "body": "protected void checkStageDirectoryExistence() throws AzureExecutionException {\n final File file = new File(getDeploymentStagingDirectoryPath());\n if (!file.exists() || !file.isDirectory()) {\n throw new AzureExecutionException(STAGE_DIR_NOT_FOUND);\n }\n Log.info(ST...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_144
{ "fields": [ { "declarator": "reader = mock(BufferedReader.class)", "modifier": "private final", "original_string": "private final BufferedReader reader = mock(BufferedReader.class);", "type": "BufferedReader", "var_name": "reader" }, { "declarator": "prompter = new De...
{ "body": "@Test\n public void testPromoteMultipleEntitiesNotAllowEmptyNoDefaultValue() throws Exception {\n when(reader.readLine()).thenReturn(\"1000-11111\").thenReturn(\"10001111111111111111111111111\").thenReturn(\"2\");;\n final List<Integer> selected = prompter.promoteMultipleEntities(\"This is...
{ "fields": [ { "declarator": "EMPTY_REPLACEMENT = \":\"", "modifier": "private static final", "original_string": "private static final String EMPTY_REPLACEMENT = \":\";", "type": "String", "var_name": "EMPTY_REPLACEMENT" }, { "declarator": "REGEX_COMMA_SEPARATED_INTEGE...
{ "body": "public <T> List<T> promoteMultipleEntities(String header, String promotePrefix, String selectNoneMessage, List<T> entities,\n Function<T, String> getNameFunc, boolean allowEmpty, String enterPromote, List<T> defaultValue) throws IOException {\n final boolean hasDefaultValue = defaultValue...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_152
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/utils/TextUtilsTest.java", "identifier": "TextUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testApplyColorToText() {\n System.out.println(\"This is a \" + TextUtils.applyColorToText(\"magenta\", Color.MAGENTA) + \" text.\");\n assertEquals(\"1b5b33356d611b5b6d\", Hex.encodeHexString(TextUtils.applyColorToText(\"a\", Color.MAGENTA).getBytes()));\n assert...
{ "fields": [], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/utils/TextUtils.java", "identifier": "TextUtils", "interfaces": "", "methods": [ { "class_method_signature": "TextUtils.applyColorToText(String text, Color colorCode)", "constructor": false, "full_signat...
{ "body": "public static String applyColorToText(String text, Color colorCode) {\n if (StringUtils.isBlank(text)) {\n return text;\n }\n return Ansi.ansi().fg(colorCode).a(text).reset().toString();\n }", "class_method_signature": "TextUtils.applyColorToText(String text, Color colo...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_51
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureLoginHelperTest.java", "identifier": "AzureLoginHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void tesAuthorizationUrlInvalidParameter() throws Exception {\n try {\n AzureLoginHelper.authorizationUrl(null, \"http://localhost:4663\");\n fail(\"Should throw IAE when env is null.\");\n } catch (IllegalArgumentException e) {\n // ignore\n...
{ "fields": [ { "declarator": "AZURE_ENVIRONMENT_MAP = new HashMap<>()", "modifier": "private static final", "original_string": "private static final Map<AzureEnvironment, String> AZURE_ENVIRONMENT_MAP = new HashMap<>();", "type": "Map<AzureEnvironment, String>", "var_name": "AZURE_E...
{ "body": "static String authorizationUrl(AzureEnvironment env, String redirectUrl) throws URISyntaxException, MalformedURLException {\n if (env == null) {\n throw new IllegalArgumentException(\"Parameter 'env' cannot be null.\");\n }\n if (StringUtils.isBlank(redirectUrl)) {\n ...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_105
{ "fields": [ { "declarator": "propertiesNode", "modifier": "private", "original_string": "private Element propertiesNode;", "type": "Element", "var_name": "propertiesNode" } ], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/utils/XmlU...
{ "body": "@Test\n public void testPrettyPrintElementNoNamespace() throws Exception {\n final String[] lines = TextUtils.splitLines(XmlUtils.prettyPrintElementNoNamespace(propertiesNode));\n assertEquals(5, lines.length);\n assertEquals(\"<properties>\", lines[0]);\n assertEquals(\" ...
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/main/java/com/microsoft/azure/maven/spring/utils/XmlUtils.java", "identifier": "XmlUtils", "interfaces": "", "methods": [ { "class_method_signature": "XmlUtils.getChildValue(Element element, String attribute)", "constructor": false, ...
{ "body": "public static String prettyPrintElementNoNamespace(Element node) {\n removeAllNamespaces(node);\n try {\n final StringWriter out = new StringWriter();\n final OutputFormat format = OutputFormat.createPrettyPrint();\n format.setSuppressDeclaration(true);\n ...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_257
{ "fields": [ { "declarator": "mojo", "modifier": "@Mock\n protected", "original_string": "@Mock\n protected AbstractWebAppMojo mojo;", "type": "AbstractWebAppMojo", "var_name": "mojo" }, { "declarator": "parser", "modifier": "protected", "original_str...
{ "body": "@Test\n public void getRegistryUrl() {\n assertNull(parser.getRegistryUrl());\n\n final RuntimeSetting runtime = mock(RuntimeSetting.class);\n doReturn(runtime).when(mojo).getRuntime();\n doReturn(\"serverId\").when(runtime).getRegistryUrl();\n assertEquals(\"serverId\...
{ "fields": [], "file": "azure-webapp-maven-plugin/src/main/java/com/microsoft/azure/maven/webapp/parser/V2ConfigurationParser.java", "identifier": "V2ConfigurationParser", "interfaces": "", "methods": [ { "class_method_signature": "V2ConfigurationParser.V2ConfigurationParser(AbstractWebAppMojo mojo...
{ "body": "@Override\n protected String getRegistryUrl() {\n final RuntimeSetting runtime = mojo.getRuntime();\n if (runtime == null) {\n return null;\n }\n return runtime.getRegistryUrl();\n }", "class_method_signature": "V2ConfigurationParser.getRegistryUrl()", "cons...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_4
{ "fields": [], "file": "azure-functions-maven-plugin/src/test/java/com/microsoft/azure/maven/function/AddMojoTest.java", "identifier": "AddMojoTest", "interfaces": "", "superclass": "extends MojoTestBase" }
{ "body": "@Test\n public void doExecute() throws Exception {\n final AddMojo mojo = getMojoFromPom();\n final Settings settings = new Settings();\n settings.setInteractiveMode(false);\n ReflectionUtils.setVariableValueInObject(mojo, \"basedir\", new File(\"target/test\"));\n Ref...
{ "fields": [ { "declarator": "LOAD_TEMPLATES = \"Step 1 of 4: Load all function templates\"", "modifier": "private static final", "original_string": "private static final String LOAD_TEMPLATES = \"Step 1 of 4: Load all function templates\";", "type": "String", "var_name": "LOAD_TEMP...
{ "body": "@Override\n protected void doExecute() throws AzureExecutionException {\n try {\n final List<FunctionTemplate> templates = loadAllFunctionTemplates();\n\n final FunctionTemplate template = getFunctionTemplate(templates);\n final BindingTemplate bindingTemplate = F...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_191
{ "fields": [ { "declarator": "PLUGIN_NAME = \"azure-maven-plugin-lib\"", "modifier": "public static final", "original_string": "public static final String PLUGIN_NAME = \"azure-maven-plugin-lib\";", "type": "String", "var_name": "PLUGIN_NAME" }, { "declarator": "PLUGIN...
{ "body": "@Test\n public void getMavenResourcesFiltering() throws Exception {\n assertEquals(filtering, mojo.getMavenResourcesFiltering());\n }", "class_method_signature": "AbstractAzureMojoTest.getMavenResourcesFiltering()", "constructor": false, "full_signature": "@Test public void getMavenResou...
{ "fields": [ { "declarator": "PLUGIN_NAME_KEY = \"pluginName\"", "modifier": "public static final", "original_string": "public static final String PLUGIN_NAME_KEY = \"pluginName\";", "type": "String", "var_name": "PLUGIN_NAME_KEY" }, { "declarator": "PLUGIN_VERSION_KEY...
{ "body": "public MavenResourcesFiltering getMavenResourcesFiltering() {\n return mavenResourcesFiltering;\n }", "class_method_signature": "AbstractAzureMojo.getMavenResourcesFiltering()", "constructor": false, "full_signature": "public MavenResourcesFiltering getMavenResourcesFiltering()", "identif...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_92
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/AppSettingsTest.java", "identifier": "AppSettingsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetSubscriptionId() {\n final AppSettings app = new AppSettings();\n app.setSubscriptionId(\"subscriptionId1\");\n assertEquals(\"subscriptionId1\", app.getSubscriptionId());\n }", "class_method_signature": "AppSettingsTest.testSetSubscriptionId()", "c...
{ "fields": [ { "declarator": "subscriptionId", "modifier": "private", "original_string": "private String subscriptionId;", "type": "String", "var_name": "subscriptionId" }, { "declarator": "clusterName", "modifier": "private", "original_string": "private St...
{ "body": "public void setSubscriptionId(String subscriptionId) {\n this.subscriptionId = subscriptionId;\n }", "class_method_signature": "AppSettings.setSubscriptionId(String subscriptionId)", "constructor": false, "full_signature": "public void setSubscriptionId(String subscriptionId)", "identifie...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_200
{ "fields": [ { "declarator": "PLUGIN_NAME = \"azure-maven-plugin-lib\"", "modifier": "public static final", "original_string": "public static final String PLUGIN_NAME = \"azure-maven-plugin-lib\";", "type": "String", "var_name": "PLUGIN_NAME" }, { "declarator": "PLUGIN...
{ "body": "@Test\n public void processException() throws Exception {\n final String message = \"test exception message\";\n String actualMessage = null;\n try {\n mojo.handleException(new Exception(message));\n } catch (Exception e) {\n actualMessage = e.getMessage...
{ "fields": [ { "declarator": "PLUGIN_NAME_KEY = \"pluginName\"", "modifier": "public static final", "original_string": "public static final String PLUGIN_NAME_KEY = \"pluginName\";", "type": "String", "var_name": "PLUGIN_NAME_KEY" }, { "declarator": "PLUGIN_VERSION_KEY...
{ "body": "protected void handleException(final Exception exception) throws MojoExecutionException {\n String message = exception.getMessage();\n if (StringUtils.isEmpty(message)) {\n message = exception.toString();\n }\n trackMojoFailure(message);\n\n if (isFailingOnErro...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_129
{ "fields": [ { "declarator": "builder = new ZIPArtifactHandlerImpl.Builder()", "modifier": "private", "original_string": "private ZIPArtifactHandlerImpl.Builder builder = new ZIPArtifactHandlerImpl.Builder();", "type": "ZIPArtifactHandlerImpl.Builder", "var_name": "builder" }, ...
{ "body": "@Test\n public void getZipFile() {\n final File zipTestDirectory = new File(\"src/test/resources/ziptest\");\n buildHandler();\n assertEquals(zipTestDirectory.getAbsolutePath() + \".zip\", handlerSpy.getZipFile().getAbsolutePath());\n }", "class_method_signature": "ZIPArtifactH...
{ "fields": [ { "declarator": "DEFAULT_MAX_RETRY_TIMES = 3", "modifier": "private static final", "original_string": "private static final int DEFAULT_MAX_RETRY_TIMES = 3;", "type": "int", "var_name": "DEFAULT_MAX_RETRY_TIMES" }, { "declarator": "LOCAL_SETTINGS_FILE = \"...
{ "body": "protected File getZipFile() {\n final File zipFile = new File(stagingDirectoryPath + \".zip\");\n final File stagingDirectory = new File(stagingDirectoryPath);\n\n ZipUtil.pack(stagingDirectory, zipFile);\n ZipUtil.removeEntry(zipFile, LOCAL_SETTINGS_FILE);\n return zipFi...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_216
{ "fields": [ { "declarator": "config", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebAppConfiguration config;", "type": "WebAppConfiguration", "var_name": "config" }, { "declarator": "azureClient", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void updateAppRuntimeV2() throws Exception {\n final SiteInner siteInner = mock(SiteInner.class);\n doReturn(\"app,linux\").when(siteInner).kind();\n final WebApp.UpdateStages.WithCredentials withCredentials = mock(WebApp.UpdateStages.WithCredentials.class);\n ...
{ "fields": [ { "declarator": "dockerCredentialProvider", "modifier": "protected", "original_string": "protected IDockerCredentialProvider dockerCredentialProvider;", "type": "IDockerCredentialProvider", "var_name": "dockerCredentialProvider" } ], "file": "azure-webapp-maven-...
{ "body": "@Override\n public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException {\n WebAppUtils.assureLinuxWebApp(app);\n\n return app.update()\n .withPrivateRegistryImage(image, registryUrl)\n .withCredentials(dockerCredentialProvider.getUsername()...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_84
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/SpringConfigurationTest.java", "identifier": "SpringConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWithDeployment() {\n final SpringConfiguration config = new SpringConfiguration();\n final Deployment deploy = Mockito.mock(Deployment.class);\n config.withDeployment(deploy);\n assertEquals(deploy, config.getDeployment());\n }", "class_method_sig...
{ "fields": [ { "declarator": "isPublic", "modifier": "private", "original_string": "private Boolean isPublic;", "type": "Boolean", "var_name": "isPublic" }, { "declarator": "subscriptionId", "modifier": "private", "original_string": "private String subscrip...
{ "body": "public SpringConfiguration withDeployment(Deployment deployment) {\n this.deployment = deployment;\n return this;\n }", "class_method_signature": "SpringConfiguration.withDeployment(Deployment deployment)", "constructor": false, "full_signature": "public SpringConfiguration withDeplo...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_241
{ "fields": [ { "declarator": "mojo", "modifier": "@Mock\n private", "original_string": "@Mock\n private AbstractWebAppMojo mojo;", "type": "AbstractWebAppMojo", "var_name": "mojo" }, { "declarator": "handler", "modifier": "private", "original_string":...
{ "body": "@Test(expected = AzureExecutionException.class)\n public void assureJarFileExistedWhenIsNotAFile() throws AzureExecutionException {\n final File fileMock = mock(File.class);\n\n doReturn(\"test.jar\").when(fileMock).getName();\n doReturn(false).when(fileMock).exists();\n buil...
{ "fields": [ { "declarator": "jarFile", "modifier": "private", "original_string": "private String jarFile;", "type": "String", "var_name": "jarFile" }, { "declarator": "FILE_IS_NOT_JAR = \"The deployment file is not a jar typed file.\"", "modifier": "public stati...
{ "body": "protected void assureJarFileExisted(File jar) throws AzureExecutionException {\n if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase(\"jar\")) {\n throw new AzureExecutionException(FILE_IS_NOT_JAR);\n }\n\n if (!jar.exists() || !jar.isFile()) {\n throw new...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_187
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/UtilsTest.java", "identifier": "UtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParseOperationSystem() throws Exception {\n assertEquals(OperatingSystemEnum.Windows, Utils.parseOperationSystem(\"windows\"));\n assertEquals(OperatingSystemEnum.Linux, Utils.parseOperationSystem(\"Linux\"));\n assertEquals(OperatingSystemEnum.Docker, Utils....
{ "fields": [ { "declarator": "POM = \"pom\"", "modifier": "private static final", "original_string": "private static final String POM = \"pom\";", "type": "String", "var_name": "POM" }, { "declarator": "JAR = \"jar\"", "modifier": "private static final", "o...
{ "body": "public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException {\n if (StringUtils.isEmpty(os)) {\n throw new AzureExecutionException(\"The value of 'os' is empty, please specify it in 'runtime' configuration.\");\n }\n switch (os.toLo...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_168
{ "fields": [ { "declarator": "handler", "modifier": "private", "original_string": "private MSDeployArtifactHandlerImpl handler;", "type": "MSDeployArtifactHandlerImpl", "var_name": "handler" }, { "declarator": "handlerSpy", "modifier": "private", "original_...
{ "body": "@Test\n public void deletePackageFromAzureStorage() throws Exception {\n final CloudStorageAccount storageAccount = mock(CloudStorageAccount.class);\n final CloudBlobClient blobClient = mock(CloudBlobClient.class);\n doReturn(blobClient).when(storageAccount).createCloudBlobClient();...
{ "fields": [ { "declarator": "DEPLOYMENT_PACKAGE_CONTAINER = \"java-functions-deployment-packages\"", "modifier": "public static final", "original_string": "public static final String DEPLOYMENT_PACKAGE_CONTAINER = \"java-functions-deployment-packages\";", "type": "String", "var_nam...
{ "body": "protected void deletePackageFromAzureStorage(final CloudStorageAccount storageAccount, final String blobName) {\n try {\n Log.prompt(DELETE_PACKAGE_START);\n AzureStorageHelper.deleteBlob(storageAccount, DEPLOYMENT_PACKAGE_CONTAINER, blobName);\n Log.prompt(DELETE_PA...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_236
{ "fields": [ { "declarator": "mojo", "modifier": "@Mock\n private", "original_string": "@Mock\n private AbstractWebAppMojo mojo;", "type": "AbstractWebAppMojo", "var_name": "mojo" }, { "declarator": "handler", "modifier": "private", "original_string":...
{ "body": "@Test\n public void publishToDeploymentSlot() throws Exception {\n final DeploymentSlot slot = mock(DeploymentSlot.class);\n final DeployTarget deployTarget = new DeploymentSlotDeployTarget(slot);\n buildHandler();\n doNothing().when(handlerSpy).publish(deployTarget);\n\n ...
{ "fields": [ { "declarator": "jarFile", "modifier": "private", "original_string": "private String jarFile;", "type": "String", "var_name": "jarFile" }, { "declarator": "FILE_IS_NOT_JAR = \"The deployment file is not a jar typed file.\"", "modifier": "public stati...
{ "body": "@Override\n public void publish(DeployTarget deployTarget) throws AzureExecutionException {\n final File jar = getJarFile();\n assureJarFileExisted(jar);\n\n try {\n prepareDeploymentFiles(jar);\n } catch (IOException e) {\n throw new AzureExecutionExcep...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_148
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/utils/TextUtilsTest.java", "identifier": "TextUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBlue() {\n System.out.println(\"This is a \" + TextUtils.blue(\"blue\") + \" text.\");\n assertEquals(\"1b5b33346d611b5b6d\", Hex.encodeHexString(TextUtils.blue(\"a\").getBytes()));\n }", "class_method_signature": "TextUtilsTest.testBlue()", "constructor": fa...
{ "fields": [], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/utils/TextUtils.java", "identifier": "TextUtils", "interfaces": "", "methods": [ { "class_method_signature": "TextUtils.applyColorToText(String text, Color colorCode)", "constructor": false, "full_signat...
{ "body": "public static String blue(String message) {\n return applyColorToText(message, Color.BLUE);\n }", "class_method_signature": "TextUtils.blue(String message)", "constructor": false, "full_signature": "public static String blue(String message)", "identifier": "blue", "invocations": [ "...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_261
{ "fields": [ { "declarator": "mojo", "modifier": "@Mock\n protected", "original_string": "@Mock\n protected AbstractWebAppMojo mojo;", "type": "AbstractWebAppMojo", "var_name": "mojo" }, { "declarator": "parser", "modifier": "protected", "original_str...
{ "body": "@Test\n public void getWebAppName() throws AzureExecutionException {\n doReturn(\"appName\").when(mojo).getAppName();\n assertEquals(\"appName\", parser.getAppName());\n\n doReturn(\"-invalidAppName\").when(mojo).getAppName();\n try {\n parser.getAppName();\n ...
{ "fields": [ { "declarator": "mojo", "modifier": "protected final", "original_string": "protected final AbstractWebAppMojo mojo;", "type": "AbstractWebAppMojo", "var_name": "mojo" }, { "declarator": "validator", "modifier": "protected final", "original_stri...
{ "body": "protected String getAppName() throws AzureExecutionException {\n validate(validator.validateAppName());\n return mojo.getAppName();\n }", "class_method_signature": "ConfigurationParser.getAppName()", "constructor": false, "full_signature": "protected String getAppName()", "identifi...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_109
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/utils/TemplateUtilsTest.java", "identifier": "TemplateUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEvalBoolean() {\n assertEquals(Boolean.TRUE, evalBoolean(\"foo\", Collections.singletonMap(\"foo\", \"true\")));\n assertEquals(Boolean.TRUE, evalBoolean(\"foo\", Collections.singletonMap(\"foo\", true)));\n assertEquals(Boolean.FALSE, evalBoolean(\"foo\", Co...
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/main/java/com/microsoft/azure/maven/spring/utils/TemplateUtils.java", "identifier": "TemplateUtils", "interfaces": "", "methods": [ { "class_method_signature": "TemplateUtils.evalBoolean(String expr, Map<String, Object> variableMap)", ...
{ "body": "public static Boolean evalBoolean(String expr, Map<String, Object> variableMap) {\n final String text = evalPlainText(expr, variableMap);\n\n if (text == null) {\n return Boolean.FALSE;\n }\n return Boolean.valueOf(text);\n }", "class_method_signature": "Template...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_220
{ "fields": [ { "declarator": "config", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebAppConfiguration config;", "type": "WebAppConfiguration", "var_name": "config" }, { "declarator": "azureClient", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void updateAppRuntimeV2() throws Exception {\n final WebApp app = mock(WebApp.class);\n\n final SiteInner siteInner = mock(SiteInner.class);\n doReturn(siteInner).when(app).inner();\n doReturn(\"app,linux\").when(siteInner).kind();\n\n final WebApp.Updat...
{ "fields": [ { "declarator": "dockerCredentialProvider", "modifier": "protected", "original_string": "protected IDockerCredentialProvider dockerCredentialProvider;", "type": "IDockerCredentialProvider", "var_name": "dockerCredentialProvider" } ], "file": "azure-webapp-maven-...
{ "body": "@Override\n public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException {\n WebAppUtils.assureLinuxWebApp(app);\n\n return app.update()\n .withPrivateDockerHubImage(image)\n .withCredentials(dockerCredentialProvider.getUsername(), dockerCred...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_172
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/function/handlers/artifact/FunctionArtifactHelperTest.java", "identifier": "FunctionArtifactHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUpdateAppSettingWithException() {\n final DeployTarget deployTarget = mock(DeployTarget.class);\n final WebApp webapp = mock(WebApp.class);\n doReturn(webapp).when(deployTarget).getApp();\n final String appSettingKey = \"KEY\";\n final String ap...
{ "fields": [ { "declarator": "STAGE_DIR_NOT_FOUND = \"Azure Functions stage directory not found. \" +\n \"Please run 'mvn clean azure-functions:package' first.\"", "modifier": "private static final", "original_string": "private static final String STAGE_DIR_NOT_FOUND = \"Azure Functi...
{ "body": "public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException {\n final WebAppBase targetApp = deployTarget.getApp();\n if (targetApp instanceof FunctionApp) {\n ((FunctionApp) targetApp).update().withAppSe...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_8
{ "fields": [], "file": "azure-functions-maven-plugin/src/test/java/com/microsoft/azure/maven/function/RunMojoTest.java", "identifier": "RunMojoTest", "interfaces": "", "superclass": "extends MojoTestBase" }
{ "body": "@Test\n public void doExecute() throws Exception {\n final RunMojo mojo = getMojoFromPom();\n final RunMojo mojoSpy = spy(mojo);\n doNothing().when(mojoSpy).checkStageDirectoryExistence();\n doNothing().when(mojoSpy).checkRuntimeExistence(any(CommandHandler.class));\n ...
{ "fields": [ { "declarator": "FUNC_CMD = \"func\"", "modifier": "protected static final", "original_string": "protected static final String FUNC_CMD = \"func\";", "type": "String", "var_name": "FUNC_CMD" }, { "declarator": "FUNC_HOST_START_CMD = \"func host start\"", ...
{ "body": "@Override\n protected void doExecute() throws AzureExecutionException {\n final CommandHandler commandHandler = new CommandHandlerImpl();\n\n checkStageDirectoryExistence();\n\n checkRuntimeExistence(commandHandler);\n\n checkRuntimeCompatibility(commandHandler);\n\n r...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_26
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureServicePrincipleAuthHelperTest.java", "identifier": "AzureServicePrincipleAuthHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetSPCredentials() throws Exception {\n final File testConfigDir = new File(this.getClass().getResource(\"/azure-cli/sp/azureProfile.json\").getFile()).getParentFile();\n TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.getAbsolutePath(...
{ "fields": [ { "declarator": "AZURE_CLI_GET_SUBSCRIPTION_FAIL = \"Failed to get default subscription of Azure CLI, please login Azure CLI first.\"", "modifier": "private static final", "original_string": "private static final String AZURE_CLI_GET_SUBSCRIPTION_FAIL = \"Failed to get default subs...
{ "body": "static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException {\n final JsonObject subscription = getDefaultSubscriptionObject();\n final String servicePrincipalName = subscription == null ? null : subscription.get(\"user\").get...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_125
{ "fields": [ { "declarator": "validator", "modifier": "private", "original_string": "private SchemaValidator validator;", "type": "SchemaValidator", "var_name": "validator" } ], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/validation/SchemaValidatorTe...
{ "body": "@Test\n public void testTypeNotSupported() throws Exception {\n final String err = validator.validateSingleProperty(\"Deployment\", \"testProperties\", \"foo\");\n assertTrue(err.contains(\"Type 'array' is not supported in schema validation.\"));\n }", "class_method_signature": "Schem...
{ "fields": [ { "declarator": "schemaMap = new HashMap<>()", "modifier": "private", "original_string": "private Map<String, Map<String, Object>> schemaMap = new HashMap<>();", "type": "Map<String, Map<String, Object>>", "var_name": "schemaMap" }, { "declarator": "schema...
{ "body": "public String validateSingleProperty(String resource, String property, String value) {\n checkExistSchema(resource, property);\n final JsonNode schema = this.schemas.get(combineToKey(resource, property));\n final String type = (String) schemaMap.get(combineToKey(resource, property)).ge...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_71
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/VolumeTest.java", "identifier": "VolumeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWithSize() {\n final Volume volume = new Volume();\n volume.withSize(\"10G\");\n assertEquals(\"10G\", volume.getSize());\n }", "class_method_signature": "VolumeTest.testWithSize()", "constructor": false, "full_signature": "@Test public void testWith...
{ "fields": [ { "declarator": "path", "modifier": "private", "original_string": "private String path;", "type": "String", "var_name": "path" }, { "declarator": "size", "modifier": "private", "original_string": "private String size;", "type": "String", ...
{ "body": "public Volume withSize(String size) {\n this.size = size;\n return this;\n }", "class_method_signature": "Volume.withSize(String size)", "constructor": false, "full_signature": "public Volume withSize(String size)", "identifier": "withSize", "invocations": [], "modifiers": "pub...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_133
{ "fields": [ { "declarator": "builder = new FTPArtifactHandlerImpl.Builder()", "modifier": "private", "original_string": "private FTPArtifactHandlerImpl.Builder builder = new FTPArtifactHandlerImpl.Builder();", "type": "FTPArtifactHandlerImpl.Builder", "var_name": "builder" }, ...
{ "body": "@Test\n public void uploadDirectoryToFTP() throws Exception {\n final String ftpUrl = \"ftp.azurewebsites.net/site/wwwroot\";\n final PublishingProfile profile = mock(PublishingProfile.class);\n final WebApp app = mock(WebApp.class);\n final DeployTarget deployTarget = new De...
{ "fields": [ { "declarator": "DEFAULT_WEBAPP_ROOT = \"/site/wwwroot\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_WEBAPP_ROOT = \"/site/wwwroot\";", "type": "String", "var_name": "DEFAULT_WEBAPP_ROOT" }, { "declarator":...
{ "body": "protected void uploadDirectoryToFTP(DeployTarget target) throws AzureExecutionException {\n final FTPUploader uploader = getUploader();\n final PublishingProfile profile = target.getPublishingProfile();\n final String serverUrl = profile.ftpUrl().split(\"/\", 2)[0];\n\n uploader...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_88
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/DeploymentTest.java", "identifier": "DeploymentTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWithDeploymentName() {\n final Deployment deploy = new Deployment();\n deploy.withDeploymentName(\"deploymentName1\");\n assertEquals(\"deploymentName1\", deploy.getDeploymentName());\n }", "class_method_signature": "DeploymentTest.testWithDeploymentName...
{ "fields": [ { "declarator": "cpu", "modifier": "private", "original_string": "private Integer cpu;", "type": "Integer", "var_name": "cpu" }, { "declarator": "memoryInGB", "modifier": "private", "original_string": "private Integer memoryInGB;", "type"...
{ "body": "public Deployment withDeploymentName(String deploymentName) {\n this.deploymentName = deploymentName;\n return this;\n }", "class_method_signature": "Deployment.withDeploymentName(String deploymentName)", "constructor": false, "full_signature": "public Deployment withDeploymentName(S...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_67
{ "fields": [ { "declarator": "tempDirectory", "modifier": "private", "original_string": "private File tempDirectory;", "type": "File", "var_name": "tempDirectory" } ], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureAuthHelperTest.java", "identifier"...
{ "body": "@Test\n public void testIsInCloudShell() {\n TestHelper.injectEnvironmentVariable(Constants.CLOUD_SHELL_ENV_KEY, \"azure\");\n assertTrue(AzureAuthHelper.isInCloudShell());\n TestHelper.injectEnvironmentVariable(Constants.CLOUD_SHELL_ENV_KEY, null);\n assertFalse(AzureAuthHel...
{ "fields": [ { "declarator": "UNKNOWN = \"UNKNOWN\"", "modifier": "private static final", "original_string": "private static final String UNKNOWN = \"UNKNOWN\";", "type": "String", "var_name": "UNKNOWN" }, { "declarator": "AUTH_ORDER = {AuthType.SERVICE_PRINCIPAL, Auth...
{ "body": "static boolean isInCloudShell() {\n return System.getenv(Constants.CLOUD_SHELL_ENV_KEY) != null;\n }", "class_method_signature": "AzureAuthHelper.isInCloudShell()", "constructor": false, "full_signature": "static boolean isInCloudShell()", "identifier": "isInCloudShell", "invocations": ...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_164
{ "fields": [ { "declarator": "handler", "modifier": "private", "original_string": "private MSDeployArtifactHandlerImpl handler;", "type": "MSDeployArtifactHandlerImpl", "var_name": "handler" }, { "declarator": "handlerSpy", "modifier": "private", "original_...
{ "body": "@Test\n public void publish() throws Exception {\n final DeployTarget deployTarget = mock(DeployTarget.class);\n final Map mapSettings = mock(Map.class);\n final File file = mock(File.class);\n final AppSetting storageSetting = mock(AppSetting.class);\n\n mapSettings.p...
{ "fields": [ { "declarator": "DEPLOYMENT_PACKAGE_CONTAINER = \"java-functions-deployment-packages\"", "modifier": "public static final", "original_string": "public static final String DEPLOYMENT_PACKAGE_CONTAINER = \"java-functions-deployment-packages\";", "type": "String", "var_nam...
{ "body": "@Override\n public void publish(final DeployTarget target) throws AzureExecutionException {\n final File zipPackage = createZipPackage();\n\n final CloudStorageAccount storageAccount = FunctionArtifactHelper.getCloudStorageAccount(target);\n\n final String blobName = getBlobName();\...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
95752629_30
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/configuration/AuthConfigurationTest.java", "identifier": "AuthConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValidate() {\n AuthConfiguration auth = new AuthConfiguration();\n auth.setClient(\"client1\");\n assertTrue(auth.validate().size() == 2);\n\n auth.setTenant(\"tenant1\");\n assertTrue(auth.validate().size() == 1);\n\n auth.setKey(\"key1\...
{ "fields": [ { "declarator": "client", "modifier": "private", "original_string": "private String client;", "type": "String", "var_name": "client" }, { "declarator": "tenant", "modifier": "private", "original_string": "private String tenant;", "type": ...
{ "body": "public List<ConfigurationProblem> validate() {\n final List<ConfigurationProblem> results = new ArrayList<>();\n final String errorMessagePostfix = StringUtils.isNotBlank(serverId) ? \"server: \" + serverId + \" in settings.xml.\" : \"<auth> configuration.\";\n // The <serverId> check ...
{ "created": null, "fork": null, "fork_count": 81, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 95752629, "size": 2604, "stargazer_count": 182, "stars": null, "updates": null, "url": "https://github.com/microsoft/azure-maven-plugins" }
5123943_0
{ "fields": [], "file": "powerlaws/src/test/java/nl/peterbloem/powerlaws/FunctionsTest.java", "identifier": "FunctionsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testZeta()\n\t{\n\t\tassertEquals(1.64493406684822, zeta(2.0, 1.0), 10E-12);\n\t\tassertEquals(0.13182783346272, zeta(3.456, 2.0), 10E-12);\n\t\tassertEquals(1.55869618375063E-26, zeta(20.0, 20.0), 10E-12);\n\t\t\n//\t\tfor (int i : Series.series(20))\n//\t\t{\n//\t\t\tdouble s = Globa...
{ "fields": [ { "declarator": "EPSILON = 1E-12", "modifier": "private static final", "original_string": "private static final double EPSILON = 1E-12;", "type": "double", "var_name": "EPSILON" }, { "declarator": "m[] = {\n\t\t 12.0,\n\t\t-720.0,\n\t\t 30240.0,\n\t\t-1209...
{ "body": "public static double zeta(double x, double q)\n\t{\n\t\t// * Check arguments\n\t\tif(x == 1.0)\n\t\t\treturn Double.POSITIVE_INFINITY;\n\t\tif(q < 1.0)\n\t\t\treturn Double.NaN;\n\t\tif(q <= 0.0)\n\t\t\tif(q == floor(q))\n\t\t\t\treturn Double.POSITIVE_INFINITY;\n\t\t\telse\n\t\t\t\treturn Double.NaN;\n\t\...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5123943, "size": 35, "stargazer_count": 17, "stars": null, "updates": null, "url": "https://github.com/Data2Semantics/powerlaws" }
5123943_1
{ "fields": [], "file": "powerlaws/src/test/java/nl/peterbloem/powerlaws/FunctionsTest.java", "identifier": "FunctionsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void testZetaSingle()\n\t{\n\t\tassertEquals(1.64493406684822, zeta(2.0), 10E-12);\n\t\tassertEquals(1.13182783346272, zeta(3.456), 10E-12);\n\t\tassertEquals(1.00000089006735, zeta(20.1), 10E-12);\n\n\t\tassertEquals(2.61237534868548, zeta(1.5), 10E-12);\t\n\t\tassertEquals(1.3414872572509...
{ "fields": [ { "declarator": "EPSILON = 1E-12", "modifier": "private static final", "original_string": "private static final double EPSILON = 1E-12;", "type": "double", "var_name": "EPSILON" }, { "declarator": "m[] = {\n\t\t 12.0,\n\t\t-720.0,\n\t\t 30240.0,\n\t\t-1209...
{ "body": "public static double zeta(double x, double q)\n\t{\n\t\t// * Check arguments\n\t\tif(x == 1.0)\n\t\t\treturn Double.POSITIVE_INFINITY;\n\t\tif(q < 1.0)\n\t\t\treturn Double.NaN;\n\t\tif(q <= 0.0)\n\t\t\tif(q == floor(q))\n\t\t\t\treturn Double.POSITIVE_INFINITY;\n\t\t\telse\n\t\t\t\treturn Double.NaN;\n\t\...
{ "created": null, "fork": null, "fork_count": 10, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 5123943, "size": 35, "stargazer_count": 17, "stars": null, "updates": null, "url": "https://github.com/Data2Semantics/powerlaws" }
19257422_172
{ "fields": [ { "declarator": "function = new TimestampFunction(25) {\n @Override\n public long getTimestamp(Record rec) {\n return 145000L;\n }\n }", "modifier": "private static final", "original_string": "private static final TimestampFunction function = new ...
{ "body": "@Test\n public void testGetLong() {\n Assert.assertEquals(145000, function.getLong(null));\n }", "class_method_signature": "TimestampFunctionTest.testGetLong()", "constructor": false, "full_signature": "@Test public void testGetLong()", "identifier": "testGetLong", "invocations": [ ...
{ "fields": [ { "declarator": "position", "modifier": "private final", "original_string": "private final int position;", "type": "int", "var_name": "position" } ], "file": "core/src/main/java/io/questdb/griffin/engine/functions/TimestampFunction.java", "identifier": "Timest...
{ "body": "@Override\n public final long getLong(Record rec) {\n return getTimestamp(rec);\n }", "class_method_signature": "TimestampFunction.getLong(Record rec)", "constructor": false, "full_signature": "@Override public final long getLong(Record rec)", "identifier": "getLong", "invocations": ...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_488
{ "fields": [ { "declarator": "PRODUCT = \"product\"", "modifier": "public static final", "original_string": "public static final String PRODUCT = \"product\";", "type": "String", "var_name": "PRODUCT" }, { "declarator": "FF = FilesFacadeImpl.INSTANCE", "modifier"...
{ "body": "@Test\n public void testDayPartitionTruncateErrorConstructorRecovery() throws Exception {\n class X extends CountingFilesFacade {\n @Override\n public boolean truncate(long fd, long size) {\n return --count != 0 && super.truncate(fd, size);\n }\n ...
{ "fields": [ { "declarator": "LOG = LogFactory.getLog(TableWriter.class)", "modifier": "private static final", "original_string": "private static final Log LOG = LogFactory.getLog(TableWriter.class);", "type": "Log", "var_name": "LOG" }, { "declarator": "IGNORED_FILES ...
{ "body": "public final void truncate() {\n\n if (size() == 0) {\n return;\n }\n\n writeTodo(TODO_TRUNCATE);\n for (int i = 0; i < columnCount; i++) {\n getPrimaryColumn(i).truncate();\n AppendMemory mem = getSecondaryColumn(i);\n if (mem != null...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_522
{ "fields": [ { "declarator": "CONFIGURATION", "modifier": "private static final", "original_string": "private static final DefaultCairoConfiguration CONFIGURATION;", "type": "DefaultCairoConfiguration", "var_name": "CONFIGURATION" } ], "file": "core/src/test/java/io/questdb/...
{ "body": "@Test\n public void testUnlockWriterWhenPoolIsClosed() throws Exception {\n assertWithPool(pool -> {\n Assert.assertTrue(pool.lock(\"z\"));\n\n pool.close();\n\n TableWriter writer = new TableWriter(configuration, \"z\");\n Assert.assertNotNull(writer);...
{ "fields": [ { "declarator": "LOG = LogFactory.getLog(WriterPool.class)", "modifier": "private static final", "original_string": "private static final Log LOG = LogFactory.getLog(WriterPool.class);", "type": "Log", "var_name": "LOG" }, { "declarator": "ENTRY_OWNER = Un...
{ "body": "public boolean lock(CharSequence tableName) {\n\n checkClosed();\n\n long thread = Thread.currentThread().getId();\n\n Entry e = entries.get(tableName);\n if (e == null) {\n // We are racing to create new writer!\n e = new Entry(clock.getTicks());\n ...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_467
{ "fields": [], "file": "core/src/test/java/io/questdb/cairo/FullFwdDataFrameCursorFactoryTest.java", "identifier": "FullFwdDataFrameCursorFactoryTest", "interfaces": "", "superclass": "extends AbstractCairoTest" }
{ "body": "@Test\n public void testFactory() throws Exception {\n TestUtils.assertMemoryLeak(() -> {\n final int N = 100;\n // separate two symbol columns with primitive. It will make problems apparent if index does not shift correctly\n try (TableModel model = new TableMode...
{ "fields": [ { "declarator": "cursor = new FullFwdDataFrameCursor()", "modifier": "private final", "original_string": "private final FullFwdDataFrameCursor cursor = new FullFwdDataFrameCursor();", "type": "FullFwdDataFrameCursor", "var_name": "cursor" } ], "file": "core/src/...
{ "body": "@Override\n public DataFrameCursor getCursor(CairoSecurityContext securityContext) {\n return cursor.of(getReader(securityContext));\n }", "class_method_signature": "FullFwdDataFrameCursorFactory.getCursor(CairoSecurityContext securityContext)", "constructor": false, "full_signature": "@...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_349
{ "fields": [], "file": "core/src/test/java/io/questdb/griffin/SqlCodeGeneratorTest.java", "identifier": "SqlCodeGeneratorTest", "interfaces": "", "superclass": "extends AbstractGriffinTest" }
{ "body": "@Test\n public void testBindVariableInSelect3() throws Exception {\n assertMemoryLeak(() -> {\n\n final CairoConfiguration configuration = new DefaultCairoConfiguration(root);\n try (\n CairoEngine engine = new CairoEngine(configuration);\n ...
{ "fields": [ { "declarator": "GKK_VANILLA_INT = 0", "modifier": "public static final", "original_string": "public static final int GKK_VANILLA_INT = 0;", "type": "int", "var_name": "GKK_VANILLA_INT" }, { "declarator": "GKK_HOUR_INT = 1", "modifier": "public stati...
{ "body": "@Override\n public void clear() {\n whereClauseParser.clear();\n }", "class_method_signature": "SqlCodeGenerator.clear()", "constructor": false, "full_signature": "@Override public void clear()", "identifier": "clear", "invocations": [ "clear" ], "modifiers": "@Override publi...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_719
{ "fields": [ { "declarator": "sink = new StringSink()", "modifier": "private final", "original_string": "private final StringSink sink = new StringSink();", "type": "StringSink", "var_name": "sink" } ], "file": "core/src/test/java/io/questdb/std/microtime/TimestampsTest.java...
{ "body": "@Test\n public void testYearsBetween3() throws NumericException {\n long micros1 = TimestampFormatUtils.parseDateTime(\"2020-04-24T01:49:12.005Z\");\n long micros2 = TimestampFormatUtils.parseDateTime(\"2024-04-24T01:49:12.005Z\");\n Assert.assertEquals(4, Timestamps.getYearsBetween...
{ "fields": [ { "declarator": "WEEK_MICROS = 604800000000L", "modifier": "public static final", "original_string": "public static final long WEEK_MICROS = 604800000000L;", "type": "long", "var_name": "WEEK_MICROS" }, { "declarator": "DAY_MICROS = 86400000000L", "m...
{ "body": "public static long getYearsBetween(long a, long b) {\n return getMonthsBetween(a, b) / 12;\n }", "class_method_signature": "Timestamps.getYearsBetween(long a, long b)", "constructor": false, "full_signature": "public static long getYearsBetween(long a, long b)", "identifier": "getYearsBet...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_575
{ "fields": [], "file": "core/src/test/java/io/questdb/std/str/DirectCharSinkTest.java", "identifier": "DirectCharSinkTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testResize() {\n final String expected = \"string 0\\n\" +\n \"string 1\\n\" +\n \"string 2\\n\" +\n \"string 3\\n\" +\n \"string 4\\n\" +\n \"string 5\\n\" +\n \"string 6\\n\" +\n ...
{ "fields": [ { "declarator": "ptr", "modifier": "private", "original_string": "private long ptr;", "type": "long", "var_name": "ptr" }, { "declarator": "capacity", "modifier": "private", "original_string": "private int capacity;", "type": "int", ...
{ "body": "private void resize(int cap) {\n long temp = Unsafe.malloc(cap);\n int len = (int) (lo - ptr);\n Unsafe.getUnsafe().copyMemory(ptr, temp, len);\n Unsafe.free(ptr, capacity);\n\n this.ptr = temp;\n this.capacity = cap;\n this.lo = ptr + len;\n this.hi ...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_125
{ "fields": [ { "declarator": "function = new CursorFunction(25, null)", "modifier": "private static final", "original_string": "private static final CursorFunction function = new CursorFunction(25, null);", "type": "CursorFunction", "var_name": "function" } ], "file": "core/...
{ "body": "@Test(expected = UnsupportedOperationException.class)\n public void testGetDouble() {\n function.getDouble(null);\n }", "class_method_signature": "CursorFunctionTest.testGetDouble()", "constructor": false, "full_signature": "@Test(expected = UnsupportedOperationException.class) public vo...
{ "fields": [ { "declarator": "position", "modifier": "private final", "original_string": "private final int position;", "type": "int", "var_name": "position" }, { "declarator": "factory", "modifier": "private final", "original_string": "private final Record...
{ "body": "@Override\n public final double getDouble(Record rec) {\n throw new UnsupportedOperationException();\n }", "class_method_signature": "CursorFunction.getDouble(Record rec)", "constructor": false, "full_signature": "@Override public final double getDouble(Record rec)", "identifier": "get...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_56
{ "fields": [ { "declarator": "function = new DoubleFunction(25) {\n @Override\n public double getDouble(Record rec) {\n return 0;\n }\n }", "modifier": "private static final", "original_string": "private static final DoubleFunction function = new DoubleFunctio...
{ "body": "@Test(expected = UnsupportedOperationException.class)\n public void testGetStr2() {\n function.getStr(null, null);\n }", "class_method_signature": "DoubleFunctionTest.testGetStr2()", "constructor": false, "full_signature": "@Test(expected = UnsupportedOperationException.class) public voi...
{ "fields": [ { "declarator": "position", "modifier": "private final", "original_string": "private final int position;", "type": "int", "var_name": "position" } ], "file": "core/src/main/java/io/questdb/griffin/engine/functions/DoubleFunction.java", "identifier": "DoubleFun...
{ "body": "@Override\n public final CharSequence getStr(Record rec) {\n throw new UnsupportedOperationException();\n }", "class_method_signature": "DoubleFunction.getStr(Record rec)", "constructor": false, "full_signature": "@Override public final CharSequence getStr(Record rec)", "identifier": "...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_430
{ "fields": [ { "declarator": "ENTITY_MANIPULATOR = (index, len, b) -> b", "modifier": "private static final", "original_string": "private static final ByteManipulator ENTITY_MANIPULATOR = (index, len, b) -> b;", "type": "ByteManipulator", "var_name": "ENTITY_MANIPULATOR" }, ...
{ "body": "@Test\n public void testDelimiterPriority3() throws Exception {\n assertNoLeak(textLoader -> {\n final String expected = \"f0\\tf1\\tf2\\tf3\\n\" +\n \"+\\t+\\t+\\t+\\n\" +\n \"+\\t+\\t+\\t+\\n\";\n\n String csv = \"+-+-+-+\\n\" +\n ...
{ "fields": [ { "declarator": "LOAD_JSON_METADATA = 0", "modifier": "public static final", "original_string": "public static final int LOAD_JSON_METADATA = 0;", "type": "int", "var_name": "LOAD_JSON_METADATA" }, { "declarator": "ANALYZE_STRUCTURE = 1", "modifier":...
{ "body": "public void setForceHeaders(boolean forceHeaders) {\n this.forceHeaders = forceHeaders;\n }", "class_method_signature": "TextLoader.setForceHeaders(boolean forceHeaders)", "constructor": false, "full_signature": "public void setForceHeaders(boolean forceHeaders)", "identifier": "setForceH...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_133
{ "fields": [ { "declarator": "function = new CursorFunction(25, null)", "modifier": "private static final", "original_string": "private static final CursorFunction function = new CursorFunction(25, null);", "type": "CursorFunction", "var_name": "function" } ], "file": "core/...
{ "body": "@Test\n public void testGetPosition() {\n Assert.assertEquals(25, function.getPosition());\n }", "class_method_signature": "CursorFunctionTest.testGetPosition()", "constructor": false, "full_signature": "@Test public void testGetPosition()", "identifier": "testGetPosition", "invocati...
{ "fields": [ { "declarator": "position", "modifier": "private final", "original_string": "private final int position;", "type": "int", "var_name": "position" }, { "declarator": "factory", "modifier": "private final", "original_string": "private final Record...
{ "body": "@Override\n public final int getPosition() {\n return position;\n }", "class_method_signature": "CursorFunction.getPosition()", "constructor": false, "full_signature": "@Override public final int getPosition()", "identifier": "getPosition", "invocations": [], "modifiers": "@Overrid...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_563
{ "fields": [ { "declarator": "WORK_STEALING_DONT_TEST = 0", "modifier": "private static final", "original_string": "private static final int WORK_STEALING_DONT_TEST = 0;", "type": "int", "var_name": "WORK_STEALING_DONT_TEST" }, { "declarator": "WORK_STEALING_NO_PICKUP ...
{ "body": "@Test\n public void testEmptyPartitionSkip() throws Exception {\n TestUtils.assertMemoryLeak(() -> {\n try (TableModel model = new TableModel(configuration, \"x\", PartitionBy.NONE).\n col(\"a\", ColumnType.INT).\n col(\"b\", ColumnType.INT).\n ...
{ "fields": [], "file": "core/src/main/java/io/questdb/cairo/FullFwdDataFrameCursor.java", "identifier": "FullFwdDataFrameCursor", "interfaces": "", "methods": [ { "class_method_signature": "FullFwdDataFrameCursor.next()", "constructor": false, "full_signature": "@Override public @Nullab...
{ "body": "@Override\n public @Nullable DataFrame next() {\n while (this.partitionIndex < partitionHi) {\n final long hi = getTableReader().openPartition(partitionIndex);\n if (hi < 1) {\n // this partition is missing, skip\n partitionIndex++;\n ...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_426
{ "fields": [ { "declarator": "ENTITY_MANIPULATOR = (index, len, b) -> b", "modifier": "private static final", "original_string": "private static final ByteManipulator ENTITY_MANIPULATOR = (index, len, b) -> b;", "type": "ByteManipulator", "var_name": "ENTITY_MANIPULATOR" }, ...
{ "body": "@Test\n public void testDOSLineEnds() throws Exception {\n assertNoLeak(textLoader -> {\n final String expected = \"f0\\tf1\\tf2\\tf3\\tf4\\tf5\\tf6\\n\" +\n \"123\\tabc\\t2015-01-20T21:00:00.000Z\\t3.1415\\ttrue\\tLorem ipsum dolor sit amet.\\t122\\n\" +\n ...
{ "fields": [ { "declarator": "LOAD_JSON_METADATA = 0", "modifier": "public static final", "original_string": "public static final int LOAD_JSON_METADATA = 0;", "type": "int", "var_name": "LOAD_JSON_METADATA" }, { "declarator": "ANALYZE_STRUCTURE = 1", "modifier":...
{ "body": "public void setForceHeaders(boolean forceHeaders) {\n this.forceHeaders = forceHeaders;\n }", "class_method_signature": "TextLoader.setForceHeaders(boolean forceHeaders)", "constructor": false, "full_signature": "public void setForceHeaders(boolean forceHeaders)", "identifier": "setForceH...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_40
{ "fields": [ { "declarator": "function = new LongFunction(25) {\n @Override\n public long getLong(Record rec) {\n return 149;\n }\n }", "modifier": "private static final", "original_string": "private static final LongFunction function = new LongFunction(25) {\...
{ "body": "@Test(expected = UnsupportedOperationException.class)\n public void testLong256A() {\n function.getLong256A(null);\n }", "class_method_signature": "LongFunctionTest.testLong256A()", "constructor": false, "full_signature": "@Test(expected = UnsupportedOperationException.class) public void...
{ "fields": [ { "declarator": "position", "modifier": "private final", "original_string": "private final int position;", "type": "int", "var_name": "position" } ], "file": "core/src/main/java/io/questdb/griffin/engine/functions/LongFunction.java", "identifier": "LongFunctio...
{ "body": "@Override\n public final Long256 getLong256A(Record rec) {\n throw new UnsupportedOperationException();\n }", "class_method_signature": "LongFunction.getLong256A(Record rec)", "constructor": false, "full_signature": "@Override public final Long256 getLong256A(Record rec)", "identifier"...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_308
{ "fields": [ { "declarator": "function = new Long256Function(25) {\n @Override\n public Long256 getLong256A(Record rec) {\n return Long256Impl.NULL_LONG256;\n }\n\n @Override\n public Long256 getLong256B(Record rec) {\n return Long256Impl.NULL_LONG25...
{ "body": "@Test(expected = UnsupportedOperationException.class)\n public void testGetStrB() {\n function.getStrB(null);\n }", "class_method_signature": "Long256FunctionTest.testGetStrB()", "constructor": false, "full_signature": "@Test(expected = UnsupportedOperationException.class) public void te...
{ "fields": [ { "declarator": "position", "modifier": "private final", "original_string": "private final int position;", "type": "int", "var_name": "position" } ], "file": "core/src/main/java/io/questdb/griffin/engine/functions/Long256Function.java", "identifier": "Long256F...
{ "body": "@Override\n public final CharSequence getStrB(Record rec) {\n throw new UnsupportedOperationException();\n }", "class_method_signature": "Long256Function.getStrB(Record rec)", "constructor": false, "full_signature": "@Override public final CharSequence getStrB(Record rec)", "identifier...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_534
{ "fields": [ { "declarator": "LOG = LogFactory.getLog(ReaderPoolTest.class)", "modifier": "private static final", "original_string": "private static final Log LOG = LogFactory.getLog(ReaderPoolTest.class);", "type": "Log", "var_name": "LOG" } ], "file": "core/src/test/java/i...
{ "body": "@Test\n public void testSerialOpenClose() throws Exception {\n assertWithPool(pool -> {\n TableReader firstReader = null;\n for (int i = 0; i < 1000; i++) {\n try (TableReader reader = pool.get(\"u\")) {\n if (firstReader == null) {\n ...
{ "fields": [ { "declarator": "LOG = LogFactory.getLog(ReaderPool.class)", "modifier": "private static final", "original_string": "private static final Log LOG = LogFactory.getLog(ReaderPool.class);", "type": "Log", "var_name": "LOG" }, { "declarator": "UNLOCKED = -1L",...
{ "body": "@Override\n public TableReader get(CharSequence name) {\n\n Entry e = getEntry(name);\n\n long lockOwner = e.lockOwner;\n long thread = Thread.currentThread().getId();\n\n if (lockOwner != UNLOCKED) {\n LOG.info().$('\\'').utf8(name).$(\"' is locked [owner=\").$(lo...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_164
{ "fields": [ { "declarator": "function = new TimestampFunction(25) {\n @Override\n public long getTimestamp(Record rec) {\n return 145000L;\n }\n }", "modifier": "private static final", "original_string": "private static final TimestampFunction function = new ...
{ "body": "@Test(expected = UnsupportedOperationException.class)\n public void testGetBinLen() {\n function.getBinLen(null);\n }", "class_method_signature": "TimestampFunctionTest.testGetBinLen()", "constructor": false, "full_signature": "@Test(expected = UnsupportedOperationException.class) public...
{ "fields": [ { "declarator": "position", "modifier": "private final", "original_string": "private final int position;", "type": "int", "var_name": "position" } ], "file": "core/src/main/java/io/questdb/griffin/engine/functions/TimestampFunction.java", "identifier": "Timest...
{ "body": "@Override\n public long getBinLen(Record rec) {\n throw new UnsupportedOperationException();\n }", "class_method_signature": "TimestampFunction.getBinLen(Record rec)", "constructor": false, "full_signature": "@Override public long getBinLen(Record rec)", "identifier": "getBinLen", "i...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_17
{ "fields": [ { "declarator": "function = new StrFunction(25) {\n @Override\n public CharSequence getStr(Record rec) {\n return \"a\";\n }\n\n @Override\n public CharSequence getStrB(Record rec) {\n return \"a\";\n }\n }", "modifier": ...
{ "body": "@Test(expected = UnsupportedOperationException.class)\n public void testGetTimestamp() {\n function.getTimestamp(null);\n }", "class_method_signature": "StrFunctionTest.testGetTimestamp()", "constructor": false, "full_signature": "@Test(expected = UnsupportedOperationException.class) pub...
{ "fields": [ { "declarator": "position", "modifier": "private final", "original_string": "private final int position;", "type": "int", "var_name": "position" } ], "file": "core/src/main/java/io/questdb/griffin/engine/functions/StrFunction.java", "identifier": "StrFunction"...
{ "body": "@Override\n public final long getTimestamp(Record rec) {\n throw new UnsupportedOperationException();\n }", "class_method_signature": "StrFunction.getTimestamp(Record rec)", "constructor": false, "full_signature": "@Override public final long getTimestamp(Record rec)", "identifier": "g...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_471
{ "fields": [], "file": "core/src/test/java/io/questdb/cairo/VirtualMemoryTest.java", "identifier": "VirtualMemoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testStringStorageDimensions() {\n assertEquals(10, VirtualMemory.getStorageLength(\"xyz\"));\n assertEquals(4, VirtualMemory.getStorageLength(\"\"));\n assertEquals(4, VirtualMemory.getStorageLength(null));\n }", "class_method_signature": "VirtualMemoryTest....
{ "fields": [ { "declarator": "STRING_LENGTH_BYTES = 4", "modifier": "static final", "original_string": "static final int STRING_LENGTH_BYTES = 4;", "type": "int", "var_name": "STRING_LENGTH_BYTES" }, { "declarator": "LOG = LogFactory.getLog(VirtualMemory.class)", ...
{ "body": "public static int getStorageLength(CharSequence s) {\n if (s == null) {\n return STRING_LENGTH_BYTES;\n }\n\n return STRING_LENGTH_BYTES + s.length() * 2;\n }", "class_method_signature": "VirtualMemory.getStorageLength(CharSequence s)", "constructor": false, "full_s...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_236
{ "fields": [ { "declarator": "function = new FloatFunction(25) {\n @Override\n public float getFloat(Record rec) {\n return 0;\n }\n }", "modifier": "private static final", "original_string": "private static final FloatFunction function = new FloatFunction(25)...
{ "body": "@Test(expected = UnsupportedOperationException.class)\n public void testGetByte() {\n function.getByte(null);\n }", "class_method_signature": "FloatFunctionTest.testGetByte()", "constructor": false, "full_signature": "@Test(expected = UnsupportedOperationException.class) public void test...
{ "fields": [ { "declarator": "position", "modifier": "private final", "original_string": "private final int position;", "type": "int", "var_name": "position" } ], "file": "core/src/main/java/io/questdb/griffin/engine/functions/FloatFunction.java", "identifier": "FloatFunct...
{ "body": "@Override\n public final byte getByte(Record rec) {\n throw new UnsupportedOperationException();\n }", "class_method_signature": "FloatFunction.getByte(Record rec)", "constructor": false, "full_signature": "@Override public final byte getByte(Record rec)", "identifier": "getByte", "i...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_666
{ "fields": [], "file": "core/src/test/java/io/questdb/std/LongMatrixTest.java", "identifier": "LongMatrixTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testZapTop() {\n LongMatrix<String> m = new LongMatrix<>(2);\n for (int i = 0; i < 1000; i++) {\n int r = m.addRow();\n m.set(r, 0, i);\n m.set(r, 1, i);\n m.set(r, \"s\" + i);\n }\n\n Assert.assertEquals(1000, m...
{ "fields": [ { "declarator": "bits", "modifier": "private final", "original_string": "private final int bits;", "type": "int", "var_name": "bits" }, { "declarator": "pos", "modifier": "private", "original_string": "private int pos;", "type": "int", ...
{ "body": "public void zapTop(int count) {\n if (count < pos) {\n System.arraycopy(data, count << bits, data, 0, (pos - count) << bits);\n System.arraycopy(payload, count, payload, 0, pos - count);\n pos -= count;\n } else {\n pos = 0;\n }\n }", "c...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_373
{ "fields": [], "file": "core/src/test/java/io/questdb/griffin/SqlCodeGeneratorTest.java", "identifier": "SqlCodeGeneratorTest", "interfaces": "", "superclass": "extends AbstractGriffinTest" }
{ "body": "@Test\n public void testLatestBySubQueryDeferredFiltered() throws Exception {\n TestMatchFunctionFactory.clear();\n // no index\n assertQuery(\"a\\tb\\tk\\n\" +\n \"23.90529010846525\\tRXGZ\\t1970-01-03T07:33:20.000000Z\\n\" +\n \"12.026...
{ "fields": [ { "declarator": "GKK_VANILLA_INT = 0", "modifier": "public static final", "original_string": "public static final int GKK_VANILLA_INT = 0;", "type": "int", "var_name": "GKK_VANILLA_INT" }, { "declarator": "GKK_HOUR_INT = 1", "modifier": "public stati...
{ "body": "@Override\n public void clear() {\n whereClauseParser.clear();\n }", "class_method_signature": "SqlCodeGenerator.clear()", "constructor": false, "full_signature": "@Override public void clear()", "identifier": "clear", "invocations": [ "clear" ], "modifiers": "@Override publi...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_689
{ "fields": [], "file": "core/src/test/java/io/questdb/std/microtime/TimestampLocaleTest.java", "identifier": "TimestampLocaleTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = NumericException.class)\n public void testWrongLength() throws Exception {\n String date = \"23 Zek 2010\";\n TimestampLocaleFactory.INSTANCE.getLocale(\"en-GB\").matchMonth(date, 30, date.length());\n }", "class_method_signature": "TimestampLocaleTest.testWrongLength...
{ "fields": [ { "declarator": "months = new IntObjHashMap<>()", "modifier": "private final", "original_string": "private final IntObjHashMap<ObjList<CharSequence>> months = new IntObjHashMap<>();", "type": "IntObjHashMap<ObjList<CharSequence>>", "var_name": "months" }, { ...
{ "body": "public long matchMonth(CharSequence content, int lo, int hi) throws NumericException {\n return findToken(content, lo, hi, months);\n }", "class_method_signature": "TimestampLocale.matchMonth(CharSequence content, int lo, int hi)", "constructor": false, "full_signature": "public long matchM...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_83
{ "fields": [ { "declarator": "function = new IntFunction(25) {\n @Override\n public int getInt(Record rec) {\n return 150;\n }\n }", "modifier": "private static final", "original_string": "private static final IntFunction function = new IntFunction(25) {\n ...
{ "body": "@Test(expected = UnsupportedOperationException.class)\n public void testGetBin() {\n function.getBin(null);\n }", "class_method_signature": "IntFunctionTest.testGetBin()", "constructor": false, "full_signature": "@Test(expected = UnsupportedOperationException.class) public void testGetBi...
{ "fields": [ { "declarator": "position", "modifier": "private final", "original_string": "private final int position;", "type": "int", "var_name": "position" } ], "file": "core/src/main/java/io/questdb/griffin/engine/functions/IntFunction.java", "identifier": "IntFunction"...
{ "body": "@Override\n public final BinarySequence getBin(Record rec) {\n throw new UnsupportedOperationException();\n }", "class_method_signature": "IntFunction.getBin(Record rec)", "constructor": false, "full_signature": "@Override public final BinarySequence getBin(Record rec)", "identifier": ...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...
19257422_631
{ "fields": [ { "declarator": "sink = new StringSink()", "modifier": "private final", "original_string": "private final StringSink sink = new StringSink();", "type": "StringSink", "var_name": "sink" }, { "declarator": "rnd", "modifier": "private", "original_...
{ "body": "@Test(expected = NumericException.class)\n public void testParseIntOverflow3() throws Exception {\n Numbers.parseInt(\"5000000000\");\n }", "class_method_signature": "NumbersTest.testParseIntOverflow3()", "constructor": false, "full_signature": "@Test(expected = NumericException.class) p...
{ "fields": [ { "declarator": "INT_NaN = Integer.MIN_VALUE", "modifier": "public static final", "original_string": "public static final int INT_NaN = Integer.MIN_VALUE;", "type": "int", "var_name": "INT_NaN" }, { "declarator": "LONG_NaN = Long.MIN_VALUE", "modifie...
{ "body": "public static int parseInt(CharSequence sequence) throws NumericException {\n if (sequence == null) {\n throw NumericException.INSTANCE;\n }\n\n return parseInt0(sequence, 0, sequence.length());\n }", "class_method_signature": "Numbers.parseInt(CharSequence sequence)", ...
{ "created": "4/28/2014 11:29:15 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 19257422, "size": null, "stargazer_count": null, "stars": 212, "updates": "2020-01-27T20:58:34+00:00", "url": "https://github.com/questdb/questdb...