repository_name stringlengths 7 58 | func_path_in_repository stringlengths 11 218 | func_name stringlengths 4 140 | whole_func_string stringlengths 153 5.32k | language stringclasses 1
value | func_code_string stringlengths 72 4k | func_code_tokens listlengths 20 832 | func_documentation_string stringlengths 61 2k | func_documentation_tokens listlengths 1 647 | split_name stringclasses 1
value | func_code_url stringlengths 102 339 |
|---|---|---|---|---|---|---|---|---|---|---|
UrielCh/ovh-java-sdk | ovh-java-sdk-licenseplesk/src/main/java/net/minidev/ovh/api/ApiOvhLicenseplesk.java | ApiOvhLicenseplesk.serviceName_option_label_GET | public OvhOption serviceName_option_label_GET(String serviceName, net.minidev.ovh.api.license.OvhOptionLabel label) throws IOException {
"""
Get this object properties
REST: GET /license/plesk/{serviceName}/option/{label}
@param serviceName [required] The name of your Plesk license
@param label [required] Thi... | java | public OvhOption serviceName_option_label_GET(String serviceName, net.minidev.ovh.api.license.OvhOptionLabel label) throws IOException {
String qPath = "/license/plesk/{serviceName}/option/{label}";
StringBuilder sb = path(qPath, serviceName, label);
String resp = exec(qPath, "GET", sb.toString(), null);
return... | [
"public",
"OvhOption",
"serviceName_option_label_GET",
"(",
"String",
"serviceName",
",",
"net",
".",
"minidev",
".",
"ovh",
".",
"api",
".",
"license",
".",
"OvhOptionLabel",
"label",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/license/plesk/{s... | Get this object properties
REST: GET /license/plesk/{serviceName}/option/{label}
@param serviceName [required] The name of your Plesk license
@param label [required] This option designation | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-licenseplesk/src/main/java/net/minidev/ovh/api/ApiOvhLicenseplesk.java#L214-L219 |
aws/aws-sdk-java | aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/StepExecution.java | StepExecution.setOutputs | public void setOutputs(java.util.Map<String, java.util.List<String>> outputs) {
"""
<p>
Returned values from the execution of the step.
</p>
@param outputs
Returned values from the execution of the step.
"""
this.outputs = outputs;
} | java | public void setOutputs(java.util.Map<String, java.util.List<String>> outputs) {
this.outputs = outputs;
} | [
"public",
"void",
"setOutputs",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"java",
".",
"util",
".",
"List",
"<",
"String",
">",
">",
"outputs",
")",
"{",
"this",
".",
"outputs",
"=",
"outputs",
";",
"}"
] | <p>
Returned values from the execution of the step.
</p>
@param outputs
Returned values from the execution of the step. | [
"<p",
">",
"Returned",
"values",
"from",
"the",
"execution",
"of",
"the",
"step",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/StepExecution.java#L666-L668 |
astrapi69/jaulp-wicket | jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/application/ApplicationExtensions.java | ApplicationExtensions.setRootRequestMapper | public static IRequestMapper setRootRequestMapper(final Application application,
final int httpPort, final int httpsPort) {
"""
Sets the root request mapper for the given application from the given httpPort and httpsPort.
@param application
the application
@param httpPort
the http port
@param httpsPort
t... | java | public static IRequestMapper setRootRequestMapper(final Application application,
final int httpPort, final int httpsPort)
{
final IRequestMapper httpsMapper = new HttpsMapper(application.getRootRequestMapper(),
new HttpsConfig(httpPort, httpsPort));
application.setRootRequestMapper(httpsMapper);
return http... | [
"public",
"static",
"IRequestMapper",
"setRootRequestMapper",
"(",
"final",
"Application",
"application",
",",
"final",
"int",
"httpPort",
",",
"final",
"int",
"httpsPort",
")",
"{",
"final",
"IRequestMapper",
"httpsMapper",
"=",
"new",
"HttpsMapper",
"(",
"applicat... | Sets the root request mapper for the given application from the given httpPort and httpsPort.
@param application
the application
@param httpPort
the http port
@param httpsPort
the https port
@return the i request mapper | [
"Sets",
"the",
"root",
"request",
"mapper",
"for",
"the",
"given",
"application",
"from",
"the",
"given",
"httpPort",
"and",
"httpsPort",
"."
] | train | https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/application/ApplicationExtensions.java#L519-L526 |
b3dgs/lionengine | lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/TileGroupsConfig.java | TileGroupsConfig.exports | public static void exports(Media groupsConfig, Iterable<TileGroup> groups) {
"""
Export groups to configuration file.
@param groupsConfig The export media (must not be <code>null</code>).
@param groups The groups to export (must not be <code>null</code>).
@throws LionEngineException If unable to write to medi... | java | public static void exports(Media groupsConfig, Iterable<TileGroup> groups)
{
Check.notNull(groupsConfig);
Check.notNull(groups);
final Xml nodeGroups = new Xml(NODE_GROUPS);
nodeGroups.writeString(Constant.XML_HEADER, Constant.ENGINE_WEBSITE);
for (final TileGroup g... | [
"public",
"static",
"void",
"exports",
"(",
"Media",
"groupsConfig",
",",
"Iterable",
"<",
"TileGroup",
">",
"groups",
")",
"{",
"Check",
".",
"notNull",
"(",
"groupsConfig",
")",
";",
"Check",
".",
"notNull",
"(",
"groups",
")",
";",
"final",
"Xml",
"no... | Export groups to configuration file.
@param groupsConfig The export media (must not be <code>null</code>).
@param groups The groups to export (must not be <code>null</code>).
@throws LionEngineException If unable to write to media. | [
"Export",
"groups",
"to",
"configuration",
"file",
"."
] | train | https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/TileGroupsConfig.java#L84-L98 |
aoindustries/aocode-public | src/main/java/com/aoindustries/servlet/http/ServletUtil.java | ServletUtil.getAbsoluteURL | public static void getAbsoluteURL(HttpServletRequest request, String relPath, Appendable out) throws IOException {
"""
Gets an absolute URL for the given context-relative path. This includes
protocol, port, context path, and relative path.
No URL rewriting is performed.
"""
out.append(request.isSecure() ?... | java | public static void getAbsoluteURL(HttpServletRequest request, String relPath, Appendable out) throws IOException {
out.append(request.isSecure() ? "https://" : "http://");
out.append(request.getServerName());
int port = request.getServerPort();
if(port!=(request.isSecure() ? 443 : 80)) out.append(':').append(In... | [
"public",
"static",
"void",
"getAbsoluteURL",
"(",
"HttpServletRequest",
"request",
",",
"String",
"relPath",
",",
"Appendable",
"out",
")",
"throws",
"IOException",
"{",
"out",
".",
"append",
"(",
"request",
".",
"isSecure",
"(",
")",
"?",
"\"https://\"",
":"... | Gets an absolute URL for the given context-relative path. This includes
protocol, port, context path, and relative path.
No URL rewriting is performed. | [
"Gets",
"an",
"absolute",
"URL",
"for",
"the",
"given",
"context",
"-",
"relative",
"path",
".",
"This",
"includes",
"protocol",
"port",
"context",
"path",
"and",
"relative",
"path",
".",
"No",
"URL",
"rewriting",
"is",
"performed",
"."
] | train | https://github.com/aoindustries/aocode-public/blob/c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3/src/main/java/com/aoindustries/servlet/http/ServletUtil.java#L265-L272 |
apache/incubator-atlas | client/src/main/java/org/apache/atlas/AtlasClient.java | AtlasClient.getEntity | public Referenceable getEntity(String guid) throws AtlasServiceException {
"""
Get an entity given the entity id
@param guid entity id
@return result object
@throws AtlasServiceException
"""
JSONObject jsonResponse = callAPIWithBodyAndParams(API.GET_ENTITY, null, guid);
try {
Str... | java | public Referenceable getEntity(String guid) throws AtlasServiceException {
JSONObject jsonResponse = callAPIWithBodyAndParams(API.GET_ENTITY, null, guid);
try {
String entityInstanceDefinition = jsonResponse.getString(AtlasClient.DEFINITION);
return InstanceSerialization.fromJson... | [
"public",
"Referenceable",
"getEntity",
"(",
"String",
"guid",
")",
"throws",
"AtlasServiceException",
"{",
"JSONObject",
"jsonResponse",
"=",
"callAPIWithBodyAndParams",
"(",
"API",
".",
"GET_ENTITY",
",",
"null",
",",
"guid",
")",
";",
"try",
"{",
"String",
"e... | Get an entity given the entity id
@param guid entity id
@return result object
@throws AtlasServiceException | [
"Get",
"an",
"entity",
"given",
"the",
"entity",
"id"
] | train | https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/client/src/main/java/org/apache/atlas/AtlasClient.java#L637-L645 |
d-michail/jheaps | src/main/java/org/jheaps/tree/BinaryTreeSoftAddressableHeap.java | BinaryTreeSoftAddressableHeap.meld | @Override
public void meld(MergeableAddressableHeap<K, V> other) {
"""
{@inheritDoc}
@throws IllegalArgumentException
if {@code other} has a different error rate
"""
BinaryTreeSoftAddressableHeap<K, V> h = (BinaryTreeSoftAddressableHeap<K, V>) other;
// check same comparator
if... | java | @Override
public void meld(MergeableAddressableHeap<K, V> other) {
BinaryTreeSoftAddressableHeap<K, V> h = (BinaryTreeSoftAddressableHeap<K, V>) other;
// check same comparator
if (comparator != null) {
if (h.comparator == null || !h.comparator.equals(comparator)) {
... | [
"@",
"Override",
"public",
"void",
"meld",
"(",
"MergeableAddressableHeap",
"<",
"K",
",",
"V",
">",
"other",
")",
"{",
"BinaryTreeSoftAddressableHeap",
"<",
"K",
",",
"V",
">",
"h",
"=",
"(",
"BinaryTreeSoftAddressableHeap",
"<",
"K",
",",
"V",
">",
")",
... | {@inheritDoc}
@throws IllegalArgumentException
if {@code other} has a different error rate | [
"{",
"@inheritDoc",
"}"
] | train | https://github.com/d-michail/jheaps/blob/7146451dd6591c2a8559dc564c9c40428c4a2c10/src/main/java/org/jheaps/tree/BinaryTreeSoftAddressableHeap.java#L254-L286 |
matthewhorridge/owlapi-gwt | owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectSomeValuesFromImpl_CustomFieldSerializer.java | OWLObjectSomeValuesFromImpl_CustomFieldSerializer.serializeInstance | @Override
public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectSomeValuesFromImpl instance) throws SerializationException {
"""
Serializes the content of the object into the
{@link com.google.gwt.user.client.rpc.SerializationStreamWriter}.
@param streamWriter the {@link com.google... | java | @Override
public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectSomeValuesFromImpl instance) throws SerializationException {
serialize(streamWriter, instance);
} | [
"@",
"Override",
"public",
"void",
"serializeInstance",
"(",
"SerializationStreamWriter",
"streamWriter",
",",
"OWLObjectSomeValuesFromImpl",
"instance",
")",
"throws",
"SerializationException",
"{",
"serialize",
"(",
"streamWriter",
",",
"instance",
")",
";",
"}"
] | Serializes the content of the object into the
{@link com.google.gwt.user.client.rpc.SerializationStreamWriter}.
@param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the
object's content to
@param instance the object instance to serialize
@throws com.google.gwt.user.clie... | [
"Serializes",
"the",
"content",
"of",
"the",
"object",
"into",
"the",
"{",
"@link",
"com",
".",
"google",
".",
"gwt",
".",
"user",
".",
"client",
".",
"rpc",
".",
"SerializationStreamWriter",
"}",
"."
] | train | https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectSomeValuesFromImpl_CustomFieldSerializer.java#L72-L75 |
FXMisc/RichTextFX | richtextfx/src/main/java/org/fxmisc/richtext/CaretSelectionBindImpl.java | CaretSelectionBindImpl.calculatePositionViaBreakingBackwards | private int calculatePositionViaBreakingBackwards(int numOfBreaks, BreakIterator breakIterator, int position) {
"""
Assumes that {@code getArea().getLength != 0} is true and {@link BreakIterator#setText(String)} has been called
"""
breakIterator.preceding(position);
for (int i = 1; i < numOfBre... | java | private int calculatePositionViaBreakingBackwards(int numOfBreaks, BreakIterator breakIterator, int position) {
breakIterator.preceding(position);
for (int i = 1; i < numOfBreaks; i++) {
breakIterator.previous();
}
return breakIterator.current();
} | [
"private",
"int",
"calculatePositionViaBreakingBackwards",
"(",
"int",
"numOfBreaks",
",",
"BreakIterator",
"breakIterator",
",",
"int",
"position",
")",
"{",
"breakIterator",
".",
"preceding",
"(",
"position",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
... | Assumes that {@code getArea().getLength != 0} is true and {@link BreakIterator#setText(String)} has been called | [
"Assumes",
"that",
"{"
] | train | https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/CaretSelectionBindImpl.java#L482-L488 |
jbundle/jbundle | base/screen/model/src/main/java/org/jbundle/base/screen/model/BasePanel.java | BasePanel.setSelectQuery | public boolean setSelectQuery(Rec selectTable, boolean bUpdateOnSelect) {
"""
Find the sub-screen that uses this grid query and set for selection.
When you select a new record here, you read the same record in the SelectQuery.
(Override to do something).
@param selectTable The record which is synced on record c... | java | public boolean setSelectQuery(Rec selectTable, boolean bUpdateOnSelect)
{ // If this screen can't accept a select BaseTable, find the one that can
for (Enumeration<ScreenField> e = m_SFieldList.elements() ; e.hasMoreElements() ;)
{ // This should only be called for Imaged GridScreens (Child ... | [
"public",
"boolean",
"setSelectQuery",
"(",
"Rec",
"selectTable",
",",
"boolean",
"bUpdateOnSelect",
")",
"{",
"// If this screen can't accept a select BaseTable, find the one that can",
"for",
"(",
"Enumeration",
"<",
"ScreenField",
">",
"e",
"=",
"m_SFieldList",
".",
"e... | Find the sub-screen that uses this grid query and set for selection.
When you select a new record here, you read the same record in the SelectQuery.
(Override to do something).
@param selectTable The record which is synced on record change.
@param bUpdateOnSelect Do I update the current record if a selection occurs.
@r... | [
"Find",
"the",
"sub",
"-",
"screen",
"that",
"uses",
"this",
"grid",
"query",
"and",
"set",
"for",
"selection",
".",
"When",
"you",
"select",
"a",
"new",
"record",
"here",
"you",
"read",
"the",
"same",
"record",
"in",
"the",
"SelectQuery",
".",
"(",
"O... | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/BasePanel.java#L1304-L1313 |
kiswanij/jk-util | src/main/java/com/jk/util/JKDateTimeUtil.java | JKDateTimeUtil.getDifference | public static long getDifference(Time timeFrom, Time timeTo) {
"""
Gets the difference.
@param timeFrom the time from
@param timeTo the time to
@return the difference
"""
try {
DateFormat format = new SimpleDateFormat("HH:mm:ss");
// the a means am/pm marker
Date date = format.parse(timeF... | java | public static long getDifference(Time timeFrom, Time timeTo) {
try {
DateFormat format = new SimpleDateFormat("HH:mm:ss");
// the a means am/pm marker
Date date = format.parse(timeFrom.toString());
Date date2 = format.parse(timeTo.toString());
long difference = (date2.getTime() - date.getTime()) ... | [
"public",
"static",
"long",
"getDifference",
"(",
"Time",
"timeFrom",
",",
"Time",
"timeTo",
")",
"{",
"try",
"{",
"DateFormat",
"format",
"=",
"new",
"SimpleDateFormat",
"(",
"\"HH:mm:ss\"",
")",
";",
"// the a means am/pm marker\r",
"Date",
"date",
"=",
"forma... | Gets the difference.
@param timeFrom the time from
@param timeTo the time to
@return the difference | [
"Gets",
"the",
"difference",
"."
] | train | https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/JKDateTimeUtil.java#L276-L287 |
GeoLatte/geolatte-common | src/main/java/org/geolatte/common/dataformats/json/jackson/LineStringSerializer.java | LineStringSerializer.writeShapeSpecificSerialization | @Override
public void writeShapeSpecificSerialization(LineString value, JsonGenerator jgen, SerializerProvider provider)
throws IOException {
"""
Method that can be called to ask implementation to serialize values of type this serializer handles.
@param value Value to serialize; can not be nu... | java | @Override
public void writeShapeSpecificSerialization(LineString value, JsonGenerator jgen, SerializerProvider provider)
throws IOException {
jgen.writeFieldName("type");
jgen.writeString("LineString");
jgen.writeArrayFieldStart("coordinates");
// set beanproperty to null... | [
"@",
"Override",
"public",
"void",
"writeShapeSpecificSerialization",
"(",
"LineString",
"value",
",",
"JsonGenerator",
"jgen",
",",
"SerializerProvider",
"provider",
")",
"throws",
"IOException",
"{",
"jgen",
".",
"writeFieldName",
"(",
"\"type\"",
")",
";",
"jgen"... | Method that can be called to ask implementation to serialize values of type this serializer handles.
@param value Value to serialize; can not be null.
@param jgen Generator used to output resulting Json content
@param provider Provider that can be used to get serializers for serializing Objects value contains, ... | [
"Method",
"that",
"can",
"be",
"called",
"to",
"ask",
"implementation",
"to",
"serialize",
"values",
"of",
"type",
"this",
"serializer",
"handles",
"."
] | train | https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/jackson/LineStringSerializer.java#L60-L76 |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/service/elevation/ElevationService.java | ElevationService.getElevationForLocations | public void getElevationForLocations(LocationElevationRequest req, ElevationServiceCallback callback) {
"""
Create a request for elevations for multiple locations.
@param req
@param callback
"""
this.callback = callback;
JSObject doc = (JSObject) getJSObject().eval("docume... | java | public void getElevationForLocations(LocationElevationRequest req, ElevationServiceCallback callback) {
this.callback = callback;
JSObject doc = (JSObject) getJSObject().eval("document");
doc.setMember(getVariableName(), this);
StringBuilder r = new StringBuild... | [
"public",
"void",
"getElevationForLocations",
"(",
"LocationElevationRequest",
"req",
",",
"ElevationServiceCallback",
"callback",
")",
"{",
"this",
".",
"callback",
"=",
"callback",
";",
"JSObject",
"doc",
"=",
"(",
"JSObject",
")",
"getJSObject",
"(",
")",
".",
... | Create a request for elevations for multiple locations.
@param req
@param callback | [
"Create",
"a",
"request",
"for",
"elevations",
"for",
"multiple",
"locations",
"."
] | train | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/service/elevation/ElevationService.java#L36-L56 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/ZoneOperationId.java | ZoneOperationId.of | public static ZoneOperationId of(ZoneId zoneId, String operation) {
"""
Returns a zone operation identity given the zone identity and the operation name.
"""
return new ZoneOperationId(zoneId.getProject(), zoneId.getZone(), operation);
} | java | public static ZoneOperationId of(ZoneId zoneId, String operation) {
return new ZoneOperationId(zoneId.getProject(), zoneId.getZone(), operation);
} | [
"public",
"static",
"ZoneOperationId",
"of",
"(",
"ZoneId",
"zoneId",
",",
"String",
"operation",
")",
"{",
"return",
"new",
"ZoneOperationId",
"(",
"zoneId",
".",
"getProject",
"(",
")",
",",
"zoneId",
".",
"getZone",
"(",
")",
",",
"operation",
")",
";",... | Returns a zone operation identity given the zone identity and the operation name. | [
"Returns",
"a",
"zone",
"operation",
"identity",
"given",
"the",
"zone",
"identity",
"and",
"the",
"operation",
"name",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/ZoneOperationId.java#L91-L93 |
roboconf/roboconf-platform | core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java | Utils.updateProperties | public static String updateProperties( String propertiesContent, Map<String,String> keyToNewValue ) {
"""
Updates string properties.
@param propertiesContent the properties file as a string
@param keyToNewValue the keys to update with their new values
@return a non-null string
"""
for( Map.Entry<String,S... | java | public static String updateProperties( String propertiesContent, Map<String,String> keyToNewValue ) {
for( Map.Entry<String,String> entry : keyToNewValue.entrySet()) {
propertiesContent = propertiesContent.replaceFirst(
"(?mi)^\\s*" + entry.getKey() + "\\s*[:=][^\n]*$",
entry.getKey() + " = " + entry.ge... | [
"public",
"static",
"String",
"updateProperties",
"(",
"String",
"propertiesContent",
",",
"Map",
"<",
"String",
",",
"String",
">",
"keyToNewValue",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"String",
">",
"entry",
":",
"keyToNewValue",... | Updates string properties.
@param propertiesContent the properties file as a string
@param keyToNewValue the keys to update with their new values
@return a non-null string | [
"Updates",
"string",
"properties",
"."
] | train | https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L656-L665 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/serialize/SerializerUtils.java | SerializerUtils.addAttributes | public static void addAttributes(SerializationHandler handler, int src)
throws TransformerException {
"""
Copy DOM attributes to the result element.
@param src Source node with the attributes
@throws TransformerException
"""
TransformerImpl transformer =
(TransformerImpl) han... | java | public static void addAttributes(SerializationHandler handler, int src)
throws TransformerException
{
TransformerImpl transformer =
(TransformerImpl) handler.getTransformer();
DTM dtm = transformer.getXPathContext().getDTM(src);
for (int node = dtm.getFirstAttribute(src... | [
"public",
"static",
"void",
"addAttributes",
"(",
"SerializationHandler",
"handler",
",",
"int",
"src",
")",
"throws",
"TransformerException",
"{",
"TransformerImpl",
"transformer",
"=",
"(",
"TransformerImpl",
")",
"handler",
".",
"getTransformer",
"(",
")",
";",
... | Copy DOM attributes to the result element.
@param src Source node with the attributes
@throws TransformerException | [
"Copy",
"DOM",
"attributes",
"to",
"the",
"result",
"element",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/serialize/SerializerUtils.java#L93-L107 |
groupe-sii/ogham | ogham-core/src/main/java/fr/sii/ogham/sms/message/Sms.java | Sms.to | public Sms to(String name, PhoneNumber number) {
"""
Add a recipient specifying the name and the phone number.
@param name
the name of the recipient
@param number
the number of the recipient
@return this instance for fluent chaining
"""
to(new Recipient(name, number));
return this;
} | java | public Sms to(String name, PhoneNumber number) {
to(new Recipient(name, number));
return this;
} | [
"public",
"Sms",
"to",
"(",
"String",
"name",
",",
"PhoneNumber",
"number",
")",
"{",
"to",
"(",
"new",
"Recipient",
"(",
"name",
",",
"number",
")",
")",
";",
"return",
"this",
";",
"}"
] | Add a recipient specifying the name and the phone number.
@param name
the name of the recipient
@param number
the number of the recipient
@return this instance for fluent chaining | [
"Add",
"a",
"recipient",
"specifying",
"the",
"name",
"and",
"the",
"phone",
"number",
"."
] | train | https://github.com/groupe-sii/ogham/blob/e273b845604add74b5a25dfd931cb3c166b1008f/ogham-core/src/main/java/fr/sii/ogham/sms/message/Sms.java#L260-L263 |
Azure/azure-sdk-for-java | notificationhubs/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2017_04_01/implementation/NotificationHubsInner.java | NotificationHubsInner.listAsync | public Observable<Page<NotificationHubResourceInner>> listAsync(final String resourceGroupName, final String namespaceName) {
"""
Lists the notification hubs associated with a namespace.
@param resourceGroupName The name of the resource group.
@param namespaceName The namespace name.
@throws IllegalArgumentEx... | java | public Observable<Page<NotificationHubResourceInner>> listAsync(final String resourceGroupName, final String namespaceName) {
return listWithServiceResponseAsync(resourceGroupName, namespaceName)
.map(new Func1<ServiceResponse<Page<NotificationHubResourceInner>>, Page<NotificationHubResourceInner>>(... | [
"public",
"Observable",
"<",
"Page",
"<",
"NotificationHubResourceInner",
">",
">",
"listAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"namespaceName",
")",
"{",
"return",
"listWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"n... | Lists the notification hubs associated with a namespace.
@param resourceGroupName The name of the resource group.
@param namespaceName The namespace name.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PagedList<NotificationHubResourceInner> object | [
"Lists",
"the",
"notification",
"hubs",
"associated",
"with",
"a",
"namespace",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/notificationhubs/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2017_04_01/implementation/NotificationHubsInner.java#L1247-L1255 |
hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/CompressionUtil.java | CompressionUtil.compressFileGzip | public static File compressFileGzip(String _sourceFile, String _outputFileName) {
"""
Compresses the given file with GZIP and writes the compressed file to outputFileName.
@param _sourceFile
@param _outputFileName
@return new File object with the compressed file or null on error
"""
return compress(... | java | public static File compressFileGzip(String _sourceFile, String _outputFileName) {
return compress(CompressionMethod.GZIP, _sourceFile, _outputFileName);
} | [
"public",
"static",
"File",
"compressFileGzip",
"(",
"String",
"_sourceFile",
",",
"String",
"_outputFileName",
")",
"{",
"return",
"compress",
"(",
"CompressionMethod",
".",
"GZIP",
",",
"_sourceFile",
",",
"_outputFileName",
")",
";",
"}"
] | Compresses the given file with GZIP and writes the compressed file to outputFileName.
@param _sourceFile
@param _outputFileName
@return new File object with the compressed file or null on error | [
"Compresses",
"the",
"given",
"file",
"with",
"GZIP",
"and",
"writes",
"the",
"compressed",
"file",
"to",
"outputFileName",
"."
] | train | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/CompressionUtil.java#L52-L54 |
simlife/simlife | simlife-framework/src/main/java/io/github/simlife/service/QueryService.java | QueryService.buildReferringEntitySpecification | protected <OTHER, X> Specification<ENTITY> buildReferringEntitySpecification(Filter<X> filter,
SingularAttribute<? super ENTITY, OTHER> reference,
SingularAttribute<OTHER, X> valueField) {
"""
Helper function to return a specification for filtering on one-to-one or many-to-one reference. Usage:
<p... | java | protected <OTHER, X> Specification<ENTITY> buildReferringEntitySpecification(Filter<X> filter,
SingularAttribute<? super ENTITY, OTHER> reference,
SingularAttribute<OTHER, X> valueField) {
if (filter.getEquals() != null) {
return equalsSpecification(reference, valueField, filter.getE... | [
"protected",
"<",
"OTHER",
",",
"X",
">",
"Specification",
"<",
"ENTITY",
">",
"buildReferringEntitySpecification",
"(",
"Filter",
"<",
"X",
">",
"filter",
",",
"SingularAttribute",
"<",
"?",
"super",
"ENTITY",
",",
"OTHER",
">",
"reference",
",",
"SingularAtt... | Helper function to return a specification for filtering on one-to-one or many-to-one reference. Usage:
<pre>
Specification<Employee> specByProjectId = buildReferringEntitySpecification(criteria.getProjectId(),
Employee_.project, Project_.id);
Specification<Employee> specByProjectName = buildReferringEntityS... | [
"Helper",
"function",
"to",
"return",
"a",
"specification",
"for",
"filtering",
"on",
"one",
"-",
"to",
"-",
"one",
"or",
"many",
"-",
"to",
"-",
"one",
"reference",
".",
"Usage",
":",
"<pre",
">",
"Specification<",
";",
"Employee>",
";",
"specByProjec... | train | https://github.com/simlife/simlife/blob/357bb8f3fb39e085239b89bc7f9a19248ff3d0bb/simlife-framework/src/main/java/io/github/simlife/service/QueryService.java#L140-L151 |
kiswanij/jk-util | src/main/java/com/jk/util/model/table/JKTableModel.java | JKTableModel.getValueAtAsInteger | public int getValueAtAsInteger(final int row, final int col) {
"""
Gets the value at as integer.
@param row the row
@param col the col
@return the value at as integer
"""
final Object valueAt = getValueAt(row, col);
int number = 0;
if (valueAt != null && !valueAt.toString().equals("")) {
numb... | java | public int getValueAtAsInteger(final int row, final int col) {
final Object valueAt = getValueAt(row, col);
int number = 0;
if (valueAt != null && !valueAt.toString().equals("")) {
number = Integer.parseInt(valueAt.toString().trim());
}
return number;
} | [
"public",
"int",
"getValueAtAsInteger",
"(",
"final",
"int",
"row",
",",
"final",
"int",
"col",
")",
"{",
"final",
"Object",
"valueAt",
"=",
"getValueAt",
"(",
"row",
",",
"col",
")",
";",
"int",
"number",
"=",
"0",
";",
"if",
"(",
"valueAt",
"!=",
"... | Gets the value at as integer.
@param row the row
@param col the col
@return the value at as integer | [
"Gets",
"the",
"value",
"at",
"as",
"integer",
"."
] | train | https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/model/table/JKTableModel.java#L637-L645 |
xedin/disruptor_thrift_server | src/main/java/com/thinkaurelius/thrift/util/mem/Memory.java | Memory.getBytes | public void getBytes(long memoryOffset, byte[] buffer, int bufferOffset, int count) {
"""
Transfers count bytes from Memory starting at memoryOffset to buffer starting at bufferOffset
@param memoryOffset start offset in the memory
@param buffer the data buffer
@param bufferOffset start offset of the buffer
@... | java | public void getBytes(long memoryOffset, byte[] buffer, int bufferOffset, int count)
{
if (buffer == null)
throw new NullPointerException();
else if (bufferOffset < 0 || count < 0 || count > buffer.length - bufferOffset)
throw new IndexOutOfBoundsException();
else if (... | [
"public",
"void",
"getBytes",
"(",
"long",
"memoryOffset",
",",
"byte",
"[",
"]",
"buffer",
",",
"int",
"bufferOffset",
",",
"int",
"count",
")",
"{",
"if",
"(",
"buffer",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"else",
... | Transfers count bytes from Memory starting at memoryOffset to buffer starting at bufferOffset
@param memoryOffset start offset in the memory
@param buffer the data buffer
@param bufferOffset start offset of the buffer
@param count number of bytes to transfer | [
"Transfers",
"count",
"bytes",
"from",
"Memory",
"starting",
"at",
"memoryOffset",
"to",
"buffer",
"starting",
"at",
"bufferOffset"
] | train | https://github.com/xedin/disruptor_thrift_server/blob/5bf0c3d6968e1ea79f5ea939dde7b8ced3d91a2c/src/main/java/com/thinkaurelius/thrift/util/mem/Memory.java#L187-L204 |
facebookarchive/hadoop-20 | src/contrib/corona/src/java/org/apache/hadoop/mapred/CoronaJobInProgress.java | CoronaJobInProgress.getCounters | @SuppressWarnings("deprecation")
public Counters getCounters() {
"""
Returns the total job counters, by adding together the job,
the map and the reduce counters.
"""
synchronized (lockObject) {
Counters result = new Counters();
result.incrAllCounters(getJobCounters());
incrementTaskCo... | java | @SuppressWarnings("deprecation")
public Counters getCounters() {
synchronized (lockObject) {
Counters result = new Counters();
result.incrAllCounters(getJobCounters());
incrementTaskCountersUnprotected(result, maps);
return incrementTaskCountersUnprotected(result, reduces);
}
} | [
"@",
"SuppressWarnings",
"(",
"\"deprecation\"",
")",
"public",
"Counters",
"getCounters",
"(",
")",
"{",
"synchronized",
"(",
"lockObject",
")",
"{",
"Counters",
"result",
"=",
"new",
"Counters",
"(",
")",
";",
"result",
".",
"incrAllCounters",
"(",
"getJobCo... | Returns the total job counters, by adding together the job,
the map and the reduce counters. | [
"Returns",
"the",
"total",
"job",
"counters",
"by",
"adding",
"together",
"the",
"job",
"the",
"map",
"and",
"the",
"reduce",
"counters",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/mapred/CoronaJobInProgress.java#L2413-L2422 |
LGoodDatePicker/LGoodDatePicker | Project/src/main/java/com/privatejgoodies/common/internal/RenderingUtils.java | RenderingUtils.drawString | public static void drawString(JComponent c, Graphics g, String text, int x, int y) {
"""
Draws the string at the specified location underlining the specified character.
@param c JComponent that will display the string, may be null
@param g Graphics to draw the text to
@param text String to display
@param x X... | java | public static void drawString(JComponent c, Graphics g, String text, int x, int y) {
if (drawStringMethod != null) {
try {
drawStringMethod.invoke(null,
c, g, text, Integer.valueOf(x), Integer.valueOf(y));
return;
} catch (IllegalAr... | [
"public",
"static",
"void",
"drawString",
"(",
"JComponent",
"c",
",",
"Graphics",
"g",
",",
"String",
"text",
",",
"int",
"x",
",",
"int",
"y",
")",
"{",
"if",
"(",
"drawStringMethod",
"!=",
"null",
")",
"{",
"try",
"{",
"drawStringMethod",
".",
"invo... | Draws the string at the specified location underlining the specified character.
@param c JComponent that will display the string, may be null
@param g Graphics to draw the text to
@param text String to display
@param x X coordinate to draw the text at
@param y Y coordinate to draw the text at | [
"Draws",
"the",
"string",
"at",
"the",
"specified",
"location",
"underlining",
"the",
"specified",
"character",
"."
] | train | https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/common/internal/RenderingUtils.java#L99-L119 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java | ModelsImpl.getPatternAnyEntityInfos | public List<PatternAnyEntityExtractor> getPatternAnyEntityInfos(UUID appId, String versionId, GetPatternAnyEntityInfosOptionalParameter getPatternAnyEntityInfosOptionalParameter) {
"""
Get information about the Pattern.Any entity models.
@param appId The application ID.
@param versionId The version ID.
@param... | java | public List<PatternAnyEntityExtractor> getPatternAnyEntityInfos(UUID appId, String versionId, GetPatternAnyEntityInfosOptionalParameter getPatternAnyEntityInfosOptionalParameter) {
return getPatternAnyEntityInfosWithServiceResponseAsync(appId, versionId, getPatternAnyEntityInfosOptionalParameter).toBlocking().s... | [
"public",
"List",
"<",
"PatternAnyEntityExtractor",
">",
"getPatternAnyEntityInfos",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"GetPatternAnyEntityInfosOptionalParameter",
"getPatternAnyEntityInfosOptionalParameter",
")",
"{",
"return",
"getPatternAnyEntityInfosWithS... | Get information about the Pattern.Any entity models.
@param appId The application ID.
@param versionId The version ID.
@param getPatternAnyEntityInfosOptionalParameter the object representing the optional parameters to be set before calling this API
@throws IllegalArgumentException thrown if parameters fail the valida... | [
"Get",
"information",
"about",
"the",
"Pattern",
".",
"Any",
"entity",
"models",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L7390-L7392 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.deleteSecretAsync | public Observable<DeletedSecretBundle> deleteSecretAsync(String vaultBaseUrl, String secretName) {
"""
Deletes a secret from a specified key vault.
The DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied to an individual version of a secret. This operation requires the secre... | java | public Observable<DeletedSecretBundle> deleteSecretAsync(String vaultBaseUrl, String secretName) {
return deleteSecretWithServiceResponseAsync(vaultBaseUrl, secretName).map(new Func1<ServiceResponse<DeletedSecretBundle>, DeletedSecretBundle>() {
@Override
public DeletedSecretBundle call(... | [
"public",
"Observable",
"<",
"DeletedSecretBundle",
">",
"deleteSecretAsync",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"secretName",
")",
"{",
"return",
"deleteSecretWithServiceResponseAsync",
"(",
"vaultBaseUrl",
",",
"secretName",
")",
".",
"map",
"(",
"new",
... | Deletes a secret from a specified key vault.
The DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied to an individual version of a secret. This operation requires the secrets/delete permission.
@param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
@para... | [
"Deletes",
"a",
"secret",
"from",
"a",
"specified",
"key",
"vault",
".",
"The",
"DELETE",
"operation",
"applies",
"to",
"any",
"secret",
"stored",
"in",
"Azure",
"Key",
"Vault",
".",
"DELETE",
"cannot",
"be",
"applied",
"to",
"an",
"individual",
"version",
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L3558-L3565 |
MariaDB/mariadb-connector-j | src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/TextRowProtocol.java | TextRowProtocol.getInternalTimeString | public String getInternalTimeString(ColumnInformation columnInfo) {
"""
Get Time in string format from raw text format.
@param columnInfo column information
@return String representation of time
"""
if (lastValueWasNull()) {
return null;
}
String rawValue = new String(buf, pos, length, S... | java | public String getInternalTimeString(ColumnInformation columnInfo) {
if (lastValueWasNull()) {
return null;
}
String rawValue = new String(buf, pos, length, StandardCharsets.UTF_8);
if ("0000-00-00".equals(rawValue)) {
return null;
}
if (options.maximizeMysqlCompatibility && options... | [
"public",
"String",
"getInternalTimeString",
"(",
"ColumnInformation",
"columnInfo",
")",
"{",
"if",
"(",
"lastValueWasNull",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"String",
"rawValue",
"=",
"new",
"String",
"(",
"buf",
",",
"pos",
",",
"length",
... | Get Time in string format from raw text format.
@param columnInfo column information
@return String representation of time | [
"Get",
"Time",
"in",
"string",
"format",
"from",
"raw",
"text",
"format",
"."
] | train | https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/resultset/rowprotocol/TextRowProtocol.java#L847-L862 |
apache/flink | flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java | ParameterTool.getFloat | public float getFloat(String key, float defaultValue) {
"""
Returns the Float value for the given key. If the key does not exists it will return the default value given.
The method fails if the value is not a Float.
"""
addToDefaults(key, Float.toString(defaultValue));
String value = get(key);
if (value... | java | public float getFloat(String key, float defaultValue) {
addToDefaults(key, Float.toString(defaultValue));
String value = get(key);
if (value == null) {
return defaultValue;
} else {
return Float.valueOf(value);
}
} | [
"public",
"float",
"getFloat",
"(",
"String",
"key",
",",
"float",
"defaultValue",
")",
"{",
"addToDefaults",
"(",
"key",
",",
"Float",
".",
"toString",
"(",
"defaultValue",
")",
")",
";",
"String",
"value",
"=",
"get",
"(",
"key",
")",
";",
"if",
"(",... | Returns the Float value for the given key. If the key does not exists it will return the default value given.
The method fails if the value is not a Float. | [
"Returns",
"the",
"Float",
"value",
"for",
"the",
"given",
"key",
".",
"If",
"the",
"key",
"does",
"not",
"exists",
"it",
"will",
"return",
"the",
"default",
"value",
"given",
".",
"The",
"method",
"fails",
"if",
"the",
"value",
"is",
"not",
"a",
"Floa... | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java#L345-L353 |
cdapio/tigon | tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java | Bytes.toBigDecimal | public static BigDecimal toBigDecimal(byte[] bytes, int offset, final int length) {
"""
Converts a byte array to a BigDecimal value.
@param bytes
@param offset
@param length
@return the char value
"""
if (bytes == null || length < SIZEOF_INT + 1 ||
(offset + length > bytes.length)) {
re... | java | public static BigDecimal toBigDecimal(byte[] bytes, int offset, final int length) {
if (bytes == null || length < SIZEOF_INT + 1 ||
(offset + length > bytes.length)) {
return null;
}
int scale = toInt(bytes, offset);
byte[] tcBytes = new byte[length - SIZEOF_INT];
System.arraycopy(byt... | [
"public",
"static",
"BigDecimal",
"toBigDecimal",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"offset",
",",
"final",
"int",
"length",
")",
"{",
"if",
"(",
"bytes",
"==",
"null",
"||",
"length",
"<",
"SIZEOF_INT",
"+",
"1",
"||",
"(",
"offset",
"+",
... | Converts a byte array to a BigDecimal value.
@param bytes
@param offset
@param length
@return the char value | [
"Converts",
"a",
"byte",
"array",
"to",
"a",
"BigDecimal",
"value",
"."
] | train | https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java#L720-L730 |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java | ContentElement.flushTables | public void flushTables(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
"""
Flush the tables.
@param util an XML util
@param writer destination
@throws IOException if the tables were not flushed
"""
this.ensureContentBegin(util, writer);
final int lastTableIndex = ... | java | public void flushTables(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
this.ensureContentBegin(util, writer);
final int lastTableIndex = this.tables.size() - 1;
if (lastTableIndex < 0)
return;
int tableIndex = this.flushPosition.getTableIndex();
... | [
"public",
"void",
"flushTables",
"(",
"final",
"XMLUtil",
"util",
",",
"final",
"ZipUTF8Writer",
"writer",
")",
"throws",
"IOException",
"{",
"this",
".",
"ensureContentBegin",
"(",
"util",
",",
"writer",
")",
";",
"final",
"int",
"lastTableIndex",
"=",
"this"... | Flush the tables.
@param util an XML util
@param writer destination
@throws IOException if the tables were not flushed | [
"Flush",
"the",
"tables",
"."
] | train | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/ContentElement.java#L163-L179 |
dadoonet/spring-elasticsearch | src/main/java/fr/pilato/spring/elasticsearch/type/TypeSettingsReader.java | TypeSettingsReader.readMapping | static String readMapping(String root, String index) throws IOException {
"""
Read a mapping from index/_doc.json file
@param root dir within the classpath
@param index index name
@return The mapping
@throws IOException if the connection with elasticsearch is failing
"""
if (root == null) {
return rea... | java | static String readMapping(String root, String index) throws IOException {
if (root == null) {
return readMapping(index);
}
String mappingFile = root + "/" + index + "/_doc" + Defaults.JsonFileExtension;
return readFileFromClasspath(mappingFile);
} | [
"static",
"String",
"readMapping",
"(",
"String",
"root",
",",
"String",
"index",
")",
"throws",
"IOException",
"{",
"if",
"(",
"root",
"==",
"null",
")",
"{",
"return",
"readMapping",
"(",
"index",
")",
";",
"}",
"String",
"mappingFile",
"=",
"root",
"+... | Read a mapping from index/_doc.json file
@param root dir within the classpath
@param index index name
@return The mapping
@throws IOException if the connection with elasticsearch is failing | [
"Read",
"a",
"mapping",
"from",
"index",
"/",
"_doc",
".",
"json",
"file"
] | train | https://github.com/dadoonet/spring-elasticsearch/blob/b338223818a5bdf5d9c06c88cb98589c843fd293/src/main/java/fr/pilato/spring/elasticsearch/type/TypeSettingsReader.java#L44-L50 |
snowflakedb/snowflake-jdbc | src/main/java/net/snowflake/client/jdbc/cloud/storage/AzureObjectMetadata.java | AzureObjectMetadata.addUserMetadata | @Override
public void addUserMetadata(String key, String value) {
"""
Adds the key value pair of custom user-metadata for the associated object.
"""
userDefinedMetadata.put(key, value);
} | java | @Override
public void addUserMetadata(String key, String value)
{
userDefinedMetadata.put(key, value);
} | [
"@",
"Override",
"public",
"void",
"addUserMetadata",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"userDefinedMetadata",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"}"
] | Adds the key value pair of custom user-metadata for the associated object. | [
"Adds",
"the",
"key",
"value",
"pair",
"of",
"custom",
"user",
"-",
"metadata",
"for",
"the",
"associated",
"object",
"."
] | train | https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/cloud/storage/AzureObjectMetadata.java#L71-L75 |
albfernandez/itext2 | src/main/java/com/lowagie/text/pdf/PdfCopyForms.java | PdfCopyForms.addDocument | public void addDocument(PdfReader reader, String ranges) throws DocumentException, IOException {
"""
Concatenates a PDF document selecting the pages to keep. The pages are described as
ranges. The page ordering can be changed but
no page repetitions are allowed.
@param reader the PDF document
@param ranges the... | java | public void addDocument(PdfReader reader, String ranges) throws DocumentException, IOException {
fc.addDocument(reader, SequenceList.expand(ranges, reader.getNumberOfPages()));
} | [
"public",
"void",
"addDocument",
"(",
"PdfReader",
"reader",
",",
"String",
"ranges",
")",
"throws",
"DocumentException",
",",
"IOException",
"{",
"fc",
".",
"addDocument",
"(",
"reader",
",",
"SequenceList",
".",
"expand",
"(",
"ranges",
",",
"reader",
".",
... | Concatenates a PDF document selecting the pages to keep. The pages are described as
ranges. The page ordering can be changed but
no page repetitions are allowed.
@param reader the PDF document
@param ranges the comma separated ranges as described in {@link SequenceList}
@throws DocumentException on error | [
"Concatenates",
"a",
"PDF",
"document",
"selecting",
"the",
"pages",
"to",
"keep",
".",
"The",
"pages",
"are",
"described",
"as",
"ranges",
".",
"The",
"page",
"ordering",
"can",
"be",
"changed",
"but",
"no",
"page",
"repetitions",
"are",
"allowed",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfCopyForms.java#L112-L114 |
dita-ot/dita-ot | src/main/java/org/dita/dost/invoker/DefaultLogger.java | DefaultLogger.printMessage | private void printMessage(final String message, final PrintStream stream, final int priority) {
"""
Prints a message to a PrintStream.
@param message The message to print. Should not be <code>null</code>.
@param stream A PrintStream to print the message to. Must not be
<code>null</code>.
@param priority The ... | java | private void printMessage(final String message, final PrintStream stream, final int priority) {
if (useColor && priority == Project.MSG_ERR) {
stream.print(ANSI_RED);
stream.print(message);
stream.println(ANSI_RESET);
} else {
stream.println(message);
... | [
"private",
"void",
"printMessage",
"(",
"final",
"String",
"message",
",",
"final",
"PrintStream",
"stream",
",",
"final",
"int",
"priority",
")",
"{",
"if",
"(",
"useColor",
"&&",
"priority",
"==",
"Project",
".",
"MSG_ERR",
")",
"{",
"stream",
".",
"prin... | Prints a message to a PrintStream.
@param message The message to print. Should not be <code>null</code>.
@param stream A PrintStream to print the message to. Must not be
<code>null</code>.
@param priority The priority of the message. (Ignored in this
implementation.) | [
"Prints",
"a",
"message",
"to",
"a",
"PrintStream",
"."
] | train | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/invoker/DefaultLogger.java#L364-L372 |
bmwcarit/joynr | java/messaging/messaging-common/src/main/java/io/joynr/messaging/util/Utilities.java | Utilities.isSessionEncodedInUrl | public static boolean isSessionEncodedInUrl(String encodedUrl, String sessionIdName) {
"""
Returns whether the session ID is encoded into the URL.
@param encodedUrl
the url to check
@param sessionIdName
the name of the session ID, e.g. jsessionid
@return boolean value, true if session ID is encoded into the... | java | public static boolean isSessionEncodedInUrl(String encodedUrl, String sessionIdName) {
int sessionIdIndex = encodedUrl.indexOf(getSessionIdSubstring(sessionIdName));
return sessionIdIndex >= 0;
} | [
"public",
"static",
"boolean",
"isSessionEncodedInUrl",
"(",
"String",
"encodedUrl",
",",
"String",
"sessionIdName",
")",
"{",
"int",
"sessionIdIndex",
"=",
"encodedUrl",
".",
"indexOf",
"(",
"getSessionIdSubstring",
"(",
"sessionIdName",
")",
")",
";",
"return",
... | Returns whether the session ID is encoded into the URL.
@param encodedUrl
the url to check
@param sessionIdName
the name of the session ID, e.g. jsessionid
@return boolean value, true if session ID is encoded into the URL. | [
"Returns",
"whether",
"the",
"session",
"ID",
"is",
"encoded",
"into",
"the",
"URL",
"."
] | train | https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/messaging-common/src/main/java/io/joynr/messaging/util/Utilities.java#L123-L126 |
udoprog/ffwd-client-java | src/main/java/eu/toolchain/ffwd/FastForward.java | FastForward.setup | public static FastForward setup(InetAddress addr, int port) throws SocketException {
"""
Initialization method for a FastForward client.
@return A new instance of a FastForward client.
@throws SocketException If a datagram socket cannot be created.
"""
final DatagramSocket socket = new DatagramSock... | java | public static FastForward setup(InetAddress addr, int port) throws SocketException {
final DatagramSocket socket = new DatagramSocket();
return new FastForward(addr, port, socket);
} | [
"public",
"static",
"FastForward",
"setup",
"(",
"InetAddress",
"addr",
",",
"int",
"port",
")",
"throws",
"SocketException",
"{",
"final",
"DatagramSocket",
"socket",
"=",
"new",
"DatagramSocket",
"(",
")",
";",
"return",
"new",
"FastForward",
"(",
"addr",
",... | Initialization method for a FastForward client.
@return A new instance of a FastForward client.
@throws SocketException If a datagram socket cannot be created. | [
"Initialization",
"method",
"for",
"a",
"FastForward",
"client",
"."
] | train | https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/eu/toolchain/ffwd/FastForward.java#L40-L43 |
spotify/apollo | modules/metrics/src/main/java/com/spotify/apollo/metrics/semantic/SemanticServiceMetrics.java | SemanticServiceMetrics.requestDurationThresholdTracker | private Optional<DurationThresholdTracker> requestDurationThresholdTracker(MetricId id,
String endpoint) {
"""
Checks for endpoint-duration-goal configuration options and sets up
metrics that track how many requests meet a certain durati... | java | private Optional<DurationThresholdTracker> requestDurationThresholdTracker(MetricId id,
String endpoint) {
return durationThresholdConfig.getDurationThresholdForEndpoint(endpoint)
.map(threshold -> Optional.of(new DurationThreshold... | [
"private",
"Optional",
"<",
"DurationThresholdTracker",
">",
"requestDurationThresholdTracker",
"(",
"MetricId",
"id",
",",
"String",
"endpoint",
")",
"{",
"return",
"durationThresholdConfig",
".",
"getDurationThresholdForEndpoint",
"(",
"endpoint",
")",
".",
"map",
"("... | Checks for endpoint-duration-goal configuration options and sets up
metrics that track how many requests meet a certain duration threshold goal.
@param endpoint formatted as METHOD:URI | [
"Checks",
"for",
"endpoint",
"-",
"duration",
"-",
"goal",
"configuration",
"options",
"and",
"sets",
"up",
"metrics",
"that",
"track",
"how",
"many",
"requests",
"meet",
"a",
"certain",
"duration",
"threshold",
"goal",
"."
] | train | https://github.com/spotify/apollo/blob/3aba09840538a2aff9cdac5be42cc114dd276c70/modules/metrics/src/main/java/com/spotify/apollo/metrics/semantic/SemanticServiceMetrics.java#L205-L210 |
ixa-ehu/ixa-pipe-ml | src/main/java/eus/ixa/ixa/pipe/ml/features/LemmaBaselineContextGenerator.java | LemmaBaselineContextGenerator.processRangeOptions | private void processRangeOptions(final Map<String, String> properties) {
"""
Process the options of which kind of features are to be generated.
@param properties
the properties map
"""
final String featuresRange = properties.get("range");
final String[] rangeArray = Flags
.processLemmaBasel... | java | private void processRangeOptions(final Map<String, String> properties) {
final String featuresRange = properties.get("range");
final String[] rangeArray = Flags
.processLemmaBaselineFeaturesRange(featuresRange);
if (rangeArray[0].equalsIgnoreCase("pos")) {
this.isPos = true;
}
if (rang... | [
"private",
"void",
"processRangeOptions",
"(",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"properties",
")",
"{",
"final",
"String",
"featuresRange",
"=",
"properties",
".",
"get",
"(",
"\"range\"",
")",
";",
"final",
"String",
"[",
"]",
"rangeArray"... | Process the options of which kind of features are to be generated.
@param properties
the properties map | [
"Process",
"the",
"options",
"of",
"which",
"kind",
"of",
"features",
"are",
"to",
"be",
"generated",
"."
] | train | https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/features/LemmaBaselineContextGenerator.java#L181-L192 |
auth0/auth0-java | src/main/java/com/auth0/client/mgmt/filter/RulesFilter.java | RulesFilter.withPage | public RulesFilter withPage(int pageNumber, int amountPerPage) {
"""
Filter by page
@param pageNumber the page number to retrieve.
@param amountPerPage the amount of items per page to retrieve.
@return this filter instance
"""
parameters.put("page", pageNumber);
parameters.put("per_page... | java | public RulesFilter withPage(int pageNumber, int amountPerPage) {
parameters.put("page", pageNumber);
parameters.put("per_page", amountPerPage);
return this;
} | [
"public",
"RulesFilter",
"withPage",
"(",
"int",
"pageNumber",
",",
"int",
"amountPerPage",
")",
"{",
"parameters",
".",
"put",
"(",
"\"page\"",
",",
"pageNumber",
")",
";",
"parameters",
".",
"put",
"(",
"\"per_page\"",
",",
"amountPerPage",
")",
";",
"retu... | Filter by page
@param pageNumber the page number to retrieve.
@param amountPerPage the amount of items per page to retrieve.
@return this filter instance | [
"Filter",
"by",
"page"
] | train | https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/client/mgmt/filter/RulesFilter.java#L44-L48 |
nmorel/gwt-jackson | gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/rebind/AbstractCreator.java | AbstractCreator.methodCallCode | private CodeBlock methodCallCode( MapperInstance instance ) {
"""
Build the code to create a mapper.
@param instance the class to call
@return the code to create the mapper
"""
CodeBlock.Builder builder = initMethodCallCode( instance );
return methodCallParametersCode( builder, ImmutableL... | java | private CodeBlock methodCallCode( MapperInstance instance ) {
CodeBlock.Builder builder = initMethodCallCode( instance );
return methodCallParametersCode( builder, ImmutableList.<CodeBlock>of() );
} | [
"private",
"CodeBlock",
"methodCallCode",
"(",
"MapperInstance",
"instance",
")",
"{",
"CodeBlock",
".",
"Builder",
"builder",
"=",
"initMethodCallCode",
"(",
"instance",
")",
";",
"return",
"methodCallParametersCode",
"(",
"builder",
",",
"ImmutableList",
".",
"<",... | Build the code to create a mapper.
@param instance the class to call
@return the code to create the mapper | [
"Build",
"the",
"code",
"to",
"create",
"a",
"mapper",
"."
] | train | https://github.com/nmorel/gwt-jackson/blob/3fdc4350a27a9b64fc437d5fe516bf9191b74824/gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/rebind/AbstractCreator.java#L885-L888 |
GeoLatte/geolatte-common | src/main/java/org/geolatte/common/dataformats/json/jackson/AbstractJsonDeserializer.java | AbstractJsonDeserializer.getDoubleParam | protected Double getDoubleParam(String paramName, String errorMessage, Map<String, Object> mapToUse)
throws IOException {
"""
Convenience method for subclasses. Retrieves a double with the given parametername, even if that
parametercontent is actually a string containing a number or a long or an int o... | java | protected Double getDoubleParam(String paramName, String errorMessage, Map<String, Object> mapToUse)
throws IOException {
Object o = mapToUse.get(paramName);
if (o != null) {
try {
return Double.parseDouble(o.toString());
} catch (NumberFormatException... | [
"protected",
"Double",
"getDoubleParam",
"(",
"String",
"paramName",
",",
"String",
"errorMessage",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"mapToUse",
")",
"throws",
"IOException",
"{",
"Object",
"o",
"=",
"mapToUse",
".",
"get",
"(",
"paramName",
")... | Convenience method for subclasses. Retrieves a double with the given parametername, even if that
parametercontent is actually a string containing a number or a long or an int or... Anything that
can be converted to a double is returned.
@param paramName the name of the parameter
@param errorMessage the errormessage... | [
"Convenience",
"method",
"for",
"subclasses",
".",
"Retrieves",
"a",
"double",
"with",
"the",
"given",
"parametername",
"even",
"if",
"that",
"parametercontent",
"is",
"actually",
"a",
"string",
"containing",
"a",
"number",
"or",
"a",
"long",
"or",
"an",
"int"... | train | https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/jackson/AbstractJsonDeserializer.java#L182-L192 |
jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/FieldReSelectHandler.java | FieldReSelectHandler.fieldChanged | public int fieldChanged(boolean bDisplayOption, int iMoveMode) {
"""
The Field has Changed.
Reselect the grid screen.
@param bDisplayOption If true, display the change.
@param iMoveMode The type of move being done (init/read/screen).
@return The error code (or NORMAL_RETURN if okay).
Reselect the records.
... | java | public int fieldChanged(boolean bDisplayOption, int iMoveMode)
{
if (m_gridScreen != null)
m_gridScreen.reSelectRecords();
if (m_sPopupBox != null)
m_sPopupBox.reSelectRecords();
return DBConstants.NORMAL_RETURN;
} | [
"public",
"int",
"fieldChanged",
"(",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"if",
"(",
"m_gridScreen",
"!=",
"null",
")",
"m_gridScreen",
".",
"reSelectRecords",
"(",
")",
";",
"if",
"(",
"m_sPopupBox",
"!=",
"null",
")",
"m_sPopupB... | The Field has Changed.
Reselect the grid screen.
@param bDisplayOption If true, display the change.
@param iMoveMode The type of move being done (init/read/screen).
@return The error code (or NORMAL_RETURN if okay).
Reselect the records. | [
"The",
"Field",
"has",
"Changed",
".",
"Reselect",
"the",
"grid",
"screen",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/FieldReSelectHandler.java#L103-L110 |
google/closure-templates | java/src/com/google/template/soy/SoyFileSet.java | SoyFileSet.compileToTofu | public SoyTofu compileToTofu(Map<String, Supplier<Object>> pluginInstances) {
"""
Compiles this Soy file set into a Java object (type {@code SoyTofu}) capable of rendering the
compiled templates.
@return The resulting {@code SoyTofu} object.
@throws SoyCompilationException If compilation fails.
"""
re... | java | public SoyTofu compileToTofu(Map<String, Supplier<Object>> pluginInstances) {
resetErrorReporter();
ServerCompilationPrimitives primitives = compileForServerRendering();
throwIfErrorsPresent();
SoyTofu tofu = doCompileToTofu(primitives, pluginInstances);
reportWarnings();
return tofu;
} | [
"public",
"SoyTofu",
"compileToTofu",
"(",
"Map",
"<",
"String",
",",
"Supplier",
"<",
"Object",
">",
">",
"pluginInstances",
")",
"{",
"resetErrorReporter",
"(",
")",
";",
"ServerCompilationPrimitives",
"primitives",
"=",
"compileForServerRendering",
"(",
")",
";... | Compiles this Soy file set into a Java object (type {@code SoyTofu}) capable of rendering the
compiled templates.
@return The resulting {@code SoyTofu} object.
@throws SoyCompilationException If compilation fails. | [
"Compiles",
"this",
"Soy",
"file",
"set",
"into",
"a",
"Java",
"object",
"(",
"type",
"{",
"@code",
"SoyTofu",
"}",
")",
"capable",
"of",
"rendering",
"the",
"compiled",
"templates",
"."
] | train | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/SoyFileSet.java#L741-L749 |
bitcoinj/bitcoinj | core/src/main/java/org/bitcoinj/core/PeerGroup.java | PeerGroup.connectToLocalHost | @Nullable
public Peer connectToLocalHost() {
"""
Helper for forcing a connection to localhost. Useful when using regtest mode. Returns the peer object.
"""
lock.lock();
try {
final PeerAddress localhost = PeerAddress.localhost(params);
backoffMap.put(localhost, new E... | java | @Nullable
public Peer connectToLocalHost() {
lock.lock();
try {
final PeerAddress localhost = PeerAddress.localhost(params);
backoffMap.put(localhost, new ExponentialBackoff(peerBackoffParams));
return connectTo(localhost, true, vConnectTimeoutMillis);
} f... | [
"@",
"Nullable",
"public",
"Peer",
"connectToLocalHost",
"(",
")",
"{",
"lock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"final",
"PeerAddress",
"localhost",
"=",
"PeerAddress",
".",
"localhost",
"(",
"params",
")",
";",
"backoffMap",
".",
"put",
"(",
"lo... | Helper for forcing a connection to localhost. Useful when using regtest mode. Returns the peer object. | [
"Helper",
"for",
"forcing",
"a",
"connection",
"to",
"localhost",
".",
"Useful",
"when",
"using",
"regtest",
"mode",
".",
"Returns",
"the",
"peer",
"object",
"."
] | train | https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/PeerGroup.java#L1322-L1332 |
Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/cfg/standalone/StandaloneMybatisTransactionContext.java | StandaloneMybatisTransactionContext.fireTransactionEvent | protected void fireTransactionEvent(TransactionState transactionState, boolean executeInNewContext) {
"""
Fires the event for the provided {@link TransactionState}.
@param transactionState The {@link TransactionState} for which the listeners will be called.
@param executeInNewContext If true, the listeners wil... | java | protected void fireTransactionEvent(TransactionState transactionState, boolean executeInNewContext) {
if (stateTransactionListeners==null) {
return;
}
final List<TransactionListener> transactionListeners = stateTransactionListeners.get(transactionState);
if (transactionListeners==null) {
ret... | [
"protected",
"void",
"fireTransactionEvent",
"(",
"TransactionState",
"transactionState",
",",
"boolean",
"executeInNewContext",
")",
"{",
"if",
"(",
"stateTransactionListeners",
"==",
"null",
")",
"{",
"return",
";",
"}",
"final",
"List",
"<",
"TransactionListener",
... | Fires the event for the provided {@link TransactionState}.
@param transactionState The {@link TransactionState} for which the listeners will be called.
@param executeInNewContext If true, the listeners will be called in a new command context.
This is needed for example when firing the {@link TransactionState#COMMITTED... | [
"Fires",
"the",
"event",
"for",
"the",
"provided",
"{",
"@link",
"TransactionState",
"}",
"."
] | train | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/cfg/standalone/StandaloneMybatisTransactionContext.java#L82-L104 |
alkacon/opencms-core | src/org/opencms/xml/content/CmsXmlContent.java | CmsXmlContent.ensureParentValues | private void ensureParentValues(CmsObject cms, String valuePath, Locale locale) {
"""
Ensures the parent values to the given path are created.<p>
@param cms the cms context
@param valuePath the value path
@param locale the content locale
"""
if (valuePath.contains("/")) {
String paren... | java | private void ensureParentValues(CmsObject cms, String valuePath, Locale locale) {
if (valuePath.contains("/")) {
String parentPath = valuePath.substring(0, valuePath.lastIndexOf("/"));
if (!hasValue(parentPath, locale)) {
ensureParentValues(cms, parentPath, locale);
... | [
"private",
"void",
"ensureParentValues",
"(",
"CmsObject",
"cms",
",",
"String",
"valuePath",
",",
"Locale",
"locale",
")",
"{",
"if",
"(",
"valuePath",
".",
"contains",
"(",
"\"/\"",
")",
")",
"{",
"String",
"parentPath",
"=",
"valuePath",
".",
"substring",... | Ensures the parent values to the given path are created.<p>
@param cms the cms context
@param valuePath the value path
@param locale the content locale | [
"Ensures",
"the",
"parent",
"values",
"to",
"the",
"given",
"path",
"are",
"created",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsXmlContent.java#L1074-L1084 |
alkacon/opencms-core | src-modules/org/opencms/workplace/tools/content/CmsPropertyChange.java | CmsPropertyChange.actionChange | public void actionChange() throws JspException {
"""
Changes the property values on the specified resources.<p>
@throws JspException if problems including sub-elements occur
"""
// save initialized instance of this class in request attribute for included sub-elements
getJsp().getRequest().s... | java | public void actionChange() throws JspException {
// save initialized instance of this class in request attribute for included sub-elements
getJsp().getRequest().setAttribute(SESSION_WORKPLACE_CLASS, this);
try {
boolean recursive = Boolean.valueOf(getParamRecursive()).booleanValue()... | [
"public",
"void",
"actionChange",
"(",
")",
"throws",
"JspException",
"{",
"// save initialized instance of this class in request attribute for included sub-elements",
"getJsp",
"(",
")",
".",
"getRequest",
"(",
")",
".",
"setAttribute",
"(",
"SESSION_WORKPLACE_CLASS",
",",
... | Changes the property values on the specified resources.<p>
@throws JspException if problems including sub-elements occur | [
"Changes",
"the",
"property",
"values",
"on",
"the",
"specified",
"resources",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/content/CmsPropertyChange.java#L172-L190 |
alkacon/opencms-core | src/org/opencms/db/CmsDriverManager.java | CmsDriverManager.readStaticExportPublishedResourceParameters | public String readStaticExportPublishedResourceParameters(CmsDbContext dbc, String rfsName) throws CmsException {
"""
Returns the parameters of a resource in the table of all published template resources.<p>
@param dbc the current database context
@param rfsName the rfs name of the resource
@return the para... | java | public String readStaticExportPublishedResourceParameters(CmsDbContext dbc, String rfsName) throws CmsException {
return getProjectDriver(dbc).readStaticExportPublishedResourceParameters(dbc, rfsName);
} | [
"public",
"String",
"readStaticExportPublishedResourceParameters",
"(",
"CmsDbContext",
"dbc",
",",
"String",
"rfsName",
")",
"throws",
"CmsException",
"{",
"return",
"getProjectDriver",
"(",
"dbc",
")",
".",
"readStaticExportPublishedResourceParameters",
"(",
"dbc",
",",... | Returns the parameters of a resource in the table of all published template resources.<p>
@param dbc the current database context
@param rfsName the rfs name of the resource
@return the parameter string of the requested resource
@throws CmsException if something goes wrong | [
"Returns",
"the",
"parameters",
"of",
"a",
"resource",
"in",
"the",
"table",
"of",
"all",
"published",
"template",
"resources",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L7937-L7940 |
groovy/groovy-core | src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java | StringGroovyMethods.stripMargin | public static String stripMargin(CharSequence self, CharSequence marginChar) {
"""
Strip leading whitespace/control characters followed by <tt>marginChar</tt> from
every line in a CharSequence.
@param self The CharSequence to strip the margin from
@param marginChar Any character that serves as margin de... | java | public static String stripMargin(CharSequence self, CharSequence marginChar) {
String s = self.toString();
String mc = marginChar.toString();
if (mc == null || mc.length() == 0) return stripMargin((CharSequence) s, '|');
// TODO IllegalArgumentException for marginChar.length() > 1 ? Or s... | [
"public",
"static",
"String",
"stripMargin",
"(",
"CharSequence",
"self",
",",
"CharSequence",
"marginChar",
")",
"{",
"String",
"s",
"=",
"self",
".",
"toString",
"(",
")",
";",
"String",
"mc",
"=",
"marginChar",
".",
"toString",
"(",
")",
";",
"if",
"(... | Strip leading whitespace/control characters followed by <tt>marginChar</tt> from
every line in a CharSequence.
@param self The CharSequence to strip the margin from
@param marginChar Any character that serves as margin delimiter
@return the stripped CharSequence
@see #stripMargin(String, String)
@since 1.8.2 | [
"Strip",
"leading",
"whitespace",
"/",
"control",
"characters",
"followed",
"by",
"<tt",
">",
"marginChar<",
"/",
"tt",
">",
"from",
"every",
"line",
"in",
"a",
"CharSequence",
"."
] | train | https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L3084-L3090 |
pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java | TypeHandlerUtils.convertBlob | public static Object convertBlob(Connection conn, byte[] value) throws SQLException {
"""
Transfers data from byte[] into sql.Blob
@param conn connection for which sql.Blob object would be created
@param value array of bytes
@return sql.Blob from array of bytes
@throws SQLException
"""
Object re... | java | public static Object convertBlob(Connection conn, byte[] value) throws SQLException {
Object result = createBlob(conn);
result = convertBlob(result, value);
return result;
} | [
"public",
"static",
"Object",
"convertBlob",
"(",
"Connection",
"conn",
",",
"byte",
"[",
"]",
"value",
")",
"throws",
"SQLException",
"{",
"Object",
"result",
"=",
"createBlob",
"(",
"conn",
")",
";",
"result",
"=",
"convertBlob",
"(",
"result",
",",
"val... | Transfers data from byte[] into sql.Blob
@param conn connection for which sql.Blob object would be created
@param value array of bytes
@return sql.Blob from array of bytes
@throws SQLException | [
"Transfers",
"data",
"from",
"byte",
"[]",
"into",
"sql",
".",
"Blob"
] | train | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/type/TypeHandlerUtils.java#L79-L85 |
hyperledger/fabric-sdk-java | src/main/java/org/hyperledger/fabric/sdk/Channel.java | Channel.addOrderer | public Channel addOrderer(Orderer orderer) throws InvalidArgumentException {
"""
Add an Orderer to this channel.
@param orderer the orderer to add.
@return this channel.
@throws InvalidArgumentException
"""
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been... | java | public Channel addOrderer(Orderer orderer) throws InvalidArgumentException {
if (shutdown) {
throw new InvalidArgumentException(format("Channel %s has been shutdown.", name));
}
if (null == orderer) {
throw new InvalidArgumentException("Orderer is invalid can not be nul... | [
"public",
"Channel",
"addOrderer",
"(",
"Orderer",
"orderer",
")",
"throws",
"InvalidArgumentException",
"{",
"if",
"(",
"shutdown",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"format",
"(",
"\"Channel %s has been shutdown.\"",
",",
"name",
")",
")",... | Add an Orderer to this channel.
@param orderer the orderer to add.
@return this channel.
@throws InvalidArgumentException | [
"Add",
"an",
"Orderer",
"to",
"this",
"channel",
"."
] | train | https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L923-L939 |
samskivert/samskivert | src/main/java/com/samskivert/swing/util/SwingUtil.java | SwingUtil.positionRect | public static boolean positionRect (
Rectangle r, Rectangle bounds, Collection<? extends Shape> avoidShapes) {
"""
Position the specified rectangle as closely as possible to its current position, but make
sure it is within the specified bounds and that it does not overlap any of the Shapes
contained in t... | java | public static boolean positionRect (
Rectangle r, Rectangle bounds, Collection<? extends Shape> avoidShapes)
{
Point origPos = r.getLocation();
Comparator<Point> comp = createPointComparator(origPos);
SortableArrayList<Point> possibles = new SortableArrayList<Point>();
// sta... | [
"public",
"static",
"boolean",
"positionRect",
"(",
"Rectangle",
"r",
",",
"Rectangle",
"bounds",
",",
"Collection",
"<",
"?",
"extends",
"Shape",
">",
"avoidShapes",
")",
"{",
"Point",
"origPos",
"=",
"r",
".",
"getLocation",
"(",
")",
";",
"Comparator",
... | Position the specified rectangle as closely as possible to its current position, but make
sure it is within the specified bounds and that it does not overlap any of the Shapes
contained in the avoid list.
@param r the rectangle to attempt to position.
@param bounds the bounding box within which the rectangle must be p... | [
"Position",
"the",
"specified",
"rectangle",
"as",
"closely",
"as",
"possible",
"to",
"its",
"current",
"position",
"but",
"make",
"sure",
"it",
"is",
"within",
"the",
"specified",
"bounds",
"and",
"that",
"it",
"does",
"not",
"overlap",
"any",
"of",
"the",
... | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/util/SwingUtil.java#L172-L222 |
apptentive/apptentive-android | apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java | Util.getCompatDrawable | public static Drawable getCompatDrawable(Context c, int drawableRes) {
"""
helper method to get the drawable by its resource id, specific to the correct android version
@param c
@param drawableRes
@return
"""
Drawable d = null;
try {
d = ContextCompat.getDrawable(c, drawableRes);
} catch (Excepti... | java | public static Drawable getCompatDrawable(Context c, int drawableRes) {
Drawable d = null;
try {
d = ContextCompat.getDrawable(c, drawableRes);
} catch (Exception ex) {
logException(ex);
}
return d;
} | [
"public",
"static",
"Drawable",
"getCompatDrawable",
"(",
"Context",
"c",
",",
"int",
"drawableRes",
")",
"{",
"Drawable",
"d",
"=",
"null",
";",
"try",
"{",
"d",
"=",
"ContextCompat",
".",
"getDrawable",
"(",
"c",
",",
"drawableRes",
")",
";",
"}",
"cat... | helper method to get the drawable by its resource id, specific to the correct android version
@param c
@param drawableRes
@return | [
"helper",
"method",
"to",
"get",
"the",
"drawable",
"by",
"its",
"resource",
"id",
"specific",
"to",
"the",
"correct",
"android",
"version"
] | train | https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java#L386-L394 |
openbase/jul | visual/javafx/src/main/java/org/openbase/jul/visual/javafx/geometry/svg/SVGProcessor.java | SVGProcessor.loadSVGIconFromFile | public static List<SVGPath> loadSVGIconFromFile(final File file) throws CouldNotPerformException {
"""
Method tries to build one or more SVGPaths out of the passed file.
By this the file content is interpreted as svg xml and new SVGPath instances are generated for each found path element
@param file the svg xm... | java | public static List<SVGPath> loadSVGIconFromFile(final File file) throws CouldNotPerformException {
try {
if (!file.exists()) {
throw new NotAvailableException(file.getAbsolutePath());
}
return generateSvgPathList(FileUtils.readFileToString(file, StandardCharse... | [
"public",
"static",
"List",
"<",
"SVGPath",
">",
"loadSVGIconFromFile",
"(",
"final",
"File",
"file",
")",
"throws",
"CouldNotPerformException",
"{",
"try",
"{",
"if",
"(",
"!",
"file",
".",
"exists",
"(",
")",
")",
"{",
"throw",
"new",
"NotAvailableExceptio... | Method tries to build one or more SVGPaths out of the passed file.
By this the file content is interpreted as svg xml and new SVGPath instances are generated for each found path element
@param file the svg xml file
@return a list of SVGPaths instances where each is representing one found path element
@throws CouldNo... | [
"Method",
"tries",
"to",
"build",
"one",
"or",
"more",
"SVGPaths",
"out",
"of",
"the",
"passed",
"file",
".",
"By",
"this",
"the",
"file",
"content",
"is",
"interpreted",
"as",
"svg",
"xml",
"and",
"new",
"SVGPath",
"instances",
"are",
"generated",
"for",
... | train | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/visual/javafx/src/main/java/org/openbase/jul/visual/javafx/geometry/svg/SVGProcessor.java#L85-L94 |
square/phrase | src/main/java/com/squareup/phrase/Phrase.java | Phrase.putOptional | public Phrase putOptional(String key, CharSequence value) {
"""
Silently ignored if the key is not in the pattern.
@see #put(String, CharSequence)
"""
return keys.contains(key) ? put(key, value) : this;
} | java | public Phrase putOptional(String key, CharSequence value) {
return keys.contains(key) ? put(key, value) : this;
} | [
"public",
"Phrase",
"putOptional",
"(",
"String",
"key",
",",
"CharSequence",
"value",
")",
"{",
"return",
"keys",
".",
"contains",
"(",
"key",
")",
"?",
"put",
"(",
"key",
",",
"value",
")",
":",
"this",
";",
"}"
] | Silently ignored if the key is not in the pattern.
@see #put(String, CharSequence) | [
"Silently",
"ignored",
"if",
"the",
"key",
"is",
"not",
"in",
"the",
"pattern",
"."
] | train | https://github.com/square/phrase/blob/d91f18e80790832db11b811c462f8e5cd492d97e/src/main/java/com/squareup/phrase/Phrase.java#L179-L181 |
phax/ph-oton | ph-oton-security/src/main/java/com/helger/photon/security/login/LoggedInUserManager.java | LoggedInUserManager.loginUser | @Nonnull
public ELoginResult loginUser (@Nullable final String sLoginName,
@Nullable final String sPlainTextPassword,
@Nullable final Iterable <String> aRequiredRoleIDs) {
"""
Login the passed user and require a set of certain roles, the used need... | java | @Nonnull
public ELoginResult loginUser (@Nullable final String sLoginName,
@Nullable final String sPlainTextPassword,
@Nullable final Iterable <String> aRequiredRoleIDs)
{
// Try to resolve the user
final IUser aUser = PhotonSecurityManager.g... | [
"@",
"Nonnull",
"public",
"ELoginResult",
"loginUser",
"(",
"@",
"Nullable",
"final",
"String",
"sLoginName",
",",
"@",
"Nullable",
"final",
"String",
"sPlainTextPassword",
",",
"@",
"Nullable",
"final",
"Iterable",
"<",
"String",
">",
"aRequiredRoleIDs",
")",
"... | Login the passed user and require a set of certain roles, the used needs to
have to login here.
@param sLoginName
Login name of the user to log-in. May be <code>null</code>.
@param sPlainTextPassword
Plain text password to use. May be <code>null</code>.
@param aRequiredRoleIDs
A set of required role IDs, the user need... | [
"Login",
"the",
"passed",
"user",
"and",
"require",
"a",
"set",
"of",
"certain",
"roles",
"the",
"used",
"needs",
"to",
"have",
"to",
"login",
"here",
"."
] | train | https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-security/src/main/java/com/helger/photon/security/login/LoggedInUserManager.java#L335-L348 |
alipay/sofa-rpc | core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java | AllConnectConnectionHolder.printDead | protected void printDead(String interfaceId, ProviderInfo providerInfo, ClientTransport transport, Exception e) {
"""
打印连不上日志
@param interfaceId 接口名称
@param providerInfo 服务端
@param transport 连接
@param e 错误
"""
Throwable cause = e.getCause();
if (LOGGER.isWarnEnabled(consume... | java | protected void printDead(String interfaceId, ProviderInfo providerInfo, ClientTransport transport, Exception e) {
Throwable cause = e.getCause();
if (LOGGER.isWarnEnabled(consumerConfig.getAppName())) {
LOGGER.warnWithApp(consumerConfig.getAppName(),
"Connect to {} provider:{... | [
"protected",
"void",
"printDead",
"(",
"String",
"interfaceId",
",",
"ProviderInfo",
"providerInfo",
",",
"ClientTransport",
"transport",
",",
"Exception",
"e",
")",
"{",
"Throwable",
"cause",
"=",
"e",
".",
"getCause",
"(",
")",
";",
"if",
"(",
"LOGGER",
".... | 打印连不上日志
@param interfaceId 接口名称
@param providerInfo 服务端
@param transport 连接
@param e 错误 | [
"打印连不上日志"
] | train | https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java#L726-L734 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/ServiceAccount.java | ServiceAccount.of | public static ServiceAccount of(String email, List<String> scopes) {
"""
Returns a {@code ServiceAccount} object for the provided email and scopes.
"""
return new ServiceAccount(email, scopes);
} | java | public static ServiceAccount of(String email, List<String> scopes) {
return new ServiceAccount(email, scopes);
} | [
"public",
"static",
"ServiceAccount",
"of",
"(",
"String",
"email",
",",
"List",
"<",
"String",
">",
"scopes",
")",
"{",
"return",
"new",
"ServiceAccount",
"(",
"email",
",",
"scopes",
")",
";",
"}"
] | Returns a {@code ServiceAccount} object for the provided email and scopes. | [
"Returns",
"a",
"{"
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/ServiceAccount.java#L98-L100 |
apereo/person-directory | person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java | RequestAttributeSourceFilter.addRequestAttributes | protected void addRequestAttributes(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) {
"""
Add specified request parameters to the attributes map. Some Shibboleth (Apache httpd mod-shib) configurations
use environment variables which get passed by AJP as request attributes... | java | protected void addRequestAttributes(final HttpServletRequest httpServletRequest, final Map<String, List<Object>> attributes) {
for (final Map.Entry<String, Set<String>> attributeMapping : requestAttributeMapping.entrySet()) {
final String attributeName = attributeMapping.getKey();
final ... | [
"protected",
"void",
"addRequestAttributes",
"(",
"final",
"HttpServletRequest",
"httpServletRequest",
",",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"Object",
">",
">",
"attributes",
")",
"{",
"for",
"(",
"final",
"Map",
".",
"Entry",
"<",
"String",
... | Add specified request parameters to the attributes map. Some Shibboleth (Apache httpd mod-shib) configurations
use environment variables which get passed by AJP as request attributes rather than HTTP Headers to pass
attributes from the IDP to the application. Since the attributes are likely from Shib, we want to do t... | [
"Add",
"specified",
"request",
"parameters",
"to",
"the",
"attributes",
"map",
".",
"Some",
"Shibboleth",
"(",
"Apache",
"httpd",
"mod",
"-",
"shib",
")",
"configurations",
"use",
"environment",
"variables",
"which",
"get",
"passed",
"by",
"AJP",
"as",
"reques... | train | https://github.com/apereo/person-directory/blob/331200c0878aec202b8aff12a732402d6ba7681f/person-directory-impl/src/main/java/org/apereo/services/persondir/support/web/RequestAttributeSourceFilter.java#L484-L502 |
liferay/com-liferay-commerce | commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java | CPInstancePersistenceImpl.removeByUUID_G | @Override
public CPInstance removeByUUID_G(String uuid, long groupId)
throws NoSuchCPInstanceException {
"""
Removes the cp instance where uuid = ? and groupId = ? from the database.
@param uuid the uuid
@param groupId the group ID
@return the cp instance that was removed
"""
CPInstance cpIns... | java | @Override
public CPInstance removeByUUID_G(String uuid, long groupId)
throws NoSuchCPInstanceException {
CPInstance cpInstance = findByUUID_G(uuid, groupId);
return remove(cpInstance);
} | [
"@",
"Override",
"public",
"CPInstance",
"removeByUUID_G",
"(",
"String",
"uuid",
",",
"long",
"groupId",
")",
"throws",
"NoSuchCPInstanceException",
"{",
"CPInstance",
"cpInstance",
"=",
"findByUUID_G",
"(",
"uuid",
",",
"groupId",
")",
";",
"return",
"remove",
... | Removes the cp instance where uuid = ? and groupId = ? from the database.
@param uuid the uuid
@param groupId the group ID
@return the cp instance that was removed | [
"Removes",
"the",
"cp",
"instance",
"where",
"uuid",
"=",
"?",
";",
"and",
"groupId",
"=",
"?",
";",
"from",
"the",
"database",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L809-L815 |
selendroid/selendroid | selendroid-client/src/main/java/io/selendroid/client/TouchActionBuilder.java | TouchActionBuilder.pointerDown | public TouchActionBuilder pointerDown(WebElement element, int x, int y) {
"""
Places pointer down at an offset from the top left corner of the specified WebElement
@param element WebElement to place pointer relative to
@param x x-offset from top left
@param y y-offset from top left
@return this
"""
Pre... | java | public TouchActionBuilder pointerDown(WebElement element, int x, int y) {
Preconditions.checkState(!isDown);
Map<String, Object> params = getTouchParameters(element, x, y);
addAction(TouchActionName.POINTER_DOWN, params);
isDown = true;
return this;
} | [
"public",
"TouchActionBuilder",
"pointerDown",
"(",
"WebElement",
"element",
",",
"int",
"x",
",",
"int",
"y",
")",
"{",
"Preconditions",
".",
"checkState",
"(",
"!",
"isDown",
")",
";",
"Map",
"<",
"String",
",",
"Object",
">",
"params",
"=",
"getTouchPar... | Places pointer down at an offset from the top left corner of the specified WebElement
@param element WebElement to place pointer relative to
@param x x-offset from top left
@param y y-offset from top left
@return this | [
"Places",
"pointer",
"down",
"at",
"an",
"offset",
"from",
"the",
"top",
"left",
"corner",
"of",
"the",
"specified",
"WebElement"
] | train | https://github.com/selendroid/selendroid/blob/a32c1a96c973b80c14a588b1075f084201f7fe94/selendroid-client/src/main/java/io/selendroid/client/TouchActionBuilder.java#L86-L94 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.backupCertificateAsync | public Observable<BackupCertificateResult> backupCertificateAsync(String vaultBaseUrl, String certificateName) {
"""
Backs up the specified certificate.
Requests that a backup of the specified certificate be downloaded to the client. All versions of the certificate will be downloaded. This operation requires the ... | java | public Observable<BackupCertificateResult> backupCertificateAsync(String vaultBaseUrl, String certificateName) {
return backupCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName).map(new Func1<ServiceResponse<BackupCertificateResult>, BackupCertificateResult>() {
@Override
... | [
"public",
"Observable",
"<",
"BackupCertificateResult",
">",
"backupCertificateAsync",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"certificateName",
")",
"{",
"return",
"backupCertificateWithServiceResponseAsync",
"(",
"vaultBaseUrl",
",",
"certificateName",
")",
".",
... | Backs up the specified certificate.
Requests that a backup of the specified certificate be downloaded to the client. All versions of the certificate will be downloaded. This operation requires the certificates/backup permission.
@param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
@param ce... | [
"Backs",
"up",
"the",
"specified",
"certificate",
".",
"Requests",
"that",
"a",
"backup",
"of",
"the",
"specified",
"certificate",
"be",
"downloaded",
"to",
"the",
"client",
".",
"All",
"versions",
"of",
"the",
"certificate",
"will",
"be",
"downloaded",
".",
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L8142-L8149 |
BrunoEberhard/minimal-j | src/main/java/org/minimalj/util/IdUtils.java | IdUtils.setId | public static void setId(Object object, Object id) {
"""
Set the value of the <code>id</code> in the given object
@param object object containing a public <code>id</code> field. Must not be <code>null</code>
@param id the new value. Can be <code>null</code>.
"""
try {
Field idField = getIdField(object... | java | public static void setId(Object object, Object id) {
try {
Field idField = getIdField(object.getClass());
if (idField != null) {
idField.set(object, id);
}
} catch (IllegalAccessException | IllegalArgumentException e) {
throw new LoggingRuntimeException(e, logger, "setting Id failed");
}
} | [
"public",
"static",
"void",
"setId",
"(",
"Object",
"object",
",",
"Object",
"id",
")",
"{",
"try",
"{",
"Field",
"idField",
"=",
"getIdField",
"(",
"object",
".",
"getClass",
"(",
")",
")",
";",
"if",
"(",
"idField",
"!=",
"null",
")",
"{",
"idField... | Set the value of the <code>id</code> in the given object
@param object object containing a public <code>id</code> field. Must not be <code>null</code>
@param id the new value. Can be <code>null</code>. | [
"Set",
"the",
"value",
"of",
"the",
"<code",
">",
"id<",
"/",
"code",
">",
"in",
"the",
"given",
"object"
] | train | https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/util/IdUtils.java#L105-L114 |
wisdom-framework/wisdom | extensions/wisdom-filters/src/main/java/org/wisdom/framework/filters/RedirectFilter.java | RedirectFilter.call | @Override
public Result call(final Route route, final RequestContext context) throws Exception {
"""
The interception method. It just returns a {@code REDIRECT} result to the computed URI.
@param route the route
@param context the filter context
@return the result
@throws Exception if anything bad happ... | java | @Override
public Result call(final Route route, final RequestContext context) throws Exception {
URI redirectedURI = rewriteURI(context.request());
logger.debug("Redirecting request - rewriting {} to {}", context.request().uri(), redirectedURI);
if (redirectedURI == null) {
retur... | [
"@",
"Override",
"public",
"Result",
"call",
"(",
"final",
"Route",
"route",
",",
"final",
"RequestContext",
"context",
")",
"throws",
"Exception",
"{",
"URI",
"redirectedURI",
"=",
"rewriteURI",
"(",
"context",
".",
"request",
"(",
")",
")",
";",
"logger",
... | The interception method. It just returns a {@code REDIRECT} result to the computed URI.
@param route the route
@param context the filter context
@return the result
@throws Exception if anything bad happen | [
"The",
"interception",
"method",
".",
"It",
"just",
"returns",
"a",
"{",
"@code",
"REDIRECT",
"}",
"result",
"to",
"the",
"computed",
"URI",
"."
] | train | https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-filters/src/main/java/org/wisdom/framework/filters/RedirectFilter.java#L109-L117 |
Azure/azure-sdk-for-java | policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java | PolicyStatesInner.summarizeForPolicySetDefinition | public SummarizeResultsInner summarizeForPolicySetDefinition(String subscriptionId, String policySetDefinitionName) {
"""
Summarizes policy states for the subscription level policy set definition.
@param subscriptionId Microsoft Azure subscription ID.
@param policySetDefinitionName Policy set definition name.
... | java | public SummarizeResultsInner summarizeForPolicySetDefinition(String subscriptionId, String policySetDefinitionName) {
return summarizeForPolicySetDefinitionWithServiceResponseAsync(subscriptionId, policySetDefinitionName).toBlocking().single().body();
} | [
"public",
"SummarizeResultsInner",
"summarizeForPolicySetDefinition",
"(",
"String",
"subscriptionId",
",",
"String",
"policySetDefinitionName",
")",
"{",
"return",
"summarizeForPolicySetDefinitionWithServiceResponseAsync",
"(",
"subscriptionId",
",",
"policySetDefinitionName",
")"... | Summarizes policy states for the subscription level policy set definition.
@param subscriptionId Microsoft Azure subscription ID.
@param policySetDefinitionName Policy set definition name.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws QueryFailureException thrown if the request is r... | [
"Summarizes",
"policy",
"states",
"for",
"the",
"subscription",
"level",
"policy",
"set",
"definition",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L1879-L1881 |
OpenLiberty/open-liberty | dev/com.ibm.ws.security.wim.registry/src/com/ibm/ws/security/wim/registry/util/TypeMappings.java | TypeMappings.getInputMapping | @FFDCIgnore(Exception.class)
private String getInputMapping(String inputVirtualRealm, String inputProperty, String inputDefaultProperty) {
"""
Get the WIM input property that maps to the UserRegistry input property.
@param inputVirtualRealm Virtual realm to find the mappings.
@param inputProperty String re... | java | @FFDCIgnore(Exception.class)
private String getInputMapping(String inputVirtualRealm, String inputProperty, String inputDefaultProperty) {
String methodName = "getInputMapping";
// initialize the return value
String returnValue = null;
RealmConfig realmConfig = mappingUtils.getCoreC... | [
"@",
"FFDCIgnore",
"(",
"Exception",
".",
"class",
")",
"private",
"String",
"getInputMapping",
"(",
"String",
"inputVirtualRealm",
",",
"String",
"inputProperty",
",",
"String",
"inputDefaultProperty",
")",
"{",
"String",
"methodName",
"=",
"\"getInputMapping\"",
"... | Get the WIM input property that maps to the UserRegistry input property.
@param inputVirtualRealm Virtual realm to find the mappings.
@param inputProperty String representing the input UserRegistry property.
@return String representing the input WIM property.
@pre inputVirtualRealm != null
@pre inputVirtualRealm != e... | [
"Get",
"the",
"WIM",
"input",
"property",
"that",
"maps",
"to",
"the",
"UserRegistry",
"input",
"property",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.wim.registry/src/com/ibm/ws/security/wim/registry/util/TypeMappings.java#L304-L327 |
JavaMoney/jsr354-ri-bp | src/main/java/org/javamoney/moneta/spi/base/BaseExchangeRateProvider.java | BaseExchangeRateProvider.getExchangeRate | public ExchangeRate getExchangeRate(CurrencyUnit base, CurrencyUnit term) {
"""
Access a {@link javax.money.convert.ExchangeRate} using the given currencies. The
{@link javax.money.convert.ExchangeRate} may be, depending on the data provider, eal-time or
deferred. This method should return the rate that is <i>cu... | java | public ExchangeRate getExchangeRate(CurrencyUnit base, CurrencyUnit term){
Objects.requireNonNull(base, "Base Currency is null");
Objects.requireNonNull(term, "Term Currency is null");
return getExchangeRate(ConversionQueryBuilder.of().setBaseCurrency(base).setTermCurrency(term).build());
} | [
"public",
"ExchangeRate",
"getExchangeRate",
"(",
"CurrencyUnit",
"base",
",",
"CurrencyUnit",
"term",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"base",
",",
"\"Base Currency is null\"",
")",
";",
"Objects",
".",
"requireNonNull",
"(",
"term",
",",
"\"Term ... | Access a {@link javax.money.convert.ExchangeRate} using the given currencies. The
{@link javax.money.convert.ExchangeRate} may be, depending on the data provider, eal-time or
deferred. This method should return the rate that is <i>currently</i>
valid.
@param base base {@link javax.money.CurrencyUnit}, not {@code null}... | [
"Access",
"a",
"{",
"@link",
"javax",
".",
"money",
".",
"convert",
".",
"ExchangeRate",
"}",
"using",
"the",
"given",
"currencies",
".",
"The",
"{",
"@link",
"javax",
".",
"money",
".",
"convert",
".",
"ExchangeRate",
"}",
"may",
"be",
"depending",
"on"... | train | https://github.com/JavaMoney/jsr354-ri-bp/blob/9c147ef5623d8032a6dc4c0e5eefdfb41641a9a2/src/main/java/org/javamoney/moneta/spi/base/BaseExchangeRateProvider.java#L78-L82 |
rometools/rome | rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java | MediaModuleGenerator.generateBackLinks | private void generateBackLinks(final Metadata m, final Element e) {
"""
Generation of backLinks tag.
@param m source
@param e element to attach new element to
"""
final Element backLinksElements = new Element("backLinks", NS);
for (final URL backLink : m.getBackLinks()) {
addNot... | java | private void generateBackLinks(final Metadata m, final Element e) {
final Element backLinksElements = new Element("backLinks", NS);
for (final URL backLink : m.getBackLinks()) {
addNotNullElement(backLinksElements, "backLink", backLink);
}
if (!backLinksElements.getChildren()... | [
"private",
"void",
"generateBackLinks",
"(",
"final",
"Metadata",
"m",
",",
"final",
"Element",
"e",
")",
"{",
"final",
"Element",
"backLinksElements",
"=",
"new",
"Element",
"(",
"\"backLinks\"",
",",
"NS",
")",
";",
"for",
"(",
"final",
"URL",
"backLink",
... | Generation of backLinks tag.
@param m source
@param e element to attach new element to | [
"Generation",
"of",
"backLinks",
"tag",
"."
] | train | https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/mediarss/io/MediaModuleGenerator.java#L260-L268 |
liferay/com-liferay-commerce | commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceEntryPersistenceImpl.java | CommercePriceEntryPersistenceImpl.fetchByUUID_G | @Override
public CommercePriceEntry fetchByUUID_G(String uuid, long groupId) {
"""
Returns the commerce price entry where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param uuid the uuid
@param groupId the group ID
@return the matching commer... | java | @Override
public CommercePriceEntry fetchByUUID_G(String uuid, long groupId) {
return fetchByUUID_G(uuid, groupId, true);
} | [
"@",
"Override",
"public",
"CommercePriceEntry",
"fetchByUUID_G",
"(",
"String",
"uuid",
",",
"long",
"groupId",
")",
"{",
"return",
"fetchByUUID_G",
"(",
"uuid",
",",
"groupId",
",",
"true",
")",
";",
"}"
] | Returns the commerce price entry where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param uuid the uuid
@param groupId the group ID
@return the matching commerce price entry, or <code>null</code> if a matching commerce price entry could not be found | [
"Returns",
"the",
"commerce",
"price",
"entry",
"where",
"uuid",
"=",
"?",
";",
"and",
"groupId",
"=",
"?",
";",
"or",
"returns",
"<code",
">",
"null<",
"/",
"code",
">",
"if",
"it",
"could",
"not",
"be",
"found",
".",
"Uses",
"the",
"finder",
... | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceEntryPersistenceImpl.java#L704-L707 |
elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/LinearEquationSystem.java | LinearEquationSystem.nonZeroPivotSearch | private IntIntPair nonZeroPivotSearch(int k) {
"""
Method for trivial pivot search, searches for non-zero entry.
@param k search starts at entry (k,k)
@return the position of the found pivot element
"""
int i, j;
double absValue;
for(i = k; i < coeff.length; i++) {
for(j = k; j < coeff[0... | java | private IntIntPair nonZeroPivotSearch(int k) {
int i, j;
double absValue;
for(i = k; i < coeff.length; i++) {
for(j = k; j < coeff[0].length; j++) {
// compute absolute value of
// current entry in absValue
absValue = Math.abs(coeff[row[i]][col[j]]);
// check if absVa... | [
"private",
"IntIntPair",
"nonZeroPivotSearch",
"(",
"int",
"k",
")",
"{",
"int",
"i",
",",
"j",
";",
"double",
"absValue",
";",
"for",
"(",
"i",
"=",
"k",
";",
"i",
"<",
"coeff",
".",
"length",
";",
"i",
"++",
")",
"{",
"for",
"(",
"j",
"=",
"k... | Method for trivial pivot search, searches for non-zero entry.
@param k search starts at entry (k,k)
@return the position of the found pivot element | [
"Method",
"for",
"trivial",
"pivot",
"search",
"searches",
"for",
"non",
"-",
"zero",
"entry",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/LinearEquationSystem.java#L501-L518 |
lucee/Lucee | core/src/main/java/lucee/commons/lang/StringUtil.java | StringUtil.resolveInternals | private static Map resolveInternals(Map map, boolean ignoreCase, int count) throws PageException {
"""
resolves internal values within the map, so if the map has a key "{signature}" and its value is
"Team {group}" and there's a key with the value {group} whose value is "Lucee", then {signature}
will resolve to "... | java | private static Map resolveInternals(Map map, boolean ignoreCase, int count) throws PageException {
Map result = new HashMap();
Iterator<Map.Entry> it = map.entrySet().iterator();
boolean isModified = false;
Map.Entry e;
String v, r;
while (it.hasNext()) {
e = it.next();
v = Caster.toString(e.getValue())... | [
"private",
"static",
"Map",
"resolveInternals",
"(",
"Map",
"map",
",",
"boolean",
"ignoreCase",
",",
"int",
"count",
")",
"throws",
"PageException",
"{",
"Map",
"result",
"=",
"new",
"HashMap",
"(",
")",
";",
"Iterator",
"<",
"Map",
".",
"Entry",
">",
"... | resolves internal values within the map, so if the map has a key "{signature}" and its value is
"Team {group}" and there's a key with the value {group} whose value is "Lucee", then {signature}
will resolve to "Team Lucee".
{signature} = "Team {group}" {group} = "Lucee"
then signature will resolve to
{signature} = "T... | [
"resolves",
"internal",
"values",
"within",
"the",
"map",
"so",
"if",
"the",
"map",
"has",
"a",
"key",
"{",
"signature",
"}",
"and",
"its",
"value",
"is",
"Team",
"{",
"group",
"}",
"and",
"there",
"s",
"a",
"key",
"with",
"the",
"value",
"{",
"group... | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/StringUtil.java#L1376-L1393 |
apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java | FileListUtils.listMostNestedPathRecursively | public static List<FileStatus> listMostNestedPathRecursively(FileSystem fs, Path path)
throws IOException {
"""
Method to list out all files, or directory if no file exists, under a specified path.
"""
return listMostNestedPathRecursively(fs, path, NO_OP_PATH_FILTER);
} | java | public static List<FileStatus> listMostNestedPathRecursively(FileSystem fs, Path path)
throws IOException {
return listMostNestedPathRecursively(fs, path, NO_OP_PATH_FILTER);
} | [
"public",
"static",
"List",
"<",
"FileStatus",
">",
"listMostNestedPathRecursively",
"(",
"FileSystem",
"fs",
",",
"Path",
"path",
")",
"throws",
"IOException",
"{",
"return",
"listMostNestedPathRecursively",
"(",
"fs",
",",
"path",
",",
"NO_OP_PATH_FILTER",
")",
... | Method to list out all files, or directory if no file exists, under a specified path. | [
"Method",
"to",
"list",
"out",
"all",
"files",
"or",
"directory",
"if",
"no",
"file",
"exists",
"under",
"a",
"specified",
"path",
"."
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java#L166-L169 |
apache/groovy | subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java | SwingGroovyMethods.leftShift | public static ButtonGroup leftShift(ButtonGroup self, AbstractButton b) {
"""
Overloads the left shift operator to provide an easy way to add
buttons to a ButtonGroup.
@param self a ButtonGroup
@param b an AbstractButton to be added to the buttonGroup.
@return same buttonGroup, after the value was added t... | java | public static ButtonGroup leftShift(ButtonGroup self, AbstractButton b) {
self.add(b);
return self;
} | [
"public",
"static",
"ButtonGroup",
"leftShift",
"(",
"ButtonGroup",
"self",
",",
"AbstractButton",
"b",
")",
"{",
"self",
".",
"add",
"(",
"b",
")",
";",
"return",
"self",
";",
"}"
] | Overloads the left shift operator to provide an easy way to add
buttons to a ButtonGroup.
@param self a ButtonGroup
@param b an AbstractButton to be added to the buttonGroup.
@return same buttonGroup, after the value was added to it.
@since 1.6.4 | [
"Overloads",
"the",
"left",
"shift",
"operator",
"to",
"provide",
"an",
"easy",
"way",
"to",
"add",
"buttons",
"to",
"a",
"ButtonGroup",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java#L141-L144 |
cojen/Cojen | src/main/java/org/cojen/util/ClassInjector.java | ClassInjector.getNewClass | public Class getNewClass() throws IllegalStateException, ClassFormatError {
"""
Returns the newly defined class.
@throws IllegalStateException if class was never defined
"""
if (mClass != null) {
return mClass;
}
ByteArrayOutputStream data = mData;
if (data == nul... | java | public Class getNewClass() throws IllegalStateException, ClassFormatError {
if (mClass != null) {
return mClass;
}
ByteArrayOutputStream data = mData;
if (data == null) {
throw new IllegalStateException("Class not defined yet");
}
byte[] bytes = d... | [
"public",
"Class",
"getNewClass",
"(",
")",
"throws",
"IllegalStateException",
",",
"ClassFormatError",
"{",
"if",
"(",
"mClass",
"!=",
"null",
")",
"{",
"return",
"mClass",
";",
"}",
"ByteArrayOutputStream",
"data",
"=",
"mData",
";",
"if",
"(",
"data",
"==... | Returns the newly defined class.
@throws IllegalStateException if class was never defined | [
"Returns",
"the",
"newly",
"defined",
"class",
"."
] | train | https://github.com/cojen/Cojen/blob/ddee9a0fde83870b97e0ed04c58270aa665f3a62/src/main/java/org/cojen/util/ClassInjector.java#L269-L301 |
roboconf/roboconf-platform | miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ManagementWsDelegate.java | ManagementWsDelegate.createApplication | public Application createApplication( String applicationName, String templateName, String templateQualifier )
throws ManagementWsException {
"""
Creates an application from a template.
@param applicationName the application name
@param templateName the template's name
@param templateQualifier the template's qu... | java | public Application createApplication( String applicationName, String templateName, String templateQualifier )
throws ManagementWsException {
this.logger.finer( "Creating application " + applicationName + " from " + templateName + " - " + templateQualifier + "..." );
ApplicationTemplate tpl = new ApplicationTempla... | [
"public",
"Application",
"createApplication",
"(",
"String",
"applicationName",
",",
"String",
"templateName",
",",
"String",
"templateQualifier",
")",
"throws",
"ManagementWsException",
"{",
"this",
".",
"logger",
".",
"finer",
"(",
"\"Creating application \"",
"+",
... | Creates an application from a template.
@param applicationName the application name
@param templateName the template's name
@param templateQualifier the template's qualifier
@return the created application
@throws ManagementWsException if a problem occurred with the applications management | [
"Creates",
"an",
"application",
"from",
"a",
"template",
"."
] | train | https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ManagementWsDelegate.java#L267-L284 |
SonarSource/sonarqube | sonar-core/src/main/java/org/sonar/core/util/Protobuf.java | Protobuf.read | public static <MSG extends Message> MSG read(File file, Parser<MSG> parser) {
"""
Returns the message contained in {@code file}. Throws an unchecked exception
if the file does not exist, is empty or does not contain message with the
expected type.
"""
InputStream input = null;
try {
input = new... | java | public static <MSG extends Message> MSG read(File file, Parser<MSG> parser) {
InputStream input = null;
try {
input = new BufferedInputStream(new FileInputStream(file));
return parser.parseFrom(input);
} catch (Exception e) {
throw ContextException.of("Unable to read message", e).addContex... | [
"public",
"static",
"<",
"MSG",
"extends",
"Message",
">",
"MSG",
"read",
"(",
"File",
"file",
",",
"Parser",
"<",
"MSG",
">",
"parser",
")",
"{",
"InputStream",
"input",
"=",
"null",
";",
"try",
"{",
"input",
"=",
"new",
"BufferedInputStream",
"(",
"n... | Returns the message contained in {@code file}. Throws an unchecked exception
if the file does not exist, is empty or does not contain message with the
expected type. | [
"Returns",
"the",
"message",
"contained",
"in",
"{"
] | train | https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-core/src/main/java/org/sonar/core/util/Protobuf.java#L47-L57 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/proxyhandler/Neighbour.java | Neighbour.addSubscription | protected void addSubscription(SIBUuid12 topicSpace, String topic, MESubscription subscription) {
"""
Adds the rolled back subscription to the list.
@param topicSpace
@param topic
"""
// Generate a key for the topicSpace/topic
final String key = BusGroup.subscriptionKey(topicSpace, topic);
iPr... | java | protected void addSubscription(SIBUuid12 topicSpace, String topic, MESubscription subscription)
{
// Generate a key for the topicSpace/topic
final String key = BusGroup.subscriptionKey(topicSpace, topic);
iProxies.put(key, subscription);
} | [
"protected",
"void",
"addSubscription",
"(",
"SIBUuid12",
"topicSpace",
",",
"String",
"topic",
",",
"MESubscription",
"subscription",
")",
"{",
"// Generate a key for the topicSpace/topic",
"final",
"String",
"key",
"=",
"BusGroup",
".",
"subscriptionKey",
"(",
"topicS... | Adds the rolled back subscription to the list.
@param topicSpace
@param topic | [
"Adds",
"the",
"rolled",
"back",
"subscription",
"to",
"the",
"list",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/proxyhandler/Neighbour.java#L683-L689 |
dbracewell/hermes | hermes-wordnet/src/main/java/com/davidbracewell/hermes/wordnet/WordNet.java | WordNet.getSenses | public List<Sense> getSenses(@NonNull String surfaceForm, @NonNull POS pos, @NonNull Language language) {
"""
Gets senses.
@param surfaceForm the surface form
@param pos the part of speech tag
@param language the language
@return the senses
"""
return getSenses(new SenseEnum(-1, pos.ge... | java | public List<Sense> getSenses(@NonNull String surfaceForm, @NonNull POS pos, @NonNull Language language) {
return getSenses(new SenseEnum(-1, pos.getUniversalTag(), language),
Lemmatizers
.getLemmatizer(language)
.allPossibleLemma... | [
"public",
"List",
"<",
"Sense",
">",
"getSenses",
"(",
"@",
"NonNull",
"String",
"surfaceForm",
",",
"@",
"NonNull",
"POS",
"pos",
",",
"@",
"NonNull",
"Language",
"language",
")",
"{",
"return",
"getSenses",
"(",
"new",
"SenseEnum",
"(",
"-",
"1",
",",
... | Gets senses.
@param surfaceForm the surface form
@param pos the part of speech tag
@param language the language
@return the senses | [
"Gets",
"senses",
"."
] | train | https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-wordnet/src/main/java/com/davidbracewell/hermes/wordnet/WordNet.java#L532-L537 |
Nexmo/nexmo-java | src/main/java/com/nexmo/client/voice/VoiceClient.java | VoiceClient.sendDtmf | public DtmfResponse sendDtmf(String uuid, String digits) throws IOException, NexmoClientException {
"""
Send DTMF codes to an ongoing call.
@param uuid (required) The UUID of the call, obtained from the object returned by {@link #createCall(Call)}.
This value can be obtained with {@link CallEvent#getUuid()}
... | java | public DtmfResponse sendDtmf(String uuid, String digits) throws IOException, NexmoClientException {
return dtmf.put(uuid, digits);
} | [
"public",
"DtmfResponse",
"sendDtmf",
"(",
"String",
"uuid",
",",
"String",
"digits",
")",
"throws",
"IOException",
",",
"NexmoClientException",
"{",
"return",
"dtmf",
".",
"put",
"(",
"uuid",
",",
"digits",
")",
";",
"}"
] | Send DTMF codes to an ongoing call.
@param uuid (required) The UUID of the call, obtained from the object returned by {@link #createCall(Call)}.
This value can be obtained with {@link CallEvent#getUuid()}
@param digits (required) A string specifying the digits to be sent to the call. Valid characters are the digits
... | [
"Send",
"DTMF",
"codes",
"to",
"an",
"ongoing",
"call",
"."
] | train | https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/voice/VoiceClient.java#L130-L132 |
stephenc/redmine-java-api | src/main/java/org/redmine/ta/internal/RedmineJSONParser.java | RedmineJSONParser.parseTracker | public static Tracker parseTracker(JSONObject object) throws JSONException {
"""
Parses a tracker.
@param object
object to parse.
@return parsed tracker.
@throws RedmineFormatException
if object is not a valid tracker.
"""
final int id = JsonInput.getInt(object, "id");
final String name = JsonInput.... | java | public static Tracker parseTracker(JSONObject object) throws JSONException {
final int id = JsonInput.getInt(object, "id");
final String name = JsonInput.getStringNotNull(object, "name");
return new Tracker(id, name);
} | [
"public",
"static",
"Tracker",
"parseTracker",
"(",
"JSONObject",
"object",
")",
"throws",
"JSONException",
"{",
"final",
"int",
"id",
"=",
"JsonInput",
".",
"getInt",
"(",
"object",
",",
"\"id\"",
")",
";",
"final",
"String",
"name",
"=",
"JsonInput",
".",
... | Parses a tracker.
@param object
object to parse.
@return parsed tracker.
@throws RedmineFormatException
if object is not a valid tracker. | [
"Parses",
"a",
"tracker",
"."
] | train | https://github.com/stephenc/redmine-java-api/blob/7e5270c84aba32d74a506260ec47ff86ab6c9d84/src/main/java/org/redmine/ta/internal/RedmineJSONParser.java#L190-L194 |
mirage-sql/mirage | src/main/java/com/miragesql/miragesql/util/MirageUtil.java | MirageUtil.getTableName | public static String getTableName(Class<?> entityClass, NameConverter nameConverter) {
"""
Returns the table name from the entity.
<p>
<b>Note:</b> This should not be used for Maps as entities.
<p>
If the entity class has {@link Table} annotation then this method returns the annotated table name,
otherwise cr... | java | public static String getTableName(Class<?> entityClass, NameConverter nameConverter){
Table table = entityClass.getAnnotation(Table.class);
if(table != null){
return table.name();
} else {
return nameConverter.entityToTable(entityClass.getName());
}
} | [
"public",
"static",
"String",
"getTableName",
"(",
"Class",
"<",
"?",
">",
"entityClass",
",",
"NameConverter",
"nameConverter",
")",
"{",
"Table",
"table",
"=",
"entityClass",
".",
"getAnnotation",
"(",
"Table",
".",
"class",
")",
";",
"if",
"(",
"table",
... | Returns the table name from the entity.
<p>
<b>Note:</b> This should not be used for Maps as entities.
<p>
If the entity class has {@link Table} annotation then this method returns the annotated table name,
otherwise creates table name from the entity class name using {@link NameConverter}.
@param entityClass the enti... | [
"Returns",
"the",
"table",
"name",
"from",
"the",
"entity",
".",
"<p",
">",
"<b",
">",
"Note",
":",
"<",
"/",
"b",
">",
"This",
"should",
"not",
"be",
"used",
"for",
"Maps",
"as",
"entities",
".",
"<p",
">",
"If",
"the",
"entity",
"class",
"has",
... | train | https://github.com/mirage-sql/mirage/blob/29a44b7ad267b5a48bc250cd0ef7d74813d46889/src/main/java/com/miragesql/miragesql/util/MirageUtil.java#L80-L87 |
Deep-Symmetry/beat-link | src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java | MetadataFinder.updateMetadata | private void updateMetadata(CdjStatus update, TrackMetadata data) {
"""
We have obtained metadata for a device, so store it and alert any listeners.
@param update the update which caused us to retrieve this metadata
@param data the metadata which we received
"""
hotCache.put(DeckReference.getDeckRe... | java | private void updateMetadata(CdjStatus update, TrackMetadata data) {
hotCache.put(DeckReference.getDeckReference(update.getDeviceNumber(), 0), data); // Main deck
if (data.getCueList() != null) { // Update the cache with any hot cues in this track as well
for (CueList.Entry entry : data.get... | [
"private",
"void",
"updateMetadata",
"(",
"CdjStatus",
"update",
",",
"TrackMetadata",
"data",
")",
"{",
"hotCache",
".",
"put",
"(",
"DeckReference",
".",
"getDeckReference",
"(",
"update",
".",
"getDeviceNumber",
"(",
")",
",",
"0",
")",
",",
"data",
")",
... | We have obtained metadata for a device, so store it and alert any listeners.
@param update the update which caused us to retrieve this metadata
@param data the metadata which we received | [
"We",
"have",
"obtained",
"metadata",
"for",
"a",
"device",
"so",
"store",
"it",
"and",
"alert",
"any",
"listeners",
"."
] | train | https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java#L462-L472 |
appium/java-client | src/main/java/io/appium/java_client/imagecomparison/ComparisonResult.java | ComparisonResult.mapToRect | public static Rectangle mapToRect(Map<String, Object> map) {
"""
Transforms a map into {@link Rectangle} object.
@param map the source map.
@return {@link Rectangle} object
"""
return new Rectangle(toSeleniumCoordinate(map.get("x")),
toSeleniumCoordinate(map.get("y")),
... | java | public static Rectangle mapToRect(Map<String, Object> map) {
return new Rectangle(toSeleniumCoordinate(map.get("x")),
toSeleniumCoordinate(map.get("y")),
toSeleniumCoordinate(map.get("height")),
toSeleniumCoordinate(map.get("width")));
} | [
"public",
"static",
"Rectangle",
"mapToRect",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"map",
")",
"{",
"return",
"new",
"Rectangle",
"(",
"toSeleniumCoordinate",
"(",
"map",
".",
"get",
"(",
"\"x\"",
")",
")",
",",
"toSeleniumCoordinate",
"(",
"map"... | Transforms a map into {@link Rectangle} object.
@param map the source map.
@return {@link Rectangle} object | [
"Transforms",
"a",
"map",
"into",
"{",
"@link",
"Rectangle",
"}",
"object",
"."
] | train | https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/imagecomparison/ComparisonResult.java#L102-L107 |
Axway/Grapes | server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java | ArtifactHandler.updateProvider | public void updateProvider(final String gavc, final String provider) {
"""
Update artifact provider
@param gavc String
@param provider String
"""
final DbArtifact artifact = getArtifact(gavc);
repositoryHandler.updateProvider(artifact, provider);
} | java | public void updateProvider(final String gavc, final String provider) {
final DbArtifact artifact = getArtifact(gavc);
repositoryHandler.updateProvider(artifact, provider);
} | [
"public",
"void",
"updateProvider",
"(",
"final",
"String",
"gavc",
",",
"final",
"String",
"provider",
")",
"{",
"final",
"DbArtifact",
"artifact",
"=",
"getArtifact",
"(",
"gavc",
")",
";",
"repositoryHandler",
".",
"updateProvider",
"(",
"artifact",
",",
"p... | Update artifact provider
@param gavc String
@param provider String | [
"Update",
"artifact",
"provider"
] | train | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L223-L226 |
openwms/org.openwms | org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java | AbstractWebController.buildOKResponse | protected <T extends AbstractBase> ResponseEntity<Response<T>> buildOKResponse(T... params) {
"""
Build an response object that signals a success response to the caller.
@param <T> Some type extending the AbstractBase entity
@param params A set of Serializable objects that are passed to the caller
@return A R... | java | protected <T extends AbstractBase> ResponseEntity<Response<T>> buildOKResponse(T... params) {
return buildResponse(HttpStatus.OK, "", "", params);
} | [
"protected",
"<",
"T",
"extends",
"AbstractBase",
">",
"ResponseEntity",
"<",
"Response",
"<",
"T",
">",
">",
"buildOKResponse",
"(",
"T",
"...",
"params",
")",
"{",
"return",
"buildResponse",
"(",
"HttpStatus",
".",
"OK",
",",
"\"\"",
",",
"\"\"",
",",
... | Build an response object that signals a success response to the caller.
@param <T> Some type extending the AbstractBase entity
@param params A set of Serializable objects that are passed to the caller
@return A ResponseEntity with status {@link HttpStatus#OK} | [
"Build",
"an",
"response",
"object",
"that",
"signals",
"a",
"success",
"response",
"to",
"the",
"caller",
"."
] | train | https://github.com/openwms/org.openwms/blob/b24a95c5d09a7ec3c723d7e107d1cb0039d06a7e/org.openwms.core.util/src/main/java/org/openwms/core/http/AbstractWebController.java#L173-L175 |
UrielCh/ovh-java-sdk | ovh-java-sdk-router/src/main/java/net/minidev/ovh/api/ApiOvhRouter.java | ApiOvhRouter.serviceName_privateLink_peerServiceName_GET | public OvhPrivateLink serviceName_privateLink_peerServiceName_GET(String serviceName, String peerServiceName) throws IOException {
"""
Get this object properties
REST: GET /router/{serviceName}/privateLink/{peerServiceName}
@param serviceName [required] The internal name of your Router offer
@param peerServic... | java | public OvhPrivateLink serviceName_privateLink_peerServiceName_GET(String serviceName, String peerServiceName) throws IOException {
String qPath = "/router/{serviceName}/privateLink/{peerServiceName}";
StringBuilder sb = path(qPath, serviceName, peerServiceName);
String resp = exec(qPath, "GET", sb.toString(), nul... | [
"public",
"OvhPrivateLink",
"serviceName_privateLink_peerServiceName_GET",
"(",
"String",
"serviceName",
",",
"String",
"peerServiceName",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/router/{serviceName}/privateLink/{peerServiceName}\"",
";",
"StringBuilder",
... | Get this object properties
REST: GET /router/{serviceName}/privateLink/{peerServiceName}
@param serviceName [required] The internal name of your Router offer
@param peerServiceName [required] Service name of the other side of this link | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-router/src/main/java/net/minidev/ovh/api/ApiOvhRouter.java#L316-L321 |
box/box-android-sdk | box-content-sdk/src/main/java/com/box/androidsdk/content/auth/BoxAuthentication.java | BoxAuthentication.onAuthenticated | public void onAuthenticated(BoxAuthenticationInfo infoOriginal, Context context) {
"""
Callback method to be called when authentication process finishes.
@param infoOriginal the authentication information that successfully authenticated.
@param context the current application context (that can be used to launch ... | java | public void onAuthenticated(BoxAuthenticationInfo infoOriginal, Context context) {
BoxAuthenticationInfo info = BoxAuthenticationInfo.unmodifiableObject(infoOriginal);
if (!SdkUtils.isBlank(info.accessToken()) && (info.getUser() == null || SdkUtils.isBlank(info.getUser().getId()))){
// insuf... | [
"public",
"void",
"onAuthenticated",
"(",
"BoxAuthenticationInfo",
"infoOriginal",
",",
"Context",
"context",
")",
"{",
"BoxAuthenticationInfo",
"info",
"=",
"BoxAuthenticationInfo",
".",
"unmodifiableObject",
"(",
"infoOriginal",
")",
";",
"if",
"(",
"!",
"SdkUtils",... | Callback method to be called when authentication process finishes.
@param infoOriginal the authentication information that successfully authenticated.
@param context the current application context (that can be used to launch ui or access resources). | [
"Callback",
"method",
"to",
"be",
"called",
"when",
"authentication",
"process",
"finishes",
"."
] | train | https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/auth/BoxAuthentication.java#L158-L173 |
GenesysPureEngage/provisioning-client-java | src/main/java/com/genesys/provisioning/OptionsApi.java | OptionsApi.modifyOptions | public void modifyOptions(Map<String, Object> options) throws ProvisioningApiException {
"""
Modify options.
Replace the existing application options with the specified new values.
@param options attributes to be updated.
@throws ProvisioningApiException if the call is unsuccessful.
"""
try {
... | java | public void modifyOptions(Map<String, Object> options) throws ProvisioningApiException {
try {
OptionsPostResponseStatusSuccess resp = optionsApi.optionsPost(new OptionsPost().data(new OptionsPostData().options(options)));
if (!resp.getStatus().getCode().equals(0)) {
... | [
"public",
"void",
"modifyOptions",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"options",
")",
"throws",
"ProvisioningApiException",
"{",
"try",
"{",
"OptionsPostResponseStatusSuccess",
"resp",
"=",
"optionsApi",
".",
"optionsPost",
"(",
"new",
"OptionsPost",
"... | Modify options.
Replace the existing application options with the specified new values.
@param options attributes to be updated.
@throws ProvisioningApiException if the call is unsuccessful. | [
"Modify",
"options",
".",
"Replace",
"the",
"existing",
"application",
"options",
"with",
"the",
"specified",
"new",
"values",
"."
] | train | https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/provisioning/OptionsApi.java#L61-L73 |
phax/ph-commons | ph-commons/src/main/java/com/helger/commons/typeconvert/TypeConverter.java | TypeConverter.convertToChar | public static char convertToChar (@Nullable final Object aSrcValue, final char cDefault) {
"""
Convert the passed source value to char
@param aSrcValue
The source value. May be <code>null</code>.
@param cDefault
The default value to be returned if an error occurs during type
conversion.
@return The convert... | java | public static char convertToChar (@Nullable final Object aSrcValue, final char cDefault)
{
final Character aValue = convert (aSrcValue, Character.class, null);
return aValue == null ? cDefault : aValue.charValue ();
} | [
"public",
"static",
"char",
"convertToChar",
"(",
"@",
"Nullable",
"final",
"Object",
"aSrcValue",
",",
"final",
"char",
"cDefault",
")",
"{",
"final",
"Character",
"aValue",
"=",
"convert",
"(",
"aSrcValue",
",",
"Character",
".",
"class",
",",
"null",
")",... | Convert the passed source value to char
@param aSrcValue
The source value. May be <code>null</code>.
@param cDefault
The default value to be returned if an error occurs during type
conversion.
@return The converted value.
@throws RuntimeException
If the converter itself throws an exception
@see TypeConverterProviderBe... | [
"Convert",
"the",
"passed",
"source",
"value",
"to",
"char"
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/typeconvert/TypeConverter.java#L215-L219 |
inferred/FreeBuilder | src/main/java/org/inferred/freebuilder/processor/source/SourceBuilder.java | SourceBuilder.addLine | public SourceBuilder addLine(String fmt, Object... args) {
"""
Appends a formatted line of code to the source.
<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their
{@link Object#toString()} method, except that:<ul>
<li> {@link Package} and {@link PackageElement} insta... | java | public SourceBuilder addLine(String fmt, Object... args) {
add(fmt, args);
source.append(LINE_SEPARATOR);
return this;
} | [
"public",
"SourceBuilder",
"addLine",
"(",
"String",
"fmt",
",",
"Object",
"...",
"args",
")",
"{",
"add",
"(",
"fmt",
",",
"args",
")",
";",
"source",
".",
"append",
"(",
"LINE_SEPARATOR",
")",
";",
"return",
"this",
";",
"}"
] | Appends a formatted line of code to the source.
<p>Formatting supports {@code %s} and {@code %n$s}. Most args are converted according to their
{@link Object#toString()} method, except that:<ul>
<li> {@link Package} and {@link PackageElement} instances use their fully-qualified names
(no "package " prefix).
<li> {@link... | [
"Appends",
"a",
"formatted",
"line",
"of",
"code",
"to",
"the",
"source",
"."
] | train | https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/src/main/java/org/inferred/freebuilder/processor/source/SourceBuilder.java#L129-L133 |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java | JDBCStorageConnection.readValueData | protected ValueDataWrapper readValueData(String identifier, int orderNumber, int type, String storageId)
throws SQLException, IOException, ValueStorageNotFoundException {
"""
Read ValueData from External Storage.
@param identifier
PropertyData
@param orderNumber
Value order number
@param type
propert... | java | protected ValueDataWrapper readValueData(String identifier, int orderNumber, int type, String storageId)
throws SQLException, IOException, ValueStorageNotFoundException
{
ValueIOChannel channel = this.containerConfig.valueStorageProvider.getChannel(storageId);
try
{
return channel.re... | [
"protected",
"ValueDataWrapper",
"readValueData",
"(",
"String",
"identifier",
",",
"int",
"orderNumber",
",",
"int",
"type",
",",
"String",
"storageId",
")",
"throws",
"SQLException",
",",
"IOException",
",",
"ValueStorageNotFoundException",
"{",
"ValueIOChannel",
"c... | Read ValueData from External Storage.
@param identifier
PropertyData
@param orderNumber
Value order number
@param type
property type
@param storageId
external Value storage id
@return ValueData
@throws SQLException
database error
@throws IOException
I/O error
@throws ValueStorageNotFoundException
if no such storage fo... | [
"Read",
"ValueData",
"from",
"External",
"Storage",
"."
] | train | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java#L2672-L2684 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/File.java | File.setWritable | public boolean setWritable(boolean writable, boolean ownerOnly) {
"""
Manipulates the write permissions for the abstract path designated by this
file.
@param writable
To allow write permission if true, otherwise disallow
@param ownerOnly
To manipulate write permission only for owner if true,
otherwise for ... | java | public boolean setWritable(boolean writable, boolean ownerOnly) {
return doChmod(ownerOnly ? S_IWUSR : (S_IWUSR | S_IWGRP | S_IWOTH), writable);
} | [
"public",
"boolean",
"setWritable",
"(",
"boolean",
"writable",
",",
"boolean",
"ownerOnly",
")",
"{",
"return",
"doChmod",
"(",
"ownerOnly",
"?",
"S_IWUSR",
":",
"(",
"S_IWUSR",
"|",
"S_IWGRP",
"|",
"S_IWOTH",
")",
",",
"writable",
")",
";",
"}"
] | Manipulates the write permissions for the abstract path designated by this
file.
@param writable
To allow write permission if true, otherwise disallow
@param ownerOnly
To manipulate write permission only for owner if true,
otherwise for everyone. The manipulation will apply to
everyone regardless of this value if the ... | [
"Manipulates",
"the",
"write",
"permissions",
"for",
"the",
"abstract",
"path",
"designated",
"by",
"this",
"file",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/File.java#L755-L757 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/DistributionPointFetcher.java | DistributionPointFetcher.getFullNames | private static GeneralNames getFullNames(X500Name issuer, RDN rdn)
throws IOException {
"""
Append relative name to the issuer name and return a new
GeneralNames object.
"""
List<RDN> rdns = new ArrayList<>(issuer.rdns());
rdns.add(rdn);
X500Name fullName = new X500Name(rdns.to... | java | private static GeneralNames getFullNames(X500Name issuer, RDN rdn)
throws IOException
{
List<RDN> rdns = new ArrayList<>(issuer.rdns());
rdns.add(rdn);
X500Name fullName = new X500Name(rdns.toArray(new RDN[0]));
GeneralNames fullNames = new GeneralNames();
fullNames.a... | [
"private",
"static",
"GeneralNames",
"getFullNames",
"(",
"X500Name",
"issuer",
",",
"RDN",
"rdn",
")",
"throws",
"IOException",
"{",
"List",
"<",
"RDN",
">",
"rdns",
"=",
"new",
"ArrayList",
"<>",
"(",
"issuer",
".",
"rdns",
"(",
")",
")",
";",
"rdns",
... | Append relative name to the issuer name and return a new
GeneralNames object. | [
"Append",
"relative",
"name",
"to",
"the",
"issuer",
"name",
"and",
"return",
"a",
"new",
"GeneralNames",
"object",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/DistributionPointFetcher.java#L708-L717 |
avianey/facebook-api-android-maven | facebook/src/main/java/com/facebook/Request.java | Request.newPostOpenGraphObjectRequest | public static Request newPostOpenGraphObjectRequest(Session session,
OpenGraphObject openGraphObject, Callback callback) {
"""
Creates a new Request configured to create a user owned Open Graph object.
@param session
the Session to use, or null; if non-null, the session must be in an opened state
... | java | public static Request newPostOpenGraphObjectRequest(Session session,
OpenGraphObject openGraphObject, Callback callback) {
if (openGraphObject == null) {
throw new FacebookException("openGraphObject cannot be null");
}
if (Utility.isNullOrEmpty(openGraphObject.getType()))... | [
"public",
"static",
"Request",
"newPostOpenGraphObjectRequest",
"(",
"Session",
"session",
",",
"OpenGraphObject",
"openGraphObject",
",",
"Callback",
"callback",
")",
"{",
"if",
"(",
"openGraphObject",
"==",
"null",
")",
"{",
"throw",
"new",
"FacebookException",
"(... | Creates a new Request configured to create a user owned Open Graph object.
@param session
the Session to use, or null; if non-null, the session must be in an opened state
@param openGraphObject
the Open Graph object to create; must not be null, and must have a non-empty type and title
@param callback
a callback that w... | [
"Creates",
"a",
"new",
"Request",
"configured",
"to",
"create",
"a",
"user",
"owned",
"Open",
"Graph",
"object",
"."
] | train | https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L680-L696 |
code4everything/util | src/main/java/com/zhazhapan/util/BeanUtils.java | BeanUtils.bean2Another | private static <T> T bean2Another(Object object, Class<?> clazz, T another) throws InvocationTargetException,
IllegalAccessException {
"""
将一个Bean的数据装换到另外一个(需实现setter和getter)
@param object 一个Bean
@param clazz 另外一个Bean类
@param another 另一个Bean对象
@param <T> 另外Bean类型
@return {@link T}
@throws I... | java | private static <T> T bean2Another(Object object, Class<?> clazz, T another) throws InvocationTargetException,
IllegalAccessException {
Method[] methods = object.getClass().getMethods();
Map<String, Method> clazzMethods = ReflectUtils.getMethodMap(clazz, "set");
for (Method method : m... | [
"private",
"static",
"<",
"T",
">",
"T",
"bean2Another",
"(",
"Object",
"object",
",",
"Class",
"<",
"?",
">",
"clazz",
",",
"T",
"another",
")",
"throws",
"InvocationTargetException",
",",
"IllegalAccessException",
"{",
"Method",
"[",
"]",
"methods",
"=",
... | 将一个Bean的数据装换到另外一个(需实现setter和getter)
@param object 一个Bean
@param clazz 另外一个Bean类
@param another 另一个Bean对象
@param <T> 另外Bean类型
@return {@link T}
@throws IllegalAccessException 异常
@throws InvocationTargetException 异常
@since 1.1.1 | [
"将一个Bean的数据装换到另外一个(需实现setter和getter)"
] | train | https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/BeanUtils.java#L105-L123 |
alkacon/opencms-core | src/org/opencms/db/CmsUserSettings.java | CmsUserSettings.getStartGallery | public String getStartGallery(String galleryType, CmsObject cms) {
"""
Returns the root site path to the start gallery of the user or the constant CmsPreferences.INPUT_DEFAULT.<p>
@param galleryType the type of the gallery
@param cms Cms object
@return the root site path to the start gallery or the default ke... | java | public String getStartGallery(String galleryType, CmsObject cms) {
String startGallerySetting = getStartGallery(galleryType);
String pathSetting = null;
// if a custom path to the gallery is selected
if ((startGallerySetting != null) && !startGallerySetting.equals(CmsWorkplace.INPUT_NON... | [
"public",
"String",
"getStartGallery",
"(",
"String",
"galleryType",
",",
"CmsObject",
"cms",
")",
"{",
"String",
"startGallerySetting",
"=",
"getStartGallery",
"(",
"galleryType",
")",
";",
"String",
"pathSetting",
"=",
"null",
";",
"// if a custom path to the galler... | Returns the root site path to the start gallery of the user or the constant CmsPreferences.INPUT_DEFAULT.<p>
@param galleryType the type of the gallery
@param cms Cms object
@return the root site path to the start gallery or the default key, null if "not set" | [
"Returns",
"the",
"root",
"site",
"path",
"to",
"the",
"start",
"gallery",
"of",
"the",
"user",
"or",
"the",
"constant",
"CmsPreferences",
".",
"INPUT_DEFAULT",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsUserSettings.java#L811-L829 |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java | ZooKeeperUtils.createLeaderElectionService | public static ZooKeeperLeaderElectionService createLeaderElectionService(
CuratorFramework client,
Configuration configuration) throws Exception {
"""
Creates a {@link ZooKeeperLeaderElectionService} instance.
@param client The {@link CuratorFramework} ZooKeeper client to use
@param configuration ... | java | public static ZooKeeperLeaderElectionService createLeaderElectionService(
CuratorFramework client,
Configuration configuration) throws Exception {
return createLeaderElectionService(client, configuration, "");
} | [
"public",
"static",
"ZooKeeperLeaderElectionService",
"createLeaderElectionService",
"(",
"CuratorFramework",
"client",
",",
"Configuration",
"configuration",
")",
"throws",
"Exception",
"{",
"return",
"createLeaderElectionService",
"(",
"client",
",",
"configuration",
",",
... | Creates a {@link ZooKeeperLeaderElectionService} instance.
@param client The {@link CuratorFramework} ZooKeeper client to use
@param configuration {@link Configuration} object containing the configuration values
@return {@link ZooKeeperLeaderElectionService} instance. | [
"Creates",
"a",
"{",
"@link",
"ZooKeeperLeaderElectionService",
"}",
"instance",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java#L202-L207 |
gallandarakhneorg/afc | core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/endian/EndianNumbers.java | EndianNumbers.toBEInt | @Pure
public static int toBEInt(int b1, int b2, int b3, int b4) {
"""
Converting four bytes to a Big Endian integer.
@param b1 the first byte.
@param b2 the second byte.
@param b3 the third byte.
@param b4 the fourth byte.
@return the conversion result
"""
return ((b1 & 0xFF) << 24) + ((b2 & 0x... | java | @Pure
public static int toBEInt(int b1, int b2, int b3, int b4) {
return ((b1 & 0xFF) << 24) + ((b2 & 0xFF) << 16) + ((b3 & 0xFF) << 8) + (b4 & 0xFF);
} | [
"@",
"Pure",
"public",
"static",
"int",
"toBEInt",
"(",
"int",
"b1",
",",
"int",
"b2",
",",
"int",
"b3",
",",
"int",
"b4",
")",
"{",
"return",
"(",
"(",
"b1",
"&",
"0xFF",
")",
"<<",
"24",
")",
"+",
"(",
"(",
"b2",
"&",
"0xFF",
")",
"<<",
"... | Converting four bytes to a Big Endian integer.
@param b1 the first byte.
@param b2 the second byte.
@param b3 the third byte.
@param b4 the fourth byte.
@return the conversion result | [
"Converting",
"four",
"bytes",
"to",
"a",
"Big",
"Endian",
"integer",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/endian/EndianNumbers.java#L89-L92 |
twitter/cloudhopper-commons | ch-commons-util/src/main/java/com/cloudhopper/commons/util/windowing/Window.java | Window.cancelAllExpired | public List<WindowFuture<K,R,P>> cancelAllExpired() {
"""
Cancels (completes) all expired requests. A request is considered expired
if it has an expireTimestamp set and the current time is >= the
getExpireTimestamp() value. Any callers/threads waiting for completion
will be signaled. Also, if more than one r... | java | public List<WindowFuture<K,R,P>> cancelAllExpired() {
if (this.futures.size() <= 0) {
return null;
}
List<WindowFuture<K,R,P>> expired = new ArrayList<WindowFuture<K,R,P>>();
long now = System.currentTimeMillis();
this.lock.lock();
try {
/... | [
"public",
"List",
"<",
"WindowFuture",
"<",
"K",
",",
"R",
",",
"P",
">",
">",
"cancelAllExpired",
"(",
")",
"{",
"if",
"(",
"this",
".",
"futures",
".",
"size",
"(",
")",
"<=",
"0",
")",
"{",
"return",
"null",
";",
"}",
"List",
"<",
"WindowFutur... | Cancels (completes) all expired requests. A request is considered expired
if it has an expireTimestamp set and the current time is >= the
getExpireTimestamp() value. Any callers/threads waiting for completion
will be signaled. Also, if more than one request was expired then all
callers/threads blocked with pending o... | [
"Cancels",
"(",
"completes",
")",
"all",
"expired",
"requests",
".",
"A",
"request",
"is",
"considered",
"expired",
"if",
"it",
"has",
"an",
"expireTimestamp",
"set",
"and",
"the",
"current",
"time",
"is",
">",
";",
"=",
"the",
"getExpireTimestamp",
"()",
... | train | https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/windowing/Window.java#L669-L698 |
intendia-oss/rxjava-gwt | src/main/modified/io/reactivex/super/io/reactivex/Scheduler.java | Scheduler.scheduleDirect | @NonNull
public Disposable scheduleDirect(@NonNull Runnable run, long delay, @NonNull TimeUnit unit) {
"""
Schedules the execution of the given task with the given time delay.
<p>
This method is safe to be called from multiple threads but there are no
ordering guarantees between tasks.
@param run the t... | java | @NonNull
public Disposable scheduleDirect(@NonNull Runnable run, long delay, @NonNull TimeUnit unit) {
final Worker w = createWorker();
final Runnable decoratedRun = RxJavaPlugins.onSchedule(run);
DisposeTask task = new DisposeTask(decoratedRun, w);
w.schedule(task, delay, unit);
... | [
"@",
"NonNull",
"public",
"Disposable",
"scheduleDirect",
"(",
"@",
"NonNull",
"Runnable",
"run",
",",
"long",
"delay",
",",
"@",
"NonNull",
"TimeUnit",
"unit",
")",
"{",
"final",
"Worker",
"w",
"=",
"createWorker",
"(",
")",
";",
"final",
"Runnable",
"dec... | Schedules the execution of the given task with the given time delay.
<p>
This method is safe to be called from multiple threads but there are no
ordering guarantees between tasks.
@param run the task to schedule
@param delay the delay amount, non-positive values indicate non-delayed scheduling
@param unit the unit of... | [
"Schedules",
"the",
"execution",
"of",
"the",
"given",
"task",
"with",
"the",
"given",
"time",
"delay",
"."
] | train | https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Scheduler.java#L194-L205 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.