repo stringclasses 199
values | path stringlengths 28 169 | func_name stringlengths 6 98 | original_string stringlengths 91 27.2k | language stringclasses 1
value | code stringlengths 91 27.2k | code_tokens listlengths 21 5.01k | docstring stringlengths 1 6.47k | docstring_tokens listlengths 1 587 | sha stringclasses 199
values | url stringlengths 117 257 | partition stringclasses 1
value | summary stringlengths 3 207 | output stringlengths 170 27.3k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
orientechnologies/orientdb | object/src/main/java/com/orientechnologies/orient/object/db/OObjectDatabaseTx.java | OObjectDatabaseTx.convertParameters | protected void convertParameters(final Object... iArgs) {
if (iArgs == null)
return;
// FILTER PARAMETERS
for (int i = 0; i < iArgs.length; ++i)
iArgs[i] = convertParameter(iArgs[i]);
} | java | protected void convertParameters(final Object... iArgs) {
if (iArgs == null)
return;
// FILTER PARAMETERS
for (int i = 0; i < iArgs.length; ++i)
iArgs[i] = convertParameter(iArgs[i]);
} | [
"protected",
"void",
"convertParameters",
"(",
"final",
"Object",
"...",
"iArgs",
")",
"{",
"if",
"(",
"iArgs",
"==",
"null",
")",
"return",
";",
"// FILTER PARAMETERS\r",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"iArgs",
".",
"length",
";",
"+... | Converts an array of parameters: if a POJO is used, then replace it with its record id.
@param iArgs Array of parameters as Object
@see #convertParameter(Object) | [
"Converts",
"an",
"array",
"of",
"parameters",
":",
"if",
"a",
"POJO",
"is",
"used",
"then",
"replace",
"it",
"with",
"its",
"record",
"id",
"."
] | d970b12033f0462f0239ea0ad8ed41207e6e26f1 | https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/object/src/main/java/com/orientechnologies/orient/object/db/OObjectDatabaseTx.java#L1026-L1033 | test | Convert the parameters to a
object. | Of course, here is the Java code you requested:
```java
protected void convertParameters(final Object... iArgs) {
if (iArgs == null)
return;
// FILTER PARAMETERS
for (int i = 0; i < iArgs.length; ++i)
iArgs[i] = convertParameter(iArgs[i]);
}
```
Hope this helps! |
tony19/logback-android | logback-android/src/main/java/ch/qos/logback/core/util/OptionHelper.java | OptionHelper.getSystemProperty | public static String getSystemProperty(String key, String def) {
try {
return System.getProperty(key, def);
} catch (SecurityException e) {
return def;
}
} | java | public static String getSystemProperty(String key, String def) {
try {
return System.getProperty(key, def);
} catch (SecurityException e) {
return def;
}
} | [
"public",
"static",
"String",
"getSystemProperty",
"(",
"String",
"key",
",",
"String",
"def",
")",
"{",
"try",
"{",
"return",
"System",
".",
"getProperty",
"(",
"key",
",",
"def",
")",
";",
"}",
"catch",
"(",
"SecurityException",
"e",
")",
"{",
"return"... | Very similar to <code>System.getProperty</code> except that the
{@link SecurityException} is absorbed.
@param key The key to search for.
@param def The default value to return.
@return the string value of the system property, or the default value if
there is no property with that key. | [
"Very",
"similar",
"to",
"<code",
">",
"System",
".",
"getProperty<",
"/",
"code",
">",
"except",
"that",
"the",
"{",
"@link",
"SecurityException",
"}",
"is",
"absorbed",
"."
] | 028489c11ccfc1237a53923db06f22a90b41809c | https://github.com/tony19/logback-android/blob/028489c11ccfc1237a53923db06f22a90b41809c/logback-android/src/main/java/ch/qos/logback/core/util/OptionHelper.java#L162-L168 | test | Get the value of a system property. | Of course, here is the Java code you requested:
```java
public static String getSystemProperty(String key, String def) {
try {
return System.getProperty(key, def);
} catch (SecurityException e) {
return def;
}
}
```
Hope this helps! |
Unidata/thredds | cdm/src/main/java/ucar/unidata/geoloc/projection/ProjectionAdapter.java | ProjectionAdapter.factory | static public ProjectionImpl factory(Projection proj) {
if (proj instanceof ProjectionImpl) {
return (ProjectionImpl) proj;
}
return new ProjectionAdapter(proj);
} | java | static public ProjectionImpl factory(Projection proj) {
if (proj instanceof ProjectionImpl) {
return (ProjectionImpl) proj;
}
return new ProjectionAdapter(proj);
} | [
"static",
"public",
"ProjectionImpl",
"factory",
"(",
"Projection",
"proj",
")",
"{",
"if",
"(",
"proj",
"instanceof",
"ProjectionImpl",
")",
"{",
"return",
"(",
"ProjectionImpl",
")",
"proj",
";",
"}",
"return",
"new",
"ProjectionAdapter",
"(",
"proj",
")",
... | Create a ProjectionImpl from the projection
@param proj projection
@return a ProjectionImpl representing the projection | [
"Create",
"a",
"ProjectionImpl",
"from",
"the",
"projection"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/unidata/geoloc/projection/ProjectionAdapter.java#L32-L37 | test | Create a projection object that wraps a projection object. | Of course, here is the Java code you requested:
```java
static public ProjectionImpl factory(Projection proj) {
if (proj instanceof ProjectionImpl) {
return (ProjectionImpl) proj;
}
return new ProjectionAdapter(proj);
}
```
Hope this helps! |
kocakosm/pitaya | src/org/kocakosm/pitaya/math/Numbers.java | Numbers.mean | public static double mean(int... values)
{
Parameters.checkCondition(values.length > 0);
long sum = 0L;
for (int value : values) {
sum += value;
}
return (double) sum / values.length;
} | java | public static double mean(int... values)
{
Parameters.checkCondition(values.length > 0);
long sum = 0L;
for (int value : values) {
sum += value;
}
return (double) sum / values.length;
} | [
"public",
"static",
"double",
"mean",
"(",
"int",
"...",
"values",
")",
"{",
"Parameters",
".",
"checkCondition",
"(",
"values",
".",
"length",
">",
"0",
")",
";",
"long",
"sum",
"=",
"0L",
";",
"for",
"(",
"int",
"value",
":",
"values",
")",
"{",
... | Returns the arithmetic mean of the given values. This method is not
subject to overflow.
@param values the values.
@return the arithmetic mean of the given values.
@throws NullPointerException if {@code values} is {@code null}.
@throws IllegalArgumentException if {@code values} is empty. | [
"Returns",
"the",
"arithmetic",
"mean",
"of",
"the",
"given",
"values",
".",
"This",
"method",
"is",
"not",
"subject",
"to",
"overflow",
"."
] | f2b203b6cdb32723bd1249a1325a3bb5918bf99a | https://github.com/kocakosm/pitaya/blob/f2b203b6cdb32723bd1249a1325a3bb5918bf99a/src/org/kocakosm/pitaya/math/Numbers.java#L205-L213 | test | Returns the mean of the given values. | Of course, here is the Java code you requested:
```java
public static double mean(int... values)
{
Parameters.checkCondition(values.length > 0);
long sum = 0L;
for (int value : values) {
sum += value;
}
return (double) sum / values.length;
}
```
Hope this helps! |
nyla-solutions/gedi-geode | gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/lucene/TextPolicySearchStrategy.java | TextPolicySearchStrategy.saveSearchResultsWithPageKeys | public <K, V> Collection<String> saveSearchResultsWithPageKeys(TextPageCriteria criteria,String query, Predicate<LuceneResultStruct<K, V>> filter, Region<String,Collection<K>> pageKeysRegion)
{
if(criteria == null)
return null;
if(criteria.getId() == null || criteria.getId().length() == 0)
throw ne... | java | public <K, V> Collection<String> saveSearchResultsWithPageKeys(TextPageCriteria criteria,String query, Predicate<LuceneResultStruct<K, V>> filter, Region<String,Collection<K>> pageKeysRegion)
{
if(criteria == null)
return null;
if(criteria.getId() == null || criteria.getId().length() == 0)
throw ne... | [
"public",
"<",
"K",
",",
"V",
">",
"Collection",
"<",
"String",
">",
"saveSearchResultsWithPageKeys",
"(",
"TextPageCriteria",
"criteria",
",",
"String",
"query",
",",
"Predicate",
"<",
"LuceneResultStruct",
"<",
"K",
",",
"V",
">",
">",
"filter",
",",
"Regi... | ------------------------------------------------ | [
"------------------------------------------------"
] | 3dd71d6e66e941ce350b306b70677ee95a7d9eee | https://github.com/nyla-solutions/gedi-geode/blob/3dd71d6e66e941ce350b306b70677ee95a7d9eee/gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/lucene/TextPolicySearchStrategy.java#L59-L86 | test | Save search results with page keys. | Of course, here is the Java code you requested:
```java
public <K, V> Collection<String> saveSearchResultsWithPageKeys(TextPageCriteria criteria,String query, Predicate<LuceneResultStruct<K, V>> filter, Region<String,Collection<K>> pageKeysRegion)
{
if(criteria == null)
return null;
if(criteria.getId(... |
felipecsl/GifImageView | library/src/main/java/com/felipecsl/gifimageview/library/GifHeaderParser.java | GifHeaderParser.readGraphicControlExt | private void readGraphicControlExt() {
// Block size.
read();
// Packed fields.
int packed = read();
// Disposal method.
header.currentFrame.dispose = (packed & 0x1c) >> 2;
if (header.currentFrame.dispose == 0) {
// Elect to keep old image if discretionary.
header.currentFrame.di... | java | private void readGraphicControlExt() {
// Block size.
read();
// Packed fields.
int packed = read();
// Disposal method.
header.currentFrame.dispose = (packed & 0x1c) >> 2;
if (header.currentFrame.dispose == 0) {
// Elect to keep old image if discretionary.
header.currentFrame.di... | [
"private",
"void",
"readGraphicControlExt",
"(",
")",
"{",
"// Block size.",
"read",
"(",
")",
";",
"// Packed fields.",
"int",
"packed",
"=",
"read",
"(",
")",
";",
"// Disposal method.",
"header",
".",
"currentFrame",
".",
"dispose",
"=",
"(",
"packed",
"&",... | Reads Graphics Control Extension values. | [
"Reads",
"Graphics",
"Control",
"Extension",
"values",
"."
] | d2af6a5210c1872f4c627b63b93f3aba7f0a3bb9 | https://github.com/felipecsl/GifImageView/blob/d2af6a5210c1872f4c627b63b93f3aba7f0a3bb9/library/src/main/java/com/felipecsl/gifimageview/library/GifHeaderParser.java#L190-L213 | test | Read graphic control ext. | Of course, here is the Java code you requested:
```java
private void readGraphicControlExt() {
// Block size.
read();
// Packed fields.
int packed = read();
// Disposal method.
header.currentFrame.dispose = (packed & 0x1c) >> 2;
if (header.currentFrame.dispose == 0) {
// Elect to keep... |
Koekiebox-PTY-LTD/Fluid | fluid-api/src/main/java/com/fluidbpm/program/api/vo/form/TableRecord.java | TableRecord.toJsonObject | @Override
public JSONObject toJsonObject() throws JSONException
{
JSONObject returnVal = super.toJsonObject();
//Form Container...
if(this.getFormContainer() != null)
{
returnVal.put(JSONMapping.FORM_CONTAINER,
this.getFormContainer().toJsonObject... | java | @Override
public JSONObject toJsonObject() throws JSONException
{
JSONObject returnVal = super.toJsonObject();
//Form Container...
if(this.getFormContainer() != null)
{
returnVal.put(JSONMapping.FORM_CONTAINER,
this.getFormContainer().toJsonObject... | [
"@",
"Override",
"public",
"JSONObject",
"toJsonObject",
"(",
")",
"throws",
"JSONException",
"{",
"JSONObject",
"returnVal",
"=",
"super",
".",
"toJsonObject",
"(",
")",
";",
"//Form Container...",
"if",
"(",
"this",
".",
"getFormContainer",
"(",
")",
"!=",
"... | Conversion to {@code JSONObject} from Java Object.
@return {@code JSONObject} representation of {@code Field}
@throws JSONException If there is a problem with the JSON Body.
@see ABaseFluidJSONObject#toJsonObject() | [
"Conversion",
"to",
"{",
"@code",
"JSONObject",
"}",
"from",
"Java",
"Object",
"."
] | 81153d865f71b84ca933532c7115717bc3979270 | https://github.com/Koekiebox-PTY-LTD/Fluid/blob/81153d865f71b84ca933532c7115717bc3979270/fluid-api/src/main/java/com/fluidbpm/program/api/vo/form/TableRecord.java#L106-L133 | test | Get the JSONObject representation of the CRA s ACS_A_SID. | Of course, here is the Java code you requested:
```java
@Override
public JSONObject toJsonObject() throws JSONException
{
JSONObject returnVal = super.toJsonObject();
//Form Container...
if(this.getFormContainer() != null)
{
returnVal.put(JSONMapping.FORM_CONTAINER,... |
ReactiveX/RxJava | src/main/java/io/reactivex/internal/operators/observable/ObservableScalarXMap.java | ObservableScalarXMap.tryScalarXMapSubscribe | @SuppressWarnings("unchecked")
public static <T, R> boolean tryScalarXMapSubscribe(ObservableSource<T> source,
Observer<? super R> observer,
Function<? super T, ? extends ObservableSource<? extends R>> mapper) {
if (source instanceof Callable) {
T t;
try {
... | java | @SuppressWarnings("unchecked")
public static <T, R> boolean tryScalarXMapSubscribe(ObservableSource<T> source,
Observer<? super R> observer,
Function<? super T, ? extends ObservableSource<? extends R>> mapper) {
if (source instanceof Callable) {
T t;
try {
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
",",
"R",
">",
"boolean",
"tryScalarXMapSubscribe",
"(",
"ObservableSource",
"<",
"T",
">",
"source",
",",
"Observer",
"<",
"?",
"super",
"R",
">",
"observer",
",",
"Function",... | Tries to subscribe to a possibly Callable source's mapped ObservableSource.
@param <T> the input value type
@param <R> the output value type
@param source the source ObservableSource
@param observer the subscriber
@param mapper the function mapping a scalar value into an ObservableSource
@return true if successful, fal... | [
"Tries",
"to",
"subscribe",
"to",
"a",
"possibly",
"Callable",
"source",
"s",
"mapped",
"ObservableSource",
"."
] | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/internal/operators/observable/ObservableScalarXMap.java#L47-L102 | test | Try scalar x map subscribe. | Of course, here is the Java code you requested:
```java
@SuppressWarnings("unchecked")
public static <T, R> boolean tryScalarXMapSubscribe(ObservableSource<T> source,
Observer<? super R> observer,
Function<? super T, ? extends ObservableSource<? extends R>> mapper) {
if (source inst... |
Koekiebox-PTY-LTD/Fluid | fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/flow/RouteFieldClient.java | RouteFieldClient.updateFieldDateTimeDate | public Field updateFieldDateTimeDate(Field routeFieldParam) {
if(routeFieldParam != null && this.serviceTicket != null) {
routeFieldParam.setServiceTicket(this.serviceTicket);
}
if(routeFieldParam != null) {
routeFieldParam.setTypeAsEnum(Field.Type.DateTime);
routeFieldParam.setTypeMetaData(FieldMetaDat... | java | public Field updateFieldDateTimeDate(Field routeFieldParam) {
if(routeFieldParam != null && this.serviceTicket != null) {
routeFieldParam.setServiceTicket(this.serviceTicket);
}
if(routeFieldParam != null) {
routeFieldParam.setTypeAsEnum(Field.Type.DateTime);
routeFieldParam.setTypeMetaData(FieldMetaDat... | [
"public",
"Field",
"updateFieldDateTimeDate",
"(",
"Field",
"routeFieldParam",
")",
"{",
"if",
"(",
"routeFieldParam",
"!=",
"null",
"&&",
"this",
".",
"serviceTicket",
"!=",
"null",
")",
"{",
"routeFieldParam",
".",
"setServiceTicket",
"(",
"this",
".",
"servic... | Update an existing Date field.
@param routeFieldParam Field to Update.
@return Updated Field. | [
"Update",
"an",
"existing",
"Date",
"field",
"."
] | 81153d865f71b84ca933532c7115717bc3979270 | https://github.com/Koekiebox-PTY-LTD/Fluid/blob/81153d865f71b84ca933532c7115717bc3979270/fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/flow/RouteFieldClient.java#L410-L422 | test | Update the Field DateTimeDate. | Of course, here is the Java code you requested:
```java
public Field updateFieldDateTimeDate(Field routeFieldParam) {
if(routeFieldParam != null && this.serviceTicket != null) {
routeFieldParam.setServiceTicket(this.serviceTicket);
}
if(routeFieldParam != null) {
routeFieldParam.setTypeAsEnum(Field.Type.D... |
RestComm/jain-slee | container/components/components/src/main/java/org/mobicents/slee/container/component/validator/SbbComponentValidator.java | SbbComponentValidator.validateAbstractClassConstraints | boolean validateAbstractClassConstraints(Map<String, Method> concreteMethods, Map<String, Method> concreteSuperClassesMethods) {
String errorBuffer = new String("");
boolean passed = true;
// Presence of those classes must be checked elsewhere
Class sbbAbstractClass = this.component.getAbstractSbbClass();... | java | boolean validateAbstractClassConstraints(Map<String, Method> concreteMethods, Map<String, Method> concreteSuperClassesMethods) {
String errorBuffer = new String("");
boolean passed = true;
// Presence of those classes must be checked elsewhere
Class sbbAbstractClass = this.component.getAbstractSbbClass();... | [
"boolean",
"validateAbstractClassConstraints",
"(",
"Map",
"<",
"String",
",",
"Method",
">",
"concreteMethods",
",",
"Map",
"<",
"String",
",",
"Method",
">",
"concreteSuperClassesMethods",
")",
"{",
"String",
"errorBuffer",
"=",
"new",
"String",
"(",
"\"\"",
"... | Sbb abstract class(general rule � methods cannot start neither with �ejb�
nor �sbb�)
<ul>
<li>(1.1 ?) must have package declaration
<li>must implement in some way javax.slee.Sbb(only methods from interface
can have �sbb� prefix)
<ul>
<li>each method defined must be implemented as public � not abstract,
final or static
... | [
"Sbb",
"abstract",
"class",
"(",
"general",
"rule",
"�",
"methods",
"cannot",
"start",
"neither",
"with",
"�ejb�",
"nor",
"�sbb�",
")",
"<ul",
">",
"<li",
">",
"(",
"1",
".",
"1",
"?",
")",
"must",
"have",
"package",
"declaration",
"<li",
">",
"must",
... | 0eaa16ff2d4b6faf43f0d99260e88878fd54dee0 | https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/components/components/src/main/java/org/mobicents/slee/container/component/validator/SbbComponentValidator.java#L249-L399 | test | Validate the abstract methods and super classes for the specified abstract class. | Of course, here is the Java code you requested:
```java
boolean validateAbstractClassConstraints(Map<String, Method> concreteMethods, Map<String, Method> concreteSuperClassesMethods) {
String errorBuffer = new String("");
boolean passed = true;
// Presence of those classes must be checked elsewhere
Class... |
wro4j/wro4j | wro4j-extensions/src/main/java/ro/isdc/wro/extensions/processor/support/handlebarsjs/HandlebarsJs.java | HandlebarsJs.compile | @Override
public String compile(final String content, final String name) {
return HANDLEBARS_JS_TEMPLATES_INIT + "templates[" + name + "] = template("
+ super.compile(content, "") + " ); })();";
} | java | @Override
public String compile(final String content, final String name) {
return HANDLEBARS_JS_TEMPLATES_INIT + "templates[" + name + "] = template("
+ super.compile(content, "") + " ); })();";
} | [
"@",
"Override",
"public",
"String",
"compile",
"(",
"final",
"String",
"content",
",",
"final",
"String",
"name",
")",
"{",
"return",
"HANDLEBARS_JS_TEMPLATES_INIT",
"+",
"\"templates[\"",
"+",
"name",
"+",
"\"] = template(\"",
"+",
"super",
".",
"compile",
"("... | {@inheritDoc} | [
"{"
] | d2a3de71ab8bf0af7061fb6327501e08198338df | https://github.com/wro4j/wro4j/blob/d2a3de71ab8bf0af7061fb6327501e08198338df/wro4j-extensions/src/main/java/ro/isdc/wro/extensions/processor/support/handlebarsjs/HandlebarsJs.java#L25-L29 | test | Override to compile the content of the
. | Of course, here is the Java code you requested:
```java
@Override
public String compile(final String content, final String name) {
return HANDLEBARS_JS_TEMPLATES_INIT + "templates[" + name + "] = template("
+ super.compile(content, "") + " ); })();";
}
```
Hope this helps! |
RestComm/jain-slee | container/components/components/src/main/java/org/mobicents/slee/container/component/deployment/DeployableUnitBuilderImpl.java | DeployableUnitBuilderImpl.createTempDUDeploymentDir | private File createTempDUDeploymentDir(File deploymentRoot,
DeployableUnitID deployableUnitID) {
try {
// first create a dummy file to gurantee uniqueness. I would have
// been nice if the File class had a createTempDir() method
// IVELIN -- do not use jarName here because windows cannot see the
... | java | private File createTempDUDeploymentDir(File deploymentRoot,
DeployableUnitID deployableUnitID) {
try {
// first create a dummy file to gurantee uniqueness. I would have
// been nice if the File class had a createTempDir() method
// IVELIN -- do not use jarName here because windows cannot see the
... | [
"private",
"File",
"createTempDUDeploymentDir",
"(",
"File",
"deploymentRoot",
",",
"DeployableUnitID",
"deployableUnitID",
")",
"{",
"try",
"{",
"// first create a dummy file to gurantee uniqueness. I would have\r",
"// been nice if the File class had a createTempDir() method\r",
"// ... | Creates the directory that will be used for unpacking the child jars for
a given DU.
@param rootDir
@param sourceUrl
@throws SLEEException
if the dir can't be created
@return | [
"Creates",
"the",
"directory",
"that",
"will",
"be",
"used",
"for",
"unpacking",
"the",
"child",
"jars",
"for",
"a",
"given",
"DU",
"."
] | 0eaa16ff2d4b6faf43f0d99260e88878fd54dee0 | https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/components/components/src/main/java/org/mobicents/slee/container/component/deployment/DeployableUnitBuilderImpl.java#L628-L654 | test | Creates the temp DU deployment directory. | Of course, here is the Java code you requested:
```java
private File createTempDUDeploymentDir(File deploymentRoot,
DeployableUnitID deployableUnitID) {
try {
// first create a dummy file to gurantee uniqueness. I would have
// been nice if the File class had a createTempDir() method
// IVELIN -- do... |
jboss/jboss-common-core | src/main/java/org/jboss/util/property/PropertyMap.java | PropertyMap.firePropertyChanged | private void firePropertyChanged(List list, PropertyEvent event)
{
if (list == null) return;
int size = list.size();
for (int i = 0; i < size; i++)
{
PropertyListener listener = (PropertyListener) list.get(i);
listener.propertyChanged(event);
}
} | java | private void firePropertyChanged(List list, PropertyEvent event)
{
if (list == null) return;
int size = list.size();
for (int i = 0; i < size; i++)
{
PropertyListener listener = (PropertyListener) list.get(i);
listener.propertyChanged(event);
}
} | [
"private",
"void",
"firePropertyChanged",
"(",
"List",
"list",
",",
"PropertyEvent",
"event",
")",
"{",
"if",
"(",
"list",
"==",
"null",
")",
"return",
";",
"int",
"size",
"=",
"list",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
"... | Fire a property changed event to the given list of listeners.
@param list Listener list.
@param event Property event. | [
"Fire",
"a",
"property",
"changed",
"event",
"to",
"the",
"given",
"list",
"of",
"listeners",
"."
] | c191bb18db83fa106c6913cf34ed47989b65dc97 | https://github.com/jboss/jboss-common-core/blob/c191bb18db83fa106c6913cf34ed47989b65dc97/src/main/java/org/jboss/util/property/PropertyMap.java#L470-L480 | test | Fire the propertyChanged event for all PropertyListeners in the list | Of course, here is the Java code you requested:
```java
private void firePropertyChanged(List list, PropertyEvent event)
{
if (list == null) return;
int size = list.size();
for (int i = 0; i < size; i++)
{
PropertyListener listener = (PropertyListener) list.get(i);
listene... |
wildfly/wildfly | naming/src/main/java/org/jboss/as/naming/service/NamingStoreService.java | NamingStoreService.start | public void start(final StartContext context) throws StartException {
if(store == null) {
final ServiceRegistry serviceRegistry = context.getController().getServiceContainer();
final ServiceName serviceNameBase = context.getController().getName();
final ServiceTarget serviceT... | java | public void start(final StartContext context) throws StartException {
if(store == null) {
final ServiceRegistry serviceRegistry = context.getController().getServiceContainer();
final ServiceName serviceNameBase = context.getController().getName();
final ServiceTarget serviceT... | [
"public",
"void",
"start",
"(",
"final",
"StartContext",
"context",
")",
"throws",
"StartException",
"{",
"if",
"(",
"store",
"==",
"null",
")",
"{",
"final",
"ServiceRegistry",
"serviceRegistry",
"=",
"context",
".",
"getController",
"(",
")",
".",
"getServic... | Creates the naming store if not provided by the constructor.
@param context The start context
@throws StartException If any problems occur creating the context | [
"Creates",
"the",
"naming",
"store",
"if",
"not",
"provided",
"by",
"the",
"constructor",
"."
] | 64896f1500fe465ad83d96ede9fa19d0c3747f18 | https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/naming/src/main/java/org/jboss/as/naming/service/NamingStoreService.java#L64-L71 | test | Start the NamingStore. | Of course, here is the Java code you requested:
```java
public void start(final StartContext context) throws StartException {
if(store == null) {
final ServiceRegistry serviceRegistry = context.getController().getServiceContainer();
final ServiceName serviceNameBase = context.getControl... |
blademainer/common_utils | common_helper/src/main/java/com/xiongyingqi/util/MD5Helper.java | MD5Helper.encrypt | public static String encrypt(String message, String encode) {
return encrypt(message, encode, false);
} | java | public static String encrypt(String message, String encode) {
return encrypt(message, encode, false);
} | [
"public",
"static",
"String",
"encrypt",
"(",
"String",
"message",
",",
"String",
"encode",
")",
"{",
"return",
"encrypt",
"(",
"message",
",",
"encode",
",",
"false",
")",
";",
"}"
] | MD5 加密, 结果默认为小写 <br>
2013-11-4 下午6:33:06
@param message 要加密的内容
@param encode message的编码方式
@return 加密后的信息 | [
"MD5",
"加密,",
"结果默认为小写",
"<br",
">",
"2013",
"-",
"11",
"-",
"4",
"下午6",
":",
"33",
":",
"06"
] | ef6baf0367c16de95a28caab67a7d5842a6d13db | https://github.com/blademainer/common_utils/blob/ef6baf0367c16de95a28caab67a7d5842a6d13db/common_helper/src/main/java/com/xiongyingqi/util/MD5Helper.java#L36-L38 | test | Encrypts a message using the specified encoding. | Of course, here is the Java code you requested:
```java
public static String encrypt(String message, String encode) {
return encrypt(message, encode, false);
}
```
Hope this helps! |
Unidata/thredds | cdm/src/main/java/ucar/nc2/NetcdfFile.java | NetcdfFile.makeValidCdmObjectName | static public String makeValidCdmObjectName(String shortName) {
if (shortName == null) return null;
return StringUtil2.makeValidCdmObjectName(shortName);
} | java | static public String makeValidCdmObjectName(String shortName) {
if (shortName == null) return null;
return StringUtil2.makeValidCdmObjectName(shortName);
} | [
"static",
"public",
"String",
"makeValidCdmObjectName",
"(",
"String",
"shortName",
")",
"{",
"if",
"(",
"shortName",
"==",
"null",
")",
"return",
"null",
";",
"return",
"StringUtil2",
".",
"makeValidCdmObjectName",
"(",
"shortName",
")",
";",
"}"
] | Create a valid CDM object name.
Control chars (< 0x20) are not allowed.
Trailing and leading blanks are not allowed and are stripped off.
A space is converted into an underscore "_".
A forward slash "/" is converted into an underscore "_".
@param shortName from this name
@return valid CDM object name | [
"Create",
"a",
"valid",
"CDM",
"object",
"name",
".",
"Control",
"chars",
"(",
"<",
"0x20",
")",
"are",
"not",
"allowed",
".",
"Trailing",
"and",
"leading",
"blanks",
"are",
"not",
"allowed",
"and",
"are",
"stripped",
"off",
".",
"A",
"space",
"is",
"c... | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/NetcdfFile.java#L2427-L2430 | test | Make a valid CdmObjectName for a given shortName. | Of course, here is the Java code you requested:
```java
static public String makeValidCdmObjectName(String shortName) {
if (shortName == null) return null;
return StringUtil2.makeValidCdmObjectName(shortName);
}
```
Hope this helps! |
ReactiveX/RxJava | src/main/java/io/reactivex/Maybe.java | Maybe.fromRunnable | @CheckReturnValue
@NonNull
@SchedulerSupport(SchedulerSupport.NONE)
public static <T> Maybe<T> fromRunnable(final Runnable run) {
ObjectHelper.requireNonNull(run, "run is null");
return RxJavaPlugins.onAssembly(new MaybeFromRunnable<T>(run));
} | java | @CheckReturnValue
@NonNull
@SchedulerSupport(SchedulerSupport.NONE)
public static <T> Maybe<T> fromRunnable(final Runnable run) {
ObjectHelper.requireNonNull(run, "run is null");
return RxJavaPlugins.onAssembly(new MaybeFromRunnable<T>(run));
} | [
"@",
"CheckReturnValue",
"@",
"NonNull",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"NONE",
")",
"public",
"static",
"<",
"T",
">",
"Maybe",
"<",
"T",
">",
"fromRunnable",
"(",
"final",
"Runnable",
"run",
")",
"{",
"ObjectHelper",
".",
"requireNo... | Returns a Maybe instance that runs the given Action for each subscriber and
emits either its exception or simply completes.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code fromRunnable} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>
@param <T> the target type
@param run the runnable to run for eac... | [
"Returns",
"a",
"Maybe",
"instance",
"that",
"runs",
"the",
"given",
"Action",
"for",
"each",
"subscriber",
"and",
"emits",
"either",
"its",
"exception",
"or",
"simply",
"completes",
".",
"<dl",
">",
"<dt",
">",
"<b",
">",
"Scheduler",
":",
"<",
"/",
"b"... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Maybe.java#L860-L866 | test | Creates an Maybe from a Runnable. | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@NonNull
@SchedulerSupport(SchedulerSupport.NONE)
public static <T> Maybe<T> fromRunnable(final Runnable run) {
ObjectHelper.requireNonNull(run, "run is null");
return RxJavaPlugins.onAssembly(new MaybeFromRunnable<T>... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/NetcdfFile.java | NetcdfFile.findVariable | public Variable findVariable(String fullNameEscaped) {
if (fullNameEscaped == null || fullNameEscaped.isEmpty()) {
return null;
}
Group g = rootGroup;
String vars = fullNameEscaped;
// break into group/group and var.var
int pos = fullNameEscaped.lastIndexOf('/');
if (pos >= 0) {
... | java | public Variable findVariable(String fullNameEscaped) {
if (fullNameEscaped == null || fullNameEscaped.isEmpty()) {
return null;
}
Group g = rootGroup;
String vars = fullNameEscaped;
// break into group/group and var.var
int pos = fullNameEscaped.lastIndexOf('/');
if (pos >= 0) {
... | [
"public",
"Variable",
"findVariable",
"(",
"String",
"fullNameEscaped",
")",
"{",
"if",
"(",
"fullNameEscaped",
"==",
"null",
"||",
"fullNameEscaped",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"Group",
"g",
"=",
"rootGroup",
";",
"Str... | Find a Variable, with the specified (escaped full) name.
It may possibly be nested in multiple groups and/or structures.
An embedded "." is interpreted as structure.member.
An embedded "/" is interpreted as group/variable.
If the name actually has a ".", you must escape it (call NetcdfFile.escapeName(varname))
Any othe... | [
"Find",
"a",
"Variable",
"with",
"the",
"specified",
"(",
"escaped",
"full",
")",
"name",
".",
"It",
"may",
"possibly",
"be",
"nested",
"in",
"multiple",
"groups",
"and",
"/",
"or",
"structures",
".",
"An",
"embedded",
".",
"is",
"interpreted",
"as",
"st... | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/NetcdfFile.java#L1095-L1132 | test | Find a variable in the structure. | Of course, here is the Java code you requested:
```java
public Variable findVariable(String fullNameEscaped) {
if (fullNameEscaped == null || fullNameEscaped.isEmpty()) {
return null;
}
Group g = rootGroup;
String vars = fullNameEscaped;
// break into group/group and var.var
int pos = f... |
oblac/jodd | jodd-props/src/main/java/jodd/props/Props.java | Props.loadFromClasspath | public Props loadFromClasspath(final String... patterns) {
ClassScanner.create()
.registerEntryConsumer(entryData -> {
String usedEncoding = JoddCore.encoding;
if (StringUtil.endsWithIgnoreCase(entryData.name(), ".properties")) {
usedEncoding = StringPool.ISO_8859_1;
}
final String encoding =... | java | public Props loadFromClasspath(final String... patterns) {
ClassScanner.create()
.registerEntryConsumer(entryData -> {
String usedEncoding = JoddCore.encoding;
if (StringUtil.endsWithIgnoreCase(entryData.name(), ".properties")) {
usedEncoding = StringPool.ISO_8859_1;
}
final String encoding =... | [
"public",
"Props",
"loadFromClasspath",
"(",
"final",
"String",
"...",
"patterns",
")",
"{",
"ClassScanner",
".",
"create",
"(",
")",
".",
"registerEntryConsumer",
"(",
"entryData",
"->",
"{",
"String",
"usedEncoding",
"=",
"JoddCore",
".",
"encoding",
";",
"i... | Loads props and properties from the classpath. | [
"Loads",
"props",
"and",
"properties",
"from",
"the",
"classpath",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-props/src/main/java/jodd/props/Props.java#L344-L363 | test | Load properties from classpath. | Of course, here is the Java code you requested:
```java
public Props loadFromClasspath(final String... patterns) {
ClassScanner.create()
.registerEntryConsumer(entryData -> {
String usedEncoding = JoddCore.encoding;
if (StringUtil.endsWithIgnoreCase(entryData.name(), ".properties")) {
usedEncoding = ... |
subchen/jetbrick-all-1x | jetbrick-commons/src/main/java/jetbrick/reflect/ParameterInfo.java | ParameterInfo.receiveParameterNames | private static void receiveParameterNames(final KlassInfo declaringklass) {
if (declaringklass.getType().getClassLoader() == null) {
// We can not find parameter name for class which is in JDK
return;
}
ClassReader cr = null;
try {
InputStream stream ... | java | private static void receiveParameterNames(final KlassInfo declaringklass) {
if (declaringklass.getType().getClassLoader() == null) {
// We can not find parameter name for class which is in JDK
return;
}
ClassReader cr = null;
try {
InputStream stream ... | [
"private",
"static",
"void",
"receiveParameterNames",
"(",
"final",
"KlassInfo",
"declaringklass",
")",
"{",
"if",
"(",
"declaringklass",
".",
"getType",
"(",
")",
".",
"getClassLoader",
"(",
")",
"==",
"null",
")",
"{",
"// We can not find parameter name for class ... | 使用 ASM 获取参数名称 | [
"使用",
"ASM",
"获取参数名称"
] | abe54629a508592287afe5ca4ffc93bf8bf4940c | https://github.com/subchen/jetbrick-all-1x/blob/abe54629a508592287afe5ca4ffc93bf8bf4940c/jetbrick-commons/src/main/java/jetbrick/reflect/ParameterInfo.java#L115-L184 | test | Receive parameter names. | Of course, here is the Java code you requested:
```java
private static void receiveParameterNames(final KlassInfo declaringklass) {
if (declaringklass.getType().getClassLoader() == null) {
// We can not find parameter name for class which is in JDK
return;
}
ClassReader... |
eclipse/packagedrone | bundles/org.apache.jasper.glassfish/src/org/apache/jasper/servlet/JspCServletContext.java | JspCServletContext.getRealPath | public String getRealPath(String path) {
if (!myResourceBaseURL.getProtocol().equals("file"))
return (null);
if (!path.startsWith("/"))
return (null);
try {
return
(getResource(path).getFile().replace('/', File.separatorChar));
} catch... | java | public String getRealPath(String path) {
if (!myResourceBaseURL.getProtocol().equals("file"))
return (null);
if (!path.startsWith("/"))
return (null);
try {
return
(getResource(path).getFile().replace('/', File.separatorChar));
} catch... | [
"public",
"String",
"getRealPath",
"(",
"String",
"path",
")",
"{",
"if",
"(",
"!",
"myResourceBaseURL",
".",
"getProtocol",
"(",
")",
".",
"equals",
"(",
"\"file\"",
")",
")",
"return",
"(",
"null",
")",
";",
"if",
"(",
"!",
"path",
".",
"startsWith",... | Return the real path for the specified context-relative
virtual path.
@param path The context-relative virtual path to resolve | [
"Return",
"the",
"real",
"path",
"for",
"the",
"specified",
"context",
"-",
"relative",
"virtual",
"path",
"."
] | 3869c1643cdc6f7cb8b26097a7b6994683b13d7e | https://github.com/eclipse/packagedrone/blob/3869c1643cdc6f7cb8b26097a7b6994683b13d7e/bundles/org.apache.jasper.glassfish/src/org/apache/jasper/servlet/JspCServletContext.java#L269-L282 | test | Gets the path of a resource. | Of course, here is the Java code you requested:
```java
public String getRealPath(String path) {
if (!myResourceBaseURL.getProtocol().equals("file"))
return (null);
if (!path.startsWith("/"))
return (null);
try {
return
(getResource(path).get... |
phax/ph-math | ph-math/src/main/java/com/helger/numbercruncher/mathutils/RungeKuttaDiffEqSolver.java | RungeKuttaDiffEqSolver.nextPoint | @Override
public DataPoint nextPoint (final float h)
{
final float k1 = m_aEquation.at (m_fX, m_fY);
final float k2 = m_aEquation.at (m_fX + h / 2, m_fY + k1 * h / 2);
final float k3 = m_aEquation.at (m_fX + h / 2, m_fY + k2 * h / 2);
final float k4 = m_aEquation.at (m_fX + h, m_fY + k3 * h);
m... | java | @Override
public DataPoint nextPoint (final float h)
{
final float k1 = m_aEquation.at (m_fX, m_fY);
final float k2 = m_aEquation.at (m_fX + h / 2, m_fY + k1 * h / 2);
final float k3 = m_aEquation.at (m_fX + h / 2, m_fY + k2 * h / 2);
final float k4 = m_aEquation.at (m_fX + h, m_fY + k3 * h);
m... | [
"@",
"Override",
"public",
"DataPoint",
"nextPoint",
"(",
"final",
"float",
"h",
")",
"{",
"final",
"float",
"k1",
"=",
"m_aEquation",
".",
"at",
"(",
"m_fX",
",",
"m_fY",
")",
";",
"final",
"float",
"k2",
"=",
"m_aEquation",
".",
"at",
"(",
"m_fX",
... | Return the next data point in the approximation of the solution.
@param h
the width of the interval | [
"Return",
"the",
"next",
"data",
"point",
"in",
"the",
"approximation",
"of",
"the",
"solution",
"."
] | 9f998870c7e05226e032b1f38c23e7d45ec0169d | https://github.com/phax/ph-math/blob/9f998870c7e05226e032b1f38c23e7d45ec0169d/ph-math/src/main/java/com/helger/numbercruncher/mathutils/RungeKuttaDiffEqSolver.java#L42-L54 | test | Get the next point in the chain. | Of course, here is the Java code you requested:
```java
@Override
public DataPoint nextPoint (final float h)
{
final float k1 = m_aEquation.at (m_fX, m_fY);
final float k2 = m_aEquation.at (m_fX + h / 2, m_fY + k1 * h / 2);
final float k3 = m_aEquation.at (m_fX + h / 2, m_fY + k2 * h / 2);
final fl... |
oblac/jodd | jodd-madvoc/src/main/java/jodd/madvoc/path/BaseNamingStrategy.java | BaseNamingStrategy.isAbsolutePath | protected boolean isAbsolutePath(final String path) {
if (path == null) {
return false;
}
return path.startsWith(StringPool.SLASH);
} | java | protected boolean isAbsolutePath(final String path) {
if (path == null) {
return false;
}
return path.startsWith(StringPool.SLASH);
} | [
"protected",
"boolean",
"isAbsolutePath",
"(",
"final",
"String",
"path",
")",
"{",
"if",
"(",
"path",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"return",
"path",
".",
"startsWith",
"(",
"StringPool",
".",
"SLASH",
")",
";",
"}"
] | Returns {@code true} if path is absolute. | [
"Returns",
"{"
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-madvoc/src/main/java/jodd/madvoc/path/BaseNamingStrategy.java#L91-L96 | test | Checks if the given path is absolute. | Of course, here is the Java code you requested:
```java
protected boolean isAbsolutePath(final String path) {
if (path == null) {
return false;
}
return path.startsWith(StringPool.SLASH);
}
```
Hope this helps! |
RuedigerMoeller/fast-serialization | src/main/java/org/nustaq/serialization/FSTClazzNameRegistry.java | FSTClazzNameRegistry.registerClass | public void registerClass(Class c,FSTConfiguration conf) {
if ( getIdFromClazz(c) != Integer.MIN_VALUE ) {
return;
}
registerClassNoLookup(c,null,conf);
} | java | public void registerClass(Class c,FSTConfiguration conf) {
if ( getIdFromClazz(c) != Integer.MIN_VALUE ) {
return;
}
registerClassNoLookup(c,null,conf);
} | [
"public",
"void",
"registerClass",
"(",
"Class",
"c",
",",
"FSTConfiguration",
"conf",
")",
"{",
"if",
"(",
"getIdFromClazz",
"(",
"c",
")",
"!=",
"Integer",
".",
"MIN_VALUE",
")",
"{",
"return",
";",
"}",
"registerClassNoLookup",
"(",
"c",
",",
"null",
... | for read => always increase handle (wg. replaceObject) | [
"for",
"read",
"=",
">",
"always",
"increase",
"handle",
"(",
"wg",
".",
"replaceObject",
")"
] | 59f8f800b79479d0b9c80901cf55903d9b027f26 | https://github.com/RuedigerMoeller/fast-serialization/blob/59f8f800b79479d0b9c80901cf55903d9b027f26/src/main/java/org/nustaq/serialization/FSTClazzNameRegistry.java#L77-L82 | test | Register a class in the class registry. | Of course, here is the Java code you requested:
```java
public void registerClass(Class c,FSTConfiguration conf) {
if ( getIdFromClazz(c) != Integer.MIN_VALUE ) {
return;
}
registerClassNoLookup(c,null,conf);
}
```
Hope this helps! |
RestComm/jain-slee | container/services/src/main/java/org/mobicents/slee/runtime/sbbentity/SbbEntityImpl.java | SbbEntityImpl.sbbRolledBack | public void sbbRolledBack(Object event,
ActivityContextInterface activityContextInterface,
boolean removeRollback) {
if (sbbObject != null) {
sbbObject.sbbRolledBack(event,activityContextInterface,removeRollback);
passivateAndReleaseSbbObject();
}
} | java | public void sbbRolledBack(Object event,
ActivityContextInterface activityContextInterface,
boolean removeRollback) {
if (sbbObject != null) {
sbbObject.sbbRolledBack(event,activityContextInterface,removeRollback);
passivateAndReleaseSbbObject();
}
} | [
"public",
"void",
"sbbRolledBack",
"(",
"Object",
"event",
",",
"ActivityContextInterface",
"activityContextInterface",
",",
"boolean",
"removeRollback",
")",
"{",
"if",
"(",
"sbbObject",
"!=",
"null",
")",
"{",
"sbbObject",
".",
"sbbRolledBack",
"(",
"event",
","... | /* (non-Javadoc)
@see org.mobicents.slee.runtime.sbbentity.SbbEntity#sbbRolledBack(java.lang.Object, javax.slee.ActivityContextInterface, boolean) | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | 0eaa16ff2d4b6faf43f0d99260e88878fd54dee0 | https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/services/src/main/java/org/mobicents/slee/runtime/sbbentity/SbbEntityImpl.java#L380-L387 | test | This method is called by the SBB Engine when the SBB is rolled back. | Of course, here is the Java code you requested:
```java
public void sbbRolledBack(Object event,
ActivityContextInterface activityContextInterface,
boolean removeRollback) {
if (sbbObject != null) {
sbbObject.sbbRolledBack(event,activityContextInterface,removeRollback);
passivateAndReleaseSbbObject();
}... |
rest-assured/rest-assured | rest-assured/src/main/java/io/restassured/builder/RequestSpecBuilder.java | RequestSpecBuilder.setProxy | public RequestSpecBuilder setProxy(String host, int port, String scheme) {
spec.proxy(host, port, scheme);
return this;
} | java | public RequestSpecBuilder setProxy(String host, int port, String scheme) {
spec.proxy(host, port, scheme);
return this;
} | [
"public",
"RequestSpecBuilder",
"setProxy",
"(",
"String",
"host",
",",
"int",
"port",
",",
"String",
"scheme",
")",
"{",
"spec",
".",
"proxy",
"(",
"host",
",",
"port",
",",
"scheme",
")",
";",
"return",
"this",
";",
"}"
] | Instruct REST Assured to connect to a proxy on the specified port on localhost with a specific scheme.
@param host The hostname of the proxy to connect to (for example <code>127.0.0.1</code>)
@param port The port of the proxy to connect to (for example <code>8888</code>)
@param scheme The http scheme (http or http... | [
"Instruct",
"REST",
"Assured",
"to",
"connect",
"to",
"a",
"proxy",
"on",
"the",
"specified",
"port",
"on",
"localhost",
"with",
"a",
"specific",
"scheme",
"."
] | 165a85b65070f5a07fe0045175613fb2c2811642 | https://github.com/rest-assured/rest-assured/blob/165a85b65070f5a07fe0045175613fb2c2811642/rest-assured/src/main/java/io/restassured/builder/RequestSpecBuilder.java#L1157-L1160 | test | Set the proxy host and port. | Of course, here is the Java code you requested:
```java
public RequestSpecBuilder setProxy(String host, int port, String scheme) {
spec.proxy(host, port, scheme);
return this;
}
```
Hope this helps! |
ArpNetworking/logback-steno | src/main/java/com/arpnetworking/steno/Logger.java | Logger.debug | public void debug(final Consumer<DeferredLogBuilder> consumer) {
if (_slf4jLogger.isDebugEnabled()) {
final LogBuilder logBuilder = new DefaultLogBuilder(this, LogLevel.DEBUG);
consumer.accept(logBuilder);
logBuilder.log();
}
} | java | public void debug(final Consumer<DeferredLogBuilder> consumer) {
if (_slf4jLogger.isDebugEnabled()) {
final LogBuilder logBuilder = new DefaultLogBuilder(this, LogLevel.DEBUG);
consumer.accept(logBuilder);
logBuilder.log();
}
} | [
"public",
"void",
"debug",
"(",
"final",
"Consumer",
"<",
"DeferredLogBuilder",
">",
"consumer",
")",
"{",
"if",
"(",
"_slf4jLogger",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"final",
"LogBuilder",
"logBuilder",
"=",
"new",
"DefaultLogBuilder",
"(",
"this",
... | Create a new log event at the debug level. The provided <code>Consumer</code>
populates a <code>DeferredLogBuilder</code> to define the log event. The
consumer may not be invoked if it is not necessary. Therefore it is
important not to include side-effects in the provided <code>Consumer</code>.
@since 1.12.0
@param c... | [
"Create",
"a",
"new",
"log",
"event",
"at",
"the",
"debug",
"level",
".",
"The",
"provided",
"<code",
">",
"Consumer<",
"/",
"code",
">",
"populates",
"a",
"<code",
">",
"DeferredLogBuilder<",
"/",
"code",
">",
"to",
"define",
"the",
"log",
"event",
".",... | abd5c68ce7d42c39f80ffbad6d162d5fed3a346e | https://github.com/ArpNetworking/logback-steno/blob/abd5c68ce7d42c39f80ffbad6d162d5fed3a346e/src/main/java/com/arpnetworking/steno/Logger.java#L397-L403 | test | Log a message at DEBUG level. | Of course, here is the Java code you requested:
```java
public void debug(final Consumer<DeferredLogBuilder> consumer) {
if (_slf4jLogger.isDebugEnabled()) {
final LogBuilder logBuilder = new DefaultLogBuilder(this, LogLevel.DEBUG);
consumer.accept(logBuilder);
logBuilder.lo... |
RestComm/jain-slee | container/profiles/src/main/java/org/mobicents/slee/container/deployment/profile/jpa/JPAProfileEntityFramework.java | JPAProfileEntityFramework.renameProfileTable | public void renameProfileTable(String oldProfileTableName, String newProfileTableName) {
EntityManager em = getEntityManager();
final Query q = em.createQuery(
"UPDATE " + profileEntityClassName + " SET tableName = ?1 WHERE tableName = ?2")
.setParameter(1, newProfileTableName)... | java | public void renameProfileTable(String oldProfileTableName, String newProfileTableName) {
EntityManager em = getEntityManager();
final Query q = em.createQuery(
"UPDATE " + profileEntityClassName + " SET tableName = ?1 WHERE tableName = ?2")
.setParameter(1, newProfileTableName)... | [
"public",
"void",
"renameProfileTable",
"(",
"String",
"oldProfileTableName",
",",
"String",
"newProfileTableName",
")",
"{",
"EntityManager",
"em",
"=",
"getEntityManager",
"(",
")",
";",
"final",
"Query",
"q",
"=",
"em",
".",
"createQuery",
"(",
"\"UPDATE \"",
... | /*
(non-Javadoc)
@see
org.mobicents.slee.container.component.profile.ProfileEntityFramework
#removeprofile
(org.mobicents.slee.container.component.profile.ProfileEntity) | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | 0eaa16ff2d4b6faf43f0d99260e88878fd54dee0 | https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/profiles/src/main/java/org/mobicents/slee/container/deployment/profile/jpa/JPAProfileEntityFramework.java#L513-L522 | test | Rename the profile table. | Of course, here is the Java code you requested:
```java
public void renameProfileTable(String oldProfileTableName, String newProfileTableName) {
EntityManager em = getEntityManager();
final Query q = em.createQuery(
"UPDATE " + profileEntityClassName + " SET tableName = ?1 WHERE tableName =... |
js-lib-com/tiny-container | src/main/java/js/net/EventStreamServlet.java | EventStreamServlet.getEventStreamSessionID | private static String getEventStreamSessionID(String requestPath) {
int extensionSeparator = requestPath.lastIndexOf('.');
if (extensionSeparator == -1) {
extensionSeparator = requestPath.length();
}
// request URI is guaranteed to start with path separator
// anyway, if missing below pathSeparator... | java | private static String getEventStreamSessionID(String requestPath) {
int extensionSeparator = requestPath.lastIndexOf('.');
if (extensionSeparator == -1) {
extensionSeparator = requestPath.length();
}
// request URI is guaranteed to start with path separator
// anyway, if missing below pathSeparator... | [
"private",
"static",
"String",
"getEventStreamSessionID",
"(",
"String",
"requestPath",
")",
"{",
"int",
"extensionSeparator",
"=",
"requestPath",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"extensionSeparator",
"==",
"-",
"1",
")",
"{",
"extensio... | Extract event stream session ID from request path. This method extracts last path component from request path with
extension removed, if present. It is a sort of <code>basename</code> from file path. All next request paths with return
the same session ID, <code>1234</code>:
<ul>
<li>/1234.event,
<li>/event/1234,
<li>/1... | [
"Extract",
"event",
"stream",
"session",
"ID",
"from",
"request",
"path",
".",
"This",
"method",
"extracts",
"last",
"path",
"component",
"from",
"request",
"path",
"with",
"extension",
"removed",
"if",
"present",
".",
"It",
"is",
"a",
"sort",
"of",
"<code",... | ef68deb9ec40b217b4cd2df56d9c5a213dd6b89e | https://github.com/js-lib-com/tiny-container/blob/ef68deb9ec40b217b4cd2df56d9c5a213dd6b89e/src/main/java/js/net/EventStreamServlet.java#L139-L149 | test | Returns the event stream session ID from the request path. | Of course, here is the Java code you requested:
```java
private static String getEventStreamSessionID(String requestPath) {
int extensionSeparator = requestPath.lastIndexOf('.');
if (extensionSeparator == -1) {
extensionSeparator = requestPath.length();
}
// request URI is guaranteed to start with pa... |
deeplearning4j/nd4j | nd4j-common/src/main/java/org/nd4j/util/StringUtils.java | StringUtils.getTrimmedStrings | public static String[] getTrimmedStrings(String str){
if (null == str || str.trim().isEmpty()) {
return emptyStringArray;
}
return str.trim().split("\\s*[,\n]\\s*");
} | java | public static String[] getTrimmedStrings(String str){
if (null == str || str.trim().isEmpty()) {
return emptyStringArray;
}
return str.trim().split("\\s*[,\n]\\s*");
} | [
"public",
"static",
"String",
"[",
"]",
"getTrimmedStrings",
"(",
"String",
"str",
")",
"{",
"if",
"(",
"null",
"==",
"str",
"||",
"str",
".",
"trim",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"emptyStringArray",
";",
"}",
"return",
"st... | Splits a comma or newline separated value <code>String</code>, trimming
leading and trailing whitespace on each value.
@param str a comma or newline separated <code>String</code> with values,
may be null
@return an array of <code>String</code> values, empty array if null String
input | [
"Splits",
"a",
"comma",
"or",
"newline",
"separated",
"value",
"<code",
">",
"String<",
"/",
"code",
">",
"trimming",
"leading",
"and",
"trailing",
"whitespace",
"on",
"each",
"value",
"."
] | 8f005bcecb240d1fbb83b9d390ad801d1d3b6933 | https://github.com/deeplearning4j/nd4j/blob/8f005bcecb240d1fbb83b9d390ad801d1d3b6933/nd4j-common/src/main/java/org/nd4j/util/StringUtils.java#L388-L394 | test | Returns an array of trimmed strings. | Of course, here is the Java code you requested:
```java
public static String[] getTrimmedStrings(String str){
if (null == str || str.trim().isEmpty()) {
return emptyStringArray;
}
return str.trim().split("\\s*[,\n]\\s*");
}
```
Hope this helps! |
spring-cloud/spring-cloud-security | spring-cloud-security/src/main/java/org/springframework/cloud/security/oauth2/client/AccessTokenContextRelay.java | AccessTokenContextRelay.copyToken | public boolean copyToken() {
if (context.getAccessToken() == null) {
Authentication authentication = SecurityContextHolder.getContext()
.getAuthentication();
if (authentication != null) {
Object details = authentication.getDetails();
if (details instanceof OAuth2AuthenticationDetails) {
OAuth2... | java | public boolean copyToken() {
if (context.getAccessToken() == null) {
Authentication authentication = SecurityContextHolder.getContext()
.getAuthentication();
if (authentication != null) {
Object details = authentication.getDetails();
if (details instanceof OAuth2AuthenticationDetails) {
OAuth2... | [
"public",
"boolean",
"copyToken",
"(",
")",
"{",
"if",
"(",
"context",
".",
"getAccessToken",
"(",
")",
"==",
"null",
")",
"{",
"Authentication",
"authentication",
"=",
"SecurityContextHolder",
".",
"getContext",
"(",
")",
".",
"getAuthentication",
"(",
")",
... | Attempt to copy an access token from the security context into the oauth2 context.
@return true if the token was copied | [
"Attempt",
"to",
"copy",
"an",
"access",
"token",
"from",
"the",
"security",
"context",
"into",
"the",
"oauth2",
"context",
"."
] | d2dc14d99a265025454a63952c76274323b29700 | https://github.com/spring-cloud/spring-cloud-security/blob/d2dc14d99a265025454a63952c76274323b29700/spring-cloud-security/src/main/java/org/springframework/cloud/security/oauth2/client/AccessTokenContextRelay.java#L51-L72 | test | Copy token from the context to the context. | Of course, here is the Java code you requested:
```java
public boolean copyToken() {
if (context.getAccessToken() == null) {
Authentication authentication = SecurityContextHolder.getContext()
.getAuthentication();
if (authentication != null) {
Object details = authentication.getDetails();
if (deta... |
subchen/jetbrick-all-1x | jetbrick-ioc/src/main/java/jetbrick/ioc/MutableIoc.java | MutableIoc.addBean | public void addBean(String name, IocObject object) {
Validate.notNull(name);
Validate.notNull(object);
log.debug("addBean: {}", name);
if (pool.put(name, object) != null) {
log.warn("Duplicated Bean: {}", name);
}
} | java | public void addBean(String name, IocObject object) {
Validate.notNull(name);
Validate.notNull(object);
log.debug("addBean: {}", name);
if (pool.put(name, object) != null) {
log.warn("Duplicated Bean: {}", name);
}
} | [
"public",
"void",
"addBean",
"(",
"String",
"name",
",",
"IocObject",
"object",
")",
"{",
"Validate",
".",
"notNull",
"(",
"name",
")",
";",
"Validate",
".",
"notNull",
"(",
"object",
")",
";",
"log",
".",
"debug",
"(",
"\"addBean: {}\"",
",",
"name",
... | 添加用户自定义的对象 | [
"添加用户自定义的对象"
] | abe54629a508592287afe5ca4ffc93bf8bf4940c | https://github.com/subchen/jetbrick-all-1x/blob/abe54629a508592287afe5ca4ffc93bf8bf4940c/jetbrick-ioc/src/main/java/jetbrick/ioc/MutableIoc.java#L63-L72 | test | Add a new Bean to the cache. | Of course, here is the Java code you requested:
```java
public void addBean(String name, IocObject object) {
Validate.notNull(name);
Validate.notNull(object);
log.debug("addBean: {}", name);
if (pool.put(name, object) != null) {
log.warn("Duplicated Bean: {}", name);
... |
ngageoint/geopackage-android | geopackage-sdk/src/main/java/mil/nga/geopackage/extension/coverage/CoverageData.java | CoverageData.getValues | @Override
public CoverageDataResults getValues(CoverageDataRequest request,
Integer width, Integer height) {
CoverageDataResults coverageDataResults = null;
// Transform to the projection of the coverage data tiles
ProjectionTransform transformReque... | java | @Override
public CoverageDataResults getValues(CoverageDataRequest request,
Integer width, Integer height) {
CoverageDataResults coverageDataResults = null;
// Transform to the projection of the coverage data tiles
ProjectionTransform transformReque... | [
"@",
"Override",
"public",
"CoverageDataResults",
"getValues",
"(",
"CoverageDataRequest",
"request",
",",
"Integer",
"width",
",",
"Integer",
"height",
")",
"{",
"CoverageDataResults",
"coverageDataResults",
"=",
"null",
";",
"// Transform to the projection of the coverage... | {@inheritDoc} | [
"{"
] | d19e9fcc636462c0f0ae1b7eca4acafae48de21b | https://github.com/ngageoint/geopackage-android/blob/d19e9fcc636462c0f0ae1b7eca4acafae48de21b/geopackage-sdk/src/main/java/mil/nga/geopackage/extension/coverage/CoverageData.java#L253-L346 | test | Get the coverage data values for the requested coverage data tile. | Of course, here is the Java code you requested:
```java
@Override
public CoverageDataResults getValues(CoverageDataRequest request,
Integer width, Integer height) {
CoverageDataResults coverageDataResults = null;
// Transform to the projection of the cover... |
rupertlssmith/lojix | lojix/search/src/main/com/thesett/aima/search/impl/bidirectional/BaseBiDirectionalQueueSearch.java | BaseBiDirectionalQueueSearch.findGoalPath | public SearchNode<O, T> findGoalPath() throws SearchNotExhaustiveException
{
// Keep running until the queue becomes empty or a goal state is found
while (!forwardQueue.isEmpty() || !reverseQueue.isEmpty())
{
// Only run the forward step of the search if the forward queue is not ... | java | public SearchNode<O, T> findGoalPath() throws SearchNotExhaustiveException
{
// Keep running until the queue becomes empty or a goal state is found
while (!forwardQueue.isEmpty() || !reverseQueue.isEmpty())
{
// Only run the forward step of the search if the forward queue is not ... | [
"public",
"SearchNode",
"<",
"O",
",",
"T",
">",
"findGoalPath",
"(",
")",
"throws",
"SearchNotExhaustiveException",
"{",
"// Keep running until the queue becomes empty or a goal state is found",
"while",
"(",
"!",
"forwardQueue",
".",
"isEmpty",
"(",
")",
"||",
"!",
... | Implementation of the general bi-dircetional search. The search alternated between taking a forward and a reverse
step.
@return The first {@link SearchNode} corresponding to a goal state that is found or null if none can be found
after exhaustive searching.
@throws SearchNotExhaustiveException If the search stops bef... | [
"Implementation",
"of",
"the",
"general",
"bi",
"-",
"dircetional",
"search",
".",
"The",
"search",
"alternated",
"between",
"taking",
"a",
"forward",
"and",
"a",
"reverse",
"step",
"."
] | ad494dc8bce2345567de7689d42291d4b30fbd51 | https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/lojix/search/src/main/com/thesett/aima/search/impl/bidirectional/BaseBiDirectionalQueueSearch.java#L203-L284 | test | Find the path to the goal path. | Of course, here is the Java code you requested:
```java
public SearchNode<O, T> findGoalPath() throws SearchNotExhaustiveException
{
// Keep running until the queue becomes empty or a goal state is found
while (!forwardQueue.isEmpty() || !reverseQueue.isEmpty())
{
// Only run th... |
Unidata/thredds | grib/src/main/java/ucar/nc2/grib/grib1/Grib1Record.java | Grib1Record.getBinaryDataInfo | public GribData.Info getBinaryDataInfo(RandomAccessFile raf) throws IOException {
GribData.Info info = dataSection.getBinaryDataInfo(raf);
info.decimalScaleFactor = pdss.getDecimalScale();
info.bitmapLength = (bitmap == null) ? 0 : bitmap.getLength(raf);
info.nPoints = getGDS().getNpts();
info.... | java | public GribData.Info getBinaryDataInfo(RandomAccessFile raf) throws IOException {
GribData.Info info = dataSection.getBinaryDataInfo(raf);
info.decimalScaleFactor = pdss.getDecimalScale();
info.bitmapLength = (bitmap == null) ? 0 : bitmap.getLength(raf);
info.nPoints = getGDS().getNpts();
info.... | [
"public",
"GribData",
".",
"Info",
"getBinaryDataInfo",
"(",
"RandomAccessFile",
"raf",
")",
"throws",
"IOException",
"{",
"GribData",
".",
"Info",
"info",
"=",
"dataSection",
".",
"getBinaryDataInfo",
"(",
"raf",
")",
";",
"info",
".",
"decimalScaleFactor",
"="... | /*
Read data array: use when you want to be independent of the GribRecord
@param raf from this RandomAccessFile
@param bmPos bitmap.start
@param decimalScale pds.decimalScale
@param scanMode gds.scanMode
@param nx gds.nx
@param ny gds.ny
@return data as float[] array
@throws IOE... | [
"/",
"*",
"Read",
"data",
"array",
":",
"use",
"when",
"you",
"want",
"to",
"be",
"independent",
"of",
"the",
"GribRecord"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/grib/src/main/java/ucar/nc2/grib/grib1/Grib1Record.java#L226-L245 | test | Gets the binary data information from the file. | Of course, here is the Java code you requested:
```java
public GribData.Info getBinaryDataInfo(RandomAccessFile raf) throws IOException {
GribData.Info info = dataSection.getBinaryDataInfo(raf);
info.decimalScaleFactor = pdss.getDecimalScale();
info.bitmapLength = (bitmap == null) ? 0 : bitmap.getLength... |
wildfly/wildfly | jpa/subsystem/src/main/java/org/jboss/as/jpa/puparser/PersistenceUnitXmlParser.java | PersistenceUnitXmlParser.parsePU | private static PersistenceUnitMetadata parsePU(XMLStreamReader reader, Version version, final PropertyReplacer propertyReplacer) throws XMLStreamException {
PersistenceUnitMetadata pu = new PersistenceUnitMetadataImpl();
List<String> classes = new ArrayList<String>(1);
List<String> jarFiles = ne... | java | private static PersistenceUnitMetadata parsePU(XMLStreamReader reader, Version version, final PropertyReplacer propertyReplacer) throws XMLStreamException {
PersistenceUnitMetadata pu = new PersistenceUnitMetadataImpl();
List<String> classes = new ArrayList<String>(1);
List<String> jarFiles = ne... | [
"private",
"static",
"PersistenceUnitMetadata",
"parsePU",
"(",
"XMLStreamReader",
"reader",
",",
"Version",
"version",
",",
"final",
"PropertyReplacer",
"propertyReplacer",
")",
"throws",
"XMLStreamException",
"{",
"PersistenceUnitMetadata",
"pu",
"=",
"new",
"Persistenc... | Parse the persistence unit definitions based on persistence_2_0.xsd.
@param reader
@param propertyReplacer
@return
@throws XMLStreamException | [
"Parse",
"the",
"persistence",
"unit",
"definitions",
"based",
"on",
"persistence_2_0",
".",
"xsd",
"."
] | 64896f1500fe465ad83d96ede9fa19d0c3747f18 | https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/jpa/subsystem/src/main/java/org/jboss/as/jpa/puparser/PersistenceUnitXmlParser.java#L149-L269 | test | Parses the persistence. xml file. | Of course, here is the Java code you requested:
```java
private static PersistenceUnitMetadata parsePU(XMLStreamReader reader, Version version, final PropertyReplacer propertyReplacer) throws XMLStreamException {
PersistenceUnitMetadata pu = new PersistenceUnitMetadataImpl();
List<String> classes = new... |
real-logic/aeron | aeron-cluster/src/main/java/io/aeron/cluster/ClusterMember.java | ClusterMember.haveVotersReachedPosition | public static boolean haveVotersReachedPosition(
final ClusterMember[] clusterMembers, final long position, final long leadershipTermId)
{
for (final ClusterMember member : clusterMembers)
{
if (member.vote != null && (member.logPosition < position || member.leadershipTermId != l... | java | public static boolean haveVotersReachedPosition(
final ClusterMember[] clusterMembers, final long position, final long leadershipTermId)
{
for (final ClusterMember member : clusterMembers)
{
if (member.vote != null && (member.logPosition < position || member.leadershipTermId != l... | [
"public",
"static",
"boolean",
"haveVotersReachedPosition",
"(",
"final",
"ClusterMember",
"[",
"]",
"clusterMembers",
",",
"final",
"long",
"position",
",",
"final",
"long",
"leadershipTermId",
")",
"{",
"for",
"(",
"final",
"ClusterMember",
"member",
":",
"clust... | Has the members of the cluster the voted reached the provided position in their log.
@param clusterMembers to check.
@param position to compare the {@link #logPosition()} against.
@param leadershipTermId expected of the members.
@return true if all members have reached this position otherwise false. | [
"Has",
"the",
"members",
"of",
"the",
"cluster",
"the",
"voted",
"reached",
"the",
"provided",
"position",
"in",
"their",
"log",
"."
] | 045c32f0256d1ea35d562520216affc281a41239 | https://github.com/real-logic/aeron/blob/045c32f0256d1ea35d562520216affc281a41239/aeron-cluster/src/main/java/io/aeron/cluster/ClusterMember.java#L751-L763 | test | Check if the cluster has voters reached the position. | Of course, here is the Java code you requested:
```java
public static boolean haveVotersReachedPosition(
final ClusterMember[] clusterMembers, final long position, final long leadershipTermId)
{
for (final ClusterMember member : clusterMembers)
{
if (member.vote != null && (memb... |
play2-maven-plugin/play2-maven-plugin | play2-providers/play2-provider-play27/src/main/java/com/google/code/play2/provider/play27/run/Reloader.java | Reloader.reload | @Override /* BuildLink interface */
public synchronized Object reload()
{
Object result = null;
try
{
boolean reloadRequired = buildLink.build();
if ( reloadRequired )
{
int version = ++classLoaderVersion;
String name =... | java | @Override /* BuildLink interface */
public synchronized Object reload()
{
Object result = null;
try
{
boolean reloadRequired = buildLink.build();
if ( reloadRequired )
{
int version = ++classLoaderVersion;
String name =... | [
"@",
"Override",
"/* BuildLink interface */",
"public",
"synchronized",
"Object",
"reload",
"(",
")",
"{",
"Object",
"result",
"=",
"null",
";",
"try",
"{",
"boolean",
"reloadRequired",
"=",
"buildLink",
".",
"build",
"(",
")",
";",
"if",
"(",
"reloadRequired"... | Contrary to its name, this doesn't necessarily reload the app. It is invoked on every request, and will only
trigger a reload of the app if something has changed.
Since this communicates across classloaders, it must return only simple objects.
@return Either
- Throwable - If something went wrong (eg, a compile erro... | [
"Contrary",
"to",
"its",
"name",
"this",
"doesn",
"t",
"necessarily",
"reload",
"the",
"app",
".",
"It",
"is",
"invoked",
"on",
"every",
"request",
"and",
"will",
"only",
"trigger",
"a",
"reload",
"of",
"the",
"app",
"if",
"something",
"has",
"changed",
... | 34e174b02c4245cfad64abd230f3cbeda9d9b2f4 | https://github.com/play2-maven-plugin/play2-maven-plugin/blob/34e174b02c4245cfad64abd230f3cbeda9d9b2f4/play2-providers/play2-provider-play27/src/main/java/com/google/code/play2/provider/play27/run/Reloader.java#L70-L103 | test | Reload the current application classloader. | Of course, here is the Java code you requested:
```java
@Override /* BuildLink interface */
public synchronized Object reload()
{
Object result = null;
try
{
boolean reloadRequired = buildLink.build();
if ( reloadRequired )
{
int vers... |
Koekiebox-PTY-LTD/Fluid | fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/user/UserNotificationClient.java | UserNotificationClient.getAllByUserAndDateBetween | public List<UserNotification> getAllByUserAndDateBetween(
User userParam,
Date fromDateParam,
Date toDateParam
) {
return this.getAllByUserAndDateBetween(
userParam,
-1,
-1,
fromDateParam,
toDateParam
);
} | java | public List<UserNotification> getAllByUserAndDateBetween(
User userParam,
Date fromDateParam,
Date toDateParam
) {
return this.getAllByUserAndDateBetween(
userParam,
-1,
-1,
fromDateParam,
toDateParam
);
} | [
"public",
"List",
"<",
"UserNotification",
">",
"getAllByUserAndDateBetween",
"(",
"User",
"userParam",
",",
"Date",
"fromDateParam",
",",
"Date",
"toDateParam",
")",
"{",
"return",
"this",
".",
"getAllByUserAndDateBetween",
"(",
"userParam",
",",
"-",
"1",
",",
... | Retrieves all User Notification items for user {@code userParam}
between date {@code fromDateParam} and {@code toDateParam}.
@param userParam The user to retrieve notifications for.
@param fromDateParam The notification from date.
@param toDateParam The notification to date.
@return The User Notification items for th... | [
"Retrieves",
"all",
"User",
"Notification",
"items",
"for",
"user",
"{",
"@code",
"userParam",
"}",
"between",
"date",
"{",
"@code",
"fromDateParam",
"}",
"and",
"{",
"@code",
"toDateParam",
"}",
"."
] | 81153d865f71b84ca933532c7115717bc3979270 | https://github.com/Koekiebox-PTY-LTD/Fluid/blob/81153d865f71b84ca933532c7115717bc3979270/fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/user/UserNotificationClient.java#L268-L280 | test | Gets all user notifications in this notification collection that have a user and date between the two parameters. | Of course, here is the Java code you requested:
```java
public List<UserNotification> getAllByUserAndDateBetween(
User userParam,
Date fromDateParam,
Date toDateParam
) {
return this.getAllByUserAndDateBetween(
userParam,
-1,
-1,
fromDateParam,
toDateParam
);
}
```
Hope this helps! |
apache/parquet-mr | parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java | ParquetMetadataConverter.fromParquetStatisticsInternal | static org.apache.parquet.column.statistics.Statistics fromParquetStatisticsInternal
(String createdBy, Statistics formatStats, PrimitiveType type, SortOrder typeSortOrder) {
// create stats object based on the column type
org.apache.parquet.column.statistics.Statistics.Builder statsBuilder =
org.... | java | static org.apache.parquet.column.statistics.Statistics fromParquetStatisticsInternal
(String createdBy, Statistics formatStats, PrimitiveType type, SortOrder typeSortOrder) {
// create stats object based on the column type
org.apache.parquet.column.statistics.Statistics.Builder statsBuilder =
org.... | [
"static",
"org",
".",
"apache",
".",
"parquet",
".",
"column",
".",
"statistics",
".",
"Statistics",
"fromParquetStatisticsInternal",
"(",
"String",
"createdBy",
",",
"Statistics",
"formatStats",
",",
"PrimitiveType",
"type",
",",
"SortOrder",
"typeSortOrder",
")",
... | Visible for testing | [
"Visible",
"for",
"testing"
] | 62dcc68acaf64012bf731e103be780956f1f446d | https://github.com/apache/parquet-mr/blob/62dcc68acaf64012bf731e103be780956f1f446d/parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java#L644-L682 | test | Create a new instance of the type statistics object from the Parquet statistics. | Of course, here is the Java code you requested:
```java
static org.apache.parquet.column.statistics.Statistics fromParquetStatisticsInternal
(String createdBy, Statistics formatStats, PrimitiveType type, SortOrder typeSortOrder) {
// create stats object based on the column type
org.apache.parquet.column.... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/Variable.java | Variable.findDimensionIndex | public int findDimensionIndex(String name) {
for (int i = 0; i < dimensions.size(); i++) {
Dimension d = dimensions.get(i);
if (name.equals(d.getShortName()))
return i;
}
return -1;
} | java | public int findDimensionIndex(String name) {
for (int i = 0; i < dimensions.size(); i++) {
Dimension d = dimensions.get(i);
if (name.equals(d.getShortName()))
return i;
}
return -1;
} | [
"public",
"int",
"findDimensionIndex",
"(",
"String",
"name",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"dimensions",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"Dimension",
"d",
"=",
"dimensions",
".",
"get",
"(",
"i",
")"... | Find the index of the named Dimension in this Variable.
@param name the name of the dimension
@return the index of the named Dimension, or -1 if not found. | [
"Find",
"the",
"index",
"of",
"the",
"named",
"Dimension",
"in",
"this",
"Variable",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/Variable.java#L261-L268 | test | Find dimension index. | Of course, here is the Java code you requested:
```java
public int findDimensionIndex(String name) {
for (int i = 0; i < dimensions.size(); i++) {
Dimension d = dimensions.get(i);
if (name.equals(d.getShortName()))
return i;
}
return -1;
}
```
Hope this helps! |
wildfly/wildfly | jsf/subsystem/src/main/java/org/jboss/as/jsf/deployment/JSFModuleIdFactory.java | JSFModuleIdFactory.loadIdsManually | private void loadIdsManually() {
implIds.put("main", ModuleIdentifier.create(IMPL_MODULE));
apiIds.put("main", ModuleIdentifier.create(API_MODULE));
injectionIds.put("main", ModuleIdentifier.create(INJECTION_MODULE));
allVersions.add("main");
activeVersions.add("main");
} | java | private void loadIdsManually() {
implIds.put("main", ModuleIdentifier.create(IMPL_MODULE));
apiIds.put("main", ModuleIdentifier.create(API_MODULE));
injectionIds.put("main", ModuleIdentifier.create(INJECTION_MODULE));
allVersions.add("main");
activeVersions.add("main");
} | [
"private",
"void",
"loadIdsManually",
"(",
")",
"{",
"implIds",
".",
"put",
"(",
"\"main\"",
",",
"ModuleIdentifier",
".",
"create",
"(",
"IMPL_MODULE",
")",
")",
";",
"apiIds",
".",
"put",
"(",
"\"main\"",
",",
"ModuleIdentifier",
".",
"create",
"(",
"API... | just provide the default implementations | [
"just",
"provide",
"the",
"default",
"implementations"
] | 64896f1500fe465ad83d96ede9fa19d0c3747f18 | https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/jsf/subsystem/src/main/java/org/jboss/as/jsf/deployment/JSFModuleIdFactory.java#L94-L102 | test | Load the ids for the main module. | Of course, here is the Java code you requested:
```java
private void loadIdsManually() {
implIds.put("main", ModuleIdentifier.create(IMPL_MODULE));
apiIds.put("main", ModuleIdentifier.create(API_MODULE));
injectionIds.put("main", ModuleIdentifier.create(INJECTION_MODULE));
allVersions.... |
kiegroup/droolsjbpm-tools | drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/PlatformUtils.java | PlatformUtils.refreshRepositoryView | public static void refreshRepositoryView() {
IWorkbenchWindow activeWindow = Activator.getDefault().
getWorkbench().getActiveWorkbenchWindow();
// If there is no active workbench window, then there can be no Repository view
if (activeWindow == null) {
... | java | public static void refreshRepositoryView() {
IWorkbenchWindow activeWindow = Activator.getDefault().
getWorkbench().getActiveWorkbenchWindow();
// If there is no active workbench window, then there can be no Repository view
if (activeWindow == null) {
... | [
"public",
"static",
"void",
"refreshRepositoryView",
"(",
")",
"{",
"IWorkbenchWindow",
"activeWindow",
"=",
"Activator",
".",
"getDefault",
"(",
")",
".",
"getWorkbench",
"(",
")",
".",
"getActiveWorkbenchWindow",
"(",
")",
";",
"// If there is no active workbench wi... | Causes the Repository view to refresh, if it is open. | [
"Causes",
"the",
"Repository",
"view",
"to",
"refresh",
"if",
"it",
"is",
"open",
"."
] | 05e1f73c591178360a198dca29f99d73918991db | https://github.com/kiegroup/droolsjbpm-tools/blob/05e1f73c591178360a198dca29f99d73918991db/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/PlatformUtils.java#L110-L126 | test | Refresh the Repository view. | Of course, here is the Java code you requested:
```java
public static void refreshRepositoryView() {
IWorkbenchWindow activeWindow = Activator.getDefault().
getWorkbench().getActiveWorkbenchWindow();
// If there is no active workbench window, then there can b... |
Unidata/thredds | ui/src/main/java/ucar/nc2/ui/op/BufrTableBViewer.java | BufrTableBViewer.writeDiff | private void writeDiff(TableB wmo, TableB t, Formatter out) {
out.format("#%n# BUFR diff written from %s against %s %n#%n", t.getName(), wmo.getName());
out.format("Class,FXY,enElementName,BUFR_Unit,BUFR_Scale,BUFR_ReferenceValue,BUFR_DataWidth_Bits%n");
List<TableB.Descriptor> listDesc = new ArrayList<>... | java | private void writeDiff(TableB wmo, TableB t, Formatter out) {
out.format("#%n# BUFR diff written from %s against %s %n#%n", t.getName(), wmo.getName());
out.format("Class,FXY,enElementName,BUFR_Unit,BUFR_Scale,BUFR_ReferenceValue,BUFR_DataWidth_Bits%n");
List<TableB.Descriptor> listDesc = new ArrayList<>... | [
"private",
"void",
"writeDiff",
"(",
"TableB",
"wmo",
",",
"TableB",
"t",
",",
"Formatter",
"out",
")",
"{",
"out",
".",
"format",
"(",
"\"#%n# BUFR diff written from %s against %s %n#%n\"",
",",
"t",
".",
"getName",
"(",
")",
",",
"wmo",
".",
"getName",
"("... | /*
Class,FXY,enElementName,BUFR_Unit,BUFR_Scale,BUFR_ReferenceValue,BUFR_DataWidth_Bits,CREX_Unit,CREX_Scale,CREX_DataWidth
20,20009,General weather indicator (TAF/METAR),Code table,0,0,4,Code table,0,2 | [
"/",
"*",
"Class",
"FXY",
"enElementName",
"BUFR_Unit",
"BUFR_Scale",
"BUFR_ReferenceValue",
"BUFR_DataWidth_Bits",
"CREX_Unit",
"CREX_Scale",
"CREX_DataWidth",
"20",
"20009",
"General",
"weather",
"indicator",
"(",
"TAF",
"/",
"METAR",
")",
"Code",
"table",
"0",
"0... | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/ui/src/main/java/ucar/nc2/ui/op/BufrTableBViewer.java#L248-L264 | test | Write the diff between two tables. | Of course, here is the Java code you requested:
```java
private void writeDiff(TableB wmo, TableB t, Formatter out) {
out.format("#%n# BUFR diff written from %s against %s %n#%n", t.getName(), wmo.getName());
out.format("Class,FXY,enElementName,BUFR_Unit,BUFR_Scale,BUFR_ReferenceValue,BUFR_DataWidth_Bits%n")... |
streamsets/datacollector | jdbc-protolib/src/main/java/com/streamsets/pipeline/lib/jdbc/JdbcUtil.java | JdbcUtil.write | public void write(
Batch batch,
SchemaTableClassifier schemaTableClassifier,
LoadingCache<SchemaAndTable, JdbcRecordWriter> recordWriters,
ErrorRecordHandler errorRecordHandler,
boolean perRecord
) throws StageException {
Multimap<SchemaAndTable, Record> partitions = schemaTableClass... | java | public void write(
Batch batch,
SchemaTableClassifier schemaTableClassifier,
LoadingCache<SchemaAndTable, JdbcRecordWriter> recordWriters,
ErrorRecordHandler errorRecordHandler,
boolean perRecord
) throws StageException {
Multimap<SchemaAndTable, Record> partitions = schemaTableClass... | [
"public",
"void",
"write",
"(",
"Batch",
"batch",
",",
"SchemaTableClassifier",
"schemaTableClassifier",
",",
"LoadingCache",
"<",
"SchemaAndTable",
",",
"JdbcRecordWriter",
">",
"recordWriters",
",",
"ErrorRecordHandler",
"errorRecordHandler",
",",
"boolean",
"perRecord"... | Write records to potentially different schemas and tables using EL expressions, and handle errors.
@param batch batch of SDC records
@param schemaTableClassifier classifier to group records according to the schema and table names, resolving the
EL expressions involved.
@param recordWriters JDBC record writer cache
@pa... | [
"Write",
"records",
"to",
"potentially",
"different",
"schemas",
"and",
"tables",
"using",
"EL",
"expressions",
"and",
"handle",
"errors",
"."
] | ea63245ea14d59d5229248387f0628f46131eae5 | https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/jdbc-protolib/src/main/java/com/streamsets/pipeline/lib/jdbc/JdbcUtil.java#L923-L936 | test | Write a batch of records to the database. | Of course, here is the Java code you requested:
```java
public void write(
Batch batch,
SchemaTableClassifier schemaTableClassifier,
LoadingCache<SchemaAndTable, JdbcRecordWriter> recordWriters,
ErrorRecordHandler errorRecordHandler,
boolean perRecord
) throws StageException {
Multi... |
orientechnologies/orientdb | core/src/main/java/com/orientechnologies/orient/core/sql/parser/OFunctionCall.java | OFunctionCall.executeIndexedFunction | public Iterable<OIdentifiable> executeIndexedFunction(OFromClause target, OCommandContext ctx, OBinaryCompareOperator operator,
Object rightValue) {
OSQLFunction function = OSQLEngine.getInstance().getFunction(name.getStringValue());
if (function instanceof OIndexableSQLFunction) {
return ((OIndexab... | java | public Iterable<OIdentifiable> executeIndexedFunction(OFromClause target, OCommandContext ctx, OBinaryCompareOperator operator,
Object rightValue) {
OSQLFunction function = OSQLEngine.getInstance().getFunction(name.getStringValue());
if (function instanceof OIndexableSQLFunction) {
return ((OIndexab... | [
"public",
"Iterable",
"<",
"OIdentifiable",
">",
"executeIndexedFunction",
"(",
"OFromClause",
"target",
",",
"OCommandContext",
"ctx",
",",
"OBinaryCompareOperator",
"operator",
",",
"Object",
"rightValue",
")",
"{",
"OSQLFunction",
"function",
"=",
"OSQLEngine",
"."... | see OIndexableSQLFunction.searchFromTarget()
@param target
@param ctx
@param operator
@param rightValue
@return | [
"see",
"OIndexableSQLFunction",
".",
"searchFromTarget",
"()"
] | d970b12033f0462f0239ea0ad8ed41207e6e26f1 | https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/core/src/main/java/com/orientechnologies/orient/core/sql/parser/OFunctionCall.java#L164-L172 | test | Execute an indexed function. | Of course, here is the Java code you requested:
```java
public Iterable<OIdentifiable> executeIndexedFunction(OFromClause target, OCommandContext ctx, OBinaryCompareOperator operator,
Object rightValue) {
OSQLFunction function = OSQLEngine.getInstance().getFunction(name.getStringValue());
if (function in... |
wildfly/wildfly | ejb3/src/main/java/org/jboss/as/ejb3/timerservice/persistence/database/DatabaseTimerPersistence.java | DatabaseTimerPersistence.setNodeName | private void setNodeName(final TimerState timerState, PreparedStatement statement, int paramIndex) throws SQLException {
if(timerState == TimerState.IN_TIMEOUT || timerState == TimerState.RETRY_TIMEOUT) {
statement.setString(paramIndex, nodeName);
} else {
statement.setNull(param... | java | private void setNodeName(final TimerState timerState, PreparedStatement statement, int paramIndex) throws SQLException {
if(timerState == TimerState.IN_TIMEOUT || timerState == TimerState.RETRY_TIMEOUT) {
statement.setString(paramIndex, nodeName);
} else {
statement.setNull(param... | [
"private",
"void",
"setNodeName",
"(",
"final",
"TimerState",
"timerState",
",",
"PreparedStatement",
"statement",
",",
"int",
"paramIndex",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"timerState",
"==",
"TimerState",
".",
"IN_TIMEOUT",
"||",
"timerState",
"==... | Set the node name for persistence if the state is IN_TIMEOUT or RETRY_TIMEOUT to show which node is current active for the timer. | [
"Set",
"the",
"node",
"name",
"for",
"persistence",
"if",
"the",
"state",
"is",
"IN_TIMEOUT",
"or",
"RETRY_TIMEOUT",
"to",
"show",
"which",
"node",
"is",
"current",
"active",
"for",
"the",
"timer",
"."
] | 64896f1500fe465ad83d96ede9fa19d0c3747f18 | https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/ejb3/src/main/java/org/jboss/as/ejb3/timerservice/persistence/database/DatabaseTimerPersistence.java#L735-L741 | test | Sets the node name. | Of course, here is the Java code you requested:
```java
private void setNodeName(final TimerState timerState, PreparedStatement statement, int paramIndex) throws SQLException {
if(timerState == TimerState.IN_TIMEOUT || timerState == TimerState.RETRY_TIMEOUT) {
statement.setString(paramIndex, nodeNa... |
Unidata/thredds | dap4/d4lib/src/main/java/dap4/dap4lib/DMRPrinter.java | DMRPrinter.printXMLAttributes | void
printXMLAttributes(DapNode node, CEConstraint ce, int flags)
throws IOException
{
if((flags & PERLINE) != 0)
printer.indent(2);
// Print name first, if non-null and !NONAME
// Note that the short name needs to use
// entity escaping (which is done by... | java | void
printXMLAttributes(DapNode node, CEConstraint ce, int flags)
throws IOException
{
if((flags & PERLINE) != 0)
printer.indent(2);
// Print name first, if non-null and !NONAME
// Note that the short name needs to use
// entity escaping (which is done by... | [
"void",
"printXMLAttributes",
"(",
"DapNode",
"node",
",",
"CEConstraint",
"ce",
",",
"int",
"flags",
")",
"throws",
"IOException",
"{",
"if",
"(",
"(",
"flags",
"&",
"PERLINE",
")",
"!=",
"0",
")",
"printer",
".",
"indent",
"(",
"2",
")",
";",
"// Pri... | Print info from the node that needs to be in the form of xml attributes | [
"Print",
"info",
"from",
"the",
"node",
"that",
"needs",
"to",
"be",
"in",
"the",
"form",
"of",
"xml",
"attributes"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/dap4/d4lib/src/main/java/dap4/dap4lib/DMRPrinter.java#L295-L364 | test | Print XML attributes for a single node. | Of course, here is the Java code you requested:
```java
void
printXMLAttributes(DapNode node, CEConstraint ce, int flags)
throws IOException
{
if((flags & PERLINE) != 0)
printer.indent(2);
// Print name first, if non-null and !NONAME
// Note that the short name ... |
eclipse/packagedrone | bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/Parser.java | Parser.parsePlugin | private void parsePlugin(Node parent) throws JasperException {
Attributes attrs = parseAttributes();
reader.skipSpaces();
Node pluginNode = new Node.PlugIn(attrs, start, parent);
parseOptionalBody( pluginNode, "jsp:plugin",
JAVAX_BODY_CONTENT_PLUGIN );
} | java | private void parsePlugin(Node parent) throws JasperException {
Attributes attrs = parseAttributes();
reader.skipSpaces();
Node pluginNode = new Node.PlugIn(attrs, start, parent);
parseOptionalBody( pluginNode, "jsp:plugin",
JAVAX_BODY_CONTENT_PLUGIN );
} | [
"private",
"void",
"parsePlugin",
"(",
"Node",
"parent",
")",
"throws",
"JasperException",
"{",
"Attributes",
"attrs",
"=",
"parseAttributes",
"(",
")",
";",
"reader",
".",
"skipSpaces",
"(",
")",
";",
"Node",
"pluginNode",
"=",
"new",
"Node",
".",
"PlugIn",... | /*
For Plugin:
StdActionContent ::= Attributes PluginBody
PluginBody ::= EmptyBody
| ( '>' S? ( '<jsp:attribute' NamedAttributes )?
'<jsp:body'
( JspBodyPluginTags | <TRANSLATION_ERROR> )
S? ETag
)
| ( '>' S? PluginTags ETag )
EmptyBody ::= '/>'
| ( '>' ETag )
| ( '>' S? '<jsp:attribute' NamedAttributes ETag ) | [
"/",
"*",
"For",
"Plugin",
":",
"StdActionContent",
"::",
"=",
"Attributes",
"PluginBody"
] | 3869c1643cdc6f7cb8b26097a7b6994683b13d7e | https://github.com/eclipse/packagedrone/blob/3869c1643cdc6f7cb8b26097a7b6994683b13d7e/bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/Parser.java#L1272-L1280 | test | Parse a plugin. | Of course, here is the Java code you requested:
```java
private void parsePlugin(Node parent) throws JasperException {
Attributes attrs = parseAttributes();
reader.skipSpaces();
Node pluginNode = new Node.PlugIn(attrs, start, parent);
parseOptionalBody( pluginNode, "jsp:plugin",
... |
Unidata/thredds | grib/src/main/java/ucar/nc2/grib/grib2/table/WmoCodeFlagTables.java | WmoCodeFlagTables.readGribCodes | private void readGribCodes(Version version) throws IOException {
String[] elems = version.getElemNames();
if (elems == null) {
throw new IllegalStateException("unknown version = " + version);
}
try (InputStream ios = WmoCodeFlagTables.class.getResourceAsStream(version.getResourceName())) {
... | java | private void readGribCodes(Version version) throws IOException {
String[] elems = version.getElemNames();
if (elems == null) {
throw new IllegalStateException("unknown version = " + version);
}
try (InputStream ios = WmoCodeFlagTables.class.getResourceAsStream(version.getResourceName())) {
... | [
"private",
"void",
"readGribCodes",
"(",
"Version",
"version",
")",
"throws",
"IOException",
"{",
"String",
"[",
"]",
"elems",
"=",
"version",
".",
"getElemNames",
"(",
")",
";",
"if",
"(",
"elems",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateExce... | /*
Param Table:
<GRIB2_22_0_0_CodeFlag_exp_en>
<No>524</No>
<Title_en>Code table 4.2 - Parameter number by product discipline and parameter category</Title_en>
<SubTitle_en>Product discipline 0 - Meteorological products, parameter category 1: moisture</SubTitle_en>
<CodeFlag>101</CodeFlag>
<MeaningParameterDescription_... | [
"/",
"*",
"Param",
"Table",
":",
"<GRIB2_22_0_0_CodeFlag_exp_en",
">",
"<No",
">",
"524<",
"/",
"No",
">",
"<Title_en",
">",
"Code",
"table",
"4",
".",
"2",
"-",
"Parameter",
"number",
"by",
"product",
"discipline",
"and",
"parameter",
"category<",
"/",
"T... | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/grib/src/main/java/ucar/nc2/grib/grib2/table/WmoCodeFlagTables.java#L149-L218 | test | Read the Grib codes from the given version. | Of course, here is the Java code you requested:
```java
private void readGribCodes(Version version) throws IOException {
String[] elems = version.getElemNames();
if (elems == null) {
throw new IllegalStateException("unknown version = " + version);
}
try (InputStream ios = WmoCodeFlagTables.class... |
Unidata/thredds | legacy/src/main/java/thredds/catalog/InvDatasetImpl.java | InvDatasetImpl.transferInheritableMetadata | private void transferInheritableMetadata(InvDatasetImpl fromDs, ThreddsMetadata target,
boolean copyInheritedMetadataFromParents) {
if (fromDs == null) return;
logger.debug(" transferInheritedMetadata= " + fromDs.getName());
target.add(fromDs.getLocalMetadataInher... | java | private void transferInheritableMetadata(InvDatasetImpl fromDs, ThreddsMetadata target,
boolean copyInheritedMetadataFromParents) {
if (fromDs == null) return;
logger.debug(" transferInheritedMetadata= " + fromDs.getName());
target.add(fromDs.getLocalMetadataInher... | [
"private",
"void",
"transferInheritableMetadata",
"(",
"InvDatasetImpl",
"fromDs",
",",
"ThreddsMetadata",
"target",
",",
"boolean",
"copyInheritedMetadataFromParents",
")",
"{",
"if",
"(",
"fromDs",
"==",
"null",
")",
"return",
";",
"logger",
".",
"debug",
"(",
"... | transfer inherited metadata, consolidating it into target
@param fromDs transfer from here, plus its parents
@param target transfer to here | [
"transfer",
"inherited",
"metadata",
"consolidating",
"it",
"into",
"target"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/legacy/src/main/java/thredds/catalog/InvDatasetImpl.java#L277-L303 | test | transfer inherited metadata from the local dataset to the target | Of course, here is the Java code you requested:
```java
private void transferInheritableMetadata(InvDatasetImpl fromDs, ThreddsMetadata target,
boolean copyInheritedMetadataFromParents) {
if (fromDs == null) return;
logger.debug(" transferInheritedMetadata= " + fromDs... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/util/CompareNetcdf2.java | CompareNetcdf2.compareGroups | private boolean compareGroups(Group org, Group copy, ObjFilter filter) {
if (showCompare) f.format("compare Group %s to %s %n", org.getShortName(), copy.getShortName());
boolean ok = true;
if (!org.getShortName().equals(copy.getShortName())) {
f.format(" ** names are different %s != %s %n", org.... | java | private boolean compareGroups(Group org, Group copy, ObjFilter filter) {
if (showCompare) f.format("compare Group %s to %s %n", org.getShortName(), copy.getShortName());
boolean ok = true;
if (!org.getShortName().equals(copy.getShortName())) {
f.format(" ** names are different %s != %s %n", org.... | [
"private",
"boolean",
"compareGroups",
"(",
"Group",
"org",
",",
"Group",
"copy",
",",
"ObjFilter",
"filter",
")",
"{",
"if",
"(",
"showCompare",
")",
"f",
".",
"format",
"(",
"\"compare Group %s to %s %n\"",
",",
"org",
".",
"getShortName",
"(",
")",
",",
... | /* private boolean compare(List<Dimension> dims1, List<Dimension> dims2) {
if (dims1.size() != dims2.size()) return false;
for (int i = 0; i < dims1.size(); i++) {
Dimension dim1 = dims1.get(i);
Dimension dim2 = dims2.get(i);
if (!dim1.getName().equals(dim2.getName())) return false;
if (dim1.getLength() != dim2.getLeng... | [
"/",
"*",
"private",
"boolean",
"compare",
"(",
"List<Dimension",
">",
"dims1",
"List<Dimension",
">",
"dims2",
")",
"{",
"if",
"(",
"dims1",
".",
"size",
"()",
"!",
"=",
"dims2",
".",
"size",
"()",
")",
"return",
"false",
";",
"for",
"(",
"int",
"i"... | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/util/CompareNetcdf2.java#L202-L252 | test | Compare two groups | Of course, here is the Java code you requested:
```java
private boolean compareGroups(Group org, Group copy, ObjFilter filter) {
if (showCompare) f.format("compare Group %s to %s %n", org.getShortName(), copy.getShortName());
boolean ok = true;
if (!org.getShortName().equals(copy.getShortName())) {
... |
streamsets/datacollector | client-api/src/main/java/com/streamsets/datacollector/client/ApiClient.java | ApiClient.setDPMBaseURL | public ApiClient setDPMBaseURL(String dpmBaseURL) {
if(dpmBaseURL != null && authentication != null) {
authentication.setDPMBaseURL(dpmBaseURL);
}
return this;
} | java | public ApiClient setDPMBaseURL(String dpmBaseURL) {
if(dpmBaseURL != null && authentication != null) {
authentication.setDPMBaseURL(dpmBaseURL);
}
return this;
} | [
"public",
"ApiClient",
"setDPMBaseURL",
"(",
"String",
"dpmBaseURL",
")",
"{",
"if",
"(",
"dpmBaseURL",
"!=",
"null",
"&&",
"authentication",
"!=",
"null",
")",
"{",
"authentication",
".",
"setDPMBaseURL",
"(",
"dpmBaseURL",
")",
";",
"}",
"return",
"this",
... | Helper method to set dpmBaseURL for the first HTTP DPM authentication. | [
"Helper",
"method",
"to",
"set",
"dpmBaseURL",
"for",
"the",
"first",
"HTTP",
"DPM",
"authentication",
"."
] | ea63245ea14d59d5229248387f0628f46131eae5 | https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/client-api/src/main/java/com/streamsets/datacollector/client/ApiClient.java#L143-L148 | test | Set the DPM base URL for the API client. | Of course, here is the Java code you requested:
```java
public ApiClient setDPMBaseURL(String dpmBaseURL) {
if(dpmBaseURL != null && authentication != null) {
authentication.setDPMBaseURL(dpmBaseURL);
}
return this;
}
```
Hope this helps! |
apache/parquet-mr | parquet-column/src/main/java/org/apache/parquet/column/values/delta/DeltaBinaryPackingValuesReader.java | DeltaBinaryPackingValuesReader.unpackMiniBlock | private void unpackMiniBlock(BytePackerForLong packer) throws IOException {
for (int j = 0; j < config.miniBlockSizeInValues; j += 8) {
unpack8Values(packer);
}
} | java | private void unpackMiniBlock(BytePackerForLong packer) throws IOException {
for (int j = 0; j < config.miniBlockSizeInValues; j += 8) {
unpack8Values(packer);
}
} | [
"private",
"void",
"unpackMiniBlock",
"(",
"BytePackerForLong",
"packer",
")",
"throws",
"IOException",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"config",
".",
"miniBlockSizeInValues",
";",
"j",
"+=",
"8",
")",
"{",
"unpack8Values",
"(",
"pack... | mini block has a size of 8*n, unpack 8 value each time
@param packer the packer created from bitwidth of current mini block | [
"mini",
"block",
"has",
"a",
"size",
"of",
"8",
"*",
"n",
"unpack",
"8",
"value",
"each",
"time"
] | 62dcc68acaf64012bf731e103be780956f1f446d | https://github.com/apache/parquet-mr/blob/62dcc68acaf64012bf731e103be780956f1f446d/parquet-column/src/main/java/org/apache/parquet/column/values/delta/DeltaBinaryPackingValuesReader.java#L148-L152 | test | Unpack a mini block. | Of course, here is the Java code you requested:
```java
private void unpackMiniBlock(BytePackerForLong packer) throws IOException {
for (int j = 0; j < config.miniBlockSizeInValues; j += 8) {
unpack8Values(packer);
}
}
```
Hope this helps! |
orientechnologies/orientdb | core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentAbstract.java | ODatabaseDocumentAbstract.checkSecurity | public <DB extends ODatabaseDocument> DB checkSecurity(final ORule.ResourceGeneric iResourceGeneric, final int iOperation,
final Object... iResourcesSpecific) {
if (user != null) {
try {
if (iResourcesSpecific.length != 0) {
for (Object target : iResourcesSpecific) {
if (t... | java | public <DB extends ODatabaseDocument> DB checkSecurity(final ORule.ResourceGeneric iResourceGeneric, final int iOperation,
final Object... iResourcesSpecific) {
if (user != null) {
try {
if (iResourcesSpecific.length != 0) {
for (Object target : iResourcesSpecific) {
if (t... | [
"public",
"<",
"DB",
"extends",
"ODatabaseDocument",
">",
"DB",
"checkSecurity",
"(",
"final",
"ORule",
".",
"ResourceGeneric",
"iResourceGeneric",
",",
"final",
"int",
"iOperation",
",",
"final",
"Object",
"...",
"iResourcesSpecific",
")",
"{",
"if",
"(",
"user... | {@inheritDoc} | [
"{"
] | d970b12033f0462f0239ea0ad8ed41207e6e26f1 | https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentAbstract.java#L386-L410 | test | Check security. | Of course, here is the Java code you requested:
```java
public <DB extends ODatabaseDocument> DB checkSecurity(final ORule.ResourceGeneric iResourceGeneric, final int iOperation,
final Object... iResourcesSpecific) {
if (user != null) {
try {
if (iResourcesSpecific.length != 0) {
for... |
geomajas/geomajas-project-sld-editor | expert-common/src/main/java/org/geomajas/sld/editor/expert/common/server/service/InMemorySldServiceImpl.java | InMemorySldServiceImpl.toXml | public RawSld toXml(StyledLayerDescriptorInfo sldi) throws SldException {
try {
if (sldi.getVersion() == null) {
sldi.setVersion("1.0.0");
}
return parseSldI(sldi);
} catch (JiBXException e) {
throw new SldException("Validation error", e);
}
} | java | public RawSld toXml(StyledLayerDescriptorInfo sldi) throws SldException {
try {
if (sldi.getVersion() == null) {
sldi.setVersion("1.0.0");
}
return parseSldI(sldi);
} catch (JiBXException e) {
throw new SldException("Validation error", e);
}
} | [
"public",
"RawSld",
"toXml",
"(",
"StyledLayerDescriptorInfo",
"sldi",
")",
"throws",
"SldException",
"{",
"try",
"{",
"if",
"(",
"sldi",
".",
"getVersion",
"(",
")",
"==",
"null",
")",
"{",
"sldi",
".",
"setVersion",
"(",
"\"1.0.0\"",
")",
";",
"}",
"re... | Convert StyledLayerDescriptorInfo to raw xml.
@param sldi
@return rawSld
@throws SldException | [
"Convert",
"StyledLayerDescriptorInfo",
"to",
"raw",
"xml",
"."
] | c8571446a7172a08eada40d847f8813d0b07ec69 | https://github.com/geomajas/geomajas-project-sld-editor/blob/c8571446a7172a08eada40d847f8813d0b07ec69/expert-common/src/main/java/org/geomajas/sld/editor/expert/common/server/service/InMemorySldServiceImpl.java#L136-L145 | test | Converts a styled layer descriptor info to an XML string. | Of course, here is the Java code you requested:
```java
public RawSld toXml(StyledLayerDescriptorInfo sldi) throws SldException {
try {
if (sldi.getVersion() == null) {
sldi.setVersion("1.0.0");
}
return parseSldI(sldi);
} catch (JiBXException e) {
throw new SldException("Validation error", e);
}... |
Unidata/thredds | opendap/src/main/java/opendap/servers/CEEvaluator.java | CEEvaluator.evalClauses | public boolean evalClauses(Object specialO) throws NoSuchVariableException, DAP2ServerSideException, IOException {
boolean result = true;
Enumeration ec = getClauses();
while (ec.hasMoreElements() && result == true) {
Object o = ec.nextElement();
if (_Debug) {
... | java | public boolean evalClauses(Object specialO) throws NoSuchVariableException, DAP2ServerSideException, IOException {
boolean result = true;
Enumeration ec = getClauses();
while (ec.hasMoreElements() && result == true) {
Object o = ec.nextElement();
if (_Debug) {
... | [
"public",
"boolean",
"evalClauses",
"(",
"Object",
"specialO",
")",
"throws",
"NoSuchVariableException",
",",
"DAP2ServerSideException",
",",
"IOException",
"{",
"boolean",
"result",
"=",
"true",
";",
"Enumeration",
"ec",
"=",
"getClauses",
"(",
")",
";",
"while",... | Evaluate all of the Clauses in the Clause vector.
@param specialO That special Object that can be passed down
through the <code>DDS.send()</code> method.
@return True if all the Clauses evaluate to true, false otherwise. | [
"Evaluate",
"all",
"of",
"the",
"Clauses",
"in",
"the",
"Clause",
"vector",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/opendap/src/main/java/opendap/servers/CEEvaluator.java#L330-L350 | test | Evaluate all clauses of this DAP2Domain. | Of course, here is the Java code you requested:
```java
public boolean evalClauses(Object specialO) throws NoSuchVariableException, DAP2ServerSideException, IOException {
boolean result = true;
Enumeration ec = getClauses();
while (ec.hasMoreElements() && result == true) {
Object ... |
lessthanoptimal/GeoRegression | main/src/georegression/geometry/GeometryMath_F64.java | GeometryMath_F64.cross | public static void cross( GeoTuple2D_F64 a, GeoTuple3D_F64 b, GeoTuple3D_F64 c ) {
c.x = a.y * b.z - b.y;
c.y = b.x - a.x * b.z;
c.z = a.x * b.y - a.y * b.x;
} | java | public static void cross( GeoTuple2D_F64 a, GeoTuple3D_F64 b, GeoTuple3D_F64 c ) {
c.x = a.y * b.z - b.y;
c.y = b.x - a.x * b.z;
c.z = a.x * b.y - a.y * b.x;
} | [
"public",
"static",
"void",
"cross",
"(",
"GeoTuple2D_F64",
"a",
",",
"GeoTuple3D_F64",
"b",
",",
"GeoTuple3D_F64",
"c",
")",
"{",
"c",
".",
"x",
"=",
"a",
".",
"y",
"*",
"b",
".",
"z",
"-",
"b",
".",
"y",
";",
"c",
".",
"y",
"=",
"b",
".",
"... | <p>
Computes the cross product:<br>
<br>
c = a x b<br>
where 'a' is in homogeneous coordinates.
</p>
@param a Homogeneous coordinates, z = 1 assumed. Not modified.
@param b Not modified.
@param c Modified. | [
"<p",
">",
"Computes",
"the",
"cross",
"product",
":",
"<br",
">",
"<br",
">",
"c",
"=",
"a",
"x",
"b<br",
">",
"where",
"a",
"is",
"in",
"homogeneous",
"coordinates",
".",
"<",
"/",
"p",
">"
] | c067cd44a4e95bd826119f6e658bd82386ef289f | https://github.com/lessthanoptimal/GeoRegression/blob/c067cd44a4e95bd826119f6e658bd82386ef289f/main/src/georegression/geometry/GeometryMath_F64.java#L146-L150 | test | Computes the cross product of two 3D coordinates | Of course, here is the Java code you requested:
```java
public static void cross( GeoTuple2D_F64 a, GeoTuple3D_F64 b, GeoTuple3D_F64 c ) {
c.x = a.y * b.z - b.y;
c.y = b.x - a.x * b.z;
c.z = a.x * b.y - a.y * b.x;
}
```
Hope this helps! |
RestComm/jain-slee | container/common/src/main/java/org/mobicents/slee/runtime/facilities/TracerImpl.java | TracerImpl.info | public void info(String message, Throwable t) throws NullPointerException,
FacilityException {
sendNotification(TraceLevel.INFO, message, t);
logger.info(message,t);
} | java | public void info(String message, Throwable t) throws NullPointerException,
FacilityException {
sendNotification(TraceLevel.INFO, message, t);
logger.info(message,t);
} | [
"public",
"void",
"info",
"(",
"String",
"message",
",",
"Throwable",
"t",
")",
"throws",
"NullPointerException",
",",
"FacilityException",
"{",
"sendNotification",
"(",
"TraceLevel",
".",
"INFO",
",",
"message",
",",
"t",
")",
";",
"logger",
".",
"info",
"(... | /* (non-Javadoc)
@see javax.slee.facilities.Tracer#info(java.lang.String, java.lang.Throwable) | [
"/",
"*",
"(",
"non",
"-",
"Javadoc",
")"
] | 0eaa16ff2d4b6faf43f0d99260e88878fd54dee0 | https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/common/src/main/java/org/mobicents/slee/runtime/facilities/TracerImpl.java#L343-L348 | test | Sends an INFO notification to the application with the specified detail message and exception. | Of course, here is the Java code you requested:
```java
public void info(String message, Throwable t) throws NullPointerException,
FacilityException {
sendNotification(TraceLevel.INFO, message, t);
logger.info(message,t);
}
```
Hope this helps! |
jcodec/jcodec | src/main/java/net/sourceforge/jaad/aac/gain/GainControl.java | GainControl.calculateFunctionData | private void calculateFunctionData(int samples, int band, WindowSequence winSeq, int blockID) {
final int[] locA = new int[10];
final float[] levA = new float[10];
final float[] modFunc = new float[samples];
final float[] buf1 = new float[samples/2];
final float[] buf2 = new float[samples/2];
final float[] ... | java | private void calculateFunctionData(int samples, int band, WindowSequence winSeq, int blockID) {
final int[] locA = new int[10];
final float[] levA = new float[10];
final float[] modFunc = new float[samples];
final float[] buf1 = new float[samples/2];
final float[] buf2 = new float[samples/2];
final float[] ... | [
"private",
"void",
"calculateFunctionData",
"(",
"int",
"samples",
",",
"int",
"band",
",",
"WindowSequence",
"winSeq",
",",
"int",
"blockID",
")",
"{",
"final",
"int",
"[",
"]",
"locA",
"=",
"new",
"int",
"[",
"10",
"]",
";",
"final",
"float",
"[",
"]... | produces gain control function data, stores it in 'function' array | [
"produces",
"gain",
"control",
"function",
"data",
"stores",
"it",
"in",
"function",
"array"
] | cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75 | https://github.com/jcodec/jcodec/blob/cd6efa51ef05f409a8ba8cfb7521f4b4f10ccc75/src/main/java/net/sourceforge/jaad/aac/gain/GainControl.java#L157-L234 | test | Calculate the FMD function data for the given samples and band. | Of course, here is the Java code you requested:
```java
private void calculateFunctionData(int samples, int band, WindowSequence winSeq, int blockID) {
final int[] locA = new int[10];
final float[] levA = new float[10];
final float[] modFunc = new float[samples];
final float[] buf1 = new float[samples/2];
fi... |
Koekiebox-PTY-LTD/Fluid | fluid-api/src/main/java/com/fluidbpm/program/api/vo/field/Field.java | Field.getFieldValueAsDouble | @XmlTransient
public Double getFieldValueAsDouble() {
Object obj = this.getFieldValue();
if(obj == null) {
return null;
}
if(obj instanceof Double) {
return (Double)obj;
}
if(obj instanceof Number) {
return ((Number)obj).doubleValue();
}
return null;
} | java | @XmlTransient
public Double getFieldValueAsDouble() {
Object obj = this.getFieldValue();
if(obj == null) {
return null;
}
if(obj instanceof Double) {
return (Double)obj;
}
if(obj instanceof Number) {
return ((Number)obj).doubleValue();
}
return null;
} | [
"@",
"XmlTransient",
"public",
"Double",
"getFieldValueAsDouble",
"(",
")",
"{",
"Object",
"obj",
"=",
"this",
".",
"getFieldValue",
"(",
")",
";",
"if",
"(",
"obj",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"obj",
"instanceof",
"D... | Gets the value of {@code this} {@code Field} as a {@code Double}.
@return The Field Value.
@see Type | [
"Gets",
"the",
"value",
"of",
"{",
"@code",
"this",
"}",
"{",
"@code",
"Field",
"}",
"as",
"a",
"{",
"@code",
"Double",
"}",
"."
] | 81153d865f71b84ca933532c7115717bc3979270 | https://github.com/Koekiebox-PTY-LTD/Fluid/blob/81153d865f71b84ca933532c7115717bc3979270/fluid-api/src/main/java/com/fluidbpm/program/api/vo/field/Field.java#L417-L433 | test | Gets the value of the field as a Double. | Of course, here is the Java code you requested:
```java
@XmlTransient
public Double getFieldValueAsDouble() {
Object obj = this.getFieldValue();
if(obj == null) {
return null;
}
if(obj instanceof Double) {
return (Double)obj;
}
if(obj instanceof Number) {
return ((Number)obj).doubleValue();
}... |
dbmdz/iiif-apis | src/main/java/de/digitalcollections/iiif/model/image/RotationRequest.java | RotationRequest.fromString | @JsonCreator
public static RotationRequest fromString(String str) throws ResolvingException {
Matcher matcher = PATTERN.matcher(str);
if (!matcher.matches()) {
throw new ResolvingException("Bad format: " + str);
}
return new RotationRequest(
new BigDecimal(matcher.group(2)),
!(ma... | java | @JsonCreator
public static RotationRequest fromString(String str) throws ResolvingException {
Matcher matcher = PATTERN.matcher(str);
if (!matcher.matches()) {
throw new ResolvingException("Bad format: " + str);
}
return new RotationRequest(
new BigDecimal(matcher.group(2)),
!(ma... | [
"@",
"JsonCreator",
"public",
"static",
"RotationRequest",
"fromString",
"(",
"String",
"str",
")",
"throws",
"ResolvingException",
"{",
"Matcher",
"matcher",
"=",
"PATTERN",
".",
"matcher",
"(",
"str",
")",
";",
"if",
"(",
"!",
"matcher",
".",
"matches",
"(... | Parse a rotation request from an IIIF Image API compliant rotation string.
@param str iiif image api compliant rotation string
@return RotationRequest represented by th given string
@throws ResolvingException if the rotation string is malformed | [
"Parse",
"a",
"rotation",
"request",
"from",
"an",
"IIIF",
"Image",
"API",
"compliant",
"rotation",
"string",
"."
] | 3e77c1044ca4bf4acabb38269c7d72af2f042fc8 | https://github.com/dbmdz/iiif-apis/blob/3e77c1044ca4bf4acabb38269c7d72af2f042fc8/src/main/java/de/digitalcollections/iiif/model/image/RotationRequest.java#L24-L33 | test | Create a rotation request from a string. | Of course, here is the Java code you requested:
```java
@JsonCreator
public static RotationRequest fromString(String str) throws ResolvingException {
Matcher matcher = PATTERN.matcher(str);
if (!matcher.matches()) {
throw new ResolvingException("Bad format: " + str);
}
return new RotationReques... |
spring-projects/spring-security | core/src/main/java/org/springframework/security/authentication/jaas/SecurityContextLoginModule.java | SecurityContextLoginModule.commit | public boolean commit() throws LoginException {
if (authen == null) {
return false;
}
subject.getPrincipals().add(authen);
return true;
} | java | public boolean commit() throws LoginException {
if (authen == null) {
return false;
}
subject.getPrincipals().add(authen);
return true;
} | [
"public",
"boolean",
"commit",
"(",
")",
"throws",
"LoginException",
"{",
"if",
"(",
"authen",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"subject",
".",
"getPrincipals",
"(",
")",
".",
"add",
"(",
"authen",
")",
";",
"return",
"true",
";",
... | Authenticate the <code>Subject</code> (phase two) by adding the Spring Security
<code>Authentication</code> to the <code>Subject</code>'s principals.
@return true if this method succeeded, or false if this <code>LoginModule</code>
should be ignored.
@exception LoginException if the commit fails | [
"Authenticate",
"the",
"<code",
">",
"Subject<",
"/",
"code",
">",
"(",
"phase",
"two",
")",
"by",
"adding",
"the",
"Spring",
"Security",
"<code",
">",
"Authentication<",
"/",
"code",
">",
"to",
"the",
"<code",
">",
"Subject<",
"/",
"code",
">",
"s",
"... | 98a8467e4c2ae05b3e09c67ece856944fa48ed23 | https://github.com/spring-projects/spring-security/blob/98a8467e4c2ae05b3e09c67ece856944fa48ed23/core/src/main/java/org/springframework/security/authentication/jaas/SecurityContextLoginModule.java#L98-L106 | test | Commit the transaction. | Of course, here is the Java code you requested:
```java
public boolean commit() throws LoginException {
if (authen == null) {
return false;
}
subject.getPrincipals().add(authen);
return true;
}
```
Hope this helps! |
orientechnologies/orientdb | client/src/main/java/com/orientechnologies/orient/client/remote/OServerAdmin.java | OServerAdmin.listDatabases | @Deprecated
public synchronized Map<String, String> listDatabases() throws IOException {
OListDatabasesRequest request = new OListDatabasesRequest();
OListDatabasesResponse response = networkAdminOperation(request, "Cannot retrieve the configuration list");
return response.getDatabases();
} | java | @Deprecated
public synchronized Map<String, String> listDatabases() throws IOException {
OListDatabasesRequest request = new OListDatabasesRequest();
OListDatabasesResponse response = networkAdminOperation(request, "Cannot retrieve the configuration list");
return response.getDatabases();
} | [
"@",
"Deprecated",
"public",
"synchronized",
"Map",
"<",
"String",
",",
"String",
">",
"listDatabases",
"(",
")",
"throws",
"IOException",
"{",
"OListDatabasesRequest",
"request",
"=",
"new",
"OListDatabasesRequest",
"(",
")",
";",
"OListDatabasesResponse",
"respons... | Returns the list of databases on the connected remote server.
@throws IOException | [
"Returns",
"the",
"list",
"of",
"databases",
"on",
"the",
"connected",
"remote",
"server",
"."
] | d970b12033f0462f0239ea0ad8ed41207e6e26f1 | https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/client/src/main/java/com/orientechnologies/orient/client/remote/OServerAdmin.java#L152-L157 | test | Returns a map of all the databases in the database group. | Of course, here is the Java code you requested:
```java
@Deprecated
public synchronized Map<String, String> listDatabases() throws IOException {
OListDatabasesRequest request = new OListDatabasesRequest();
OListDatabasesResponse response = networkAdminOperation(request, "Cannot retrieve the configuration ... |
real-logic/aeron | aeron-cluster/src/main/java/io/aeron/cluster/service/RecoveryState.java | RecoveryState.getLogPosition | public static long getLogPosition(final CountersReader counters, final int counterId)
{
final DirectBuffer buffer = counters.metaDataBuffer();
if (counters.getCounterState(counterId) == RECORD_ALLOCATED)
{
final int recordOffset = CountersReader.metaDataOffset(counterId);
... | java | public static long getLogPosition(final CountersReader counters, final int counterId)
{
final DirectBuffer buffer = counters.metaDataBuffer();
if (counters.getCounterState(counterId) == RECORD_ALLOCATED)
{
final int recordOffset = CountersReader.metaDataOffset(counterId);
... | [
"public",
"static",
"long",
"getLogPosition",
"(",
"final",
"CountersReader",
"counters",
",",
"final",
"int",
"counterId",
")",
"{",
"final",
"DirectBuffer",
"buffer",
"=",
"counters",
".",
"metaDataBuffer",
"(",
")",
";",
"if",
"(",
"counters",
".",
"getCoun... | Get the position at which the snapshot was taken. {@link Aeron#NULL_VALUE} if no snapshot for recovery.
@param counters to search within.
@param counterId for the active recovery counter.
@return the log position if found otherwise {@link Aeron#NULL_VALUE}. | [
"Get",
"the",
"position",
"at",
"which",
"the",
"snapshot",
"was",
"taken",
".",
"{",
"@link",
"Aeron#NULL_VALUE",
"}",
"if",
"no",
"snapshot",
"for",
"recovery",
"."
] | 045c32f0256d1ea35d562520216affc281a41239 | https://github.com/real-logic/aeron/blob/045c32f0256d1ea35d562520216affc281a41239/aeron-cluster/src/main/java/io/aeron/cluster/service/RecoveryState.java#L187-L202 | test | Gets the log position of a record. | Of course, here is the Java code you requested:
```java
public static long getLogPosition(final CountersReader counters, final int counterId)
{
final DirectBuffer buffer = counters.metaDataBuffer();
if (counters.getCounterState(counterId) == RECORD_ALLOCATED)
{
final int record... |
ReactiveX/RxJava | src/main/java/io/reactivex/Single.java | Single.observeOn | @CheckReturnValue
@NonNull
@SchedulerSupport(SchedulerSupport.CUSTOM)
public final Single<T> observeOn(final Scheduler scheduler) {
ObjectHelper.requireNonNull(scheduler, "scheduler is null");
return RxJavaPlugins.onAssembly(new SingleObserveOn<T>(this, scheduler));
} | java | @CheckReturnValue
@NonNull
@SchedulerSupport(SchedulerSupport.CUSTOM)
public final Single<T> observeOn(final Scheduler scheduler) {
ObjectHelper.requireNonNull(scheduler, "scheduler is null");
return RxJavaPlugins.onAssembly(new SingleObserveOn<T>(this, scheduler));
} | [
"@",
"CheckReturnValue",
"@",
"NonNull",
"@",
"SchedulerSupport",
"(",
"SchedulerSupport",
".",
"CUSTOM",
")",
"public",
"final",
"Single",
"<",
"T",
">",
"observeOn",
"(",
"final",
"Scheduler",
"scheduler",
")",
"{",
"ObjectHelper",
".",
"requireNonNull",
"(",
... | Modifies a Single to emit its item (or notify of its error) on a specified {@link Scheduler},
asynchronously.
<p>
<img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.observeOn.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>you specify which {@link Scheduler} this... | [
"Modifies",
"a",
"Single",
"to",
"emit",
"its",
"item",
"(",
"or",
"notify",
"of",
"its",
"error",
")",
"on",
"a",
"specified",
"{",
"@link",
"Scheduler",
"}",
"asynchronously",
".",
"<p",
">",
"<img",
"width",
"=",
"640",
"height",
"=",
"305",
"src",
... | ac84182aa2bd866b53e01c8e3fe99683b882c60e | https://github.com/ReactiveX/RxJava/blob/ac84182aa2bd866b53e01c8e3fe99683b882c60e/src/main/java/io/reactivex/Single.java#L3115-L3121 | test | Observes the sequence of elements in this sequence using the specified scheduler. | Of course, here is the Java code you requested:
```java
@CheckReturnValue
@NonNull
@SchedulerSupport(SchedulerSupport.CUSTOM)
public final Single<T> observeOn(final Scheduler scheduler) {
ObjectHelper.requireNonNull(scheduler, "scheduler is null");
return RxJavaPlugins.onAssembly(new Single... |
DDTH/ddth-cql-utils | src/main/java/com/github/ddth/cql/internal/SessionIdentifier.java | SessionIdentifier.getInstance | public static SessionIdentifier getInstance(String hostsAndPorts, String username,
String password, String keyspace) {
return getInstance(hostsAndPorts, username, password, null, keyspace);
} | java | public static SessionIdentifier getInstance(String hostsAndPorts, String username,
String password, String keyspace) {
return getInstance(hostsAndPorts, username, password, null, keyspace);
} | [
"public",
"static",
"SessionIdentifier",
"getInstance",
"(",
"String",
"hostsAndPorts",
",",
"String",
"username",
",",
"String",
"password",
",",
"String",
"keyspace",
")",
"{",
"return",
"getInstance",
"(",
"hostsAndPorts",
",",
"username",
",",
"password",
",",... | Helper method to get an instance of {@link SessionIdentifier}.
@param hostsAndPorts
example {@code "localhost:9042,host2,host3:19042"}
@param username
username to authenticate against Cassandra cluster
@param password
password to authenticate against Cassandra cluster
@param keyspace
keyspace to connect to
@return | [
"Helper",
"method",
"to",
"get",
"an",
"instance",
"of",
"{",
"@link",
"SessionIdentifier",
"}",
"."
] | debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489 | https://github.com/DDTH/ddth-cql-utils/blob/debd5d86f64fe06e43d6f0f58cb2f7f0f6a84489/src/main/java/com/github/ddth/cql/internal/SessionIdentifier.java#L44-L47 | test | Create a SessionIdentifier instance from the given parameters. | Of course, here is the Java code you requested:
```java
public static SessionIdentifier getInstance(String hostsAndPorts, String username,
String password, String keyspace) {
return getInstance(hostsAndPorts, username, password, null, keyspace);
}
```
Hope this helps! |
algolia/algoliasearch-client-android | algoliasearch/src/offline/java/com/algolia/search/saas/MirroredIndex.java | MirroredIndex.getObjectOfflineAsync | public Request getObjectOfflineAsync(@NonNull final String objectID, @NonNull final CompletionHandler completionHandler) {
return getObjectOfflineAsync(objectID, null, completionHandler);
} | java | public Request getObjectOfflineAsync(@NonNull final String objectID, @NonNull final CompletionHandler completionHandler) {
return getObjectOfflineAsync(objectID, null, completionHandler);
} | [
"public",
"Request",
"getObjectOfflineAsync",
"(",
"@",
"NonNull",
"final",
"String",
"objectID",
",",
"@",
"NonNull",
"final",
"CompletionHandler",
"completionHandler",
")",
"{",
"return",
"getObjectOfflineAsync",
"(",
"objectID",
",",
"null",
",",
"completionHandler... | Get an individual object, explicitly targeting the offline mirror, not the online API.
@param objectID Identifier of the object to retrieve.
@param completionHandler The listener that will be notified of the request's outcome.
@return A cancellable request.
@throws IllegalStateException if mirroring is not activated o... | [
"Get",
"an",
"individual",
"object",
"explicitly",
"targeting",
"the",
"offline",
"mirror",
"not",
"the",
"online",
"API",
"."
] | 3293ba6e6116a4f6c1face2cc606bc047d6d4a3c | https://github.com/algolia/algoliasearch-client-android/blob/3293ba6e6116a4f6c1face2cc606bc047d6d4a3c/algoliasearch/src/offline/java/com/algolia/search/saas/MirroredIndex.java#L1386-L1388 | test | Get a request that is asynchronous to get a single object from the server. | Of course, here is the Java code you requested:
```java
public Request getObjectOfflineAsync(@NonNull final String objectID, @NonNull final CompletionHandler completionHandler) {
return getObjectOfflineAsync(objectID, null, completionHandler);
}
```
Hope this helps! |
wildfly/wildfly | iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/Util.java | Util.isLegalIDLIdentifierChar | private static boolean isLegalIDLIdentifierChar(char c) {
if (c >= 0x61 && c <= 0x7a)
return true; // lower case letter
if (c >= 0x30 && c <= 0x39)
return true; // digit
if (c >= 0x41 && c <= 0x5a)
return true; // upper case letter
if (c == '_')
... | java | private static boolean isLegalIDLIdentifierChar(char c) {
if (c >= 0x61 && c <= 0x7a)
return true; // lower case letter
if (c >= 0x30 && c <= 0x39)
return true; // digit
if (c >= 0x41 && c <= 0x5a)
return true; // upper case letter
if (c == '_')
... | [
"private",
"static",
"boolean",
"isLegalIDLIdentifierChar",
"(",
"char",
"c",
")",
"{",
"if",
"(",
"c",
">=",
"0x61",
"&&",
"c",
"<=",
"0x7a",
")",
"return",
"true",
";",
"// lower case letter",
"if",
"(",
"c",
">=",
"0x30",
"&&",
"c",
"<=",
"0x39",
")... | Determine if a <code>char</code> is a legal IDL identifier character. | [
"Determine",
"if",
"a",
"<code",
">",
"char<",
"/",
"code",
">",
"is",
"a",
"legal",
"IDL",
"identifier",
"character",
"."
] | 64896f1500fe465ad83d96ede9fa19d0c3747f18 | https://github.com/wildfly/wildfly/blob/64896f1500fe465ad83d96ede9fa19d0c3747f18/iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/Util.java#L396-L410 | test | Checks if the given character is a legal IDL identifier character. | Of course, here is the Java code you requested:
```java
private static boolean isLegalIDLIdentifierChar(char c) {
if (c >= 0x61 && c <= 0x7a)
return true; // lower case letter
if (c >= 0x30 && c <= 0x39)
return true; // digit
if (c >= 0x41 && c <= 0x5a)
ret... |
jboss/jboss-common-core | src/main/java/org/jboss/util/xml/JBossEntityResolver.java | JBossEntityResolver.resolveEntity | public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
{
entityResolved.set(Boolean.FALSE);
// nothing to resolve
if( publicId == null && systemId == null )
return null;
boolean trace = log.isTraceEnabled();
boolean resolvePublicI... | java | public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
{
entityResolved.set(Boolean.FALSE);
// nothing to resolve
if( publicId == null && systemId == null )
return null;
boolean trace = log.isTraceEnabled();
boolean resolvePublicI... | [
"public",
"InputSource",
"resolveEntity",
"(",
"String",
"publicId",
",",
"String",
"systemId",
")",
"throws",
"SAXException",
",",
"IOException",
"{",
"entityResolved",
".",
"set",
"(",
"Boolean",
".",
"FALSE",
")",
";",
"// nothing to resolve",
"if",
"(",
"pub... | Returns DTD/Schema inputSource. The resolution logic is:
1. Check the publicId against the current registered values in the class
mapping of entity name to dtd/schema file name. If found, the resulting
file name is passed to the loadClasspathResource to locate the file as a
classpath resource.
2. Check the systemId a... | [
"Returns",
"DTD",
"/",
"Schema",
"inputSource",
".",
"The",
"resolution",
"logic",
"is",
":"
] | c191bb18db83fa106c6913cf34ed47989b65dc97 | https://github.com/jboss/jboss-common-core/blob/c191bb18db83fa106c6913cf34ed47989b65dc97/src/main/java/org/jboss/util/xml/JBossEntityResolver.java#L292-L353 | test | Resolves the given public and system ID. | Of course, here is the Java code you requested:
```java
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
{
entityResolved.set(Boolean.FALSE);
// nothing to resolve
if( publicId == null && systemId == null )
return null;
boolean tr... |
deliveredtechnologies/rulebook | rulebook-core/src/main/java/com/deliveredtechnologies/rulebook/Result.java | Result.setValue | @Override
public void setValue(T value) {
_lock.writeLock().lock();
try {
_valueMap.put(Thread.currentThread().getId(), value);
} finally {
_lock.writeLock().unlock();
}
} | java | @Override
public void setValue(T value) {
_lock.writeLock().lock();
try {
_valueMap.put(Thread.currentThread().getId(), value);
} finally {
_lock.writeLock().unlock();
}
} | [
"@",
"Override",
"public",
"void",
"setValue",
"(",
"T",
"value",
")",
"{",
"_lock",
".",
"writeLock",
"(",
")",
".",
"lock",
"(",
")",
";",
"try",
"{",
"_valueMap",
".",
"put",
"(",
"Thread",
".",
"currentThread",
"(",
")",
".",
"getId",
"(",
")",... | The method setValue() sets the object to be contained in the Result object.
@param value the object to be stored in the Result object | [
"The",
"method",
"setValue",
"()",
"sets",
"the",
"object",
"to",
"be",
"contained",
"in",
"the",
"Result",
"object",
"."
] | 253738f6bc1e7804bb8649863e969956075a19ae | https://github.com/deliveredtechnologies/rulebook/blob/253738f6bc1e7804bb8649863e969956075a19ae/rulebook-core/src/main/java/com/deliveredtechnologies/rulebook/Result.java#L69-L77 | test | Sets the value of the element. | Of course, here is the Java code you requested:
```java
@Override
public void setValue(T value) {
_lock.writeLock().lock();
try {
_valueMap.put(Thread.currentThread().getId(), value);
} finally {
_lock.writeLock().unlock();
}
}
```
Hope this helps! |
playframework/playframework | core/play/src/main/java/play/Logger.java | Logger.info | @Deprecated
public static void info(String message, Throwable error) {
logger.info(message, error);
} | java | @Deprecated
public static void info(String message, Throwable error) {
logger.info(message, error);
} | [
"@",
"Deprecated",
"public",
"static",
"void",
"info",
"(",
"String",
"message",
",",
"Throwable",
"error",
")",
"{",
"logger",
".",
"info",
"(",
"message",
",",
"error",
")",
";",
"}"
] | Log a message with the INFO level.
@param message message to log
@param error associated exception
@deprecated Deprecated as of 2.7.0. Create an instance of {@link ALogger} via {@link
#of(String)} / {@link #of(Class)} and use the same-named method. Or use SLF4J directly. | [
"Log",
"a",
"message",
"with",
"the",
"INFO",
"level",
"."
] | 3c46dca803d24e715d85de678c59dcfac9525a00 | https://github.com/playframework/playframework/blob/3c46dca803d24e715d85de678c59dcfac9525a00/core/play/src/main/java/play/Logger.java#L328-L331 | test | Log an INFO message with an exception. | Of course, here is the Java code you requested:
```java
@Deprecated
public static void info(String message, Throwable error) {
logger.info(message, error);
}
```
Hope this helps! |
Unidata/thredds | legacy/src/main/java/thredds/catalog/query/DqcFactory.java | DqcFactory.readXML | public QueryCapability readXML(InputStream docIs, URI uri) throws IOException {
// get ready for XML parsing
warnMessages.setLength(0);
errMessages.setLength(0);
fatalMessages.setLength(0);
Document doc = null;
try {
doc = builder.build(docIs);
} catch (JDOMException e) {
fatal... | java | public QueryCapability readXML(InputStream docIs, URI uri) throws IOException {
// get ready for XML parsing
warnMessages.setLength(0);
errMessages.setLength(0);
fatalMessages.setLength(0);
Document doc = null;
try {
doc = builder.build(docIs);
} catch (JDOMException e) {
fatal... | [
"public",
"QueryCapability",
"readXML",
"(",
"InputStream",
"docIs",
",",
"URI",
"uri",
")",
"throws",
"IOException",
"{",
"// get ready for XML parsing",
"warnMessages",
".",
"setLength",
"(",
"0",
")",
";",
"errMessages",
".",
"setLength",
"(",
"0",
")",
";",
... | Create an QueryCapability from an InputStream.
check dqc.isValid, dqc.getErrorMessages() to see if ok.
@param docIs : the InputStream to read from
@param uri : the URI of the document, used for resolving reletive references.
@return an QueryCapability object
@throws IOException on failure | [
"Create",
"an",
"QueryCapability",
"from",
"an",
"InputStream",
".",
"check",
"dqc",
".",
"isValid",
"dqc",
".",
"getErrorMessages",
"()",
"to",
"see",
"if",
"ok",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/legacy/src/main/java/thredds/catalog/query/DqcFactory.java#L232-L247 | test | Read a CRS document from an input stream. | Of course, here is the Java code you requested:
```java
public QueryCapability readXML(InputStream docIs, URI uri) throws IOException {
// get ready for XML parsing
warnMessages.setLength(0);
errMessages.setLength(0);
fatalMessages.setLength(0);
Document doc = null;
try {
doc = builder.... |
real-logic/aeron | aeron-cluster/src/main/java/io/aeron/cluster/ClusterMember.java | ClusterMember.addMemberStatusPublications | public static void addMemberStatusPublications(
final ClusterMember[] members,
final ClusterMember exclude,
final ChannelUri channelUri,
final int streamId,
final Aeron aeron)
{
for (final ClusterMember member : members)
{
if (member != exclude)
... | java | public static void addMemberStatusPublications(
final ClusterMember[] members,
final ClusterMember exclude,
final ChannelUri channelUri,
final int streamId,
final Aeron aeron)
{
for (final ClusterMember member : members)
{
if (member != exclude)
... | [
"public",
"static",
"void",
"addMemberStatusPublications",
"(",
"final",
"ClusterMember",
"[",
"]",
"members",
",",
"final",
"ClusterMember",
"exclude",
",",
"final",
"ChannelUri",
"channelUri",
",",
"final",
"int",
"streamId",
",",
"final",
"Aeron",
"aeron",
")",... | Add the publications for sending status messages to the other members of the cluster.
@param members of the cluster.
@param exclude this member when adding publications.
@param channelUri for the publication.
@param streamId for the publication.
@param aeron to add the publications to. | [
"Add",
"the",
"publications",
"for",
"sending",
"status",
"messages",
"to",
"the",
"other",
"members",
"of",
"the",
"cluster",
"."
] | 045c32f0256d1ea35d562520216affc281a41239 | https://github.com/real-logic/aeron/blob/045c32f0256d1ea35d562520216affc281a41239/aeron-cluster/src/main/java/io/aeron/cluster/ClusterMember.java#L597-L612 | test | Add member status publications. | Of course, here is the Java code you requested:
```java
public static void addMemberStatusPublications(
final ClusterMember[] members,
final ClusterMember exclude,
final ChannelUri channelUri,
final int streamId,
final Aeron aeron)
{
for (final ClusterMember member :... |
jcuda/jcublas | JCublasJava/src/main/java/jcuda/jcublas/JCublas.java | JCublas.cublasSsyr | public static void cublasSsyr(char uplo, int n, float alpha, Pointer x, int incx, Pointer A, int lda)
{
cublasSsyrNative(uplo, n, alpha, x, incx, A, lda);
checkResultBLAS();
} | java | public static void cublasSsyr(char uplo, int n, float alpha, Pointer x, int incx, Pointer A, int lda)
{
cublasSsyrNative(uplo, n, alpha, x, incx, A, lda);
checkResultBLAS();
} | [
"public",
"static",
"void",
"cublasSsyr",
"(",
"char",
"uplo",
",",
"int",
"n",
",",
"float",
"alpha",
",",
"Pointer",
"x",
",",
"int",
"incx",
",",
"Pointer",
"A",
",",
"int",
"lda",
")",
"{",
"cublasSsyrNative",
"(",
"uplo",
",",
"n",
",",
"alpha",... | <pre>
void
cublasSsyr (char uplo, int n, float alpha, const float *x, int incx,
float *A, int lda)
performs the symmetric rank 1 operation
A = alpha * x * transpose(x) + A,
where alpha is a single precision scalar, x is an n element single
precision vector and A is an n x n symmetric matrix consisting of
single prec... | [
"<pre",
">",
"void",
"cublasSsyr",
"(",
"char",
"uplo",
"int",
"n",
"float",
"alpha",
"const",
"float",
"*",
"x",
"int",
"incx",
"float",
"*",
"A",
"int",
"lda",
")"
] | 80875235d24562073f4d66651dd17263f306427d | https://github.com/jcuda/jcublas/blob/80875235d24562073f4d66651dd17263f306427d/JCublasJava/src/main/java/jcuda/jcublas/JCublas.java#L3476-L3480 | test | Cublas syr for symmetric matrix. | Of course, here is the Java code you requested:
```java
public static void cublasSsyr(char uplo, int n, float alpha, Pointer x, int incx, Pointer A, int lda)
{
cublasSsyrNative(uplo, n, alpha, x, incx, A, lda);
checkResultBLAS();
}
```
Hope this helps! |
ngageoint/geopackage-android | geopackage-sdk/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataTiff.java | CoverageDataTiff.createTileTableWithMetadata | public static CoverageDataTiff createTileTableWithMetadata(
GeoPackage geoPackage, String tableName,
BoundingBox contentsBoundingBox, long contentsSrsId,
BoundingBox tileMatrixSetBoundingBox, long tileMatrixSetSrsId) {
CoverageDataTiff coverageData = (CoverageDataTiff) Cover... | java | public static CoverageDataTiff createTileTableWithMetadata(
GeoPackage geoPackage, String tableName,
BoundingBox contentsBoundingBox, long contentsSrsId,
BoundingBox tileMatrixSetBoundingBox, long tileMatrixSetSrsId) {
CoverageDataTiff coverageData = (CoverageDataTiff) Cover... | [
"public",
"static",
"CoverageDataTiff",
"createTileTableWithMetadata",
"(",
"GeoPackage",
"geoPackage",
",",
"String",
"tableName",
",",
"BoundingBox",
"contentsBoundingBox",
",",
"long",
"contentsSrsId",
",",
"BoundingBox",
"tileMatrixSetBoundingBox",
",",
"long",
"tileMat... | Create the coverage data tile table with metadata and extension
@param geoPackage GeoPackage
@param tableName table name
@param contentsBoundingBox contents bounding box
@param contentsSrsId contents srs id
@param tileMatrixSetBoundingBox tile matrix set bounding box
@param... | [
"Create",
"the",
"coverage",
"data",
"tile",
"table",
"with",
"metadata",
"and",
"extension"
] | d19e9fcc636462c0f0ae1b7eca4acafae48de21b | https://github.com/ngageoint/geopackage-android/blob/d19e9fcc636462c0f0ae1b7eca4acafae48de21b/geopackage-sdk/src/main/java/mil/nga/geopackage/extension/coverage/CoverageDataTiff.java#L409-L420 | test | Create a tile table with metadata | Of course, here is the Java code you requested:
```java
public static CoverageDataTiff createTileTableWithMetadata(
GeoPackage geoPackage, String tableName,
BoundingBox contentsBoundingBox, long contentsSrsId,
BoundingBox tileMatrixSetBoundingBox, long tileMatrixSetSrsId) {
... |
orientechnologies/orientdb | graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientElement.java | OrientElement.checkForClassInSchema | protected String checkForClassInSchema(final String className) {
if (className == null)
return null;
OrientBaseGraph graph = getGraph();
if (graph == null)
return className;
final OSchema schema = graph.getRawGraph().getMetadata().getSchema();
if (!schema.existsClass(className)) {
... | java | protected String checkForClassInSchema(final String className) {
if (className == null)
return null;
OrientBaseGraph graph = getGraph();
if (graph == null)
return className;
final OSchema schema = graph.getRawGraph().getMetadata().getSchema();
if (!schema.existsClass(className)) {
... | [
"protected",
"String",
"checkForClassInSchema",
"(",
"final",
"String",
"className",
")",
"{",
"if",
"(",
"className",
"==",
"null",
")",
"return",
"null",
";",
"OrientBaseGraph",
"graph",
"=",
"getGraph",
"(",
")",
";",
"if",
"(",
"graph",
"==",
"null",
"... | Check if a class already exists, otherwise create it at the fly. If a transaction is running commit changes, create the class
and begin a new transaction.
@param className Class's name | [
"Check",
"if",
"a",
"class",
"already",
"exists",
"otherwise",
"create",
"it",
"at",
"the",
"fly",
".",
"If",
"a",
"transaction",
"is",
"running",
"commit",
"changes",
"create",
"the",
"class",
"and",
"begin",
"a",
"new",
"transaction",
"."
] | d970b12033f0462f0239ea0ad8ed41207e6e26f1 | https://github.com/orientechnologies/orientdb/blob/d970b12033f0462f0239ea0ad8ed41207e6e26f1/graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientElement.java#L602-L636 | test | Check if the class name is a subclass of the base class name. | Of course, here is the Java code you requested:
```java
protected String checkForClassInSchema(final String className) {
if (className == null)
return null;
OrientBaseGraph graph = getGraph();
if (graph == null)
return className;
final OSchema schema = graph.getRawGraph().getMetadata().ge... |
kiegroup/droolsjbpm-tools | drools-eclipse/org.guvnor.eclipse.webdav/src/interface/org/eclipse/webdav/dom/Prop.java | Prop.getProperties | public Enumeration getProperties() throws MalformedElementException {
Node firstChild = getChildElement(root, true);
final Node firstElement = firstChild;
Enumeration e = new Enumeration() {
Node currentElement = firstElement;
public boolean hasMoreElements() {
... | java | public Enumeration getProperties() throws MalformedElementException {
Node firstChild = getChildElement(root, true);
final Node firstElement = firstChild;
Enumeration e = new Enumeration() {
Node currentElement = firstElement;
public boolean hasMoreElements() {
... | [
"public",
"Enumeration",
"getProperties",
"(",
")",
"throws",
"MalformedElementException",
"{",
"Node",
"firstChild",
"=",
"getChildElement",
"(",
"root",
",",
"true",
")",
";",
"final",
"Node",
"firstElement",
"=",
"firstChild",
";",
"Enumeration",
"e",
"=",
"n... | Returns an <code>Enumeration</code> over this prop's property
<code>Element</code>s.
@returns an <code>Enumeration</code> of </code>Element</code>s
@throws MalformedElementException if there is reason to believe that
this editor's underlying element is not well formed | [
"Returns",
"an",
"<code",
">",
"Enumeration<",
"/",
"code",
">",
"over",
"this",
"prop",
"s",
"property",
"<code",
">",
"Element<",
"/",
"code",
">",
"s",
"."
] | 05e1f73c591178360a198dca29f99d73918991db | https://github.com/kiegroup/droolsjbpm-tools/blob/05e1f73c591178360a198dca29f99d73918991db/drools-eclipse/org.guvnor.eclipse.webdav/src/interface/org/eclipse/webdav/dom/Prop.java#L93-L112 | test | Get an Enumeration of the properties of the calendar. | Of course, here is the Java code you requested:
```java
public Enumeration getProperties() throws MalformedElementException {
Node firstChild = getChildElement(root, true);
final Node firstElement = firstChild;
Enumeration e = new Enumeration() {
Node currentElement = firstElement;
... |
streamsets/datacollector | wholefile-transformer-lib/src/main/java/com/streamsets/pipeline/stage/processor/transformer/WholeFileTransformerProcessor.java | WholeFileTransformerProcessor.validateRecord | private void validateRecord(Record record) throws StageException {
try {
FileRefUtil.validateWholeFileRecord(record);
} catch (IllegalArgumentException e) {
throw new TransformerStageCheckedException(Errors.CONVERT_01, e.toString(), e);
}
} | java | private void validateRecord(Record record) throws StageException {
try {
FileRefUtil.validateWholeFileRecord(record);
} catch (IllegalArgumentException e) {
throw new TransformerStageCheckedException(Errors.CONVERT_01, e.toString(), e);
}
} | [
"private",
"void",
"validateRecord",
"(",
"Record",
"record",
")",
"throws",
"StageException",
"{",
"try",
"{",
"FileRefUtil",
".",
"validateWholeFileRecord",
"(",
"record",
")",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"e",
")",
"{",
"throw",
"new",
... | Validate the record is a whole file record
@param record the {@link com.streamsets.pipeline.api.Record} whole file record | [
"Validate",
"the",
"record",
"is",
"a",
"whole",
"file",
"record"
] | ea63245ea14d59d5229248387f0628f46131eae5 | https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/wholefile-transformer-lib/src/main/java/com/streamsets/pipeline/stage/processor/transformer/WholeFileTransformerProcessor.java#L170-L176 | test | Validate a single record. | Of course, here is the Java code you requested:
```java
private void validateRecord(Record record) throws StageException {
try {
FileRefUtil.validateWholeFileRecord(record);
} catch (IllegalArgumentException e) {
throw new TransformerStageCheckedException(Errors.CONVERT_01, e.toString(), e);
}
... |
Unidata/thredds | grib/src/main/java/ucar/nc2/grib/grib2/Grib2RecordScanner.java | Grib2RecordScanner.findRecordByDrspos | @Nullable
public static Grib2Record findRecordByDrspos(RandomAccessFile raf, long drsPos) throws IOException {
long pos = Math.max(0, drsPos- (20*1000)); // go back 20K
Grib2RecordScanner scan = new Grib2RecordScanner(raf, pos);
while (scan.hasNext()) {
ucar.nc2.grib.grib2.Grib2Record gr = scan... | java | @Nullable
public static Grib2Record findRecordByDrspos(RandomAccessFile raf, long drsPos) throws IOException {
long pos = Math.max(0, drsPos- (20*1000)); // go back 20K
Grib2RecordScanner scan = new Grib2RecordScanner(raf, pos);
while (scan.hasNext()) {
ucar.nc2.grib.grib2.Grib2Record gr = scan... | [
"@",
"Nullable",
"public",
"static",
"Grib2Record",
"findRecordByDrspos",
"(",
"RandomAccessFile",
"raf",
",",
"long",
"drsPos",
")",
"throws",
"IOException",
"{",
"long",
"pos",
"=",
"Math",
".",
"max",
"(",
"0",
",",
"drsPos",
"-",
"(",
"20",
"*",
"1000"... | tricky bit of business. recapture the entire record based on drs position.
for validation.
@param raf from this RandomAccessFile
@param drsPos Grib2SectionDataRepresentation starts here | [
"tricky",
"bit",
"of",
"business",
".",
"recapture",
"the",
"entire",
"record",
"based",
"on",
"drs",
"position",
".",
"for",
"validation",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/grib/src/main/java/ucar/nc2/grib/grib2/Grib2RecordScanner.java#L61-L72 | test | Find a record in a file by the starting position of the data representation section. | Of course, here is the Java code you requested:
```java
@Nullable
public static Grib2Record findRecordByDrspos(RandomAccessFile raf, long drsPos) throws IOException {
long pos = Math.max(0, drsPos- (20*1000)); // go back 20K
Grib2RecordScanner scan = new Grib2RecordScanner(raf, pos);
while (scan.hasN... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/ft2/coverage/CoordAxisHelper.java | CoordAxisHelper.subsetValues | private Optional<CoverageCoordAxisBuilder> subsetValues(double minValue, double maxValue, int stride) {
if (axis.getSpacing() == CoverageCoordAxis.Spacing.discontiguousInterval)
return subsetValuesDiscontinuous(minValue, maxValue, stride);
double lower = axis.isAscending() ? Math.min(minValue, maxValue) ... | java | private Optional<CoverageCoordAxisBuilder> subsetValues(double minValue, double maxValue, int stride) {
if (axis.getSpacing() == CoverageCoordAxis.Spacing.discontiguousInterval)
return subsetValuesDiscontinuous(minValue, maxValue, stride);
double lower = axis.isAscending() ? Math.min(minValue, maxValue) ... | [
"private",
"Optional",
"<",
"CoverageCoordAxisBuilder",
">",
"subsetValues",
"(",
"double",
"minValue",
",",
"double",
"maxValue",
",",
"int",
"stride",
")",
"{",
"if",
"(",
"axis",
".",
"getSpacing",
"(",
")",
"==",
"CoverageCoordAxis",
".",
"Spacing",
".",
... | look must handle discon interval different | [
"look",
"must",
"handle",
"discon",
"interval",
"different"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/ft2/coverage/CoordAxisHelper.java#L272-L301 | test | Subset the values of a CoverageCoordAxis. | Of course, here is the Java code you requested:
```java
private Optional<CoverageCoordAxisBuilder> subsetValues(double minValue, double maxValue, int stride) {
if (axis.getSpacing() == CoverageCoordAxis.Spacing.discontiguousInterval)
return subsetValuesDiscontinuous(minValue, maxValue, stride);
double l... |
blademainer/common_utils | common_helper/src/main/java/com/xiongyingqi/util/FileSystemUtils.java | FileSystemUtils.doCopyRecursively | private static void doCopyRecursively(File src, File dest) throws IOException {
if (src.isDirectory()) {
dest.mkdir();
File[] entries = src.listFiles();
if (entries == null) {
throw new IOException("Could not list files in directory: " + src);
}
... | java | private static void doCopyRecursively(File src, File dest) throws IOException {
if (src.isDirectory()) {
dest.mkdir();
File[] entries = src.listFiles();
if (entries == null) {
throw new IOException("Could not list files in directory: " + src);
}
... | [
"private",
"static",
"void",
"doCopyRecursively",
"(",
"File",
"src",
",",
"File",
"dest",
")",
"throws",
"IOException",
"{",
"if",
"(",
"src",
".",
"isDirectory",
"(",
")",
")",
"{",
"dest",
".",
"mkdir",
"(",
")",
";",
"File",
"[",
"]",
"entries",
... | Actually copy the contents of the {@code src} file/directory
to the {@code dest} file/directory.
@param src the source directory
@param dest the destination directory
@throws java.io.IOException in the case of I/O errors | [
"Actually",
"copy",
"the",
"contents",
"of",
"the",
"{",
"@code",
"src",
"}",
"file",
"/",
"directory",
"to",
"the",
"{",
"@code",
"dest",
"}",
"file",
"/",
"directory",
"."
] | ef6baf0367c16de95a28caab67a7d5842a6d13db | https://github.com/blademainer/common_utils/blob/ef6baf0367c16de95a28caab67a7d5842a6d13db/common_helper/src/main/java/com/xiongyingqi/util/FileSystemUtils.java#L76-L99 | test | Copy a file or directory recursively. | Of course, here is the Java code you requested:
```java
private static void doCopyRecursively(File src, File dest) throws IOException {
if (src.isDirectory()) {
dest.mkdir();
File[] entries = src.listFiles();
if (entries == null) {
throw new IOException("Coul... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/dataset/conv/NUWGConvention.java | NUWGConvention.searchAliasedDimension | private List<Variable> searchAliasedDimension( NetcdfDataset ds, Dimension dim) {
String dimName = dim.getShortName();
String alias = ds.findAttValueIgnoreCase(null, dimName, null);
if (alias == null)
return null;
List<Variable> vars = new ArrayList<>();
StringTokenizer parser = new St... | java | private List<Variable> searchAliasedDimension( NetcdfDataset ds, Dimension dim) {
String dimName = dim.getShortName();
String alias = ds.findAttValueIgnoreCase(null, dimName, null);
if (alias == null)
return null;
List<Variable> vars = new ArrayList<>();
StringTokenizer parser = new St... | [
"private",
"List",
"<",
"Variable",
">",
"searchAliasedDimension",
"(",
"NetcdfDataset",
"ds",
",",
"Dimension",
"dim",
")",
"{",
"String",
"dimName",
"=",
"dim",
".",
"getShortName",
"(",
")",
";",
"String",
"alias",
"=",
"ds",
".",
"findAttValueIgnoreCase",
... | Search for an aliased coord that may have multiple variables
:dimName = alias1, alias2;
Variable alias1(dim);
Variable alias2(dim);
@param ds search in this dataset
@param dim: look for this dimension name
@return Collection of nectdf variables, or null if none | [
"Search",
"for",
"an",
"aliased",
"coord",
"that",
"may",
"have",
"multiple",
"variables",
":",
"dimName",
"=",
"alias1",
"alias2",
";",
"Variable",
"alias1",
"(",
"dim",
")",
";",
"Variable",
"alias2",
"(",
"dim",
")",
";"
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/dataset/conv/NUWGConvention.java#L263-L288 | test | Search a Dimension in the NetcdfDataset for a variable with the same name as dimName. | Of course, here is the Java code you requested:
```java
private List<Variable> searchAliasedDimension( NetcdfDataset ds, Dimension dim) {
String dimName = dim.getShortName();
String alias = ds.findAttValueIgnoreCase(null, dimName, null);
if (alias == null)
return null;
List<Variable> vars ... |
Netflix/hollow | hollow/src/main/java/com/netflix/hollow/core/index/HollowPrefixIndex.java | HollowPrefixIndex.findKeysWithPrefix | @SuppressWarnings("WeakerAccess")
public HollowOrdinalIterator findKeysWithPrefix(String prefix) {
TST current;
HollowOrdinalIterator it;
do {
current = prefixIndexVolatile;
it = current.findKeysWithPrefix(prefix);
} while (current != this.prefixIndexVolatile)... | java | @SuppressWarnings("WeakerAccess")
public HollowOrdinalIterator findKeysWithPrefix(String prefix) {
TST current;
HollowOrdinalIterator it;
do {
current = prefixIndexVolatile;
it = current.findKeysWithPrefix(prefix);
} while (current != this.prefixIndexVolatile)... | [
"@",
"SuppressWarnings",
"(",
"\"WeakerAccess\"",
")",
"public",
"HollowOrdinalIterator",
"findKeysWithPrefix",
"(",
"String",
"prefix",
")",
"{",
"TST",
"current",
";",
"HollowOrdinalIterator",
"it",
";",
"do",
"{",
"current",
"=",
"prefixIndexVolatile",
";",
"it",... | Query the index to find all the ordinals that match the given prefix. Example -
<pre>{@code
HollowOrdinalIterator iterator = index.findKeysWithPrefix("a");
int ordinal = iterator.next();
while(ordinal != HollowOrdinalIterator.NO_MORE_ORDINAL) {
// print the result using API
}
}</pre>
<p>
For larger data sets, querying ... | [
"Query",
"the",
"index",
"to",
"find",
"all",
"the",
"ordinals",
"that",
"match",
"the",
"given",
"prefix",
".",
"Example",
"-",
"<pre",
">",
"{",
"@code",
"HollowOrdinalIterator",
"iterator",
"=",
"index",
".",
"findKeysWithPrefix",
"(",
"a",
")",
";",
"i... | 43ca100034a01050fb764170bd32b085ac9a3c22 | https://github.com/Netflix/hollow/blob/43ca100034a01050fb764170bd32b085ac9a3c22/hollow/src/main/java/com/netflix/hollow/core/index/HollowPrefixIndex.java#L209-L218 | test | Find all keys with the given prefix. | Of course, here is the Java code you requested:
```java
@SuppressWarnings("WeakerAccess")
public HollowOrdinalIterator findKeysWithPrefix(String prefix) {
TST current;
HollowOrdinalIterator it;
do {
current = prefixIndexVolatile;
it = current.findKeysWithPrefix(prefi... |
OpenEstate/OpenEstate-IO | OpenImmo/src/main/jaxb/org/openestate/io/openimmo/xml/Verkaufstatus.java | Verkaufstatus.setStand | @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
public void setStand(Verkaufstatus.Stand value) {
this.stand = value;
} | java | @Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
public void setStand(Verkaufstatus.Stand value) {
this.stand = value;
} | [
"@",
"Generated",
"(",
"value",
"=",
"\"com.sun.tools.xjc.Driver\"",
",",
"date",
"=",
"\"2018-10-12T02:54:50+02:00\"",
",",
"comments",
"=",
"\"JAXB RI v2.2.11\"",
")",
"public",
"void",
"setStand",
"(",
"Verkaufstatus",
".",
"Stand",
"value",
")",
"{",
"this",
"... | Sets the value of the stand property.
@param value
allowed object is
{@link Verkaufstatus.Stand } | [
"Sets",
"the",
"value",
"of",
"the",
"stand",
"property",
"."
] | f961dae78f40823f05a8c0d4e59d639e718aa18a | https://github.com/OpenEstate/OpenEstate-IO/blob/f961dae78f40823f05a8c0d4e59d639e718aa18a/OpenImmo/src/main/jaxb/org/openestate/io/openimmo/xml/Verkaufstatus.java#L63-L66 | test | Sets the value of the stand property. | Of course, here is the Java code you requested:
```java
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11")
public void setStand(Verkaufstatus.Stand value) {
this.stand = value;
}
```
Hope this helps! |
blademainer/common_utils | common_helper/src/main/java/com/xiongyingqi/util/FileSystemUtils.java | FileSystemUtils.deleteRecursively | public static boolean deleteRecursively(File root) {
if (root != null && root.exists()) {
if (root.isDirectory()) {
File[] children = root.listFiles();
if (children != null) {
for (File child : children) {
deleteRecursively(... | java | public static boolean deleteRecursively(File root) {
if (root != null && root.exists()) {
if (root.isDirectory()) {
File[] children = root.listFiles();
if (children != null) {
for (File child : children) {
deleteRecursively(... | [
"public",
"static",
"boolean",
"deleteRecursively",
"(",
"File",
"root",
")",
"{",
"if",
"(",
"root",
"!=",
"null",
"&&",
"root",
".",
"exists",
"(",
")",
")",
"{",
"if",
"(",
"root",
".",
"isDirectory",
"(",
")",
")",
"{",
"File",
"[",
"]",
"child... | Delete the supplied {@link java.io.File} - for directories,
recursively delete any nested directories or files as well.
@param root the root {@code File} to delete
@return {@code true} if the {@code File} was deleted,
otherwise {@code false} | [
"Delete",
"the",
"supplied",
"{",
"@link",
"java",
".",
"io",
".",
"File",
"}",
"-",
"for",
"directories",
"recursively",
"delete",
"any",
"nested",
"directories",
"or",
"files",
"as",
"well",
"."
] | ef6baf0367c16de95a28caab67a7d5842a6d13db | https://github.com/blademainer/common_utils/blob/ef6baf0367c16de95a28caab67a7d5842a6d13db/common_helper/src/main/java/com/xiongyingqi/util/FileSystemUtils.java#L39-L52 | test | Delete the directory recursively. | Of course, here is the Java code you requested:
```java
public static boolean deleteRecursively(File root) {
if (root != null && root.exists()) {
if (root.isDirectory()) {
File[] children = root.listFiles();
if (children != null) {
for (File child... |
streamsets/datacollector | hdfs-protolib/src/main/java/com/streamsets/pipeline/stage/destination/hdfs/writer/RecordWriterManager.java | RecordWriterManager.shouldRoll | public boolean shouldRoll(RecordWriter writer, Record record) {
if (rollIfHeader && record.getHeader().getAttribute(rollHeaderName) != null) {
LOG.debug("Path[{}] - will be rolled because of roll attribute '{}' set to '{}' in the record : '{}'", writer.getPath(), rollHeaderName, record.getHeader().getAttribut... | java | public boolean shouldRoll(RecordWriter writer, Record record) {
if (rollIfHeader && record.getHeader().getAttribute(rollHeaderName) != null) {
LOG.debug("Path[{}] - will be rolled because of roll attribute '{}' set to '{}' in the record : '{}'", writer.getPath(), rollHeaderName, record.getHeader().getAttribut... | [
"public",
"boolean",
"shouldRoll",
"(",
"RecordWriter",
"writer",
",",
"Record",
"record",
")",
"{",
"if",
"(",
"rollIfHeader",
"&&",
"record",
".",
"getHeader",
"(",
")",
".",
"getAttribute",
"(",
"rollHeaderName",
")",
"!=",
"null",
")",
"{",
"LOG",
".",... | Return true if this record should be written into a new file regardless whether we have a file for the record
currently opened or not. | [
"Return",
"true",
"if",
"this",
"record",
"should",
"be",
"written",
"into",
"a",
"new",
"file",
"regardless",
"whether",
"we",
"have",
"a",
"file",
"for",
"the",
"record",
"currently",
"opened",
"or",
"not",
"."
] | ea63245ea14d59d5229248387f0628f46131eae5 | https://github.com/streamsets/datacollector/blob/ea63245ea14d59d5229248387f0628f46131eae5/hdfs-protolib/src/main/java/com/streamsets/pipeline/stage/destination/hdfs/writer/RecordWriterManager.java#L377-L383 | test | Checks if the roll attribute is set to true in the record. | Of course, here is the Java code you requested:
```java
public boolean shouldRoll(RecordWriter writer, Record record) {
if (rollIfHeader && record.getHeader().getAttribute(rollHeaderName) != null) {
LOG.debug("Path[{}] - will be rolled because of roll attribute '{}' set to '{}' in the record : '{}'", writer.... |
lessthanoptimal/GeoRegression | main/src/georegression/geometry/UtilPolygons2D_I32.java | UtilPolygons2D_I32.isEquivalent | public static boolean isEquivalent( Polygon2D_I32 a , Polygon2D_I32 b ) {
if( a.size() != b.size())
return false;
// first find two vertexes which are the same
Point2D_I32 a0 = a.get(0);
int match = -1;
for (int i = 0; i < b.size(); i++) {
if( a0.equals(b.get(i)) ) {
match = i;
break;
}
}... | java | public static boolean isEquivalent( Polygon2D_I32 a , Polygon2D_I32 b ) {
if( a.size() != b.size())
return false;
// first find two vertexes which are the same
Point2D_I32 a0 = a.get(0);
int match = -1;
for (int i = 0; i < b.size(); i++) {
if( a0.equals(b.get(i)) ) {
match = i;
break;
}
}... | [
"public",
"static",
"boolean",
"isEquivalent",
"(",
"Polygon2D_I32",
"a",
",",
"Polygon2D_I32",
"b",
")",
"{",
"if",
"(",
"a",
".",
"size",
"(",
")",
"!=",
"b",
".",
"size",
"(",
")",
")",
"return",
"false",
";",
"// first find two vertexes which are the sam... | Checks to see if the vertexes of the two polygon's are the same up to the specified tolerance and allows
for a shift in their order
@param a Polygon
@param b Polygon
@return true if identical up to tolerance or false if not | [
"Checks",
"to",
"see",
"if",
"the",
"vertexes",
"of",
"the",
"two",
"polygon",
"s",
"are",
"the",
"same",
"up",
"to",
"the",
"specified",
"tolerance",
"and",
"allows",
"for",
"a",
"shift",
"in",
"their",
"order"
] | c067cd44a4e95bd826119f6e658bd82386ef289f | https://github.com/lessthanoptimal/GeoRegression/blob/c067cd44a4e95bd826119f6e658bd82386ef289f/main/src/georegression/geometry/UtilPolygons2D_I32.java#L203-L230 | test | Checks if two polygons are equivalent. | Of course, here is the Java code you requested:
```java
public static boolean isEquivalent( Polygon2D_I32 a , Polygon2D_I32 b ) {
if( a.size() != b.size())
return false;
// first find two vertexes which are the same
Point2D_I32 a0 = a.get(0);
int match = -1;
for (int i = 0; i < b.size(); i++) {
if( a... |
RestComm/jain-slee | container/services/src/main/java/org/mobicents/slee/container/management/NonSerializableFactory.java | NonSerializableFactory.unbind | public static void unbind(String key) throws NameNotFoundException
{
if( wrapperMap.remove(key) == null )
throw new NameNotFoundException(key+" was not found in the NonSerializableFactory map");
} | java | public static void unbind(String key) throws NameNotFoundException
{
if( wrapperMap.remove(key) == null )
throw new NameNotFoundException(key+" was not found in the NonSerializableFactory map");
} | [
"public",
"static",
"void",
"unbind",
"(",
"String",
"key",
")",
"throws",
"NameNotFoundException",
"{",
"if",
"(",
"wrapperMap",
".",
"remove",
"(",
"key",
")",
"==",
"null",
")",
"throw",
"new",
"NameNotFoundException",
"(",
"key",
"+",
"\" was not found in ... | Remove a binding from the NonSerializableFactory map.
@param key the key into the NonSerializableFactory map to remove.
@throws javax.naming.NameNotFoundException thrown if key does not exist in the
NonSerializableFactory map | [
"Remove",
"a",
"binding",
"from",
"the",
"NonSerializableFactory",
"map",
"."
] | 0eaa16ff2d4b6faf43f0d99260e88878fd54dee0 | https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/services/src/main/java/org/mobicents/slee/container/management/NonSerializableFactory.java#L129-L133 | test | Unbinds a non - serializable class from the wrapper map. | Of course, here is the Java code you requested:
```java
public static void unbind(String key) throws NameNotFoundException
{
if( wrapperMap.remove(key) == null )
throw new NameNotFoundException(key+" was not found in the NonSerializableFactory map");
}
```
Hope this helps! |
Unidata/thredds | dap4/d4core/src/main/java/dap4/core/ce/CEConstraint.java | CEConstraint.expand | public void
expand()
{
// Create a queue of unprocessed leaf compounds
Queue<DapVariable> queue = new ArrayDeque<DapVariable>();
for(int i = 0; i < variables.size(); i++) {
DapVariable var = variables.get(i);
if(!var.isTopLevel())
continue;
... | java | public void
expand()
{
// Create a queue of unprocessed leaf compounds
Queue<DapVariable> queue = new ArrayDeque<DapVariable>();
for(int i = 0; i < variables.size(); i++) {
DapVariable var = variables.get(i);
if(!var.isTopLevel())
continue;
... | [
"public",
"void",
"expand",
"(",
")",
"{",
"// Create a queue of unprocessed leaf compounds",
"Queue",
"<",
"DapVariable",
">",
"queue",
"=",
"new",
"ArrayDeque",
"<",
"DapVariable",
">",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"var... | Locate each unexpanded Structure|Sequence and:
1. check that none of its fields is referenced => do not expand
2. add all of its fields as leaves
Note that #2 may end up adding additional leaf structs &/or seqs | [
"Locate",
"each",
"unexpanded",
"Structure|Sequence",
"and",
":",
"1",
".",
"check",
"that",
"none",
"of",
"its",
"fields",
"is",
"referenced",
"=",
">",
"do",
"not",
"expand",
"2",
".",
"add",
"all",
"of",
"its",
"fields",
"as",
"leaves",
"Note",
"that"... | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/dap4/d4core/src/main/java/dap4/core/ce/CEConstraint.java#L782-L818 | test | Expansion method. | Of course, here is the Java code you requested:
```java
public void
expand()
{
// Create a queue of unprocessed leaf compounds
Queue<DapVariable> queue = new ArrayDeque<DapVariable>();
for(int i = 0; i < variables.size(); i++) {
DapVariable var = variables.get(i);
... |
rupertlssmith/lojix | base/common/src/main/com/thesett/common/util/concurrent/BatchSynchQueueBase.java | BatchSynchQueueBase.put | public void put(E e) throws InterruptedException
{
try
{
tryPut(e);
}
catch (SynchException ex)
{
// This exception is deliberately ignored. See the method comment for information about this.
ex = null;
}
} | java | public void put(E e) throws InterruptedException
{
try
{
tryPut(e);
}
catch (SynchException ex)
{
// This exception is deliberately ignored. See the method comment for information about this.
ex = null;
}
} | [
"public",
"void",
"put",
"(",
"E",
"e",
")",
"throws",
"InterruptedException",
"{",
"try",
"{",
"tryPut",
"(",
"e",
")",
";",
"}",
"catch",
"(",
"SynchException",
"ex",
")",
"{",
"// This exception is deliberately ignored. See the method comment for information about ... | Adds the specified element to this queue, waiting if necessary for space to become available.
<p/>This method delegated to {@link #tryPut} which can raise {@link SynchException}s. If any are raised this
method silently ignores them. Use the {@link #tryPut} method directly if you want to catch these exceptions.
@param... | [
"Adds",
"the",
"specified",
"element",
"to",
"this",
"queue",
"waiting",
"if",
"necessary",
"for",
"space",
"to",
"become",
"available",
"."
] | ad494dc8bce2345567de7689d42291d4b30fbd51 | https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/base/common/src/main/com/thesett/common/util/concurrent/BatchSynchQueueBase.java#L359-L370 | test | Put an object into the cache. | Of course, here is the Java code you requested:
```java
public void put(E e) throws InterruptedException
{
try
{
tryPut(e);
}
catch (SynchException ex)
{
// This exception is deliberately ignored. See the method comment for information about this.
... |
tiefaces/TieFaces | src/org/tiefaces/components/websheet/utility/ConfigurationUtility.java | ConfigurationUtility.changeUpperLevelFinalLength | public static void changeUpperLevelFinalLength(
final Map<String, ConfigRangeAttrs> shiftMap,
final String addedFullName, final int increasedLength) {
String[] parts = addedFullName.split(":");
StringBuilder fname = new StringBuilder();
for (int i = 0; i < (parts.length - 1); i++) {
if (i == 0) {
... | java | public static void changeUpperLevelFinalLength(
final Map<String, ConfigRangeAttrs> shiftMap,
final String addedFullName, final int increasedLength) {
String[] parts = addedFullName.split(":");
StringBuilder fname = new StringBuilder();
for (int i = 0; i < (parts.length - 1); i++) {
if (i == 0) {
... | [
"public",
"static",
"void",
"changeUpperLevelFinalLength",
"(",
"final",
"Map",
"<",
"String",
",",
"ConfigRangeAttrs",
">",
"shiftMap",
",",
"final",
"String",
"addedFullName",
",",
"final",
"int",
"increasedLength",
")",
"{",
"String",
"[",
"]",
"parts",
"=",
... | Increase upper level final length.
@param shiftMap
the shift map
@param addedFullName
the added full name
@param increasedLength
the increased length | [
"Increase",
"upper",
"level",
"final",
"length",
"."
] | 3b57b9701ed0f080b5fa4fa78269cc0c422b34ba | https://github.com/tiefaces/TieFaces/blob/3b57b9701ed0f080b5fa4fa78269cc0c422b34ba/src/org/tiefaces/components/websheet/utility/ConfigurationUtility.java#L254-L269 | test | Change the upper level final length of a file name. | Of course, here is the Java code you requested:
```java
public static void changeUpperLevelFinalLength(
final Map<String, ConfigRangeAttrs> shiftMap,
final String addedFullName, final int increasedLength) {
String[] parts = addedFullName.split(":");
StringBuilder fname = new StringBuilder();
for (int ... |
blademainer/common_utils | common_helper/src/main/java/com/xiongyingqi/util/Judgment.java | Judgment.hasText | public static boolean hasText(String... string) {
if (string == null) {
return false;
}
boolean flag = true;
for (String s : string) {
flag = flag && (s != null && !"".equals(s.trim()));
if (!flag) {
return false;
}
... | java | public static boolean hasText(String... string) {
if (string == null) {
return false;
}
boolean flag = true;
for (String s : string) {
flag = flag && (s != null && !"".equals(s.trim()));
if (!flag) {
return false;
}
... | [
"public",
"static",
"boolean",
"hasText",
"(",
"String",
"...",
"string",
")",
"{",
"if",
"(",
"string",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"boolean",
"flag",
"=",
"true",
";",
"for",
"(",
"String",
"s",
":",
"string",
")",
"{",
"... | 判断String对象是否包含字符(如果全部为空格也返回false)
@param string
@return | [
"判断String对象是否包含字符(如果全部为空格也返回false)"
] | ef6baf0367c16de95a28caab67a7d5842a6d13db | https://github.com/blademainer/common_utils/blob/ef6baf0367c16de95a28caab67a7d5842a6d13db/common_helper/src/main/java/com/xiongyingqi/util/Judgment.java#L16-L29 | test | Check if a string is a string of length 1. | Of course, here is the Java code you requested:
```java
public static boolean hasText(String... string) {
if (string == null) {
return false;
}
boolean flag = true;
for (String s : string) {
flag = flag && (s != null && !"".equals(s.trim()));
if (!fl... |
shamanland/floating-action-button | lib/src/main/java/com/shamanland/fab/FloatingActionButton.java | FloatingActionButton.initBackground | public void initBackground() {
final int backgroundId;
if (mSize == SIZE_MINI) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
backgroundId = R.drawable.com_shamanland_fab_circle_mini;
} else {
backgroundId = R.drawable.com_shamanla... | java | public void initBackground() {
final int backgroundId;
if (mSize == SIZE_MINI) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
backgroundId = R.drawable.com_shamanland_fab_circle_mini;
} else {
backgroundId = R.drawable.com_shamanla... | [
"public",
"void",
"initBackground",
"(",
")",
"{",
"final",
"int",
"backgroundId",
";",
"if",
"(",
"mSize",
"==",
"SIZE_MINI",
")",
"{",
"if",
"(",
"Build",
".",
"VERSION",
".",
"SDK_INT",
">=",
"Build",
".",
"VERSION_CODES",
".",
"LOLLIPOP",
")",
"{",
... | Inflate and initialize background drawable for this view with arguments
inflated from xml or specified using {@link #setSize(int)} or {@link #setColor(int)}
<p/>
Invoked from constructor, but it's allowed to invoke this method manually from code. | [
"Inflate",
"and",
"initialize",
"background",
"drawable",
"for",
"this",
"view",
"with",
"arguments",
"inflated",
"from",
"xml",
"or",
"specified",
"using",
"{"
] | 602b308c1bcd65cf0a64618d1192d32e8d746281 | https://github.com/shamanland/floating-action-button/blob/602b308c1bcd65cf0a64618d1192d32e8d746281/lib/src/main/java/com/shamanland/fab/FloatingActionButton.java#L276-L294 | test | Initialize the background. | Of course, here is the Java code you requested:
```java
public void initBackground() {
final int backgroundId;
if (mSize == SIZE_MINI) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
backgroundId = R.drawable.com_shamanland_fab_circle_mini;
} else... |
rupertlssmith/lojix | base/common/src/main/com/thesett/common/jndi/SimpleContext.java | SimpleContext.unbind | public void unbind(String name) throws NamingException
{
if ("".equals(name))
{
throw new InvalidNameException("Cannot unbind empty name");
}
bindings.remove(name);
} | java | public void unbind(String name) throws NamingException
{
if ("".equals(name))
{
throw new InvalidNameException("Cannot unbind empty name");
}
bindings.remove(name);
} | [
"public",
"void",
"unbind",
"(",
"String",
"name",
")",
"throws",
"NamingException",
"{",
"if",
"(",
"\"\"",
".",
"equals",
"(",
"name",
")",
")",
"{",
"throw",
"new",
"InvalidNameException",
"(",
"\"Cannot unbind empty name\"",
")",
";",
"}",
"bindings",
".... | Unbinds the named object. Removes the terminal atomic name in name from the target context--that named by all but
the terminal atomic part of name.
<p/>This method is idempotent. It succeeds even if the terminal atomic name is not bound in the target context,
but throws NameNotFoundException if any of the intermediate... | [
"Unbinds",
"the",
"named",
"object",
".",
"Removes",
"the",
"terminal",
"atomic",
"name",
"in",
"name",
"from",
"the",
"target",
"context",
"--",
"that",
"named",
"by",
"all",
"but",
"the",
"terminal",
"atomic",
"part",
"of",
"name",
"."
] | ad494dc8bce2345567de7689d42291d4b30fbd51 | https://github.com/rupertlssmith/lojix/blob/ad494dc8bce2345567de7689d42291d4b30fbd51/base/common/src/main/com/thesett/common/jndi/SimpleContext.java#L207-L215 | test | Unbinds a context attribute from an existing context attribute. | Of course, here is the Java code you requested:
```java
public void unbind(String name) throws NamingException
{
if ("".equals(name))
{
throw new InvalidNameException("Cannot unbind empty name");
}
bindings.remove(name);
}
```
Hope this helps! |
liveontologies/elk-reasoner | elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/backwardlinks/BackwardLinkChainFromBackwardLinkRule.java | BackwardLinkChainFromBackwardLinkRule.removeRuleFor | public static boolean removeRuleFor(ForwardLink link, Context context) {
BackwardLinkChainFromBackwardLinkRule rule = context
.getBackwardLinkRuleChain().find(MATCHER_);
return rule == null ? false : rule.forwardLinksByObjectProperty_
.remove(link.getChain(), link.getTarget());
} | java | public static boolean removeRuleFor(ForwardLink link, Context context) {
BackwardLinkChainFromBackwardLinkRule rule = context
.getBackwardLinkRuleChain().find(MATCHER_);
return rule == null ? false : rule.forwardLinksByObjectProperty_
.remove(link.getChain(), link.getTarget());
} | [
"public",
"static",
"boolean",
"removeRuleFor",
"(",
"ForwardLink",
"link",
",",
"Context",
"context",
")",
"{",
"BackwardLinkChainFromBackwardLinkRule",
"rule",
"=",
"context",
".",
"getBackwardLinkRuleChain",
"(",
")",
".",
"find",
"(",
"MATCHER_",
")",
";",
"re... | Removes a {@link BackwardLinkChainFromBackwardLinkRule} inferences for
the given {@link ForwardLink} from the given {@link Context}
@param link
@param context
@return {@code true} if the {@link BackwardLinkChainFromBackwardLinkRule}
stored in the {@link Context} is modified as a result of this
operation | [
"Removes",
"a",
"{",
"@link",
"BackwardLinkChainFromBackwardLinkRule",
"}",
"inferences",
"for",
"the",
"given",
"{",
"@link",
"ForwardLink",
"}",
"from",
"the",
"given",
"{",
"@link",
"Context",
"}"
] | cfbe5279a57e0433d45c1676c7658ddb6e29b9eb | https://github.com/liveontologies/elk-reasoner/blob/cfbe5279a57e0433d45c1676c7658ddb6e29b9eb/elk-reasoner/src/main/java/org/semanticweb/elk/reasoner/saturation/rules/backwardlinks/BackwardLinkChainFromBackwardLinkRule.java#L105-L110 | test | Remove the rule for the given link. | Of course, here is the Java code you requested:
```java
public static boolean removeRuleFor(ForwardLink link, Context context) {
BackwardLinkChainFromBackwardLinkRule rule = context
.getBackwardLinkRuleChain().find(MATCHER_);
return rule == null ? false : rule.forwardLinksByObjectProperty_
.remove(link.get... |
robeio/robe | robe-auth/src/main/java/io/robe/auth/token/TokenAuthenticator.java | TokenAuthenticator.authenticate | @Override
public Optional<BasicToken> authenticate(String tokenString) throws AuthenticationException {
tokenString = tokenString.replaceAll("\"", "");
LOGGER.debug("Authenticating from database: " + tokenString);
try {
// Decode tokenString and get user
BasicToken t... | java | @Override
public Optional<BasicToken> authenticate(String tokenString) throws AuthenticationException {
tokenString = tokenString.replaceAll("\"", "");
LOGGER.debug("Authenticating from database: " + tokenString);
try {
// Decode tokenString and get user
BasicToken t... | [
"@",
"Override",
"public",
"Optional",
"<",
"BasicToken",
">",
"authenticate",
"(",
"String",
"tokenString",
")",
"throws",
"AuthenticationException",
"{",
"tokenString",
"=",
"tokenString",
".",
"replaceAll",
"(",
"\"\\\"\"",
",",
"\"\"",
")",
";",
"LOGGER",
".... | Creates {@link Optional} {@link io.robe.auth.Credentials} instance from provided tokenString
@param tokenString tokenString to decode.
@return Optional instance of a {@link io.robe.auth.Credentials} which created from tokenString
@throws AuthenticationException | [
"Creates",
"{",
"@link",
"Optional",
"}",
"{",
"@link",
"io",
".",
"robe",
".",
"auth",
".",
"Credentials",
"}",
"instance",
"from",
"provided",
"tokenString"
] | a0a8c7cebd1f70f78cf24a66a002859e937badfe | https://github.com/robeio/robe/blob/a0a8c7cebd1f70f78cf24a66a002859e937badfe/robe-auth/src/main/java/io/robe/auth/token/TokenAuthenticator.java#L49-L97 | test | Authenticate method. | Of course, here is the Java code you requested:
```java
@Override
public Optional<BasicToken> authenticate(String tokenString) throws AuthenticationException {
tokenString = tokenString.replaceAll("\"", "");
LOGGER.debug("Authenticating from database: " + tokenString);
try {
//... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/dataset/conv/Cosmic1Convention.java | Cosmic1Convention.togreenw | public double togreenw(double rectt, double utco, double gmst) {
double pi = Math.acos(-1.00);
//
// For each occultation ID, its TU and GMST are the same. However, every
// occultation event takes place at gmst+uts, uts is progressively increasing
// with every occultation event.
doubl... | java | public double togreenw(double rectt, double utco, double gmst) {
double pi = Math.acos(-1.00);
//
// For each occultation ID, its TU and GMST are the same. However, every
// occultation event takes place at gmst+uts, uts is progressively increasing
// with every occultation event.
doubl... | [
"public",
"double",
"togreenw",
"(",
"double",
"rectt",
",",
"double",
"utco",
",",
"double",
"gmst",
")",
"{",
"double",
"pi",
"=",
"Math",
".",
"acos",
"(",
"-",
"1.00",
")",
";",
"//\r",
"// For each occultation ID, its TU and GMST are the same. However, every... | This subroutine is to transform the locations and velocities of the GPS and
LEO satellites from the celestial inertial reference frame to the Earth
centered Greenwich reference frame.
The dummy arguments iyear, month and iday are the calender year, month and
day of the occultation event. The dummy arguments ihour, min... | [
"This",
"subroutine",
"is",
"to",
"transform",
"the",
"locations",
"and",
"velocities",
"of",
"the",
"GPS",
"and",
"LEO",
"satellites",
"from",
"the",
"celestial",
"inertial",
"reference",
"frame",
"to",
"the",
"Earth",
"centered",
"Greenwich",
"reference",
"fra... | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/dataset/conv/Cosmic1Convention.java#L524-L548 | test | Toggles the GMST value of a single occultation ID. | Of course, here is the Java code you requested:
```java
public double togreenw(double rectt, double utco, double gmst) {
double pi = Math.acos(-1.00);
//
// For each occultation ID, its TU and GMST are the same. However, every
// occultation event takes place at gmst+uts, uts is progressively in... |
Unidata/thredds | cdm/src/main/java/ucar/nc2/units/DateRange.java | DateRange.extend | public void extend(DateRange dr) {
boolean localEmpty = isEmpty;
if (localEmpty || dr.getStart().before(getStart()))
setStart(dr.getStart());
if (localEmpty || getEnd().before(dr.getEnd()))
setEnd(dr.getEnd());
} | java | public void extend(DateRange dr) {
boolean localEmpty = isEmpty;
if (localEmpty || dr.getStart().before(getStart()))
setStart(dr.getStart());
if (localEmpty || getEnd().before(dr.getEnd()))
setEnd(dr.getEnd());
} | [
"public",
"void",
"extend",
"(",
"DateRange",
"dr",
")",
"{",
"boolean",
"localEmpty",
"=",
"isEmpty",
";",
"if",
"(",
"localEmpty",
"||",
"dr",
".",
"getStart",
"(",
")",
".",
"before",
"(",
"getStart",
"(",
")",
")",
")",
"setStart",
"(",
"dr",
"."... | Extend this date range by the given one.
@param dr given DateRange | [
"Extend",
"this",
"date",
"range",
"by",
"the",
"given",
"one",
"."
] | d2d68f9eee87f345625211324d71d5dc3e162ee1 | https://github.com/Unidata/thredds/blob/d2d68f9eee87f345625211324d71d5dc3e162ee1/cdm/src/main/java/ucar/nc2/units/DateRange.java#L227-L233 | test | Extend this date range with another date range. | Of course, here is the Java code you requested:
```java
public void extend(DateRange dr) {
boolean localEmpty = isEmpty;
if (localEmpty || dr.getStart().before(getStart()))
setStart(dr.getStart());
if (localEmpty || getEnd().before(dr.getEnd()))
setEnd(dr.getEnd());
}
```
Hope this helps! |
oblac/jodd | jodd-madvoc/src/main/java/jodd/madvoc/result/ServletRedirectActionResult.java | ServletRedirectActionResult.render | @Override
public void render(final ActionRequest actionRequest, final Object resultValue) throws Exception {
final Redirect redirectResult;
if (resultValue == null) {
redirectResult = Redirect.to(StringPool.EMPTY);
} else {
if (resultValue instanceof String) {
redirectResult = Redirect.to((String)resu... | java | @Override
public void render(final ActionRequest actionRequest, final Object resultValue) throws Exception {
final Redirect redirectResult;
if (resultValue == null) {
redirectResult = Redirect.to(StringPool.EMPTY);
} else {
if (resultValue instanceof String) {
redirectResult = Redirect.to((String)resu... | [
"@",
"Override",
"public",
"void",
"render",
"(",
"final",
"ActionRequest",
"actionRequest",
",",
"final",
"Object",
"resultValue",
")",
"throws",
"Exception",
"{",
"final",
"Redirect",
"redirectResult",
";",
"if",
"(",
"resultValue",
"==",
"null",
")",
"{",
"... | Redirects to the given location. Provided path is parsed, action is used as a value context. | [
"Redirects",
"to",
"the",
"given",
"location",
".",
"Provided",
"path",
"is",
"parsed",
"action",
"is",
"used",
"as",
"a",
"value",
"context",
"."
] | 85ad7f813ec0e07ecd27042aeb47ff2047631fa5 | https://github.com/oblac/jodd/blob/85ad7f813ec0e07ecd27042aeb47ff2047631fa5/jodd-madvoc/src/main/java/jodd/madvoc/result/ServletRedirectActionResult.java#L61-L96 | test | Render the result of the action. | Of course, here is the Java code you requested:
```java
@Override
public void render(final ActionRequest actionRequest, final Object resultValue) throws Exception {
final Redirect redirectResult;
if (resultValue == null) {
redirectResult = Redirect.to(StringPool.EMPTY);
} else {
if (resultValue instanceo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.