id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
95752629_62
{ "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 testGetAzureConfigFolder() {\n TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, null);\n final File azureConfigFolder = AzureAuthHelper.getAzureConfigFolder();\n assertEquals(Paths.get(System.getProperty(\"user.home\"), \".azure\").toString(), azu...
{ "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 File getAzureConfigFolder() {\n return StringUtils.isNotBlank(System.getenv(Constants.AZURE_CONFIG_DIR)) ? new File(System.getenv(Constants.AZURE_CONFIG_DIR)) :\n Paths.get(System.getProperty(Constants.USER_HOME), Constants.AZURE_FOLDER).toFile();\n }", "class_method_si...
{ "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_161
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/utils/IndentUtilTest.java", "identifier": "IndentUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testXmlIndentBadArgument() {\n final String[] lines = TextUtils.splitLines(\"<foo> \\n <bar> \\n \\t<test></test></bar> \\r\\n </foo>\");\n try {\n IndentUtil.calcXmlIndent(lines, 100, 1);\n fail(\"Should throw IAE\");\n } catch (Ille...
{ "fields": [], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/utils/IndentUtil.java", "identifier": "IndentUtil", "interfaces": "", "methods": [ { "class_method_signature": "IndentUtil.calcXmlIndent(String[] lines, int row, int column)", "constructor": false, "full...
{ "body": "public static String calcXmlIndent(String[] lines, int row, int column) {\n Preconditions.checkNotNull(lines, \"The parameter 'lines' cannot be null\");\n Preconditions.checkArgument(lines.length > row && row >= 0, \"The parameter 'row' overflows.\");\n final String line = lines[row];\...
{ "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_35
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/configuration/AuthConfigurationTest.java", "identifier": "AuthConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetCertificatePassword() {\n final AuthConfiguration auth = new AuthConfiguration();\n auth.setCertificatePassword(\"certificatePassword1\");\n assertEquals(\"certificatePassword1\", auth.getCertificatePassword());\n }", "class_method_signature": "AuthCo...
{ "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 setCertificatePassword(String certificatePassword) {\n this.certificatePassword = certificatePassword;\n }", "class_method_signature": "AuthConfiguration.setCertificatePassword(String certificatePassword)", "constructor": false, "full_signature": "public void setCertificatePassw...
{ "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_248
{ "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 getArtifactHandlerFromPackaging() throws Exception {\n doReturn(project).when(mojo).getProject();\n final HandlerFactoryImpl factory = new HandlerFactoryImpl();\n\n assertTrue(factory.getArtifactHandlerBuilderFromPackaging(mojo).build() instanceof JarArtifactHand...
{ "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": "protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo)\n throws AzureExecutionException {\n String packaging = mojo.getProject().getPackaging();\n if (StringUtils.isEmpty(packaging)) {\n throw new AzureExecutionException(U...
{ "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_34
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/configuration/AuthConfigurationTest.java", "identifier": "AuthConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetCertificate() {\n final AuthConfiguration auth = new AuthConfiguration();\n auth.setCertificate(\"certificate1\");\n assertEquals(\"certificate1\", auth.getCertificate());\n }", "class_method_signature": "AuthConfigurationTest.testSetCertificate()", ...
{ "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 setCertificate(String certificate) {\n this.certificate = certificate;\n }", "class_method_signature": "AuthConfiguration.setCertificate(String certificate)", "constructor": false, "full_signature": "public void setCertificate(String certificate)", "identifier": "setCertificat...
{ "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_249
{ "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(expected = AzureExecutionException.class)\n public void getArtifactHandlerFromPackagingThrowException() throws AzureExecutionException {\n doReturn(project).when(mojo).getProject();\n project.setPackaging(\"ear\");\n final HandlerFactoryImpl factory = new HandlerFactoryImpl();...
{ "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": "protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo)\n throws AzureExecutionException {\n String packaging = mojo.getProject().getPackaging();\n if (StringUtils.isEmpty(packaging)) {\n throw new AzureExecutionException(U...
{ "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_160
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/utils/IndentUtilTest.java", "identifier": "IndentUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testXmlIndent() {\n final String[] lines = TextUtils.splitLines(\"<foo> \\n <bar> \\n \\t<test></test></bar> \\r\\n </foo>\");\n assertEquals(\" \", IndentUtil.calcXmlIndent(lines, 1, 2));\n assertEquals(\" \\t\", IndentUtil.calcXmlIndent(lines, 2, ...
{ "fields": [], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/utils/IndentUtil.java", "identifier": "IndentUtil", "interfaces": "", "methods": [ { "class_method_signature": "IndentUtil.calcXmlIndent(String[] lines, int row, int column)", "constructor": false, "full...
{ "body": "public static String calcXmlIndent(String[] lines, int row, int column) {\n Preconditions.checkNotNull(lines, \"The parameter 'lines' cannot be null\");\n Preconditions.checkArgument(lines.length > row && row >= 0, \"The parameter 'row' overflows.\");\n final String line = lines[row];\...
{ "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_63
{ "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 testExistsAzureSecretFile() {\n final File testConfigDir = new File(this.getClass().getResource(\"/azure-login/azure-secret.json\").getFile()).getParentFile();\n TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.getAbsolutePath());\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 boolean existsAzureSecretFile() {\n final File azureSecretFile = getAzureSecretFile();\n return azureSecretFile.exists() && azureSecretFile.isFile() && azureSecretFile.length() > 0;\n }", "class_method_signature": "AzureAuthHelper.existsAzureSecretFile()", "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_137
{ "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 testPromoteStringNotRequired() throws Exception {\n when(reader.readLine()).thenReturn(\"\");\n String result = prompter.promoteString(\"Please input a string\", \"foo\", input -> {\n throw new RuntimeException();\n }, false);\n assertEquals(\"f...
{ "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 String promoteString(String message, String defaultValue, Function<String, InputValidateResult<String>> verify, boolean isRequired)\n throws IOException {\n final boolean hasDefaultValue = StringUtils.isNotBlank(defaultValue);\n System.out.print(message);\n System.out...
{ "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_75
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/DeploymentSettingsTest.java", "identifier": "DeploymentSettingsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetInstanceCount() {\n final DeploymentSettings deploy = new DeploymentSettings();\n deploy.setInstanceCount(\"3\");\n assertEquals(\"3\", deploy.getInstanceCount());\n }", "class_method_signature": "DeploymentSettingsTest.testSetInstanceCount()", "con...
{ "fields": [ { "declarator": "cpu", "modifier": "private", "original_string": "private String cpu;", "type": "String", "var_name": "cpu" }, { "declarator": "memoryInGB", "modifier": "private", "original_string": "private String memoryInGB;", "type": "...
{ "body": "public void setInstanceCount(String instanceCount) {\n this.instanceCount = instanceCount;\n }", "class_method_signature": "DeploymentSettings.setInstanceCount(String instanceCount)", "constructor": false, "full_signature": "public void setInstanceCount(String instanceCount)", "identifier...
{ "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_208
{ "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\n public void assureValidSlotName() throws AzureExecutionException {\n final DeploymentSlotHandler handlerSpy = spy(handler);\n handlerSpy.assureValidSlotName(\"slot-Name\");\n verify(handlerSpy, times(1)).assureValidSlotName(\"slot-Name\");\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 assureValidSlotName(final String slotName) throws AzureExecutionException {\n final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE);\n\n if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) {\n throw new AzureExecu...
{ "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_121
{ "fields": [ { "declarator": "spyClient", "modifier": "private", "original_string": "private SpringServiceClient spyClient;", "type": "SpringServiceClient", "var_name": "spyClient" } ], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/s...
{ "body": "@Test\n public void getResourceGroupByCluster() {\n final ServiceResourceInner mockCluster = mock(ServiceResourceInner.class);\n doReturn(\"/resourceGroups/test\").when(mockCluster).id();\n\n doReturn(mockCluster).when(spyClient).getClusterByName(any());\n assertEquals(\"test...
{ "fields": [ { "declarator": "NO_CLUSTER = \"No cluster named %s found in subscription %s\"", "modifier": "protected static final", "original_string": "protected static final String NO_CLUSTER = \"No cluster named %s found in subscription %s\";", "type": "String", "var_name": "NO_CL...
{ "body": "public String getResourceGroupByCluster(String clusterName) {\n final ServiceResourceInner cluster = getClusterByName(clusterName);\n return this.getResourceGroupByCluster(cluster);\n }", "class_method_signature": "SpringServiceClient.getResourceGroupByCluster(String clusterName)", "co...
{ "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_22
{ "fields": [], "file": "azure-functions-maven-plugin/src/test/java/com/microsoft/azure/maven/function/PackageMojoTest.java", "identifier": "PackageMojoTest", "interfaces": "", "superclass": "extends MojoTestBase" }
{ "body": "@Test\n public void getAnnotationHandler() throws Exception {\n final PackageMojo mojo = getMojoFromPom();\n final AnnotationHandler handler = mojo.getAnnotationHandler();\n\n assertNotNull(handler);\n assertTrue(handler instanceof AnnotationHandlerImpl);\n }", "class_me...
{ "fields": [ { "declarator": "SEARCH_FUNCTIONS = \"Step 1 of 7: Searching for Azure Functions entry points\"", "modifier": "public static final", "original_string": "public static final String SEARCH_FUNCTIONS = \"Step 1 of 7: Searching for Azure Functions entry points\";", "type": "Strin...
{ "body": "protected AnnotationHandler getAnnotationHandler() {\n return new AnnotationHandlerImpl();\n }", "class_method_signature": "PackageMojo.getAnnotationHandler()", "constructor": false, "full_signature": "protected AnnotationHandler getAnnotationHandler()", "identifier": "getAnnotationHandle...
{ "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_176
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/function/handlers/FunctionCoreToolsHandlerImplTest.java", "identifier": "FunctionCoreToolsHandlerImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getLocalFunctionCoreToolsVersionFailed() throws Exception {\n final CommandHandler commandHandler = mock(CommandHandler.class);\n final FunctionCoreToolsHandlerImpl functionCoreToolsHandler =\n new FunctionCoreToolsHandlerImpl(commandHandler);\n fi...
{ "fields": [ { "declarator": "FUNC_EXTENSIONS_INSTALL_TEMPLATE = \"func extensions install -c \\\"%s\\\" --java\"", "modifier": "public static final", "original_string": "public static final String FUNC_EXTENSIONS_INSTALL_TEMPLATE = \"func extensions install -c \\\"%s\\\" --java\";", "typ...
{ "body": "protected String getLocalFunctionCoreToolsVersion() {\n try {\n final String localVersion = commandHandler.runCommandAndGetOutput(\n GET_LOCAL_VERSION_CMD,\n false, /* showStdout */\n null /* workingDirectory */\n );\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_199
{ "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 execute() throws Exception {\n mojo.execute();\n }", "class_method_signature": "AbstractAzureMojoTest.execute()", "constructor": false, "full_signature": "@Test public void execute()", "identifier": "execute", "invocations": [ "execute" ], "modifiers": "@T...
{ "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 void execute() throws MojoExecutionException {\n try {\n // Work around for Application Insights Java SDK:\n // Sometimes, NoClassDefFoundError will be thrown even after Maven build is completed successfully.\n // An issue has been filed at http...
{ "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_224
{ "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 publishArtifactsViaZipDeploy() throws AzureExecutionException {\n final DeployTarget target = mock(DeployTarget.class);\n final File zipTestDirectory = new File(\"src/test/resources/artifacthandlerv2\");\n final String stagingDirectoryPath = zipTestDirectory.getA...
{ "fields": [ { "declarator": "MAX_RETRY_TIMES = 3", "modifier": "private static final", "original_string": "private static final int MAX_RETRY_TIMES = 3;", "type": "int", "var_name": "MAX_RETRY_TIMES" }, { "declarator": "ALWAYS_DEPLOY_PROPERTY = \"alwaysDeploy\"", ...
{ "body": "protected void publishArtifactsViaZipDeploy(final DeployTarget target,\n final String stagingDirectoryPath) throws AzureExecutionException {\n if (isJavaSERuntime()) {\n prepareJavaSERuntime(getAllArtifacts(stagingDirectoryPath));\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_59
{ "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 testGetAzureEnvironment() {\n assertEquals(AzureEnvironment.AZURE, AzureAuthHelper.getAzureEnvironment(null));\n assertEquals(AzureEnvironment.AZURE, AzureAuthHelper.getAzureEnvironment(\" \"));\n assertEquals(AzureEnvironment.AZURE, AzureAuthHelper.getAzureEnvir...
{ "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 AzureEnvironment getAzureEnvironment(String environment) {\n if (StringUtils.isEmpty(environment)) {\n return AzureEnvironment.AZURE;\n }\n\n switch (environment.toUpperCase(Locale.ENGLISH)) {\n case \"AZURE_CHINA\":\n case \"AZURECHINACLO...
{ "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_273
{ "fields": [ { "declarator": "rule = new MojoRule() {\n @Override\n protected void before() throws Throwable {\n }\n\n @Override\n protected void after() {\n }\n }", "modifier": "@Rule\n public", "original_string": "@Rule\n public MojoRule rule...
{ "body": "@Test\n public void deployArtifactsWithResources() throws Exception {\n final DeployMojo mojo = getMojoFromPom(\"/pom-linux.xml\");\n final DeployMojo mojoSpy = spy(mojo);\n final WebApp app = mock(WebApp.class);\n\n doReturn(app).when(mojoSpy).getWebApp();\n doReturn(...
{ "fields": [ { "declarator": "FTP_ROOT = Paths.get(\"/site/wwwroot\")", "modifier": "private static final", "original_string": "private static final Path FTP_ROOT = Paths.get(\"/site/wwwroot\");", "type": "Path", "var_name": "FTP_ROOT" }, { "declarator": "NO_RESOURCES_...
{ "body": "protected void deployArtifacts(WebAppConfiguration webAppConfiguration)\n throws AzureAuthFailureException, InterruptedException, AzureExecutionException, IOException {\n try {\n util.beforeDeployArtifacts();\n final WebApp app = getWebApp();\n final DeployTar...
{ "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_265
{ "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 getRegion() throws AzureExecutionException {\n assertEquals(Region.EUROPE_WEST, parser.getRegion());\n\n doReturn(\"unknown-region\").when(mojo).getRegion();\n try {\n parser.getRegion();\n } catch (AzureExecutionException e) {\n asse...
{ "fields": [ { "declarator": "RUNTIME_NOT_EXIST = \"The configuration of <linuxRuntime> in pom.xml is not correct. \" +\n \"Please refer https://aka.ms/maven_webapp_runtime_v1 for more information\"", "modifier": "private static final", "original_string": "private static final String RUN...
{ "body": "@Override\n protected Region getRegion() throws AzureExecutionException {\n validate(validator.validateRegion());\n if (StringUtils.isEmpty(mojo.getRegion())) {\n return Region.EUROPE_WEST;\n }\n return Region.fromName(mojo.getRegion());\n }", "class_method_si...
{ "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_18
{ "fields": [ { "declarator": "mojo = null", "modifier": "private", "original_string": "private DeployMojo mojo = null;", "type": "DeployMojo", "var_name": "mojo" }, { "declarator": "mojoSpy = null", "modifier": "private", "original_string": "private DeployM...
{ "body": "@Test(expected = AzureExecutionException.class)\n public void getArtifactHandlerThrowException() throws Exception {\n getMojoFromPom().getArtifactHandler();\n }", "class_method_signature": "DeployMojoTest.getArtifactHandlerThrowException()", "constructor": false, "full_signature": "@Test...
{ "fields": [ { "declarator": "LIST_TRIGGERS_MAX_RETRY = 3", "modifier": "private static final", "original_string": "private static final int LIST_TRIGGERS_MAX_RETRY = 3;", "type": "int", "var_name": "LIST_TRIGGERS_MAX_RETRY" }, { "declarator": "LIST_TRIGGERS_RETRY_PERI...
{ "body": "protected ArtifactHandler getArtifactHandler() throws AzureExecutionException {\n final ArtifactHandlerBase.Builder builder;\n\n final DeploymentType deploymentType = getDeploymentType();\n getTelemetryProxy().addDefaultProperty(DEPLOYMENT_TYPE_KEY, deploymentType.toString());\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_232
{ "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 assureWarFileExistedWhenFileNotExist() throws AzureExecutionException {\n final File fileMock = mock(File.class);\n\n doReturn(\"test.war\").when(fileMock).getName();\n doReturn(false).when(fileMock).exists();\n bu...
{ "fields": [ { "declarator": "warFile", "modifier": "protected final", "original_string": "protected final String warFile;", "type": "String", "var_name": "warFile" }, { "declarator": "contextPath", "modifier": "protected final", "original_string": "protect...
{ "body": "protected void assureWarFileExisted(final File war) throws AzureExecutionException {\n if (!Files.getFileExtension(war.getName()).equalsIgnoreCase(\"war\")) {\n throw new AzureExecutionException(FILE_IS_NOT_WAR);\n }\n\n if (!war.exists() || !war.isFile()) {\n thr...
{ "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_183
{ "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 getValidReturnCodes() {\n assertEquals(Arrays.asList(0L), CommandUtils.getDefaultValidReturnCodes());\n }", "class_method_signature": "CommandUtilsTest.getValidReturnCodes()", "constructor": false, "full_signature": "@Test public void getValidReturnCodes()", "identi...
{ "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 List<Long> getValidReturnCodes() {\n return isWindows() ?\n // Windows return code of CTRL-C is 3221225786\n Arrays.asList(0L, 3221225786L) :\n // Linux return code of CTRL-C is 130\n Arrays.asList(0L, 130L);\n }", "class...
{ "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_38
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/configuration/AuthConfigurationTest.java", "identifier": "AuthConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetHttpProxyHost() {\n final AuthConfiguration auth = new AuthConfiguration();\n auth.setHttpProxyHost(\"httpProxyHost1\");\n assertEquals(\"httpProxyHost1\", auth.getHttpProxyHost());\n }", "class_method_signature": "AuthConfigurationTest.testSetHttpPro...
{ "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 setHttpProxyHost(String httpProxyHost) {\n this.httpProxyHost = httpProxyHost;\n }", "class_method_signature": "AuthConfiguration.setHttpProxyHost(String httpProxyHost)", "constructor": false, "full_signature": "public void setHttpProxyHost(String httpProxyHost)", "identifier"...
{ "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_245
{ "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 getDefaultArtifactHandler() throws AzureExecutionException {\n doReturn(project).when(mojo).getProject();\n doReturn(DeploymentType.EMPTY).when(mojo).getDeploymentType();\n project.setPackaging(\"jar\");\n final HandlerFactory factory = new HandlerFactoryI...
{ "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 ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException {\n switch (SchemaVersion.fromString(mojo.getSchemaVersion())) {\n case V1:\n return getV1ArtifactHandler(mojo);\n case V2:\n ret...
{ "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_212
{ "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.Update update = mock(WebApp.Update.class);\n final WebApp app = mock(WebApp.class);\n doRet...
{ "fields": [], "file": "azure-webapp-maven-plugin/src/main/java/com/microsoft/azure/maven/webapp/handlers/runtime/PublicDockerHubRuntimeHandlerImpl.java", "identifier": "PublicDockerHubRuntimeHandlerImpl", "interfaces": "", "methods": [ { "class_method_signature": "PublicDockerHubRuntimeHandlerImpl...
{ "body": "@Override\n public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException {\n WebAppUtils.assureLinuxWebApp(app);\n return app.update().withPublicDockerHubImage(image);\n }", "class_method_signature": "PublicDockerHubRuntimeHandlerImpl.updateAppRuntime(final W...
{ "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_80
{ "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 testWithResourceGroup() {\n final SpringConfiguration config = new SpringConfiguration();\n config.withResourceGroup(\"resourceGroup1\");\n assertEquals(\"resourceGroup1\", config.getResourceGroup());\n }", "class_method_signature": "SpringConfigurationTest....
{ "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 withResourceGroup(String resourceGroup) {\n this.resourceGroup = resourceGroup;\n return this;\n }", "class_method_signature": "SpringConfiguration.withResourceGroup(String resourceGroup)", "constructor": false, "full_signature": "public SpringConfiguration...
{ "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_79
{ "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 testWithSubscriptionId() {\n final SpringConfiguration config = new SpringConfiguration();\n config.withSubscriptionId(\"subscriptionId1\");\n assertEquals(\"subscriptionId1\", config.getSubscriptionId());\n }", "class_method_signature": "SpringConfiguration...
{ "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 withSubscriptionId(String subscriptionId) {\n this.subscriptionId = subscriptionId;\n return this;\n }", "class_method_signature": "SpringConfiguration.withSubscriptionId(String subscriptionId)", "constructor": false, "full_signature": "public SpringConfigu...
{ "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_96
{ "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 testEvaluateDefault() throws Exception {\n final Map<String, Map<String, Object>> templates = (Map<String, Map<String, Object>>) FieldUtils.readField(wrapper, \"templates\", true);\n final Map<String, Object> map = MapUtils.putAll(new LinkedHashMap<>(),\n ...
{ "fields": [ { "declarator": "expressionEvaluator", "modifier": "private", "original_string": "private ExpressionEvaluator expressionEvaluator;", "type": "ExpressionEvaluator", "var_name": "expressionEvaluator" }, { "declarator": "prompt", "modifier": "private", ...
{ "body": "public String handle(String templateId, boolean autoApplyDefault)\n throws InvalidConfigurationException, IOException {\n return handle(templateId, autoApplyDefault, null);\n }", "class_method_signature": "PromptWrapper.handle(String templateId, boolean autoApplyDefault)", "constru...
{ "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_204
{ "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\n public void createDeploymentSlotIfNotExist() throws AzureAuthFailureException, AzureExecutionException {\n final DeploymentSlotHandler handlerSpy = spy(handler);\n final DeploymentSlotSetting slotSetting = mock(DeploymentSlotSetting.class);\n final WebApp app = mock(WebApp.c...
{ "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": "public void createDeploymentSlotIfNotExist() throws AzureExecutionException, AzureAuthFailureException {\n final DeploymentSlotSetting slotSetting = this.mojo.getDeploymentSlotSetting();\n assureValidSlotSetting(slotSetting);\n\n final WebApp app = this.mojo.getWebApp();\n final...
{ "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_195
{ "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 getMavenSettings() {\n assertEquals(settings, mojo.getSettings());\n }", "class_method_signature": "AbstractAzureMojoTest.getMavenSettings()", "constructor": false, "full_signature": "@Test public void getMavenSettings()", "identifier": "getMavenSettings", "invoca...
{ "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 Settings getSettings() {\n return settings;\n }", "class_method_signature": "AbstractAzureMojo.getSettings()", "constructor": false, "full_signature": "@Override public Settings getSettings()", "identifier": "getSettings", "invocations": [], "modifiers": "@Overri...
{ "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_253
{ "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 getRegion() throws AzureExecutionException {\n doReturn(\"unknown-region\").when(mojo).getRegion();\n try {\n parser.getRegion();\n } catch (AzureExecutionException e) {\n assertEquals(e.getMessage(), \"The value of <region> is not supported...
{ "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 Region getRegion() throws AzureExecutionException {\n validate(validator.validateRegion());\n final String region = mojo.getRegion();\n return Region.fromName(region);\n }", "class_method_signature": "V2ConfigurationParser.getRegion()", "constructor": fa...
{ "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_0
{ "fields": [], "file": "azure-maven-plugin-common/src/test/java/com/microsoft/azure/maven/common/utils/MavenUtilsTest.java", "identifier": "MavenUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testPluginConfigurationFromBuild() throws Exception {\n final File pom = new File(this.getClass().getClassLoader().getResource(\"pom-1.xml\").getFile());\n final Model model = TestHelper.readMavenModel(pom);\n final MavenProject project = Mockito.mock(MavenProjec...
{ "fields": [], "file": "azure-maven-plugin-common/src/main/java/com/microsoft/azure/maven/common/utils/MavenUtils.java", "identifier": "MavenUtils", "interfaces": "", "methods": [ { "class_method_signature": "MavenUtils.getPluginConfiguration(MavenProject mavenProject, String pluginKey)", "co...
{ "body": "public static Xpp3Dom getPluginConfiguration(MavenProject mavenProject, String pluginKey) {\n final Plugin plugin = getPluginFromMavenModel(mavenProject.getModel(), pluginKey);\n return plugin == null ? null : (Xpp3Dom) plugin.getConfiguration();\n }", "class_method_signature": "MavenUti...
{ "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_101
{ "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 testHandleSelectMany() throws Exception {\n final Map<String, Map<String, Object>> templates = (Map<String, Map<String, Object>>) FieldUtils.readField(wrapper, \"templates\", true);\n final Map<String, Object> map = MapUtils.putAll(new LinkedHashMap<>(),\n ...
{ "fields": [ { "declarator": "expressionEvaluator", "modifier": "private", "original_string": "private ExpressionEvaluator expressionEvaluator;", "type": "ExpressionEvaluator", "var_name": "expressionEvaluator" }, { "declarator": "prompt", "modifier": "private", ...
{ "body": "public <T> List<T> handleMultipleCase(String templateId, List<T> options, Function<T, String> getNameFunc)\n throws IOException, NoResourcesAvailableException {\n final Map<String, Object> variables = createVariableTables(templateId);\n final boolean allowEmpty = TemplateUtils.eval...
{ "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_228
{ "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 publish() throws Exception {\n final File file = new File(\"\");\n final String path = \"\";\n\n final WebApp appMock = mock(WebApp.class);\n doReturn(appMock).when(mojo).getWebApp();\n doNothing().when(appMock).warDeploy(any(File.class), anyString(...
{ "fields": [ { "declarator": "warFile", "modifier": "protected final", "original_string": "protected final String warFile;", "type": "String", "var_name": "warFile" }, { "declarator": "contextPath", "modifier": "protected final", "original_string": "protect...
{ "body": "@Override\n public void publish(final DeployTarget target) throws AzureExecutionException {\n\n final File war = getWarFile();\n\n assureWarFileExisted(war);\n\n final Runnable warDeployExecutor = ArtifactHandlerUtils.getRealWarDeployExecutor(target, war, getContextPath());\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_55
{ "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 testDeviceLogin() throws Exception {\n final AzureEnvironment env = AzureEnvironment.AZURE;\n final AzureCredential credExpected = AzureCredential.fromAuthenticationResult(TestHelper.createAuthenticationResult());\n mockStatic(AzureLoginHelper.class);\n wh...
{ "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 AzureCredential deviceLogin(AzureEnvironment env)\n throws AzureLoginFailureException, MalformedURLException, InterruptedException, ExecutionException {\n return AzureLoginHelper.deviceLogin(env);\n }", "class_method_signature": "AzureAuthHelper.deviceLogin(AzureEnviron...
{ "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_156
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/utils/TextUtilsTest.java", "identifier": "TextUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSplitLinesNull() {\n try {\n TextUtils.splitLines(null);\n fail(\"Should throw NPE\");\n } catch (NullPointerException ex) {\n // expected\n }\n }", "class_method_signature": "TextUtilsTest.testSplitLinesNull()", "const...
{ "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_140
{ "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 testPromoteYesNoBadInput() throws Exception {\n when(reader.readLine()).thenReturn(\"foo\").thenReturn(\"bar\").thenReturn(\"Y\");\n final Boolean result = prompter.promoteYesNo(\"Do you want to continue(Y/n)\", null, true);\n assertNotNull(result);\n asse...
{ "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_269
{ "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 ContainerSetting containerSetting = mock(ContainerSetting.class);\n doReturn(containerSetting).when(mojo).getContainerSettings();\n doReturn(\"registryUrl\").when(containerSetting).getRegi...
{ "fields": [ { "declarator": "RUNTIME_NOT_EXIST = \"The configuration of <linuxRuntime> in pom.xml is not correct. \" +\n \"Please refer https://aka.ms/maven_webapp_runtime_v1 for more information\"", "modifier": "private static final", "original_string": "private static final String RUN...
{ "body": "@Override\n public String getRegistryUrl() {\n final ContainerSetting containerSetting = mojo.getContainerSettings();\n if (containerSetting == null) {\n return null;\n }\n return containerSetting.getRegistryUrl();\n }", "class_method_signature": "V1Configurat...
{ "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_14
{ "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 getStartFunctionHostCommand() throws Exception {\n final RunMojo mojo = getMojoFromPom();\n final RunMojo mojoSpy = spy(mojo);\n assertEquals(FUNC_HOST_START_CMD, mojoSpy.getStartFunctionHostCommand());\n System.setProperty(\"enableDebug\", \"true\");\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 String getStartFunctionHostCommand() {\n final String enableDebug = System.getProperty(\"enableDebug\");\n if (StringUtils.isNotEmpty(enableDebug) && enableDebug.equalsIgnoreCase(\"true\")) {\n return getStartFunctionHostWithDebugCommand();\n } else {\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_117
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/utils/ResourcesUtilsTest.java", "identifier": "ResourcesUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetDefaultResources() {\n final List<Resource> resources = ResourcesUtils.getDefaultResources();\n assertEquals(1, resources.size());\n final Resource resource = resources.get(0);\n assertNotNull(resource);\n assertEquals(\"${project.basedir}/ta...
{ "fields": [ { "declarator": "DEFAULT_DIRECTORY = \"${project.basedir}/target\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_DIRECTORY = \"${project.basedir}/target\";", "type": "String", "var_name": "DEFAULT_DIRECTORY" }, { ...
{ "body": "public static List<Resource> getDefaultResources() {\n final Resource resource = new Resource();\n resource.setDirectory(DEFAULT_DIRECTORY);\n resource.addInclude(DEFAULT_INCLUDE);\n return Collections.singletonList(resource);\n }", "class_method_signature": "ResourcesUtils...
{ "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_43
{ "fields": [ { "declarator": "localAuthServer", "modifier": "private", "original_string": "private LocalAuthServer localAuthServer;", "type": "LocalAuthServer", "var_name": "localAuthServer" } ], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/LocalAuthServ...
{ "body": "@Test\n public void testStop() throws IOException {\n localAuthServer.stop();\n // should not throw exception on second stop\n localAuthServer.stop();\n }", "class_method_signature": "LocalAuthServerTest.testStop()", "constructor": false, "full_signature": "@Test public voi...
{ "fields": [ { "declarator": "loginSuccessHTMLTemplate", "modifier": "private static", "original_string": "private static String loginSuccessHTMLTemplate;", "type": "String", "var_name": "loginSuccessHTMLTemplate" }, { "declarator": "loginErrorHTMLTemplate", "mod...
{ "body": "public void stop() throws IOException {\n semaphore.release();\n try {\n jettyServer.stop();\n } catch (Exception e) { // server.stop will throw Exception\n if (e instanceof RuntimeException) {\n // avoid unnecessary exception convert\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_180
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/function/handlers/CommandHandlerImplTest.java", "identifier": "CommandHandlerImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = Exception.class)\n public void handleExitValue() throws Exception {\n final CommandHandlerImpl handler = new CommandHandlerImpl();\n handler.handleExitValue(1, Arrays.asList(0L), \"\", null);\n }", "class_method_signature": "CommandHandlerImplTest.handleExitValue()", ...
{ "fields": [], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/function/handlers/CommandHandlerImpl.java", "identifier": "CommandHandlerImpl", "interfaces": "implements CommandHandler", "methods": [ { "class_method_signature": "CommandHandlerImpl.runCommandWithReturnCodeCheck(f...
{ "body": "protected void handleExitValue(int exitValue,\n final List<Long> validReturnCodes,\n final String errorMessage,\n final InputStream inputStream) throws AzureExecutionException, IOException {\n Log.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_246
{ "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 getAutoArtifactHandler() throws AzureExecutionException {\n doReturn(project).when(mojo).getProject();\n doReturn(DeploymentType.AUTO).when(mojo).getDeploymentType();\n project.setPackaging(\"war\");\n\n final HandlerFactory factory = new HandlerFactoryImp...
{ "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 ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException {\n switch (SchemaVersion.fromString(mojo.getSchemaVersion())) {\n case V1:\n return getV1ArtifactHandler(mojo);\n case V2:\n ret...
{ "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_138
{ "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 testPromoteStringEmpty() throws Exception {\n when(reader.readLine()).thenReturn(\":\");\n final String result = prompter.promoteString(\"Please input a string\", \"foo\", input -> {\n throw new RuntimeException();\n }, false);\n assertEquals(\"...
{ "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 String promoteString(String message, String defaultValue, Function<String, InputValidateResult<String>> verify, boolean isRequired)\n throws IOException {\n final boolean hasDefaultValue = StringUtils.isNotBlank(defaultValue);\n System.out.print(message);\n System.out...
{ "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_83
{ "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 testWithRuntimeVersion() {\n final SpringConfiguration config = new SpringConfiguration();\n config.withRuntimeVersion(\"runtimeVersion1\");\n assertEquals(\"runtimeVersion1\", config.getRuntimeVersion());\n }", "class_method_signature": "SpringConfiguration...
{ "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 withRuntimeVersion(String runtimeVersion) {\n this.runtimeVersion = runtimeVersion;\n return this;\n }", "class_method_signature": "SpringConfiguration.withRuntimeVersion(String runtimeVersion)", "constructor": false, "full_signature": "public SpringConfigu...
{ "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_211
{ "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 updateAppRuntimeTestV1() 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 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_207
{ "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 assureValidSlotNameThrowException() throws AzureExecutionException {\n final DeploymentSlotHandler handlerSpy = spy(handler);\n handlerSpy.assureValidSlotName(\"@#123\");\n }", "class_method_signature": "DeploymentSlotHandl...
{ "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 assureValidSlotName(final String slotName) throws AzureExecutionException {\n final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE);\n\n if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) {\n throw new AzureExecu...
{ "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_95
{ "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 testHandle() throws Exception {\n final Map<String, Map<String, Object>> templates = (Map<String, Map<String, Object>>) FieldUtils.readField(wrapper, \"templates\", true);\n final Map<String, Object> map = MapUtils.putAll(new LinkedHashMap<>(),\n new Map....
{ "fields": [ { "declarator": "expressionEvaluator", "modifier": "private", "original_string": "private ExpressionEvaluator expressionEvaluator;", "type": "ExpressionEvaluator", "var_name": "expressionEvaluator" }, { "declarator": "prompt", "modifier": "private", ...
{ "body": "public String handle(String templateId, boolean autoApplyDefault)\n throws InvalidConfigurationException, IOException {\n return handle(templateId, autoApplyDefault, null);\n }", "class_method_signature": "PromptWrapper.handle(String templateId, boolean autoApplyDefault)", "constru...
{ "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_196
{ "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 getSubscriptionId() throws Exception {\n assertEquals(SUBSCRIPTION_ID, mojo.getSubscriptionId());\n }", "class_method_signature": "AbstractAzureMojoTest.getSubscriptionId()", "constructor": false, "full_signature": "@Test public void getSubscriptionId()", "identifie...
{ "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 String getSubscriptionId() {\n return subscriptionId;\n }", "class_method_signature": "AbstractAzureMojo.getSubscriptionId()", "constructor": false, "full_signature": "@Override public String getSubscriptionId()", "identifier": "getSubscriptionId", "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_179
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/function/handlers/CommandHandlerImplTest.java", "identifier": "CommandHandlerImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getStdoutRedirect() {\n assertEquals(ProcessBuilder.Redirect.INHERIT, CommandHandlerImpl.getStdoutRedirect(true));\n assertEquals(ProcessBuilder.Redirect.PIPE, CommandHandlerImpl.getStdoutRedirect(false));\n }", "class_method_signature": "CommandHandlerImplTest.get...
{ "fields": [], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/function/handlers/CommandHandlerImpl.java", "identifier": "CommandHandlerImpl", "interfaces": "implements CommandHandler", "methods": [ { "class_method_signature": "CommandHandlerImpl.runCommandWithReturnCodeCheck(f...
{ "body": "protected static ProcessBuilder.Redirect getStdoutRedirect(boolean showStdout) {\n return showStdout ? ProcessBuilder.Redirect.INHERIT : ProcessBuilder.Redirect.PIPE;\n }", "class_method_signature": "CommandHandlerImpl.getStdoutRedirect(boolean showStdout)", "constructor": false, "full_sign...
{ "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_3
{ "fields": [], "file": "azure-functions-maven-plugin/src/test/java/com/microsoft/azure/maven/function/ListMojoTest.java", "identifier": "ListMojoTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void doExecute() throws Exception {\n PowerMockito.doNothing().when(Log.class);\n Log.info(any(String.class));\n final PrintStream out = mock(PrintStream.class);\n System.setOut(out);\n final ListMojo mojo = new ListMojo();\n mojo.doExecute();\n ...
{ "fields": [ { "declarator": "TEMPLATES_START = \">> templates begin <<\"", "modifier": "protected static final", "original_string": "protected static final String TEMPLATES_START = \">> templates begin <<\";", "type": "String", "var_name": "TEMPLATES_START" }, { "decl...
{ "body": "@Override\n protected void doExecute() throws AzureExecutionException {\n try {\n Log.info(TEMPLATES_START);\n printToSystemOut(TEMPLATES_FILE);\n Log.info(TEMPLATES_END);\n\n Log.info(BINDINGS_START);\n printToSystemOut(BINDINGS_FILE);\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_250
{ "fields": [], "file": "azure-webapp-maven-plugin/src/test/java/com/microsoft/azure/maven/webapp/utils/RuntimeStackUtilsTest.java", "identifier": "RuntimeStackUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getRuntimeStackFromString() {\n assertEquals(RuntimeStackUtils.getRuntimeStack(\"jre8\", \"tomcat 8.5\"), RuntimeStack.TOMCAT_8_5_JRE8);\n assertEquals(RuntimeStackUtils.getRuntimeStack(\"java11\", \"TOMCAT 9.0\"), RuntimeStack.TOMCAT_9_0_JAVA11);\n assertEquals(...
{ "fields": [ { "declarator": "JAVA_STACKS = Arrays.asList(\"JAVA\", \"TOMCAT\")", "modifier": "private static final", "original_string": "private static final List<String> JAVA_STACKS = Arrays.asList(\"JAVA\", \"TOMCAT\");", "type": "List<String>", "var_name": "JAVA_STACKS" }, ...
{ "body": "public static RuntimeStack getRuntimeStack(String javaVersion) {\n for (final RuntimeStack runtimeStack : getValidRuntimeStacks()) {\n if (runtimeStack.stack().equals(\"JAVA\") &&\n getJavaVersionFromRuntimeStack(runtimeStack).equalsIgnoreCase(javaVersion)) {\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_102
{ "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 testPromoteYesNoForOneOption() throws Exception {\n final Map<String, Map<String, Object>> templates = (Map<String, Map<String, Object>>) FieldUtils.readField(wrapper, \"templates\", true);\n final Map<String, Object> map = MapUtils.putAll(new LinkedHashMap<>(),\n ...
{ "fields": [ { "declarator": "expressionEvaluator", "modifier": "private", "original_string": "private ExpressionEvaluator expressionEvaluator;", "type": "ExpressionEvaluator", "var_name": "expressionEvaluator" }, { "declarator": "prompt", "modifier": "private", ...
{ "body": "public <T> List<T> handleMultipleCase(String templateId, List<T> options, Function<T, String> getNameFunc)\n throws IOException, NoResourcesAvailableException {\n final Map<String, Object> variables = createVariableTables(templateId);\n final boolean allowEmpty = TemplateUtils.eval...
{ "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_56
{ "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 testRefreshToken() throws Exception {\n final AzureEnvironment env = AzureEnvironment.AZURE;\n final AzureCredential credExpected = AzureCredential.fromAuthenticationResult(TestHelper.createAuthenticationResult());\n mockStatic(AzureLoginHelper.class);\n w...
{ "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 AzureCredential refreshToken(AzureEnvironment env, String refreshToken)\n throws MalformedURLException, InterruptedException, ExecutionException {\n return AzureLoginHelper.refreshToken(env, refreshToken);\n }", "class_method_signature": "AzureAuthHelper.refreshToken(Az...
{ "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_155
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/utils/TextUtilsTest.java", "identifier": "TextUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSplitLinesMixtureCRLF() {\n final String[] lines = TextUtils.splitLines(\"foo \\n bar \\r\\n baz\");\n assertEquals(3, lines.length);\n assertEquals(\"foo \", lines[0]);\n assertEquals(\" bar \", lines[1]);\n assertEquals(\" baz\", lines[2]);\n ...
{ "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_143
{ "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 testPromoteMultipleEntitiesOnlyOne() throws Exception {\n final List<Integer> selected = prompter.promoteMultipleEntities(\"This is header\", \"Please input range\",\n \"You have select no entities\", Collections.singletonList(100), t -> t.toString(), false,\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 <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_17
{ "fields": [ { "declarator": "mojo = null", "modifier": "private", "original_string": "private DeployMojo mojo = null;", "type": "DeployMojo", "var_name": "mojo" }, { "declarator": "mojoSpy = null", "modifier": "private", "original_string": "private DeployM...
{ "body": "@Test\n public void configureAppSettings() throws Exception {\n final WithCreate withCreate = mock(WithCreate.class);\n\n mojo.configureAppSettings(withCreate::withAppSettings, mojo.getAppSettingsWithDefaultValue());\n\n verify(withCreate, times(1)).withAppSettings(anyMap());\n }...
{ "fields": [ { "declarator": "LIST_TRIGGERS_MAX_RETRY = 3", "modifier": "private static final", "original_string": "private static final int LIST_TRIGGERS_MAX_RETRY = 3;", "type": "int", "var_name": "LIST_TRIGGERS_MAX_RETRY" }, { "declarator": "LIST_TRIGGERS_RETRY_PERI...
{ "body": "protected void configureAppSettings(final Consumer<Map> withAppSettings, final Map appSettings) {\n if (appSettings != null && !appSettings.isEmpty()) {\n withAppSettings.accept(appSettings);\n }\n }", "class_method_signature": "DeployMojo.configureAppSettings(final Consumer<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_114
{ "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 testEvalText() {\n final Map<String, Object> map = new HashMap<>();\n map.put(\"foo\", \"hello ***{{name}}***\");\n map.put(\"name\", \"Jack\");\n assertEquals(String.format(\"hello %s\", TextUtils.blue(\"Jack\")), evalText(\"foo\", map));\n }", "clas...
{ "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 evalText(String expr, Map<String, Object> variableMap) {\n // convert *** to blue color\n return evalPlainText(expr, variableMap).replaceAll(\"\\\\*\\\\*\\\\*(.*?)\\\\*\\\\*\\\\*\", TextUtils.blue(\"$1\"));\n }", "class_method_signature": "TemplateUtils.evalText(Stri...
{ "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_40
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/MavenSettingHelperTest.java", "identifier": "MavenSettingHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAuthConfigurationFromServer() throws Exception {\n final DefaultPlexusCipher cipher = new DefaultPlexusCipher();\n final String encryptedKey = cipher.encryptAndDecorate(\"hello\", \"fake_master_key\");\n final String xml = \"<configuration>\\n\" +\n ...
{ "fields": [], "file": "azure-auth-helper/src/main/java/com/microsoft/azure/auth/MavenSettingHelper.java", "identifier": "MavenSettingHelper", "interfaces": "", "methods": [ { "class_method_signature": "MavenSettingHelper.getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settin...
{ "body": "public static AuthConfiguration getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settingsDecrypter, String serverId)\n throws MavenDecryptException {\n if (StringUtils.isBlank(serverId)) {\n throw new IllegalArgumentException(\"Parameter 'serverId' cannot ...
{ "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_37
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/configuration/AuthConfigurationTest.java", "identifier": "AuthConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetServerId() {\n final AuthConfiguration auth = new AuthConfiguration();\n auth.setServerId(\"serverId1\");\n assertEquals(\"serverId1\", auth.getServerId());\n }", "class_method_signature": "AuthConfigurationTest.testSetServerId()", "constructor": fa...
{ "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 setServerId(String serverId) {\n this.serverId = serverId;\n }", "class_method_signature": "AuthConfiguration.setServerId(String serverId)", "constructor": false, "full_signature": "public void setServerId(String serverId)", "identifier": "setServerId", "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_163
{ "fields": [ { "declarator": "HTTP_TRIGGER_FUNCTION = \"HttpTriggerFunction\"", "modifier": "public static final", "original_string": "public static final String HTTP_TRIGGER_FUNCTION = \"HttpTriggerFunction\";", "type": "String", "var_name": "HTTP_TRIGGER_FUNCTION" }, { ...
{ "body": "@Test\n public void generateConfigurations() throws Exception {\n final AnnotationHandler handler = getAnnotationHandler();\n final Set<Method> functions = handler.findFunctions(Arrays.asList(getClassUrl()));\n final Map<String, FunctionConfiguration> configMap = handler.generateCon...
{ "fields": [], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/function/handlers/AnnotationHandlerImpl.java", "identifier": "AnnotationHandlerImpl", "interfaces": "implements AnnotationHandler", "methods": [ { "class_method_signature": "AnnotationHandlerImpl.findFunctions(final...
{ "body": "@Override\n public Map<String, FunctionConfiguration> generateConfigurations(final Set<Method> methods) throws AzureExecutionException {\n final Map<String, FunctionConfiguration> configMap = new HashMap<>();\n for (final Method method : methods) {\n final FunctionName functionA...
{ "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_60
{ "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 testEnvironmentValidation() {\n assertTrue(AzureAuthHelper.validateEnvironment(null));\n assertTrue(AzureAuthHelper.validateEnvironment(\"\"));\n assertTrue(AzureAuthHelper.validateEnvironment(\" \"));\n assertTrue(AzureAuthHelper.validateEnvironment(\"azu...
{ "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 boolean validateEnvironment(String environment) {\n if (StringUtils.isBlank(environment)) {\n return true;\n }\n switch (environment.toUpperCase(Locale.ENGLISH)) {\n case \"AZURE_CHINA\":\n case \"AZURECHINACLOUD\":\n case \"AZU...
{ "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_134
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/prompt/InputValidateResultTest.java", "identifier": "InputValidateResultTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWrap() {\n final Object obj = new Object();\n final InputValidateResult<Object> wrapper = InputValidateResult.wrap(obj);\n assertNotNull(wrapper);\n assertSame(obj, wrapper.getObj());\n assertNull(wrapper.getErrorMessage());\n }", "class_me...
{ "fields": [ { "declarator": "obj", "modifier": "private", "original_string": "private T obj;", "type": "T", "var_name": "obj" }, { "declarator": "errorMessage", "modifier": "private", "original_string": "private String errorMessage;", "type": "String...
{ "body": "public static <T> InputValidateResult<T> wrap(T obj) {\n final InputValidateResult<T> res = new InputValidateResult<>();\n res.obj = obj;\n return res;\n }", "class_method_signature": "InputValidateResult.wrap(T obj)", "constructor": false, "full_signature": "public static Inp...
{ "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_99
{ "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 testHandleSelectOne() throws Exception {\n final Map<String, Map<String, Object>> templates = (Map<String, Map<String, Object>>) FieldUtils.readField(wrapper, \"templates\", true);\n final Map<String, Object> map = MapUtils.putAll(new LinkedHashMap<>(),\n ...
{ "fields": [ { "declarator": "expressionEvaluator", "modifier": "private", "original_string": "private ExpressionEvaluator expressionEvaluator;", "type": "ExpressionEvaluator", "var_name": "expressionEvaluator" }, { "declarator": "prompt", "modifier": "private", ...
{ "body": "public <T> T handleSelectOne(String templateId, List<T> options, T defaultEntity, Function<T, String> getNameFunc)\n throws IOException, SpringConfigurationException {\n final Map<String, Object> variables = createVariableTables(templateId);\n final boolean isRequired = TemplateUti...
{ "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_76
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/DeploymentSettingsTest.java", "identifier": "DeploymentSettingsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetDeploymentName() {\n final DeploymentSettings deploy = new DeploymentSettings();\n deploy.setDeploymentName(\"deploymentName1\");\n assertEquals(\"deploymentName1\", deploy.getDeploymentName());\n }", "class_method_signature": "DeploymentSettingsTest....
{ "fields": [ { "declarator": "cpu", "modifier": "private", "original_string": "private String cpu;", "type": "String", "var_name": "cpu" }, { "declarator": "memoryInGB", "modifier": "private", "original_string": "private String memoryInGB;", "type": "...
{ "body": "public void setDeploymentName(String deploymentName) {\n this.deploymentName = deploymentName;\n }", "class_method_signature": "DeploymentSettings.setDeploymentName(String deploymentName)", "constructor": false, "full_signature": "public void setDeploymentName(String deploymentName)", "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_122
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/pom/PomXmlUpdaterTest.java", "identifier": "PomXmlUpdaterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSaveXml() throws Exception {\n final File pomFile = new File(this.getClass().getClassLoader().getResource(\"pom-4.xml\").getFile());\n final File tempFile = Files.createTempFile(\"azure-spring-cloud-plugin-test\", \".xml\").toFile();\n FileUtils.copyFile(pomF...
{ "fields": [ { "declarator": "project", "modifier": "private", "original_string": "private MavenProject project;", "type": "MavenProject", "var_name": "project" }, { "declarator": "plugin", "modifier": "private", "original_string": "private PluginDescriptor...
{ "body": "public void updateSettings(AppSettings app, DeploymentSettings deploy) throws DocumentException, IOException {\n final File pom = this.project.getFile();\n final SAXReader reader = new CustomSAXReader();\n reader.setDocumentFactory(new LocatorAwareDocumentFactory());\n final Doc...
{ "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_21
{ "fields": [], "file": "azure-functions-maven-plugin/src/test/java/com/microsoft/azure/maven/function/PackageMojoTest.java", "identifier": "PackageMojoTest", "interfaces": "", "superclass": "extends MojoTestBase" }
{ "body": "@Test\n public void doExecute() throws Exception {\n final PackageMojo mojo = getMojoFromPom();\n final PackageMojo mojoSpy = spy(mojo);\n final Set<Method> methods = new HashSet<>(Arrays.asList(this.getClass().getMethods()));\n ReflectionUtils.setVariableValueInObject(mojoSp...
{ "fields": [ { "declarator": "SEARCH_FUNCTIONS = \"Step 1 of 7: Searching for Azure Functions entry points\"", "modifier": "public static final", "original_string": "public static final String SEARCH_FUNCTIONS = \"Step 1 of 7: Searching for Azure Functions entry points\";", "type": "Strin...
{ "body": "@Override\n protected void doExecute() throws AzureExecutionException {\n promptCompileInfo();\n\n final AnnotationHandler annotationHandler = getAnnotationHandler();\n\n Set<Method> methods = null;\n try {\n methods = findAnnotatedMethods(annotationHandler);\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_175
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/function/handlers/FunctionCoreToolsHandlerImplTest.java", "identifier": "FunctionCoreToolsHandlerImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getLocalFunctionCoreToolsVersion() throws Exception {\n final CommandHandler commandHandler = mock(CommandHandler.class);\n final FunctionCoreToolsHandlerImpl functionCoreToolsHandler =\n new FunctionCoreToolsHandlerImpl(commandHandler);\n final Fu...
{ "fields": [ { "declarator": "FUNC_EXTENSIONS_INSTALL_TEMPLATE = \"func extensions install -c \\\"%s\\\" --java\"", "modifier": "public static final", "original_string": "public static final String FUNC_EXTENSIONS_INSTALL_TEMPLATE = \"func extensions install -c \\\"%s\\\" --java\";", "typ...
{ "body": "protected String getLocalFunctionCoreToolsVersion() {\n try {\n final String localVersion = commandHandler.runCommandAndGetOutput(\n GET_LOCAL_VERSION_CMD,\n false, /* showStdout */\n null /* workingDirectory */\n );\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_227
{ "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 publishWarArtifactThrowException() throws AzureExecutionException {\n final WebAppDeployTarget target = mock(WebAppDeployTarget.class);\n final File warArtifact = new File(\"D:\\\\temp\\\\dummypath\");\n final String cont...
{ "fields": [ { "declarator": "MAX_RETRY_TIMES = 3", "modifier": "private static final", "original_string": "private static final int MAX_RETRY_TIMES = 3;", "type": "int", "var_name": "MAX_RETRY_TIMES" }, { "declarator": "ALWAYS_DEPLOY_PROPERTY = \"alwaysDeploy\"", ...
{ "body": "public void publishWarArtifact(final DeployTarget target, final File warArtifact,\n final String contextPath) throws AzureExecutionException {\n final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath);\n Log.info(String.format(\"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_270
{ "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 getWebContainer() throws AzureExecutionException {\n try {\n parser.getWebContainer();\n } catch (AzureExecutionException e) {\n assertEquals(e.getMessage(), \"The configuration of <javaWebContainer> in pom.xml is not correct.\");\n }\n\n ...
{ "fields": [ { "declarator": "RUNTIME_NOT_EXIST = \"The configuration of <linuxRuntime> in pom.xml is not correct. \" +\n \"Please refer https://aka.ms/maven_webapp_runtime_v1 for more information\"", "modifier": "private static final", "original_string": "private static final String RUN...
{ "body": "@Override\n public WebContainer getWebContainer() throws AzureExecutionException {\n validate(validator.validateWebContainer());\n return mojo.getJavaWebContainer();\n }", "class_method_signature": "V1ConfigurationParser.getWebContainer()", "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_159
{ "fields": [ { "declarator": "testString = \"{\\\"id\\\":1,\\\"title\\\":\\\"hello\\\",\\\"children\\\":[{\\\"id\\\":2}]}\"", "modifier": "private final", "original_string": "private final String testString = \"{\\\"id\\\":1,\\\"title\\\":\\\"hello\\\",\\\"children\\\":[{\\\"id\\\":2}]}\";", ...
{ "body": "@Test\n public void testToJson() {\n final ObjectForJson objForJson = JsonUtils.fromJson(testString, ObjectForJson.class);\n final String json = JsonUtils.toJson(objForJson);\n assertEquals(testString, json);\n }", "class_method_signature": "JsonUtilsTest.testToJson()", "cons...
{ "fields": [ { "declarator": "GSON = new Gson()", "modifier": "private static final", "original_string": "private static final Gson GSON = new Gson();", "type": "Gson", "var_name": "GSON" } ], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/utils/JsonUti...
{ "body": "public static String toJson(Object src) {\n return GSON.toJson(src);\n }", "class_method_signature": "JsonUtils.toJson(Object src)", "constructor": false, "full_signature": "public static String toJson(Object src)", "identifier": "toJson", "invocations": [ "toJson" ], "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_266
{ "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 getRuntimeStack() throws AzureExecutionException {\n try {\n parser.getRuntimeStack();\n } catch (AzureExecutionException e) {\n assertEquals(e.getMessage(), \"Please configure the <linuxRuntime> in pom.xml.\");\n }\n\n doReturn(\"tom...
{ "fields": [ { "declarator": "RUNTIME_NOT_EXIST = \"The configuration of <linuxRuntime> in pom.xml is not correct. \" +\n \"Please refer https://aka.ms/maven_webapp_runtime_v1 for more information\"", "modifier": "private static final", "original_string": "private static final String RUN...
{ "body": "@Override\n public RuntimeStack getRuntimeStack() throws AzureExecutionException {\n validate(validator.validateRuntimeStack());\n final String linuxRuntime = mojo.getLinuxRuntime();\n // JavaSE runtime\n final RuntimeStack javaSERuntimeStack = RuntimeStackUtils.getRuntimeSta...
{ "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_231
{ "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 assureWarFileExistedWhenFileExtWrong() throws AzureExecutionException {\n buildHandler();\n handlerSpy.assureWarFileExisted(new File(\"test.jar\"));\n }", "class_method_signature": "WarArtifactHandlerImplTest.assureWarFileE...
{ "fields": [ { "declarator": "warFile", "modifier": "protected final", "original_string": "protected final String warFile;", "type": "String", "var_name": "warFile" }, { "declarator": "contextPath", "modifier": "protected final", "original_string": "protect...
{ "body": "protected void assureWarFileExisted(final File war) throws AzureExecutionException {\n if (!Files.getFileExtension(war.getName()).equalsIgnoreCase(\"war\")) {\n throw new AzureExecutionException(FILE_IS_NOT_WAR);\n }\n\n if (!war.exists() || !war.isFile()) {\n thr...
{ "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_118
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/utils/ResourcesUtilsTest.java", "identifier": "ResourcesUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testApplyDefaultResourcesToDom4j() throws Exception {\n final SAXReader reader = new SAXReader();\n final Document document = reader.read(this.getClass().getClassLoader().getResourceAsStream(\"test-2.xml\"));\n final Element rootNode = document.getRootElement();\...
{ "fields": [ { "declarator": "DEFAULT_DIRECTORY = \"${project.basedir}/target\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_DIRECTORY = \"${project.basedir}/target\";", "type": "String", "var_name": "DEFAULT_DIRECTORY" }, { ...
{ "body": "public static void applyDefaultResourcesToDom4j(Element root) {\n final DOMElement resourceRootNode = new DOMElement(\"resources\");\n for (final Resource resource : getDefaultResources()) {\n final DOMElement resourceNode = new DOMElement(\"resource\");\n\n XmlUtils.add...
{ "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_119
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/DeployMojoTest.java", "identifier": "DeployMojoTest", "interfaces": "", "superclass": "extends DeployMojo" }
{ "body": "@Test\n public void testCheckProjectPackaging() throws MojoExecutionException {\n final MavenProject mockProject = mock(MavenProject.class);\n\n doReturn(\"jar\").when(mockProject).getPackaging();\n assertTrue(checkProjectPackaging(mockProject));\n\n doReturn(\"pom\").when(mo...
{ "fields": [ { "declarator": "GET_URL_TIMEOUT = 60", "modifier": "private static final", "original_string": "private static final int GET_URL_TIMEOUT = 60;", "type": "int", "var_name": "GET_URL_TIMEOUT" }, { "declarator": "GET_STATUS_TIMEOUT = 180", "modifier": "...
{ "body": "protected boolean checkProjectPackaging(MavenProject project) throws MojoExecutionException {\n if (Utils.isJarPackagingProject(project)) {\n return true;\n } else if (Utils.isPomPackagingProject(project)) {\n getLog().info(PROJECT_SKIP);\n return false;\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_230
{ "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 getWarFile() {\n doReturn(null).when(mojo).getWarFile();\n doReturn(\"buildDirectory\").when(mojo).getBuildDirectoryAbsolutePath();\n\n final MavenProject projectMock = mock(MavenProject.class);\n final Build buildMock = mock(Build.class);\n doRetur...
{ "fields": [ { "declarator": "warFile", "modifier": "protected final", "original_string": "protected final String warFile;", "type": "String", "var_name": "warFile" }, { "declarator": "contextPath", "modifier": "protected final", "original_string": "protect...
{ "body": "protected File getWarFile() {\n return StringUtils.isNotEmpty(warFile) ? new File(warFile) :\n new File(project.getArtifactFile().toString());\n }", "class_method_signature": "WarArtifactHandlerImpl.getWarFile()", "constructor": false, "full_signature": "protected File getWarFile...
{ "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_267
{ "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 getImage() throws AzureExecutionException {\n try {\n parser.getImage();\n } catch (AzureExecutionException e) {\n assertEquals(e.getMessage(), \"Please config the <containerSettings> in pom.xml.\");\n }\n\n final ContainerSetting con...
{ "fields": [ { "declarator": "RUNTIME_NOT_EXIST = \"The configuration of <linuxRuntime> in pom.xml is not correct. \" +\n \"Please refer https://aka.ms/maven_webapp_runtime_v1 for more information\"", "modifier": "private static final", "original_string": "private static final String RUN...
{ "body": "@Override\n public String getImage() throws AzureExecutionException {\n validate(validator.validateImage());\n final ContainerSetting containerSetting = mojo.getContainerSettings();\n return containerSetting.getImageName();\n }", "class_method_signature": "V1ConfigurationParser...
{ "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_158
{ "fields": [ { "declarator": "testString = \"{\\\"id\\\":1,\\\"title\\\":\\\"hello\\\",\\\"children\\\":[{\\\"id\\\":2}]}\"", "modifier": "private final", "original_string": "private final String testString = \"{\\\"id\\\":1,\\\"title\\\":\\\"hello\\\",\\\"children\\\":[{\\\"id\\\":2}]}\";", ...
{ "body": "@Test\n public void testFromJson() {\n final String testFailure = \"{{{{{{{{{{{\";\n Object obj = null;\n\n try {\n obj = JsonUtils.fromJson(testString, Map.class);\n } catch (final Exception e) {\n fail(\"Fail to parse a json to java.util.Map.\");\n ...
{ "fields": [ { "declarator": "GSON = new Gson()", "modifier": "private static final", "original_string": "private static final Gson GSON = new Gson();", "type": "Gson", "var_name": "GSON" } ], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/utils/JsonUti...
{ "body": "public static <T> T fromJson(String json, Class<T> classOfT) throws JsonSyntaxException {\n return GSON.fromJson(json, classOfT);\n }", "class_method_signature": "JsonUtils.fromJson(String json, Class<T> classOfT)", "constructor": false, "full_signature": "public static T fromJson(String js...
{ "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_271
{ "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 getJavaVersion() throws AzureExecutionException {\n try {\n parser.getJavaVersion();\n } catch (AzureExecutionException e) {\n assertEquals(e.getMessage(), \"Please config the <javaVersion> in pom.xml.\");\n }\n\n doReturn(\"1.8\").wh...
{ "fields": [ { "declarator": "RUNTIME_NOT_EXIST = \"The configuration of <linuxRuntime> in pom.xml is not correct. \" +\n \"Please refer https://aka.ms/maven_webapp_runtime_v1 for more information\"", "modifier": "private static final", "original_string": "private static final String RUN...
{ "body": "@Override\n public JavaVersion getJavaVersion() throws AzureExecutionException {\n validate(validator.validateJavaVersion());\n return JavaVersion.fromString(mojo.getJavaVersion());\n }", "class_method_signature": "V1ConfigurationParser.getJavaVersion()", "constructor": false, "fu...
{ "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_226
{ "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 publishWarArtifact() throws AzureExecutionException {\n final WebAppDeployTarget target = mock(WebAppDeployTarget.class);\n final File warArtifact = new File(\"D:\\\\temp\\\\dummypath\");\n final String contextPath = \"dummy\";\n doNothing().when(target).w...
{ "fields": [ { "declarator": "MAX_RETRY_TIMES = 3", "modifier": "private static final", "original_string": "private static final int MAX_RETRY_TIMES = 3;", "type": "int", "var_name": "MAX_RETRY_TIMES" }, { "declarator": "ALWAYS_DEPLOY_PROPERTY = \"alwaysDeploy\"", ...
{ "body": "public void publishWarArtifact(final DeployTarget target, final File warArtifact,\n final String contextPath) throws AzureExecutionException {\n final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath);\n Log.info(String.format(\"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_174
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/function/handlers/FunctionCoreToolsHandlerImplTest.java", "identifier": "FunctionCoreToolsHandlerImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void installExtension() throws Exception {\n final CommandHandler commandHandler = mock(CommandHandler.class);\n final FunctionCoreToolsHandlerImpl functionCoreToolsHandler =\n new FunctionCoreToolsHandlerImpl(commandHandler);\n final FunctionCoreToolsH...
{ "fields": [ { "declarator": "FUNC_EXTENSIONS_INSTALL_TEMPLATE = \"func extensions install -c \\\"%s\\\" --java\"", "modifier": "public static final", "original_string": "public static final String FUNC_EXTENSIONS_INSTALL_TEMPLATE = \"func extensions install -c \\\"%s\\\" --java\";", "typ...
{ "body": "@Override\n public void installExtension(File stagingDirectory, File basedir) throws AzureExecutionException {\n assureRequirementAddressed();\n installFunctionExtension(stagingDirectory, basedir);\n }", "class_method_signature": "FunctionCoreToolsHandlerImpl.installExtension(File 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_20
{ "fields": [ { "declarator": "mojo = null", "modifier": "private", "original_string": "private DeployMojo mojo = null;", "type": "DeployMojo", "var_name": "mojo" }, { "declarator": "mojoSpy = null", "modifier": "private", "original_string": "private DeployM...
{ "body": "@Test\n public void testCreateDeploymentSlot() throws AzureAuthFailureException, AzureExecutionException {\n final FunctionDeploymentSlot slot = mock(FunctionDeploymentSlot.class);\n final DeploymentSlotSetting slotSetting = new DeploymentSlotSetting();\n slotSetting.setName(\"Test\...
{ "fields": [ { "declarator": "LIST_TRIGGERS_MAX_RETRY = 3", "modifier": "private static final", "original_string": "private static final int LIST_TRIGGERS_MAX_RETRY = 3;", "type": "int", "var_name": "LIST_TRIGGERS_MAX_RETRY" }, { "declarator": "LIST_TRIGGERS_RETRY_PERI...
{ "body": "protected FunctionDeploymentSlot createDeploymentSlot(final FunctionApp functionApp, final FunctionRuntimeHandler runtimeHandler)\n throws AzureExecutionException, AzureAuthFailureException {\n Log.info(FUNCTION_SLOT_CREATE_START);\n final DeploymentSlotSetting slotSetting = getDep...
{ "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_123
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/pom/PomXmlUpdaterTest.java", "identifier": "PomXmlUpdaterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSaveXmlNoBuild() throws Exception {\n final File pomFile = new File(this.getClass().getClassLoader().getResource(\"pom-5.xml\").getFile());\n final File tempFile = Files.createTempFile(\"azure-spring-cloud-plugin-test\", \".xml\").toFile();\n FileUtils.copyFi...
{ "fields": [ { "declarator": "project", "modifier": "private", "original_string": "private MavenProject project;", "type": "MavenProject", "var_name": "project" }, { "declarator": "plugin", "modifier": "private", "original_string": "private PluginDescriptor...
{ "body": "public void updateSettings(AppSettings app, DeploymentSettings deploy) throws DocumentException, IOException {\n final File pom = this.project.getFile();\n final SAXReader reader = new CustomSAXReader();\n reader.setDocumentFactory(new LocatorAwareDocumentFactory());\n final Doc...
{ "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_98
{ "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 testHandleBadConfiguration() throws Exception {\n final Map<String, Map<String, Object>> templates = (Map<String, Map<String, Object>>) FieldUtils.readField(wrapper, \"templates\", true);\n final Map<String, Object> map = MapUtils.putAll(new LinkedHashMap<>(),\n ...
{ "fields": [ { "declarator": "expressionEvaluator", "modifier": "private", "original_string": "private ExpressionEvaluator expressionEvaluator;", "type": "ExpressionEvaluator", "var_name": "expressionEvaluator" }, { "declarator": "prompt", "modifier": "private", ...
{ "body": "public String handle(String templateId, boolean autoApplyDefault)\n throws InvalidConfigurationException, IOException {\n return handle(templateId, autoApplyDefault, null);\n }", "class_method_signature": "PromptWrapper.handle(String templateId, boolean autoApplyDefault)", "constru...
{ "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_77
{ "fields": [], "file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/DeploymentSettingsTest.java", "identifier": "DeploymentSettingsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetJvmOptions() {\n final DeploymentSettings deploy = new DeploymentSettings();\n deploy.setJvmOptions(\"jvmOptions1\");\n assertEquals(\"jvmOptions1\", deploy.getJvmOptions());\n }", "class_method_signature": "DeploymentSettingsTest.testSetJvmOptions()"...
{ "fields": [ { "declarator": "cpu", "modifier": "private", "original_string": "private String cpu;", "type": "String", "var_name": "cpu" }, { "declarator": "memoryInGB", "modifier": "private", "original_string": "private String memoryInGB;", "type": "...
{ "body": "public void setJvmOptions(String jvmOptions) {\n this.jvmOptions = jvmOptions;\n }", "class_method_signature": "DeploymentSettings.setJvmOptions(String jvmOptions)", "constructor": false, "full_signature": "public void setJvmOptions(String jvmOptions)", "identifier": "setJvmOptions", "i...
{ "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_135
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/prompt/InputValidateResultTest.java", "identifier": "InputValidateResultTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testError() {\n final InputValidateResult<Object> wrapper = InputValidateResult.error(\"message\");\n assertNotNull(wrapper);\n assertEquals(\"message\", wrapper.getErrorMessage());\n assertNull(wrapper.getObj());\n }", "class_method_signature": "Inpu...
{ "fields": [ { "declarator": "obj", "modifier": "private", "original_string": "private T obj;", "type": "T", "var_name": "obj" }, { "declarator": "errorMessage", "modifier": "private", "original_string": "private String errorMessage;", "type": "String...
{ "body": "public static <T> InputValidateResult<T> error(String errorMessage) {\n final InputValidateResult<T> res = new InputValidateResult<>();\n res.errorMessage = errorMessage;\n return res;\n }", "class_method_signature": "InputValidateResult.error(String errorMessage)", "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_61
{ "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 testGetAzureSecretFile() {\n TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, null);\n final File azureSecretFile = AzureAuthHelper.getAzureSecretFile();\n assertEquals(Paths.get(System.getProperty(\"user.home\"), \".azure\", \"azure-secret.json\"...
{ "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 File getAzureSecretFile() {\n return new File(getAzureConfigFolder(), Constants.AZURE_SECRET_FILE);\n }", "class_method_signature": "AzureAuthHelper.getAzureSecretFile()", "constructor": false, "full_signature": "public static File getAzureSecretFile()", "identifier": "getAz...
{ "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_162
{ "fields": [ { "declarator": "HTTP_TRIGGER_FUNCTION = \"HttpTriggerFunction\"", "modifier": "public static final", "original_string": "public static final String HTTP_TRIGGER_FUNCTION = \"HttpTriggerFunction\";", "type": "String", "var_name": "HTTP_TRIGGER_FUNCTION" }, { ...
{ "body": "@Test\n public void findFunctions() throws Exception {\n final AnnotationHandler handler = getAnnotationHandler();\n final Set<Method> functions = handler.findFunctions(Arrays.asList(getClassUrl()));\n\n assertEquals(13, functions.size());\n final List<String> methodNames = f...
{ "fields": [], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/function/handlers/AnnotationHandlerImpl.java", "identifier": "AnnotationHandlerImpl", "interfaces": "implements AnnotationHandler", "methods": [ { "class_method_signature": "AnnotationHandlerImpl.findFunctions(final...
{ "body": "@Override\n public Set<Method> findFunctions(final List<URL> urls) {\n return new Reflections(\n new ConfigurationBuilder()\n .addUrls(urls)\n .setScanners(new MethodAnnotationsScanner())\n .addClassLoader(getClas...
{ "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_36
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/configuration/AuthConfigurationTest.java", "identifier": "AuthConfigurationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSetEnvironment() {\n final AuthConfiguration auth = new AuthConfiguration();\n auth.setEnvironment(\"environment1\");\n assertEquals(\"environment1\", auth.getEnvironment());\n }", "class_method_signature": "AuthConfigurationTest.testSetEnvironment()", ...
{ "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 setEnvironment(String environment) {\n this.environment = environment;\n }", "class_method_signature": "AuthConfiguration.setEnvironment(String environment)", "constructor": false, "full_signature": "public void setEnvironment(String environment)", "identifier": "setEnvironmen...
{ "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_41
{ "fields": [], "file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/MavenSettingHelperTest.java", "identifier": "MavenSettingHelperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBadServerId() throws Exception {\n final Server server = Mockito.mock(Server.class);\n final Settings mavenSettings = Mockito.mock(Settings.class);\n Mockito.when(mavenSettings.getServer(\"test1\")).thenReturn(server);\n\n final MavenSession mavenSessi...
{ "fields": [], "file": "azure-auth-helper/src/main/java/com/microsoft/azure/auth/MavenSettingHelper.java", "identifier": "MavenSettingHelper", "interfaces": "", "methods": [ { "class_method_signature": "MavenSettingHelper.getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settin...
{ "body": "public static AuthConfiguration getAuthConfigurationFromServer(MavenSession session, SettingsDecrypter settingsDecrypter, String serverId)\n throws MavenDecryptException {\n if (StringUtils.isBlank(serverId)) {\n throw new IllegalArgumentException(\"Parameter 'serverId' cannot ...
{ "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_115
{ "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 testEndlessEval() {\n final Map<String, Object> map = new HashMap<>();\n map.put(\"foo\", \"hello {{name}}\");\n map.put(\"name\", \"{{foo}}\");\n assertEquals(\"hello hello hello hello {{name}}\", evalPlainText(\"foo\", map));\n }", "class_method_sig...
{ "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_16
{ "fields": [ { "declarator": "mojo = null", "modifier": "private", "original_string": "private DeployMojo mojo = null;", "type": "DeployMojo", "var_name": "mojo" }, { "declarator": "mojoSpy = null", "modifier": "private", "original_string": "private DeployM...
{ "body": "@Test\n public void updateFunctionApp() throws Exception {\n final FunctionApp app = mock(FunctionApp.class);\n final Update update = mock(Update.class);\n doNothing().when(mojoSpy).configureAppSettings(any(Consumer.class), anyMap());\n final FunctionRuntimeHandler functionRu...
{ "fields": [ { "declarator": "LIST_TRIGGERS_MAX_RETRY = 3", "modifier": "private static final", "original_string": "private static final int LIST_TRIGGERS_MAX_RETRY = 3;", "type": "int", "var_name": "LIST_TRIGGERS_MAX_RETRY" }, { "declarator": "LIST_TRIGGERS_RETRY_PERI...
{ "body": "protected FunctionApp updateFunctionApp(final FunctionApp app, final FunctionRuntimeHandler runtimeHandler)\n throws AzureAuthFailureException, AzureExecutionException {\n Log.info(FUNCTION_APP_UPDATE);\n runtimeHandler.updateAppServicePlan(app);\n final Update update = runt...
{ "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_142
{ "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 testPromoteMultipleEntitiesAllowEmpty() throws Exception {\n when(reader.readLine()).thenReturn(\"1\").thenReturn(\"1-2\").thenReturn(\"1-2,3-5\").thenReturn(\"3-1000000,1-2,3-5\");\n final List<Integer> integers = new ArrayList<>();\n for (int i = 0; i < 10; i++...
{ "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_154
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/utils/TextUtilsTest.java", "identifier": "TextUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSplitLinesCRLF() {\n final String[] lines = TextUtils.splitLines(\"foo \\r\\n bar \\r\\n baz\");\n assertEquals(3, lines.length);\n assertEquals(\"foo \", lines[0]);\n assertEquals(\" bar \", lines[1]);\n assertEquals(\" baz\", lines[2]);\n }...
{ "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_57
{ "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 testRefreshTokenInvalidToken() throws Exception {\n try {\n AzureAuthHelper.refreshToken(AzureEnvironment.AZURE, \"invalid\");\n fail(\"Should throw AzureLoginFailureException when refreshToken is invalid.\");\n } catch (ExecutionException e) {\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 AzureCredential refreshToken(AzureEnvironment env, String refreshToken)\n throws MalformedURLException, InterruptedException, ExecutionException {\n return AzureLoginHelper.refreshToken(env, refreshToken);\n }", "class_method_signature": "AzureAuthHelper.refreshToken(Az...
{ "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_103
{ "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 testConfirmChanges() throws Exception {\n final Map<String, String> changesToConfirm = MapUtils.putAll(new LinkedHashMap<>(),\n new Map.Entry[] { new DefaultMapEntry<>(\"foo\", \"bar\"),\n new DefaultMapEntry<>(\"count\", \"1\"),\n ...
{ "fields": [ { "declarator": "expressionEvaluator", "modifier": "private", "original_string": "private ExpressionEvaluator expressionEvaluator;", "type": "ExpressionEvaluator", "var_name": "expressionEvaluator" }, { "declarator": "prompt", "modifier": "private", ...
{ "body": "public void confirmChanges(Map<String, String> changesToConfirm, Supplier<Integer> confirmedAction) throws IOException {\n final Map<String, Object> variables = createVariableTables(\"confirm\");\n System.out.println(TemplateUtils.evalText(\"promote.header\", variables));\n for (final ...
{ "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_2
{ "fields": [], "file": "azure-maven-plugin-common/src/test/java/com/microsoft/azure/maven/common/utils/MavenUtilsTest.java", "identifier": "MavenUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNoPluginConfigurationFromBuild() throws Exception {\n final File pom = new File(this.getClass().getClassLoader().getResource(\"pom-3.xml\").getFile());\n final Model model = TestHelper.readMavenModel(pom);\n final MavenProject project = Mockito.mock(MavenProj...
{ "fields": [], "file": "azure-maven-plugin-common/src/main/java/com/microsoft/azure/maven/common/utils/MavenUtils.java", "identifier": "MavenUtils", "interfaces": "", "methods": [ { "class_method_signature": "MavenUtils.getPluginConfiguration(MavenProject mavenProject, String pluginKey)", "co...
{ "body": "public static Xpp3Dom getPluginConfiguration(MavenProject mavenProject, String pluginKey) {\n final Plugin plugin = getPluginFromMavenModel(mavenProject.getModel(), pluginKey);\n return plugin == null ? null : (Xpp3Dom) plugin.getConfiguration();\n }", "class_method_signature": "MavenUti...
{ "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_251
{ "fields": [], "file": "azure-webapp-maven-plugin/src/test/java/com/microsoft/azure/maven/webapp/utils/RuntimeStackUtilsTest.java", "identifier": "RuntimeStackUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getWebContainerFromRuntimeStack() {\n assertEquals(RuntimeStackUtils.getWebContainerFromRuntimeStack(RuntimeStack.TOMCAT_8_5_JAVA11), \"TOMCAT 8.5\");\n assertEquals(RuntimeStackUtils.getWebContainerFromRuntimeStack(RuntimeStack.JAVA_8_JRE8), \"jre8\");\n assertE...
{ "fields": [ { "declarator": "JAVA_STACKS = Arrays.asList(\"JAVA\", \"TOMCAT\")", "modifier": "private static final", "original_string": "private static final List<String> JAVA_STACKS = Arrays.asList(\"JAVA\", \"TOMCAT\");", "type": "List<String>", "var_name": "JAVA_STACKS" }, ...
{ "body": "public static String getWebContainerFromRuntimeStack(RuntimeStack runtimeStack) {\n final String stack = runtimeStack.stack();\n final String version = runtimeStack.version();\n return stack.equalsIgnoreCase(\"JAVA\") ?\n version.split(\"-\")[1] : stack + \" \" + version...
{ "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_197
{ "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 getTelemetryProxy() {\n assertEquals(telemetryProxy, mojo.getTelemetryProxy());\n }", "class_method_signature": "AbstractAzureMojoTest.getTelemetryProxy()", "constructor": false, "full_signature": "@Test public void getTelemetryProxy()", "identifier": "getTelemetryP...
{ "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 TelemetryProxy getTelemetryProxy() {\n if (telemetryProxy == null) {\n initTelemetry();\n }\n return telemetryProxy;\n }", "class_method_signature": "AbstractAzureMojo.getTelemetryProxy()", "constructor": false, "full_signature": "public TelemetryProxy getTel...
{ "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_178
{ "fields": [], "file": "azure-tools-common/src/test/java/com/microsoft/azure/common/function/handlers/CommandHandlerImplTest.java", "identifier": "CommandHandlerImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void buildCommand() {\n assertEquals(3, CommandHandlerImpl.buildCommand(\"cmd\").length);\n }", "class_method_signature": "CommandHandlerImplTest.buildCommand()", "constructor": false, "full_signature": "@Test public void buildCommand()", "identifier": "buildCommand", ...
{ "fields": [], "file": "azure-tools-common/src/main/java/com/microsoft/azure/common/function/handlers/CommandHandlerImpl.java", "identifier": "CommandHandlerImpl", "interfaces": "implements CommandHandler", "methods": [ { "class_method_signature": "CommandHandlerImpl.runCommandWithReturnCodeCheck(f...
{ "body": "protected static String[] buildCommand(final String command) {\n return CommandUtils.isWindows() ?\n new String[]{\"cmd.exe\", \"/c\", command} :\n new String[]{\"sh\", \"-c\", command};\n }", "class_method_signature": "CommandHandlerImpl.buildCommand(final String ...
{ "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" }