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 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/code/Symtab.java | Symtab.makeOperatorName | private Name makeOperatorName(String name) {
Name opName = names.fromString(name);
operatorNames.add(opName);
return opName;
} | java | private Name makeOperatorName(String name) {
Name opName = names.fromString(name);
operatorNames.add(opName);
return opName;
} | [
"private",
"Name",
"makeOperatorName",
"(",
"String",
"name",
")",
"{",
"Name",
"opName",
"=",
"names",
".",
"fromString",
"(",
"name",
")",
";",
"operatorNames",
".",
"add",
"(",
"opName",
")",
";",
"return",
"opName",
";",
"}"
] | Create a new operator name from corresponding String representation
and add the name to the set of known operator names. | [
"Create",
"a",
"new",
"operator",
"name",
"from",
"corresponding",
"String",
"representation",
"and",
"add",
"the",
"name",
"to",
"the",
"set",
"of",
"known",
"operator",
"names",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/code/Symtab.java#L302-L306 | train |
magik6k/JWWF | src/main/java/net/magik6k/jwwf/widgets/basic/panel/generic/NamedPanel.java | NamedPanel.put | public Widget put(IWidgetFactory factory, String name) {
Widget widget = factory.getWidget();
put(widget, name);
return widget;
} | java | public Widget put(IWidgetFactory factory, String name) {
Widget widget = factory.getWidget();
put(widget, name);
return widget;
} | [
"public",
"Widget",
"put",
"(",
"IWidgetFactory",
"factory",
",",
"String",
"name",
")",
"{",
"Widget",
"widget",
"=",
"factory",
".",
"getWidget",
"(",
")",
";",
"put",
"(",
"widget",
",",
"name",
")",
";",
"return",
"widget",
";",
"}"
] | Creates new widget and puts it to container at first free index
@param factory Factory of new widget
@param name Name of tab
@return Instance of created widget | [
"Creates",
"new",
"widget",
"and",
"puts",
"it",
"to",
"container",
"at",
"first",
"free",
"index"
] | 8ba334501396c3301495da8708733f6014f20665 | https://github.com/magik6k/JWWF/blob/8ba334501396c3301495da8708733f6014f20665/src/main/java/net/magik6k/jwwf/widgets/basic/panel/generic/NamedPanel.java#L33-L37 | train |
arakelian/more-commons | src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java | XmlStreamReaderUtils.getEventTypeDescription | public static String getEventTypeDescription(final XMLStreamReader reader) {
final int eventType = reader.getEventType();
if (eventType == XMLStreamConstants.START_ELEMENT) {
final String namespace = reader.getNamespaceURI();
return "<" + reader.getLocalName()
... | java | public static String getEventTypeDescription(final XMLStreamReader reader) {
final int eventType = reader.getEventType();
if (eventType == XMLStreamConstants.START_ELEMENT) {
final String namespace = reader.getNamespaceURI();
return "<" + reader.getLocalName()
... | [
"public",
"static",
"String",
"getEventTypeDescription",
"(",
"final",
"XMLStreamReader",
"reader",
")",
"{",
"final",
"int",
"eventType",
"=",
"reader",
".",
"getEventType",
"(",
")",
";",
"if",
"(",
"eventType",
"==",
"XMLStreamConstants",
".",
"START_ELEMENT",
... | Returns string describing the current event.
@param reader
pull parser that contains event information
@return string describing the current event. | [
"Returns",
"string",
"describing",
"the",
"current",
"event",
"."
] | 83c607044f64a7f6c005a67866c0ef7cb68d6e29 | https://github.com/arakelian/more-commons/blob/83c607044f64a7f6c005a67866c0ef7cb68d6e29/src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java#L487-L500 | train |
arakelian/more-commons | src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java | XmlStreamReaderUtils.isStartElement | public static boolean isStartElement(
final XMLStreamReader reader,
final String namespace,
final String localName) {
return reader.getEventType() == XMLStreamConstants.START_ELEMENT
&& nameEquals(reader, namespace, localName);
} | java | public static boolean isStartElement(
final XMLStreamReader reader,
final String namespace,
final String localName) {
return reader.getEventType() == XMLStreamConstants.START_ELEMENT
&& nameEquals(reader, namespace, localName);
} | [
"public",
"static",
"boolean",
"isStartElement",
"(",
"final",
"XMLStreamReader",
"reader",
",",
"final",
"String",
"namespace",
",",
"final",
"String",
"localName",
")",
"{",
"return",
"reader",
".",
"getEventType",
"(",
")",
"==",
"XMLStreamConstants",
".",
"S... | Method isStartElement.
@param reader
XMLStreamReader
@param namespace
String
@param localName
String
@return boolean | [
"Method",
"isStartElement",
"."
] | 83c607044f64a7f6c005a67866c0ef7cb68d6e29 | https://github.com/arakelian/more-commons/blob/83c607044f64a7f6c005a67866c0ef7cb68d6e29/src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java#L513-L519 | train |
arakelian/more-commons | src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java | XmlStreamReaderUtils.nameEquals | public static boolean nameEquals(
final XMLStreamReader reader,
final String namespace,
final String localName) {
if (!reader.getLocalName().equals(localName)) {
return false;
}
if (namespace == null) {
return true;
}
fi... | java | public static boolean nameEquals(
final XMLStreamReader reader,
final String namespace,
final String localName) {
if (!reader.getLocalName().equals(localName)) {
return false;
}
if (namespace == null) {
return true;
}
fi... | [
"public",
"static",
"boolean",
"nameEquals",
"(",
"final",
"XMLStreamReader",
"reader",
",",
"final",
"String",
"namespace",
",",
"final",
"String",
"localName",
")",
"{",
"if",
"(",
"!",
"reader",
".",
"getLocalName",
"(",
")",
".",
"equals",
"(",
"localNam... | Method nameEquals.
@param reader
XMLStreamReader
@param namespace
String
@param localName
String
@return boolean | [
"Method",
"nameEquals",
"."
] | 83c607044f64a7f6c005a67866c0ef7cb68d6e29 | https://github.com/arakelian/more-commons/blob/83c607044f64a7f6c005a67866c0ef7cb68d6e29/src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java#L532-L547 | train |
arakelian/more-commons | src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java | XmlStreamReaderUtils.optionalClassAttribute | public static Class optionalClassAttribute(
final XMLStreamReader reader,
final String localName,
final Class defaultValue) throws XMLStreamException {
return optionalClassAttribute(reader, null, localName, defaultValue);
} | java | public static Class optionalClassAttribute(
final XMLStreamReader reader,
final String localName,
final Class defaultValue) throws XMLStreamException {
return optionalClassAttribute(reader, null, localName, defaultValue);
} | [
"public",
"static",
"Class",
"optionalClassAttribute",
"(",
"final",
"XMLStreamReader",
"reader",
",",
"final",
"String",
"localName",
",",
"final",
"Class",
"defaultValue",
")",
"throws",
"XMLStreamException",
"{",
"return",
"optionalClassAttribute",
"(",
"reader",
"... | Returns the value of an attribute as a Class. If the attribute is empty, this method returns
the default value provided.
@param reader
<code>XMLStreamReader</code> that contains attribute values.
@param localName
local name of attribute (the namespace is ignored).
@param defaultValue
default value
@return value of att... | [
"Returns",
"the",
"value",
"of",
"an",
"attribute",
"as",
"a",
"Class",
".",
"If",
"the",
"attribute",
"is",
"empty",
"this",
"method",
"returns",
"the",
"default",
"value",
"provided",
"."
] | 83c607044f64a7f6c005a67866c0ef7cb68d6e29 | https://github.com/arakelian/more-commons/blob/83c607044f64a7f6c005a67866c0ef7cb68d6e29/src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java#L653-L658 | train |
arakelian/more-commons | src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java | XmlStreamReaderUtils.skipElement | public static void skipElement(final XMLStreamReader reader) throws XMLStreamException, IOException {
if (reader.getEventType() != XMLStreamConstants.START_ELEMENT) {
return;
}
final String namespace = reader.getNamespaceURI();
final String name = reader.getLocalName();
... | java | public static void skipElement(final XMLStreamReader reader) throws XMLStreamException, IOException {
if (reader.getEventType() != XMLStreamConstants.START_ELEMENT) {
return;
}
final String namespace = reader.getNamespaceURI();
final String name = reader.getLocalName();
... | [
"public",
"static",
"void",
"skipElement",
"(",
"final",
"XMLStreamReader",
"reader",
")",
"throws",
"XMLStreamException",
",",
"IOException",
"{",
"if",
"(",
"reader",
".",
"getEventType",
"(",
")",
"!=",
"XMLStreamConstants",
".",
"START_ELEMENT",
")",
"{",
"r... | Method skipElement.
@param reader
XMLStreamReader
@throws XMLStreamException
if there is error skipping element
@throws IOException
if there is error skipping element | [
"Method",
"skipElement",
"."
] | 83c607044f64a7f6c005a67866c0ef7cb68d6e29 | https://github.com/arakelian/more-commons/blob/83c607044f64a7f6c005a67866c0ef7cb68d6e29/src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java#L1392-L1412 | train |
redlink-gmbh/redlink-java-sdk | src/main/java/io/redlink/sdk/util/UriBuilder.java | UriBuilder.path | public UriBuilder path(String path) throws URISyntaxException {
path = path.trim();
if (getPath().endsWith("/")) {
return new UriBuilder(setPath(String.format("%s%s", getPath(), path)));
} else {
return new UriBuilder(setPath(String.format("%s/%s", getPath(), path)));
... | java | public UriBuilder path(String path) throws URISyntaxException {
path = path.trim();
if (getPath().endsWith("/")) {
return new UriBuilder(setPath(String.format("%s%s", getPath(), path)));
} else {
return new UriBuilder(setPath(String.format("%s/%s", getPath(), path)));
... | [
"public",
"UriBuilder",
"path",
"(",
"String",
"path",
")",
"throws",
"URISyntaxException",
"{",
"path",
"=",
"path",
".",
"trim",
"(",
")",
";",
"if",
"(",
"getPath",
"(",
")",
".",
"endsWith",
"(",
"\"/\"",
")",
")",
"{",
"return",
"new",
"UriBuilder... | Appends a path to the current one
@param path
@return
@throws URISyntaxException | [
"Appends",
"a",
"path",
"to",
"the",
"current",
"one"
] | c412ff11bd80da52ade09f2483ab29cdbff5a28a | https://github.com/redlink-gmbh/redlink-java-sdk/blob/c412ff11bd80da52ade09f2483ab29cdbff5a28a/src/main/java/io/redlink/sdk/util/UriBuilder.java#L56-L63 | train |
apruve/apruve-java | src/main/java/com/apruve/ApruveClient.java | ApruveClient.index | public <T> ApruveResponse<List<T>> index(String path,
GenericType<List<T>> resultType) {
Response response = restRequest(path).get();
List<T> responseObject = null;
ApruveResponse<List<T>> result;
if (response.getStatusInfo().getFamily() == Family.SUCCESSFUL) {
responseObject = response.readEntity(resultT... | java | public <T> ApruveResponse<List<T>> index(String path,
GenericType<List<T>> resultType) {
Response response = restRequest(path).get();
List<T> responseObject = null;
ApruveResponse<List<T>> result;
if (response.getStatusInfo().getFamily() == Family.SUCCESSFUL) {
responseObject = response.readEntity(resultT... | [
"public",
"<",
"T",
">",
"ApruveResponse",
"<",
"List",
"<",
"T",
">",
">",
"index",
"(",
"String",
"path",
",",
"GenericType",
"<",
"List",
"<",
"T",
">",
">",
"resultType",
")",
"{",
"Response",
"response",
"=",
"restRequest",
"(",
"path",
")",
"."... | is kind of a pain, and it duplicates processResponse. | [
"is",
"kind",
"of",
"a",
"pain",
"and",
"it",
"duplicates",
"processResponse",
"."
] | b188d6b17f777823c2e46427847318849978685e | https://github.com/apruve/apruve-java/blob/b188d6b17f777823c2e46427847318849978685e/src/main/java/com/apruve/ApruveClient.java#L139-L153 | train |
apruve/apruve-java | src/main/java/com/apruve/ApruveClient.java | ApruveClient.get | public <T> ApruveResponse<T> get(String path, Class<T> resultType) {
Response response = restRequest(path).get();
return processResponse(response, resultType);
} | java | public <T> ApruveResponse<T> get(String path, Class<T> resultType) {
Response response = restRequest(path).get();
return processResponse(response, resultType);
} | [
"public",
"<",
"T",
">",
"ApruveResponse",
"<",
"T",
">",
"get",
"(",
"String",
"path",
",",
"Class",
"<",
"T",
">",
"resultType",
")",
"{",
"Response",
"response",
"=",
"restRequest",
"(",
"path",
")",
".",
"get",
"(",
")",
";",
"return",
"processRe... | Issues a GET request against to the Apruve REST API, using the specified
path.
@param path
The path to issue the GET against
@param resultType
The type of the response
@return A single object of type resultType | [
"Issues",
"a",
"GET",
"request",
"against",
"to",
"the",
"Apruve",
"REST",
"API",
"using",
"the",
"specified",
"path",
"."
] | b188d6b17f777823c2e46427847318849978685e | https://github.com/apruve/apruve-java/blob/b188d6b17f777823c2e46427847318849978685e/src/main/java/com/apruve/ApruveClient.java#L165-L168 | train |
opsmatters/opsmatters-core | src/main/java/com/opsmatters/core/provider/NewRelicManager.java | NewRelicManager.sync | public boolean sync(NewRelicCache cache)
{
if(cache == null)
throw new IllegalArgumentException("null cache");
checkInitialize(cache);
boolean ret = isInitialized();
if(!ret)
throw new IllegalStateException("cache not initialized");
clear(cache);
... | java | public boolean sync(NewRelicCache cache)
{
if(cache == null)
throw new IllegalArgumentException("null cache");
checkInitialize(cache);
boolean ret = isInitialized();
if(!ret)
throw new IllegalStateException("cache not initialized");
clear(cache);
... | [
"public",
"boolean",
"sync",
"(",
"NewRelicCache",
"cache",
")",
"{",
"if",
"(",
"cache",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"null cache\"",
")",
";",
"checkInitialize",
"(",
"cache",
")",
";",
"boolean",
"ret",
"=",
"isIni... | Synchronises the cache.
@param cache The provider cache | [
"Synchronises",
"the",
"cache",
"."
] | c48904f7e8d029fd45357811ec38a735e261e3fd | https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/provider/NewRelicManager.java#L121-L149 | train |
opsmatters/opsmatters-core | src/main/java/com/opsmatters/core/provider/NewRelicManager.java | NewRelicManager.syncAlerts | public boolean syncAlerts(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the alert configuration using the REST API
if(cache.isAlertsEnabled())
{
ret = false;
... | java | public boolean syncAlerts(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the alert configuration using the REST API
if(cache.isAlertsEnabled())
{
ret = false;
... | [
"public",
"boolean",
"syncAlerts",
"(",
"NewRelicCache",
"cache",
")",
"{",
"boolean",
"ret",
"=",
"true",
";",
"if",
"(",
"apiClient",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"null API client\"",
")",
";",
"// Get the alert configura... | Synchronise the alerts configuration with the cache.
@param cache The provider cache
@return <CODE>true</CODE> if the operation was successful | [
"Synchronise",
"the",
"alerts",
"configuration",
"with",
"the",
"cache",
"."
] | c48904f7e8d029fd45357811ec38a735e261e3fd | https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/provider/NewRelicManager.java#L156-L200 | train |
opsmatters/opsmatters-core | src/main/java/com/opsmatters/core/provider/NewRelicManager.java | NewRelicManager.syncApplications | public boolean syncApplications(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the application configuration using the REST API
if(cache.isApmEnabled() || cache.isBrowserEnabled() || cache.i... | java | public boolean syncApplications(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the application configuration using the REST API
if(cache.isApmEnabled() || cache.isBrowserEnabled() || cache.i... | [
"public",
"boolean",
"syncApplications",
"(",
"NewRelicCache",
"cache",
")",
"{",
"boolean",
"ret",
"=",
"true",
";",
"if",
"(",
"apiClient",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"null API client\"",
")",
";",
"// Get the applicati... | Synchronise the application configuration with the cache.
@param cache The provider cache
@return <CODE>true</CODE> if the operation was successful | [
"Synchronise",
"the",
"application",
"configuration",
"with",
"the",
"cache",
"."
] | c48904f7e8d029fd45357811ec38a735e261e3fd | https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/provider/NewRelicManager.java#L207-L270 | train |
opsmatters/opsmatters-core | src/main/java/com/opsmatters/core/provider/NewRelicManager.java | NewRelicManager.syncPlugins | public boolean syncPlugins(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the Plugins configuration using the REST API
if(cache.isPluginsEnabled())
{
ret = false;
... | java | public boolean syncPlugins(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the Plugins configuration using the REST API
if(cache.isPluginsEnabled())
{
ret = false;
... | [
"public",
"boolean",
"syncPlugins",
"(",
"NewRelicCache",
"cache",
")",
"{",
"boolean",
"ret",
"=",
"true",
";",
"if",
"(",
"apiClient",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"null API client\"",
")",
";",
"// Get the Plugins config... | Synchronise the Plugins configuration with the cache.
@param cache The provider cache
@return <CODE>true</CODE> if the operation was successful | [
"Synchronise",
"the",
"Plugins",
"configuration",
"with",
"the",
"cache",
"."
] | c48904f7e8d029fd45357811ec38a735e261e3fd | https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/provider/NewRelicManager.java#L277-L306 | train |
opsmatters/opsmatters-core | src/main/java/com/opsmatters/core/provider/NewRelicManager.java | NewRelicManager.syncMonitors | public boolean syncMonitors(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the Synthetics configuration using the REST API
if(cache.isSyntheticsEnabled())
{
ret = false;
... | java | public boolean syncMonitors(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the Synthetics configuration using the REST API
if(cache.isSyntheticsEnabled())
{
ret = false;
... | [
"public",
"boolean",
"syncMonitors",
"(",
"NewRelicCache",
"cache",
")",
"{",
"boolean",
"ret",
"=",
"true",
";",
"if",
"(",
"apiClient",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"null API client\"",
")",
";",
"// Get the Synthetics co... | Synchronise the Synthetics configuration with the cache.
@param cache The provider cache
@return <CODE>true</CODE> if the operation was successful | [
"Synchronise",
"the",
"Synthetics",
"configuration",
"with",
"the",
"cache",
"."
] | c48904f7e8d029fd45357811ec38a735e261e3fd | https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/provider/NewRelicManager.java#L313-L333 | train |
opsmatters/opsmatters-core | src/main/java/com/opsmatters/core/provider/NewRelicManager.java | NewRelicManager.syncServers | public boolean syncServers(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the server configuration using the REST API
if(cache.isServersEnabled())
{
ret = false;
... | java | public boolean syncServers(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the server configuration using the REST API
if(cache.isServersEnabled())
{
ret = false;
... | [
"public",
"boolean",
"syncServers",
"(",
"NewRelicCache",
"cache",
")",
"{",
"boolean",
"ret",
"=",
"true",
";",
"if",
"(",
"apiClient",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"null API client\"",
")",
";",
"// Get the server configu... | Synchronise the server configuration with the cache.
@param cache The provider cache
@return <CODE>true</CODE> if the operation was successful | [
"Synchronise",
"the",
"server",
"configuration",
"with",
"the",
"cache",
"."
] | c48904f7e8d029fd45357811ec38a735e261e3fd | https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/provider/NewRelicManager.java#L340-L360 | train |
opsmatters/opsmatters-core | src/main/java/com/opsmatters/core/provider/NewRelicManager.java | NewRelicManager.syncLabels | public boolean syncLabels(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the label configuration using the REST API
if(cache.isApmEnabled() || cache.isSyntheticsEnabled())
{
... | java | public boolean syncLabels(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the label configuration using the REST API
if(cache.isApmEnabled() || cache.isSyntheticsEnabled())
{
... | [
"public",
"boolean",
"syncLabels",
"(",
"NewRelicCache",
"cache",
")",
"{",
"boolean",
"ret",
"=",
"true",
";",
"if",
"(",
"apiClient",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"null API client\"",
")",
";",
"// Get the label configura... | Synchronise the label configuration with the cache.
@param cache The provider cache
@return <CODE>true</CODE> if the operation was successful | [
"Synchronise",
"the",
"label",
"configuration",
"with",
"the",
"cache",
"."
] | c48904f7e8d029fd45357811ec38a735e261e3fd | https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/provider/NewRelicManager.java#L367-L404 | train |
opsmatters/opsmatters-core | src/main/java/com/opsmatters/core/provider/NewRelicManager.java | NewRelicManager.syncDashboards | public boolean syncDashboards(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the dashboard configuration using the REST API
if(cache.isInsightsEnabled())
{
ret = false;
... | java | public boolean syncDashboards(NewRelicCache cache)
{
boolean ret = true;
if(apiClient == null)
throw new IllegalArgumentException("null API client");
// Get the dashboard configuration using the REST API
if(cache.isInsightsEnabled())
{
ret = false;
... | [
"public",
"boolean",
"syncDashboards",
"(",
"NewRelicCache",
"cache",
")",
"{",
"boolean",
"ret",
"=",
"true",
";",
"if",
"(",
"apiClient",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"null API client\"",
")",
";",
"// Get the dashboard c... | Synchronise the dashboard configuration with the cache.
@param cache The provider cache
@return <CODE>true</CODE> if the operation was successful | [
"Synchronise",
"the",
"dashboard",
"configuration",
"with",
"the",
"cache",
"."
] | c48904f7e8d029fd45357811ec38a735e261e3fd | https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/provider/NewRelicManager.java#L411-L431 | train |
jcuda/jcufft | JCufftJava/src/main/java/jcuda/jcufft/cufftResult.java | cufftResult.stringFor | public static String stringFor(int m)
{
switch (m)
{
case CUFFT_SUCCESS : return "CUFFT_SUCCESS";
case CUFFT_INVALID_PLAN : return "CUFFT_INVALID_PLAN";
case CUFFT_ALLOC_FAILED : return "CUFFT_ALLOC_FAILED";
case CUFFT_INVALID_TYPE : return "CUF... | java | public static String stringFor(int m)
{
switch (m)
{
case CUFFT_SUCCESS : return "CUFFT_SUCCESS";
case CUFFT_INVALID_PLAN : return "CUFFT_INVALID_PLAN";
case CUFFT_ALLOC_FAILED : return "CUFFT_ALLOC_FAILED";
case CUFFT_INVALID_TYPE : return "CUF... | [
"public",
"static",
"String",
"stringFor",
"(",
"int",
"m",
")",
"{",
"switch",
"(",
"m",
")",
"{",
"case",
"CUFFT_SUCCESS",
":",
"return",
"\"CUFFT_SUCCESS\"",
";",
"case",
"CUFFT_INVALID_PLAN",
":",
"return",
"\"CUFFT_INVALID_PLAN\"",
";",
"case",
"CUFFT_ALLOC... | Returns the String identifying the given cufftResult
@param m The cufftResult
@return The String identifying the given cufftResult | [
"Returns",
"the",
"String",
"identifying",
"the",
"given",
"cufftResult"
] | 833c87ffb0864f7ee7270fddef8af57f48939b3a | https://github.com/jcuda/jcufft/blob/833c87ffb0864f7ee7270fddef8af57f48939b3a/JCufftJava/src/main/java/jcuda/jcufft/cufftResult.java#L132-L156 | train |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/social/SocialTemplate.java | SocialTemplate.parseProfile | protected SocialProfile parseProfile(Map<String, Object> props) {
if (!props.containsKey("id")) {
throw new IllegalArgumentException("No id in profile");
}
SocialProfile profile = SocialProfile.with(props)
.displayName("name")
.first("first_name")
.last("last_name")
.id... | java | protected SocialProfile parseProfile(Map<String, Object> props) {
if (!props.containsKey("id")) {
throw new IllegalArgumentException("No id in profile");
}
SocialProfile profile = SocialProfile.with(props)
.displayName("name")
.first("first_name")
.last("last_name")
.id... | [
"protected",
"SocialProfile",
"parseProfile",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"props",
")",
"{",
"if",
"(",
"!",
"props",
".",
"containsKey",
"(",
"\"id\"",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"No id in profile\"",
... | Property names for Facebook - Override to customize
@param props
@return | [
"Property",
"names",
"for",
"Facebook",
"-",
"Override",
"to",
"customize"
] | eb8ba8e6794a96ea0dd9744cada4f9ad9618f114 | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/social/SocialTemplate.java#L94-L108 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javadoc/JavadocTool.java | JavadocTool.parsePackageClasses | private void parsePackageClasses(String name,
List<JavaFileObject> files,
ListBuffer<JCCompilationUnit> trees,
List<String> excludedPackages)
throws IOException {
if (excludedPackages.contains(name)) {
return;
}
docenv.notice("main.Loa... | java | private void parsePackageClasses(String name,
List<JavaFileObject> files,
ListBuffer<JCCompilationUnit> trees,
List<String> excludedPackages)
throws IOException {
if (excludedPackages.contains(name)) {
return;
}
docenv.notice("main.Loa... | [
"private",
"void",
"parsePackageClasses",
"(",
"String",
"name",
",",
"List",
"<",
"JavaFileObject",
">",
"files",
",",
"ListBuffer",
"<",
"JCCompilationUnit",
">",
"trees",
",",
"List",
"<",
"String",
">",
"excludedPackages",
")",
"throws",
"IOException",
"{",
... | search all directories in path for subdirectory name. Add all
.java files found in such a directory to args. | [
"search",
"all",
"directories",
"in",
"path",
"for",
"subdirectory",
"name",
".",
"Add",
"all",
".",
"java",
"files",
"found",
"in",
"such",
"a",
"directory",
"to",
"args",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javadoc/JavadocTool.java#L213-L246 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javadoc/JavadocTool.java | JavadocTool.isValidJavaClassFile | private static boolean isValidJavaClassFile(String file) {
if (!file.endsWith(".class")) return false;
String clazzName = file.substring(0, file.length() - ".class".length());
return isValidClassName(clazzName);
} | java | private static boolean isValidJavaClassFile(String file) {
if (!file.endsWith(".class")) return false;
String clazzName = file.substring(0, file.length() - ".class".length());
return isValidClassName(clazzName);
} | [
"private",
"static",
"boolean",
"isValidJavaClassFile",
"(",
"String",
"file",
")",
"{",
"if",
"(",
"!",
"file",
".",
"endsWith",
"(",
"\".class\"",
")",
")",
"return",
"false",
";",
"String",
"clazzName",
"=",
"file",
".",
"substring",
"(",
"0",
",",
"f... | Return true if given file name is a valid class file name.
@param file the name of the file to check.
@return true if given file name is a valid class file name
and false otherwise. | [
"Return",
"true",
"if",
"given",
"file",
"name",
"is",
"a",
"valid",
"class",
"file",
"name",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javadoc/JavadocTool.java#L371-L375 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/code/Scope.java | Scope.enter | public void enter(Symbol sym, Scope s, Scope origin, boolean staticallyImported) {
Assert.check(shared == 0);
if (nelems * 3 >= hashMask * 2)
dble();
int hash = getIndex(sym.name);
Entry old = table[hash];
if (old == null) {
old = sentinel;
nel... | java | public void enter(Symbol sym, Scope s, Scope origin, boolean staticallyImported) {
Assert.check(shared == 0);
if (nelems * 3 >= hashMask * 2)
dble();
int hash = getIndex(sym.name);
Entry old = table[hash];
if (old == null) {
old = sentinel;
nel... | [
"public",
"void",
"enter",
"(",
"Symbol",
"sym",
",",
"Scope",
"s",
",",
"Scope",
"origin",
",",
"boolean",
"staticallyImported",
")",
"{",
"Assert",
".",
"check",
"(",
"shared",
"==",
"0",
")",
";",
"if",
"(",
"nelems",
"*",
"3",
">=",
"hashMask",
"... | Enter symbol sym in this scope, but mark that it comes from
given scope `s' accessed through `origin'. The last two
arguments are only used in import scopes. | [
"Enter",
"symbol",
"sym",
"in",
"this",
"scope",
"but",
"mark",
"that",
"it",
"comes",
"from",
"given",
"scope",
"s",
"accessed",
"through",
"origin",
".",
"The",
"last",
"two",
"arguments",
"are",
"only",
"used",
"in",
"import",
"scopes",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/code/Scope.java#L210-L228 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/comp/ResolveWithDeps.java | ResolveWithDeps.reportDependence | @Override
public void reportDependence(Symbol from, Symbol to) {
// Capture dependencies between the packages.
deps.collect(from.packge().fullname, to.packge().fullname);
} | java | @Override
public void reportDependence(Symbol from, Symbol to) {
// Capture dependencies between the packages.
deps.collect(from.packge().fullname, to.packge().fullname);
} | [
"@",
"Override",
"public",
"void",
"reportDependence",
"(",
"Symbol",
"from",
",",
"Symbol",
"to",
")",
"{",
"// Capture dependencies between the packages.",
"deps",
".",
"collect",
"(",
"from",
".",
"packge",
"(",
")",
".",
"fullname",
",",
"to",
".",
"packge... | Collect dependencies in the enclosing class
@param from The enclosing class sym
@param to The enclosing classes references this sym. | [
"Collect",
"dependencies",
"in",
"the",
"enclosing",
"class"
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/comp/ResolveWithDeps.java#L62-L66 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/jvm/CRTable.java | CRTable.put | public void put(Object tree, int flags, int startPc, int endPc) {
entries.append(new CRTEntry(tree, flags, startPc, endPc));
} | java | public void put(Object tree, int flags, int startPc, int endPc) {
entries.append(new CRTEntry(tree, flags, startPc, endPc));
} | [
"public",
"void",
"put",
"(",
"Object",
"tree",
",",
"int",
"flags",
",",
"int",
"startPc",
",",
"int",
"endPc",
")",
"{",
"entries",
".",
"append",
"(",
"new",
"CRTEntry",
"(",
"tree",
",",
"flags",
",",
"startPc",
",",
"endPc",
")",
")",
";",
"}"... | Create a new CRTEntry and add it to the entries.
@param tree The tree or the list of trees for which
we are storing the code pointers.
@param flags The set of flags designating type of the entry.
@param startPc The starting code position.
@param endPc The ending code position. | [
"Create",
"a",
"new",
"CRTEntry",
"and",
"add",
"it",
"to",
"the",
"entries",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/jvm/CRTable.java#L81-L83 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/jvm/CRTable.java | CRTable.writeCRT | public int writeCRT(ByteBuffer databuf, Position.LineMap lineMap, Log log) {
int crtEntries = 0;
// compute source positions for the method
new SourceComputer().csp(methodTree);
for (List<CRTEntry> l = entries.toList(); l.nonEmpty(); l = l.tail) {
CRTEntry entry = l.head;... | java | public int writeCRT(ByteBuffer databuf, Position.LineMap lineMap, Log log) {
int crtEntries = 0;
// compute source positions for the method
new SourceComputer().csp(methodTree);
for (List<CRTEntry> l = entries.toList(); l.nonEmpty(); l = l.tail) {
CRTEntry entry = l.head;... | [
"public",
"int",
"writeCRT",
"(",
"ByteBuffer",
"databuf",
",",
"Position",
".",
"LineMap",
"lineMap",
",",
"Log",
"log",
")",
"{",
"int",
"crtEntries",
"=",
"0",
";",
"// compute source positions for the method",
"new",
"SourceComputer",
"(",
")",
".",
"csp",
... | Compute source positions and write CRT to the databuf.
@param databuf The buffer to write bytecodes to. | [
"Compute",
"source",
"positions",
"and",
"write",
"CRT",
"to",
"the",
"databuf",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/jvm/CRTable.java#L88-L140 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/jvm/CRTable.java | CRTable.getTypes | private String getTypes(int flags) {
String types = "";
if ((flags & CRT_STATEMENT) != 0) types += " CRT_STATEMENT";
if ((flags & CRT_BLOCK) != 0) types += " CRT_BLOCK";
if ((flags & CRT_ASSIGNMENT) != 0) types += " CRT_ASSIGNMENT";
if ((flags & CRT_FLOW_CONT... | java | private String getTypes(int flags) {
String types = "";
if ((flags & CRT_STATEMENT) != 0) types += " CRT_STATEMENT";
if ((flags & CRT_BLOCK) != 0) types += " CRT_BLOCK";
if ((flags & CRT_ASSIGNMENT) != 0) types += " CRT_ASSIGNMENT";
if ((flags & CRT_FLOW_CONT... | [
"private",
"String",
"getTypes",
"(",
"int",
"flags",
")",
"{",
"String",
"types",
"=",
"\"\"",
";",
"if",
"(",
"(",
"flags",
"&",
"CRT_STATEMENT",
")",
"!=",
"0",
")",
"types",
"+=",
"\" CRT_STATEMENT\"",
";",
"if",
"(",
"(",
"flags",
"&",
"CRT_BLOCK"... | Return string describing flags enabled. | [
"Return",
"string",
"describing",
"flags",
"enabled",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/jvm/CRTable.java#L150-L162 | train |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java | UserResource.read | @GET
@Path("{id}")
@RolesAllowed({"ROLE_ADMIN"})
public Response read(@PathParam("id") Long id) {
checkNotNull(id);
return Response.ok(userService.getById(id)).build();
} | java | @GET
@Path("{id}")
@RolesAllowed({"ROLE_ADMIN"})
public Response read(@PathParam("id") Long id) {
checkNotNull(id);
return Response.ok(userService.getById(id)).build();
} | [
"@",
"GET",
"@",
"Path",
"(",
"\"{id}\"",
")",
"@",
"RolesAllowed",
"(",
"{",
"\"ROLE_ADMIN\"",
"}",
")",
"public",
"Response",
"read",
"(",
"@",
"PathParam",
"(",
"\"id\"",
")",
"Long",
"id",
")",
"{",
"checkNotNull",
"(",
"id",
")",
";",
"return",
... | Get details for a single user.
@param id unique user id
@return user domain object | [
"Get",
"details",
"for",
"a",
"single",
"user",
"."
] | eb8ba8e6794a96ea0dd9744cada4f9ad9618f114 | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java#L135-L141 | train |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java | UserResource.search | @GET
@Path("search")
@RolesAllowed({"ROLE_ADMIN"})
public Response search(@QueryParam("email") String email,
@QueryParam("username") String username,
@QueryParam("pageSize") @DefaultValue("10") int pageSize,
@QueryParam("cursorKey") String... | java | @GET
@Path("search")
@RolesAllowed({"ROLE_ADMIN"})
public Response search(@QueryParam("email") String email,
@QueryParam("username") String username,
@QueryParam("pageSize") @DefaultValue("10") int pageSize,
@QueryParam("cursorKey") String... | [
"@",
"GET",
"@",
"Path",
"(",
"\"search\"",
")",
"@",
"RolesAllowed",
"(",
"{",
"\"ROLE_ADMIN\"",
"}",
")",
"public",
"Response",
"search",
"(",
"@",
"QueryParam",
"(",
"\"email\"",
")",
"String",
"email",
",",
"@",
"QueryParam",
"(",
"\"username\"",
")",
... | Search for users with matching email or username.
@param email a partial email address
@param username a partial username
@return a page of matching users | [
"Search",
"for",
"users",
"with",
"matching",
"email",
"or",
"username",
"."
] | eb8ba8e6794a96ea0dd9744cada4f9ad9618f114 | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java#L165-L183 | train |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java | UserResource.readPage | @GET
@RolesAllowed({"ROLE_ADMIN"})
public Response readPage(@QueryParam("pageSize") @DefaultValue("10") int pageSize,
@QueryParam("cursorKey") String cursorKey) {
CursorPage<DUser> page = userService.readPage(pageSize, cursorKey);
return Response.ok(page).build();
} | java | @GET
@RolesAllowed({"ROLE_ADMIN"})
public Response readPage(@QueryParam("pageSize") @DefaultValue("10") int pageSize,
@QueryParam("cursorKey") String cursorKey) {
CursorPage<DUser> page = userService.readPage(pageSize, cursorKey);
return Response.ok(page).build();
} | [
"@",
"GET",
"@",
"RolesAllowed",
"(",
"{",
"\"ROLE_ADMIN\"",
"}",
")",
"public",
"Response",
"readPage",
"(",
"@",
"QueryParam",
"(",
"\"pageSize\"",
")",
"@",
"DefaultValue",
"(",
"\"10\"",
")",
"int",
"pageSize",
",",
"@",
"QueryParam",
"(",
"\"cursorKey\"... | Get a page of users.
@param pageSize Optional. Page size.
@param cursorKey Optional. Cursor key
@return a page of user domain objects | [
"Get",
"a",
"page",
"of",
"users",
"."
] | eb8ba8e6794a96ea0dd9744cada4f9ad9618f114 | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java#L192-L200 | train |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java | UserResource.changeUsername | @POST
@Path("{id}/username")
@RolesAllowed({"ROLE_ADMIN"})
public Response changeUsername(@PathParam("id") Long id, UsernameRequest usernameRequest) {
checkUsernameFormat(usernameRequest.username);
userService.changeUsername(id, usernameRequest.getUsername());
return Response.ok(id).build();
} | java | @POST
@Path("{id}/username")
@RolesAllowed({"ROLE_ADMIN"})
public Response changeUsername(@PathParam("id") Long id, UsernameRequest usernameRequest) {
checkUsernameFormat(usernameRequest.username);
userService.changeUsername(id, usernameRequest.getUsername());
return Response.ok(id).build();
} | [
"@",
"POST",
"@",
"Path",
"(",
"\"{id}/username\"",
")",
"@",
"RolesAllowed",
"(",
"{",
"\"ROLE_ADMIN\"",
"}",
")",
"public",
"Response",
"changeUsername",
"(",
"@",
"PathParam",
"(",
"\"id\"",
")",
"Long",
"id",
",",
"UsernameRequest",
"usernameRequest",
")",... | Change a users username.
The username must be unique
@param usernameRequest new username
@return 200 if success
409 if username is not unique | [
"Change",
"a",
"users",
"username",
".",
"The",
"username",
"must",
"be",
"unique"
] | eb8ba8e6794a96ea0dd9744cada4f9ad9618f114 | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java#L341-L350 | train |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java | UserResource.changePassword | @POST
@Path("{id}/password")
@PermitAll
public Response changePassword(@PathParam("id") Long userId, PasswordRequest request) {
checkNotNull(userId);
checkNotNull(request.getToken());
checkPasswordFormat(request.getNewPassword());
boolean isSuccess = userService.confirmResetPasswordUsingToken(use... | java | @POST
@Path("{id}/password")
@PermitAll
public Response changePassword(@PathParam("id") Long userId, PasswordRequest request) {
checkNotNull(userId);
checkNotNull(request.getToken());
checkPasswordFormat(request.getNewPassword());
boolean isSuccess = userService.confirmResetPasswordUsingToken(use... | [
"@",
"POST",
"@",
"Path",
"(",
"\"{id}/password\"",
")",
"@",
"PermitAll",
"public",
"Response",
"changePassword",
"(",
"@",
"PathParam",
"(",
"\"id\"",
")",
"Long",
"userId",
",",
"PasswordRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"userId",
")",
"... | Change password using a temporary token.
Used during password reset flow.
@param userId unique user id
@param request newPassword and token
@return 204 if success, otherwise 403 | [
"Change",
"password",
"using",
"a",
"temporary",
"token",
".",
"Used",
"during",
"password",
"reset",
"flow",
"."
] | eb8ba8e6794a96ea0dd9744cada4f9ad9618f114 | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java#L380-L390 | train |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java | UserResource.resetPassword | @POST
@Path("password/reset")
@PermitAll
public Response resetPassword(PasswordRequest request) {
checkNotNull(request.getEmail());
userService.resetPassword(request.getEmail());
return Response.noContent().build();
} | java | @POST
@Path("password/reset")
@PermitAll
public Response resetPassword(PasswordRequest request) {
checkNotNull(request.getEmail());
userService.resetPassword(request.getEmail());
return Response.noContent().build();
} | [
"@",
"POST",
"@",
"Path",
"(",
"\"password/reset\"",
")",
"@",
"PermitAll",
"public",
"Response",
"resetPassword",
"(",
"PasswordRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"request",
".",
"getEmail",
"(",
")",
")",
";",
"userService",
".",
"resetPassw... | Reset user password by sending out a reset email.
@param request users unique email
@return http 204 | [
"Reset",
"user",
"password",
"by",
"sending",
"out",
"a",
"reset",
"email",
"."
] | eb8ba8e6794a96ea0dd9744cada4f9ad9618f114 | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java#L398-L406 | train |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java | UserResource.confirmAccount | @POST
@Path("{id}/account/confirm")
@PermitAll
public Response confirmAccount(@PathParam("id") Long userId, AccountRequest request) {
checkNotNull(userId);
checkNotNull(request.getToken());
boolean isSuccess = userService.confirmAccountUsingToken(userId, request.getToken());
return isSuccess ? Re... | java | @POST
@Path("{id}/account/confirm")
@PermitAll
public Response confirmAccount(@PathParam("id") Long userId, AccountRequest request) {
checkNotNull(userId);
checkNotNull(request.getToken());
boolean isSuccess = userService.confirmAccountUsingToken(userId, request.getToken());
return isSuccess ? Re... | [
"@",
"POST",
"@",
"Path",
"(",
"\"{id}/account/confirm\"",
")",
"@",
"PermitAll",
"public",
"Response",
"confirmAccount",
"(",
"@",
"PathParam",
"(",
"\"id\"",
")",
"Long",
"userId",
",",
"AccountRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"userId",
")... | Confirm a newly create account using a temporary token.
@param userId unique user id
@param request token
@return 204 if success
@return 400 if id / token combination is invalid | [
"Confirm",
"a",
"newly",
"create",
"account",
"using",
"a",
"temporary",
"token",
"."
] | eb8ba8e6794a96ea0dd9744cada4f9ad9618f114 | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java#L416-L425 | train |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java | UserResource.resendVerifyAccountEmail | @POST
@Path("{id}/account/resend")
@PermitAll
public Response resendVerifyAccountEmail(@PathParam("id") Long userId) {
checkNotNull(userId);
boolean isSuccess = userService.resendVerifyAccountEmail(userId);
return isSuccess ? Response.noContent().build() : Response.status(Response.Status.BAD_REQUEST)... | java | @POST
@Path("{id}/account/resend")
@PermitAll
public Response resendVerifyAccountEmail(@PathParam("id") Long userId) {
checkNotNull(userId);
boolean isSuccess = userService.resendVerifyAccountEmail(userId);
return isSuccess ? Response.noContent().build() : Response.status(Response.Status.BAD_REQUEST)... | [
"@",
"POST",
"@",
"Path",
"(",
"\"{id}/account/resend\"",
")",
"@",
"PermitAll",
"public",
"Response",
"resendVerifyAccountEmail",
"(",
"@",
"PathParam",
"(",
"\"id\"",
")",
"Long",
"userId",
")",
"{",
"checkNotNull",
"(",
"userId",
")",
";",
"boolean",
"isSuc... | Resend account verification email.
@param userId unique user id
@return 204 if success | [
"Resend",
"account",
"verification",
"email",
"."
] | eb8ba8e6794a96ea0dd9744cada4f9ad9618f114 | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java#L433-L441 | train |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java | UserResource.changeEmail | @POST
@Path("{id}/email")
@RolesAllowed({"ROLE_ADMIN"})
public Response changeEmail(@PathParam("id") Long userId, EmailRequest request) {
checkNotNull(userId);
checkEmailFormat(request.getEmail());
boolean isSuccess = userService.changeEmailAddress(userId, request.getEmail());
return isSuccess ? ... | java | @POST
@Path("{id}/email")
@RolesAllowed({"ROLE_ADMIN"})
public Response changeEmail(@PathParam("id") Long userId, EmailRequest request) {
checkNotNull(userId);
checkEmailFormat(request.getEmail());
boolean isSuccess = userService.changeEmailAddress(userId, request.getEmail());
return isSuccess ? ... | [
"@",
"POST",
"@",
"Path",
"(",
"\"{id}/email\"",
")",
"@",
"RolesAllowed",
"(",
"{",
"\"ROLE_ADMIN\"",
"}",
")",
"public",
"Response",
"changeEmail",
"(",
"@",
"PathParam",
"(",
"\"id\"",
")",
"Long",
"userId",
",",
"EmailRequest",
"request",
")",
"{",
"ch... | Admin changing a users email.
@param userId unique user id
@param request injected
@return 204 if success | [
"Admin",
"changing",
"a",
"users",
"email",
"."
] | eb8ba8e6794a96ea0dd9744cada4f9ad9618f114 | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java#L465-L474 | train |
Wadpam/guja | guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java | UserResource.confirmChangeEmail | @POST
@Path("{id}/email/confirm")
@PermitAll
public Response confirmChangeEmail(@PathParam("id") Long userId, EmailRequest request) {
checkNotNull(userId);
checkNotNull(request.getToken());
boolean isSuccess = userService.confirmEmailAddressChangeUsingToken(userId, request.getToken());
return isS... | java | @POST
@Path("{id}/email/confirm")
@PermitAll
public Response confirmChangeEmail(@PathParam("id") Long userId, EmailRequest request) {
checkNotNull(userId);
checkNotNull(request.getToken());
boolean isSuccess = userService.confirmEmailAddressChangeUsingToken(userId, request.getToken());
return isS... | [
"@",
"POST",
"@",
"Path",
"(",
"\"{id}/email/confirm\"",
")",
"@",
"PermitAll",
"public",
"Response",
"confirmChangeEmail",
"(",
"@",
"PathParam",
"(",
"\"id\"",
")",
"Long",
"userId",
",",
"EmailRequest",
"request",
")",
"{",
"checkNotNull",
"(",
"userId",
")... | User confirm changing email.
The token is verified and the temporary stored email will not be permanently saved as the users email.
@param userId unique email
@return 204 if success | [
"User",
"confirm",
"changing",
"email",
".",
"The",
"token",
"is",
"verified",
"and",
"the",
"temporary",
"stored",
"email",
"will",
"not",
"be",
"permanently",
"saved",
"as",
"the",
"users",
"email",
"."
] | eb8ba8e6794a96ea0dd9744cada4f9ad9618f114 | https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/api/UserResource.java#L483-L492 | train |
syphr42/libmythtv-java | protocol/src/main/java/org/syphr/mythtv/protocol/ProtocolFactory.java | ProtocolFactory.createInstance | public static Protocol createInstance(ProtocolVersion version, SocketManager socketManager)
{
switch (version)
{
case _63:
return new Protocol63(socketManager);
case _72:
return new Protocol72(socketManager);
case _73:
... | java | public static Protocol createInstance(ProtocolVersion version, SocketManager socketManager)
{
switch (version)
{
case _63:
return new Protocol63(socketManager);
case _72:
return new Protocol72(socketManager);
case _73:
... | [
"public",
"static",
"Protocol",
"createInstance",
"(",
"ProtocolVersion",
"version",
",",
"SocketManager",
"socketManager",
")",
"{",
"switch",
"(",
"version",
")",
"{",
"case",
"_63",
":",
"return",
"new",
"Protocol63",
"(",
"socketManager",
")",
";",
"case",
... | Create a new protocol instance. This instance cannot be used until the
associated socket manager is connected.
@param version
the desired protocol version (this must match the backend to
which the socket manager is connecting)
@param socketManager
the socket manager that will control communication between the
client a... | [
"Create",
"a",
"new",
"protocol",
"instance",
".",
"This",
"instance",
"cannot",
"be",
"used",
"until",
"the",
"associated",
"socket",
"manager",
"is",
"connected",
"."
] | cc7a2012fbd4a4ba2562dda6b2614fb0548526ea | https://github.com/syphr42/libmythtv-java/blob/cc7a2012fbd4a4ba2562dda6b2614fb0548526ea/protocol/src/main/java/org/syphr/mythtv/protocol/ProtocolFactory.java#L57-L76 | train |
base2Services/kagura | shared/reporting-core/src/main/java/com/base2/kagura/core/report/configmodel/ReportConfig.java | ReportConfig.prepareParameters | public void prepareParameters(Map<String, Object> extra) {
if (paramConfig == null) return;
for (ParamConfig param : paramConfig)
{
param.prepareParameter(extra);
}
} | java | public void prepareParameters(Map<String, Object> extra) {
if (paramConfig == null) return;
for (ParamConfig param : paramConfig)
{
param.prepareParameter(extra);
}
} | [
"public",
"void",
"prepareParameters",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"extra",
")",
"{",
"if",
"(",
"paramConfig",
"==",
"null",
")",
"return",
";",
"for",
"(",
"ParamConfig",
"param",
":",
"paramConfig",
")",
"{",
"param",
".",
"prepareP... | Prepares the parameters for the report. This populates the Combo and ManyCombo box options if there is a groovy
or report backing the data.
@param extra Extra options from the middleware, this is passed down to the report or groovy execution. | [
"Prepares",
"the",
"parameters",
"for",
"the",
"report",
".",
"This",
"populates",
"the",
"Combo",
"and",
"ManyCombo",
"box",
"options",
"if",
"there",
"is",
"a",
"groovy",
"or",
"report",
"backing",
"the",
"data",
"."
] | 5564aa71bfa2cb3baaae2eb098c6c673dd4e82ee | https://github.com/base2Services/kagura/blob/5564aa71bfa2cb3baaae2eb098c6c673dd4e82ee/shared/reporting-core/src/main/java/com/base2/kagura/core/report/configmodel/ReportConfig.java#L143-L149 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java | ValueTaglet.getFieldDoc | private FieldDoc getFieldDoc(Configuration config, Tag tag, String name) {
if (name == null || name.length() == 0) {
//Base case: no label.
if (tag.holder() instanceof FieldDoc) {
return (FieldDoc) tag.holder();
} else {
// If the value tag doe... | java | private FieldDoc getFieldDoc(Configuration config, Tag tag, String name) {
if (name == null || name.length() == 0) {
//Base case: no label.
if (tag.holder() instanceof FieldDoc) {
return (FieldDoc) tag.holder();
} else {
// If the value tag doe... | [
"private",
"FieldDoc",
"getFieldDoc",
"(",
"Configuration",
"config",
",",
"Tag",
"tag",
",",
"String",
"name",
")",
"{",
"if",
"(",
"name",
"==",
"null",
"||",
"name",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"//Base case: no label.",
"if",
"(",
... | Given the name of the field, return the corresponding FieldDoc. Return null
due to invalid use of value tag if the name is null or empty string and if
the value tag is not used on a field.
@param config the current configuration of the doclet.
@param tag the value tag.
@param name the name of the field to search for. ... | [
"Given",
"the",
"name",
"of",
"the",
"field",
"return",
"the",
"corresponding",
"FieldDoc",
".",
"Return",
"null",
"due",
"to",
"invalid",
"use",
"of",
"value",
"tag",
"if",
"the",
"name",
"is",
"null",
"or",
"empty",
"string",
"and",
"if",
"the",
"value... | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java#L122-L160 | train |
eiichiro/gig | gig-core/src/main/java/org/eiichiro/gig/Configuration.java | Configuration.constructed | @Constructed
public void constructed() {
Context context = factory.enterContext();
try {
scope = new ImporterTopLevel(context);
} finally {
Context.exit();
}
Container container = Jaguar.component(Container.class);
Object store = container.component(container.contexts().get(Application.class)).... | java | @Constructed
public void constructed() {
Context context = factory.enterContext();
try {
scope = new ImporterTopLevel(context);
} finally {
Context.exit();
}
Container container = Jaguar.component(Container.class);
Object store = container.component(container.contexts().get(Application.class)).... | [
"@",
"Constructed",
"public",
"void",
"constructed",
"(",
")",
"{",
"Context",
"context",
"=",
"factory",
".",
"enterContext",
"(",
")",
";",
"try",
"{",
"scope",
"=",
"new",
"ImporterTopLevel",
"(",
"context",
")",
";",
"}",
"finally",
"{",
"Context",
"... | Sets up Mozilla Rhino's script scope. If the application is running on a
Servlet container, this method instantiates and initializes the Bootleg's
default configuration internally. | [
"Sets",
"up",
"Mozilla",
"Rhino",
"s",
"script",
"scope",
".",
"If",
"the",
"application",
"is",
"running",
"on",
"a",
"Servlet",
"container",
"this",
"method",
"instantiates",
"and",
"initializes",
"the",
"Bootleg",
"s",
"default",
"configuration",
"internally"... | 21181fb36a17d2154f989e5e8c6edbb39fc81900 | https://github.com/eiichiro/gig/blob/21181fb36a17d2154f989e5e8c6edbb39fc81900/gig-core/src/main/java/org/eiichiro/gig/Configuration.java#L118-L136 | train |
eiichiro/gig | gig-core/src/main/java/org/eiichiro/gig/Configuration.java | Configuration.activated | @Activated
public void activated() {
logger.info("Importing core packages ['org.eiichiro.gig', 'org.eiichiro.bootleg', 'org.eiichiro.jaguar', 'org.eiichiro.jaguar.deployment'] into JavaScript context");
Context context = factory.enterContext();
try {
context.evaluateString(scope, "importPackage(Packages.or... | java | @Activated
public void activated() {
logger.info("Importing core packages ['org.eiichiro.gig', 'org.eiichiro.bootleg', 'org.eiichiro.jaguar', 'org.eiichiro.jaguar.deployment'] into JavaScript context");
Context context = factory.enterContext();
try {
context.evaluateString(scope, "importPackage(Packages.or... | [
"@",
"Activated",
"public",
"void",
"activated",
"(",
")",
"{",
"logger",
".",
"info",
"(",
"\"Importing core packages ['org.eiichiro.gig', 'org.eiichiro.bootleg', 'org.eiichiro.jaguar', 'org.eiichiro.jaguar.deployment'] into JavaScript context\"",
")",
";",
"Context",
"context",
"... | Attempts to load pre-defined configuration files. | [
"Attempts",
"to",
"load",
"pre",
"-",
"defined",
"configuration",
"files",
"."
] | 21181fb36a17d2154f989e5e8c6edbb39fc81900 | https://github.com/eiichiro/gig/blob/21181fb36a17d2154f989e5e8c6edbb39fc81900/gig-core/src/main/java/org/eiichiro/gig/Configuration.java#L141-L158 | train |
eiichiro/gig | gig-core/src/main/java/org/eiichiro/gig/Configuration.java | Configuration.load | public void load(String file) {
Context context = factory.enterContext();
try {
URL url = Thread.currentThread().getContextClassLoader().getResource(file);
if (url == null) {
logger.debug("Configuration [" + file + "] does not exist");
return;
}
File f = new File(url.getPath());
... | java | public void load(String file) {
Context context = factory.enterContext();
try {
URL url = Thread.currentThread().getContextClassLoader().getResource(file);
if (url == null) {
logger.debug("Configuration [" + file + "] does not exist");
return;
}
File f = new File(url.getPath());
... | [
"public",
"void",
"load",
"(",
"String",
"file",
")",
"{",
"Context",
"context",
"=",
"factory",
".",
"enterContext",
"(",
")",
";",
"try",
"{",
"URL",
"url",
"=",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getContextClassLoader",
"(",
")",
".",
"... | Loads the specified configuration file written in JavaScript.
@param file Configuration file written in JavaScript. | [
"Loads",
"the",
"specified",
"configuration",
"file",
"written",
"in",
"JavaScript",
"."
] | 21181fb36a17d2154f989e5e8c6edbb39fc81900 | https://github.com/eiichiro/gig/blob/21181fb36a17d2154f989e5e8c6edbb39fc81900/gig-core/src/main/java/org/eiichiro/gig/Configuration.java#L165-L189 | train |
eiichiro/gig | gig-core/src/main/java/org/eiichiro/gig/Configuration.java | Configuration.set | public <T> void set(String key, T value) {
Preconditions.checkArgument(key != null && !key.isEmpty(), "Parameter 'key' must not be [" + key + "]");
values.put(key, value);
scope.put(key, scope, value);
} | java | public <T> void set(String key, T value) {
Preconditions.checkArgument(key != null && !key.isEmpty(), "Parameter 'key' must not be [" + key + "]");
values.put(key, value);
scope.put(key, scope, value);
} | [
"public",
"<",
"T",
">",
"void",
"set",
"(",
"String",
"key",
",",
"T",
"value",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"key",
"!=",
"null",
"&&",
"!",
"key",
".",
"isEmpty",
"(",
")",
",",
"\"Parameter 'key' must not be [\"",
"+",
"key",
... | Sets the specified configuration setting with the specified key.
@param key The key to the configuration setting.
@param value The value of the configuration setting. | [
"Sets",
"the",
"specified",
"configuration",
"setting",
"with",
"the",
"specified",
"key",
"."
] | 21181fb36a17d2154f989e5e8c6edbb39fc81900 | https://github.com/eiichiro/gig/blob/21181fb36a17d2154f989e5e8c6edbb39fc81900/gig-core/src/main/java/org/eiichiro/gig/Configuration.java#L330-L334 | train |
phax/ph-masterdata | ph-masterdata/src/main/java/com/helger/masterdata/ean/AbstractUPCEAN.java | AbstractUPCEAN.calcChecksumChar | protected static char calcChecksumChar (@Nonnull final String sMsg, @Nonnegative final int nLength)
{
ValueEnforcer.notNull (sMsg, "Msg");
ValueEnforcer.isBetweenInclusive (nLength, "Length", 0, sMsg.length ());
return asChar (calcChecksum (sMsg.toCharArray (), nLength));
} | java | protected static char calcChecksumChar (@Nonnull final String sMsg, @Nonnegative final int nLength)
{
ValueEnforcer.notNull (sMsg, "Msg");
ValueEnforcer.isBetweenInclusive (nLength, "Length", 0, sMsg.length ());
return asChar (calcChecksum (sMsg.toCharArray (), nLength));
} | [
"protected",
"static",
"char",
"calcChecksumChar",
"(",
"@",
"Nonnull",
"final",
"String",
"sMsg",
",",
"@",
"Nonnegative",
"final",
"int",
"nLength",
")",
"{",
"ValueEnforcer",
".",
"notNull",
"(",
"sMsg",
",",
"\"Msg\"",
")",
";",
"ValueEnforcer",
".",
"is... | Calculates the check character for a given message
@param sMsg
the message
@param nLength
The number of characters to be checked. Must be ≥ 0 and <
message.length
@return char the check character | [
"Calculates",
"the",
"check",
"character",
"for",
"a",
"given",
"message"
] | ca5e0b03c735b30b47930c018bfb5e71f00d0ff4 | https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/ean/AbstractUPCEAN.java#L144-L150 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/parser/UnicodeReader.java | UnicodeReader.scanSurrogates | protected char scanSurrogates() {
if (surrogatesSupported && Character.isHighSurrogate(ch)) {
char high = ch;
scanChar();
if (Character.isLowSurrogate(ch)) {
return high;
}
ch = high;
}
return 0;
} | java | protected char scanSurrogates() {
if (surrogatesSupported && Character.isHighSurrogate(ch)) {
char high = ch;
scanChar();
if (Character.isLowSurrogate(ch)) {
return high;
}
ch = high;
}
return 0;
} | [
"protected",
"char",
"scanSurrogates",
"(",
")",
"{",
"if",
"(",
"surrogatesSupported",
"&&",
"Character",
".",
"isHighSurrogate",
"(",
"ch",
")",
")",
"{",
"char",
"high",
"=",
"ch",
";",
"scanChar",
"(",
")",
";",
"if",
"(",
"Character",
".",
"isLowSur... | Scan surrogate pairs. If 'ch' is a high surrogate and
the next character is a low surrogate, then put the low
surrogate in 'ch', and return the high surrogate.
otherwise, just return 0. | [
"Scan",
"surrogate",
"pairs",
".",
"If",
"ch",
"is",
"a",
"high",
"surrogate",
"and",
"the",
"next",
"character",
"is",
"a",
"low",
"surrogate",
"then",
"put",
"the",
"low",
"surrogate",
"in",
"ch",
"and",
"return",
"the",
"high",
"surrogate",
".",
"othe... | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/parser/UnicodeReader.java#L204-L218 | train |
phax/ph-masterdata | ph-masterdata/src/main/java/com/helger/masterdata/ean/EAN8.java | EAN8.validateMessage | @Nonnull
public static EValidity validateMessage (@Nullable final String sMsg)
{
final int nLen = StringHelper.getLength (sMsg);
if (nLen >= 7 && nLen <= 8)
if (AbstractUPCEAN.validateMessage (sMsg).isValid ())
return EValidity.VALID;
return EValidity.INVALID;
} | java | @Nonnull
public static EValidity validateMessage (@Nullable final String sMsg)
{
final int nLen = StringHelper.getLength (sMsg);
if (nLen >= 7 && nLen <= 8)
if (AbstractUPCEAN.validateMessage (sMsg).isValid ())
return EValidity.VALID;
return EValidity.INVALID;
} | [
"@",
"Nonnull",
"public",
"static",
"EValidity",
"validateMessage",
"(",
"@",
"Nullable",
"final",
"String",
"sMsg",
")",
"{",
"final",
"int",
"nLen",
"=",
"StringHelper",
".",
"getLength",
"(",
"sMsg",
")",
";",
"if",
"(",
"nLen",
">=",
"7",
"&&",
"nLen... | Validates a EAN-8 message. The method throws IllegalArgumentExceptions if
an invalid message is passed.
@param sMsg
the message to validate
@return {@link EValidity#VALID} if the msg is valid,
{@link EValidity#INVALID} otherwise. | [
"Validates",
"a",
"EAN",
"-",
"8",
"message",
".",
"The",
"method",
"throws",
"IllegalArgumentExceptions",
"if",
"an",
"invalid",
"message",
"is",
"passed",
"."
] | ca5e0b03c735b30b47930c018bfb5e71f00d0ff4 | https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/ean/EAN8.java#L73-L81 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/comp/PubapiVisitor.java | PubapiVisitor.makeMethodString | protected String makeMethodString(ExecutableElement e) {
StringBuilder result = new StringBuilder();
for (Modifier modifier : e.getModifiers()) {
result.append(modifier.toString());
result.append(" ");
}
result.append(e.getReturnType().toString());
result.... | java | protected String makeMethodString(ExecutableElement e) {
StringBuilder result = new StringBuilder();
for (Modifier modifier : e.getModifiers()) {
result.append(modifier.toString());
result.append(" ");
}
result.append(e.getReturnType().toString());
result.... | [
"protected",
"String",
"makeMethodString",
"(",
"ExecutableElement",
"e",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"Modifier",
"modifier",
":",
"e",
".",
"getModifiers",
"(",
")",
")",
"{",
"result",
".",
... | Creates a String representation of a method element with everything
necessary to track all public aspects of it in an API.
@param e Element to create String for.
@return String representation of element. | [
"Creates",
"a",
"String",
"representation",
"of",
"a",
"method",
"element",
"with",
"everything",
"necessary",
"to",
"track",
"all",
"public",
"aspects",
"of",
"it",
"in",
"an",
"API",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/comp/PubapiVisitor.java#L105-L128 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/comp/PubapiVisitor.java | PubapiVisitor.makeVariableString | protected String makeVariableString(VariableElement e) {
StringBuilder result = new StringBuilder();
for (Modifier modifier : e.getModifiers()) {
result.append(modifier.toString());
result.append(" ");
}
result.append(e.asType().toString());
result.append(... | java | protected String makeVariableString(VariableElement e) {
StringBuilder result = new StringBuilder();
for (Modifier modifier : e.getModifiers()) {
result.append(modifier.toString());
result.append(" ");
}
result.append(e.asType().toString());
result.append(... | [
"protected",
"String",
"makeVariableString",
"(",
"VariableElement",
"e",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"Modifier",
"modifier",
":",
"e",
".",
"getModifiers",
"(",
")",
")",
"{",
"result",
".",
... | Creates a String representation of a variable element with everything
necessary to track all public aspects of it in an API.
@param e Element to create String for.
@return String representation of element. | [
"Creates",
"a",
"String",
"representation",
"of",
"a",
"variable",
"element",
"with",
"everything",
"necessary",
"to",
"track",
"all",
"public",
"aspects",
"of",
"it",
"in",
"an",
"API",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/comp/PubapiVisitor.java#L136-L156 | train |
opsmatters/opsmatters-core | src/main/java/com/opsmatters/core/provider/newrelic/DeploymentCache.java | DeploymentCache.add | public void add(Collection<Deployment> deployments)
{
for(Deployment deployment : deployments)
this.deployments.put(deployment.getId(), deployment);
} | java | public void add(Collection<Deployment> deployments)
{
for(Deployment deployment : deployments)
this.deployments.put(deployment.getId(), deployment);
} | [
"public",
"void",
"add",
"(",
"Collection",
"<",
"Deployment",
">",
"deployments",
")",
"{",
"for",
"(",
"Deployment",
"deployment",
":",
"deployments",
")",
"this",
".",
"deployments",
".",
"put",
"(",
"deployment",
".",
"getId",
"(",
")",
",",
"deploymen... | Adds the deployment list to the deployments for the account.
@param deployments The deployments to add | [
"Adds",
"the",
"deployment",
"list",
"to",
"the",
"deployments",
"for",
"the",
"account",
"."
] | c48904f7e8d029fd45357811ec38a735e261e3fd | https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/provider/newrelic/DeploymentCache.java#L67-L71 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/comp/Infer.java | Infer.generateReturnConstraints | Type generateReturnConstraints(JCTree tree, Attr.ResultInfo resultInfo,
MethodType mt, InferenceContext inferenceContext) {
InferenceContext rsInfoInfContext = resultInfo.checkContext.inferenceContext();
Type from = mt.getReturnType();
if (mt.getReturnType().containsAny(inferenceCont... | java | Type generateReturnConstraints(JCTree tree, Attr.ResultInfo resultInfo,
MethodType mt, InferenceContext inferenceContext) {
InferenceContext rsInfoInfContext = resultInfo.checkContext.inferenceContext();
Type from = mt.getReturnType();
if (mt.getReturnType().containsAny(inferenceCont... | [
"Type",
"generateReturnConstraints",
"(",
"JCTree",
"tree",
",",
"Attr",
".",
"ResultInfo",
"resultInfo",
",",
"MethodType",
"mt",
",",
"InferenceContext",
"inferenceContext",
")",
"{",
"InferenceContext",
"rsInfoInfContext",
"=",
"resultInfo",
".",
"checkContext",
".... | Generate constraints from the generic method's return type. If the method
call occurs in a context where a type T is expected, use the expected
type to derive more constraints on the generic method inference variables. | [
"Generate",
"constraints",
"from",
"the",
"generic",
"method",
"s",
"return",
"type",
".",
"If",
"the",
"method",
"call",
"occurs",
"in",
"a",
"context",
"where",
"a",
"type",
"T",
"is",
"expected",
"use",
"the",
"expected",
"type",
"to",
"derive",
"more",... | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/Infer.java#L228-L272 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/comp/Infer.java | Infer.instantiateAsUninferredVars | private void instantiateAsUninferredVars(List<Type> vars, InferenceContext inferenceContext) {
ListBuffer<Type> todo = new ListBuffer<>();
//step 1 - create fresh tvars
for (Type t : vars) {
UndetVar uv = (UndetVar)inferenceContext.asUndetVar(t);
List<Type> upperBounds = ... | java | private void instantiateAsUninferredVars(List<Type> vars, InferenceContext inferenceContext) {
ListBuffer<Type> todo = new ListBuffer<>();
//step 1 - create fresh tvars
for (Type t : vars) {
UndetVar uv = (UndetVar)inferenceContext.asUndetVar(t);
List<Type> upperBounds = ... | [
"private",
"void",
"instantiateAsUninferredVars",
"(",
"List",
"<",
"Type",
">",
"vars",
",",
"InferenceContext",
"inferenceContext",
")",
"{",
"ListBuffer",
"<",
"Type",
">",
"todo",
"=",
"new",
"ListBuffer",
"<>",
"(",
")",
";",
"//step 1 - create fresh tvars",
... | Infer cyclic inference variables as described in 15.12.2.8. | [
"Infer",
"cyclic",
"inference",
"variables",
"as",
"described",
"in",
"15",
".",
"12",
".",
"2",
".",
"8",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/Infer.java#L368-L397 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/comp/Infer.java | Infer.instantiatePolymorphicSignatureInstance | Type instantiatePolymorphicSignatureInstance(Env<AttrContext> env,
MethodSymbol spMethod, // sig. poly. method or null if none
Resolve.MethodResolutionContext resolveContext,
List<Type> a... | java | Type instantiatePolymorphicSignatureInstance(Env<AttrContext> env,
MethodSymbol spMethod, // sig. poly. method or null if none
Resolve.MethodResolutionContext resolveContext,
List<Type> a... | [
"Type",
"instantiatePolymorphicSignatureInstance",
"(",
"Env",
"<",
"AttrContext",
">",
"env",
",",
"MethodSymbol",
"spMethod",
",",
"// sig. poly. method or null if none",
"Resolve",
".",
"MethodResolutionContext",
"resolveContext",
",",
"List",
"<",
"Type",
">",
"argtyp... | Compute a synthetic method type corresponding to the requested polymorphic
method signature. The target return type is computed from the immediately
enclosing scope surrounding the polymorphic-signature call. | [
"Compute",
"a",
"synthetic",
"method",
"type",
"corresponding",
"to",
"the",
"requested",
"polymorphic",
"method",
"signature",
".",
"The",
"target",
"return",
"type",
"is",
"computed",
"from",
"the",
"immediately",
"enclosing",
"scope",
"surrounding",
"the",
"pol... | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/Infer.java#L404-L446 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/comp/Infer.java | Infer.checkWithinBounds | void checkWithinBounds(InferenceContext inferenceContext,
Warner warn) throws InferenceException {
MultiUndetVarListener mlistener = new MultiUndetVarListener(inferenceContext.undetvars);
List<Type> saved_undet = inferenceContext.save();
try {
while (true... | java | void checkWithinBounds(InferenceContext inferenceContext,
Warner warn) throws InferenceException {
MultiUndetVarListener mlistener = new MultiUndetVarListener(inferenceContext.undetvars);
List<Type> saved_undet = inferenceContext.save();
try {
while (true... | [
"void",
"checkWithinBounds",
"(",
"InferenceContext",
"inferenceContext",
",",
"Warner",
"warn",
")",
"throws",
"InferenceException",
"{",
"MultiUndetVarListener",
"mlistener",
"=",
"new",
"MultiUndetVarListener",
"(",
"inferenceContext",
".",
"undetvars",
")",
";",
"Li... | Check bounds and perform incorporation | [
"Check",
"bounds",
"and",
"perform",
"incorporation"
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/Infer.java#L530-L566 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/comp/Infer.java | Infer.checkCompatibleUpperBounds | void checkCompatibleUpperBounds(UndetVar uv, InferenceContext inferenceContext) {
List<Type> hibounds =
Type.filter(uv.getBounds(InferenceBound.UPPER), new BoundFilter(inferenceContext));
Type hb = null;
if (hibounds.isEmpty())
hb = syms.objectType;
else if (h... | java | void checkCompatibleUpperBounds(UndetVar uv, InferenceContext inferenceContext) {
List<Type> hibounds =
Type.filter(uv.getBounds(InferenceBound.UPPER), new BoundFilter(inferenceContext));
Type hb = null;
if (hibounds.isEmpty())
hb = syms.objectType;
else if (h... | [
"void",
"checkCompatibleUpperBounds",
"(",
"UndetVar",
"uv",
",",
"InferenceContext",
"inferenceContext",
")",
"{",
"List",
"<",
"Type",
">",
"hibounds",
"=",
"Type",
".",
"filter",
"(",
"uv",
".",
"getBounds",
"(",
"InferenceBound",
".",
"UPPER",
")",
",",
... | Make sure that the upper bounds we got so far lead to a solvable inference
variable by making sure that a glb exists. | [
"Make",
"sure",
"that",
"the",
"upper",
"bounds",
"we",
"got",
"so",
"far",
"lead",
"to",
"a",
"solvable",
"inference",
"variable",
"by",
"making",
"sure",
"that",
"a",
"glb",
"exists",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/Infer.java#L1071-L1083 | train |
magik6k/JWWF | src/main/java/net/magik6k/jwwf/core/JwwfServer.java | JwwfServer.bindWebapp | public JwwfServer bindWebapp(final Class<? extends User> user, String url) {
if (!url.endsWith("/"))
url = url + "/";
context.addServlet(new ServletHolder(new WebClientServelt(clientCreator)), url + "");
context.addServlet(new ServletHolder(new SkinServlet()), url + "__jwwf/skins/*");
ServletHolder fontServ... | java | public JwwfServer bindWebapp(final Class<? extends User> user, String url) {
if (!url.endsWith("/"))
url = url + "/";
context.addServlet(new ServletHolder(new WebClientServelt(clientCreator)), url + "");
context.addServlet(new ServletHolder(new SkinServlet()), url + "__jwwf/skins/*");
ServletHolder fontServ... | [
"public",
"JwwfServer",
"bindWebapp",
"(",
"final",
"Class",
"<",
"?",
"extends",
"User",
">",
"user",
",",
"String",
"url",
")",
"{",
"if",
"(",
"!",
"url",
".",
"endsWith",
"(",
"\"/\"",
")",
")",
"url",
"=",
"url",
"+",
"\"/\"",
";",
"context",
... | Binds webapp to address
@param user User class for the web application
@param url Url to bind to, myst begin and end with /, like /foo/bar/
@return This JwwfServer | [
"Binds",
"webapp",
"to",
"address"
] | 8ba334501396c3301495da8708733f6014f20665 | https://github.com/magik6k/JWWF/blob/8ba334501396c3301495da8708733f6014f20665/src/main/java/net/magik6k/jwwf/core/JwwfServer.java#L53-L83 | train |
magik6k/JWWF | src/main/java/net/magik6k/jwwf/core/JwwfServer.java | JwwfServer.attachPlugin | public JwwfServer attachPlugin(JwwfPlugin plugin) {
plugins.add(plugin);
if (plugin instanceof IPluginGlobal)
((IPluginGlobal) plugin).onAttach(this);
return this;
} | java | public JwwfServer attachPlugin(JwwfPlugin plugin) {
plugins.add(plugin);
if (plugin instanceof IPluginGlobal)
((IPluginGlobal) plugin).onAttach(this);
return this;
} | [
"public",
"JwwfServer",
"attachPlugin",
"(",
"JwwfPlugin",
"plugin",
")",
"{",
"plugins",
".",
"add",
"(",
"plugin",
")",
";",
"if",
"(",
"plugin",
"instanceof",
"IPluginGlobal",
")",
"(",
"(",
"IPluginGlobal",
")",
"plugin",
")",
".",
"onAttach",
"(",
"th... | Attahes new plugin to this server
@param plugin Plugin to attach
@return This JwwfServer | [
"Attahes",
"new",
"plugin",
"to",
"this",
"server"
] | 8ba334501396c3301495da8708733f6014f20665 | https://github.com/magik6k/JWWF/blob/8ba334501396c3301495da8708733f6014f20665/src/main/java/net/magik6k/jwwf/core/JwwfServer.java#L129-L134 | train |
magik6k/JWWF | src/main/java/net/magik6k/jwwf/core/JwwfServer.java | JwwfServer.startAndJoin | public JwwfServer startAndJoin() {
try {
server.start();
server.join();
} catch (Exception e) {
e.printStackTrace();
}
return this;
} | java | public JwwfServer startAndJoin() {
try {
server.start();
server.join();
} catch (Exception e) {
e.printStackTrace();
}
return this;
} | [
"public",
"JwwfServer",
"startAndJoin",
"(",
")",
"{",
"try",
"{",
"server",
".",
"start",
"(",
")",
";",
"server",
".",
"join",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"e",
".",
"printStackTrace",
"(",
")",
";",
"}",
"return"... | Starts Jetty server and waits for it
@return This JwwfServer | [
"Starts",
"Jetty",
"server",
"and",
"waits",
"for",
"it"
] | 8ba334501396c3301495da8708733f6014f20665 | https://github.com/magik6k/JWWF/blob/8ba334501396c3301495da8708733f6014f20665/src/main/java/net/magik6k/jwwf/core/JwwfServer.java#L164-L172 | train |
brianwhu/xillium | data/src/main/java/org/xillium/data/xml/XDBCodec.java | XDBCodec.decode | public static InputStream decode(DataBinder binder, InputStream stream) throws ParserConfigurationException, SAXException, IOException {
XML.newSAXParser().parse(stream, new XDBHandler(binder));
return stream;
} | java | public static InputStream decode(DataBinder binder, InputStream stream) throws ParserConfigurationException, SAXException, IOException {
XML.newSAXParser().parse(stream, new XDBHandler(binder));
return stream;
} | [
"public",
"static",
"InputStream",
"decode",
"(",
"DataBinder",
"binder",
",",
"InputStream",
"stream",
")",
"throws",
"ParserConfigurationException",
",",
"SAXException",
",",
"IOException",
"{",
"XML",
".",
"newSAXParser",
"(",
")",
".",
"parse",
"(",
"stream",
... | Decodes an XML stream. Returns the input stream. | [
"Decodes",
"an",
"XML",
"stream",
".",
"Returns",
"the",
"input",
"stream",
"."
] | e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799 | https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/data/src/main/java/org/xillium/data/xml/XDBCodec.java#L107-L110 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/comp/TransTypes.java | TransTypes.addBridge | void addBridge(DiagnosticPosition pos,
MethodSymbol meth,
MethodSymbol impl,
ClassSymbol origin,
boolean hypothetical,
ListBuffer<JCTree> bridges) {
make.at(pos);
Type origType = types.memberType(origin.type, ... | java | void addBridge(DiagnosticPosition pos,
MethodSymbol meth,
MethodSymbol impl,
ClassSymbol origin,
boolean hypothetical,
ListBuffer<JCTree> bridges) {
make.at(pos);
Type origType = types.memberType(origin.type, ... | [
"void",
"addBridge",
"(",
"DiagnosticPosition",
"pos",
",",
"MethodSymbol",
"meth",
",",
"MethodSymbol",
"impl",
",",
"ClassSymbol",
"origin",
",",
"boolean",
"hypothetical",
",",
"ListBuffer",
"<",
"JCTree",
">",
"bridges",
")",
"{",
"make",
".",
"at",
"(",
... | Add a bridge definition and enter corresponding method symbol in
local scope of origin.
@param pos The source code position to be used for the definition.
@param meth The method for which a bridge needs to be added
@param impl That method's implementation (possibly the method itself)
@param origin The class... | [
"Add",
"a",
"bridge",
"definition",
"and",
"enter",
"corresponding",
"method",
"symbol",
"in",
"local",
"scope",
"of",
"origin",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/TransTypes.java#L245-L302 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/comp/TransTypes.java | TransTypes.addBridges | void addBridges(DiagnosticPosition pos, ClassSymbol origin, ListBuffer<JCTree> bridges) {
Type st = types.supertype(origin.type);
while (st.hasTag(CLASS)) {
// if (isSpecialization(st))
addBridges(pos, st.tsym, origin, bridges);
st = types.supertype(st);
}
... | java | void addBridges(DiagnosticPosition pos, ClassSymbol origin, ListBuffer<JCTree> bridges) {
Type st = types.supertype(origin.type);
while (st.hasTag(CLASS)) {
// if (isSpecialization(st))
addBridges(pos, st.tsym, origin, bridges);
st = types.supertype(st);
}
... | [
"void",
"addBridges",
"(",
"DiagnosticPosition",
"pos",
",",
"ClassSymbol",
"origin",
",",
"ListBuffer",
"<",
"JCTree",
">",
"bridges",
")",
"{",
"Type",
"st",
"=",
"types",
".",
"supertype",
"(",
"origin",
".",
"type",
")",
";",
"while",
"(",
"st",
".",... | Add all necessary bridges to some class appending them to list buffer.
@param pos The source code position to be used for the bridges.
@param origin The class in which the bridges go.
@param bridges The list buffer to which the bridges are added. | [
"Add",
"all",
"necessary",
"bridges",
"to",
"some",
"class",
"appending",
"them",
"to",
"list",
"buffer",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/TransTypes.java#L464-L474 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/comp/TransTypes.java | TransTypes.visitTypeApply | public void visitTypeApply(JCTypeApply tree) {
JCTree clazz = translate(tree.clazz, null);
result = clazz;
} | java | public void visitTypeApply(JCTypeApply tree) {
JCTree clazz = translate(tree.clazz, null);
result = clazz;
} | [
"public",
"void",
"visitTypeApply",
"(",
"JCTypeApply",
"tree",
")",
"{",
"JCTree",
"clazz",
"=",
"translate",
"(",
"tree",
".",
"clazz",
",",
"null",
")",
";",
"result",
"=",
"clazz",
";",
"}"
] | Visitor method for parameterized types. | [
"Visitor",
"method",
"for",
"parameterized",
"types",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/TransTypes.java#L851-L854 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/comp/TransTypes.java | TransTypes.translateTopLevelClass | public JCTree translateTopLevelClass(JCTree cdef, TreeMaker make) {
// note that this method does NOT support recursion.
this.make = make;
pt = null;
return translate(cdef, null);
} | java | public JCTree translateTopLevelClass(JCTree cdef, TreeMaker make) {
// note that this method does NOT support recursion.
this.make = make;
pt = null;
return translate(cdef, null);
} | [
"public",
"JCTree",
"translateTopLevelClass",
"(",
"JCTree",
"cdef",
",",
"TreeMaker",
"make",
")",
"{",
"// note that this method does NOT support recursion.",
"this",
".",
"make",
"=",
"make",
";",
"pt",
"=",
"null",
";",
"return",
"translate",
"(",
"cdef",
",",... | Translate a toplevel class definition.
@param cdef The definition to be translated. | [
"Translate",
"a",
"toplevel",
"class",
"definition",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/TransTypes.java#L1031-L1036 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java | PackageIndexFrameWriter.addAllProfilesLink | protected void addAllProfilesLink(Content div) {
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
allprofilesLabel, "", "packageListFrame");
Content span = HtmlTree.SPAN(linkContent);
div.addContent(span);
} | java | protected void addAllProfilesLink(Content div) {
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
allprofilesLabel, "", "packageListFrame");
Content span = HtmlTree.SPAN(linkContent);
div.addContent(span);
} | [
"protected",
"void",
"addAllProfilesLink",
"(",
"Content",
"div",
")",
"{",
"Content",
"linkContent",
"=",
"getHyperLink",
"(",
"DocPaths",
".",
"PROFILE_OVERVIEW_FRAME",
",",
"allprofilesLabel",
",",
"\"\"",
",",
"\"packageListFrame\"",
")",
";",
"Content",
"span",... | Adds "All Profiles" link for the top of the left-hand frame page to the
documentation tree.
@param div the Content object to which the all profiles link should be added | [
"Adds",
"All",
"Profiles",
"link",
"for",
"the",
"top",
"of",
"the",
"left",
"-",
"hand",
"frame",
"page",
"to",
"the",
"documentation",
"tree",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java#L163-L168 | train |
petrbouda/joyrest | joyrest-core/src/main/java/org/joyrest/stream/BiStream.java | BiStream.throwIfNull | public BiStream<T, U> throwIfNull(BiPredicate<? super T, ? super U> biPredicate, Supplier<? extends RuntimeException> e) {
Predicate<T> predicate = (t) -> biPredicate.test(t, object);
return nonEmptyStream(stream.filter(predicate), e);
} | java | public BiStream<T, U> throwIfNull(BiPredicate<? super T, ? super U> biPredicate, Supplier<? extends RuntimeException> e) {
Predicate<T> predicate = (t) -> biPredicate.test(t, object);
return nonEmptyStream(stream.filter(predicate), e);
} | [
"public",
"BiStream",
"<",
"T",
",",
"U",
">",
"throwIfNull",
"(",
"BiPredicate",
"<",
"?",
"super",
"T",
",",
"?",
"super",
"U",
">",
"biPredicate",
",",
"Supplier",
"<",
"?",
"extends",
"RuntimeException",
">",
"e",
")",
"{",
"Predicate",
"<",
"T",
... | Compares the objects from stream to the injected object. If the rest of the stream equals null so exception is thrown.
@param biPredicate which compare objects from stream and injected object
@param e exception which will be thrown if the stream equals {@code null}
@return BiStream object | [
"Compares",
"the",
"objects",
"from",
"stream",
"to",
"the",
"injected",
"object",
".",
"If",
"the",
"rest",
"of",
"the",
"stream",
"equals",
"null",
"so",
"exception",
"is",
"thrown",
"."
] | 58903f06fb7f0b8fdf1ef91318fb48a88bf970e0 | https://github.com/petrbouda/joyrest/blob/58903f06fb7f0b8fdf1ef91318fb48a88bf970e0/joyrest-core/src/main/java/org/joyrest/stream/BiStream.java#L66-L69 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/doclint/Env.java | Env.setCurrent | void setCurrent(TreePath path, DocCommentTree comment) {
currPath = path;
currDocComment = comment;
currElement = trees.getElement(currPath);
currOverriddenMethods = ((JavacTypes) types).getOverriddenMethods(currElement);
AccessKind ak = AccessKind.PUBLIC;
for (TreePath ... | java | void setCurrent(TreePath path, DocCommentTree comment) {
currPath = path;
currDocComment = comment;
currElement = trees.getElement(currPath);
currOverriddenMethods = ((JavacTypes) types).getOverriddenMethods(currElement);
AccessKind ak = AccessKind.PUBLIC;
for (TreePath ... | [
"void",
"setCurrent",
"(",
"TreePath",
"path",
",",
"DocCommentTree",
"comment",
")",
"{",
"currPath",
"=",
"path",
";",
"currDocComment",
"=",
"comment",
";",
"currElement",
"=",
"trees",
".",
"getElement",
"(",
"currPath",
")",
";",
"currOverriddenMethods",
... | Set the current declaration and its doc comment. | [
"Set",
"the",
"current",
"declaration",
"and",
"its",
"doc",
"comment",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclint/Env.java#L151-L165 | train |
brianwhu/xillium | base/src/main/java/org/xillium/base/type/Flags.java | Flags.valueOf | public static <E extends Enum<E>> Flags<E> valueOf(Class<E> type, String values) {
Flags<E> flags = new Flags<E>(type);
for (String text : values.trim().split(MULTI_VALUE_SEPARATOR)) {
flags.set(Enum.valueOf(type, text));
}
return flags;
} | java | public static <E extends Enum<E>> Flags<E> valueOf(Class<E> type, String values) {
Flags<E> flags = new Flags<E>(type);
for (String text : values.trim().split(MULTI_VALUE_SEPARATOR)) {
flags.set(Enum.valueOf(type, text));
}
return flags;
} | [
"public",
"static",
"<",
"E",
"extends",
"Enum",
"<",
"E",
">",
">",
"Flags",
"<",
"E",
">",
"valueOf",
"(",
"Class",
"<",
"E",
">",
"type",
",",
"String",
"values",
")",
"{",
"Flags",
"<",
"E",
">",
"flags",
"=",
"new",
"Flags",
"<",
"E",
">",... | Returns a Flags with a value represented by a string of concatenated enum literal names
separated by any combination of a comma, a colon, or a white space.
@param <E> the enum type argument associated with the Flags
@param type the enum class associated with the Flags
@param values a string representation of enum cons... | [
"Returns",
"a",
"Flags",
"with",
"a",
"value",
"represented",
"by",
"a",
"string",
"of",
"concatenated",
"enum",
"literal",
"names",
"separated",
"by",
"any",
"combination",
"of",
"a",
"comma",
"a",
"colon",
"or",
"a",
"white",
"space",
"."
] | e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799 | https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/base/src/main/java/org/xillium/base/type/Flags.java#L109-L115 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java | ProfilePackageFrameWriter.generate | public static void generate(ConfigurationImpl configuration,
PackageDoc packageDoc, int profileValue) {
ProfilePackageFrameWriter profpackgen;
try {
String profileName = Profile.lookup(profileValue).name;
profpackgen = new ProfilePackageFrameWriter(configuration, pack... | java | public static void generate(ConfigurationImpl configuration,
PackageDoc packageDoc, int profileValue) {
ProfilePackageFrameWriter profpackgen;
try {
String profileName = Profile.lookup(profileValue).name;
profpackgen = new ProfilePackageFrameWriter(configuration, pack... | [
"public",
"static",
"void",
"generate",
"(",
"ConfigurationImpl",
"configuration",
",",
"PackageDoc",
"packageDoc",
",",
"int",
"profileValue",
")",
"{",
"ProfilePackageFrameWriter",
"profpackgen",
";",
"try",
"{",
"String",
"profileName",
"=",
"Profile",
".",
"look... | Generate a profile package summary page for the left-hand bottom frame. Construct
the ProfilePackageFrameWriter object and then uses it generate the file.
@param configuration the current configuration of the doclet.
@param packageDoc The package for which "profilename-package-frame.html" is to be generated.
@param pr... | [
"Generate",
"a",
"profile",
"package",
"summary",
"page",
"for",
"the",
"left",
"-",
"hand",
"bottom",
"frame",
".",
"Construct",
"the",
"ProfilePackageFrameWriter",
"object",
"and",
"then",
"uses",
"it",
"generate",
"the",
"file",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java#L84-L120 | train |
scravy/java-pair | src/main/java/de/scravy/pair/Pairs.java | Pairs.from | public static <First, Second> Pair<First, Second> from(
final First first, final Second second) {
return new ImmutablePair<First, Second>(first, second);
} | java | public static <First, Second> Pair<First, Second> from(
final First first, final Second second) {
return new ImmutablePair<First, Second>(first, second);
} | [
"public",
"static",
"<",
"First",
",",
"Second",
">",
"Pair",
"<",
"First",
",",
"Second",
">",
"from",
"(",
"final",
"First",
"first",
",",
"final",
"Second",
"second",
")",
"{",
"return",
"new",
"ImmutablePair",
"<",
"First",
",",
"Second",
">",
"(",... | Create a simple pair from it's first and second component.
@since 1.0.0
@param first
The first (left) component.
@param second
The second (right) component.
@return A pair consisting of the two components. | [
"Create",
"a",
"simple",
"pair",
"from",
"it",
"s",
"first",
"and",
"second",
"component",
"."
] | d8792e86c4f8e977826a4ccb940e4416a1119ccb | https://github.com/scravy/java-pair/blob/d8792e86c4f8e977826a4ccb940e4416a1119ccb/src/main/java/de/scravy/pair/Pairs.java#L31-L34 | train |
scravy/java-pair | src/main/java/de/scravy/pair/Pairs.java | Pairs.toArray | public static <CommonSuperType, First extends CommonSuperType, Second extends CommonSuperType>
CommonSuperType[] toArray(final Pair<First, Second> pair,
final Class<CommonSuperType> commonSuperType) {
@SuppressWarnings("unchecked")
final CommonSuperType[] array = (CommonSuperType[]) Array.newIns... | java | public static <CommonSuperType, First extends CommonSuperType, Second extends CommonSuperType>
CommonSuperType[] toArray(final Pair<First, Second> pair,
final Class<CommonSuperType> commonSuperType) {
@SuppressWarnings("unchecked")
final CommonSuperType[] array = (CommonSuperType[]) Array.newIns... | [
"public",
"static",
"<",
"CommonSuperType",
",",
"First",
"extends",
"CommonSuperType",
",",
"Second",
"extends",
"CommonSuperType",
">",
"CommonSuperType",
"[",
"]",
"toArray",
"(",
"final",
"Pair",
"<",
"First",
",",
"Second",
">",
"pair",
",",
"final",
"Cla... | Transform a pair into an array of the common super type of both components.
@param pair
The pair.
@param commonSuperType
A common super type that both First and Second inherit from.
@return The array of the common super type with length 2. | [
"Transform",
"a",
"pair",
"into",
"an",
"array",
"of",
"the",
"common",
"super",
"type",
"of",
"both",
"components",
"."
] | d8792e86c4f8e977826a4ccb940e4416a1119ccb | https://github.com/scravy/java-pair/blob/d8792e86c4f8e977826a4ccb940e4416a1119ccb/src/main/java/de/scravy/pair/Pairs.java#L97-L104 | train |
scravy/java-pair | src/main/java/de/scravy/pair/Pairs.java | Pairs.toArray | public static <CommonSuperType, First extends CommonSuperType, Second extends CommonSuperType>
CommonSuperType[] toArray(
final Pair<First, Second> pair,
final CommonSuperType[] target, final int offset) {
target[offset] = pair.getFirst();
target[offset + 1] = pair.getSecond();
ret... | java | public static <CommonSuperType, First extends CommonSuperType, Second extends CommonSuperType>
CommonSuperType[] toArray(
final Pair<First, Second> pair,
final CommonSuperType[] target, final int offset) {
target[offset] = pair.getFirst();
target[offset + 1] = pair.getSecond();
ret... | [
"public",
"static",
"<",
"CommonSuperType",
",",
"First",
"extends",
"CommonSuperType",
",",
"Second",
"extends",
"CommonSuperType",
">",
"CommonSuperType",
"[",
"]",
"toArray",
"(",
"final",
"Pair",
"<",
"First",
",",
"Second",
">",
"pair",
",",
"final",
"Com... | Write a pair into an array of the common super type of both components.
@since 1.0.0
@param pair
The pair.
@return The array of the common super type with length 2. | [
"Write",
"a",
"pair",
"into",
"an",
"array",
"of",
"the",
"common",
"super",
"type",
"of",
"both",
"components",
"."
] | d8792e86c4f8e977826a4ccb940e4416a1119ccb | https://github.com/scravy/java-pair/blob/d8792e86c4f8e977826a4ccb940e4416a1119ccb/src/main/java/de/scravy/pair/Pairs.java#L115-L122 | train |
brianwhu/xillium | core/src/main/java/org/xillium/core/ExtendableService.java | ExtendableService.setFilter | @Override
public void setFilter(Service.Filter filter) {
_filter = _filter == null ? filter : new CompoundServiceFilter(filter, _filter);
} | java | @Override
public void setFilter(Service.Filter filter) {
_filter = _filter == null ? filter : new CompoundServiceFilter(filter, _filter);
} | [
"@",
"Override",
"public",
"void",
"setFilter",
"(",
"Service",
".",
"Filter",
"filter",
")",
"{",
"_filter",
"=",
"_filter",
"==",
"null",
"?",
"filter",
":",
"new",
"CompoundServiceFilter",
"(",
"filter",
",",
"_filter",
")",
";",
"}"
] | Installs a service filter. | [
"Installs",
"a",
"service",
"filter",
"."
] | e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799 | https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/core/src/main/java/org/xillium/core/ExtendableService.java#L20-L23 | train |
brianwhu/xillium | core/src/main/java/org/xillium/core/ExtendableService.java | ExtendableService.setFilters | public void setFilters(List<Service.Filter> filters) {
for (Service.Filter filter: filters) setFilter(filter);
} | java | public void setFilters(List<Service.Filter> filters) {
for (Service.Filter filter: filters) setFilter(filter);
} | [
"public",
"void",
"setFilters",
"(",
"List",
"<",
"Service",
".",
"Filter",
">",
"filters",
")",
"{",
"for",
"(",
"Service",
".",
"Filter",
"filter",
":",
"filters",
")",
"setFilter",
"(",
"filter",
")",
";",
"}"
] | Installs a list of service filters. This method is designed to facilitate Spring bean assembly. | [
"Installs",
"a",
"list",
"of",
"service",
"filters",
".",
"This",
"method",
"is",
"designed",
"to",
"facilitate",
"Spring",
"bean",
"assembly",
"."
] | e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799 | https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/core/src/main/java/org/xillium/core/ExtendableService.java#L28-L30 | train |
mcpat/microjiac-public | extensions/microjiac-interaction/src/newimpl/java/de/jiac/micro/ips/InteractionManager.java | InteractionManager.findContext | private Interaction findContext(String id) {
for(int i= _currentInteractions.size() - 1; i >= 0; i--) {
Interaction ia= (Interaction) _currentInteractions.get(i);
if(ia.id.equals(id)) {
return ia;
}
}
return null;
} | java | private Interaction findContext(String id) {
for(int i= _currentInteractions.size() - 1; i >= 0; i--) {
Interaction ia= (Interaction) _currentInteractions.get(i);
if(ia.id.equals(id)) {
return ia;
}
}
return null;
} | [
"private",
"Interaction",
"findContext",
"(",
"String",
"id",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"_currentInteractions",
".",
"size",
"(",
")",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"Interaction",
"ia",
"=",
"(",
"Interaction",... | Caller must hold lock on interactions | [
"Caller",
"must",
"hold",
"lock",
"on",
"interactions"
] | 3c649e44846981a68e84cc4578719532414d8d35 | https://github.com/mcpat/microjiac-public/blob/3c649e44846981a68e84cc4578719532414d8d35/extensions/microjiac-interaction/src/newimpl/java/de/jiac/micro/ips/InteractionManager.java#L123-L132 | train |
coopernurse/barrister-java | src/main/java/com/bitmechanic/barrister/Batch.java | Batch.request | public List<RpcResponse> request(List<RpcRequest> reqList) {
for (RpcRequest req : reqList) {
this.reqList.add(req);
}
return null;
} | java | public List<RpcResponse> request(List<RpcRequest> reqList) {
for (RpcRequest req : reqList) {
this.reqList.add(req);
}
return null;
} | [
"public",
"List",
"<",
"RpcResponse",
">",
"request",
"(",
"List",
"<",
"RpcRequest",
">",
"reqList",
")",
"{",
"for",
"(",
"RpcRequest",
"req",
":",
"reqList",
")",
"{",
"this",
".",
"reqList",
".",
"add",
"(",
"req",
")",
";",
"}",
"return",
"null"... | Adds all requests in reqList to internal request list
@param reqList Requests to add to call batch
@return Always returns null
@throws IllegalStateException if batch has already been sent | [
"Adds",
"all",
"requests",
"in",
"reqList",
"to",
"internal",
"request",
"list"
] | c2b639634c88a25002b66d1fb4a8f5fb51ade6a2 | https://github.com/coopernurse/barrister-java/blob/c2b639634c88a25002b66d1fb4a8f5fb51ade6a2/src/main/java/com/bitmechanic/barrister/Batch.java#L56-L62 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/code/Kinds.java | Kinds.kindName | public static KindName kindName(int kind) {
switch (kind) {
case PCK: return KindName.PACKAGE;
case TYP: return KindName.CLASS;
case VAR: return KindName.VAR;
case VAL: return KindName.VAL;
case MTH: return KindName.METHOD;
default : throw new AssertionError("... | java | public static KindName kindName(int kind) {
switch (kind) {
case PCK: return KindName.PACKAGE;
case TYP: return KindName.CLASS;
case VAR: return KindName.VAR;
case VAL: return KindName.VAL;
case MTH: return KindName.METHOD;
default : throw new AssertionError("... | [
"public",
"static",
"KindName",
"kindName",
"(",
"int",
"kind",
")",
"{",
"switch",
"(",
"kind",
")",
"{",
"case",
"PCK",
":",
"return",
"KindName",
".",
"PACKAGE",
";",
"case",
"TYP",
":",
"return",
"KindName",
".",
"CLASS",
";",
"case",
"VAR",
":",
... | A KindName representing a given symbol kind | [
"A",
"KindName",
"representing",
"a",
"given",
"symbol",
"kind"
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/code/Kinds.java#L140-L149 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javac/code/Kinds.java | Kinds.absentKind | public static KindName absentKind(int kind) {
switch (kind) {
case ABSENT_VAR:
return KindName.VAR;
case WRONG_MTHS: case WRONG_MTH: case ABSENT_MTH: case WRONG_STATICNESS:
return KindName.METHOD;
case ABSENT_TYP:
return KindName.CLASS;
default... | java | public static KindName absentKind(int kind) {
switch (kind) {
case ABSENT_VAR:
return KindName.VAR;
case WRONG_MTHS: case WRONG_MTH: case ABSENT_MTH: case WRONG_STATICNESS:
return KindName.METHOD;
case ABSENT_TYP:
return KindName.CLASS;
default... | [
"public",
"static",
"KindName",
"absentKind",
"(",
"int",
"kind",
")",
"{",
"switch",
"(",
"kind",
")",
"{",
"case",
"ABSENT_VAR",
":",
"return",
"KindName",
".",
"VAR",
";",
"case",
"WRONG_MTHS",
":",
"case",
"WRONG_MTH",
":",
"case",
"ABSENT_MTH",
":",
... | A KindName representing the kind of a missing symbol, given an
error kind. | [
"A",
"KindName",
"representing",
"the",
"kind",
"of",
"a",
"missing",
"symbol",
"given",
"an",
"error",
"kind",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/code/Kinds.java#L238-L249 | train |
phax/ph-masterdata | ph-masterdata/src/main/java/com/helger/masterdata/swift/IBANCountryData.java | IBANCountryData.parseToElementValues | @Nonnull
@ReturnsMutableCopy
public ICommonsList <IBANElementValue> parseToElementValues (@Nonnull final String sIBAN)
{
ValueEnforcer.notNull (sIBAN, "IBANString");
final String sRealIBAN = IBANManager.unifyIBAN (sIBAN);
if (sRealIBAN.length () != m_nExpectedLength)
throw new IllegalArgumentEx... | java | @Nonnull
@ReturnsMutableCopy
public ICommonsList <IBANElementValue> parseToElementValues (@Nonnull final String sIBAN)
{
ValueEnforcer.notNull (sIBAN, "IBANString");
final String sRealIBAN = IBANManager.unifyIBAN (sIBAN);
if (sRealIBAN.length () != m_nExpectedLength)
throw new IllegalArgumentEx... | [
"@",
"Nonnull",
"@",
"ReturnsMutableCopy",
"public",
"ICommonsList",
"<",
"IBANElementValue",
">",
"parseToElementValues",
"(",
"@",
"Nonnull",
"final",
"String",
"sIBAN",
")",
"{",
"ValueEnforcer",
".",
"notNull",
"(",
"sIBAN",
",",
"\"IBANString\"",
")",
";",
... | Parse a given IBAN number string and convert it to elements according to
this country's definition of IBAN numbers.
@param sIBAN
The IBAN number string to parse. May not be <code>null</code>.
@return The list of parsed elements. | [
"Parse",
"a",
"given",
"IBAN",
"number",
"string",
"and",
"convert",
"it",
"to",
"elements",
"according",
"to",
"this",
"country",
"s",
"definition",
"of",
"IBAN",
"numbers",
"."
] | ca5e0b03c735b30b47930c018bfb5e71f00d0ff4 | https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/swift/IBANCountryData.java#L167-L189 | train |
phax/ph-masterdata | ph-masterdata/src/main/java/com/helger/masterdata/swift/IBANCountryData.java | IBANCountryData.createFromString | @Nonnull
public static IBANCountryData createFromString (@Nonnull @Nonempty final String sCountryCode,
@Nonnegative final int nExpectedLength,
@Nullable final String sLayout,
... | java | @Nonnull
public static IBANCountryData createFromString (@Nonnull @Nonempty final String sCountryCode,
@Nonnegative final int nExpectedLength,
@Nullable final String sLayout,
... | [
"@",
"Nonnull",
"public",
"static",
"IBANCountryData",
"createFromString",
"(",
"@",
"Nonnull",
"@",
"Nonempty",
"final",
"String",
"sCountryCode",
",",
"@",
"Nonnegative",
"final",
"int",
"nExpectedLength",
",",
"@",
"Nullable",
"final",
"String",
"sLayout",
",",... | This method is used to create an instance of this class from a string
representation.
@param sCountryCode
Country code to use. Neither <code>null</code> nor empty.
@param nExpectedLength
The expected length having only validation purpose.
@param sLayout
<code>null</code> or the layout descriptor
@param sFixedCheckDigi... | [
"This",
"method",
"is",
"used",
"to",
"create",
"an",
"instance",
"of",
"this",
"class",
"from",
"a",
"string",
"representation",
"."
] | ca5e0b03c735b30b47930c018bfb5e71f00d0ff4 | https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/swift/IBANCountryData.java#L319-L345 | train |
petrbouda/joyrest | joyrest-core/src/main/java/org/joyrest/routing/AbstractControllerConfiguration.java | AbstractControllerConfiguration.setControllerPath | protected final void setControllerPath(String path) {
requireNonNull(path, "Global path cannot be change to 'null'");
if (!"".equals(path) && !"/".equals(path)) {
this.controllerPath = pathCorrector.apply(path);
}
} | java | protected final void setControllerPath(String path) {
requireNonNull(path, "Global path cannot be change to 'null'");
if (!"".equals(path) && !"/".equals(path)) {
this.controllerPath = pathCorrector.apply(path);
}
} | [
"protected",
"final",
"void",
"setControllerPath",
"(",
"String",
"path",
")",
"{",
"requireNonNull",
"(",
"path",
",",
"\"Global path cannot be change to 'null'\"",
")",
";",
"if",
"(",
"!",
"\"\"",
".",
"equals",
"(",
"path",
")",
"&&",
"!",
"\"/\"",
".",
... | Creates a resource part of the path unified for all routes defined in the inherited class
@param path resource path of all defined class
@throws NullPointerException whether {@code path} is {@code null} | [
"Creates",
"a",
"resource",
"part",
"of",
"the",
"path",
"unified",
"for",
"all",
"routes",
"defined",
"in",
"the",
"inherited",
"class"
] | 58903f06fb7f0b8fdf1ef91318fb48a88bf970e0 | https://github.com/petrbouda/joyrest/blob/58903f06fb7f0b8fdf1ef91318fb48a88bf970e0/joyrest-core/src/main/java/org/joyrest/routing/AbstractControllerConfiguration.java#L95-L101 | train |
arakelian/more-commons | src/main/java/com/arakelian/core/utils/AbstractClassScanner.java | AbstractClassScanner.scan | public void scan(final String[] packages) {
LOGGER.info("Scanning packages {}:", ArrayUtils.toString(packages));
for (final String pkg : packages) {
try {
final String pkgFile = pkg.replace('.', '/');
final Enumeration<URL> urls = getRootClassloader().getResou... | java | public void scan(final String[] packages) {
LOGGER.info("Scanning packages {}:", ArrayUtils.toString(packages));
for (final String pkg : packages) {
try {
final String pkgFile = pkg.replace('.', '/');
final Enumeration<URL> urls = getRootClassloader().getResou... | [
"public",
"void",
"scan",
"(",
"final",
"String",
"[",
"]",
"packages",
")",
"{",
"LOGGER",
".",
"info",
"(",
"\"Scanning packages {}:\"",
",",
"ArrayUtils",
".",
"toString",
"(",
"packages",
")",
")",
";",
"for",
"(",
"final",
"String",
"pkg",
":",
"pac... | Scans packages for matching Java classes.
@param packages
An array of packages to search. | [
"Scans",
"packages",
"for",
"matching",
"Java",
"classes",
"."
] | 83c607044f64a7f6c005a67866c0ef7cb68d6e29 | https://github.com/arakelian/more-commons/blob/83c607044f64a7f6c005a67866c0ef7cb68d6e29/src/main/java/com/arakelian/core/utils/AbstractClassScanner.java#L309-L334 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/javap/JavapTask.java | JavapTask.run | int run(String[] args) {
try {
handleOptions(args);
// the following gives consistent behavior with javac
if (classes == null || classes.size() == 0) {
if (options.help || options.version || options.fullVersion)
return EXIT_OK;
... | java | int run(String[] args) {
try {
handleOptions(args);
// the following gives consistent behavior with javac
if (classes == null || classes.size() == 0) {
if (options.help || options.version || options.fullVersion)
return EXIT_OK;
... | [
"int",
"run",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"try",
"{",
"handleOptions",
"(",
"args",
")",
";",
"// the following gives consistent behavior with javac",
"if",
"(",
"classes",
"==",
"null",
"||",
"classes",
".",
"size",
"(",
")",
"==",
"0",
")"... | Compiler terminated abnormally | [
"Compiler",
"terminated",
"abnormally"
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javap/JavapTask.java#L410-L454 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MetaKeywords.java | MetaKeywords.getMetaKeywords | public String[] getMetaKeywords(Profile profile) {
if( configuration.keywords ) {
String profileName = profile.name;
return new String[] { profileName + " " + "profile" };
} else {
return new String[] {};
}
} | java | public String[] getMetaKeywords(Profile profile) {
if( configuration.keywords ) {
String profileName = profile.name;
return new String[] { profileName + " " + "profile" };
} else {
return new String[] {};
}
} | [
"public",
"String",
"[",
"]",
"getMetaKeywords",
"(",
"Profile",
"profile",
")",
"{",
"if",
"(",
"configuration",
".",
"keywords",
")",
"{",
"String",
"profileName",
"=",
"profile",
".",
"name",
";",
"return",
"new",
"String",
"[",
"]",
"{",
"profileName",... | Get the profile keywords.
@param profile the profile being documented | [
"Get",
"the",
"profile",
"keywords",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MetaKeywords.java#L113-L120 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/source/util/TreeScanner.java | TreeScanner.scan | public R scan(Tree node, P p) {
return (node == null) ? null : node.accept(this, p);
} | java | public R scan(Tree node, P p) {
return (node == null) ? null : node.accept(this, p);
} | [
"public",
"R",
"scan",
"(",
"Tree",
"node",
",",
"P",
"p",
")",
"{",
"return",
"(",
"node",
"==",
"null",
")",
"?",
"null",
":",
"node",
".",
"accept",
"(",
"this",
",",
"p",
")",
";",
"}"
] | Scan a single node. | [
"Scan",
"a",
"single",
"node",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/source/util/TreeScanner.java#L76-L78 | train |
brianwhu/xillium | gear/src/main/java/org/xillium/gear/auth/ClientAddressAuthorizer.java | ClientAddressAuthorizer.setAuthorizedPatternArray | public void setAuthorizedPatternArray(String[] patterns) {
Matcher matcher;
patterns: for (String pattern: patterns) {
if ((matcher = IPv4_ADDRESS_PATTERN.matcher(pattern)).matches()) {
short[] address = new short[4];
for (int i = 0; i < address.length; ++i) ... | java | public void setAuthorizedPatternArray(String[] patterns) {
Matcher matcher;
patterns: for (String pattern: patterns) {
if ((matcher = IPv4_ADDRESS_PATTERN.matcher(pattern)).matches()) {
short[] address = new short[4];
for (int i = 0; i < address.length; ++i) ... | [
"public",
"void",
"setAuthorizedPatternArray",
"(",
"String",
"[",
"]",
"patterns",
")",
"{",
"Matcher",
"matcher",
";",
"patterns",
":",
"for",
"(",
"String",
"pattern",
":",
"patterns",
")",
"{",
"if",
"(",
"(",
"matcher",
"=",
"IPv4_ADDRESS_PATTERN",
".",... | Adds authorized address patterns as a String array. | [
"Adds",
"authorized",
"address",
"patterns",
"as",
"a",
"String",
"array",
"."
] | e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799 | https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/gear/src/main/java/org/xillium/gear/auth/ClientAddressAuthorizer.java#L81-L130 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.findJavaSourceFiles | private boolean findJavaSourceFiles(String[] args) {
String prev = "";
for (String s : args) {
if (s.endsWith(".java") && !prev.equals("-xf") && !prev.equals("-if")) {
return true;
}
prev = s;
}
return false;
} | java | private boolean findJavaSourceFiles(String[] args) {
String prev = "";
for (String s : args) {
if (s.endsWith(".java") && !prev.equals("-xf") && !prev.equals("-if")) {
return true;
}
prev = s;
}
return false;
} | [
"private",
"boolean",
"findJavaSourceFiles",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"String",
"prev",
"=",
"\"\"",
";",
"for",
"(",
"String",
"s",
":",
"args",
")",
"{",
"if",
"(",
"s",
".",
"endsWith",
"(",
"\".java\"",
")",
"&&",
"!",
"prev",
... | Are java source files passed on the command line? | [
"Are",
"java",
"source",
"files",
"passed",
"on",
"the",
"command",
"line?"
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L357-L366 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.findAtFile | private boolean findAtFile(String[] args) {
for (String s : args) {
if (s.startsWith("@")) {
return true;
}
}
return false;
} | java | private boolean findAtFile(String[] args) {
for (String s : args) {
if (s.startsWith("@")) {
return true;
}
}
return false;
} | [
"private",
"boolean",
"findAtFile",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"for",
"(",
"String",
"s",
":",
"args",
")",
"{",
"if",
"(",
"s",
".",
"startsWith",
"(",
"\"@\"",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
"... | Is an at file passed on the command line? | [
"Is",
"an",
"at",
"file",
"passed",
"on",
"the",
"command",
"line?"
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L371-L378 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.findLogLevel | private String findLogLevel(String[] args) {
for (String s : args) {
if (s.startsWith("--log=") && s.length()>6) {
return s.substring(6);
}
if (s.equals("-verbose")) {
return "info";
}
}
return "info";
} | java | private String findLogLevel(String[] args) {
for (String s : args) {
if (s.startsWith("--log=") && s.length()>6) {
return s.substring(6);
}
if (s.equals("-verbose")) {
return "info";
}
}
return "info";
} | [
"private",
"String",
"findLogLevel",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"for",
"(",
"String",
"s",
":",
"args",
")",
"{",
"if",
"(",
"s",
".",
"startsWith",
"(",
"\"--log=\"",
")",
"&&",
"s",
".",
"length",
"(",
")",
">",
"6",
")",
"{",
... | Find the log level setting. | [
"Find",
"the",
"log",
"level",
"setting",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L383-L393 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.makeSureExists | private static boolean makeSureExists(File dir) {
// Make sure the dest directories exist.
if (!dir.exists()) {
if (!dir.mkdirs()) {
Log.error("Could not create the directory "+dir.getPath());
return false;
}
}
return true;
} | java | private static boolean makeSureExists(File dir) {
// Make sure the dest directories exist.
if (!dir.exists()) {
if (!dir.mkdirs()) {
Log.error("Could not create the directory "+dir.getPath());
return false;
}
}
return true;
} | [
"private",
"static",
"boolean",
"makeSureExists",
"(",
"File",
"dir",
")",
"{",
"// Make sure the dest directories exist.",
"if",
"(",
"!",
"dir",
".",
"exists",
"(",
")",
")",
"{",
"if",
"(",
"!",
"dir",
".",
"mkdirs",
"(",
")",
")",
"{",
"Log",
".",
... | Make sure directory exist, create it if not. | [
"Make",
"sure",
"directory",
"exist",
"create",
"it",
"if",
"not",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L484-L493 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.checkPattern | private static void checkPattern(String s) throws ProblemException {
// Package names like foo.bar.gamma are allowed, and
// package names suffixed with .* like foo.bar.* are
// also allowed.
Pattern p = Pattern.compile("[a-zA-Z_]{1}[a-zA-Z0-9_]*(\\.[a-zA-Z_]{1}[a-zA-Z0-9_]*)*(\\.\\*)?+"... | java | private static void checkPattern(String s) throws ProblemException {
// Package names like foo.bar.gamma are allowed, and
// package names suffixed with .* like foo.bar.* are
// also allowed.
Pattern p = Pattern.compile("[a-zA-Z_]{1}[a-zA-Z0-9_]*(\\.[a-zA-Z_]{1}[a-zA-Z0-9_]*)*(\\.\\*)?+"... | [
"private",
"static",
"void",
"checkPattern",
"(",
"String",
"s",
")",
"throws",
"ProblemException",
"{",
"// Package names like foo.bar.gamma are allowed, and",
"// package names suffixed with .* like foo.bar.* are",
"// also allowed.",
"Pattern",
"p",
"=",
"Pattern",
".",
"com... | Verify that a package pattern is valid. | [
"Verify",
"that",
"a",
"package",
"pattern",
"is",
"valid",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L498-L507 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.checkFilePattern | private static void checkFilePattern(String s) throws ProblemException {
// File names like foo/bar/gamma/Bar.java are allowed,
// as well as /bar/jndi.properties as well as,
// */bar/Foo.java
Pattern p = null;
if (File.separatorChar == '\\') {
p = Pattern.compile("\\... | java | private static void checkFilePattern(String s) throws ProblemException {
// File names like foo/bar/gamma/Bar.java are allowed,
// as well as /bar/jndi.properties as well as,
// */bar/Foo.java
Pattern p = null;
if (File.separatorChar == '\\') {
p = Pattern.compile("\\... | [
"private",
"static",
"void",
"checkFilePattern",
"(",
"String",
"s",
")",
"throws",
"ProblemException",
"{",
"// File names like foo/bar/gamma/Bar.java are allowed,",
"// as well as /bar/jndi.properties as well as,",
"// */bar/Foo.java",
"Pattern",
"p",
"=",
"null",
";",
"if",
... | Verify that a source file name is valid. | [
"Verify",
"that",
"a",
"source",
"file",
"name",
"is",
"valid",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L542-L560 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.hasOption | private static boolean hasOption(String[] args, String option) {
for (String a : args) {
if (a.equals(option)) return true;
}
return false;
} | java | private static boolean hasOption(String[] args, String option) {
for (String a : args) {
if (a.equals(option)) return true;
}
return false;
} | [
"private",
"static",
"boolean",
"hasOption",
"(",
"String",
"[",
"]",
"args",
",",
"String",
"option",
")",
"{",
"for",
"(",
"String",
"a",
":",
"args",
")",
"{",
"if",
"(",
"a",
".",
"equals",
"(",
"option",
")",
")",
"return",
"true",
";",
"}",
... | Scan the arguments to find an option is used. | [
"Scan",
"the",
"arguments",
"to",
"find",
"an",
"option",
"is",
"used",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L565-L570 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.rewriteOptions | private static void rewriteOptions(String[] args, String option, String new_option) {
for (int i=0; i<args.length; ++i) {
if (args[i].equals(option)) {
args[i] = new_option;
}
}
} | java | private static void rewriteOptions(String[] args, String option, String new_option) {
for (int i=0; i<args.length; ++i) {
if (args[i].equals(option)) {
args[i] = new_option;
}
}
} | [
"private",
"static",
"void",
"rewriteOptions",
"(",
"String",
"[",
"]",
"args",
",",
"String",
"option",
",",
"String",
"new_option",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"args",
".",
"length",
";",
"++",
"i",
")",
"{",
"if",
... | Rewrite a single option into something else. | [
"Rewrite",
"a",
"single",
"option",
"into",
"something",
"else",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L603-L609 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.findDirectoryOption | private static File findDirectoryOption(String[] args, String option, String name, boolean needed, boolean allow_dups, boolean create)
throws ProblemException, ProblemException {
File dir = null;
for (int i = 0; i<args.length; ++i) {
if (args[i].equals(option)) {
if (... | java | private static File findDirectoryOption(String[] args, String option, String name, boolean needed, boolean allow_dups, boolean create)
throws ProblemException, ProblemException {
File dir = null;
for (int i = 0; i<args.length; ++i) {
if (args[i].equals(option)) {
if (... | [
"private",
"static",
"File",
"findDirectoryOption",
"(",
"String",
"[",
"]",
"args",
",",
"String",
"option",
",",
"String",
"name",
",",
"boolean",
"needed",
",",
"boolean",
"allow_dups",
",",
"boolean",
"create",
")",
"throws",
"ProblemException",
",",
"Prob... | Scan the arguments to find an option that specifies a directory.
Create the directory if necessary. | [
"Scan",
"the",
"arguments",
"to",
"find",
"an",
"option",
"that",
"specifies",
"a",
"directory",
".",
"Create",
"the",
"directory",
"if",
"necessary",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L615-L653 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.shouldBeFollowedByPath | private static boolean shouldBeFollowedByPath(String o) {
return o.equals("-s") ||
o.equals("-h") ||
o.equals("-d") ||
o.equals("-sourcepath") ||
o.equals("-classpath") ||
o.equals("-cp") ||
o.equals("-bootclasspath") ||
... | java | private static boolean shouldBeFollowedByPath(String o) {
return o.equals("-s") ||
o.equals("-h") ||
o.equals("-d") ||
o.equals("-sourcepath") ||
o.equals("-classpath") ||
o.equals("-cp") ||
o.equals("-bootclasspath") ||
... | [
"private",
"static",
"boolean",
"shouldBeFollowedByPath",
"(",
"String",
"o",
")",
"{",
"return",
"o",
".",
"equals",
"(",
"\"-s\"",
")",
"||",
"o",
".",
"equals",
"(",
"\"-h\"",
")",
"||",
"o",
".",
"equals",
"(",
"\"-d\"",
")",
"||",
"o",
".",
"equ... | Option is followed by path. | [
"Option",
"is",
"followed",
"by",
"path",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L658-L667 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.addSrcBeforeDirectories | private static String[] addSrcBeforeDirectories(String[] args) {
List<String> newargs = new ArrayList<String>();
for (int i = 0; i<args.length; ++i) {
File dir = new File(args[i]);
if (dir.exists() && dir.isDirectory()) {
if (i == 0 || !shouldBeFollowedByPath(args... | java | private static String[] addSrcBeforeDirectories(String[] args) {
List<String> newargs = new ArrayList<String>();
for (int i = 0; i<args.length; ++i) {
File dir = new File(args[i]);
if (dir.exists() && dir.isDirectory()) {
if (i == 0 || !shouldBeFollowedByPath(args... | [
"private",
"static",
"String",
"[",
"]",
"addSrcBeforeDirectories",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"List",
"<",
"String",
">",
"newargs",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
... | Add -src before source root directories if not already there. | [
"Add",
"-",
"src",
"before",
"source",
"root",
"directories",
"if",
"not",
"already",
"there",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L672-L684 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.checkSrcOption | private static void checkSrcOption(String[] args)
throws ProblemException {
Set<File> dirs = new HashSet<File>();
for (int i = 0; i<args.length; ++i) {
if (args[i].equals("-src")) {
if (i+1 >= args.length) {
throw new ProblemException("You have to ... | java | private static void checkSrcOption(String[] args)
throws ProblemException {
Set<File> dirs = new HashSet<File>();
for (int i = 0; i<args.length; ++i) {
if (args[i].equals("-src")) {
if (i+1 >= args.length) {
throw new ProblemException("You have to ... | [
"private",
"static",
"void",
"checkSrcOption",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"ProblemException",
"{",
"Set",
"<",
"File",
">",
"dirs",
"=",
"new",
"HashSet",
"<",
"File",
">",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
... | Check the -src options. | [
"Check",
"the",
"-",
"src",
"options",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L689-L716 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.findFileOption | private static File findFileOption(String[] args, String option, String name, boolean needed)
throws ProblemException, ProblemException {
File file = null;
for (int i = 0; i<args.length; ++i) {
if (args[i].equals(option)) {
if (file != null) {
thro... | java | private static File findFileOption(String[] args, String option, String name, boolean needed)
throws ProblemException, ProblemException {
File file = null;
for (int i = 0; i<args.length; ++i) {
if (args[i].equals(option)) {
if (file != null) {
thro... | [
"private",
"static",
"File",
"findFileOption",
"(",
"String",
"[",
"]",
"args",
",",
"String",
"option",
",",
"String",
"name",
",",
"boolean",
"needed",
")",
"throws",
"ProblemException",
",",
"ProblemException",
"{",
"File",
"file",
"=",
"null",
";",
"for"... | Scan the arguments to find an option that specifies a file. | [
"Scan",
"the",
"arguments",
"to",
"find",
"an",
"option",
"that",
"specifies",
"a",
"file",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L721-L746 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.findBooleanOption | public static boolean findBooleanOption(String[] args, String option) {
for (int i = 0; i<args.length; ++i) {
if (args[i].equals(option)) return true;
}
return false;
} | java | public static boolean findBooleanOption(String[] args, String option) {
for (int i = 0; i<args.length; ++i) {
if (args[i].equals(option)) return true;
}
return false;
} | [
"public",
"static",
"boolean",
"findBooleanOption",
"(",
"String",
"[",
"]",
"args",
",",
"String",
"option",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"args",
".",
"length",
";",
"++",
"i",
")",
"{",
"if",
"(",
"args",
"[",
"i",... | Look for a specific switch, return true if found. | [
"Look",
"for",
"a",
"specific",
"switch",
"return",
"true",
"if",
"found",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L751-L756 | train |
wmdietl/jsr308-langtools | src/share/classes/com/sun/tools/sjavac/Main.java | Main.findNumberOption | public static int findNumberOption(String[] args, String option) {
int rc = 0;
for (int i = 0; i<args.length; ++i) {
if (args[i].equals(option)) {
if (args.length > i+1) {
rc = Integer.parseInt(args[i+1]);
}
}
}
... | java | public static int findNumberOption(String[] args, String option) {
int rc = 0;
for (int i = 0; i<args.length; ++i) {
if (args[i].equals(option)) {
if (args.length > i+1) {
rc = Integer.parseInt(args[i+1]);
}
}
}
... | [
"public",
"static",
"int",
"findNumberOption",
"(",
"String",
"[",
"]",
"args",
",",
"String",
"option",
")",
"{",
"int",
"rc",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"args",
".",
"length",
";",
"++",
"i",
")",
"{",
"if... | Scan the arguments to find an option that specifies a number. | [
"Scan",
"the",
"arguments",
"to",
"find",
"an",
"option",
"that",
"specifies",
"a",
"number",
"."
] | 8812d28c20f4de070a0dd6de1b45602431379834 | https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/sjavac/Main.java#L761-L771 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.