id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
122,400 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/ApplicationConversionService.java | ApplicationConversionService.addApplicationFormatters | public static void addApplicationFormatters(FormatterRegistry registry) {
registry.addFormatter(new CharArrayFormatter());
registry.addFormatter(new InetAddressFormatter());
registry.addFormatter(new IsoOffsetFormatter());
} | java | public static void addApplicationFormatters(FormatterRegistry registry) {
registry.addFormatter(new CharArrayFormatter());
registry.addFormatter(new InetAddressFormatter());
registry.addFormatter(new IsoOffsetFormatter());
} | [
"public",
"static",
"void",
"addApplicationFormatters",
"(",
"FormatterRegistry",
"registry",
")",
"{",
"registry",
".",
"addFormatter",
"(",
"new",
"CharArrayFormatter",
"(",
")",
")",
";",
"registry",
".",
"addFormatter",
"(",
"new",
"InetAddressFormatter",
"(",
... | Add formatters useful for most Spring Boot applications.
@param registry the service to register default formatters with | [
"Add",
"formatters",
"useful",
"for",
"most",
"Spring",
"Boot",
"applications",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/ApplicationConversionService.java#L131-L135 |
122,401 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java | DataSourceProperties.determineDriverClassName | public String determineDriverClassName() {
if (StringUtils.hasText(this.driverClassName)) {
Assert.state(driverClassIsLoadable(),
() -> "Cannot load driver class: " + this.driverClassName);
return this.driverClassName;
}
String driverClassName = null;
if (StringUtils.hasText(this.url)) {
driverCla... | java | public String determineDriverClassName() {
if (StringUtils.hasText(this.driverClassName)) {
Assert.state(driverClassIsLoadable(),
() -> "Cannot load driver class: " + this.driverClassName);
return this.driverClassName;
}
String driverClassName = null;
if (StringUtils.hasText(this.url)) {
driverCla... | [
"public",
"String",
"determineDriverClassName",
"(",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"this",
".",
"driverClassName",
")",
")",
"{",
"Assert",
".",
"state",
"(",
"driverClassIsLoadable",
"(",
")",
",",
"(",
")",
"->",
"\"Cannot load d... | Determine the driver to use based on this configuration and the environment.
@return the driver to use
@since 1.4.0 | [
"Determine",
"the",
"driver",
"to",
"use",
"based",
"on",
"this",
"configuration",
"and",
"the",
"environment",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java#L222-L241 |
122,402 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java | DataSourceProperties.determineUrl | public String determineUrl() {
if (StringUtils.hasText(this.url)) {
return this.url;
}
String databaseName = determineDatabaseName();
String url = (databaseName != null)
? this.embeddedDatabaseConnection.getUrl(databaseName) : null;
if (!StringUtils.hasText(url)) {
throw new DataSourceBeanCreationEx... | java | public String determineUrl() {
if (StringUtils.hasText(this.url)) {
return this.url;
}
String databaseName = determineDatabaseName();
String url = (databaseName != null)
? this.embeddedDatabaseConnection.getUrl(databaseName) : null;
if (!StringUtils.hasText(url)) {
throw new DataSourceBeanCreationEx... | [
"public",
"String",
"determineUrl",
"(",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"this",
".",
"url",
")",
")",
"{",
"return",
"this",
".",
"url",
";",
"}",
"String",
"databaseName",
"=",
"determineDatabaseName",
"(",
")",
";",
"String",
... | Determine the url to use based on this configuration and the environment.
@return the url to use
@since 1.4.0 | [
"Determine",
"the",
"url",
"to",
"use",
"based",
"on",
"this",
"configuration",
"and",
"the",
"environment",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java#L275-L288 |
122,403 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java | DataSourceProperties.determineDatabaseName | public String determineDatabaseName() {
if (this.generateUniqueName) {
if (this.uniqueName == null) {
this.uniqueName = UUID.randomUUID().toString();
}
return this.uniqueName;
}
if (StringUtils.hasLength(this.name)) {
return this.name;
}
if (this.embeddedDatabaseConnection != EmbeddedDatabaseC... | java | public String determineDatabaseName() {
if (this.generateUniqueName) {
if (this.uniqueName == null) {
this.uniqueName = UUID.randomUUID().toString();
}
return this.uniqueName;
}
if (StringUtils.hasLength(this.name)) {
return this.name;
}
if (this.embeddedDatabaseConnection != EmbeddedDatabaseC... | [
"public",
"String",
"determineDatabaseName",
"(",
")",
"{",
"if",
"(",
"this",
".",
"generateUniqueName",
")",
"{",
"if",
"(",
"this",
".",
"uniqueName",
"==",
"null",
")",
"{",
"this",
".",
"uniqueName",
"=",
"UUID",
".",
"randomUUID",
"(",
")",
".",
... | Determine the name to used based on this configuration.
@return the database name to use or {@code null}
@since 2.0.0 | [
"Determine",
"the",
"name",
"to",
"used",
"based",
"on",
"this",
"configuration",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java#L295-L309 |
122,404 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java | DataSourceProperties.determineUsername | public String determineUsername() {
if (StringUtils.hasText(this.username)) {
return this.username;
}
if (EmbeddedDatabaseConnection.isEmbedded(determineDriverClassName())) {
return "sa";
}
return null;
} | java | public String determineUsername() {
if (StringUtils.hasText(this.username)) {
return this.username;
}
if (EmbeddedDatabaseConnection.isEmbedded(determineDriverClassName())) {
return "sa";
}
return null;
} | [
"public",
"String",
"determineUsername",
"(",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"this",
".",
"username",
")",
")",
"{",
"return",
"this",
".",
"username",
";",
"}",
"if",
"(",
"EmbeddedDatabaseConnection",
".",
"isEmbedded",
"(",
"de... | Determine the username to use based on this configuration and the environment.
@return the username to use
@since 1.4.0 | [
"Determine",
"the",
"username",
"to",
"use",
"based",
"on",
"this",
"configuration",
"and",
"the",
"environment",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java#L329-L337 |
122,405 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java | DataSourceProperties.determinePassword | public String determinePassword() {
if (StringUtils.hasText(this.password)) {
return this.password;
}
if (EmbeddedDatabaseConnection.isEmbedded(determineDriverClassName())) {
return "";
}
return null;
} | java | public String determinePassword() {
if (StringUtils.hasText(this.password)) {
return this.password;
}
if (EmbeddedDatabaseConnection.isEmbedded(determineDriverClassName())) {
return "";
}
return null;
} | [
"public",
"String",
"determinePassword",
"(",
")",
"{",
"if",
"(",
"StringUtils",
".",
"hasText",
"(",
"this",
".",
"password",
")",
")",
"{",
"return",
"this",
".",
"password",
";",
"}",
"if",
"(",
"EmbeddedDatabaseConnection",
".",
"isEmbedded",
"(",
"de... | Determine the password to use based on this configuration and the environment.
@return the password to use
@since 1.4.0 | [
"Determine",
"the",
"password",
"to",
"use",
"based",
"on",
"this",
"configuration",
"and",
"the",
"environment",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java#L357-L365 |
122,406 | spring-projects/spring-boot | spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java | InitializrService.executeInitializrMetadataRetrieval | private CloseableHttpResponse executeInitializrMetadataRetrieval(String url) {
HttpGet request = new HttpGet(url);
request.setHeader(new BasicHeader(HttpHeaders.ACCEPT, ACCEPT_META_DATA));
return execute(request, url, "retrieve metadata");
} | java | private CloseableHttpResponse executeInitializrMetadataRetrieval(String url) {
HttpGet request = new HttpGet(url);
request.setHeader(new BasicHeader(HttpHeaders.ACCEPT, ACCEPT_META_DATA));
return execute(request, url, "retrieve metadata");
} | [
"private",
"CloseableHttpResponse",
"executeInitializrMetadataRetrieval",
"(",
"String",
"url",
")",
"{",
"HttpGet",
"request",
"=",
"new",
"HttpGet",
"(",
"url",
")",
";",
"request",
".",
"setHeader",
"(",
"new",
"BasicHeader",
"(",
"HttpHeaders",
".",
"ACCEPT",
... | Retrieves the meta-data of the service at the specified URL.
@param url the URL
@return the response | [
"Retrieves",
"the",
"meta",
"-",
"data",
"of",
"the",
"service",
"at",
"the",
"specified",
"URL",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java#L185-L189 |
122,407 | spring-projects/spring-boot | spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/SpringApplicationRunner.java | SpringApplicationRunner.compileAndRun | public void compileAndRun() throws Exception {
synchronized (this.monitor) {
try {
stop();
Class<?>[] compiledSources = compile();
monitorForChanges();
// Run in new thread to ensure that the context classloader is setup
this.runThread = new RunThread(compiledSources);
this.runThread.start(... | java | public void compileAndRun() throws Exception {
synchronized (this.monitor) {
try {
stop();
Class<?>[] compiledSources = compile();
monitorForChanges();
// Run in new thread to ensure that the context classloader is setup
this.runThread = new RunThread(compiledSources);
this.runThread.start(... | [
"public",
"void",
"compileAndRun",
"(",
")",
"throws",
"Exception",
"{",
"synchronized",
"(",
"this",
".",
"monitor",
")",
"{",
"try",
"{",
"stop",
"(",
")",
";",
"Class",
"<",
"?",
">",
"[",
"]",
"compiledSources",
"=",
"compile",
"(",
")",
";",
"mo... | Compile and run the application.
@throws Exception on error | [
"Compile",
"and",
"run",
"the",
"application",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/run/SpringApplicationRunner.java#L97-L117 |
122,408 | spring-projects/spring-boot | spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerationRequest.java | ProjectGenerationRequest.generateUrl | URI generateUrl(InitializrServiceMetadata metadata) {
try {
URIBuilder builder = new URIBuilder(this.serviceUrl);
StringBuilder sb = new StringBuilder();
if (builder.getPath() != null) {
sb.append(builder.getPath());
}
ProjectType projectType = determineProjectType(metadata);
this.type = projec... | java | URI generateUrl(InitializrServiceMetadata metadata) {
try {
URIBuilder builder = new URIBuilder(this.serviceUrl);
StringBuilder sb = new StringBuilder();
if (builder.getPath() != null) {
sb.append(builder.getPath());
}
ProjectType projectType = determineProjectType(metadata);
this.type = projec... | [
"URI",
"generateUrl",
"(",
"InitializrServiceMetadata",
"metadata",
")",
"{",
"try",
"{",
"URIBuilder",
"builder",
"=",
"new",
"URIBuilder",
"(",
"this",
".",
"serviceUrl",
")",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(... | Generates the URI to use to generate a project represented by this request.
@param metadata the metadata that describes the service
@return the project generation URI | [
"Generates",
"the",
"URI",
"to",
"use",
"to",
"generate",
"a",
"project",
"represented",
"by",
"this",
"request",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerationRequest.java#L306-L365 |
122,409 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java | SpringBootCondition.anyMatches | protected final boolean anyMatches(ConditionContext context,
AnnotatedTypeMetadata metadata, Condition... conditions) {
for (Condition condition : conditions) {
if (matches(context, metadata, condition)) {
return true;
}
}
return false;
} | java | protected final boolean anyMatches(ConditionContext context,
AnnotatedTypeMetadata metadata, Condition... conditions) {
for (Condition condition : conditions) {
if (matches(context, metadata, condition)) {
return true;
}
}
return false;
} | [
"protected",
"final",
"boolean",
"anyMatches",
"(",
"ConditionContext",
"context",
",",
"AnnotatedTypeMetadata",
"metadata",
",",
"Condition",
"...",
"conditions",
")",
"{",
"for",
"(",
"Condition",
"condition",
":",
"conditions",
")",
"{",
"if",
"(",
"matches",
... | Return true if any of the specified conditions match.
@param context the context
@param metadata the annotation meta-data
@param conditions conditions to test
@return {@code true} if any condition matches. | [
"Return",
"true",
"if",
"any",
"of",
"the",
"specified",
"conditions",
"match",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java#L135-L143 |
122,410 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java | SpringBootCondition.matches | protected final boolean matches(ConditionContext context,
AnnotatedTypeMetadata metadata, Condition condition) {
if (condition instanceof SpringBootCondition) {
return ((SpringBootCondition) condition).getMatchOutcome(context, metadata)
.isMatch();
}
return condition.matches(context, metadata);
} | java | protected final boolean matches(ConditionContext context,
AnnotatedTypeMetadata metadata, Condition condition) {
if (condition instanceof SpringBootCondition) {
return ((SpringBootCondition) condition).getMatchOutcome(context, metadata)
.isMatch();
}
return condition.matches(context, metadata);
} | [
"protected",
"final",
"boolean",
"matches",
"(",
"ConditionContext",
"context",
",",
"AnnotatedTypeMetadata",
"metadata",
",",
"Condition",
"condition",
")",
"{",
"if",
"(",
"condition",
"instanceof",
"SpringBootCondition",
")",
"{",
"return",
"(",
"(",
"SpringBootC... | Return true if any of the specified condition matches.
@param context the context
@param metadata the annotation meta-data
@param condition condition to test
@return {@code true} if the condition matches. | [
"Return",
"true",
"if",
"any",
"of",
"the",
"specified",
"condition",
"matches",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java#L152-L159 |
122,411 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringBootExceptionHandler.java | SpringBootExceptionHandler.isLogConfigurationMessage | private boolean isLogConfigurationMessage(Throwable ex) {
if (ex instanceof InvocationTargetException) {
return isLogConfigurationMessage(ex.getCause());
}
String message = ex.getMessage();
if (message != null) {
for (String candidate : LOG_CONFIGURATION_MESSAGES) {
if (message.contains(candidate)) {
... | java | private boolean isLogConfigurationMessage(Throwable ex) {
if (ex instanceof InvocationTargetException) {
return isLogConfigurationMessage(ex.getCause());
}
String message = ex.getMessage();
if (message != null) {
for (String candidate : LOG_CONFIGURATION_MESSAGES) {
if (message.contains(candidate)) {
... | [
"private",
"boolean",
"isLogConfigurationMessage",
"(",
"Throwable",
"ex",
")",
"{",
"if",
"(",
"ex",
"instanceof",
"InvocationTargetException",
")",
"{",
"return",
"isLogConfigurationMessage",
"(",
"ex",
".",
"getCause",
"(",
")",
")",
";",
"}",
"String",
"mess... | Check if the exception is a log configuration message, i.e. the log call might not
have actually output anything.
@param ex the source exception
@return {@code true} if the exception contains a log configuration message | [
"Check",
"if",
"the",
"exception",
"is",
"a",
"log",
"configuration",
"message",
"i",
".",
"e",
".",
"the",
"log",
"call",
"might",
"not",
"have",
"actually",
"output",
"anything",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringBootExceptionHandler.java#L88-L101 |
122,412 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/TaskSchedulerBuilder.java | TaskSchedulerBuilder.awaitTerminationPeriod | public TaskSchedulerBuilder awaitTerminationPeriod(Duration awaitTerminationPeriod) {
return new TaskSchedulerBuilder(this.poolSize, this.awaitTermination,
awaitTerminationPeriod, this.threadNamePrefix, this.customizers);
} | java | public TaskSchedulerBuilder awaitTerminationPeriod(Duration awaitTerminationPeriod) {
return new TaskSchedulerBuilder(this.poolSize, this.awaitTermination,
awaitTerminationPeriod, this.threadNamePrefix, this.customizers);
} | [
"public",
"TaskSchedulerBuilder",
"awaitTerminationPeriod",
"(",
"Duration",
"awaitTerminationPeriod",
")",
"{",
"return",
"new",
"TaskSchedulerBuilder",
"(",
"this",
".",
"poolSize",
",",
"this",
".",
"awaitTermination",
",",
"awaitTerminationPeriod",
",",
"this",
".",... | Set the maximum time the executor is supposed to block on shutdown. When set, the
executor blocks on shutdown in order to wait for remaining tasks to complete their
execution before the rest of the container continues to shut down. This is
particularly useful if your remaining tasks are likely to need access to other
r... | [
"Set",
"the",
"maximum",
"time",
"the",
"executor",
"is",
"supposed",
"to",
"block",
"on",
"shutdown",
".",
"When",
"set",
"the",
"executor",
"blocks",
"on",
"shutdown",
"in",
"order",
"to",
"wait",
"for",
"remaining",
"tasks",
"to",
"complete",
"their",
"... | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/TaskSchedulerBuilder.java#L104-L107 |
122,413 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/TaskSchedulerBuilder.java | TaskSchedulerBuilder.threadNamePrefix | public TaskSchedulerBuilder threadNamePrefix(String threadNamePrefix) {
return new TaskSchedulerBuilder(this.poolSize, this.awaitTermination,
this.awaitTerminationPeriod, threadNamePrefix, this.customizers);
} | java | public TaskSchedulerBuilder threadNamePrefix(String threadNamePrefix) {
return new TaskSchedulerBuilder(this.poolSize, this.awaitTermination,
this.awaitTerminationPeriod, threadNamePrefix, this.customizers);
} | [
"public",
"TaskSchedulerBuilder",
"threadNamePrefix",
"(",
"String",
"threadNamePrefix",
")",
"{",
"return",
"new",
"TaskSchedulerBuilder",
"(",
"this",
".",
"poolSize",
",",
"this",
".",
"awaitTermination",
",",
"this",
".",
"awaitTerminationPeriod",
",",
"threadName... | Set the prefix to use for the names of newly created threads.
@param threadNamePrefix the thread name prefix to set
@return a new builder instance | [
"Set",
"the",
"prefix",
"to",
"use",
"for",
"the",
"names",
"of",
"newly",
"created",
"threads",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/TaskSchedulerBuilder.java#L114-L117 |
122,414 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystem.java | LoggingSystem.get | public static LoggingSystem get(ClassLoader classLoader) {
String loggingSystem = System.getProperty(SYSTEM_PROPERTY);
if (StringUtils.hasLength(loggingSystem)) {
if (NONE.equals(loggingSystem)) {
return new NoOpLoggingSystem();
}
return get(classLoader, loggingSystem);
}
return SYSTEMS.entrySet().... | java | public static LoggingSystem get(ClassLoader classLoader) {
String loggingSystem = System.getProperty(SYSTEM_PROPERTY);
if (StringUtils.hasLength(loggingSystem)) {
if (NONE.equals(loggingSystem)) {
return new NoOpLoggingSystem();
}
return get(classLoader, loggingSystem);
}
return SYSTEMS.entrySet().... | [
"public",
"static",
"LoggingSystem",
"get",
"(",
"ClassLoader",
"classLoader",
")",
"{",
"String",
"loggingSystem",
"=",
"System",
".",
"getProperty",
"(",
"SYSTEM_PROPERTY",
")",
";",
"if",
"(",
"StringUtils",
".",
"hasLength",
"(",
"loggingSystem",
")",
")",
... | Detect and return the logging system in use. Supports Logback and Java Logging.
@param classLoader the classloader
@return the logging system | [
"Detect",
"and",
"return",
"the",
"logging",
"system",
"in",
"use",
".",
"Supports",
"Logback",
"and",
"Java",
"Logging",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystem.java#L151-L164 |
122,415 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java | FileSystemWatcher.start | public void start() {
synchronized (this.monitor) {
saveInitialSnapshots();
if (this.watchThread == null) {
Map<File, FolderSnapshot> localFolders = new HashMap<>();
localFolders.putAll(this.folders);
this.watchThread = new Thread(new Watcher(this.remainingScans,
new ArrayList<>(this.listeners... | java | public void start() {
synchronized (this.monitor) {
saveInitialSnapshots();
if (this.watchThread == null) {
Map<File, FolderSnapshot> localFolders = new HashMap<>();
localFolders.putAll(this.folders);
this.watchThread = new Thread(new Watcher(this.remainingScans,
new ArrayList<>(this.listeners... | [
"public",
"void",
"start",
"(",
")",
"{",
"synchronized",
"(",
"this",
".",
"monitor",
")",
"{",
"saveInitialSnapshots",
"(",
")",
";",
"if",
"(",
"this",
".",
"watchThread",
"==",
"null",
")",
"{",
"Map",
"<",
"File",
",",
"FolderSnapshot",
">",
"loca... | Start monitoring the source folder for changes. | [
"Start",
"monitoring",
"the",
"source",
"folder",
"for",
"changes",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java#L154-L168 |
122,416 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java | FileSystemWatcher.stopAfter | void stopAfter(int remainingScans) {
Thread thread;
synchronized (this.monitor) {
thread = this.watchThread;
if (thread != null) {
this.remainingScans.set(remainingScans);
if (remainingScans <= 0) {
thread.interrupt();
}
}
this.watchThread = null;
}
if (thread != null && Thread.curr... | java | void stopAfter(int remainingScans) {
Thread thread;
synchronized (this.monitor) {
thread = this.watchThread;
if (thread != null) {
this.remainingScans.set(remainingScans);
if (remainingScans <= 0) {
thread.interrupt();
}
}
this.watchThread = null;
}
if (thread != null && Thread.curr... | [
"void",
"stopAfter",
"(",
"int",
"remainingScans",
")",
"{",
"Thread",
"thread",
";",
"synchronized",
"(",
"this",
".",
"monitor",
")",
"{",
"thread",
"=",
"this",
".",
"watchThread",
";",
"if",
"(",
"thread",
"!=",
"null",
")",
"{",
"this",
".",
"rema... | Stop monitoring the source folders.
@param remainingScans the number of remaining scans | [
"Stop",
"monitoring",
"the",
"source",
"folders",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java#L187-L207 |
122,417 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java | AbstractErrorWebExceptionHandler.getErrorAttributes | protected Map<String, Object> getErrorAttributes(ServerRequest request,
boolean includeStackTrace) {
return this.errorAttributes.getErrorAttributes(request, includeStackTrace);
} | java | protected Map<String, Object> getErrorAttributes(ServerRequest request,
boolean includeStackTrace) {
return this.errorAttributes.getErrorAttributes(request, includeStackTrace);
} | [
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"getErrorAttributes",
"(",
"ServerRequest",
"request",
",",
"boolean",
"includeStackTrace",
")",
"{",
"return",
"this",
".",
"errorAttributes",
".",
"getErrorAttributes",
"(",
"request",
",",
"includeStackTrace"... | Extract the error attributes from the current request, to be used to populate error
views or JSON payloads.
@param request the source request
@param includeStackTrace whether to include the error stacktrace information
@return the error attributes as a Map. | [
"Extract",
"the",
"error",
"attributes",
"from",
"the",
"current",
"request",
"to",
"be",
"used",
"to",
"populate",
"error",
"views",
"or",
"JSON",
"payloads",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java#L138-L141 |
122,418 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java | AbstractErrorWebExceptionHandler.isTraceEnabled | protected boolean isTraceEnabled(ServerRequest request) {
String parameter = request.queryParam("trace").orElse("false");
return !"false".equalsIgnoreCase(parameter);
} | java | protected boolean isTraceEnabled(ServerRequest request) {
String parameter = request.queryParam("trace").orElse("false");
return !"false".equalsIgnoreCase(parameter);
} | [
"protected",
"boolean",
"isTraceEnabled",
"(",
"ServerRequest",
"request",
")",
"{",
"String",
"parameter",
"=",
"request",
".",
"queryParam",
"(",
"\"trace\"",
")",
".",
"orElse",
"(",
"\"false\"",
")",
";",
"return",
"!",
"\"false\"",
".",
"equalsIgnoreCase",
... | Check whether the trace attribute has been set on the given request.
@param request the source request
@return {@code true} if the error trace has been requested, {@code false} otherwise | [
"Check",
"whether",
"the",
"trace",
"attribute",
"has",
"been",
"set",
"on",
"the",
"given",
"request",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java#L157-L160 |
122,419 | spring-projects/spring-boot | spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/SpringApplicationAdminClient.java | SpringApplicationAdminClient.stop | public void stop()
throws MojoExecutionException, IOException, InstanceNotFoundException {
try {
this.connection.invoke(this.objectName, "shutdown", null, null);
}
catch (ReflectionException ex) {
throw new MojoExecutionException("Shutdown failed", ex.getCause());
}
catch (MBeanException ex) {
thr... | java | public void stop()
throws MojoExecutionException, IOException, InstanceNotFoundException {
try {
this.connection.invoke(this.objectName, "shutdown", null, null);
}
catch (ReflectionException ex) {
throw new MojoExecutionException("Shutdown failed", ex.getCause());
}
catch (MBeanException ex) {
thr... | [
"public",
"void",
"stop",
"(",
")",
"throws",
"MojoExecutionException",
",",
"IOException",
",",
"InstanceNotFoundException",
"{",
"try",
"{",
"this",
".",
"connection",
".",
"invoke",
"(",
"this",
".",
"objectName",
",",
"\"shutdown\"",
",",
"null",
",",
"nul... | Stop the application managed by this instance.
@throws MojoExecutionException if the JMX service could not be contacted
@throws IOException if an I/O error occurs
@throws InstanceNotFoundException if the lifecycle mbean cannot be found | [
"Stop",
"the",
"application",
"managed",
"by",
"this",
"instance",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/SpringApplicationAdminClient.java#L87-L98 |
122,420 | spring-projects/spring-boot | spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ServiceCapabilitiesReportGenerator.java | ServiceCapabilitiesReportGenerator.generate | public String generate(String url) throws IOException {
Object content = this.initializrService.loadServiceCapabilities(url);
if (content instanceof InitializrServiceMetadata) {
return generateHelp(url, (InitializrServiceMetadata) content);
}
return content.toString();
} | java | public String generate(String url) throws IOException {
Object content = this.initializrService.loadServiceCapabilities(url);
if (content instanceof InitializrServiceMetadata) {
return generateHelp(url, (InitializrServiceMetadata) content);
}
return content.toString();
} | [
"public",
"String",
"generate",
"(",
"String",
"url",
")",
"throws",
"IOException",
"{",
"Object",
"content",
"=",
"this",
".",
"initializrService",
".",
"loadServiceCapabilities",
"(",
"url",
")",
";",
"if",
"(",
"content",
"instanceof",
"InitializrServiceMetadat... | Generate a report for the specified service. The report contains the available
capabilities as advertised by the root endpoint.
@param url the url of the service
@return the report that describes the service
@throws IOException if the report cannot be generated | [
"Generate",
"a",
"report",
"for",
"the",
"specified",
"service",
".",
"The",
"report",
"contains",
"the",
"available",
"capabilities",
"as",
"advertised",
"by",
"the",
"root",
"endpoint",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ServiceCapabilitiesReportGenerator.java#L58-L64 |
122,421 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java | DefaultErrorWebExceptionHandler.renderErrorView | protected Mono<ServerResponse> renderErrorView(ServerRequest request) {
boolean includeStackTrace = isIncludeStackTrace(request, MediaType.TEXT_HTML);
Map<String, Object> error = getErrorAttributes(request, includeStackTrace);
HttpStatus errorStatus = getHttpStatus(error);
ServerResponse.BodyBuilder responseBod... | java | protected Mono<ServerResponse> renderErrorView(ServerRequest request) {
boolean includeStackTrace = isIncludeStackTrace(request, MediaType.TEXT_HTML);
Map<String, Object> error = getErrorAttributes(request, includeStackTrace);
HttpStatus errorStatus = getHttpStatus(error);
ServerResponse.BodyBuilder responseBod... | [
"protected",
"Mono",
"<",
"ServerResponse",
">",
"renderErrorView",
"(",
"ServerRequest",
"request",
")",
"{",
"boolean",
"includeStackTrace",
"=",
"isIncludeStackTrace",
"(",
"request",
",",
"MediaType",
".",
"TEXT_HTML",
")",
";",
"Map",
"<",
"String",
",",
"O... | Render the error information as an HTML view.
@param request the current request
@return a {@code Publisher} of the HTTP response | [
"Render",
"the",
"error",
"information",
"as",
"an",
"HTML",
"view",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java#L113-L127 |
122,422 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java | DefaultErrorWebExceptionHandler.renderErrorResponse | protected Mono<ServerResponse> renderErrorResponse(ServerRequest request) {
boolean includeStackTrace = isIncludeStackTrace(request, MediaType.ALL);
Map<String, Object> error = getErrorAttributes(request, includeStackTrace);
return ServerResponse.status(getHttpStatus(error))
.contentType(MediaType.APPLICATION... | java | protected Mono<ServerResponse> renderErrorResponse(ServerRequest request) {
boolean includeStackTrace = isIncludeStackTrace(request, MediaType.ALL);
Map<String, Object> error = getErrorAttributes(request, includeStackTrace);
return ServerResponse.status(getHttpStatus(error))
.contentType(MediaType.APPLICATION... | [
"protected",
"Mono",
"<",
"ServerResponse",
">",
"renderErrorResponse",
"(",
"ServerRequest",
"request",
")",
"{",
"boolean",
"includeStackTrace",
"=",
"isIncludeStackTrace",
"(",
"request",
",",
"MediaType",
".",
"ALL",
")",
";",
"Map",
"<",
"String",
",",
"Obj... | Render the error information as a JSON payload.
@param request the current request
@return a {@code Publisher} of the HTTP response | [
"Render",
"the",
"error",
"information",
"as",
"a",
"JSON",
"payload",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java#L134-L140 |
122,423 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java | DefaultErrorWebExceptionHandler.getHttpStatus | protected HttpStatus getHttpStatus(Map<String, Object> errorAttributes) {
int statusCode = (int) errorAttributes.get("status");
return HttpStatus.valueOf(statusCode);
} | java | protected HttpStatus getHttpStatus(Map<String, Object> errorAttributes) {
int statusCode = (int) errorAttributes.get("status");
return HttpStatus.valueOf(statusCode);
} | [
"protected",
"HttpStatus",
"getHttpStatus",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"errorAttributes",
")",
"{",
"int",
"statusCode",
"=",
"(",
"int",
")",
"errorAttributes",
".",
"get",
"(",
"\"status\"",
")",
";",
"return",
"HttpStatus",
".",
"value... | Get the HTTP error status information from the error map.
@param errorAttributes the current error information
@return the error HTTP status | [
"Get",
"the",
"HTTP",
"error",
"status",
"information",
"from",
"the",
"error",
"map",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java#L165-L168 |
122,424 | spring-projects/spring-boot | spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerator.java | ProjectGenerator.shouldExtract | private boolean shouldExtract(ProjectGenerationRequest request,
ProjectGenerationResponse response) {
if (request.isExtract()) {
return true;
}
// explicit name hasn't been provided for an archive and there is no extension
if (isZipArchive(response) && request.getOutput() != null
&& !request.getOutput... | java | private boolean shouldExtract(ProjectGenerationRequest request,
ProjectGenerationResponse response) {
if (request.isExtract()) {
return true;
}
// explicit name hasn't been provided for an archive and there is no extension
if (isZipArchive(response) && request.getOutput() != null
&& !request.getOutput... | [
"private",
"boolean",
"shouldExtract",
"(",
"ProjectGenerationRequest",
"request",
",",
"ProjectGenerationResponse",
"response",
")",
"{",
"if",
"(",
"request",
".",
"isExtract",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"// explicit name hasn't been provided fo... | Detect if the project should be extracted.
@param request the generation request
@param response the generation response
@return if the project should be extracted | [
"Detect",
"if",
"the",
"project",
"should",
"be",
"extracted",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerator.java#L76-L87 |
122,425 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/domain/EntityScanner.java | EntityScanner.scan | @SafeVarargs
public final Set<Class<?>> scan(Class<? extends Annotation>... annotationTypes)
throws ClassNotFoundException {
List<String> packages = getPackages();
if (packages.isEmpty()) {
return Collections.emptySet();
}
ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandida... | java | @SafeVarargs
public final Set<Class<?>> scan(Class<? extends Annotation>... annotationTypes)
throws ClassNotFoundException {
List<String> packages = getPackages();
if (packages.isEmpty()) {
return Collections.emptySet();
}
ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandida... | [
"@",
"SafeVarargs",
"public",
"final",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"scan",
"(",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"...",
"annotationTypes",
")",
"throws",
"ClassNotFoundException",
"{",
"List",
"<",
"String",
">",
"packages",
"=... | Scan for entities with the specified annotations.
@param annotationTypes the annotation types used on the entities
@return a set of entity classes
@throws ClassNotFoundException if an entity class cannot be loaded | [
"Scan",
"for",
"entities",
"with",
"the",
"specified",
"annotations",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/domain/EntityScanner.java#L60-L85 |
122,426 | spring-projects/spring-boot | spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/RawConfigurationMetadata.java | RawConfigurationMetadata.resolveName | private void resolveName(ConfigurationMetadataItem item) {
item.setName(item.getId()); // fallback
ConfigurationMetadataSource source = getSource(item);
if (source != null) {
String groupId = source.getGroupId();
String dottedPrefix = groupId + ".";
String id = item.getId();
if (hasLength(groupId) && ... | java | private void resolveName(ConfigurationMetadataItem item) {
item.setName(item.getId()); // fallback
ConfigurationMetadataSource source = getSource(item);
if (source != null) {
String groupId = source.getGroupId();
String dottedPrefix = groupId + ".";
String id = item.getId();
if (hasLength(groupId) && ... | [
"private",
"void",
"resolveName",
"(",
"ConfigurationMetadataItem",
"item",
")",
"{",
"item",
".",
"setName",
"(",
"item",
".",
"getId",
"(",
")",
")",
";",
"// fallback",
"ConfigurationMetadataSource",
"source",
"=",
"getSource",
"(",
"item",
")",
";",
"if",
... | Resolve the name of an item against this instance.
@param item the item to resolve
@see ConfigurationMetadataProperty#setName(String) | [
"Resolve",
"the",
"name",
"of",
"an",
"item",
"against",
"this",
"instance",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/RawConfigurationMetadata.java#L77-L89 |
122,427 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/server/RestartServer.java | RestartServer.restart | protected void restart(Set<URL> urls, ClassLoaderFiles files) {
Restarter restarter = Restarter.getInstance();
restarter.addUrls(urls);
restarter.addClassLoaderFiles(files);
restarter.restart();
} | java | protected void restart(Set<URL> urls, ClassLoaderFiles files) {
Restarter restarter = Restarter.getInstance();
restarter.addUrls(urls);
restarter.addClassLoaderFiles(files);
restarter.restart();
} | [
"protected",
"void",
"restart",
"(",
"Set",
"<",
"URL",
">",
"urls",
",",
"ClassLoaderFiles",
"files",
")",
"{",
"Restarter",
"restarter",
"=",
"Restarter",
".",
"getInstance",
"(",
")",
";",
"restarter",
".",
"addUrls",
"(",
"urls",
")",
";",
"restarter",... | Called to restart the application.
@param urls the updated URLs
@param files the updated files | [
"Called",
"to",
"restart",
"the",
"application",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/server/RestartServer.java#L175-L180 |
122,428 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/XmlServletWebServerApplicationContext.java | XmlServletWebServerApplicationContext.load | public final void load(Class<?> relativeClass, String... resourceNames) {
Resource[] resources = new Resource[resourceNames.length];
for (int i = 0; i < resourceNames.length; i++) {
resources[i] = new ClassPathResource(resourceNames[i], relativeClass);
}
this.reader.loadBeanDefinitions(resources);
} | java | public final void load(Class<?> relativeClass, String... resourceNames) {
Resource[] resources = new Resource[resourceNames.length];
for (int i = 0; i < resourceNames.length; i++) {
resources[i] = new ClassPathResource(resourceNames[i], relativeClass);
}
this.reader.loadBeanDefinitions(resources);
} | [
"public",
"final",
"void",
"load",
"(",
"Class",
"<",
"?",
">",
"relativeClass",
",",
"String",
"...",
"resourceNames",
")",
"{",
"Resource",
"[",
"]",
"resources",
"=",
"new",
"Resource",
"[",
"resourceNames",
".",
"length",
"]",
";",
"for",
"(",
"int",... | Load bean definitions from the given XML resources.
@param relativeClass class whose package will be used as a prefix when loading each
specified resource name
@param resourceNames relatively-qualified names of resources to load | [
"Load",
"bean",
"definitions",
"from",
"the",
"given",
"XML",
"resources",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/XmlServletWebServerApplicationContext.java#L130-L136 |
122,429 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindResult.java | BindResult.ifBound | public void ifBound(Consumer<? super T> consumer) {
Assert.notNull(consumer, "Consumer must not be null");
if (this.value != null) {
consumer.accept(this.value);
}
} | java | public void ifBound(Consumer<? super T> consumer) {
Assert.notNull(consumer, "Consumer must not be null");
if (this.value != null) {
consumer.accept(this.value);
}
} | [
"public",
"void",
"ifBound",
"(",
"Consumer",
"<",
"?",
"super",
"T",
">",
"consumer",
")",
"{",
"Assert",
".",
"notNull",
"(",
"consumer",
",",
"\"Consumer must not be null\"",
")",
";",
"if",
"(",
"this",
".",
"value",
"!=",
"null",
")",
"{",
"consumer... | Invoke the specified consumer with the bound value, or do nothing if no value has
been bound.
@param consumer block to execute if a value has been bound | [
"Invoke",
"the",
"specified",
"consumer",
"with",
"the",
"bound",
"value",
"or",
"do",
"nothing",
"if",
"no",
"value",
"has",
"been",
"bound",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindResult.java#L74-L79 |
122,430 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindResult.java | BindResult.map | public <U> BindResult<U> map(Function<? super T, ? extends U> mapper) {
Assert.notNull(mapper, "Mapper must not be null");
return of((this.value != null) ? mapper.apply(this.value) : null);
} | java | public <U> BindResult<U> map(Function<? super T, ? extends U> mapper) {
Assert.notNull(mapper, "Mapper must not be null");
return of((this.value != null) ? mapper.apply(this.value) : null);
} | [
"public",
"<",
"U",
">",
"BindResult",
"<",
"U",
">",
"map",
"(",
"Function",
"<",
"?",
"super",
"T",
",",
"?",
"extends",
"U",
">",
"mapper",
")",
"{",
"Assert",
".",
"notNull",
"(",
"mapper",
",",
"\"Mapper must not be null\"",
")",
";",
"return",
... | Apply the provided mapping function to the bound value, or return an updated
unbound result if no value has been bound.
@param <U> the type of the result of the mapping function
@param mapper a mapping function to apply to the bound value. The mapper will not
be invoked if no value has been bound.
@return an {@code Bin... | [
"Apply",
"the",
"provided",
"mapping",
"function",
"to",
"the",
"bound",
"value",
"or",
"return",
"an",
"updated",
"unbound",
"result",
"if",
"no",
"value",
"has",
"been",
"bound",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindResult.java#L90-L93 |
122,431 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindResult.java | BindResult.orElseCreate | public T orElseCreate(Class<? extends T> type) {
Assert.notNull(type, "Type must not be null");
return (this.value != null) ? this.value : BeanUtils.instantiateClass(type);
} | java | public T orElseCreate(Class<? extends T> type) {
Assert.notNull(type, "Type must not be null");
return (this.value != null) ? this.value : BeanUtils.instantiateClass(type);
} | [
"public",
"T",
"orElseCreate",
"(",
"Class",
"<",
"?",
"extends",
"T",
">",
"type",
")",
"{",
"Assert",
".",
"notNull",
"(",
"type",
",",
"\"Type must not be null\"",
")",
";",
"return",
"(",
"this",
".",
"value",
"!=",
"null",
")",
"?",
"this",
".",
... | Return the object that was bound, or a new instance of the specified class if no
value has been bound.
@param type the type to create if no value was bound
@return the value, if bound, otherwise a new instance of {@code type} | [
"Return",
"the",
"object",
"that",
"was",
"bound",
"or",
"a",
"new",
"instance",
"of",
"the",
"specified",
"class",
"if",
"no",
"value",
"has",
"been",
"bound",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindResult.java#L122-L125 |
122,432 | spring-projects/spring-boot | spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/Launcher.java | Launcher.createClassLoader | protected ClassLoader createClassLoader(List<Archive> archives) throws Exception {
List<URL> urls = new ArrayList<>(archives.size());
for (Archive archive : archives) {
urls.add(archive.getUrl());
}
return createClassLoader(urls.toArray(new URL[0]));
} | java | protected ClassLoader createClassLoader(List<Archive> archives) throws Exception {
List<URL> urls = new ArrayList<>(archives.size());
for (Archive archive : archives) {
urls.add(archive.getUrl());
}
return createClassLoader(urls.toArray(new URL[0]));
} | [
"protected",
"ClassLoader",
"createClassLoader",
"(",
"List",
"<",
"Archive",
">",
"archives",
")",
"throws",
"Exception",
"{",
"List",
"<",
"URL",
">",
"urls",
"=",
"new",
"ArrayList",
"<>",
"(",
"archives",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
... | Create a classloader for the specified archives.
@param archives the archives
@return the classloader
@throws Exception if the classloader cannot be created | [
"Create",
"a",
"classloader",
"for",
"the",
"specified",
"archives",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/Launcher.java#L59-L65 |
122,433 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BeanPropertyName.java | BeanPropertyName.toDashedForm | public static String toDashedForm(String name, int start) {
StringBuilder result = new StringBuilder();
String replaced = name.replace('_', '-');
for (int i = start; i < replaced.length(); i++) {
char ch = replaced.charAt(i);
if (Character.isUpperCase(ch) && result.length() > 0
&& result.charAt(result.... | java | public static String toDashedForm(String name, int start) {
StringBuilder result = new StringBuilder();
String replaced = name.replace('_', '-');
for (int i = start; i < replaced.length(); i++) {
char ch = replaced.charAt(i);
if (Character.isUpperCase(ch) && result.length() > 0
&& result.charAt(result.... | [
"public",
"static",
"String",
"toDashedForm",
"(",
"String",
"name",
",",
"int",
"start",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"String",
"replaced",
"=",
"name",
".",
"replace",
"(",
"'",
"'",
",",
"'",
"'",
... | Return the specified Java Bean property name in dashed form.
@param name the source name
@param start the starting char
@return the dashed from | [
"Return",
"the",
"specified",
"Java",
"Bean",
"property",
"name",
"in",
"dashed",
"form",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BeanPropertyName.java#L45-L57 |
122,434 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/DeferredLog.java | DeferredLog.replayTo | public void replayTo(Log destination) {
synchronized (this.lines) {
for (Line line : this.lines) {
logTo(destination, line.getLevel(), line.getMessage(),
line.getThrowable());
}
this.lines.clear();
}
} | java | public void replayTo(Log destination) {
synchronized (this.lines) {
for (Line line : this.lines) {
logTo(destination, line.getLevel(), line.getMessage(),
line.getThrowable());
}
this.lines.clear();
}
} | [
"public",
"void",
"replayTo",
"(",
"Log",
"destination",
")",
"{",
"synchronized",
"(",
"this",
".",
"lines",
")",
"{",
"for",
"(",
"Line",
"line",
":",
"this",
".",
"lines",
")",
"{",
"logTo",
"(",
"destination",
",",
"line",
".",
"getLevel",
"(",
"... | Replay deferred logging to the specified destination.
@param destination the destination for the deferred log messages | [
"Replay",
"deferred",
"logging",
"to",
"the",
"specified",
"destination",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/DeferredLog.java#L184-L192 |
122,435 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/ColorConverter.java | ColorConverter.newInstance | public static ColorConverter newInstance(Configuration config, String[] options) {
if (options.length < 1) {
LOGGER.error("Incorrect number of options on style. "
+ "Expected at least 1, received {}", options.length);
return null;
}
if (options[0] == null) {
LOGGER.error("No pattern supplied on styl... | java | public static ColorConverter newInstance(Configuration config, String[] options) {
if (options.length < 1) {
LOGGER.error("Incorrect number of options on style. "
+ "Expected at least 1, received {}", options.length);
return null;
}
if (options[0] == null) {
LOGGER.error("No pattern supplied on styl... | [
"public",
"static",
"ColorConverter",
"newInstance",
"(",
"Configuration",
"config",
",",
"String",
"[",
"]",
"options",
")",
"{",
"if",
"(",
"options",
".",
"length",
"<",
"1",
")",
"{",
"LOGGER",
".",
"error",
"(",
"\"Incorrect number of options on style. \"",... | Creates a new instance of the class. Required by Log4J2.
@param config the configuration
@param options the options
@return a new instance, or {@code null} if the options are invalid | [
"Creates",
"a",
"new",
"instance",
"of",
"the",
"class",
".",
"Required",
"by",
"Log4J2",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/ColorConverter.java#L92-L106 |
122,436 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/livereload/Connection.java | Connection.run | public void run() throws Exception {
if (this.header.contains("Upgrade: websocket")
&& this.header.contains("Sec-WebSocket-Version: 13")) {
runWebSocket();
}
if (this.header.contains("GET /livereload.js")) {
this.outputStream.writeHttp(getClass().getResourceAsStream("livereload.js"),
"text/javascri... | java | public void run() throws Exception {
if (this.header.contains("Upgrade: websocket")
&& this.header.contains("Sec-WebSocket-Version: 13")) {
runWebSocket();
}
if (this.header.contains("GET /livereload.js")) {
this.outputStream.writeHttp(getClass().getResourceAsStream("livereload.js"),
"text/javascri... | [
"public",
"void",
"run",
"(",
")",
"throws",
"Exception",
"{",
"if",
"(",
"this",
".",
"header",
".",
"contains",
"(",
"\"Upgrade: websocket\"",
")",
"&&",
"this",
".",
"header",
".",
"contains",
"(",
"\"Sec-WebSocket-Version: 13\"",
")",
")",
"{",
"runWebSo... | Run the connection.
@throws Exception in case of errors | [
"Run",
"the",
"connection",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/livereload/Connection.java#L80-L89 |
122,437 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/AggregateBinder.java | AggregateBinder.bind | @SuppressWarnings("unchecked")
public final Object bind(ConfigurationPropertyName name, Bindable<?> target,
AggregateElementBinder elementBinder) {
Object result = bindAggregate(name, target, elementBinder);
Supplier<?> value = target.getValue();
if (result == null || value == null) {
return result;
}
... | java | @SuppressWarnings("unchecked")
public final Object bind(ConfigurationPropertyName name, Bindable<?> target,
AggregateElementBinder elementBinder) {
Object result = bindAggregate(name, target, elementBinder);
Supplier<?> value = target.getValue();
if (result == null || value == null) {
return result;
}
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"final",
"Object",
"bind",
"(",
"ConfigurationPropertyName",
"name",
",",
"Bindable",
"<",
"?",
">",
"target",
",",
"AggregateElementBinder",
"elementBinder",
")",
"{",
"Object",
"result",
"=",
"bindAgg... | Perform binding for the aggregate.
@param name the configuration property name to bind
@param target the target to bind
@param elementBinder an element binder
@return the bound aggregate or null | [
"Perform",
"binding",
"for",
"the",
"aggregate",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/AggregateBinder.java#L55-L64 |
122,438 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java | ConfigFileApplicationListener.addPropertySources | protected void addPropertySources(ConfigurableEnvironment environment,
ResourceLoader resourceLoader) {
RandomValuePropertySource.addToEnvironment(environment);
new Loader(environment, resourceLoader).load();
} | java | protected void addPropertySources(ConfigurableEnvironment environment,
ResourceLoader resourceLoader) {
RandomValuePropertySource.addToEnvironment(environment);
new Loader(environment, resourceLoader).load();
} | [
"protected",
"void",
"addPropertySources",
"(",
"ConfigurableEnvironment",
"environment",
",",
"ResourceLoader",
"resourceLoader",
")",
"{",
"RandomValuePropertySource",
".",
"addToEnvironment",
"(",
"environment",
")",
";",
"new",
"Loader",
"(",
"environment",
",",
"re... | Add config file property sources to the specified environment.
@param environment the environment to add source to
@param resourceLoader the resource loader
@see #addPostProcessors(ConfigurableApplicationContext) | [
"Add",
"config",
"file",
"property",
"sources",
"to",
"the",
"specified",
"environment",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java#L210-L214 |
122,439 | spring-projects/spring-boot | spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthStatusHttpMapper.java | HealthStatusHttpMapper.setStatusMapping | public void setStatusMapping(Map<String, Integer> statusMapping) {
Assert.notNull(statusMapping, "StatusMapping must not be null");
this.statusMapping = new HashMap<>(statusMapping);
} | java | public void setStatusMapping(Map<String, Integer> statusMapping) {
Assert.notNull(statusMapping, "StatusMapping must not be null");
this.statusMapping = new HashMap<>(statusMapping);
} | [
"public",
"void",
"setStatusMapping",
"(",
"Map",
"<",
"String",
",",
"Integer",
">",
"statusMapping",
")",
"{",
"Assert",
".",
"notNull",
"(",
"statusMapping",
",",
"\"StatusMapping must not be null\"",
")",
";",
"this",
".",
"statusMapping",
"=",
"new",
"HashM... | Set specific status mappings.
@param statusMapping a map of health status code to HTTP status code | [
"Set",
"specific",
"status",
"mappings",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthStatusHttpMapper.java#L53-L56 |
122,440 | spring-projects/spring-boot | spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthStatusHttpMapper.java | HealthStatusHttpMapper.addStatusMapping | public void addStatusMapping(Map<String, Integer> statusMapping) {
Assert.notNull(statusMapping, "StatusMapping must not be null");
this.statusMapping.putAll(statusMapping);
} | java | public void addStatusMapping(Map<String, Integer> statusMapping) {
Assert.notNull(statusMapping, "StatusMapping must not be null");
this.statusMapping.putAll(statusMapping);
} | [
"public",
"void",
"addStatusMapping",
"(",
"Map",
"<",
"String",
",",
"Integer",
">",
"statusMapping",
")",
"{",
"Assert",
".",
"notNull",
"(",
"statusMapping",
",",
"\"StatusMapping must not be null\"",
")",
";",
"this",
".",
"statusMapping",
".",
"putAll",
"("... | Add specific status mappings to the existing set.
@param statusMapping a map of health status code to HTTP status code | [
"Add",
"specific",
"status",
"mappings",
"to",
"the",
"existing",
"set",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/HealthStatusHttpMapper.java#L62-L65 |
122,441 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/ChangedFile.java | ChangedFile.getRelativeName | public String getRelativeName() {
File folder = this.sourceFolder.getAbsoluteFile();
File file = this.file.getAbsoluteFile();
String folderName = StringUtils.cleanPath(folder.getPath());
String fileName = StringUtils.cleanPath(file.getPath());
Assert.state(fileName.startsWith(folderName), () -> "The file " + ... | java | public String getRelativeName() {
File folder = this.sourceFolder.getAbsoluteFile();
File file = this.file.getAbsoluteFile();
String folderName = StringUtils.cleanPath(folder.getPath());
String fileName = StringUtils.cleanPath(file.getPath());
Assert.state(fileName.startsWith(folderName), () -> "The file " + ... | [
"public",
"String",
"getRelativeName",
"(",
")",
"{",
"File",
"folder",
"=",
"this",
".",
"sourceFolder",
".",
"getAbsoluteFile",
"(",
")",
";",
"File",
"file",
"=",
"this",
".",
"file",
".",
"getAbsoluteFile",
"(",
")",
";",
"String",
"folderName",
"=",
... | Return the name of the file relative to the source folder.
@return the relative name | [
"Return",
"the",
"name",
"of",
"the",
"file",
"relative",
"to",
"the",
"source",
"folder",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/ChangedFile.java#L74-L82 |
122,442 | spring-projects/spring-boot | spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/AnsiString.java | AnsiString.append | AnsiString append(String text, Code... codes) {
if (codes.length == 0 || !isAnsiSupported()) {
this.value.append(text);
return this;
}
Ansi ansi = Ansi.ansi();
for (Code code : codes) {
ansi = applyCode(ansi, code);
}
this.value.append(ansi.a(text).reset().toString());
return this;
} | java | AnsiString append(String text, Code... codes) {
if (codes.length == 0 || !isAnsiSupported()) {
this.value.append(text);
return this;
}
Ansi ansi = Ansi.ansi();
for (Code code : codes) {
ansi = applyCode(ansi, code);
}
this.value.append(ansi.a(text).reset().toString());
return this;
} | [
"AnsiString",
"append",
"(",
"String",
"text",
",",
"Code",
"...",
"codes",
")",
"{",
"if",
"(",
"codes",
".",
"length",
"==",
"0",
"||",
"!",
"isAnsiSupported",
"(",
")",
")",
"{",
"this",
".",
"value",
".",
"append",
"(",
"text",
")",
";",
"retur... | Append text with the given ANSI codes.
@param text the text to append
@param codes the ANSI codes
@return this string | [
"Append",
"text",
"with",
"the",
"given",
"ANSI",
"codes",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/AnsiString.java#L49-L60 |
122,443 | spring-projects/spring-boot | spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java | AbstractRunMojo.logDisabledFork | protected void logDisabledFork() {
if (getLog().isWarnEnabled()) {
if (hasAgent()) {
getLog().warn("Fork mode disabled, ignoring agent");
}
if (hasJvmArgs()) {
RunArguments runArguments = resolveJvmArguments();
getLog().warn("Fork mode disabled, ignoring JVM argument(s) [" + Arrays
.stream(... | java | protected void logDisabledFork() {
if (getLog().isWarnEnabled()) {
if (hasAgent()) {
getLog().warn("Fork mode disabled, ignoring agent");
}
if (hasJvmArgs()) {
RunArguments runArguments = resolveJvmArguments();
getLog().warn("Fork mode disabled, ignoring JVM argument(s) [" + Arrays
.stream(... | [
"protected",
"void",
"logDisabledFork",
"(",
")",
"{",
"if",
"(",
"getLog",
"(",
")",
".",
"isWarnEnabled",
"(",
")",
")",
"{",
"if",
"(",
"hasAgent",
"(",
")",
")",
"{",
"getLog",
"(",
")",
".",
"warn",
"(",
"\"Fork mode disabled, ignoring agent\"",
")"... | Log a warning indicating that fork mode has been explicitly disabled while some
conditions are present that require to enable it.
@see #enableForkByDefault() | [
"Log",
"a",
"warning",
"indicating",
"that",
"fork",
"mode",
"has",
"been",
"explicitly",
"disabled",
"while",
"some",
"conditions",
"are",
"present",
"that",
"require",
"to",
"enable",
"it",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java#L269-L285 |
122,444 | spring-projects/spring-boot | spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java | AbstractRunMojo.resolveJvmArguments | protected RunArguments resolveJvmArguments() {
StringBuilder stringBuilder = new StringBuilder();
if (this.systemPropertyVariables != null) {
stringBuilder.append(this.systemPropertyVariables.entrySet().stream()
.map((e) -> SystemPropertyFormatter.format(e.getKey(), e.getValue()))
.collect(Collectors.j... | java | protected RunArguments resolveJvmArguments() {
StringBuilder stringBuilder = new StringBuilder();
if (this.systemPropertyVariables != null) {
stringBuilder.append(this.systemPropertyVariables.entrySet().stream()
.map((e) -> SystemPropertyFormatter.format(e.getKey(), e.getValue()))
.collect(Collectors.j... | [
"protected",
"RunArguments",
"resolveJvmArguments",
"(",
")",
"{",
"StringBuilder",
"stringBuilder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"this",
".",
"systemPropertyVariables",
"!=",
"null",
")",
"{",
"stringBuilder",
".",
"append",
"(",
"this... | Resolve the JVM arguments to use.
@return a {@link RunArguments} defining the JVM arguments | [
"Resolve",
"the",
"JVM",
"arguments",
"to",
"use",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java#L354-L365 |
122,445 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ResourceCondition.java | ResourceCondition.getResourceOutcome | protected ConditionOutcome getResourceOutcome(ConditionContext context,
AnnotatedTypeMetadata metadata) {
List<String> found = new ArrayList<>();
for (String location : this.resourceLocations) {
Resource resource = context.getResourceLoader().getResource(location);
if (resource != null && resource.exists()... | java | protected ConditionOutcome getResourceOutcome(ConditionContext context,
AnnotatedTypeMetadata metadata) {
List<String> found = new ArrayList<>();
for (String location : this.resourceLocations) {
Resource resource = context.getResourceLoader().getResource(location);
if (resource != null && resource.exists()... | [
"protected",
"ConditionOutcome",
"getResourceOutcome",
"(",
"ConditionContext",
"context",
",",
"AnnotatedTypeMetadata",
"metadata",
")",
"{",
"List",
"<",
"String",
">",
"found",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"String",
"location",
":... | Check if one of the default resource locations actually exists.
@param context the condition context
@param metadata the annotation metadata
@return the condition outcome | [
"Check",
"if",
"one",
"of",
"the",
"default",
"resource",
"locations",
"actually",
"exists",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ResourceCondition.java#L77-L95 |
122,446 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java | AutoConfigurationPackages.get | public static List<String> get(BeanFactory beanFactory) {
try {
return beanFactory.getBean(BEAN, BasePackages.class).get();
}
catch (NoSuchBeanDefinitionException ex) {
throw new IllegalStateException(
"Unable to retrieve @EnableAutoConfiguration base packages");
}
} | java | public static List<String> get(BeanFactory beanFactory) {
try {
return beanFactory.getBean(BEAN, BasePackages.class).get();
}
catch (NoSuchBeanDefinitionException ex) {
throw new IllegalStateException(
"Unable to retrieve @EnableAutoConfiguration base packages");
}
} | [
"public",
"static",
"List",
"<",
"String",
">",
"get",
"(",
"BeanFactory",
"beanFactory",
")",
"{",
"try",
"{",
"return",
"beanFactory",
".",
"getBean",
"(",
"BEAN",
",",
"BasePackages",
".",
"class",
")",
".",
"get",
"(",
")",
";",
"}",
"catch",
"(",
... | Return the auto-configuration base packages for the given bean factory.
@param beanFactory the source bean factory
@return a list of auto-configuration packages
@throws IllegalStateException if auto-configuration is not enabled | [
"Return",
"the",
"auto",
"-",
"configuration",
"base",
"packages",
"for",
"the",
"given",
"bean",
"factory",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java#L71-L79 |
122,447 | spring-projects/spring-boot | spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java | LaunchedURLClassLoader.clearCache | public void clearCache() {
for (URL url : getURLs()) {
try {
URLConnection connection = url.openConnection();
if (connection instanceof JarURLConnection) {
clearCache(connection);
}
}
catch (IOException ex) {
// Ignore
}
}
} | java | public void clearCache() {
for (URL url : getURLs()) {
try {
URLConnection connection = url.openConnection();
if (connection instanceof JarURLConnection) {
clearCache(connection);
}
}
catch (IOException ex) {
// Ignore
}
}
} | [
"public",
"void",
"clearCache",
"(",
")",
"{",
"for",
"(",
"URL",
"url",
":",
"getURLs",
"(",
")",
")",
"{",
"try",
"{",
"URLConnection",
"connection",
"=",
"url",
".",
"openConnection",
"(",
")",
";",
"if",
"(",
"connection",
"instanceof",
"JarURLConnec... | Clear URL caches. | [
"Clear",
"URL",
"caches",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/LaunchedURLClassLoader.java#L163-L176 |
122,448 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/TunnelClient.java | TunnelClient.start | public int start() throws IOException {
synchronized (this.monitor) {
Assert.state(this.serverThread == null, "Server already started");
ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
serverSocketChannel.socket().bind(new InetSocketAddress(this.listenPort));
int port = serverSocketC... | java | public int start() throws IOException {
synchronized (this.monitor) {
Assert.state(this.serverThread == null, "Server already started");
ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
serverSocketChannel.socket().bind(new InetSocketAddress(this.listenPort));
int port = serverSocketC... | [
"public",
"int",
"start",
"(",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"this",
".",
"monitor",
")",
"{",
"Assert",
".",
"state",
"(",
"this",
".",
"serverThread",
"==",
"null",
",",
"\"Server already started\"",
")",
";",
"ServerSocketChannel",... | Start the client and accept incoming connections.
@return the port on which the client is listening
@throws IOException in case of I/O errors | [
"Start",
"the",
"client",
"and",
"accept",
"incoming",
"connections",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/TunnelClient.java#L85-L96 |
122,449 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/TunnelClient.java | TunnelClient.stop | public void stop() throws IOException {
synchronized (this.monitor) {
if (this.serverThread != null) {
this.serverThread.close();
try {
this.serverThread.join(2000);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
this.serverThread = null;
}
}
} | java | public void stop() throws IOException {
synchronized (this.monitor) {
if (this.serverThread != null) {
this.serverThread.close();
try {
this.serverThread.join(2000);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
this.serverThread = null;
}
}
} | [
"public",
"void",
"stop",
"(",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"this",
".",
"monitor",
")",
"{",
"if",
"(",
"this",
".",
"serverThread",
"!=",
"null",
")",
"{",
"this",
".",
"serverThread",
".",
"close",
"(",
")",
";",
"try",
... | Stop the client, disconnecting any servers.
@throws IOException in case of I/O errors | [
"Stop",
"the",
"client",
"disconnecting",
"any",
"servers",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/client/TunnelClient.java#L102-L115 |
122,450 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/AbstractConfigurableWebServerFactory.java | AbstractConfigurableWebServerFactory.createTempDir | protected final File createTempDir(String prefix) {
try {
File tempDir = File.createTempFile(prefix + ".", "." + getPort());
tempDir.delete();
tempDir.mkdir();
tempDir.deleteOnExit();
return tempDir;
}
catch (IOException ex) {
throw new WebServerException(
"Unable to create tempDir. java.io... | java | protected final File createTempDir(String prefix) {
try {
File tempDir = File.createTempFile(prefix + ".", "." + getPort());
tempDir.delete();
tempDir.mkdir();
tempDir.deleteOnExit();
return tempDir;
}
catch (IOException ex) {
throw new WebServerException(
"Unable to create tempDir. java.io... | [
"protected",
"final",
"File",
"createTempDir",
"(",
"String",
"prefix",
")",
"{",
"try",
"{",
"File",
"tempDir",
"=",
"File",
".",
"createTempFile",
"(",
"prefix",
"+",
"\".\"",
",",
"\".\"",
"+",
"getPort",
"(",
")",
")",
";",
"tempDir",
".",
"delete",
... | Return the absolute temp dir for given web server.
@param prefix server name
@return the temp dir for given server. | [
"Return",
"the",
"absolute",
"temp",
"dir",
"for",
"given",
"web",
"server",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/AbstractConfigurableWebServerFactory.java#L171-L185 |
122,451 | spring-projects/spring-boot | spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONStringer.java | JSONStringer.peek | private Scope peek() throws JSONException {
if (this.stack.isEmpty()) {
throw new JSONException("Nesting problem");
}
return this.stack.get(this.stack.size() - 1);
} | java | private Scope peek() throws JSONException {
if (this.stack.isEmpty()) {
throw new JSONException("Nesting problem");
}
return this.stack.get(this.stack.size() - 1);
} | [
"private",
"Scope",
"peek",
"(",
")",
"throws",
"JSONException",
"{",
"if",
"(",
"this",
".",
"stack",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"JSONException",
"(",
"\"Nesting problem\"",
")",
";",
"}",
"return",
"this",
".",
"stack",
".",
... | Returns the value on the top of the stack.
@return the scope
@throws JSONException if processing of json failed | [
"Returns",
"the",
"value",
"on",
"the",
"top",
"of",
"the",
"stack",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONStringer.java#L214-L219 |
122,452 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/couchbase/CouchbaseConfiguration.java | CouchbaseConfiguration.initializeEnvironmentBuilder | protected DefaultCouchbaseEnvironment.Builder initializeEnvironmentBuilder(
CouchbaseProperties properties) {
CouchbaseProperties.Endpoints endpoints = properties.getEnv().getEndpoints();
CouchbaseProperties.Timeouts timeouts = properties.getEnv().getTimeouts();
DefaultCouchbaseEnvironment.Builder builder = De... | java | protected DefaultCouchbaseEnvironment.Builder initializeEnvironmentBuilder(
CouchbaseProperties properties) {
CouchbaseProperties.Endpoints endpoints = properties.getEnv().getEndpoints();
CouchbaseProperties.Timeouts timeouts = properties.getEnv().getTimeouts();
DefaultCouchbaseEnvironment.Builder builder = De... | [
"protected",
"DefaultCouchbaseEnvironment",
".",
"Builder",
"initializeEnvironmentBuilder",
"(",
"CouchbaseProperties",
"properties",
")",
"{",
"CouchbaseProperties",
".",
"Endpoints",
"endpoints",
"=",
"properties",
".",
"getEnv",
"(",
")",
".",
"getEndpoints",
"(",
")... | Initialize an environment builder based on the specified settings.
@param properties the couchbase properties to use
@return the {@link DefaultCouchbaseEnvironment} builder. | [
"Initialize",
"an",
"environment",
"builder",
"based",
"on",
"the",
"specified",
"settings",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/couchbase/CouchbaseConfiguration.java#L91-L128 |
122,453 | spring-projects/spring-boot | spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/AbstractHealthAggregator.java | AbstractHealthAggregator.aggregateDetails | protected Map<String, Object> aggregateDetails(Map<String, Health> healths) {
return new LinkedHashMap<>(healths);
} | java | protected Map<String, Object> aggregateDetails(Map<String, Health> healths) {
return new LinkedHashMap<>(healths);
} | [
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"aggregateDetails",
"(",
"Map",
"<",
"String",
",",
"Health",
">",
"healths",
")",
"{",
"return",
"new",
"LinkedHashMap",
"<>",
"(",
"healths",
")",
";",
"}"
] | Return the map of 'aggregate' details that should be used from the specified
healths.
@param healths the health instances to aggregate
@return a map of details
@since 1.3.1 | [
"Return",
"the",
"map",
"of",
"aggregate",
"details",
"that",
"should",
"be",
"used",
"from",
"the",
"specified",
"healths",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/AbstractHealthAggregator.java#L58-L60 |
122,454 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletListenerRegistrationBean.java | ServletListenerRegistrationBean.setListener | public void setListener(T listener) {
Assert.notNull(listener, "Listener must not be null");
Assert.isTrue(isSupportedType(listener), "Listener is not of a supported type");
this.listener = listener;
} | java | public void setListener(T listener) {
Assert.notNull(listener, "Listener must not be null");
Assert.isTrue(isSupportedType(listener), "Listener is not of a supported type");
this.listener = listener;
} | [
"public",
"void",
"setListener",
"(",
"T",
"listener",
")",
"{",
"Assert",
".",
"notNull",
"(",
"listener",
",",
"\"Listener must not be null\"",
")",
";",
"Assert",
".",
"isTrue",
"(",
"isSupportedType",
"(",
"listener",
")",
",",
"\"Listener is not of a supporte... | Set the listener that will be registered.
@param listener the listener to register | [
"Set",
"the",
"listener",
"that",
"will",
"be",
"registered",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletListenerRegistrationBean.java#L94-L98 |
122,455 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java | RabbitProperties.determinePort | public int determinePort() {
if (CollectionUtils.isEmpty(this.parsedAddresses)) {
return getPort();
}
Address address = this.parsedAddresses.get(0);
return address.port;
} | java | public int determinePort() {
if (CollectionUtils.isEmpty(this.parsedAddresses)) {
return getPort();
}
Address address = this.parsedAddresses.get(0);
return address.port;
} | [
"public",
"int",
"determinePort",
"(",
")",
"{",
"if",
"(",
"CollectionUtils",
".",
"isEmpty",
"(",
"this",
".",
"parsedAddresses",
")",
")",
"{",
"return",
"getPort",
"(",
")",
";",
"}",
"Address",
"address",
"=",
"this",
".",
"parsedAddresses",
".",
"g... | Returns the port from the first address, or the configured port if no addresses
have been set.
@return the port
@see #setAddresses(String)
@see #getPort() | [
"Returns",
"the",
"port",
"from",
"the",
"first",
"address",
"or",
"the",
"configured",
"port",
"if",
"no",
"addresses",
"have",
"been",
"set",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java#L149-L155 |
122,456 | spring-projects/spring-boot | spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java | OrderedHealthAggregator.setStatusOrder | public void setStatusOrder(Status... statusOrder) {
String[] order = new String[statusOrder.length];
for (int i = 0; i < statusOrder.length; i++) {
order[i] = statusOrder[i].getCode();
}
setStatusOrder(Arrays.asList(order));
} | java | public void setStatusOrder(Status... statusOrder) {
String[] order = new String[statusOrder.length];
for (int i = 0; i < statusOrder.length; i++) {
order[i] = statusOrder[i].getCode();
}
setStatusOrder(Arrays.asList(order));
} | [
"public",
"void",
"setStatusOrder",
"(",
"Status",
"...",
"statusOrder",
")",
"{",
"String",
"[",
"]",
"order",
"=",
"new",
"String",
"[",
"statusOrder",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"statusOrder",
".",
"l... | Set the ordering of the status.
@param statusOrder an ordered list of the status | [
"Set",
"the",
"ordering",
"of",
"the",
"status",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/OrderedHealthAggregator.java#L51-L57 |
122,457 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.java | AbstractServletWebServerFactory.shouldRegisterJspServlet | protected boolean shouldRegisterJspServlet() {
return this.jsp != null && this.jsp.getRegistered() && ClassUtils
.isPresent(this.jsp.getClassName(), getClass().getClassLoader());
} | java | protected boolean shouldRegisterJspServlet() {
return this.jsp != null && this.jsp.getRegistered() && ClassUtils
.isPresent(this.jsp.getClassName(), getClass().getClassLoader());
} | [
"protected",
"boolean",
"shouldRegisterJspServlet",
"(",
")",
"{",
"return",
"this",
".",
"jsp",
"!=",
"null",
"&&",
"this",
".",
"jsp",
".",
"getRegistered",
"(",
")",
"&&",
"ClassUtils",
".",
"isPresent",
"(",
"this",
".",
"jsp",
".",
"getClassName",
"("... | Returns whether or not the JSP servlet should be registered with the web server.
@return {@code true} if the servlet should be registered, otherwise {@code false} | [
"Returns",
"whether",
"or",
"not",
"the",
"JSP",
"servlet",
"should",
"be",
"registered",
"with",
"the",
"web",
"server",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.java#L265-L268 |
122,458 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java | SpringApplication.logStartupProfileInfo | protected void logStartupProfileInfo(ConfigurableApplicationContext context) {
Log log = getApplicationLog();
if (log.isInfoEnabled()) {
String[] activeProfiles = context.getEnvironment().getActiveProfiles();
if (ObjectUtils.isEmpty(activeProfiles)) {
String[] defaultProfiles = context.getEnvironment().ge... | java | protected void logStartupProfileInfo(ConfigurableApplicationContext context) {
Log log = getApplicationLog();
if (log.isInfoEnabled()) {
String[] activeProfiles = context.getEnvironment().getActiveProfiles();
if (ObjectUtils.isEmpty(activeProfiles)) {
String[] defaultProfiles = context.getEnvironment().ge... | [
"protected",
"void",
"logStartupProfileInfo",
"(",
"ConfigurableApplicationContext",
"context",
")",
"{",
"Log",
"log",
"=",
"getApplicationLog",
"(",
")",
";",
"if",
"(",
"log",
".",
"isInfoEnabled",
"(",
")",
")",
"{",
"String",
"[",
"]",
"activeProfiles",
"... | Called to log active profile information.
@param context the application context | [
"Called",
"to",
"log",
"active",
"profile",
"information",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java#L676-L690 |
122,459 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java | SpringApplication.load | protected void load(ApplicationContext context, Object[] sources) {
if (logger.isDebugEnabled()) {
logger.debug(
"Loading source " + StringUtils.arrayToCommaDelimitedString(sources));
}
BeanDefinitionLoader loader = createBeanDefinitionLoader(
getBeanDefinitionRegistry(context), sources);
if (this.b... | java | protected void load(ApplicationContext context, Object[] sources) {
if (logger.isDebugEnabled()) {
logger.debug(
"Loading source " + StringUtils.arrayToCommaDelimitedString(sources));
}
BeanDefinitionLoader loader = createBeanDefinitionLoader(
getBeanDefinitionRegistry(context), sources);
if (this.b... | [
"protected",
"void",
"load",
"(",
"ApplicationContext",
"context",
",",
"Object",
"[",
"]",
"sources",
")",
"{",
"if",
"(",
"logger",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"logger",
".",
"debug",
"(",
"\"Loading source \"",
"+",
"StringUtils",
".",
"a... | Load beans into the application context.
@param context the context to load beans into
@param sources the sources to load | [
"Load",
"beans",
"into",
"the",
"application",
"context",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java#L708-L725 |
122,460 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java | SpringApplication.getBeanDefinitionRegistry | private BeanDefinitionRegistry getBeanDefinitionRegistry(ApplicationContext context) {
if (context instanceof BeanDefinitionRegistry) {
return (BeanDefinitionRegistry) context;
}
if (context instanceof AbstractApplicationContext) {
return (BeanDefinitionRegistry) ((AbstractApplicationContext) context)
... | java | private BeanDefinitionRegistry getBeanDefinitionRegistry(ApplicationContext context) {
if (context instanceof BeanDefinitionRegistry) {
return (BeanDefinitionRegistry) context;
}
if (context instanceof AbstractApplicationContext) {
return (BeanDefinitionRegistry) ((AbstractApplicationContext) context)
... | [
"private",
"BeanDefinitionRegistry",
"getBeanDefinitionRegistry",
"(",
"ApplicationContext",
"context",
")",
"{",
"if",
"(",
"context",
"instanceof",
"BeanDefinitionRegistry",
")",
"{",
"return",
"(",
"BeanDefinitionRegistry",
")",
"context",
";",
"}",
"if",
"(",
"con... | Get the bean definition registry.
@param context the application context
@return the BeanDefinitionRegistry if it can be determined | [
"Get",
"the",
"bean",
"definition",
"registry",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java#L754-L763 |
122,461 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java | SpringApplication.registerLoggedException | protected void registerLoggedException(Throwable exception) {
SpringBootExceptionHandler handler = getSpringBootExceptionHandler();
if (handler != null) {
handler.registerLoggedException(exception);
}
} | java | protected void registerLoggedException(Throwable exception) {
SpringBootExceptionHandler handler = getSpringBootExceptionHandler();
if (handler != null) {
handler.registerLoggedException(exception);
}
} | [
"protected",
"void",
"registerLoggedException",
"(",
"Throwable",
"exception",
")",
"{",
"SpringBootExceptionHandler",
"handler",
"=",
"getSpringBootExceptionHandler",
"(",
")",
";",
"if",
"(",
"handler",
"!=",
"null",
")",
"{",
"handler",
".",
"registerLoggedExceptio... | Register that the given exception has been logged. By default, if the running in
the main thread, this method will suppress additional printing of the stacktrace.
@param exception the exception that was logged | [
"Register",
"that",
"the",
"given",
"exception",
"has",
"been",
"logged",
".",
"By",
"default",
"if",
"the",
"running",
"in",
"the",
"main",
"thread",
"this",
"method",
"will",
"suppress",
"additional",
"printing",
"of",
"the",
"stacktrace",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java#L875-L880 |
122,462 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java | MimeMappings.add | public String add(String extension, String mimeType) {
Mapping previous = this.map.put(extension, new Mapping(extension, mimeType));
return (previous != null) ? previous.getMimeType() : null;
} | java | public String add(String extension, String mimeType) {
Mapping previous = this.map.put(extension, new Mapping(extension, mimeType));
return (previous != null) ? previous.getMimeType() : null;
} | [
"public",
"String",
"add",
"(",
"String",
"extension",
",",
"String",
"mimeType",
")",
"{",
"Mapping",
"previous",
"=",
"this",
".",
"map",
".",
"put",
"(",
"extension",
",",
"new",
"Mapping",
"(",
"extension",
",",
"mimeType",
")",
")",
";",
"return",
... | Add a new mime mapping.
@param extension the file extension (excluding '.')
@param mimeType the mime type to map
@return any previous mapping or {@code null} | [
"Add",
"a",
"new",
"mime",
"mapping",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java#L280-L283 |
122,463 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java | MimeMappings.get | public String get(String extension) {
Mapping mapping = this.map.get(extension);
return (mapping != null) ? mapping.getMimeType() : null;
} | java | public String get(String extension) {
Mapping mapping = this.map.get(extension);
return (mapping != null) ? mapping.getMimeType() : null;
} | [
"public",
"String",
"get",
"(",
"String",
"extension",
")",
"{",
"Mapping",
"mapping",
"=",
"this",
".",
"map",
".",
"get",
"(",
"extension",
")",
";",
"return",
"(",
"mapping",
"!=",
"null",
")",
"?",
"mapping",
".",
"getMimeType",
"(",
")",
":",
"n... | Get a mime mapping for the given extension.
@param extension the file extension (excluding '.')
@return a mime mapping or {@code null} | [
"Get",
"a",
"mime",
"mapping",
"for",
"the",
"given",
"extension",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java#L290-L293 |
122,464 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java | MimeMappings.remove | public String remove(String extension) {
Mapping previous = this.map.remove(extension);
return (previous != null) ? previous.getMimeType() : null;
} | java | public String remove(String extension) {
Mapping previous = this.map.remove(extension);
return (previous != null) ? previous.getMimeType() : null;
} | [
"public",
"String",
"remove",
"(",
"String",
"extension",
")",
"{",
"Mapping",
"previous",
"=",
"this",
".",
"map",
".",
"remove",
"(",
"extension",
")",
";",
"return",
"(",
"previous",
"!=",
"null",
")",
"?",
"previous",
".",
"getMimeType",
"(",
")",
... | Remove an existing mapping.
@param extension the file extension (excluding '.')
@return the removed mime mapping or {@code null} if no item was removed | [
"Remove",
"an",
"existing",
"mapping",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java#L300-L303 |
122,465 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java | BeanDefinitionLoader.setBeanNameGenerator | public void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) {
this.annotatedReader.setBeanNameGenerator(beanNameGenerator);
this.xmlReader.setBeanNameGenerator(beanNameGenerator);
this.scanner.setBeanNameGenerator(beanNameGenerator);
} | java | public void setBeanNameGenerator(BeanNameGenerator beanNameGenerator) {
this.annotatedReader.setBeanNameGenerator(beanNameGenerator);
this.xmlReader.setBeanNameGenerator(beanNameGenerator);
this.scanner.setBeanNameGenerator(beanNameGenerator);
} | [
"public",
"void",
"setBeanNameGenerator",
"(",
"BeanNameGenerator",
"beanNameGenerator",
")",
"{",
"this",
".",
"annotatedReader",
".",
"setBeanNameGenerator",
"(",
"beanNameGenerator",
")",
";",
"this",
".",
"xmlReader",
".",
"setBeanNameGenerator",
"(",
"beanNameGener... | Set the bean name generator to be used by the underlying readers and scanner.
@param beanNameGenerator the bean name generator | [
"Set",
"the",
"bean",
"name",
"generator",
"to",
"be",
"used",
"by",
"the",
"underlying",
"readers",
"and",
"scanner",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java#L95-L99 |
122,466 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java | BeanDefinitionLoader.setResourceLoader | public void setResourceLoader(ResourceLoader resourceLoader) {
this.resourceLoader = resourceLoader;
this.xmlReader.setResourceLoader(resourceLoader);
this.scanner.setResourceLoader(resourceLoader);
} | java | public void setResourceLoader(ResourceLoader resourceLoader) {
this.resourceLoader = resourceLoader;
this.xmlReader.setResourceLoader(resourceLoader);
this.scanner.setResourceLoader(resourceLoader);
} | [
"public",
"void",
"setResourceLoader",
"(",
"ResourceLoader",
"resourceLoader",
")",
"{",
"this",
".",
"resourceLoader",
"=",
"resourceLoader",
";",
"this",
".",
"xmlReader",
".",
"setResourceLoader",
"(",
"resourceLoader",
")",
";",
"this",
".",
"scanner",
".",
... | Set the resource loader to be used by the underlying readers and scanner.
@param resourceLoader the resource loader | [
"Set",
"the",
"resource",
"loader",
"to",
"be",
"used",
"by",
"the",
"underlying",
"readers",
"and",
"scanner",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java#L105-L109 |
122,467 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java | BeanDefinitionLoader.setEnvironment | public void setEnvironment(ConfigurableEnvironment environment) {
this.annotatedReader.setEnvironment(environment);
this.xmlReader.setEnvironment(environment);
this.scanner.setEnvironment(environment);
} | java | public void setEnvironment(ConfigurableEnvironment environment) {
this.annotatedReader.setEnvironment(environment);
this.xmlReader.setEnvironment(environment);
this.scanner.setEnvironment(environment);
} | [
"public",
"void",
"setEnvironment",
"(",
"ConfigurableEnvironment",
"environment",
")",
"{",
"this",
".",
"annotatedReader",
".",
"setEnvironment",
"(",
"environment",
")",
";",
"this",
".",
"xmlReader",
".",
"setEnvironment",
"(",
"environment",
")",
";",
"this",... | Set the environment to be used by the underlying readers and scanner.
@param environment the environment | [
"Set",
"the",
"environment",
"to",
"be",
"used",
"by",
"the",
"underlying",
"readers",
"and",
"scanner",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/BeanDefinitionLoader.java#L115-L119 |
122,468 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/MapConfigurationPropertySource.java | MapConfigurationPropertySource.putAll | public void putAll(Map<?, ?> map) {
Assert.notNull(map, "Map must not be null");
assertNotReadOnlySystemAttributesMap(map);
map.forEach(this::put);
} | java | public void putAll(Map<?, ?> map) {
Assert.notNull(map, "Map must not be null");
assertNotReadOnlySystemAttributesMap(map);
map.forEach(this::put);
} | [
"public",
"void",
"putAll",
"(",
"Map",
"<",
"?",
",",
"?",
">",
"map",
")",
"{",
"Assert",
".",
"notNull",
"(",
"map",
",",
"\"Map must not be null\"",
")",
";",
"assertNotReadOnlySystemAttributesMap",
"(",
"map",
")",
";",
"map",
".",
"forEach",
"(",
"... | Add all entries from the specified map.
@param map the source map | [
"Add",
"all",
"entries",
"from",
"the",
"specified",
"map",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/MapConfigurationPropertySource.java#L66-L70 |
122,469 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/MapConfigurationPropertySource.java | MapConfigurationPropertySource.put | public void put(Object name, Object value) {
this.source.put((name != null) ? name.toString() : null, value);
} | java | public void put(Object name, Object value) {
this.source.put((name != null) ? name.toString() : null, value);
} | [
"public",
"void",
"put",
"(",
"Object",
"name",
",",
"Object",
"value",
")",
"{",
"this",
".",
"source",
".",
"put",
"(",
"(",
"name",
"!=",
"null",
")",
"?",
"name",
".",
"toString",
"(",
")",
":",
"null",
",",
"value",
")",
";",
"}"
] | Add an individual entry.
@param name the name
@param value the value | [
"Add",
"an",
"individual",
"entry",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/MapConfigurationPropertySource.java#L77-L79 |
122,470 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/server/HttpTunnelServer.java | HttpTunnelServer.getServerThread | protected ServerThread getServerThread() throws IOException {
synchronized (this) {
if (this.serverThread == null) {
ByteChannel channel = this.serverConnection.open(this.longPollTimeout);
this.serverThread = new ServerThread(channel);
this.serverThread.start();
}
return this.serverThread;
}
} | java | protected ServerThread getServerThread() throws IOException {
synchronized (this) {
if (this.serverThread == null) {
ByteChannel channel = this.serverConnection.open(this.longPollTimeout);
this.serverThread = new ServerThread(channel);
this.serverThread.start();
}
return this.serverThread;
}
} | [
"protected",
"ServerThread",
"getServerThread",
"(",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"serverThread",
"==",
"null",
")",
"{",
"ByteChannel",
"channel",
"=",
"this",
".",
"serverConnection",
".",
... | Returns the active server thread, creating and starting it if necessary.
@return the {@code ServerThread} (never {@code null})
@throws IOException in case of I/O errors | [
"Returns",
"the",
"active",
"server",
"thread",
"creating",
"and",
"starting",
"it",
"if",
"necessary",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/server/HttpTunnelServer.java#L168-L177 |
122,471 | spring-projects/spring-boot | spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java | ReactiveCloudFoundrySecurityService.getAccessLevel | public Mono<AccessLevel> getAccessLevel(String token, String applicationId)
throws CloudFoundryAuthorizationException {
String uri = getPermissionsUri(applicationId);
return this.webClient.get().uri(uri).header("Authorization", "bearer " + token)
.retrieve().bodyToMono(Map.class).map(this::getAccessLevel)
... | java | public Mono<AccessLevel> getAccessLevel(String token, String applicationId)
throws CloudFoundryAuthorizationException {
String uri = getPermissionsUri(applicationId);
return this.webClient.get().uri(uri).header("Authorization", "bearer " + token)
.retrieve().bodyToMono(Map.class).map(this::getAccessLevel)
... | [
"public",
"Mono",
"<",
"AccessLevel",
">",
"getAccessLevel",
"(",
"String",
"token",
",",
"String",
"applicationId",
")",
"throws",
"CloudFoundryAuthorizationException",
"{",
"String",
"uri",
"=",
"getPermissionsUri",
"(",
"applicationId",
")",
";",
"return",
"this"... | Return a Mono of the access level that should be granted to the given token.
@param token the token
@param applicationId the cloud foundry application ID
@return a Mono of the access level that should be granted
@throws CloudFoundryAuthorizationException if the token is not authorized | [
"Return",
"a",
"Mono",
"of",
"the",
"access",
"level",
"that",
"should",
"be",
"granted",
"to",
"the",
"given",
"token",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java#L86-L92 |
122,472 | spring-projects/spring-boot | spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java | ReactiveCloudFoundrySecurityService.getUaaUrl | public Mono<String> getUaaUrl() {
this.uaaUrl = this.webClient.get().uri(this.cloudControllerUrl + "/info")
.retrieve().bodyToMono(Map.class)
.map((response) -> (String) response.get("token_endpoint")).cache()
.onErrorMap((ex) -> new CloudFoundryAuthorizationException(
Reason.SERVICE_UNAVAILABLE,
... | java | public Mono<String> getUaaUrl() {
this.uaaUrl = this.webClient.get().uri(this.cloudControllerUrl + "/info")
.retrieve().bodyToMono(Map.class)
.map((response) -> (String) response.get("token_endpoint")).cache()
.onErrorMap((ex) -> new CloudFoundryAuthorizationException(
Reason.SERVICE_UNAVAILABLE,
... | [
"public",
"Mono",
"<",
"String",
">",
"getUaaUrl",
"(",
")",
"{",
"this",
".",
"uaaUrl",
"=",
"this",
".",
"webClient",
".",
"get",
"(",
")",
".",
"uri",
"(",
"this",
".",
"cloudControllerUrl",
"+",
"\"/info\"",
")",
".",
"retrieve",
"(",
")",
".",
... | Return a Mono of URL of the UAA.
@return the UAA url Mono | [
"Return",
"a",
"Mono",
"of",
"URL",
"of",
"the",
"UAA",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundrySecurityService.java#L150-L158 |
122,473 | spring-projects/spring-boot | spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java | AbstractDependencyFilterMojo.getFilters | protected final FilterArtifacts getFilters(ArtifactsFilter... additionalFilters) {
FilterArtifacts filters = new FilterArtifacts();
for (ArtifactsFilter additionalFilter : additionalFilters) {
filters.addFilter(additionalFilter);
}
filters.addFilter(
new MatchingGroupIdFilter(cleanFilterConfig(this.exclu... | java | protected final FilterArtifacts getFilters(ArtifactsFilter... additionalFilters) {
FilterArtifacts filters = new FilterArtifacts();
for (ArtifactsFilter additionalFilter : additionalFilters) {
filters.addFilter(additionalFilter);
}
filters.addFilter(
new MatchingGroupIdFilter(cleanFilterConfig(this.exclu... | [
"protected",
"final",
"FilterArtifacts",
"getFilters",
"(",
"ArtifactsFilter",
"...",
"additionalFilters",
")",
"{",
"FilterArtifacts",
"filters",
"=",
"new",
"FilterArtifacts",
"(",
")",
";",
"for",
"(",
"ArtifactsFilter",
"additionalFilter",
":",
"additionalFilters",
... | Return artifact filters configured for this MOJO.
@param additionalFilters optional additional filters to apply
@return the filters | [
"Return",
"artifact",
"filters",
"configured",
"for",
"this",
"MOJO",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java#L95-L109 |
122,474 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/classloader/ClassLoaderFiles.java | ClassLoaderFiles.size | public int size() {
int size = 0;
for (SourceFolder sourceFolder : this.sourceFolders.values()) {
size += sourceFolder.getFiles().size();
}
return size;
} | java | public int size() {
int size = 0;
for (SourceFolder sourceFolder : this.sourceFolders.values()) {
size += sourceFolder.getFiles().size();
}
return size;
} | [
"public",
"int",
"size",
"(",
")",
"{",
"int",
"size",
"=",
"0",
";",
"for",
"(",
"SourceFolder",
"sourceFolder",
":",
"this",
".",
"sourceFolders",
".",
"values",
"(",
")",
")",
"{",
"size",
"+=",
"sourceFolder",
".",
"getFiles",
"(",
")",
".",
"siz... | Return the size of the collection.
@return the size of the collection | [
"Return",
"the",
"size",
"of",
"the",
"collection",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/classloader/ClassLoaderFiles.java#L132-L138 |
122,475 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ExitCodeGenerators.java | ExitCodeGenerators.getExitCode | public int getExitCode() {
int exitCode = 0;
for (ExitCodeGenerator generator : this.generators) {
try {
int value = generator.getExitCode();
if (value > 0 && value > exitCode || value < 0 && value < exitCode) {
exitCode = value;
}
}
catch (Exception ex) {
exitCode = (exitCode != 0) ? ... | java | public int getExitCode() {
int exitCode = 0;
for (ExitCodeGenerator generator : this.generators) {
try {
int value = generator.getExitCode();
if (value > 0 && value > exitCode || value < 0 && value < exitCode) {
exitCode = value;
}
}
catch (Exception ex) {
exitCode = (exitCode != 0) ? ... | [
"public",
"int",
"getExitCode",
"(",
")",
"{",
"int",
"exitCode",
"=",
"0",
";",
"for",
"(",
"ExitCodeGenerator",
"generator",
":",
"this",
".",
"generators",
")",
"{",
"try",
"{",
"int",
"value",
"=",
"generator",
".",
"getExitCode",
"(",
")",
";",
"i... | Get the final exit code that should be returned based on all contained generators.
@return the final exit code. | [
"Get",
"the",
"final",
"exit",
"code",
"that",
"should",
"be",
"returned",
"based",
"on",
"all",
"contained",
"generators",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ExitCodeGenerators.java#L86-L101 |
122,476 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/server/HttpRestartServer.java | HttpRestartServer.handle | public void handle(ServerHttpRequest request, ServerHttpResponse response)
throws IOException {
try {
Assert.state(request.getHeaders().getContentLength() > 0, "No content");
ObjectInputStream objectInputStream = new ObjectInputStream(
request.getBody());
ClassLoaderFiles files = (ClassLoaderFiles) o... | java | public void handle(ServerHttpRequest request, ServerHttpResponse response)
throws IOException {
try {
Assert.state(request.getHeaders().getContentLength() > 0, "No content");
ObjectInputStream objectInputStream = new ObjectInputStream(
request.getBody());
ClassLoaderFiles files = (ClassLoaderFiles) o... | [
"public",
"void",
"handle",
"(",
"ServerHttpRequest",
"request",
",",
"ServerHttpResponse",
"response",
")",
"throws",
"IOException",
"{",
"try",
"{",
"Assert",
".",
"state",
"(",
"request",
".",
"getHeaders",
"(",
")",
".",
"getContentLength",
"(",
")",
">",
... | Handle a server request.
@param request the request
@param response the response
@throws IOException in case of I/O errors | [
"Handle",
"a",
"server",
"request",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/server/HttpRestartServer.java#L70-L85 |
122,477 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/context/WebServerPortFileWriter.java | WebServerPortFileWriter.getPortFile | protected File getPortFile(ApplicationContext applicationContext) {
String namespace = getServerNamespace(applicationContext);
if (StringUtils.isEmpty(namespace)) {
return this.file;
}
String name = this.file.getName();
String extension = StringUtils.getFilenameExtension(this.file.getName());
name = name... | java | protected File getPortFile(ApplicationContext applicationContext) {
String namespace = getServerNamespace(applicationContext);
if (StringUtils.isEmpty(namespace)) {
return this.file;
}
String name = this.file.getName();
String extension = StringUtils.getFilenameExtension(this.file.getName());
name = name... | [
"protected",
"File",
"getPortFile",
"(",
"ApplicationContext",
"applicationContext",
")",
"{",
"String",
"namespace",
"=",
"getServerNamespace",
"(",
"applicationContext",
")",
";",
"if",
"(",
"StringUtils",
".",
"isEmpty",
"(",
"namespace",
")",
")",
"{",
"return... | Return the actual port file that should be written for the given application
context. The default implementation builds a file from the source file and the
application context namespace if available.
@param applicationContext the source application context
@return the file that should be written | [
"Return",
"the",
"actual",
"port",
"file",
"that",
"should",
"be",
"written",
"for",
"the",
"given",
"application",
"context",
".",
"The",
"default",
"implementation",
"builds",
"a",
"file",
"from",
"the",
"source",
"file",
"and",
"the",
"application",
"contex... | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/context/WebServerPortFileWriter.java#L106-L124 |
122,478 | spring-projects/spring-boot | spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoker/cache/CachingOperationInvoker.java | CachingOperationInvoker.apply | public static OperationInvoker apply(OperationInvoker invoker, long timeToLive) {
if (timeToLive > 0) {
return new CachingOperationInvoker(invoker, timeToLive);
}
return invoker;
} | java | public static OperationInvoker apply(OperationInvoker invoker, long timeToLive) {
if (timeToLive > 0) {
return new CachingOperationInvoker(invoker, timeToLive);
}
return invoker;
} | [
"public",
"static",
"OperationInvoker",
"apply",
"(",
"OperationInvoker",
"invoker",
",",
"long",
"timeToLive",
")",
"{",
"if",
"(",
"timeToLive",
">",
"0",
")",
"{",
"return",
"new",
"CachingOperationInvoker",
"(",
"invoker",
",",
"timeToLive",
")",
";",
"}",... | Apply caching configuration when appropriate to the given invoker.
@param invoker the invoker to wrap
@param timeToLive the maximum time in milliseconds that a response can be cached
@return a caching version of the invoker or the original instance if caching is not
required | [
"Apply",
"caching",
"configuration",
"when",
"appropriate",
"to",
"the",
"given",
"invoker",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoker/cache/CachingOperationInvoker.java#L95-L100 |
122,479 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/payload/HttpTunnelPayload.java | HttpTunnelPayload.writeTo | public void writeTo(WritableByteChannel channel) throws IOException {
Assert.notNull(channel, "Channel must not be null");
while (this.data.hasRemaining()) {
channel.write(this.data);
}
} | java | public void writeTo(WritableByteChannel channel) throws IOException {
Assert.notNull(channel, "Channel must not be null");
while (this.data.hasRemaining()) {
channel.write(this.data);
}
} | [
"public",
"void",
"writeTo",
"(",
"WritableByteChannel",
"channel",
")",
"throws",
"IOException",
"{",
"Assert",
".",
"notNull",
"(",
"channel",
",",
"\"Channel must not be null\"",
")",
";",
"while",
"(",
"this",
".",
"data",
".",
"hasRemaining",
"(",
")",
")... | Write the content of this payload to the given target channel.
@param channel the channel to write to
@throws IOException in case of I/O errors | [
"Write",
"the",
"content",
"of",
"this",
"payload",
"to",
"the",
"given",
"target",
"channel",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/payload/HttpTunnelPayload.java#L99-L104 |
122,480 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/payload/HttpTunnelPayload.java | HttpTunnelPayload.toHexString | public String toHexString() {
byte[] bytes = this.data.array();
char[] hex = new char[this.data.remaining() * 2];
for (int i = this.data.position(); i < this.data.remaining(); i++) {
int b = bytes[i] & 0xFF;
hex[i * 2] = HEX_CHARS[b >>> 4];
hex[i * 2 + 1] = HEX_CHARS[b & 0x0F];
}
return new String(he... | java | public String toHexString() {
byte[] bytes = this.data.array();
char[] hex = new char[this.data.remaining() * 2];
for (int i = this.data.position(); i < this.data.remaining(); i++) {
int b = bytes[i] & 0xFF;
hex[i * 2] = HEX_CHARS[b >>> 4];
hex[i * 2 + 1] = HEX_CHARS[b & 0x0F];
}
return new String(he... | [
"public",
"String",
"toHexString",
"(",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"this",
".",
"data",
".",
"array",
"(",
")",
";",
"char",
"[",
"]",
"hex",
"=",
"new",
"char",
"[",
"this",
".",
"data",
".",
"remaining",
"(",
")",
"*",
"2",
"]"... | Return the payload as a hexadecimal string.
@return the payload as a hex string | [
"Return",
"the",
"payload",
"as",
"a",
"hexadecimal",
"string",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/tunnel/payload/HttpTunnelPayload.java#L175-L184 |
122,481 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/DefaultRestartInitializer.java | DefaultRestartInitializer.isMain | protected boolean isMain(Thread thread) {
return thread.getName().equals("main") && thread.getContextClassLoader()
.getClass().getName().contains("AppClassLoader");
} | java | protected boolean isMain(Thread thread) {
return thread.getName().equals("main") && thread.getContextClassLoader()
.getClass().getName().contains("AppClassLoader");
} | [
"protected",
"boolean",
"isMain",
"(",
"Thread",
"thread",
")",
"{",
"return",
"thread",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"\"main\"",
")",
"&&",
"thread",
".",
"getContextClassLoader",
"(",
")",
".",
"getClass",
"(",
")",
".",
"getName",
"("... | Returns if the thread is for a main invocation. By default checks the name of the
thread and the context classloader.
@param thread the thread to check
@return {@code true} if the thread is a main invocation | [
"Returns",
"if",
"the",
"thread",
"is",
"for",
"a",
"main",
"invocation",
".",
"By",
"default",
"checks",
"the",
"name",
"of",
"the",
"thread",
"and",
"the",
"context",
"classloader",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/DefaultRestartInitializer.java#L51-L54 |
122,482 | spring-projects/spring-boot | spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityService.java | CloudFoundrySecurityService.getAccessLevel | public AccessLevel getAccessLevel(String token, String applicationId)
throws CloudFoundryAuthorizationException {
try {
URI uri = getPermissionsUri(applicationId);
RequestEntity<?> request = RequestEntity.get(uri)
.header("Authorization", "bearer " + token).build();
Map<?, ?> body = this.restTemplate... | java | public AccessLevel getAccessLevel(String token, String applicationId)
throws CloudFoundryAuthorizationException {
try {
URI uri = getPermissionsUri(applicationId);
RequestEntity<?> request = RequestEntity.get(uri)
.header("Authorization", "bearer " + token).build();
Map<?, ?> body = this.restTemplate... | [
"public",
"AccessLevel",
"getAccessLevel",
"(",
"String",
"token",
",",
"String",
"applicationId",
")",
"throws",
"CloudFoundryAuthorizationException",
"{",
"try",
"{",
"URI",
"uri",
"=",
"getPermissionsUri",
"(",
"applicationId",
")",
";",
"RequestEntity",
"<",
"?"... | Return the access level that should be granted to the given token.
@param token the token
@param applicationId the cloud foundry application ID
@return the access level that should be granted
@throws CloudFoundryAuthorizationException if the token is not authorized | [
"Return",
"the",
"access",
"level",
"that",
"should",
"be",
"granted",
"to",
"the",
"given",
"token",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityService.java#L69-L93 |
122,483 | spring-projects/spring-boot | spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityService.java | CloudFoundrySecurityService.fetchTokenKeys | public Map<String, String> fetchTokenKeys() {
try {
return extractTokenKeys(this.restTemplate
.getForObject(getUaaUrl() + "/token_keys", Map.class));
}
catch (HttpStatusCodeException ex) {
throw new CloudFoundryAuthorizationException(Reason.SERVICE_UNAVAILABLE,
"UAA not reachable");
}
} | java | public Map<String, String> fetchTokenKeys() {
try {
return extractTokenKeys(this.restTemplate
.getForObject(getUaaUrl() + "/token_keys", Map.class));
}
catch (HttpStatusCodeException ex) {
throw new CloudFoundryAuthorizationException(Reason.SERVICE_UNAVAILABLE,
"UAA not reachable");
}
} | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"fetchTokenKeys",
"(",
")",
"{",
"try",
"{",
"return",
"extractTokenKeys",
"(",
"this",
".",
"restTemplate",
".",
"getForObject",
"(",
"getUaaUrl",
"(",
")",
"+",
"\"/token_keys\"",
",",
"Map",
".",
"clas... | Return all token keys known by the UAA.
@return a list of token keys | [
"Return",
"all",
"token",
"keys",
"known",
"by",
"the",
"UAA",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityService.java#L109-L118 |
122,484 | spring-projects/spring-boot | spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityService.java | CloudFoundrySecurityService.getUaaUrl | public String getUaaUrl() {
if (this.uaaUrl == null) {
try {
Map<?, ?> response = this.restTemplate
.getForObject(this.cloudControllerUrl + "/info", Map.class);
this.uaaUrl = (String) response.get("token_endpoint");
}
catch (HttpStatusCodeException ex) {
throw new CloudFoundryAuthorizationE... | java | public String getUaaUrl() {
if (this.uaaUrl == null) {
try {
Map<?, ?> response = this.restTemplate
.getForObject(this.cloudControllerUrl + "/info", Map.class);
this.uaaUrl = (String) response.get("token_endpoint");
}
catch (HttpStatusCodeException ex) {
throw new CloudFoundryAuthorizationE... | [
"public",
"String",
"getUaaUrl",
"(",
")",
"{",
"if",
"(",
"this",
".",
"uaaUrl",
"==",
"null",
")",
"{",
"try",
"{",
"Map",
"<",
"?",
",",
"?",
">",
"response",
"=",
"this",
".",
"restTemplate",
".",
"getForObject",
"(",
"this",
".",
"cloudControlle... | Return the URL of the UAA.
@return the UAA url | [
"Return",
"the",
"URL",
"of",
"the",
"UAA",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundrySecurityService.java#L133-L146 |
122,485 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletRegistrationBean.java | ServletRegistrationBean.addUrlMappings | public void addUrlMappings(String... urlMappings) {
Assert.notNull(urlMappings, "UrlMappings must not be null");
this.urlMappings.addAll(Arrays.asList(urlMappings));
} | java | public void addUrlMappings(String... urlMappings) {
Assert.notNull(urlMappings, "UrlMappings must not be null");
this.urlMappings.addAll(Arrays.asList(urlMappings));
} | [
"public",
"void",
"addUrlMappings",
"(",
"String",
"...",
"urlMappings",
")",
"{",
"Assert",
".",
"notNull",
"(",
"urlMappings",
",",
"\"UrlMappings must not be null\"",
")",
";",
"this",
".",
"urlMappings",
".",
"addAll",
"(",
"Arrays",
".",
"asList",
"(",
"u... | Add URL mappings, as defined in the Servlet specification, for the servlet.
@param urlMappings the mappings to add
@see #setUrlMappings(Collection) | [
"Add",
"URL",
"mappings",
"as",
"defined",
"in",
"the",
"Servlet",
"specification",
"for",
"the",
"servlet",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletRegistrationBean.java#L140-L143 |
122,486 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java | JettyServletWebServerFactory.getErrorPageConfiguration | private Configuration getErrorPageConfiguration() {
return new AbstractConfiguration() {
@Override
public void configure(WebAppContext context) throws Exception {
ErrorHandler errorHandler = context.getErrorHandler();
context.setErrorHandler(new JettyEmbeddedErrorHandler(errorHandler));
addJettyErr... | java | private Configuration getErrorPageConfiguration() {
return new AbstractConfiguration() {
@Override
public void configure(WebAppContext context) throws Exception {
ErrorHandler errorHandler = context.getErrorHandler();
context.setErrorHandler(new JettyEmbeddedErrorHandler(errorHandler));
addJettyErr... | [
"private",
"Configuration",
"getErrorPageConfiguration",
"(",
")",
"{",
"return",
"new",
"AbstractConfiguration",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"configure",
"(",
"WebAppContext",
"context",
")",
"throws",
"Exception",
"{",
"ErrorHandler",
"errorH... | Create a configuration object that adds error handlers.
@return a configuration object for adding error pages | [
"Create",
"a",
"configuration",
"object",
"that",
"adds",
"error",
"handlers",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java#L348-L359 |
122,487 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java | JettyServletWebServerFactory.getMimeTypeConfiguration | private Configuration getMimeTypeConfiguration() {
return new AbstractConfiguration() {
@Override
public void configure(WebAppContext context) throws Exception {
MimeTypes mimeTypes = context.getMimeTypes();
for (MimeMappings.Mapping mapping : getMimeMappings()) {
mimeTypes.addMimeMapping(mapping.... | java | private Configuration getMimeTypeConfiguration() {
return new AbstractConfiguration() {
@Override
public void configure(WebAppContext context) throws Exception {
MimeTypes mimeTypes = context.getMimeTypes();
for (MimeMappings.Mapping mapping : getMimeMappings()) {
mimeTypes.addMimeMapping(mapping.... | [
"private",
"Configuration",
"getMimeTypeConfiguration",
"(",
")",
"{",
"return",
"new",
"AbstractConfiguration",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"configure",
"(",
"WebAppContext",
"context",
")",
"throws",
"Exception",
"{",
"MimeTypes",
"mimeTypes"... | Create a configuration object that adds mime type mappings.
@return a configuration object for adding mime type mappings | [
"Create",
"a",
"configuration",
"object",
"that",
"adds",
"mime",
"type",
"mappings",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java#L365-L378 |
122,488 | spring-projects/spring-boot | spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONTokener.java | JSONTokener.nextValue | public Object nextValue() throws JSONException {
int c = nextCleanInternal();
switch (c) {
case -1:
throw syntaxError("End of input");
case '{':
return readObject();
case '[':
return readArray();
case '\'':
case '"':
return nextString((char) c);
default:
this.pos--;
return readLite... | java | public Object nextValue() throws JSONException {
int c = nextCleanInternal();
switch (c) {
case -1:
throw syntaxError("End of input");
case '{':
return readObject();
case '[':
return readArray();
case '\'':
case '"':
return nextString((char) c);
default:
this.pos--;
return readLite... | [
"public",
"Object",
"nextValue",
"(",
")",
"throws",
"JSONException",
"{",
"int",
"c",
"=",
"nextCleanInternal",
"(",
")",
";",
"switch",
"(",
"c",
")",
"{",
"case",
"-",
"1",
":",
"throw",
"syntaxError",
"(",
"\"End of input\"",
")",
";",
"case",
"'",
... | Returns the next value from the input.
@return a {@link JSONObject}, {@link JSONArray}, String, Boolean, Integer, Long,
Double or {@link JSONObject#NULL}.
@throws JSONException if the input is malformed. | [
"Returns",
"the",
"next",
"value",
"from",
"the",
"input",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONTokener.java#L91-L111 |
122,489 | spring-projects/spring-boot | spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/RepositoryConfigurationFactory.java | RepositoryConfigurationFactory.createDefaultRepositoryConfiguration | public static List<RepositoryConfiguration> createDefaultRepositoryConfiguration() {
MavenSettings mavenSettings = new MavenSettingsReader().readSettings();
List<RepositoryConfiguration> repositoryConfiguration = new ArrayList<>();
repositoryConfiguration.add(MAVEN_CENTRAL);
if (!Boolean.getBoolean("disableSpri... | java | public static List<RepositoryConfiguration> createDefaultRepositoryConfiguration() {
MavenSettings mavenSettings = new MavenSettingsReader().readSettings();
List<RepositoryConfiguration> repositoryConfiguration = new ArrayList<>();
repositoryConfiguration.add(MAVEN_CENTRAL);
if (!Boolean.getBoolean("disableSpri... | [
"public",
"static",
"List",
"<",
"RepositoryConfiguration",
">",
"createDefaultRepositoryConfiguration",
"(",
")",
"{",
"MavenSettings",
"mavenSettings",
"=",
"new",
"MavenSettingsReader",
"(",
")",
".",
"readSettings",
"(",
")",
";",
"List",
"<",
"RepositoryConfigura... | Create a new default repository configuration.
@return the newly-created default repository configuration | [
"Create",
"a",
"new",
"default",
"repository",
"configuration",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/RepositoryConfigurationFactory.java#L60-L73 |
122,490 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java | AutoConfigurationImportSelector.handleInvalidExcludes | protected void handleInvalidExcludes(List<String> invalidExcludes) {
StringBuilder message = new StringBuilder();
for (String exclude : invalidExcludes) {
message.append("\t- ").append(exclude).append(String.format("%n"));
}
throw new IllegalStateException(String
.format("The following classes could not ... | java | protected void handleInvalidExcludes(List<String> invalidExcludes) {
StringBuilder message = new StringBuilder();
for (String exclude : invalidExcludes) {
message.append("\t- ").append(exclude).append(String.format("%n"));
}
throw new IllegalStateException(String
.format("The following classes could not ... | [
"protected",
"void",
"handleInvalidExcludes",
"(",
"List",
"<",
"String",
">",
"invalidExcludes",
")",
"{",
"StringBuilder",
"message",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"String",
"exclude",
":",
"invalidExcludes",
")",
"{",
"message",
".... | Handle any invalid excludes that have been specified.
@param invalidExcludes the list of invalid excludes (will always have at least one
element) | [
"Handle",
"any",
"invalid",
"excludes",
"that",
"have",
"been",
"specified",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java#L217-L225 |
122,491 | spring-projects/spring-boot | spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java | AutoConfigurationImportSelector.getExclusions | protected Set<String> getExclusions(AnnotationMetadata metadata,
AnnotationAttributes attributes) {
Set<String> excluded = new LinkedHashSet<>();
excluded.addAll(asList(attributes, "exclude"));
excluded.addAll(Arrays.asList(attributes.getStringArray("excludeName")));
excluded.addAll(getExcludeAutoConfigurati... | java | protected Set<String> getExclusions(AnnotationMetadata metadata,
AnnotationAttributes attributes) {
Set<String> excluded = new LinkedHashSet<>();
excluded.addAll(asList(attributes, "exclude"));
excluded.addAll(Arrays.asList(attributes.getStringArray("excludeName")));
excluded.addAll(getExcludeAutoConfigurati... | [
"protected",
"Set",
"<",
"String",
">",
"getExclusions",
"(",
"AnnotationMetadata",
"metadata",
",",
"AnnotationAttributes",
"attributes",
")",
"{",
"Set",
"<",
"String",
">",
"excluded",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
")",
";",
"excluded",
".",
"addA... | Return any exclusions that limit the candidate configurations.
@param metadata the source metadata
@param attributes the {@link #getAttributes(AnnotationMetadata) annotation
attributes}
@return exclusions or an empty set | [
"Return",
"any",
"exclusions",
"that",
"limit",
"the",
"candidate",
"configurations",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelector.java#L234-L241 |
122,492 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/annotation/Configurations.java | Configurations.merge | protected Configurations merge(Configurations other) {
Set<Class<?>> mergedClasses = new LinkedHashSet<>(getClasses());
mergedClasses.addAll(other.getClasses());
return merge(mergedClasses);
} | java | protected Configurations merge(Configurations other) {
Set<Class<?>> mergedClasses = new LinkedHashSet<>(getClasses());
mergedClasses.addAll(other.getClasses());
return merge(mergedClasses);
} | [
"protected",
"Configurations",
"merge",
"(",
"Configurations",
"other",
")",
"{",
"Set",
"<",
"Class",
"<",
"?",
">",
">",
"mergedClasses",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
"getClasses",
"(",
")",
")",
";",
"mergedClasses",
".",
"addAll",
"(",
"othe... | Merge configurations from another source of the same type.
@param other the other {@link Configurations} (must be of the same type as this
instance)
@return a new configurations instance (must be of the same type as this instance) | [
"Merge",
"configurations",
"from",
"another",
"source",
"of",
"the",
"same",
"type",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/annotation/Configurations.java#L89-L93 |
122,493 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/annotation/Configurations.java | Configurations.getClasses | public static Class<?>[] getClasses(Collection<Configurations> configurations) {
List<Configurations> ordered = new ArrayList<>(configurations);
ordered.sort(COMPARATOR);
List<Configurations> collated = collate(ordered);
LinkedHashSet<Class<?>> classes = collated.stream()
.flatMap(Configurations::streamClas... | java | public static Class<?>[] getClasses(Collection<Configurations> configurations) {
List<Configurations> ordered = new ArrayList<>(configurations);
ordered.sort(COMPARATOR);
List<Configurations> collated = collate(ordered);
LinkedHashSet<Class<?>> classes = collated.stream()
.flatMap(Configurations::streamClas... | [
"public",
"static",
"Class",
"<",
"?",
">",
"[",
"]",
"getClasses",
"(",
"Collection",
"<",
"Configurations",
">",
"configurations",
")",
"{",
"List",
"<",
"Configurations",
">",
"ordered",
"=",
"new",
"ArrayList",
"<>",
"(",
"configurations",
")",
";",
"o... | Return the classes from all the specified configurations in the order that they
would be registered.
@param configurations the source configuration
@return configuration classes in registration order | [
"Return",
"the",
"classes",
"from",
"all",
"the",
"specified",
"configurations",
"in",
"the",
"order",
"that",
"they",
"would",
"be",
"registered",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/annotation/Configurations.java#L118-L126 |
122,494 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/info/GitProperties.java | GitProperties.coerceToEpoch | private static String coerceToEpoch(String s) {
Long epoch = parseEpochSecond(s);
if (epoch != null) {
return String.valueOf(epoch);
}
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
try {
return String.valueOf(format.parse(s).getTime());
}
catch (ParseException ex) {
re... | java | private static String coerceToEpoch(String s) {
Long epoch = parseEpochSecond(s);
if (epoch != null) {
return String.valueOf(epoch);
}
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
try {
return String.valueOf(format.parse(s).getTime());
}
catch (ParseException ex) {
re... | [
"private",
"static",
"String",
"coerceToEpoch",
"(",
"String",
"s",
")",
"{",
"Long",
"epoch",
"=",
"parseEpochSecond",
"(",
"s",
")",
";",
"if",
"(",
"epoch",
"!=",
"null",
")",
"{",
"return",
"String",
".",
"valueOf",
"(",
"epoch",
")",
";",
"}",
"... | Attempt to convert the specified value to epoch time. Git properties information
are known to be specified either as epoch time in seconds or using a specific date
format.
@param s the value to coerce to
@return the epoch time in milliseconds or the original value if it couldn't be
converted | [
"Attempt",
"to",
"convert",
"the",
"specified",
"value",
"to",
"epoch",
"time",
".",
"Git",
"properties",
"information",
"are",
"known",
"to",
"be",
"specified",
"either",
"as",
"epoch",
"time",
"in",
"seconds",
"or",
"using",
"a",
"specific",
"date",
"forma... | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/info/GitProperties.java#L106-L118 |
122,495 | spring-projects/spring-boot | spring-boot-project/spring-boot/src/main/java/org/springframework/boot/system/ApplicationPid.java | ApplicationPid.write | public void write(File file) throws IOException {
Assert.state(this.pid != null, "No PID available");
createParentFolder(file);
if (file.exists()) {
assertCanOverwrite(file);
}
try (FileWriter writer = new FileWriter(file)) {
writer.append(this.pid);
}
} | java | public void write(File file) throws IOException {
Assert.state(this.pid != null, "No PID available");
createParentFolder(file);
if (file.exists()) {
assertCanOverwrite(file);
}
try (FileWriter writer = new FileWriter(file)) {
writer.append(this.pid);
}
} | [
"public",
"void",
"write",
"(",
"File",
"file",
")",
"throws",
"IOException",
"{",
"Assert",
".",
"state",
"(",
"this",
".",
"pid",
"!=",
"null",
",",
"\"No PID available\"",
")",
";",
"createParentFolder",
"(",
"file",
")",
";",
"if",
"(",
"file",
".",
... | Write the PID to the specified file.
@param file the PID file
@throws IllegalStateException if no PID is available.
@throws IOException if the file cannot be written | [
"Write",
"the",
"PID",
"to",
"the",
"specified",
"file",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/system/ApplicationPid.java#L90-L99 |
122,496 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java | Restarter.preInitializeLeakyClasses | private void preInitializeLeakyClasses() {
try {
Class<?> readerClass = ClassNameReader.class;
Field field = readerClass.getDeclaredField("EARLY_EXIT");
field.setAccessible(true);
((Throwable) field.get(null)).fillInStackTrace();
}
catch (Exception ex) {
this.logger.warn("Unable to pre-initialize c... | java | private void preInitializeLeakyClasses() {
try {
Class<?> readerClass = ClassNameReader.class;
Field field = readerClass.getDeclaredField("EARLY_EXIT");
field.setAccessible(true);
((Throwable) field.get(null)).fillInStackTrace();
}
catch (Exception ex) {
this.logger.warn("Unable to pre-initialize c... | [
"private",
"void",
"preInitializeLeakyClasses",
"(",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"readerClass",
"=",
"ClassNameReader",
".",
"class",
";",
"Field",
"field",
"=",
"readerClass",
".",
"getDeclaredField",
"(",
"\"EARLY_EXIT\"",
")",
";",
"field"... | CGLIB has a private exception field which needs to initialized early to ensure that
the stacktrace doesn't retain a reference to the RestartClassLoader. | [
"CGLIB",
"has",
"a",
"private",
"exception",
"field",
"which",
"needs",
"to",
"initialized",
"early",
"to",
"ensure",
"that",
"the",
"stacktrace",
"doesn",
"t",
"retain",
"a",
"reference",
"to",
"the",
"RestartClassLoader",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java#L188-L198 |
122,497 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java | Restarter.addUrls | public void addUrls(Collection<URL> urls) {
Assert.notNull(urls, "Urls must not be null");
this.urls.addAll(urls);
} | java | public void addUrls(Collection<URL> urls) {
Assert.notNull(urls, "Urls must not be null");
this.urls.addAll(urls);
} | [
"public",
"void",
"addUrls",
"(",
"Collection",
"<",
"URL",
">",
"urls",
")",
"{",
"Assert",
".",
"notNull",
"(",
"urls",
",",
"\"Urls must not be null\"",
")",
";",
"this",
".",
"urls",
".",
"addAll",
"(",
"urls",
")",
";",
"}"
] | Add additional URLs to be includes in the next restart.
@param urls the urls to add | [
"Add",
"additional",
"URLs",
"to",
"be",
"includes",
"in",
"the",
"next",
"restart",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java#L212-L215 |
122,498 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java | Restarter.restart | public void restart(FailureHandler failureHandler) {
if (!this.enabled) {
this.logger.debug("Application restart is disabled");
return;
}
this.logger.debug("Restarting application");
getLeakSafeThread().call(() -> {
Restarter.this.stop();
Restarter.this.start(failureHandler);
return null;
});
... | java | public void restart(FailureHandler failureHandler) {
if (!this.enabled) {
this.logger.debug("Application restart is disabled");
return;
}
this.logger.debug("Restarting application");
getLeakSafeThread().call(() -> {
Restarter.this.stop();
Restarter.this.start(failureHandler);
return null;
});
... | [
"public",
"void",
"restart",
"(",
"FailureHandler",
"failureHandler",
")",
"{",
"if",
"(",
"!",
"this",
".",
"enabled",
")",
"{",
"this",
".",
"logger",
".",
"debug",
"(",
"\"Application restart is disabled\"",
")",
";",
"return",
";",
"}",
"this",
".",
"l... | Restart the running application.
@param failureHandler a failure handler to deal with application that doesn't start | [
"Restart",
"the",
"running",
"application",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java#L245-L256 |
122,499 | spring-projects/spring-boot | spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java | Restarter.start | protected void start(FailureHandler failureHandler) throws Exception {
do {
Throwable error = doStart();
if (error == null) {
return;
}
if (failureHandler.handle(error) == Outcome.ABORT) {
return;
}
}
while (true);
} | java | protected void start(FailureHandler failureHandler) throws Exception {
do {
Throwable error = doStart();
if (error == null) {
return;
}
if (failureHandler.handle(error) == Outcome.ABORT) {
return;
}
}
while (true);
} | [
"protected",
"void",
"start",
"(",
"FailureHandler",
"failureHandler",
")",
"throws",
"Exception",
"{",
"do",
"{",
"Throwable",
"error",
"=",
"doStart",
"(",
")",
";",
"if",
"(",
"error",
"==",
"null",
")",
"{",
"return",
";",
"}",
"if",
"(",
"failureHan... | Start the application.
@param failureHandler a failure handler for application that won't start
@throws Exception in case of errors | [
"Start",
"the",
"application",
"."
] | 0b27f7c70e164b2b1a96477f1d9c1acba56790c1 | https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java#L263-L274 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.