id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
95752629_262 | {
"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 getResourceGroup() throws AzureExecutionException {\n doReturn(\"resourceGroupName\").when(mojo).getResourceGroup();\n assertEquals(\"resourceGroupName\", parser.getResourceGroup());\n\n doReturn(\"invalid**ResourceGroupName\").when(mojo).getResourceGroup();\n ... | {
"fields": [
{
"declarator": "mojo",
"modifier": "protected final",
"original_string": "protected final AbstractWebAppMojo mojo;",
"type": "AbstractWebAppMojo",
"var_name": "mojo"
},
{
"declarator": "validator",
"modifier": "protected final",
"original_stri... | {
"body": "protected String getResourceGroup() throws AzureExecutionException {\n validate(validator.validateResourceGroup());\n return mojo.getResourceGroup();\n }",
"class_method_signature": "ConfigurationParser.getResourceGroup()",
"constructor": false,
"full_signature": "protected String ge... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_274 | {
"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 deployToDeploymentSlot() throws Exception {\n final DeployMojo mojo = getMojoFromPom(\"/pom-slot.xml\");\n final DeployMojo mojoSpy = spy(mojo);\n final DeploymentSlot slot = mock(DeploymentSlot.class);\n final WebApp app = mock(WebApp.class);\n fin... | {
"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_223 | {
"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 publishArtifactsViaWarDeploy() throws AzureExecutionException {\n final WebApp app = mock(WebApp.class);\n final DeployTarget target = new WebAppDeployTarget(app);\n final String stagingDirectory = Paths.get(Paths.get(\"\").toAbsolutePath().toString(),\n ... | {
"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 publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath,\n final List<File> warArtifacts) throws AzureExecutionException {\n if (warArtifacts == null || warArtifacts.size() == 0) {\n throw new ... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_171 | {
"fields": [],
"file": "azure-tools-common/src/test/java/com/microsoft/azure/common/function/handlers/artifact/FunctionArtifactHelperTest.java",
"identifier": "FunctionArtifactHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUpdateAppSetting() throws Exception {\n final DeployTarget deployTarget = mock(DeployTarget.class);\n final FunctionApp functionApp = mock(FunctionApp.class);\n doReturn(functionApp).when(deployTarget).getApp();\n final FunctionApp.Update update = mock... | {
"fields": [
{
"declarator": "STAGE_DIR_NOT_FOUND = \"Azure Functions stage directory not found. \" +\n \"Please run 'mvn clean azure-functions:package' first.\"",
"modifier": "private static final",
"original_string": "private static final String STAGE_DIR_NOT_FOUND = \"Azure Functi... | {
"body": "public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException {\n final WebAppBase targetApp = deployTarget.getApp();\n if (targetApp instanceof FunctionApp) {\n ((FunctionApp) targetApp).update().withAppSe... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_25 | {
"fields": [],
"file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureServicePrincipleAuthHelperTest.java",
"identifier": "AzureServicePrincipleAuthHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetSPCredentialsBadParameter() throws Exception {\n final AuthConfiguration config = new AuthConfiguration();\n try {\n AzureServicePrincipleAuthHelper.getAzureServicePrincipleCredentials(config);\n fail(\"Should throw IAE\");\n } catch ... | {
"fields": [
{
"declarator": "AZURE_CLI_GET_SUBSCRIPTION_FAIL = \"Failed to get default subscription of Azure CLI, please login Azure CLI first.\"",
"modifier": "private static final",
"original_string": "private static final String AZURE_CLI_GET_SUBSCRIPTION_FAIL = \"Failed to get default subs... | {
"body": "static AzureTokenCredentials getAzureServicePrincipleCredentials(AuthConfiguration config) throws InvalidConfigurationException, IOException {\n if (StringUtils.isBlank(config.getClient())) {\n throw new IllegalArgumentException(\"'Client Id' of your service principal is not configured.\"... | {
"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_258 | {
"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 doReturn(null).when(mojo).getRuntime();\n\n try {\n parser.getWebContainer();\n } catch (AzureExecutionException e) {\n assertEquals(e.getMessage(), \"Pleas config the <runtime> in pom.xml... | {
"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 WebContainer getWebContainer() throws AzureExecutionException {\n validate(validator.validateWebContainer());\n final RuntimeSetting runtime = mojo.getRuntime();\n return runtime.getWebContainer();\n }",
"class_method_signature": "V2ConfigurationParser.get... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_126 | {
"fields": [
{
"declarator": "validator",
"modifier": "private",
"original_string": "private SchemaValidator validator;",
"type": "SchemaValidator",
"var_name": "validator"
}
],
"file": "azure-tools-common/src/test/java/com/microsoft/azure/common/validation/SchemaValidatorTe... | {
"body": "@Test\n public void testMoreThanOneViolations() throws Exception {\n final String err = validator.validateSingleProperty(\"App\", \"appName\", \"_thisisaverylonglonglonglonglongtext\");\n assertTrue(err.contains(\"The input violates the validation rules\"));\n }",
"class_method_signat... | {
"fields": [
{
"declarator": "schemaMap = new HashMap<>()",
"modifier": "private",
"original_string": "private Map<String, Map<String, Object>> schemaMap = new HashMap<>();",
"type": "Map<String, Map<String, Object>>",
"var_name": "schemaMap"
},
{
"declarator": "schema... | {
"body": "public String validateSingleProperty(String resource, String property, String value) {\n checkExistSchema(resource, property);\n final JsonNode schema = this.schemas.get(combineToKey(resource, property));\n final String type = (String) schemaMap.get(combineToKey(resource, property)).ge... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_72 | {
"fields": [],
"file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/VolumeTest.java",
"identifier": "VolumeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWithPersist() {\n final Volume volume = new Volume();\n volume.withPersist(true);\n assertEquals(Boolean.TRUE, volume.isPersist());\n }",
"class_method_signature": "VolumeTest.testWithPersist()",
"constructor": false,
"full_signature": "@Test public ... | {
"fields": [
{
"declarator": "path",
"modifier": "private",
"original_string": "private String path;",
"type": "String",
"var_name": "path"
},
{
"declarator": "size",
"modifier": "private",
"original_string": "private String size;",
"type": "String",
... | {
"body": "public Volume withPersist(Boolean persist) {\n this.persist = persist;\n return this;\n }",
"class_method_signature": "Volume.withPersist(Boolean persist)",
"constructor": false,
"full_signature": "public Volume withPersist(Boolean persist)",
"identifier": "withPersist",
"invocat... | {
"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_130 | {
"fields": [
{
"declarator": "builder = new ZIPArtifactHandlerImpl.Builder()",
"modifier": "private",
"original_string": "private ZIPArtifactHandlerImpl.Builder builder = new ZIPArtifactHandlerImpl.Builder();",
"type": "ZIPArtifactHandlerImpl.Builder",
"var_name": "builder"
},
... | {
"body": "@Test(expected = ZipException.class)\n public void getZipFileThrowException() {\n handler = builder.stagingDirectoryPath(\"\").build();\n handlerSpy = spy(handler);\n handlerSpy.getZipFile();\n }",
"class_method_signature": "ZIPArtifactHandlerImplTest.getZipFileThrowException()... | {
"fields": [
{
"declarator": "DEFAULT_MAX_RETRY_TIMES = 3",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_MAX_RETRY_TIMES = 3;",
"type": "int",
"var_name": "DEFAULT_MAX_RETRY_TIMES"
},
{
"declarator": "LOCAL_SETTINGS_FILE = \"... | {
"body": "protected File getZipFile() {\n final File zipFile = new File(stagingDirectoryPath + \".zip\");\n final File stagingDirectory = new File(stagingDirectoryPath);\n\n ZipUtil.pack(stagingDirectory, zipFile);\n ZipUtil.removeEntry(zipFile, LOCAL_SETTINGS_FILE);\n return zipFi... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_64 | {
"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 testReadAzureCredentials() throws Exception {\n final File testConfigDir = new File(this.getClass().getResource(\"/azure-login/azure-secret.json\").getFile()).getParentFile();\n TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.getAbsolutePa... | {
"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 readAzureCredentials() throws IOException {\n return readAzureCredentials(getAzureSecretFile());\n }",
"class_method_signature": "AzureAuthHelper.readAzureCredentials()",
"constructor": false,
"full_signature": "public static AzureCredential readAzureCredential... | {
"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_219 | {
"fields": [
{
"declarator": "config",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebAppConfiguration config;",
"type": "WebAppConfiguration",
"var_name": "config"
},
{
"declarator": "azureClient",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void updateAppRuntimeTestV2() throws Exception {\n final WebApp app = mock(WebApp.class);\n final SiteInner siteInner = mock(SiteInner.class);\n doReturn(siteInner).when(app).inner();\n doReturn(\"app\").when(siteInner).kind();\n doReturn(WebContainer.TO... | {
"fields": [],
"file": "azure-webapp-maven-plugin/src/main/java/com/microsoft/azure/maven/webapp/handlers/runtime/WindowsRuntimeHandlerImpl.java",
"identifier": "WindowsRuntimeHandlerImpl",
"interfaces": "",
"methods": [
{
"class_method_signature": "WindowsRuntimeHandlerImpl.WindowsRuntimeHandlerIm... | {
"body": "@Override\n public Update updateAppRuntime(final WebApp app) throws AzureExecutionException {\n WebAppUtils.assureWindowsWebApp(app);\n final Update update = app.update();\n update.withJavaVersion(javaVersion).withWebContainer(webContainer);\n return update;\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_167 | {
"fields": [
{
"declarator": "handler",
"modifier": "private",
"original_string": "private MSDeployArtifactHandlerImpl handler;",
"type": "MSDeployArtifactHandlerImpl",
"var_name": "handler"
},
{
"declarator": "handlerSpy",
"modifier": "private",
"original_... | {
"body": "@Test\n public void deployWithPackageUri() throws Exception {\n final FunctionApp app = mock(FunctionApp.class);\n final DeployTarget deployTarget = mock(DeployTarget.class);\n final WithPackageUri withPackageUri = mock(WithPackageUri.class);\n doReturn(withPackageUri).when(a... | {
"fields": [
{
"declarator": "DEPLOYMENT_PACKAGE_CONTAINER = \"java-functions-deployment-packages\"",
"modifier": "public static final",
"original_string": "public static final String DEPLOYMENT_PACKAGE_CONTAINER = \"java-functions-deployment-packages\";",
"type": "String",
"var_nam... | {
"body": "protected void deployWithPackageUri(final DeployTarget target, final String packageUri, Runnable onDeployFinish) {\n try {\n Log.prompt(DEPLOY_PACKAGE_START);\n target.msDeploy(packageUri, false);\n Log.prompt(DEPLOY_PACKAGE_DONE);\n } finally {\n o... | {
"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_188 | {
"fields": [],
"file": "azure-tools-common/src/test/java/com/microsoft/azure/common/UtilsTest.java",
"identifier": "UtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseOperationSystemUnknown() throws Exception {\n try {\n Utils.parseOperationSystem(\"unkown\");\n fail(\"expected AzureExecutionException when os is invalid\");\n } catch (AzureExecutionException ex) {\n // expected AzureExecution... | {
"fields": [
{
"declarator": "POM = \"pom\"",
"modifier": "private static final",
"original_string": "private static final String POM = \"pom\";",
"type": "String",
"var_name": "POM"
},
{
"declarator": "JAR = \"jar\"",
"modifier": "private static final",
"o... | {
"body": "public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException {\n if (StringUtils.isEmpty(os)) {\n throw new AzureExecutionException(\"The value of 'os' is empty, please specify it in 'runtime' configuration.\");\n }\n switch (os.toLo... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_33 | {
"fields": [],
"file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/configuration/AuthConfigurationTest.java",
"identifier": "AuthConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetKey() {\n final AuthConfiguration auth = new AuthConfiguration();\n auth.setKey(\"key1\");\n assertEquals(\"key1\", auth.getKey());\n }",
"class_method_signature": "AuthConfigurationTest.testSetKey()",
"constructor": false,
"full_signature": "@Tes... | {
"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 setKey(String key) {\n this.key = key;\n }",
"class_method_signature": "AuthConfiguration.setKey(String key)",
"constructor": false,
"full_signature": "public void setKey(String key)",
"identifier": "setKey",
"invocations": [],
"modifiers": "public",
"parameters": "(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_239 | {
"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 assureJarFileExistedWhenFileExtWrong() throws AzureExecutionException {\n buildHandler();\n handlerSpy.assureJarFileExisted(new File(\"test.jar\"));\n }",
"class_method_signature": "JarArtifactHandlerImplTest.assureJarFileE... | {
"fields": [
{
"declarator": "jarFile",
"modifier": "private",
"original_string": "private String jarFile;",
"type": "String",
"var_name": "jarFile"
},
{
"declarator": "FILE_IS_NOT_JAR = \"The deployment file is not a jar typed file.\"",
"modifier": "public stati... | {
"body": "protected void assureJarFileExisted(File jar) throws AzureExecutionException {\n if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase(\"jar\")) {\n throw new AzureExecutionException(FILE_IS_NOT_JAR);\n }\n\n if (!jar.exists() || !jar.isFile()) {\n throw new... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_44 | {
"fields": [],
"file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureCredentialTest.java",
"identifier": "AzureCredentialTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFromNullResult() {\n try {\n AzureCredential.fromAuthenticationResult(null);\n fail(\"Should throw IAE\");\n } catch (IllegalArgumentException ex) {\n // IllegalArgumentException expected\n }\n }",
"class_method_signature... | {
"fields": [
{
"declarator": "accessTokenType",
"modifier": "private",
"original_string": "private String accessTokenType;",
"type": "String",
"var_name": "accessTokenType"
},
{
"declarator": "idToken",
"modifier": "private",
"original_string": "private Str... | {
"body": "public static AzureCredential fromAuthenticationResult(AuthenticationResult result) {\n if (result == null) {\n throw new IllegalArgumentException(\"Parameter \\\"result\\\" cannot be null\");\n }\n final AzureCredential token = new AzureCredential();\n token.setAcces... | {
"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_110 | {
"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 testEvalBooleanVariable() {\n final Map<String, Object> map = new HashMap<>();\n map.put(\"foo\", \"{{bar}}\");\n map.put(\"bar\", \"true\");\n assertEquals(Boolean.TRUE, evalBoolean(\"foo\", map));\n }",
"class_method_signature": "TemplateUtilsTest.t... | {
"fields": [],
"file": "azure-spring-cloud-maven-plugin/src/main/java/com/microsoft/azure/maven/spring/utils/TemplateUtils.java",
"identifier": "TemplateUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "TemplateUtils.evalBoolean(String expr, Map<String, Object> variableMap)",
... | {
"body": "public static Boolean evalBoolean(String expr, Map<String, Object> variableMap) {\n final String text = evalPlainText(expr, variableMap);\n\n if (text == null) {\n return Boolean.FALSE;\n }\n return Boolean.valueOf(text);\n }",
"class_method_signature": "Template... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_13 | {
"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 getCheckRuntimeCommand() throws Exception {\n final RunMojo mojo = getMojoFromPom();\n final RunMojo mojoSpy = spy(mojo);\n assertEquals(FUNC_CMD, mojoSpy.getCheckRuntimeCommand());\n }",
"class_method_signature": "RunMojoTest.getCheckRuntimeCommand()",
"c... | {
"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 getCheckRuntimeCommand() {\n return FUNC_CMD;\n }",
"class_method_signature": "RunMojo.getCheckRuntimeCommand()",
"constructor": false,
"full_signature": "protected String getCheckRuntimeCommand()",
"identifier": "getCheckRuntimeCommand",
"invocations": [],
"modifiers... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_147 | {
"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 testClose() throws Exception {\n PowerMockito.doNothing().when(reader).close();\n this.prompter.close();\n }",
"class_method_signature": "DefaultPrompterTest.testClose()",
"constructor": false,
"full_signature": "@Test public void testClose()",
"identifier": ... | {
"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 void close() {\n try {\n reader.close();\n } catch (IOException e) {\n // swallow this error\n }\n }",
"class_method_signature": "DefaultPrompter.close()",
"constructor": false,
"full_signature": "public void close()",
"identifier": "close",
"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_151 | {
"fields": [],
"file": "azure-tools-common/src/test/java/com/microsoft/azure/common/utils/TextUtilsTest.java",
"identifier": "TextUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGreen() {\n System.out.println(\"This is a \" + TextUtils.green(\"green\") + \" text.\");\n assertEquals(\"1b5b33326d611b5b6d\", Hex.encodeHexString(TextUtils.green(\"a\").getBytes()));\n }",
"class_method_signature": "TextUtilsTest.testGreen()",
"constructor... | {
"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 green(String message) {\n return applyColorToText(message, Color.GREEN);\n }",
"class_method_signature": "TextUtils.green(String message)",
"constructor": false,
"full_signature": "public static String green(String message)",
"identifier": "green",
"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_52 | {
"fields": [],
"file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureLoginHelperTest.java",
"identifier": "AzureLoginHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBaseURL() {\n String baseUrl = AzureLoginHelper.baseURL(AzureEnvironment.AZURE);\n assertEquals(\"https://login.microsoftonline.com/common\", baseUrl);\n baseUrl = AzureLoginHelper.baseURL(AzureEnvironment.AZURE_US_GOVERNMENT);\n assertEquals(\"https:/... | {
"fields": [
{
"declarator": "AZURE_ENVIRONMENT_MAP = new HashMap<>()",
"modifier": "private static final",
"original_string": "private static final Map<AzureEnvironment, String> AZURE_ENVIRONMENT_MAP = new HashMap<>();",
"type": "Map<AzureEnvironment, String>",
"var_name": "AZURE_E... | {
"body": "static String baseURL(AzureEnvironment env) {\n return env.activeDirectoryEndpoint() + Constants.COMMON_TENANT;\n }",
"class_method_signature": "AzureLoginHelper.baseURL(AzureEnvironment env)",
"constructor": false,
"full_signature": "static String baseURL(AzureEnvironment env)",
"identif... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_106 | {
"fields": [
{
"declarator": "propertiesNode",
"modifier": "private",
"original_string": "private Element propertiesNode;",
"type": "Element",
"var_name": "propertiesNode"
}
],
"file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/utils/XmlU... | {
"body": "@Test\n public void testGetChildValue() {\n assertEquals(\"1.8\\n\", XmlUtils.getChildValue(propertiesNode, \"maven.compiler.target\"));\n }",
"class_method_signature": "XmlUtilsTest.testGetChildValue()",
"constructor": false,
"full_signature": "@Test public void testGetChildValue()",
... | {
"fields": [],
"file": "azure-spring-cloud-maven-plugin/src/main/java/com/microsoft/azure/maven/spring/utils/XmlUtils.java",
"identifier": "XmlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "XmlUtils.getChildValue(Element element, String attribute)",
"constructor": false,
... | {
"body": "public static String getChildValue(Element element, String attribute) {\n final Element child = element.element(attribute);\n return child == null ? null : child.getText();\n }",
"class_method_signature": "XmlUtils.getChildValue(Element element, String attribute)",
"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_29 | {
"fields": [],
"file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureServicePrincipleAuthHelperTest.java",
"identifier": "AzureServicePrincipleAuthHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetCredentialsFromCliNotSP() throws Exception {\n final File testConfigDir = new File(this.getClass().getResource(\"/azure-cli/default/azureProfile.json\").getFile()).getParentFile();\n TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.g... | {
"fields": [
{
"declarator": "AZURE_CLI_GET_SUBSCRIPTION_FAIL = \"Failed to get default subscription of Azure CLI, please login Azure CLI first.\"",
"modifier": "private static final",
"original_string": "private static final String AZURE_CLI_GET_SUBSCRIPTION_FAIL = \"Failed to get default subs... | {
"body": "static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException {\n final JsonObject subscription = getDefaultSubscriptionObject();\n final String servicePrincipalName = subscription == null ? null : subscription.get(\"user\").get... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_7 | {
"fields": [],
"file": "azure-functions-maven-plugin/src/test/java/com/microsoft/azure/maven/function/AddMojoTest.java",
"identifier": "AddMojoTest",
"interfaces": "",
"superclass": "extends MojoTestBase"
} | {
"body": "@Test\n public void assureInputInBatchModeWhenNotRequired() throws Exception {\n final AddMojo mojo = getMojoFromPom();\n final AddMojo mojoSpy = spy(mojo);\n\n final Set<String> set = new HashSet<>();\n mojoSpy.assureInputInBatchMode(\"a0\", StringUtils::isNotEmpty, set::add... | {
"fields": [
{
"declarator": "LOAD_TEMPLATES = \"Step 1 of 4: Load all function templates\"",
"modifier": "private static final",
"original_string": "private static final String LOAD_TEMPLATES = \"Step 1 of 4: Load all function templates\";",
"type": "String",
"var_name": "LOAD_TEMP... | {
"body": "protected void assureInputInBatchMode(final String input, final Function<String, Boolean> validator,\n final Consumer<String> setter, final boolean required)\n throws MojoFailureException {\n if (validator.apply(input)) {\n Log.info(FOUN... | {
"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_254 | {
"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 doReturn(null).when(mojo).getRuntime();\n assertNull(parser.getRuntimeStack());\n\n final RuntimeSetting runtime = mock(RuntimeSetting.class);\n doReturn(true).when(runtime).isEmpty();\n doReturn(... | {
"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 RuntimeStack getRuntimeStack() throws AzureExecutionException {\n validate(validator.validateRuntimeStack());\n final RuntimeSetting runtime = mojo.getRuntime();\n if (runtime == null || runtime.isEmpty()) {\n return null;\n }\n return ... | {
"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_192 | {
"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 getBuildDirectoryAbsolutePath() throws Exception {\n assertEquals(\"target\", mojo.getBuildDirectoryAbsolutePath());\n }",
"class_method_signature": "AbstractAzureMojoTest.getBuildDirectoryAbsolutePath()",
"constructor": false,
"full_signature": "@Test public void get... | {
"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 String getBuildDirectoryAbsolutePath() {\n return buildDirectory.getAbsolutePath();\n }",
"class_method_signature": "AbstractAzureMojo.getBuildDirectoryAbsolutePath()",
"constructor": false,
"full_signature": "public String getBuildDirectoryAbsolutePath()",
"identifier": "getBuildD... | {
"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_203 | {
"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 processSettings1() throws Exception {\n final Update update = mock(Update.class);\n handler.processSettings(update);\n verify(update, times(1)).withAppSettings(ArgumentMatchers.<String, String>anyMap());\n }",
"class_method_signature": "SettingsHandlerImplTe... | {
"fields": [
{
"declarator": "mojo",
"modifier": "private",
"original_string": "private AbstractWebAppMojo mojo;",
"type": "AbstractWebAppMojo",
"var_name": "mojo"
}
],
"file": "azure-webapp-maven-plugin/src/main/java/com/microsoft/azure/maven/webapp/handlers/SettingsHandler... | {
"body": "@Override\n public void processSettings(WithCreate withCreate) throws AzureExecutionException {\n final Map appSettings = mojo.getAppSettings();\n if (appSettings != null && !appSettings.isEmpty()) {\n withCreate.withAppSettings(appSettings);\n }\n }",
"class_method_... | {
"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_91 | {
"fields": [],
"file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/DeploymentTest.java",
"identifier": "DeploymentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWithResources() {\n final Deployment deploy = new Deployment();\n\n deploy.withResources(ResourcesUtils.getDefaultResources());\n assertEquals(1, deploy.getResources().size());\n assertEquals(\"*.jar\", deploy.getResources().get(0).getIncludes().get(0)... | {
"fields": [
{
"declarator": "cpu",
"modifier": "private",
"original_string": "private Integer cpu;",
"type": "Integer",
"var_name": "cpu"
},
{
"declarator": "memoryInGB",
"modifier": "private",
"original_string": "private Integer memoryInGB;",
"type"... | {
"body": "public Deployment withResources(List<Resource> resources) {\n this.resources = resources;\n return this;\n }",
"class_method_signature": "Deployment.withResources(List<Resource> resources)",
"constructor": false,
"full_signature": "public Deployment withResources(List<Resource> resou... | {
"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_68 | {
"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 testGetAzureTokenCredentials() throws Exception {\n // 1. use azure-secret.json\n File testConfigDir = new File(this.getClass().getResource(\"/azure-login/azure-secret.json\").getFile()).getParentFile();\n TestHelper.injectEnvironmentVariable(Constants.AZURE_CONF... | {
"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 AzureTokenWrapper getAzureTokenCredentials(AuthConfiguration configuration)\n throws InvalidConfigurationException, IOException {\n if (configuration != null) {\n return new AzureTokenWrapper(AuthMethod.SERVICE_PRINCIPAL,\n AzureServicePrinciple... | {
"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_87 | {
"fields": [],
"file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/DeploymentTest.java",
"identifier": "DeploymentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWithInstanceCount() {\n final Deployment deploy = new Deployment();\n deploy.withInstanceCount(3);\n assertEquals(3, (int) deploy.getInstanceCount());\n }",
"class_method_signature": "DeploymentTest.testWithInstanceCount()",
"constructor": false,
"fu... | {
"fields": [
{
"declarator": "cpu",
"modifier": "private",
"original_string": "private Integer cpu;",
"type": "Integer",
"var_name": "cpu"
},
{
"declarator": "memoryInGB",
"modifier": "private",
"original_string": "private Integer memoryInGB;",
"type"... | {
"body": "public Deployment withInstanceCount(Integer instanceCount) {\n this.instanceCount = instanceCount;\n return this;\n }",
"class_method_signature": "Deployment.withInstanceCount(Integer instanceCount)",
"constructor": false,
"full_signature": "public Deployment withInstanceCount(Intege... | {
"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_215 | {
"fields": [
{
"declarator": "handler = null",
"modifier": "private",
"original_string": "private NullRuntimeHandlerImpl handler = null;",
"type": "NullRuntimeHandlerImpl",
"var_name": "handler"
}
],
"file": "azure-webapp-maven-plugin/src/test/java/com/microsoft/azure/maven/... | {
"body": "@Test\n public void updateAppRuntime() {\n final WebApp app = mock(WebApp.class);\n assertNull(handler.updateAppRuntime(app));\n }",
"class_method_signature": "NullRuntimeHandlerImplTest.updateAppRuntime()",
"constructor": false,
"full_signature": "@Test public void updateAppRunti... | {
"fields": [
{
"declarator": "NO_RUNTIME_CONFIG = \"No runtime related configuration is specified in pom.xml. \" +\n \"For V1 schema version, please use <javaVersion>, <linuxRuntime> or <containerSettings>, \" +\n \"For V2 schema version, please use <runtime>.\"",
"modifier": "public st... | {
"body": "@Override\n public Update updateAppRuntime(final WebApp app) {\n return null;\n }",
"class_method_signature": "NullRuntimeHandlerImpl.updateAppRuntime(final WebApp app)",
"constructor": false,
"full_signature": "@Override public Update updateAppRuntime(final WebApp app)",
"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_242 | {
"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 assureJarFileExisted() throws AzureExecutionException {\n final File file = mock(File.class);\n doReturn(\"test.jar\").when(file).getName();\n doReturn(true).when(file).exists();\n doReturn(true).when(file).isFile();\n buildHandler();\n handl... | {
"fields": [
{
"declarator": "jarFile",
"modifier": "private",
"original_string": "private String jarFile;",
"type": "String",
"var_name": "jarFile"
},
{
"declarator": "FILE_IS_NOT_JAR = \"The deployment file is not a jar typed file.\"",
"modifier": "public stati... | {
"body": "protected void assureJarFileExisted(File jar) throws AzureExecutionException {\n if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase(\"jar\")) {\n throw new AzureExecutionException(FILE_IS_NOT_JAR);\n }\n\n if (!jar.exists() || !jar.isFile()) {\n throw new... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_184 | {
"fields": [
{
"declarator": "ftpUploader = null",
"modifier": "private",
"original_string": "private FTPUploader ftpUploader = null;",
"type": "FTPUploader",
"var_name": "ftpUploader"
}
],
"file": "azure-tools-common/src/test/java/com/microsoft/azure/common/FTPUploaderTest.... | {
"body": "@Test\n public void uploadDirectoryWithRetries() throws Exception {\n final FTPUploader uploaderSpy = spy(ftpUploader);\n\n // Failure\n AzureExecutionException exception = null;\n doReturn(false).when(uploaderSpy).uploadDirectory(anyString(), anyString(), anyString(), anyStr... | {
"fields": [
{
"declarator": "UPLOAD_START = \"Uploading files to FTP server: \"",
"modifier": "public static final",
"original_string": "public static final String UPLOAD_START = \"Uploading files to FTP server: \";",
"type": "String",
"var_name": "UPLOAD_START"
},
{
... | {
"body": "public void uploadDirectoryWithRetries(final String ftpServer, final String username, final String password,\n final String sourceDirectory, final String targetDirectory,\n final int maxRetryCount) throws AzureExecutionExce... | {
"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_185 | {
"fields": [
{
"declarator": "ftpUploader = null",
"modifier": "private",
"original_string": "private FTPUploader ftpUploader = null;",
"type": "FTPUploader",
"var_name": "ftpUploader"
}
],
"file": "azure-tools-common/src/test/java/com/microsoft/azure/common/FTPUploaderTest.... | {
"body": "@Test\n public void uploadDirectory() throws Exception {\n final FTPUploader uploaderSpy = spy(ftpUploader);\n final FTPClient ftpClient = mock(FTPClient.class);\n doReturn(ftpClient).when(uploaderSpy).getFTPClient(anyString(), anyString(), anyString());\n doNothing().when(up... | {
"fields": [
{
"declarator": "UPLOAD_START = \"Uploading files to FTP server: \"",
"modifier": "public static final",
"original_string": "public static final String UPLOAD_START = \"Uploading files to FTP server: \";",
"type": "String",
"var_name": "UPLOAD_START"
},
{
... | {
"body": "protected boolean uploadDirectory(final String ftpServer, final String username, final String password,\n final String sourceDirectoryPath, final String targetDirectoryPath) {\n Log.debug(\"FTP username: \" + username);\n try {\n final FTPClient... | {
"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_243 | {
"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 getRuntimeHandler() throws AzureExecutionException {\n final WebAppConfiguration config = mock(WebAppConfiguration.class);\n final Azure azureClient = mock(Azure.class);\n final HandlerFactory factory = new HandlerFactoryImpl();\n\n doReturn(\"\").when(con... | {
"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 RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient) throws AzureExecutionException {\n if (config.getOs() == null) {\n return new NullRuntimeHandlerImpl();\n }\n final WebAppRuntimeHandler.Builder builder;\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_69 | {
"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 testGetAzureTokenCredentialsFromConfiguration() throws Exception {\n final AuthConfiguration auth = new AuthConfiguration();\n auth.setClient(\"client_id\");\n auth.setTenant(\"tenant_id\");\n auth.setKey(\"key\");\n auth.setEnvironment(\"azure_germ... | {
"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 AzureTokenWrapper getAzureTokenCredentials(AuthConfiguration configuration)\n throws InvalidConfigurationException, IOException {\n if (configuration != null) {\n return new AzureTokenWrapper(AuthMethod.SERVICE_PRINCIPAL,\n AzureServicePrinciple... | {
"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_86 | {
"fields": [],
"file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/DeploymentTest.java",
"identifier": "DeploymentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWithMemoryInGB() {\n final Deployment deploy = new Deployment();\n deploy.withMemoryInGB(2);\n assertEquals(2, (int) deploy.getMemoryInGB());\n }",
"class_method_signature": "DeploymentTest.testWithMemoryInGB()",
"constructor": false,
"full_signature... | {
"fields": [
{
"declarator": "cpu",
"modifier": "private",
"original_string": "private Integer cpu;",
"type": "Integer",
"var_name": "cpu"
},
{
"declarator": "memoryInGB",
"modifier": "private",
"original_string": "private Integer memoryInGB;",
"type"... | {
"body": "public Deployment withMemoryInGB(Integer memoryInGB) {\n this.memoryInGB = memoryInGB;\n return this;\n }",
"class_method_signature": "Deployment.withMemoryInGB(Integer memoryInGB)",
"constructor": false,
"full_signature": "public Deployment withMemoryInGB(Integer memoryInGB)",
"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_214 | {
"fields": [
{
"declarator": "handler = null",
"modifier": "private",
"original_string": "private NullRuntimeHandlerImpl handler = null;",
"type": "NullRuntimeHandlerImpl",
"var_name": "handler"
}
],
"file": "azure-webapp-maven-plugin/src/test/java/com/microsoft/azure/maven/... | {
"body": "@Test\n public void defineAppWithRuntime() throws Exception {\n AzureExecutionException exception = null;\n try {\n handler.defineAppWithRuntime();\n } catch (AzureExecutionException e) {\n exception = e;\n } finally {\n assertNotNull(exceptio... | {
"fields": [
{
"declarator": "NO_RUNTIME_CONFIG = \"No runtime related configuration is specified in pom.xml. \" +\n \"For V1 schema version, please use <javaVersion>, <linuxRuntime> or <containerSettings>, \" +\n \"For V2 schema version, please use <runtime>.\"",
"modifier": "public st... | {
"body": "@Override\n public WithCreate defineAppWithRuntime() throws AzureExecutionException {\n throw new AzureExecutionException(NO_RUNTIME_CONFIG);\n }",
"class_method_signature": "NullRuntimeHandlerImpl.defineAppWithRuntime()",
"constructor": false,
"full_signature": "@Override public WithCre... | {
"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_202 | {
"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 processSettings() throws Exception {\n final WithCreate withCreate = mock(WithCreate.class);\n handler.processSettings(withCreate);\n verify(withCreate, times(1)).withAppSettings(ArgumentMatchers.<String, String>anyMap());\n }",
"class_method_signature": "Se... | {
"fields": [
{
"declarator": "mojo",
"modifier": "private",
"original_string": "private AbstractWebAppMojo mojo;",
"type": "AbstractWebAppMojo",
"var_name": "mojo"
}
],
"file": "azure-webapp-maven-plugin/src/main/java/com/microsoft/azure/maven/webapp/handlers/SettingsHandler... | {
"body": "@Override\n public void processSettings(WithCreate withCreate) throws AzureExecutionException {\n final Map appSettings = mojo.getAppSettings();\n if (appSettings != null && !appSettings.isEmpty()) {\n withCreate.withAppSettings(appSettings);\n }\n }",
"class_method_... | {
"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_90 | {
"fields": [],
"file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/configuration/DeploymentTest.java",
"identifier": "DeploymentTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testWithEnvironment() {\n final Deployment deploy = new Deployment();\n deploy.withEnvironment(Collections.singletonMap(\"foo\", \"bar\"));\n assertEquals(\"bar\", deploy.getEnvironment().get(\"foo\"));\n }",
"class_method_signature": "DeploymentTest.testWit... | {
"fields": [
{
"declarator": "cpu",
"modifier": "private",
"original_string": "private Integer cpu;",
"type": "Integer",
"var_name": "cpu"
},
{
"declarator": "memoryInGB",
"modifier": "private",
"original_string": "private Integer memoryInGB;",
"type"... | {
"body": "public Deployment withEnvironment(Map<String, String> environment) {\n this.environment = environment;\n return this;\n }",
"class_method_signature": "Deployment.withEnvironment(Map<String, String> environment)",
"constructor": false,
"full_signature": "public Deployment withEnvironm... | {
"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_193 | {
"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 getAuthenticationSetting() throws Exception {\n assertEquals(authenticationSetting, mojo.getAuthenticationSetting());\n }",
"class_method_signature": "AbstractAzureMojoTest.getAuthenticationSetting()",
"constructor": false,
"full_signature": "@Test public void getAuth... | {
"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 AuthenticationSetting getAuthenticationSetting() {\n return authentication;\n }",
"class_method_signature": "AbstractAzureMojo.getAuthenticationSetting()",
"constructor": false,
"full_signature": "@Override public AuthenticationSetting getAuthenticationSetting()",
"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_28 | {
"fields": [],
"file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureServicePrincipleAuthHelperTest.java",
"identifier": "AzureServicePrincipleAuthHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetSPCredentialsNoTokens() throws Exception {\n final File testConfigDir = new File(this.getClass().getResource(\"/azure-cli/no-tokens/azureProfile.json\").getFile()).getParentFile();\n TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.g... | {
"fields": [
{
"declarator": "AZURE_CLI_GET_SUBSCRIPTION_FAIL = \"Failed to get default subscription of Azure CLI, please login Azure CLI first.\"",
"modifier": "private static final",
"original_string": "private static final String AZURE_CLI_GET_SUBSCRIPTION_FAIL = \"Failed to get default subs... | {
"body": "static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException {\n final JsonObject subscription = getDefaultSubscriptionObject();\n final String servicePrincipalName = subscription == null ? null : subscription.get(\"user\").get... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_6 | {
"fields": [],
"file": "azure-functions-maven-plugin/src/test/java/com/microsoft/azure/maven/function/AddMojoTest.java",
"identifier": "AddMojoTest",
"interfaces": "",
"superclass": "extends MojoTestBase"
} | {
"body": "@Test(expected = MojoFailureException.class)\n public void assureInputInBatchModeWhenRequired() throws Exception {\n final AddMojo mojo = getMojoFromPom();\n final AddMojo mojoSpy = spy(mojo);\n\n final Set<String> set = new HashSet<>();\n mojoSpy.assureInputInBatchMode(\"\",... | {
"fields": [
{
"declarator": "LOAD_TEMPLATES = \"Step 1 of 4: Load all function templates\"",
"modifier": "private static final",
"original_string": "private static final String LOAD_TEMPLATES = \"Step 1 of 4: Load all function templates\";",
"type": "String",
"var_name": "LOAD_TEMP... | {
"body": "protected void assureInputInBatchMode(final String input, final Function<String, Boolean> validator,\n final Consumer<String> setter, final boolean required)\n throws MojoFailureException {\n if (validator.apply(input)) {\n Log.info(FOUN... | {
"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_255 | {
"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 doReturn(null).when(mojo).getRuntime();\n try {\n parser.getImage();\n } catch (AzureExecutionException e) {\n assertEquals(e.getMessage(), \"Please configure the <runtime> in pom.xml.\");\n ... | {
"fields": [],
"file": "azure-webapp-maven-plugin/src/main/java/com/microsoft/azure/maven/webapp/parser/V2ConfigurationParser.java",
"identifier": "V2ConfigurationParser",
"interfaces": "",
"methods": [
{
"class_method_signature": "V2ConfigurationParser.V2ConfigurationParser(AbstractWebAppMojo mojo... | {
"body": "@Override\n protected String getImage() throws AzureExecutionException {\n validate(validator.validateImage());\n final RuntimeSetting runtime = mojo.getRuntime();\n return runtime.getImage();\n }",
"class_method_signature": "V2ConfigurationParser.getImage()",
"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_107 | {
"fields": [
{
"declarator": "propertiesNode",
"modifier": "private",
"original_string": "private Element propertiesNode;",
"type": "Element",
"var_name": "propertiesNode"
}
],
"file": "azure-spring-cloud-maven-plugin/src/test/java/com/microsoft/azure/maven/spring/utils/XmlU... | {
"body": "@Test\n public void testAddDomWithKeyValue() {\n XmlUtils.addDomWithKeyValue(propertiesNode, \"foo\", \"bar\");\n final String[] lines = TextUtils.splitLines(XmlUtils.prettyPrintElementNoNamespace(propertiesNode));\n assertEquals(6, lines.length);\n assertEquals(\" <foo>ba... | {
"fields": [],
"file": "azure-spring-cloud-maven-plugin/src/main/java/com/microsoft/azure/maven/spring/utils/XmlUtils.java",
"identifier": "XmlUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "XmlUtils.getChildValue(Element element, String attribute)",
"constructor": false,
... | {
"body": "public static void addDomWithKeyValue(Element node, String key, Object value) {\n final DOMElement newNode = new DOMElement(key);\n if (value != null) {\n newNode.setText(value.toString());\n }\n node.add(newNode);\n }",
"class_method_signature": "XmlUtils.addDom... | {
"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_53 | {
"fields": [],
"file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureLoginHelperTest.java",
"identifier": "AzureLoginHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAzureEnvironmentShortName() {\n assertEquals(\"azure\", AzureLoginHelper.getShortNameForAzureEnvironment(AzureEnvironment.AZURE));\n assertEquals(\"azure_china\", AzureLoginHelper.getShortNameForAzureEnvironment(AzureEnvironment.AZURE_CHINA));\n assertEquals(... | {
"fields": [
{
"declarator": "AZURE_ENVIRONMENT_MAP = new HashMap<>()",
"modifier": "private static final",
"original_string": "private static final Map<AzureEnvironment, String> AZURE_ENVIRONMENT_MAP = new HashMap<>();",
"type": "Map<AzureEnvironment, String>",
"var_name": "AZURE_E... | {
"body": "static String getShortNameForAzureEnvironment(AzureEnvironment env) {\n return AZURE_ENVIRONMENT_MAP.get(env);\n }",
"class_method_signature": "AzureLoginHelper.getShortNameForAzureEnvironment(AzureEnvironment env)",
"constructor": false,
"full_signature": "static String getShortNameForAzur... | {
"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_150 | {
"fields": [],
"file": "azure-tools-common/src/test/java/com/microsoft/azure/common/utils/TextUtilsTest.java",
"identifier": "TextUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testYellow() {\n System.out.println(\"This is a \" + TextUtils.yellow(\"yellow\") + \" text.\");\n assertEquals(\"1b5b33336d611b5b6d\", Hex.encodeHexString(TextUtils.yellow(\"a\").getBytes()));\n }",
"class_method_signature": "TextUtilsTest.testYellow()",
"constr... | {
"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 yellow(String message) {\n return applyColorToText(message, Color.YELLOW);\n }",
"class_method_signature": "TextUtils.yellow(String message)",
"constructor": false,
"full_signature": "public static String yellow(String message)",
"identifier": "yellow",
"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_146 | {
"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 testPromoteSingle() throws Exception {\n when(reader.readLine()).thenReturn(\"1\").thenReturn(\"10001111111111111111111111111\").thenReturn(\"1000\").thenReturn(\"2\").thenReturn(\"\");\n final List<Integer> integers = new ArrayList<>();\n for (int i = 1; i <= 3;... | {
"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> T promoteSingleEntity(String header, String message, List<T> entities, T defaultEntity, Function<T, String> getNameFunc,\n boolean isRequired) throws IOException {\n final boolean hasDefaultValue = defaultEntity != null;\n\n printOptionList(header, entities, defaultEntit... | {
"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_12 | {
"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 runFunctions() throws Exception {\n final RunMojo mojo = getMojoFromPom();\n final RunMojo mojoSpy = spy(mojo);\n final CommandHandler commandHandlerMock = mock(CommandHandlerImpl.class);\n doNothing().when(commandHandlerMock).runCommandWithReturnCodeCheck... | {
"fields": [
{
"declarator": "FUNC_CMD = \"func\"",
"modifier": "protected static final",
"original_string": "protected static final String FUNC_CMD = \"func\";",
"type": "String",
"var_name": "FUNC_CMD"
},
{
"declarator": "FUNC_HOST_START_CMD = \"func host start\"",
... | {
"body": "protected void runFunctions(final CommandHandler handler) throws AzureExecutionException {\n handler.runCommandWithReturnCodeCheck(\n getStartFunctionHostCommand(),\n true, /* showStdout */\n getDeploymentStagingDirectoryPath(),\n CommandUt... | {
"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_111 | {
"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 testEvalBooleanRecursive() {\n final Map<String, Object> map = new HashMap<>();\n map.put(\"foo\", Collections.singletonMap(\"bar\", \"true\"));\n assertEquals(Boolean.TRUE, evalBoolean(\"foo.bar\", map));\n }",
"class_method_signature": "TemplateUtilsTest.t... | {
"fields": [],
"file": "azure-spring-cloud-maven-plugin/src/main/java/com/microsoft/azure/maven/spring/utils/TemplateUtils.java",
"identifier": "TemplateUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "TemplateUtils.evalBoolean(String expr, Map<String, Object> variableMap)",
... | {
"body": "public static Boolean evalBoolean(String expr, Map<String, Object> variableMap) {\n final String text = evalPlainText(expr, variableMap);\n\n if (text == null) {\n return Boolean.FALSE;\n }\n return Boolean.valueOf(text);\n }",
"class_method_signature": "Template... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_238 | {
"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 getJarFile() {\n doReturn(\"test.jar\").when(mojo).getJarFile();\n buildHandler();\n assertEquals(\"test.jar\", handlerSpy.getJarFile().getName());\n\n final MavenProject project = mock(MavenProject.class);\n doReturn(project).when(mojo).getProject(... | {
"fields": [
{
"declarator": "jarFile",
"modifier": "private",
"original_string": "private String jarFile;",
"type": "String",
"var_name": "jarFile"
},
{
"declarator": "FILE_IS_NOT_JAR = \"The deployment file is not a jar typed file.\"",
"modifier": "public stati... | {
"body": "protected File getJarFile() {\n final String jarFilePath = StringUtils.isNotEmpty(jarFile) ? jarFile :\n project.getArtifactFile().toString();\n return new File(jarFilePath);\n }",
"class_method_signature": "JarArtifactHandlerImpl.getJarFile()",
"constructor": false,
"full... | {
"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_45 | {
"fields": [],
"file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureContextExecutorTest.java",
"identifier": "AzureContextExecutorTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExecute() throws Exception {\n AzureContextExecutor executor = new AzureContextExecutor(AzureLoginHelper.baseURL(AzureEnvironment.AZURE), t -> null);\n assertNull(executor.execute());\n final AuthenticationResult result = TestHelper.createAuthenticationResult... | {
"fields": [
{
"declarator": "baseUrl",
"modifier": "private",
"original_string": "private String baseUrl;",
"type": "String",
"var_name": "baseUrl"
},
{
"declarator": "acquireTokenFunc",
"modifier": "private",
"original_string": "private AcquireTokenFuncti... | {
"body": "public AzureCredential execute() throws MalformedURLException, InterruptedException, ExecutionException, AzureLoginTimeoutException {\n final ExecutorService executorService = Executors.newSingleThreadExecutor();\n try {\n final AuthenticationContext authenticationContext = new Aut... | {
"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_32 | {
"fields": [],
"file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/configuration/AuthConfigurationTest.java",
"identifier": "AuthConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetTenant() {\n final AuthConfiguration auth = new AuthConfiguration();\n auth.setTenant(\"tenant1\");\n assertEquals(\"tenant1\", auth.getTenant());\n }",
"class_method_signature": "AuthConfigurationTest.testSetTenant()",
"constructor": false,
"full... | {
"fields": [
{
"declarator": "client",
"modifier": "private",
"original_string": "private String client;",
"type": "String",
"var_name": "client"
},
{
"declarator": "tenant",
"modifier": "private",
"original_string": "private String tenant;",
"type": ... | {
"body": "public void setTenant(String tenant) {\n this.tenant = tenant;\n }",
"class_method_signature": "AuthConfiguration.setTenant(String tenant)",
"constructor": false,
"full_signature": "public void setTenant(String tenant)",
"identifier": "setTenant",
"invocations": [],
"modifiers": "publ... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_166 | {
"fields": [
{
"declarator": "handler",
"modifier": "private",
"original_string": "private MSDeployArtifactHandlerImpl handler;",
"type": "MSDeployArtifactHandlerImpl",
"var_name": "handler"
},
{
"declarator": "handlerSpy",
"modifier": "private",
"original_... | {
"body": "@Test\n public void uploadPackageToAzureStorage() throws Exception {\n final CloudStorageAccount storageAccount = mock(CloudStorageAccount.class);\n final CloudBlobClient blobClient = mock(CloudBlobClient.class);\n doReturn(blobClient).when(storageAccount).createCloudBlobClient();\n... | {
"fields": [
{
"declarator": "DEPLOYMENT_PACKAGE_CONTAINER = \"java-functions-deployment-packages\"",
"modifier": "public static final",
"original_string": "public static final String DEPLOYMENT_PACKAGE_CONTAINER = \"java-functions-deployment-packages\";",
"type": "String",
"var_nam... | {
"body": "protected String uploadPackageToAzureStorage(final File zipPackage, final CloudStorageAccount storageAccount,\n final String blobName) throws AzureExecutionException {\n Log.prompt(UPLOAD_PACKAGE_START);\n final CloudBlockBlob blob = AzureStorag... | {
"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_189 | {
"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 getProject() throws Exception {\n assertEquals(project, mojo.getProject());\n }",
"class_method_signature": "AbstractAzureMojoTest.getProject()",
"constructor": false,
"full_signature": "@Test public void getProject()",
"identifier": "getProject",
"invocations": [... | {
"fields": [
{
"declarator": "PLUGIN_NAME_KEY = \"pluginName\"",
"modifier": "public static final",
"original_string": "public static final String PLUGIN_NAME_KEY = \"pluginName\";",
"type": "String",
"var_name": "PLUGIN_NAME_KEY"
},
{
"declarator": "PLUGIN_VERSION_KEY... | {
"body": "public MavenProject getProject() {\n return project;\n }",
"class_method_signature": "AbstractAzureMojo.getProject()",
"constructor": false,
"full_signature": "public MavenProject getProject()",
"identifier": "getProject",
"invocations": [],
"modifiers": "public",
"parameters": "()"... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_65 | {
"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 testWriteAzureCredentials() throws Exception {\n final File testConfigDir = new File(this.getClass().getResource(\"/azure-login/azure-secret.json\").getFile()).getParentFile();\n TestHelper.injectEnvironmentVariable(Constants.AZURE_CONFIG_DIR, testConfigDir.getAbsoluteP... | {
"fields": [
{
"declarator": "UNKNOWN = \"UNKNOWN\"",
"modifier": "private static final",
"original_string": "private static final String UNKNOWN = \"UNKNOWN\";",
"type": "String",
"var_name": "UNKNOWN"
},
{
"declarator": "AUTH_ORDER = {AuthType.SERVICE_PRINCIPAL, Auth... | {
"body": "public static void writeAzureCredentials(AzureCredential cred, File file) throws IOException {\n if (cred == null) {\n throw new IllegalArgumentException(\"Parameter 'cred' cannot be null.\");\n }\n if (file == null) {\n throw new IllegalArgumentException(\"Parame... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_218 | {
"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 SiteInner siteInner = mock(SiteInner.class);\n doReturn(\"app\").when(siteInner).kind();\n final WithWebContainer withWebContainer = mock(WithWebContainer.class);\n final Update update = mock(Update.class... | {
"fields": [],
"file": "azure-webapp-maven-plugin/src/main/java/com/microsoft/azure/maven/webapp/handlers/runtime/WindowsRuntimeHandlerImpl.java",
"identifier": "WindowsRuntimeHandlerImpl",
"interfaces": "",
"methods": [
{
"class_method_signature": "WindowsRuntimeHandlerImpl.WindowsRuntimeHandlerIm... | {
"body": "@Override\n public Update updateAppRuntime(final WebApp app) throws AzureExecutionException {\n WebAppUtils.assureWindowsWebApp(app);\n final Update update = app.update();\n update.withJavaVersion(javaVersion).withWebContainer(webContainer);\n return update;\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_131 | {
"fields": [
{
"declarator": "builder = new ArtifactHandlerBase.Builder() {\n @Override\n protected ArtifactHandlerBase.Builder self() {\n return this;\n }\n\n @Override\n public ArtifactHandlerBase build() {\n return new ArtifactHandlerBase(builder)... | {
"body": "@Test(expected = AzureExecutionException.class)\n public void assureStagingDirectoryNotEmptyThrowException() throws AzureExecutionException {\n handler = builder.project(mock(IProject.class))\n .stagingDirectoryPath(\"\")\n .build();\n handler.assureStagingDirectoryNo... | {
"fields": [
{
"declarator": "DEPLOY_START = \"Trying to deploy artifact to %s...\"",
"modifier": "protected static final",
"original_string": "protected static final String DEPLOY_START = \"Trying to deploy artifact to %s...\";",
"type": "String",
"var_name": "DEPLOY_START"
},
... | {
"body": "protected void assureStagingDirectoryNotEmpty() throws AzureExecutionException {\n final File stagingDirectory = new File(stagingDirectoryPath);\n final File[] files = stagingDirectory.listFiles();\n if (!stagingDirectory.exists() || !stagingDirectory.isDirectory() || files == null || ... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_73 | {
"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 testSetCpu() {\n final DeploymentSettings deploy = new DeploymentSettings();\n deploy.setCpu(\"1\");\n assertEquals(\"1\", deploy.getCpu());\n }",
"class_method_signature": "DeploymentSettingsTest.testSetCpu()",
"constructor": false,
"full_signature": "@... | {
"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 setCpu(String cpu) {\n this.cpu = cpu;\n }",
"class_method_signature": "DeploymentSettings.setCpu(String cpu)",
"constructor": false,
"full_signature": "public void setCpu(String cpu)",
"identifier": "setCpu",
"invocations": [],
"modifiers": "public",
"parameters": "(Str... | {
"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_127 | {
"fields": [
{
"declarator": "builder = new ZIPArtifactHandlerImpl.Builder()",
"modifier": "private",
"original_string": "private ZIPArtifactHandlerImpl.Builder builder = new ZIPArtifactHandlerImpl.Builder();",
"type": "ZIPArtifactHandlerImpl.Builder",
"var_name": "builder"
},
... | {
"body": "@Test\n public void publish() throws AzureExecutionException, IOException {\n final WebApp app = mock(WebApp.class);\n final DeployTarget target = new DeployTarget(app, DeployTargetType.WEBAPP);\n final File file = mock(File.class);\n buildHandler();\n\n doReturn(file)... | {
"fields": [
{
"declarator": "DEFAULT_MAX_RETRY_TIMES = 3",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_MAX_RETRY_TIMES = 3;",
"type": "int",
"var_name": "DEFAULT_MAX_RETRY_TIMES"
},
{
"declarator": "LOCAL_SETTINGS_FILE = \"... | {
"body": "@Override\n public void publish(DeployTarget target) throws AzureExecutionException {\n assureStagingDirectoryNotEmpty();\n\n final File zipFile = getZipFile();\n Log.prompt(String.format(DEPLOY_START, target.getName()));\n\n // Add retry logic here to avoid Kudu's socket tim... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_24 | {
"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 writeFunctionJsonFile() throws Exception {\n final PackageMojo mojo = getMojoFromPom();\n final PackageMojo mojoSpy = spy(mojo);\n doReturn(\"target/azure-functions\").when(mojoSpy).getDeploymentStagingDirectoryPath();\n doNothing().when(mojoSpy).writeObje... | {
"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 void writeFunctionJsonFile(final ObjectWriter objectWriter, final String functionName,\n final FunctionConfiguration config) throws IOException {\n Log.info(SAVE_FUNCTION_JSON + functionName);\n final File functionJsonFile = Paths.get(getDeplo... | {
"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_259 | {
"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 doReturn(null).when(mojo).getRuntime();\n\n try {\n parser.getJavaVersion();\n } catch (AzureExecutionException e) {\n assertEquals(e.getMessage(), \"Pleas config the <runtime> in pom.xml.\... | {
"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 JavaVersion getJavaVersion() throws AzureExecutionException {\n validate(validator.validateJavaVersion());\n final RuntimeSetting runtime = mojo.getRuntime();\n return runtime.getJavaVersion();\n }",
"class_method_signature": "V2ConfigurationParser.getJava... | {
"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_170 | {
"fields": [],
"file": "azure-tools-common/src/test/java/com/microsoft/azure/common/function/handlers/artifact/FunctionArtifactHelperTest.java",
"identifier": "FunctionArtifactHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetCloudStorageAccountWithException() {\n final FunctionApp app = mock(FunctionApp.class);\n final DeployTarget deployTarget = mock(DeployTarget.class);\n final Map appSettings = mock(Map.class);\n doReturn(appSettings).when(app).getAppSettings();\n ... | {
"fields": [
{
"declarator": "STAGE_DIR_NOT_FOUND = \"Azure Functions stage directory not found. \" +\n \"Please run 'mvn clean azure-functions:package' first.\"",
"modifier": "private static final",
"original_string": "private static final String STAGE_DIR_NOT_FOUND = \"Azure Functi... | {
"body": "public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException {\n final Map<String, AppSetting> settingsMap = target.getAppSettings();\n\n if (settingsMap != null) {\n final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_K... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_222 | {
"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 publishArtifactsViaWarDeployThrowException() throws AzureExecutionException {\n final DeployTarget target = mock(DeployTarget.class);\n final String stagingDirectoryPath = \"\";\n final List<File> warArtifacts = null;\n ... | {
"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 publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath,\n final List<File> warArtifacts) throws AzureExecutionException {\n if (warArtifacts == null || warArtifacts.size() == 0) {\n throw new ... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_263 | {
"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 getWebAppConfiguration() throws AzureExecutionException {\n final ConfigurationParser parserSpy = spy(parser);\n\n doReturn(\"appName\").when(parserSpy).getAppName();\n doReturn(\"resourceGroupName\").when(parserSpy).getResourceGroup();\n final MavenProjec... | {
"fields": [
{
"declarator": "mojo",
"modifier": "protected final",
"original_string": "protected final AbstractWebAppMojo mojo;",
"type": "AbstractWebAppMojo",
"var_name": "mojo"
},
{
"declarator": "validator",
"modifier": "protected final",
"original_stri... | {
"body": "public WebAppConfiguration getWebAppConfiguration() throws AzureExecutionException {\n WebAppConfiguration.Builder builder = new WebAppConfiguration.Builder();\n final OperatingSystemEnum os = getOs();\n if (os == null) {\n Log.debug(\"No runtime related config is specified.... | {
"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_234 | {
"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 assureWarFileExisted() throws AzureExecutionException {\n final File file = mock(File.class);\n doReturn(\"test.war\").when(file).getName();\n doReturn(true).when(file).exists();\n doReturn(true).when(file).isFile();\n\n buildHandler();\n han... | {
"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_49 | {
"fields": [],
"file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/AzureLoginHelperTest.java",
"identifier": "AzureLoginHelperTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRefreshToken() throws Exception {\n final AuthenticationResult authenticationResult = TestHelper.createAuthenticationResult();\n final AuthenticationContext ctx = mock(AuthenticationContext.class);\n final AzureEnvironment env = AzureEnvironment.AZURE;\n ... | {
"fields": [
{
"declarator": "AZURE_ENVIRONMENT_MAP = new HashMap<>()",
"modifier": "private static final",
"original_string": "private static final Map<AzureEnvironment, String> AZURE_ENVIRONMENT_MAP = new HashMap<>();",
"type": "Map<AzureEnvironment, String>",
"var_name": "AZURE_E... | {
"body": "static AzureCredential refreshToken(AzureEnvironment env, String refreshToken)\n throws MalformedURLException, InterruptedException, ExecutionException {\n if (env == null) {\n throw new IllegalArgumentException(\"Parameter 'env' cannot be null.\");\n }\n if (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_42 | {
"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 testStart() throws IOException {\n\n // should be able to rest\n localAuthServer.stop();\n try {\n localAuthServer.start();\n } catch (Exception ex) {\n fail(\"Should not fail on after start.\");\n }\n }",
"class_method_si... | {
"fields": [
{
"declarator": "loginSuccessHTMLTemplate",
"modifier": "private static",
"original_string": "private static String loginSuccessHTMLTemplate;",
"type": "String",
"var_name": "loginSuccessHTMLTemplate"
},
{
"declarator": "loginErrorHTMLTemplate",
"mod... | {
"body": "public void start() throws IOException {\n if (jettyServer.isStarted()) {\n return;\n }\n try {\n jettyServer.start();\n } catch (Exception e) { // server.start will throw Exception\n if (e instanceof RuntimeException) {\n // avoid... | {
"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_116 | {
"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 testBadExpression() {\n final Map<String, Object> map = new HashMap<>();\n map.put(\"foo\", \"{{bar}\");\n map.put(\"bar\", \"hello world\");\n try {\n evalPlainText(\"foo\", map);\n fail(\"Should report error when evaluate text is no... | {
"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_268 | {
"fields": [
{
"declarator": "mojo",
"modifier": "@Mock\n protected",
"original_string": "@Mock\n protected AbstractWebAppMojo mojo;",
"type": "AbstractWebAppMojo",
"var_name": "mojo"
},
{
"declarator": "parser",
"modifier": "protected",
"original_str... | {
"body": "@Test\n public void getServerId() {\n assertNull(parser.getServerId());\n\n final ContainerSetting containerSetting = mock(ContainerSetting.class);\n doReturn(containerSetting).when(mojo).getContainerSettings();\n doReturn(\"serverId\").when(containerSetting).getServerId();\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 String getServerId() {\n final ContainerSetting containerSetting = mojo.getContainerSettings();\n if (containerSetting == null) {\n return null;\n }\n return containerSetting.getServerId();\n }",
"class_method_signature": "V1ConfigurationPar... | {
"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_15 | {
"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 doExecute() throws Exception {\n final ArtifactHandler handler = mock(ArtifactHandler.class);\n final FunctionRuntimeHandler runtimeHandler = mock(FunctionRuntimeHandler.class);\n final FunctionApp app = mock(FunctionApp.class);\n doReturn(app).when(mojoSp... | {
"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": "@Override\n protected void doExecute() throws AzureExecutionException {\n try {\n parseConfiguration();\n\n checkArtifactCompileVersion();\n\n final WebAppBase target = createOrUpdateResource();\n\n if (target == null) {\n throw new Azure... | {
"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_141 | {
"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 testPromoteMultipleEntities() 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++) {\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_157 | {
"fields": [],
"file": "azure-tools-common/src/test/java/com/microsoft/azure/common/utils/TextUtilsTest.java",
"identifier": "TextUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSplitLinesEmpty() {\n assertEquals(1, TextUtils.splitLines(\"\").length);\n assertEquals(1, TextUtils.splitLines(\" \").length);\n }",
"class_method_signature": "TextUtilsTest.testSplitLinesEmpty()",
"constructor": false,
"full_signature": "@Test public v... | {
"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_229 | {
"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 getContextPath() {\n doReturn(\"/\").when(mojo).getPath();\n buildHandler();\n assertEquals(handlerSpy.getContextPath(), \"\");\n\n doReturn(\" / \").when(mojo).getPath();\n buildHandler();\n assertEquals(handlerSpy.getContextPath(), \"\");... | {
"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 String getContextPath() {\n String path = contextPath.trim();\n if (path.charAt(0) == '/') {\n path = path.substring(1);\n }\n return path;\n }",
"class_method_signature": "WarArtifactHandlerImpl.getContextPath()",
"constructor": false,
"full_signat... | {
"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_54 | {
"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 testOAuthLogin() throws Exception {\n final AzureEnvironment env = AzureEnvironment.AZURE;\n final AzureCredential credExpected = AzureCredential.fromAuthenticationResult(TestHelper.createAuthenticationResult());\n mockStatic(AzureLoginHelper.class);\n whe... | {
"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 oAuthLogin(AzureEnvironment env)\n throws AzureLoginFailureException, DesktopNotSupportedException, InterruptedException, ExecutionException {\n return AzureLoginHelper.oAuthLogin(env);\n }",
"class_method_signature": "AzureAuthHelper.oAuthLogin(AzureEnv... | {
"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_100 | {
"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 testHandleSelectOnePromoteYesNo() 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_252 | {
"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 getOs() throws AzureExecutionException {\n final RuntimeSetting runtime = mock(RuntimeSetting.class);\n doReturn(runtime).when(mojo).getRuntime();\n\n doReturn(true).when(runtime).isEmpty();\n assertEquals(null, parser.getOs());\n\n doReturn(false).... | {
"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 OperatingSystemEnum getOs() throws AzureExecutionException {\n validate(validator.validateOs());\n final RuntimeSetting runtime = mojo.getRuntime();\n final String os = runtime.getOs();\n if (runtime.isEmpty()) {\n return null;\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_1 | {
"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 testPluginConfigurationFromPluginManagement() throws Exception {\n final File pom = new File(this.getClass().getClassLoader().getResource(\"pom-2.xml\").getFile());\n final Model model = TestHelper.readMavenModel(pom);\n final MavenProject project = Mockito.mock(... | {
"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_194 | {
"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 getAzureClient() throws Exception {\n assertEquals(azure, mojo.getAzureClient());\n }",
"class_method_signature": "AbstractAzureMojoTest.getAzureClient()",
"constructor": false,
"full_signature": "@Test public void getAzureClient()",
"identifier": "getAzureClient",
... | {
"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 Azure getAzureClient() throws AzureAuthFailureException {\n if (azure == null) {\n if (this.authentication != null && (this.authentication.getFile() != null || StringUtils.isNotBlank(authentication.getServerId()))) {\n // TODO: remove the old way of authentication\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_78 | {
"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 testSetRuntimeVersion() {\n final DeploymentSettings deploy = new DeploymentSettings();\n deploy.setRuntimeVersion(\"8\");\n assertEquals(\"8\", deploy.getRuntimeVersion());\n }",
"class_method_signature": "DeploymentSettingsTest.testSetRuntimeVersion()",
... | {
"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 setRuntimeVersion(String runtimeVersion) {\n this.runtimeVersion = runtimeVersion;\n }",
"class_method_signature": "DeploymentSettings.setRuntimeVersion(String runtimeVersion)",
"constructor": false,
"full_signature": "public void setRuntimeVersion(String runtimeVersion)",
"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_97 | {
"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 testBadTemplate() throws Exception {\n try {\n wrapper.handle(\"\", true);\n fail(\"Should report IAE when template cannot be found.\");\n } catch (IllegalArgumentException e) {\n // expected\n }\n\n try {\n wrap... | {
"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_205 | {
"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 createDeploymentSlotFromParent() throws AzureExecutionException {\n final DeploymentSlotHandler handlerSpy = spy(handler);\n final WebApp app = mock(WebApp.class);\n final DeploymentSlots slots = mock(DeploymentSlots.class);\n final Blank stage1 = mock(Bla... | {
"fields": [
{
"declarator": "INVALID_SLOT_SETTINGS = \"No <deploymentSlot> is specified in pom.xml. \" +\n \"Please configure it for slot deployment.\"",
"modifier": "private static final",
"original_string": "private static final String INVALID_SLOT_SETTINGS = \"No <deploymentSlot> is ... | {
"body": "protected void createDeploymentSlot(final WebApp app, final String slotName,\n final String configurationSource) throws AzureExecutionException {\n assureValidSlotName(slotName);\n final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentS... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_213 | {
"fields": [
{
"declarator": "config",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebAppConfiguration config;",
"type": "WebAppConfiguration",
"var_name": "config"
},
{
"declarator": "azureClient",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void updateAppRuntimeV1() throws Exception {\n final SiteInner siteInner = mock(SiteInner.class);\n doReturn(\"app,linux\").when(siteInner).kind();\n final Update update = mock(Update.class);\n final WebApp app = mock(WebApp.class);\n doReturn(siteInner)... | {
"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_81 | {
"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 testWithClusterName() {\n final SpringConfiguration config = new SpringConfiguration();\n config.withClusterName(\"clusterName1\");\n assertEquals(\"clusterName1\", config.getClusterName());\n }",
"class_method_signature": "SpringConfigurationTest.testWithCl... | {
"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 withClusterName(String clusterName) {\n this.clusterName = clusterName;\n return this;\n }",
"class_method_signature": "SpringConfiguration.withClusterName(String clusterName)",
"constructor": false,
"full_signature": "public SpringConfiguration withCluster... | {
"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_39 | {
"fields": [],
"file": "azure-auth-helper/src/test/java/com/microsoft/azure/auth/configuration/AuthConfigurationTest.java",
"identifier": "AuthConfigurationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSetHttpProxyPort() {\n final AuthConfiguration auth = new AuthConfiguration();\n auth.setHttpProxyPort(\"8080\");\n assertEquals(\"8080\", auth.getHttpProxyPort());\n }",
"class_method_signature": "AuthConfigurationTest.testSetHttpProxyPort()",
"constr... | {
"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 setHttpProxyPort(String httpProxyPort) {\n this.httpProxyPort = httpProxyPort;\n }",
"class_method_signature": "AuthConfiguration.setHttpProxyPort(String httpProxyPort)",
"constructor": false,
"full_signature": "public void setHttpProxyPort(String httpProxyPort)",
"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_244 | {
"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 getSettingsHandler() throws Exception {\n final HandlerFactory factory = new HandlerFactoryImpl();\n\n final SettingsHandler handler = factory.getSettingsHandler(mojo);\n assertNotNull(handler);\n assertTrue(handler instanceof SettingsHandlerImpl);\n }"... | {
"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 SettingsHandler getSettingsHandler(final AbstractWebAppMojo mojo) {\n return new SettingsHandlerImpl(mojo);\n }",
"class_method_signature": "HandlerFactoryImpl.getSettingsHandler(final AbstractWebAppMojo mojo)",
"constructor": false,
"full_signature": "@Override public... | {
"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_182 | {
"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 getDefaultValidReturnCodes() throws Exception {\n assertEquals(2, CommandUtils.getValidReturnCodes().size());\n assertEquals(true, CommandUtils.getValidReturnCodes().contains(0L));\n }",
"class_method_signature": "CommandUtilsTest.getDefaultValidReturnCodes()",
"... | {
"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> getDefaultValidReturnCodes() {\n return Arrays.asList(0L);\n }",
"class_method_signature": "CommandUtils.getDefaultValidReturnCodes()",
"constructor": false,
"full_signature": "public static List<Long> getDefaultValidReturnCodes()",
"identifier": "getDefaultValidR... | {
"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_233 | {
"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 assureWarFileExistedWhenIsNotAFile() throws AzureExecutionException {\n final File fileMock = mock(File.class);\n\n doReturn(\"test.war\").when(fileMock).getName();\n doReturn(false).when(fileMock).exists();\n doRe... | {
"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_264 | {
"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 getOs() throws AzureExecutionException {\n assertNull(parser.getOs());\n\n doReturn(\"1.8\").when(mojo).getJavaVersion();\n assertEquals(OperatingSystemEnum.Windows, parser.getOs());\n\n doReturn(null).when(mojo).getJavaVersion();\n doReturn(\"linux... | {
"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 OperatingSystemEnum getOs() throws AzureExecutionException {\n validate(validator.validateOs());\n final String linuxRuntime = mojo.getLinuxRuntime();\n final String javaVersion = mojo.getJavaVersion();\n final ContainerSetting containerSetting = mojo.getCo... | {
"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_19 | {
"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 testGetDeploymentTypeByRuntime() throws AzureExecutionException {\n // Windows\n doReturn(Windows).when(mojoSpy).getOsEnum();\n assertEquals(RUN_FROM_ZIP, mojoSpy.getDeploymentTypeByRuntime());\n // Linux\n doReturn(Linux).when(mojoSpy).getOsEnum();... | {
"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 DeploymentType getDeploymentTypeByRuntime() throws AzureExecutionException {\n final OperatingSystemEnum operatingSystemEnum = getOsEnum();\n switch (operatingSystemEnum) {\n case Docker:\n return DOCKER;\n case Linux:\n return isD... | {
"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_272 | {
"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 deployArtifactsWithNoResources() throws Exception {\n final DeployMojo mojo = getMojoFromPom(\"/pom-linux.xml\");\n\n final DeployMojo mojoSpy = spy(mojo);\n final WebApp app = mock(WebApp.class);\n doReturn(\"target/classes\").when(mojoSpy).getDeploymentS... | {
"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_225 | {
"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 isJavaSERuntime() throws Exception {\n final MavenProject mavenProject = TestUtils.getSimpleMavenProjectForUnitTest();\n final IProject project = ProjectUtils.convertCommonProject(mavenProject);\n final RuntimeSetting runtimeSetting = mock(RuntimeSetting.class);\... | {
"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 boolean isJavaSERuntime() {\n final boolean isJarProject = project != null && project.isJarProject();\n if (runtimeSetting == null || runtimeSetting.isEmpty() || isJarProject) {\n return isJarProject;\n }\n final String webContainer = runtimeSetting.getOsEnu... | {
"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_58 | {
"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 testRefreshTokenInvalidParameter() throws Exception {\n try {\n AzureAuthHelper.refreshToken(null, \"abc\");\n fail(\"Should throw IAE when env is null.\");\n } catch (IllegalArgumentException e) {\n // ignore\n }\n\n try {... | {
"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_177 | {
"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 installFunctionExtension() throws Exception {\n final CommandHandler commandHandler = mock(CommandHandler.class);\n final FunctionCoreToolsHandlerImpl functionCoreToolsHandler =\n new FunctionCoreToolsHandlerImpl(commandHandler);\n final FunctionCo... | {
"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 void installFunctionExtension(File stagingDirector, File basedir) throws AzureExecutionException {\n commandHandler.runCommandWithReturnCodeCheck(\n String.format(FUNC_EXTENSIONS_INSTALL_TEMPLATE, basedir.getAbsolutePath()),\n true,\n stagingDir... | {
"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_198 | {
"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 isTelemetryAllowed() throws Exception {\n assertTrue(!mojo.isTelemetryAllowed());\n }",
"class_method_signature": "AbstractAzureMojoTest.isTelemetryAllowed()",
"constructor": false,
"full_signature": "@Test public void isTelemetryAllowed()",
"identifier": "isTelemet... | {
"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 boolean isTelemetryAllowed() {\n return allowTelemetry;\n }",
"class_method_signature": "AbstractAzureMojo.isTelemetryAllowed()",
"constructor": false,
"full_signature": "public boolean isTelemetryAllowed()",
"identifier": "isTelemetryAllowed",
"invocations": [],
"modifiers": "... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_23 | {
"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 getScriptFilePath() throws Exception {\n final PackageMojo mojo = getMojoFromPom();\n final PackageMojo mojoSpy = spy(mojo);\n ReflectionUtils.setVariableValueInObject(mojoSpy, \"finalName\", \"artifact-0.1.0\");\n\n final String finalName = mojoSpy.getScr... | {
"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 String getScriptFilePath() {\n return new StringBuilder()\n .append(\"..\")\n .append(\"/\")\n .append(getFinalName())\n .append(\".jar\")\n .toString();\n }",
"class_method_signature": "PackageMojo.getScriptFi... | {
"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_120 | {
"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 getClusterByName() {\n final ServiceResourceInner mockCluster = mock(ServiceResourceInner.class);\n doReturn(\"existCluster\").when(mockCluster).name();\n final List<ServiceResourceInner> mockClusterList = new ArrayList<>();\n mockClusterList.add(mockClust... | {
"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 ServiceResourceInner getClusterByName(String cluster) {\n final List<ServiceResourceInner> clusterList = getAvailableClusters();\n return clusterList.stream().filter(appClusterResourceInner -> appClusterResourceInner.name().equals(cluster))\n .findFirst()\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_74 | {
"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 testSetMemoryInGB() {\n final DeploymentSettings deploy = new DeploymentSettings();\n deploy.setMemoryInGB(\"2\");\n assertEquals(\"2\", deploy.getMemoryInGB());\n }",
"class_method_signature": "DeploymentSettingsTest.testSetMemoryInGB()",
"constructor": f... | {
"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 setMemoryInGB(String memoryInGB) {\n this.memoryInGB = memoryInGB;\n }",
"class_method_signature": "DeploymentSettings.setMemoryInGB(String memoryInGB)",
"constructor": false,
"full_signature": "public void setMemoryInGB(String memoryInGB)",
"identifier": "setMemoryInGB",
"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_209 | {
"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 createBreadNewDeploymentSlot() throws AzureExecutionException {\n final DeploymentSlotHandler handlerSpy = spy(handler);\n final WebApp app = mock(WebApp.class);\n final DeploymentSlots slots = mock(DeploymentSlots.class);\n final Blank stage1 = mock(Blank... | {
"fields": [
{
"declarator": "INVALID_SLOT_SETTINGS = \"No <deploymentSlot> is specified in pom.xml. \" +\n \"Please configure it for slot deployment.\"",
"modifier": "private static final",
"original_string": "private static final String INVALID_SLOT_SETTINGS = \"No <deploymentSlot> is ... | {
"body": "protected void createDeploymentSlot(final WebApp app, final String slotName,\n final String configurationSource) throws AzureExecutionException {\n assureValidSlotName(slotName);\n final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentS... | {
"created": null,
"fork": null,
"fork_count": 81,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 95752629,
"size": 2604,
"stargazer_count": 182,
"stars": null,
"updates": null,
"url": "https://github.com/microsoft/azure-maven-plugins"
} |
95752629_136 | {
"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 testPromoteStringRequired() throws Exception {\n when(reader.readLine()).thenReturn(\"bar\");\n String result = prompter.promoteString(\"Please input a string\", \"foo\", input -> {\n if (StringUtils.equals(\"bar\", input)) {\n // cannot input ... | {
"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"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.