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 |
|---|---|---|---|---|---|---|---|---|---|---|
grandstaish/paperparcel | paperparcel-compiler/src/main/java/paperparcel/Utils.java | Utils.paramAsMemberOf | private static TypeMirror paramAsMemberOf(
Types types, DeclaredType type, TypeParameterElement param) {
"""
A custom implementation for getting the resolved value of a {@link TypeParameterElement}
from a {@link DeclaredType}.
Usually this can be resolved using {@link Types#asMemberOf(DeclaredType, Eleme... | java | private static TypeMirror paramAsMemberOf(
Types types, DeclaredType type, TypeParameterElement param) {
TypeMirror resolved = paramAsMemberOfImpl(types, type, param);
checkState(resolved != null, "Could not resolve parameter: " + param);
return resolved;
} | [
"private",
"static",
"TypeMirror",
"paramAsMemberOf",
"(",
"Types",
"types",
",",
"DeclaredType",
"type",
",",
"TypeParameterElement",
"param",
")",
"{",
"TypeMirror",
"resolved",
"=",
"paramAsMemberOfImpl",
"(",
"types",
",",
"type",
",",
"param",
")",
";",
"ch... | A custom implementation for getting the resolved value of a {@link TypeParameterElement}
from a {@link DeclaredType}.
Usually this can be resolved using {@link Types#asMemberOf(DeclaredType, Element)}, but the
Jack compiler implementation currently does not work with {@link TypeParameterElement}s.
See https://code.goo... | [
"A",
"custom",
"implementation",
"for",
"getting",
"the",
"resolved",
"value",
"of",
"a",
"{",
"@link",
"TypeParameterElement",
"}",
"from",
"a",
"{",
"@link",
"DeclaredType",
"}",
"."
] | train | https://github.com/grandstaish/paperparcel/blob/917686ced81b335b6708d81d6cc0e3e496f7280d/paperparcel-compiler/src/main/java/paperparcel/Utils.java#L262-L267 |
MenoData/Time4J | base/src/main/java/net/time4j/range/MomentInterval.java | MomentInterval.toLocalInterval | public TimestampInterval toLocalInterval() {
"""
/*[deutsch]
<p>Wandelt diese Instanz in ein lokales Zeitstempelintervall um. </p>
@return local timestamp interval in system timezone (leap seconds will
always be lost)
@since 2.0
@see Timezone#ofSystem()
@see #toZonalInterval(TZID)
@see #toZ... | java | public TimestampInterval toLocalInterval() {
Boundary<PlainTimestamp> b1;
Boundary<PlainTimestamp> b2;
if (this.getStart().isInfinite()) {
b1 = Boundary.infinitePast();
} else {
PlainTimestamp t1 =
this.getStart().getTemporal().toLocalTimestamp()... | [
"public",
"TimestampInterval",
"toLocalInterval",
"(",
")",
"{",
"Boundary",
"<",
"PlainTimestamp",
">",
"b1",
";",
"Boundary",
"<",
"PlainTimestamp",
">",
"b2",
";",
"if",
"(",
"this",
".",
"getStart",
"(",
")",
".",
"isInfinite",
"(",
")",
")",
"{",
"b... | /*[deutsch]
<p>Wandelt diese Instanz in ein lokales Zeitstempelintervall um. </p>
@return local timestamp interval in system timezone (leap seconds will
always be lost)
@since 2.0
@see Timezone#ofSystem()
@see #toZonalInterval(TZID)
@see #toZonalInterval(String) | [
"/",
"*",
"[",
"deutsch",
"]",
"<p",
">",
"Wandelt",
"diese",
"Instanz",
"in",
"ein",
"lokales",
"Zeitstempelintervall",
"um",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/MomentInterval.java#L573-L595 |
windup/windup | rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/condition/annotation/AnnotationTypeCondition.java | AnnotationTypeCondition.addCondition | public AnnotationTypeCondition addCondition(String element, AnnotationCondition condition) {
"""
Adds another condition for an element within this annotation.
"""
this.conditions.put(element, condition);
return this;
} | java | public AnnotationTypeCondition addCondition(String element, AnnotationCondition condition)
{
this.conditions.put(element, condition);
return this;
} | [
"public",
"AnnotationTypeCondition",
"addCondition",
"(",
"String",
"element",
",",
"AnnotationCondition",
"condition",
")",
"{",
"this",
".",
"conditions",
".",
"put",
"(",
"element",
",",
"condition",
")",
";",
"return",
"this",
";",
"}"
] | Adds another condition for an element within this annotation. | [
"Adds",
"another",
"condition",
"for",
"an",
"element",
"within",
"this",
"annotation",
"."
] | train | https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/condition/annotation/AnnotationTypeCondition.java#L36-L40 |
comapi/comapi-sdk-android | COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java | InternalService.queryEvents | public Observable<ComapiResult<EventsQueryResponse>> queryEvents(@NonNull final String conversationId, @NonNull final Long from, @NonNull final Integer limit) {
"""
Query events. Use {@link #queryConversationEvents(String, Long, Integer)} for better visibility of possible events.
@param conversationId ID of a c... | java | public Observable<ComapiResult<EventsQueryResponse>> queryEvents(@NonNull final String conversationId, @NonNull final Long from, @NonNull final Integer limit) {
final String token = getToken();
if (sessionController.isCreatingSession()) {
return getTaskQueue().queueQueryEvents(conversation... | [
"public",
"Observable",
"<",
"ComapiResult",
"<",
"EventsQueryResponse",
">",
">",
"queryEvents",
"(",
"@",
"NonNull",
"final",
"String",
"conversationId",
",",
"@",
"NonNull",
"final",
"Long",
"from",
",",
"@",
"NonNull",
"final",
"Integer",
"limit",
")",
"{"... | Query events. Use {@link #queryConversationEvents(String, Long, Integer)} for better visibility of possible events.
@param conversationId ID of a conversation to query events in it.
@param from ID of the event to start from.
@param limit Limit of events to obtain in this call.
@return Observable to ... | [
"Query",
"events",
".",
"Use",
"{",
"@link",
"#queryConversationEvents",
"(",
"String",
"Long",
"Integer",
")",
"}",
"for",
"better",
"visibility",
"of",
"possible",
"events",
"."
] | train | https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L815-L826 |
j-a-w-r/jawr-main-repo | jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PropsFilePropertiesSource.java | PropsFilePropertiesSource.loadConfig | protected void loadConfig(Properties props, String path, InputStream is) {
"""
Loads the configuration from the stream
@param props
the properties to update
@param path
The configuration path
@param is
the input stream
"""
// load properties into a Properties object
try {
props.load(is);
} cat... | java | protected void loadConfig(Properties props, String path, InputStream is) {
// load properties into a Properties object
try {
props.load(is);
} catch (IOException e) {
throw new BundlingProcessException("Unable to load jawr configuration at " + path + ".", e);
}
} | [
"protected",
"void",
"loadConfig",
"(",
"Properties",
"props",
",",
"String",
"path",
",",
"InputStream",
"is",
")",
"{",
"// load properties into a Properties object",
"try",
"{",
"props",
".",
"load",
"(",
"is",
")",
";",
"}",
"catch",
"(",
"IOException",
"e... | Loads the configuration from the stream
@param props
the properties to update
@param path
The configuration path
@param is
the input stream | [
"Loads",
"the",
"configuration",
"from",
"the",
"stream"
] | train | https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PropsFilePropertiesSource.java#L119-L126 |
DataSketches/sketches-core | src/main/java/com/yahoo/sketches/QuickSelect.java | QuickSelect.selectIncludingZeros | public static double selectIncludingZeros(final double[] arr, final int pivot) {
"""
Gets the 1-based kth order statistic from the array including any zero values in the
array. Warning! This changes the ordering of elements in the given array!
@param arr The hash array.
@param pivot The 1-based index of the v... | java | public static double selectIncludingZeros(final double[] arr, final int pivot) {
final int arrSize = arr.length;
final int adj = pivot - 1;
return select(arr, 0, arrSize - 1, adj);
} | [
"public",
"static",
"double",
"selectIncludingZeros",
"(",
"final",
"double",
"[",
"]",
"arr",
",",
"final",
"int",
"pivot",
")",
"{",
"final",
"int",
"arrSize",
"=",
"arr",
".",
"length",
";",
"final",
"int",
"adj",
"=",
"pivot",
"-",
"1",
";",
"retur... | Gets the 1-based kth order statistic from the array including any zero values in the
array. Warning! This changes the ordering of elements in the given array!
@param arr The hash array.
@param pivot The 1-based index of the value that is chosen as the pivot for the array.
After the operation all values below this 1-ba... | [
"Gets",
"the",
"1",
"-",
"based",
"kth",
"order",
"statistic",
"from",
"the",
"array",
"including",
"any",
"zero",
"values",
"in",
"the",
"array",
".",
"Warning!",
"This",
"changes",
"the",
"ordering",
"of",
"elements",
"in",
"the",
"given",
"array!"
] | train | https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/QuickSelect.java#L163-L167 |
sshtools/j2ssh-maverick | j2ssh-maverick/src/main/java/com/sshtools/publickey/PublicKeySubsystem.java | PublicKeySubsystem.associateCommand | public void associateCommand(SshPublicKey key, String command)
throws SshException, PublicKeySubsystemException {
"""
Associate a command with an accepted public key. The request will fail if
the public key is not currently in the users acceptable list. Also some
server implementations may choose not to suppo... | java | public void associateCommand(SshPublicKey key, String command)
throws SshException, PublicKeySubsystemException {
try {
Packet msg = createPacket();
msg.writeString("command");
msg.writeString(key.getAlgorithm());
msg.writeBinaryString(key.getEncoded());
msg.writeString(command);
sendMessage(m... | [
"public",
"void",
"associateCommand",
"(",
"SshPublicKey",
"key",
",",
"String",
"command",
")",
"throws",
"SshException",
",",
"PublicKeySubsystemException",
"{",
"try",
"{",
"Packet",
"msg",
"=",
"createPacket",
"(",
")",
";",
"msg",
".",
"writeString",
"(",
... | Associate a command with an accepted public key. The request will fail if
the public key is not currently in the users acceptable list. Also some
server implementations may choose not to support this feature.
@param key
@param command
@throws SshException
@throws PublicKeyStatusException | [
"Associate",
"a",
"command",
"with",
"an",
"accepted",
"public",
"key",
".",
"The",
"request",
"will",
"fail",
"if",
"the",
"public",
"key",
"is",
"not",
"currently",
"in",
"the",
"users",
"acceptable",
"list",
".",
"Also",
"some",
"server",
"implementations... | train | https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/publickey/PublicKeySubsystem.java#L216-L235 |
banq/jdonframework | JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/util/CreateViewPageUtil.java | CreateViewPageUtil.doCreate | public void doCreate(ActionMapping actionMapping, ModelForm modelForm, HttpServletRequest request) throws Exception {
"""
create a ModelForm object
two things: 1. create a ModelForm null instance 2. initial ModelForm
instance value, obtain a inital Model instance copy the Model instance to
the ModelForm insta... | java | public void doCreate(ActionMapping actionMapping, ModelForm modelForm, HttpServletRequest request) throws Exception {
Debug.logVerbose("[JdonFramework] enter doCreate... ", module);
String formName = FormBeanUtil.getFormName(actionMapping);
ModelHandler modelHandler = modelManager.borrowtHandlerObject(formName... | [
"public",
"void",
"doCreate",
"(",
"ActionMapping",
"actionMapping",
",",
"ModelForm",
"modelForm",
",",
"HttpServletRequest",
"request",
")",
"throws",
"Exception",
"{",
"Debug",
".",
"logVerbose",
"(",
"\"[JdonFramework] enter doCreate... \"",
",",
"module",
")",
";... | create a ModelForm object
two things: 1. create a ModelForm null instance 2. initial ModelForm
instance value, obtain a inital Model instance copy the Model instance to
the ModelForm instance
obtaining datas two ways: 1.call ModelHandler initForm method; 2.call
Modelhandler initModel method; | [
"create",
"a",
"ModelForm",
"object"
] | train | https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/strutsutil/util/CreateViewPageUtil.java#L55-L89 |
xwiki/xwiki-rendering | xwiki-rendering-macros/xwiki-rendering-macro-footnotes/src/main/java/org/xwiki/rendering/internal/macro/footnote/PutFootnotesMacro.java | PutFootnotesMacro.addFootnoteRef | private void addFootnoteRef(MacroMarkerBlock footnoteMacro, Block footnoteRef) {
"""
Add a footnote to the list of document footnotes. If such a list doesn't exist yet, create it and append it to
the end of the document.
@param footnoteMacro the {{footnote}} macro being processed
@param footnoteRef the genera... | java | private void addFootnoteRef(MacroMarkerBlock footnoteMacro, Block footnoteRef)
{
footnoteMacro.getChildren().clear();
footnoteMacro.addChild(footnoteRef);
} | [
"private",
"void",
"addFootnoteRef",
"(",
"MacroMarkerBlock",
"footnoteMacro",
",",
"Block",
"footnoteRef",
")",
"{",
"footnoteMacro",
".",
"getChildren",
"(",
")",
".",
"clear",
"(",
")",
";",
"footnoteMacro",
".",
"addChild",
"(",
"footnoteRef",
")",
";",
"}... | Add a footnote to the list of document footnotes. If such a list doesn't exist yet, create it and append it to
the end of the document.
@param footnoteMacro the {{footnote}} macro being processed
@param footnoteRef the generated block corresponding to the footnote to be inserted | [
"Add",
"a",
"footnote",
"to",
"the",
"list",
"of",
"document",
"footnotes",
".",
"If",
"such",
"a",
"list",
"doesn",
"t",
"exist",
"yet",
"create",
"it",
"and",
"append",
"it",
"to",
"the",
"end",
"of",
"the",
"document",
"."
] | train | https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-macros/xwiki-rendering-macro-footnotes/src/main/java/org/xwiki/rendering/internal/macro/footnote/PutFootnotesMacro.java#L175-L179 |
sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/repository/ParticipantRepository.java | ParticipantRepository.addListener | protected EventListener addListener(ADDRESST key, EventListener value) {
"""
Add a participant with the given address in this repository.
@param key address of the participant.
@param value is the participant to map to the address.
@return the participant that was previously associated to the given address.
... | java | protected EventListener addListener(ADDRESST key, EventListener value) {
synchronized (mutex()) {
return this.listeners.put(key, value);
}
} | [
"protected",
"EventListener",
"addListener",
"(",
"ADDRESST",
"key",
",",
"EventListener",
"value",
")",
"{",
"synchronized",
"(",
"mutex",
"(",
")",
")",
"{",
"return",
"this",
".",
"listeners",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"}",
"}"
] | Add a participant with the given address in this repository.
@param key address of the participant.
@param value is the participant to map to the address.
@return the participant that was previously associated to the given address. | [
"Add",
"a",
"participant",
"with",
"the",
"given",
"address",
"in",
"this",
"repository",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/repository/ParticipantRepository.java#L126-L130 |
alexvasilkov/GestureViews | sample/src/main/java/com/alexvasilkov/gestures/sample/demo/utils/RecyclerAdapterHelper.java | RecyclerAdapterHelper.notifyChanges | public static <T> void notifyChanges(RecyclerView.Adapter<?> adapter,
final List<T> oldList, final List<T> newList) {
"""
Calls adapter's notify* methods when items are added / removed / moved / updated.
"""
DiffUtil.calculateDiff(new DiffUtil.Callback() {
@Override
... | java | public static <T> void notifyChanges(RecyclerView.Adapter<?> adapter,
final List<T> oldList, final List<T> newList) {
DiffUtil.calculateDiff(new DiffUtil.Callback() {
@Override
public int getOldListSize() {
return oldList == null ? 0 : oldList.size();
... | [
"public",
"static",
"<",
"T",
">",
"void",
"notifyChanges",
"(",
"RecyclerView",
".",
"Adapter",
"<",
"?",
">",
"adapter",
",",
"final",
"List",
"<",
"T",
">",
"oldList",
",",
"final",
"List",
"<",
"T",
">",
"newList",
")",
"{",
"DiffUtil",
".",
"cal... | Calls adapter's notify* methods when items are added / removed / moved / updated. | [
"Calls",
"adapter",
"s",
"notify",
"*",
"methods",
"when",
"items",
"are",
"added",
"/",
"removed",
"/",
"moved",
"/",
"updated",
"."
] | train | https://github.com/alexvasilkov/GestureViews/blob/f0a4c266e31dcad23bd0d9013531bc1c501b9c9f/sample/src/main/java/com/alexvasilkov/gestures/sample/demo/utils/RecyclerAdapterHelper.java#L15-L39 |
google/error-prone-javac | src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java | JavacParser.earlier | static int earlier(int pos1, int pos2) {
"""
Return the lesser of two positions, making allowance for either one
being unset.
"""
if (pos1 == Position.NOPOS)
return pos2;
if (pos2 == Position.NOPOS)
return pos1;
return (pos1 < pos2 ? pos1 : pos2);
} | java | static int earlier(int pos1, int pos2) {
if (pos1 == Position.NOPOS)
return pos2;
if (pos2 == Position.NOPOS)
return pos1;
return (pos1 < pos2 ? pos1 : pos2);
} | [
"static",
"int",
"earlier",
"(",
"int",
"pos1",
",",
"int",
"pos2",
")",
"{",
"if",
"(",
"pos1",
"==",
"Position",
".",
"NOPOS",
")",
"return",
"pos2",
";",
"if",
"(",
"pos2",
"==",
"Position",
".",
"NOPOS",
")",
"return",
"pos1",
";",
"return",
"(... | Return the lesser of two positions, making allowance for either one
being unset. | [
"Return",
"the",
"lesser",
"of",
"two",
"positions",
"making",
"allowance",
"for",
"either",
"one",
"being",
"unset",
"."
] | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java#L4017-L4023 |
Red5/red5-server-common | src/main/java/org/red5/server/stream/PlayEngine.java | PlayEngine.sendSeekStatus | private void sendSeekStatus(IPlayItem item, int position) {
"""
Send seek status notification
@param item
Playlist item
@param position
Seek position
"""
Status seek = new Status(StatusCodes.NS_SEEK_NOTIFY);
seek.setClientid(streamId);
seek.setDetails(item.getName());
seek... | java | private void sendSeekStatus(IPlayItem item, int position) {
Status seek = new Status(StatusCodes.NS_SEEK_NOTIFY);
seek.setClientid(streamId);
seek.setDetails(item.getName());
seek.setDesciption(String.format("Seeking %d (stream ID: %d).", position, streamId));
doPushMessage(seek... | [
"private",
"void",
"sendSeekStatus",
"(",
"IPlayItem",
"item",
",",
"int",
"position",
")",
"{",
"Status",
"seek",
"=",
"new",
"Status",
"(",
"StatusCodes",
".",
"NS_SEEK_NOTIFY",
")",
";",
"seek",
".",
"setClientid",
"(",
"streamId",
")",
";",
"seek",
"."... | Send seek status notification
@param item
Playlist item
@param position
Seek position | [
"Send",
"seek",
"status",
"notification"
] | train | https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/stream/PlayEngine.java#L1232-L1239 |
GoogleCloudPlatform/bigdata-interop | util/src/main/java/com/google/cloud/hadoop/util/ApiErrorExtractor.java | ApiErrorExtractor.toUserPresentableMessage | public String toUserPresentableMessage(IOException ioe, @Nullable String action) {
"""
Converts the exception to a user-presentable error message. Specifically,
extracts message field for HTTP 4xx codes, and creates a generic
"Internal Server Error" for HTTP 5xx codes.
"""
String message = "Internal serv... | java | public String toUserPresentableMessage(IOException ioe, @Nullable String action) {
String message = "Internal server error";
if (isClientError(ioe)) {
message = getErrorMessage(ioe);
}
if (action == null) {
return message;
} else {
return String.format("Encountered an error while ... | [
"public",
"String",
"toUserPresentableMessage",
"(",
"IOException",
"ioe",
",",
"@",
"Nullable",
"String",
"action",
")",
"{",
"String",
"message",
"=",
"\"Internal server error\"",
";",
"if",
"(",
"isClientError",
"(",
"ioe",
")",
")",
"{",
"message",
"=",
"g... | Converts the exception to a user-presentable error message. Specifically,
extracts message field for HTTP 4xx codes, and creates a generic
"Internal Server Error" for HTTP 5xx codes. | [
"Converts",
"the",
"exception",
"to",
"a",
"user",
"-",
"presentable",
"error",
"message",
".",
"Specifically",
"extracts",
"message",
"field",
"for",
"HTTP",
"4xx",
"codes",
"and",
"creates",
"a",
"generic",
"Internal",
"Server",
"Error",
"for",
"HTTP",
"5xx"... | train | https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/util/src/main/java/com/google/cloud/hadoop/util/ApiErrorExtractor.java#L382-L393 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/SimpleTimeZone.java | SimpleTimeZone.setEndRule | public void setEndRule(int endMonth, int endDay, int endDayOfWeek, int endTime, boolean after) {
"""
Sets the daylight saving time end rule to a weekday before or after the given date within
a month, e.g., the first Monday on or after the 8th.
@param endMonth The daylight saving time ending month. Month... | java | public void setEndRule(int endMonth, int endDay, int endDayOfWeek, int endTime, boolean after)
{
if (after) {
setEndRule(endMonth, endDay, -endDayOfWeek, endTime);
} else {
setEndRule(endMonth, -endDay, -endDayOfWeek, endTime);
}
} | [
"public",
"void",
"setEndRule",
"(",
"int",
"endMonth",
",",
"int",
"endDay",
",",
"int",
"endDayOfWeek",
",",
"int",
"endTime",
",",
"boolean",
"after",
")",
"{",
"if",
"(",
"after",
")",
"{",
"setEndRule",
"(",
"endMonth",
",",
"endDay",
",",
"-",
"e... | Sets the daylight saving time end rule to a weekday before or after the given date within
a month, e.g., the first Monday on or after the 8th.
@param endMonth The daylight saving time ending month. Month is
a {@link Calendar#MONTH MONTH} field
value (0-based. e.g., 9 for October).
@param endDay The day... | [
"Sets",
"the",
"daylight",
"saving",
"time",
"end",
"rule",
"to",
"a",
"weekday",
"before",
"or",
"after",
"the",
"given",
"date",
"within",
"a",
"month",
"e",
".",
"g",
".",
"the",
"first",
"Monday",
"on",
"or",
"after",
"the",
"8th",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/SimpleTimeZone.java#L518-L525 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableInfo.java | TableInfo.of | public static TableInfo of(TableId tableId, TableDefinition definition) {
"""
Returns a {@code TableInfo} object given table identity and definition. Use {@link
StandardTableDefinition} to create simple BigQuery table. Use {@link ViewDefinition} to create
a BigQuery view. Use {@link ExternalTableDefinition} to c... | java | public static TableInfo of(TableId tableId, TableDefinition definition) {
return newBuilder(tableId, definition).build();
} | [
"public",
"static",
"TableInfo",
"of",
"(",
"TableId",
"tableId",
",",
"TableDefinition",
"definition",
")",
"{",
"return",
"newBuilder",
"(",
"tableId",
",",
"definition",
")",
".",
"build",
"(",
")",
";",
"}"
] | Returns a {@code TableInfo} object given table identity and definition. Use {@link
StandardTableDefinition} to create simple BigQuery table. Use {@link ViewDefinition} to create
a BigQuery view. Use {@link ExternalTableDefinition} to create a BigQuery a table backed by
external data. | [
"Returns",
"a",
"{"
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/TableInfo.java#L457-L459 |
mygreen/xlsmapper | src/main/java/com/gh/mygreen/xlsmapper/util/CellFinder.java | CellFinder.query | public static CellFinder query(final Sheet sheet, final String label, final Configuration config) {
"""
検索する際の条件を組み立てる
@param sheet 検索対象のシート
@param label 検索するセルのラベル
@param config システム設定。
設定値 {@link Configuration#isNormalizeLabelText()}、{@link Configuration#isRegexLabelText()}の値によって、
検索する際にラベルを正規化、または正規表現により一致... | java | public static CellFinder query(final Sheet sheet, final String label, final Configuration config) {
return new CellFinder(sheet, label, config);
} | [
"public",
"static",
"CellFinder",
"query",
"(",
"final",
"Sheet",
"sheet",
",",
"final",
"String",
"label",
",",
"final",
"Configuration",
"config",
")",
"{",
"return",
"new",
"CellFinder",
"(",
"sheet",
",",
"label",
",",
"config",
")",
";",
"}"
] | 検索する際の条件を組み立てる
@param sheet 検索対象のシート
@param label 検索するセルのラベル
@param config システム設定。
設定値 {@link Configuration#isNormalizeLabelText()}、{@link Configuration#isRegexLabelText()}の値によって、
検索する際にラベルを正規化、または正規表現により一致するかで判定を行う。 | [
"検索する際の条件を組み立てる"
] | train | https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/util/CellFinder.java#L63-L65 |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/util/BooleanExpressionParser.java | BooleanExpressionParser.getBooleanResultAsString | private static String getBooleanResultAsString(final String operator, final String rightOperand, final String leftOperand) {
"""
Evaluates a boolean expression to a String representation (true/false).
@param operator The operator to apply on operands
@param rightOperand The right hand side of the expressio... | java | private static String getBooleanResultAsString(final String operator, final String rightOperand, final String leftOperand) {
switch (operator) {
case "lt":
return Boolean.toString(Integer.valueOf(leftOperand) < Integer.valueOf(rightOperand));
case "lt=":
r... | [
"private",
"static",
"String",
"getBooleanResultAsString",
"(",
"final",
"String",
"operator",
",",
"final",
"String",
"rightOperand",
",",
"final",
"String",
"leftOperand",
")",
"{",
"switch",
"(",
"operator",
")",
"{",
"case",
"\"lt\"",
":",
"return",
"Boolean... | Evaluates a boolean expression to a String representation (true/false).
@param operator The operator to apply on operands
@param rightOperand The right hand side of the expression
@param leftOperand The left hand side of the expression
@return true/false as String | [
"Evaluates",
"a",
"boolean",
"expression",
"to",
"a",
"String",
"representation",
"(",
"true",
"/",
"false",
")",
"."
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/BooleanExpressionParser.java#L317-L336 |
google/closure-compiler | src/com/google/javascript/jscomp/RewriteObjectSpread.java | RewriteObjectSpread.visitObjectWithSpread | private void visitObjectWithSpread(NodeTraversal t, Node obj) {
"""
/*
Convert '{first: b, c, ...spread, d: e, last}' to:
Object.assign({}, {first:b, c}, spread, {d:e, last});
"""
checkArgument(obj.isObjectLit());
// Add an empty target object literal so changes made by Object.assign will not affe... | java | private void visitObjectWithSpread(NodeTraversal t, Node obj) {
checkArgument(obj.isObjectLit());
// Add an empty target object literal so changes made by Object.assign will not affect any other
// variables.
Node result =
astFactory.createObjectDotAssignCall(
t.getScope(), obj.getJ... | [
"private",
"void",
"visitObjectWithSpread",
"(",
"NodeTraversal",
"t",
",",
"Node",
"obj",
")",
"{",
"checkArgument",
"(",
"obj",
".",
"isObjectLit",
"(",
")",
")",
";",
"// Add an empty target object literal so changes made by Object.assign will not affect any other",
"// ... | /*
Convert '{first: b, c, ...spread, d: e, last}' to:
Object.assign({}, {first:b, c}, spread, {d:e, last}); | [
"/",
"*",
"Convert",
"{",
"first",
":",
"b",
"c",
"...",
"spread",
"d",
":",
"e",
"last",
"}",
"to",
":"
] | train | https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/RewriteObjectSpread.java#L89-L125 |
michael-rapp/AndroidMaterialValidation | library/src/main/java/de/mrapp/android/validation/Validators.java | Validators.iPv6Address | public static Validator<CharSequence> iPv6Address(@NonNull final Context context,
@StringRes final int resourceId) {
"""
Creates and returns a validator, which allows to validate texts to ensure, that they
represent valid IPv6 addresses. Empty texts are also a... | java | public static Validator<CharSequence> iPv6Address(@NonNull final Context context,
@StringRes final int resourceId) {
return new IPv6AddressValidator(context, resourceId);
} | [
"public",
"static",
"Validator",
"<",
"CharSequence",
">",
"iPv6Address",
"(",
"@",
"NonNull",
"final",
"Context",
"context",
",",
"@",
"StringRes",
"final",
"int",
"resourceId",
")",
"{",
"return",
"new",
"IPv6AddressValidator",
"(",
"context",
",",
"resourceId... | Creates and returns a validator, which allows to validate texts to ensure, that they
represent valid IPv6 addresses. Empty texts are also accepted.
@param context
The context, which should be used to retrieve the error message, as an instance of
the class {@link Context}. The context may not be null
@param resourceId
... | [
"Creates",
"and",
"returns",
"a",
"validator",
"which",
"allows",
"to",
"validate",
"texts",
"to",
"ensure",
"that",
"they",
"represent",
"valid",
"IPv6",
"addresses",
".",
"Empty",
"texts",
"are",
"also",
"accepted",
"."
] | train | https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L954-L957 |
elki-project/elki | elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java | SphereUtil.bearingDegDeg | public static double bearingDegDeg(double latS, double lngS, double latE, double lngE) {
"""
Compute the bearing from start to end.
@param latS Start latitude, in degree
@param lngS Start longitude, in degree
@param latE End latitude, in degree
@param lngE End longitude, in degree
@return Bearing in degree
... | java | public static double bearingDegDeg(double latS, double lngS, double latE, double lngE) {
return rad2deg(bearingRad(deg2rad(latS), deg2rad(lngS), deg2rad(latE), deg2rad(lngE)));
} | [
"public",
"static",
"double",
"bearingDegDeg",
"(",
"double",
"latS",
",",
"double",
"lngS",
",",
"double",
"latE",
",",
"double",
"lngE",
")",
"{",
"return",
"rad2deg",
"(",
"bearingRad",
"(",
"deg2rad",
"(",
"latS",
")",
",",
"deg2rad",
"(",
"lngS",
")... | Compute the bearing from start to end.
@param latS Start latitude, in degree
@param lngS Start longitude, in degree
@param latE End latitude, in degree
@param lngE End longitude, in degree
@return Bearing in degree | [
"Compute",
"the",
"bearing",
"from",
"start",
"to",
"end",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java#L865-L867 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java | ClusterManagerClient.getServerConfig | public final ServerConfig getServerConfig(String projectId, String zone) {
"""
Returns configuration info about the Kubernetes Engine service.
<p>Sample code:
<pre><code>
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "";
String zone = "";
ServerConfi... | java | public final ServerConfig getServerConfig(String projectId, String zone) {
GetServerConfigRequest request =
GetServerConfigRequest.newBuilder().setProjectId(projectId).setZone(zone).build();
return getServerConfig(request);
} | [
"public",
"final",
"ServerConfig",
"getServerConfig",
"(",
"String",
"projectId",
",",
"String",
"zone",
")",
"{",
"GetServerConfigRequest",
"request",
"=",
"GetServerConfigRequest",
".",
"newBuilder",
"(",
")",
".",
"setProjectId",
"(",
"projectId",
")",
".",
"se... | Returns configuration info about the Kubernetes Engine service.
<p>Sample code:
<pre><code>
try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) {
String projectId = "";
String zone = "";
ServerConfig response = clusterManagerClient.getServerConfig(projectId, zone);
}
</code></pre>
@param ... | [
"Returns",
"configuration",
"info",
"about",
"the",
"Kubernetes",
"Engine",
"service",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java#L1653-L1658 |
VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4Connection.java | JDBC4Connection.prepareStatement | @Override
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
"""
Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability.
"""
checkClosed... | java | @Override
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
{
checkClosed();
throw SQLError.noSupport();
} | [
"@",
"Override",
"public",
"PreparedStatement",
"prepareStatement",
"(",
"String",
"sql",
",",
"int",
"resultSetType",
",",
"int",
"resultSetConcurrency",
",",
"int",
"resultSetHoldability",
")",
"throws",
"SQLException",
"{",
"checkClosed",
"(",
")",
";",
"throw",
... | Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability. | [
"Creates",
"a",
"PreparedStatement",
"object",
"that",
"will",
"generate",
"ResultSet",
"objects",
"with",
"the",
"given",
"type",
"concurrency",
"and",
"holdability",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4Connection.java#L398-L403 |
jfinal/jfinal | src/main/java/com/jfinal/config/JFinalConfig.java | JFinalConfig.loadPropertyFile | public Properties loadPropertyFile(File file, String encoding) {
"""
Load property file
Example:<br>
loadPropertyFile(new File("/var/config/my_config.txt"), "UTF-8");
@param file the properties File object
@param encoding the encoding
"""
prop = new Prop(file, encoding);
return prop.getProperties()... | java | public Properties loadPropertyFile(File file, String encoding) {
prop = new Prop(file, encoding);
return prop.getProperties();
} | [
"public",
"Properties",
"loadPropertyFile",
"(",
"File",
"file",
",",
"String",
"encoding",
")",
"{",
"prop",
"=",
"new",
"Prop",
"(",
"file",
",",
"encoding",
")",
";",
"return",
"prop",
".",
"getProperties",
"(",
")",
";",
"}"
] | Load property file
Example:<br>
loadPropertyFile(new File("/var/config/my_config.txt"), "UTF-8");
@param file the properties File object
@param encoding the encoding | [
"Load",
"property",
"file",
"Example",
":",
"<br",
">",
"loadPropertyFile",
"(",
"new",
"File",
"(",
"/",
"var",
"/",
"config",
"/",
"my_config",
".",
"txt",
")",
"UTF",
"-",
"8",
")",
";"
] | train | https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/config/JFinalConfig.java#L125-L128 |
alkacon/opencms-core | src/org/opencms/workplace/CmsDialog.java | CmsDialog.htmlStartStyle | public String htmlStartStyle(String title, String stylesheet) {
"""
Builds the start html of the page, including setting of DOCTYPE,
inserting a header with the content-type and choosing an individual style sheet.<p>
@param title the title for the page
@param stylesheet the style sheet to include
@return t... | java | public String htmlStartStyle(String title, String stylesheet) {
return pageHtmlStyle(HTML_START, title, stylesheet);
} | [
"public",
"String",
"htmlStartStyle",
"(",
"String",
"title",
",",
"String",
"stylesheet",
")",
"{",
"return",
"pageHtmlStyle",
"(",
"HTML_START",
",",
"title",
",",
"stylesheet",
")",
";",
"}"
] | Builds the start html of the page, including setting of DOCTYPE,
inserting a header with the content-type and choosing an individual style sheet.<p>
@param title the title for the page
@param stylesheet the style sheet to include
@return the start html of the page | [
"Builds",
"the",
"start",
"html",
"of",
"the",
"page",
"including",
"setting",
"of",
"DOCTYPE",
"inserting",
"a",
"header",
"with",
"the",
"content",
"-",
"type",
"and",
"choosing",
"an",
"individual",
"style",
"sheet",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsDialog.java#L1406-L1409 |
liferay/com-liferay-commerce | commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehouseItemPersistenceImpl.java | CommerceWarehouseItemPersistenceImpl.fetchByCWI_CPIU | @Override
public CommerceWarehouseItem fetchByCWI_CPIU(long commerceWarehouseId,
String CPInstanceUuid) {
"""
Returns the commerce warehouse item where commerceWarehouseId = ? and CPInstanceUuid = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param commerceWarehouse... | java | @Override
public CommerceWarehouseItem fetchByCWI_CPIU(long commerceWarehouseId,
String CPInstanceUuid) {
return fetchByCWI_CPIU(commerceWarehouseId, CPInstanceUuid, true);
} | [
"@",
"Override",
"public",
"CommerceWarehouseItem",
"fetchByCWI_CPIU",
"(",
"long",
"commerceWarehouseId",
",",
"String",
"CPInstanceUuid",
")",
"{",
"return",
"fetchByCWI_CPIU",
"(",
"commerceWarehouseId",
",",
"CPInstanceUuid",
",",
"true",
")",
";",
"}"
] | Returns the commerce warehouse item where commerceWarehouseId = ? and CPInstanceUuid = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param commerceWarehouseId the commerce warehouse ID
@param CPInstanceUuid the cp instance uuid
@return the matching commerce warehouse item, or... | [
"Returns",
"the",
"commerce",
"warehouse",
"item",
"where",
"commerceWarehouseId",
"=",
"?",
";",
"and",
"CPInstanceUuid",
"=",
"?",
";",
"or",
"returns",
"<code",
">",
"null<",
"/",
"code",
">",
"if",
"it",
"could",
"not",
"be",
"found",
".",
"Uses"... | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehouseItemPersistenceImpl.java#L677-L681 |
drinkjava2/jBeanBox | jbeanbox/src/main/java/com/github/drinkjava2/jbeanbox/BeanBox.java | BeanBox.addBeanAop | public synchronized BeanBox addBeanAop(Object aop, String methodNameRegex) {
"""
Add an AOP to Bean
@param aop
An AOP alliance interceptor class or instance
@param methodNameRegex
@return
"""
checkOrCreateMethodAopRules();
aopRules.add(new Object[] { BeanBoxUtils.checkAOP(aop), methodNameRegex });
... | java | public synchronized BeanBox addBeanAop(Object aop, String methodNameRegex) {
checkOrCreateMethodAopRules();
aopRules.add(new Object[] { BeanBoxUtils.checkAOP(aop), methodNameRegex });
return this;
} | [
"public",
"synchronized",
"BeanBox",
"addBeanAop",
"(",
"Object",
"aop",
",",
"String",
"methodNameRegex",
")",
"{",
"checkOrCreateMethodAopRules",
"(",
")",
";",
"aopRules",
".",
"add",
"(",
"new",
"Object",
"[",
"]",
"{",
"BeanBoxUtils",
".",
"checkAOP",
"("... | Add an AOP to Bean
@param aop
An AOP alliance interceptor class or instance
@param methodNameRegex
@return | [
"Add",
"an",
"AOP",
"to",
"Bean"
] | train | https://github.com/drinkjava2/jBeanBox/blob/01c216599ffa2e5f2d9c01df2adaad0f45567c04/jbeanbox/src/main/java/com/github/drinkjava2/jbeanbox/BeanBox.java#L267-L271 |
facebookarchive/hadoop-20 | src/core/org/apache/hadoop/conf/Configuration.java | Configuration.getJsonConfig | public JSONObject getJsonConfig(Path name)
throws IOException, JSONException {
"""
Given a xml config file specified by a path, return the corresponding json
object if it exists.
"""
String pathString = name.toUri().getPath();
String xml = new Path(pathString).getName();
File jsonFile = new ... | java | public JSONObject getJsonConfig(Path name)
throws IOException, JSONException {
String pathString = name.toUri().getPath();
String xml = new Path(pathString).getName();
File jsonFile = new File(pathString.replace(xml, MATERIALIZEDJSON))
.getAbsoluteFile();
if (jsonFile.exists()) {
Inp... | [
"public",
"JSONObject",
"getJsonConfig",
"(",
"Path",
"name",
")",
"throws",
"IOException",
",",
"JSONException",
"{",
"String",
"pathString",
"=",
"name",
".",
"toUri",
"(",
")",
".",
"getPath",
"(",
")",
";",
"String",
"xml",
"=",
"new",
"Path",
"(",
"... | Given a xml config file specified by a path, return the corresponding json
object if it exists. | [
"Given",
"a",
"xml",
"config",
"file",
"specified",
"by",
"a",
"path",
"return",
"the",
"corresponding",
"json",
"object",
"if",
"it",
"exists",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/conf/Configuration.java#L1397-L1414 |
MKLab-ITI/multimedia-indexing | src/main/java/gr/iti/mklab/download/ImageDownloader.java | ImageDownloader.submitImageDownloadTask | public void submitImageDownloadTask(String URL, String id) {
"""
Submits a new image download task.
@param URL
The url of the image
@param id
The id of the image (used to name the image file after download)
"""
Callable<ImageDownloadResult> call = new ImageDownload(URL, id, downloadFolder, saveThumb,
... | java | public void submitImageDownloadTask(String URL, String id) {
Callable<ImageDownloadResult> call = new ImageDownload(URL, id, downloadFolder, saveThumb,
saveOriginal, followRedirects);
pool.submit(call);
numPendingTasks++;
} | [
"public",
"void",
"submitImageDownloadTask",
"(",
"String",
"URL",
",",
"String",
"id",
")",
"{",
"Callable",
"<",
"ImageDownloadResult",
">",
"call",
"=",
"new",
"ImageDownload",
"(",
"URL",
",",
"id",
",",
"downloadFolder",
",",
"saveThumb",
",",
"saveOrigin... | Submits a new image download task.
@param URL
The url of the image
@param id
The id of the image (used to name the image file after download) | [
"Submits",
"a",
"new",
"image",
"download",
"task",
"."
] | train | https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/download/ImageDownloader.java#L85-L90 |
lotaris/rox-client-java | rox-client-java/src/main/java/com/lotaris/rox/core/filters/FilterUtils.java | FilterUtils.isRunnable | public static boolean isRunnable(String name, String technicalName, String key, String tags, String tickets, String[] filters) {
"""
Define if a test is runnable based on its description data
@param name Test name
@param technicalName Technical name
@param key ROX key
@param tags The tags
@param tickets The... | java | public static boolean isRunnable(String name, String technicalName, String key, String tags, String tickets, String[] filters) {
return isRunnable(new FilterTargetData(tags, tickets, technicalName, name, key), filters);
} | [
"public",
"static",
"boolean",
"isRunnable",
"(",
"String",
"name",
",",
"String",
"technicalName",
",",
"String",
"key",
",",
"String",
"tags",
",",
"String",
"tickets",
",",
"String",
"[",
"]",
"filters",
")",
"{",
"return",
"isRunnable",
"(",
"new",
"Fi... | Define if a test is runnable based on its description data
@param name Test name
@param technicalName Technical name
@param key ROX key
@param tags The tags
@param tickets The tickets
@param filters The filters
@return True if the test can be run | [
"Define",
"if",
"a",
"test",
"is",
"runnable",
"based",
"on",
"its",
"description",
"data"
] | train | https://github.com/lotaris/rox-client-java/blob/1b33f7560347c382c59a40c4037d175ab8127fde/rox-client-java/src/main/java/com/lotaris/rox/core/filters/FilterUtils.java#L64-L66 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java | SDNN.dotProductAttention | public SDVariable dotProductAttention(SDVariable queries, SDVariable keys, SDVariable values, SDVariable mask, boolean scaled) {
"""
This operation performs dot product attention on the given timeseries input with the given queries
@see #dotProductAttention(String, SDVariable, SDVariable, SDVariable, SDVariable, ... | java | public SDVariable dotProductAttention(SDVariable queries, SDVariable keys, SDVariable values, SDVariable mask, boolean scaled){
return dotProductAttention(null, queries, keys, values, mask, scaled);
} | [
"public",
"SDVariable",
"dotProductAttention",
"(",
"SDVariable",
"queries",
",",
"SDVariable",
"keys",
",",
"SDVariable",
"values",
",",
"SDVariable",
"mask",
",",
"boolean",
"scaled",
")",
"{",
"return",
"dotProductAttention",
"(",
"null",
",",
"queries",
",",
... | This operation performs dot product attention on the given timeseries input with the given queries
@see #dotProductAttention(String, SDVariable, SDVariable, SDVariable, SDVariable, boolean, boolean) | [
"This",
"operation",
"performs",
"dot",
"product",
"attention",
"on",
"the",
"given",
"timeseries",
"input",
"with",
"the",
"given",
"queries"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java#L834-L836 |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java | GISCoordinates.WSG84_L1 | @Pure
public static Point2d WSG84_L1(double lambda, double phi) {
"""
This function convert WSG84 GPS coordinate to France Lambert I coordinate.
@param lambda in degrees.
@param phi in degrees.
@return the France Lambert I coordinates.
"""
final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi);
... | java | @Pure
public static Point2d WSG84_L1(double lambda, double phi) {
final Point2d ntfLambdaPhi = WSG84_NTFLamdaPhi(lambda, phi);
return NTFLambdaPhi_NTFLambert(
ntfLambdaPhi.getX(), ntfLambdaPhi.getY(),
LAMBERT_1_N,
LAMBERT_1_C,
LAMBERT_1_XS,
LAMBERT_1_YS);
} | [
"@",
"Pure",
"public",
"static",
"Point2d",
"WSG84_L1",
"(",
"double",
"lambda",
",",
"double",
"phi",
")",
"{",
"final",
"Point2d",
"ntfLambdaPhi",
"=",
"WSG84_NTFLamdaPhi",
"(",
"lambda",
",",
"phi",
")",
";",
"return",
"NTFLambdaPhi_NTFLambert",
"(",
"ntfLa... | This function convert WSG84 GPS coordinate to France Lambert I coordinate.
@param lambda in degrees.
@param phi in degrees.
@return the France Lambert I coordinates. | [
"This",
"function",
"convert",
"WSG84",
"GPS",
"coordinate",
"to",
"France",
"Lambert",
"I",
"coordinate",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L1061-L1070 |
galan/commons | src/main/java/de/galan/commons/net/flux/Response.java | Response.getStreamAsString | public String getStreamAsString(String encoding) throws IOException {
"""
Converts the inputstream to a string with the given encoding. Subsequent the inputstream will be empty/closed.
"""
String result = null;
try {
result = IOUtils.toString(getStream(), encoding);
}
catch (NullPointerException npe... | java | public String getStreamAsString(String encoding) throws IOException {
String result = null;
try {
result = IOUtils.toString(getStream(), encoding);
}
catch (NullPointerException npex) {
throw new IOException("Timeout has been forced by CommonHttpClient", npex);
}
return result;
} | [
"public",
"String",
"getStreamAsString",
"(",
"String",
"encoding",
")",
"throws",
"IOException",
"{",
"String",
"result",
"=",
"null",
";",
"try",
"{",
"result",
"=",
"IOUtils",
".",
"toString",
"(",
"getStream",
"(",
")",
",",
"encoding",
")",
";",
"}",
... | Converts the inputstream to a string with the given encoding. Subsequent the inputstream will be empty/closed. | [
"Converts",
"the",
"inputstream",
"to",
"a",
"string",
"with",
"the",
"given",
"encoding",
".",
"Subsequent",
"the",
"inputstream",
"will",
"be",
"empty",
"/",
"closed",
"."
] | train | https://github.com/galan/commons/blob/45d2f36c69958d3f847e5fed66603ea629471822/src/main/java/de/galan/commons/net/flux/Response.java#L87-L96 |
lambdazen/bitsy | src/main/java/com/lambdazen/bitsy/store/Record.java | Record.generateVertexLine | public static void generateVertexLine(StringWriter sw, ObjectMapper mapper, VertexBean vBean) throws JsonGenerationException, JsonMappingException, IOException {
"""
Efficient method to write a vertex -- avoids writeValueAsString
"""
sw.getBuffer().setLength(0);
sw.append('V'); // Reco... | java | public static void generateVertexLine(StringWriter sw, ObjectMapper mapper, VertexBean vBean) throws JsonGenerationException, JsonMappingException, IOException {
sw.getBuffer().setLength(0);
sw.append('V'); // Record type
sw.append('=');
mapper.writeValue(sw, vBean);
... | [
"public",
"static",
"void",
"generateVertexLine",
"(",
"StringWriter",
"sw",
",",
"ObjectMapper",
"mapper",
",",
"VertexBean",
"vBean",
")",
"throws",
"JsonGenerationException",
",",
"JsonMappingException",
",",
"IOException",
"{",
"sw",
".",
"getBuffer",
"(",
")",
... | Efficient method to write a vertex -- avoids writeValueAsString | [
"Efficient",
"method",
"to",
"write",
"a",
"vertex",
"--",
"avoids",
"writeValueAsString"
] | train | https://github.com/lambdazen/bitsy/blob/c0dd4b6c9d6dc9987d0168c91417eb04d80bf712/src/main/java/com/lambdazen/bitsy/store/Record.java#L71-L84 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/indexing/Indices.java | Indices.isScalar | public static boolean isScalar(INDArray indexOver, INDArrayIndex... indexes) {
"""
Check if the given indexes
over the specified array
are searching for a scalar
@param indexOver the array to index over
@param indexes the index query
@return true if the given indexes are searching
for a scalar false otherwis... | java | public static boolean isScalar(INDArray indexOver, INDArrayIndex... indexes) {
boolean allOneLength = true;
for (int i = 0; i < indexes.length; i++) {
allOneLength = allOneLength && indexes[i].length() == 1;
}
int numNewAxes = NDArrayIndex.numNewAxis(indexes);
if (al... | [
"public",
"static",
"boolean",
"isScalar",
"(",
"INDArray",
"indexOver",
",",
"INDArrayIndex",
"...",
"indexes",
")",
"{",
"boolean",
"allOneLength",
"=",
"true",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"indexes",
".",
"length",
";",
"i",
... | Check if the given indexes
over the specified array
are searching for a scalar
@param indexOver the array to index over
@param indexes the index query
@return true if the given indexes are searching
for a scalar false otherwise | [
"Check",
"if",
"the",
"given",
"indexes",
"over",
"the",
"specified",
"array",
"are",
"searching",
"for",
"a",
"scalar"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/indexing/Indices.java#L512-L526 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/convert/AbstractConverter.java | AbstractConverter.convertQuietly | public T convertQuietly(Object value, T defaultValue) {
"""
不抛异常转换<br>
当转换失败时返回默认值
@param value 被转换的值
@param defaultValue 默认值
@return 转换后的值
@since 4.5.7
"""
try {
return convert(value, defaultValue);
} catch (Exception e) {
return defaultValue;
}
} | java | public T convertQuietly(Object value, T defaultValue) {
try {
return convert(value, defaultValue);
} catch (Exception e) {
return defaultValue;
}
} | [
"public",
"T",
"convertQuietly",
"(",
"Object",
"value",
",",
"T",
"defaultValue",
")",
"{",
"try",
"{",
"return",
"convert",
"(",
"value",
",",
"defaultValue",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"return",
"defaultValue",
";",
"}",
... | 不抛异常转换<br>
当转换失败时返回默认值
@param value 被转换的值
@param defaultValue 默认值
@return 转换后的值
@since 4.5.7 | [
"不抛异常转换<br",
">",
"当转换失败时返回默认值"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/convert/AbstractConverter.java#L28-L34 |
walkmod/walkmod-core | src/main/java/org/walkmod/WalkModFacade.java | WalkModFacade.removeChains | public void removeChains(List<String> chains, boolean recursive) throws Exception {
"""
Removes the chains from the Walkmod config file.
@param chains
Chain names to remove
@param recursive
If it necessary to remove the chains from all the submodules.
@throws Exception
If the walkmod configuration file can... | java | public void removeChains(List<String> chains, boolean recursive) throws Exception {
long startTime = System.currentTimeMillis();
Exception exception = null;
if (cfg.exists()) {
userDir = new File(System.getProperty("user.dir")).getAbsolutePath();
System.setProperty... | [
"public",
"void",
"removeChains",
"(",
"List",
"<",
"String",
">",
"chains",
",",
"boolean",
"recursive",
")",
"throws",
"Exception",
"{",
"long",
"startTime",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"Exception",
"exception",
"=",
"null",
";"... | Removes the chains from the Walkmod config file.
@param chains
Chain names to remove
@param recursive
If it necessary to remove the chains from all the submodules.
@throws Exception
If the walkmod configuration file can't be read. | [
"Removes",
"the",
"chains",
"from",
"the",
"Walkmod",
"config",
"file",
"."
] | train | https://github.com/walkmod/walkmod-core/blob/fa79b836894fa00ca4b3e2bd26326a44b778f46f/src/main/java/org/walkmod/WalkModFacade.java#L956-L974 |
Azure/azure-sdk-for-java | mediaservices/resource-manager/v2018_03_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_03_30_preview/implementation/TransformsInner.java | TransformsInner.listAsync | public Observable<Page<TransformInner>> listAsync(final String resourceGroupName, final String accountName) {
"""
List Transforms.
Lists the Transforms in the account.
@param resourceGroupName The name of the resource group within the Azure subscription.
@param accountName The Media Services account name.
@t... | java | public Observable<Page<TransformInner>> listAsync(final String resourceGroupName, final String accountName) {
return listWithServiceResponseAsync(resourceGroupName, accountName)
.map(new Func1<ServiceResponse<Page<TransformInner>>, Page<TransformInner>>() {
@Override
... | [
"public",
"Observable",
"<",
"Page",
"<",
"TransformInner",
">",
">",
"listAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"accountName",
")",
"{",
"return",
"listWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"accountName",
"... | List Transforms.
Lists the Transforms in the account.
@param resourceGroupName The name of the resource group within the Azure subscription.
@param accountName The Media Services account name.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PagedList<Transform... | [
"List",
"Transforms",
".",
"Lists",
"the",
"Transforms",
"in",
"the",
"account",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_03_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_03_30_preview/implementation/TransformsInner.java#L143-L151 |
jroyalty/jglm | src/main/java/com/hackoeur/jglm/support/FastMathCalc.java | FastMathCalc.printarray | static void printarray(PrintStream out, String name, int expectedLen, double[][] array2d) {
"""
Print an array.
@param out text output stream where output should be printed
@param name array name
@param expectedLen expected length of the array
@param array2d array data
"""
out.println(name);
... | java | static void printarray(PrintStream out, String name, int expectedLen, double[][] array2d) {
out.println(name);
checkLen(expectedLen, array2d.length);
out.println(TABLE_START_DECL + " ");
int i = 0;
for(double[] array : array2d) { // "double array[]" causes PMD parsing error
... | [
"static",
"void",
"printarray",
"(",
"PrintStream",
"out",
",",
"String",
"name",
",",
"int",
"expectedLen",
",",
"double",
"[",
"]",
"[",
"]",
"array2d",
")",
"{",
"out",
".",
"println",
"(",
"name",
")",
";",
"checkLen",
"(",
"expectedLen",
",",
"arr... | Print an array.
@param out text output stream where output should be printed
@param name array name
@param expectedLen expected length of the array
@param array2d array data | [
"Print",
"an",
"array",
"."
] | train | https://github.com/jroyalty/jglm/blob/9397c2fcf0d4d62844c64d0b14065ee7bf8cafc6/src/main/java/com/hackoeur/jglm/support/FastMathCalc.java#L600-L613 |
strator-dev/greenpepper | greenpepper-open/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/velocity/ConfluenceGreenPepper.java | ConfluenceGreenPepper.getPageContent | public String getPageContent(Page currentPage, Boolean implementedVersion) throws GreenPepperServerException {
"""
<p>getPageContent.</p>
@param currentPage a {@link com.atlassian.confluence.pages.Page} object.
@param implementedVersion a {@link java.lang.Boolean} object.
@return a {@link java.lang.String} ob... | java | public String getPageContent(Page currentPage, Boolean implementedVersion) throws GreenPepperServerException {
AbstractPage page = currentPage;
if (implementedVersion) {
page = getImplementedPage(currentPage);
}
return getBodyTypeAwareRenderer().render(page);
} | [
"public",
"String",
"getPageContent",
"(",
"Page",
"currentPage",
",",
"Boolean",
"implementedVersion",
")",
"throws",
"GreenPepperServerException",
"{",
"AbstractPage",
"page",
"=",
"currentPage",
";",
"if",
"(",
"implementedVersion",
")",
"{",
"page",
"=",
"getImp... | <p>getPageContent.</p>
@param currentPage a {@link com.atlassian.confluence.pages.Page} object.
@param implementedVersion a {@link java.lang.Boolean} object.
@return a {@link java.lang.String} object.
@throws com.greenpepper.server.GreenPepperServerException if any. | [
"<p",
">",
"getPageContent",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper-open/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/velocity/ConfluenceGreenPepper.java#L453-L459 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FacesImpl.java | FacesImpl.detectWithStream | public List<DetectedFace> detectWithStream(byte[] image, DetectWithStreamOptionalParameter detectWithStreamOptionalParameter) {
"""
Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes.
@param image An image stream.
@param detectWithStreamOptionalPar... | java | public List<DetectedFace> detectWithStream(byte[] image, DetectWithStreamOptionalParameter detectWithStreamOptionalParameter) {
return detectWithStreamWithServiceResponseAsync(image, detectWithStreamOptionalParameter).toBlocking().single().body();
} | [
"public",
"List",
"<",
"DetectedFace",
">",
"detectWithStream",
"(",
"byte",
"[",
"]",
"image",
",",
"DetectWithStreamOptionalParameter",
"detectWithStreamOptionalParameter",
")",
"{",
"return",
"detectWithStreamWithServiceResponseAsync",
"(",
"image",
",",
"detectWithStrea... | Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes.
@param image An image stream.
@param detectWithStreamOptionalParameter the object representing the optional parameters to be set before calling this API
@throws IllegalArgumentException thrown if paramete... | [
"Detect",
"human",
"faces",
"in",
"an",
"image",
"and",
"returns",
"face",
"locations",
"and",
"optionally",
"with",
"faceIds",
"landmarks",
"and",
"attributes",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FacesImpl.java#L925-L927 |
aoindustries/aocode-public | src/main/java/com/aoindustries/servlet/jsp/tagext/JspTagUtils.java | JspTagUtils.findAncestor | public static <T> T findAncestor(JspTag from, Class<? extends T> clazz) throws JspException {
"""
Finds the first parent tag of the provided class (or subclass) or implementing the provided interface.
@return the parent tag
@exception JspException if parent not found
"""
T parent = clazz.cast(SimpleTa... | java | public static <T> T findAncestor(JspTag from, Class<? extends T> clazz) throws JspException {
T parent = clazz.cast(SimpleTagSupport.findAncestorWithClass(from, clazz));
if(parent==null) throw new LocalizedJspException(accessor, "JspTagUtils.findAncestor.notFound", getClassName(from.getClass()), getClassName(clazz)... | [
"public",
"static",
"<",
"T",
">",
"T",
"findAncestor",
"(",
"JspTag",
"from",
",",
"Class",
"<",
"?",
"extends",
"T",
">",
"clazz",
")",
"throws",
"JspException",
"{",
"T",
"parent",
"=",
"clazz",
".",
"cast",
"(",
"SimpleTagSupport",
".",
"findAncestor... | Finds the first parent tag of the provided class (or subclass) or implementing the provided interface.
@return the parent tag
@exception JspException if parent not found | [
"Finds",
"the",
"first",
"parent",
"tag",
"of",
"the",
"provided",
"class",
"(",
"or",
"subclass",
")",
"or",
"implementing",
"the",
"provided",
"interface",
"."
] | train | https://github.com/aoindustries/aocode-public/blob/c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3/src/main/java/com/aoindustries/servlet/jsp/tagext/JspTagUtils.java#L53-L57 |
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.listPrebuilts | public List<PrebuiltEntityExtractor> listPrebuilts(UUID appId, String versionId, ListPrebuiltsOptionalParameter listPrebuiltsOptionalParameter) {
"""
Gets information about the prebuilt entity models.
@param appId The application ID.
@param versionId The version ID.
@param listPrebuiltsOptionalParameter the o... | java | public List<PrebuiltEntityExtractor> listPrebuilts(UUID appId, String versionId, ListPrebuiltsOptionalParameter listPrebuiltsOptionalParameter) {
return listPrebuiltsWithServiceResponseAsync(appId, versionId, listPrebuiltsOptionalParameter).toBlocking().single().body();
} | [
"public",
"List",
"<",
"PrebuiltEntityExtractor",
">",
"listPrebuilts",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"ListPrebuiltsOptionalParameter",
"listPrebuiltsOptionalParameter",
")",
"{",
"return",
"listPrebuiltsWithServiceResponseAsync",
"(",
"appId",
",",... | Gets information about the prebuilt entity models.
@param appId The application ID.
@param versionId The version ID.
@param listPrebuiltsOptionalParameter the object representing the optional parameters to be set before calling this API
@throws IllegalArgumentException thrown if parameters fail the validation
@throws ... | [
"Gets",
"information",
"about",
"the",
"prebuilt",
"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#L2183-L2185 |
geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgGraphicsContext.java | SvgGraphicsContext.drawLine | public void drawLine(Object parent, String name, LineString line, ShapeStyle style) {
"""
Draw a {@link LineString} geometry onto the <code>GraphicsContext</code>.
@param parent
parent group object
@param name
The LineString's name.
@param line
The LineString to be drawn.
@param style
The styling object ... | java | public void drawLine(Object parent, String name, LineString line, ShapeStyle style) {
if (isAttached()) {
Element element = helper.createOrUpdateElement(parent, name, "path", style);
if (line != null) {
Dom.setElementAttribute(element, "d", SvgPathDecoder.decode(line));
}
}
} | [
"public",
"void",
"drawLine",
"(",
"Object",
"parent",
",",
"String",
"name",
",",
"LineString",
"line",
",",
"ShapeStyle",
"style",
")",
"{",
"if",
"(",
"isAttached",
"(",
")",
")",
"{",
"Element",
"element",
"=",
"helper",
".",
"createOrUpdateElement",
"... | Draw a {@link LineString} geometry onto the <code>GraphicsContext</code>.
@param parent
parent group object
@param name
The LineString's name.
@param line
The LineString to be drawn.
@param style
The styling object for the LineString. Watch out for fill colors! If the fill opacity is not 0, then
the LineString will ha... | [
"Draw",
"a",
"{",
"@link",
"LineString",
"}",
"geometry",
"onto",
"the",
"<code",
">",
"GraphicsContext<",
"/",
"code",
">",
"."
] | train | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgGraphicsContext.java#L295-L302 |
codescape/bitvunit | bitvunit-core/src/main/java/de/codescape/bitvunit/util/html/HtmlPageUtil.java | HtmlPageUtil.toHtmlPage | public static HtmlPage toHtmlPage(String string) {
"""
Creates a {@link HtmlPage} from a given {@link String} that contains the HTML code for that page.
@param string {@link String} that contains the HTML code
@return {@link HtmlPage} for this {@link String}
"""
try {
URL url = new URL(... | java | public static HtmlPage toHtmlPage(String string) {
try {
URL url = new URL("http://bitvunit.codescape.de/some_page.html");
return HTMLParser.parseHtml(new StringWebResponse(string, url), new WebClient().getCurrentWindow());
} catch (IOException e) {
throw new RuntimeE... | [
"public",
"static",
"HtmlPage",
"toHtmlPage",
"(",
"String",
"string",
")",
"{",
"try",
"{",
"URL",
"url",
"=",
"new",
"URL",
"(",
"\"http://bitvunit.codescape.de/some_page.html\"",
")",
";",
"return",
"HTMLParser",
".",
"parseHtml",
"(",
"new",
"StringWebResponse... | Creates a {@link HtmlPage} from a given {@link String} that contains the HTML code for that page.
@param string {@link String} that contains the HTML code
@return {@link HtmlPage} for this {@link String} | [
"Creates",
"a",
"{",
"@link",
"HtmlPage",
"}",
"from",
"a",
"given",
"{",
"@link",
"String",
"}",
"that",
"contains",
"the",
"HTML",
"code",
"for",
"that",
"page",
"."
] | train | https://github.com/codescape/bitvunit/blob/cef6d9af60d684e41294981c10b6d92c8f063a4e/bitvunit-core/src/main/java/de/codescape/bitvunit/util/html/HtmlPageUtil.java#L32-L39 |
bbottema/outlook-message-parser | src/main/java/org/simplejavamail/outlookmessageparser/OutlookMessageParser.java | OutlookMessageParser.checkDirectoryDocumentEntry | private void checkDirectoryDocumentEntry(final DocumentEntry de, final OutlookMessage msg)
throws IOException {
"""
Parses a directory document entry which can either be a simple entry or
a stream that has to be split up into multiple document entries again.
The parsed information is put into the {@link Outlo... | java | private void checkDirectoryDocumentEntry(final DocumentEntry de, final OutlookMessage msg)
throws IOException {
if (de.getName().startsWith(PROPS_KEY)) {
//TODO: parse properties stream
final List<DocumentEntry> deList = getDocumentEntriesFromPropertiesStream(de);
for (final DocumentEntry deFromProps : de... | [
"private",
"void",
"checkDirectoryDocumentEntry",
"(",
"final",
"DocumentEntry",
"de",
",",
"final",
"OutlookMessage",
"msg",
")",
"throws",
"IOException",
"{",
"if",
"(",
"de",
".",
"getName",
"(",
")",
".",
"startsWith",
"(",
"PROPS_KEY",
")",
")",
"{",
"/... | Parses a directory document entry which can either be a simple entry or
a stream that has to be split up into multiple document entries again.
The parsed information is put into the {@link OutlookMessage} object.
@param de The current node in the .msg file.
@param msg The resulting {@link OutlookMessage} object.
@thr... | [
"Parses",
"a",
"directory",
"document",
"entry",
"which",
"can",
"either",
"be",
"a",
"simple",
"entry",
"or",
"a",
"stream",
"that",
"has",
"to",
"be",
"split",
"up",
"into",
"multiple",
"document",
"entries",
"again",
".",
"The",
"parsed",
"information",
... | train | https://github.com/bbottema/outlook-message-parser/blob/ea7d59da33c8a62dfc2e0aa64d2f8f7c903ccb0e/src/main/java/org/simplejavamail/outlookmessageparser/OutlookMessageParser.java#L210-L222 |
fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/ParameterHelper.java | ParameterHelper.parseParametersForSizeLimit | public static long parseParametersForSizeLimit(Map<String, String> parameters)
throws JournalException {
"""
Get the size limit parameter (or let it default), and convert it to
bytes.
"""
String sizeString =
getOptionalStringParameter(parameters,
... | java | public static long parseParametersForSizeLimit(Map<String, String> parameters)
throws JournalException {
String sizeString =
getOptionalStringParameter(parameters,
PARAMETER_JOURNAL_FILE_SIZE_LIMIT,
... | [
"public",
"static",
"long",
"parseParametersForSizeLimit",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
")",
"throws",
"JournalException",
"{",
"String",
"sizeString",
"=",
"getOptionalStringParameter",
"(",
"parameters",
",",
"PARAMETER_JOURNAL_FILE_SIZ... | Get the size limit parameter (or let it default), and convert it to
bytes. | [
"Get",
"the",
"size",
"limit",
"parameter",
"(",
"or",
"let",
"it",
"default",
")",
"and",
"convert",
"it",
"to",
"bytes",
"."
] | train | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/helpers/ParameterHelper.java#L129-L154 |
sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java | SARLFormatter._format | protected void _format(SarlEvent event, IFormattableDocument document) {
"""
Format the given SARL event.
@param event the SARL component.
@param document the document.
"""
formatAnnotations(event, document, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations);
formatModifiers(event, document);
... | java | protected void _format(SarlEvent event, IFormattableDocument document) {
formatAnnotations(event, document, XbaseFormatterPreferenceKeys.newLineAfterClassAnnotations);
formatModifiers(event, document);
final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(event);
document.append(regionFo... | [
"protected",
"void",
"_format",
"(",
"SarlEvent",
"event",
",",
"IFormattableDocument",
"document",
")",
"{",
"formatAnnotations",
"(",
"event",
",",
"document",
",",
"XbaseFormatterPreferenceKeys",
".",
"newLineAfterClassAnnotations",
")",
";",
"formatModifiers",
"(",
... | Format the given SARL event.
@param event the SARL component.
@param document the document. | [
"Format",
"the",
"given",
"SARL",
"event",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/formatting2/SARLFormatter.java#L195-L206 |
NessComputing/service-discovery | jms/src/main/java/com/nesscomputing/jms/activemq/ServiceDiscoveryTransportFactory.java | ServiceDiscoveryTransportFactory.getDiscoveryId | private UUID getDiscoveryId(final Map<String, String> params) throws IOException {
"""
Find and validate the discoveryId given in a connection string
"""
final String discoveryId = params.get("discoveryId");
if (discoveryId == null) {
throw new IOException("srvc transport did not g... | java | private UUID getDiscoveryId(final Map<String, String> params) throws IOException {
final String discoveryId = params.get("discoveryId");
if (discoveryId == null) {
throw new IOException("srvc transport did not get a discoveryId parameter. Refusing to create.");
}
return UUI... | [
"private",
"UUID",
"getDiscoveryId",
"(",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"params",
")",
"throws",
"IOException",
"{",
"final",
"String",
"discoveryId",
"=",
"params",
".",
"get",
"(",
"\"discoveryId\"",
")",
";",
"if",
"(",
"discoveryId",... | Find and validate the discoveryId given in a connection string | [
"Find",
"and",
"validate",
"the",
"discoveryId",
"given",
"in",
"a",
"connection",
"string"
] | train | https://github.com/NessComputing/service-discovery/blob/5091ffdb1de6b12d216d1c238f72858037c7b765/jms/src/main/java/com/nesscomputing/jms/activemq/ServiceDiscoveryTransportFactory.java#L108-L115 |
MorphiaOrg/morphia | morphia/src/main/java/dev/morphia/geo/GeometryShapeConverter.java | GeometryShapeConverter.decodeObject | @SuppressWarnings("unchecked") // always have unchecked casts when dealing with raw classes
private Geometry decodeObject(final List mongoDBGeometry, final List<GeometryFactory> geometryFactories) {
"""
/*
We're expecting a List that can be turned into a geometry using a series of factories
"""
Ge... | java | @SuppressWarnings("unchecked") // always have unchecked casts when dealing with raw classes
private Geometry decodeObject(final List mongoDBGeometry, final List<GeometryFactory> geometryFactories) {
GeometryFactory factory = geometryFactories.get(0);
if (geometryFactories.size() == 1) {
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"// always have unchecked casts when dealing with raw classes",
"private",
"Geometry",
"decodeObject",
"(",
"final",
"List",
"mongoDBGeometry",
",",
"final",
"List",
"<",
"GeometryFactory",
">",
"geometryFactories",
")",
"... | /*
We're expecting a List that can be turned into a geometry using a series of factories | [
"/",
"*",
"We",
"re",
"expecting",
"a",
"List",
"that",
"can",
"be",
"turned",
"into",
"a",
"geometry",
"using",
"a",
"series",
"of",
"factories"
] | train | https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/geo/GeometryShapeConverter.java#L56-L71 |
apache/incubator-atlas | webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java | EntityResource.getEntityListByType | public Response getEntityListByType(String entityType) {
"""
Gets the list of entities for a given entity type.
@param entityType name of a type which is unique
"""
try {
Preconditions.checkNotNull(entityType, "Entity type cannot be null");
if (LOG.isDebugEnabled()) {
... | java | public Response getEntityListByType(String entityType) {
try {
Preconditions.checkNotNull(entityType, "Entity type cannot be null");
if (LOG.isDebugEnabled()) {
LOG.debug("Fetching entity list for type={} ", entityType);
}
final List<String> enti... | [
"public",
"Response",
"getEntityListByType",
"(",
"String",
"entityType",
")",
"{",
"try",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"entityType",
",",
"\"Entity type cannot be null\"",
")",
";",
"if",
"(",
"LOG",
".",
"isDebugEnabled",
"(",
")",
")",
"{",... | Gets the list of entities for a given entity type.
@param entityType name of a type which is unique | [
"Gets",
"the",
"list",
"of",
"entities",
"for",
"a",
"given",
"entity",
"type",
"."
] | train | https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java#L711-L741 |
overturetool/overture | ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java | VdmBreakpointPropertyPage.createText | protected Text createText(Composite parent, String initialValue) {
"""
Creates a fully configured text editor with the given initial value
@param parent
@param initialValue
@return the configured text editor
"""
Text t = SWTFactory.createText(parent, SWT.SINGLE | SWT.BORDER, 1);
t.setText(initialValue... | java | protected Text createText(Composite parent, String initialValue)
{
Text t = SWTFactory.createText(parent, SWT.SINGLE | SWT.BORDER, 1);
t.setText(initialValue);
return t;
} | [
"protected",
"Text",
"createText",
"(",
"Composite",
"parent",
",",
"String",
"initialValue",
")",
"{",
"Text",
"t",
"=",
"SWTFactory",
".",
"createText",
"(",
"parent",
",",
"SWT",
".",
"SINGLE",
"|",
"SWT",
".",
"BORDER",
",",
"1",
")",
";",
"t",
"."... | Creates a fully configured text editor with the given initial value
@param parent
@param initialValue
@return the configured text editor | [
"Creates",
"a",
"fully",
"configured",
"text",
"editor",
"with",
"the",
"given",
"initial",
"value"
] | train | https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/ui/propertypages/VdmBreakpointPropertyPage.java#L476-L481 |
square/picasso | picasso/src/main/java/com/squareup/picasso3/RequestCreator.java | RequestCreator.get | @Nullable // TODO make non-null and always throw?
public Bitmap get() throws IOException {
"""
Synchronously fulfill this request. Must not be called from the main thread.
"""
long started = System.nanoTime();
checkNotMain();
if (deferred) {
throw new IllegalStateException("Fit cannot be u... | java | @Nullable // TODO make non-null and always throw?
public Bitmap get() throws IOException {
long started = System.nanoTime();
checkNotMain();
if (deferred) {
throw new IllegalStateException("Fit cannot be used with get.");
}
if (!data.hasImage()) {
return null;
}
Request reque... | [
"@",
"Nullable",
"// TODO make non-null and always throw?",
"public",
"Bitmap",
"get",
"(",
")",
"throws",
"IOException",
"{",
"long",
"started",
"=",
"System",
".",
"nanoTime",
"(",
")",
";",
"checkNotMain",
"(",
")",
";",
"if",
"(",
"deferred",
")",
"{",
"... | Synchronously fulfill this request. Must not be called from the main thread. | [
"Synchronously",
"fulfill",
"this",
"request",
".",
"Must",
"not",
"be",
"called",
"from",
"the",
"main",
"thread",
"."
] | train | https://github.com/square/picasso/blob/89f55b76e3be2b65e5997b7698f782f16f8547e3/picasso/src/main/java/com/squareup/picasso3/RequestCreator.java#L405-L427 |
alkacon/opencms-core | src/org/opencms/db/CmsSecurityManager.java | CmsSecurityManager.deletePropertyDefinition | public void deletePropertyDefinition(CmsRequestContext context, String name)
throws CmsException, CmsSecurityException, CmsRoleViolationException {
"""
Deletes a property definition.<p>
@param context the current request context
@param name the name of the property definition to delete
@throws CmsExcept... | java | public void deletePropertyDefinition(CmsRequestContext context, String name)
throws CmsException, CmsSecurityException, CmsRoleViolationException {
CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
try {
checkOfflineProject(dbc);
checkRole(dbc, CmsRole.WORKPLACE_M... | [
"public",
"void",
"deletePropertyDefinition",
"(",
"CmsRequestContext",
"context",
",",
"String",
"name",
")",
"throws",
"CmsException",
",",
"CmsSecurityException",
",",
"CmsRoleViolationException",
"{",
"CmsDbContext",
"dbc",
"=",
"m_dbContextFactory",
".",
"getDbContex... | Deletes a property definition.<p>
@param context the current request context
@param name the name of the property definition to delete
@throws CmsException if something goes wrong
@throws CmsSecurityException if the project to delete is the "Online" project
@throws CmsRoleViolationException if the current user does n... | [
"Deletes",
"a",
"property",
"definition",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L1516-L1529 |
netplex/json-smart-v2 | json-smart/src/main/java/net/minidev/json/reader/JsonWriter.java | JsonWriter.remapField | @SuppressWarnings( {
"""
remap field name in custom classes
@param fromJava
field name in java
@param toJson
field name in json
@since 2.1.1
""" "rawtypes", "unchecked" })
public <T> void remapField(Class<T> type, String fromJava, String toJson) {
JsonWriterI map = this.getWrite(type);
if (!(map in... | java | @SuppressWarnings({ "rawtypes", "unchecked" })
public <T> void remapField(Class<T> type, String fromJava, String toJson) {
JsonWriterI map = this.getWrite(type);
if (!(map instanceof BeansWriterASMRemap)) {
map = new BeansWriterASMRemap();
registerWriter(map, type);
}
((BeansWriterASMRemap) map).renameFi... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"rawtypes\"",
",",
"\"unchecked\"",
"}",
")",
"public",
"<",
"T",
">",
"void",
"remapField",
"(",
"Class",
"<",
"T",
">",
"type",
",",
"String",
"fromJava",
",",
"String",
"toJson",
")",
"{",
"JsonWriterI",
"map",
"="... | remap field name in custom classes
@param fromJava
field name in java
@param toJson
field name in json
@since 2.1.1 | [
"remap",
"field",
"name",
"in",
"custom",
"classes"
] | train | https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/reader/JsonWriter.java#L36-L44 |
OpenLiberty/open-liberty | dev/com.ibm.ws.channelfw/src/com/ibm/wsspi/bytebuffer/WsByteBufferUtils.java | WsByteBufferUtils.asInt | public static final int asInt(WsByteBuffer buff, int position, int limit) {
"""
Convert a buffer to an int using the starting position and ending limit.
@param buff
@param position
@param limit
@return int
"""
return asInt(asByteArray(buff, position, limit));
} | java | public static final int asInt(WsByteBuffer buff, int position, int limit) {
return asInt(asByteArray(buff, position, limit));
} | [
"public",
"static",
"final",
"int",
"asInt",
"(",
"WsByteBuffer",
"buff",
",",
"int",
"position",
",",
"int",
"limit",
")",
"{",
"return",
"asInt",
"(",
"asByteArray",
"(",
"buff",
",",
"position",
",",
"limit",
")",
")",
";",
"}"
] | Convert a buffer to an int using the starting position and ending limit.
@param buff
@param position
@param limit
@return int | [
"Convert",
"a",
"buffer",
"to",
"an",
"int",
"using",
"the",
"starting",
"position",
"and",
"ending",
"limit",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/wsspi/bytebuffer/WsByteBufferUtils.java#L234-L236 |
micronaut-projects/micronaut-core | core/src/main/java/io/micronaut/core/reflect/GenericTypeUtils.java | GenericTypeUtils.resolveInterfaceTypeArgument | public static Optional<Class> resolveInterfaceTypeArgument(Class type, Class interfaceType) {
"""
Resolves a single type argument from the given interface of the given class. Also
searches superclasses.
@param type The type to resolve from
@param interfaceType The interface to resolve for
@return Th... | java | public static Optional<Class> resolveInterfaceTypeArgument(Class type, Class interfaceType) {
Type[] genericInterfaces = type.getGenericInterfaces();
for (Type genericInterface : genericInterfaces) {
if (genericInterface instanceof ParameterizedType) {
ParameterizedType pt = ... | [
"public",
"static",
"Optional",
"<",
"Class",
">",
"resolveInterfaceTypeArgument",
"(",
"Class",
"type",
",",
"Class",
"interfaceType",
")",
"{",
"Type",
"[",
"]",
"genericInterfaces",
"=",
"type",
".",
"getGenericInterfaces",
"(",
")",
";",
"for",
"(",
"Type"... | Resolves a single type argument from the given interface of the given class. Also
searches superclasses.
@param type The type to resolve from
@param interfaceType The interface to resolve for
@return The class or null | [
"Resolves",
"a",
"single",
"type",
"argument",
"from",
"the",
"given",
"interface",
"of",
"the",
"given",
"class",
".",
"Also",
"searches",
"superclasses",
"."
] | train | https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/reflect/GenericTypeUtils.java#L147-L162 |
undertow-io/undertow | core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/MCMPHandler.java | MCMPHandler.processNodeCommand | void processNodeCommand(final HttpServerExchange exchange, final RequestData requestData, final MCMPAction action) throws IOException {
"""
Process a mgmt command targeting a node.
@param exchange the http server exchange
@param requestData the request data
@param action the mgmt action
@throws IOException... | java | void processNodeCommand(final HttpServerExchange exchange, final RequestData requestData, final MCMPAction action) throws IOException {
final String jvmRoute = requestData.getFirst(JVMROUTE);
if (jvmRoute == null) {
processError(TYPESYNTAX, SMISFLD, exchange);
return;
}
... | [
"void",
"processNodeCommand",
"(",
"final",
"HttpServerExchange",
"exchange",
",",
"final",
"RequestData",
"requestData",
",",
"final",
"MCMPAction",
"action",
")",
"throws",
"IOException",
"{",
"final",
"String",
"jvmRoute",
"=",
"requestData",
".",
"getFirst",
"("... | Process a mgmt command targeting a node.
@param exchange the http server exchange
@param requestData the request data
@param action the mgmt action
@throws IOException | [
"Process",
"a",
"mgmt",
"command",
"targeting",
"a",
"node",
"."
] | train | https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/MCMPHandler.java#L341-L352 |
twilio/twilio-java | src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionReader.java | MessageInteractionReader.nextPage | @Override
public Page<MessageInteraction> nextPage(final Page<MessageInteraction> page,
final TwilioRestClient client) {
"""
Retrieve the next page from the Twilio API.
@param page current page
@param client TwilioRestClient with which to make the request
@ret... | java | @Override
public Page<MessageInteraction> nextPage(final Page<MessageInteraction> page,
final TwilioRestClient client) {
Request request = new Request(
HttpMethod.GET,
page.getNextPageUrl(
Domains.PROXY.toString(),
... | [
"@",
"Override",
"public",
"Page",
"<",
"MessageInteraction",
">",
"nextPage",
"(",
"final",
"Page",
"<",
"MessageInteraction",
">",
"page",
",",
"final",
"TwilioRestClient",
"client",
")",
"{",
"Request",
"request",
"=",
"new",
"Request",
"(",
"HttpMethod",
"... | Retrieve the next page from the Twilio API.
@param page current page
@param client TwilioRestClient with which to make the request
@return Next Page | [
"Retrieve",
"the",
"next",
"page",
"from",
"the",
"Twilio",
"API",
"."
] | train | https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/proxy/v1/service/session/participant/MessageInteractionReader.java#L102-L113 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_service_serviceName_directory_getWayTypes_GET | public ArrayList<OvhDirectoryWayType> billingAccount_service_serviceName_directory_getWayTypes_GET(String billingAccount, String serviceName) throws IOException {
"""
Get all the way types availables
REST: GET /telephony/{billingAccount}/service/{serviceName}/directory/getWayTypes
@param billingAccount [requir... | java | public ArrayList<OvhDirectoryWayType> billingAccount_service_serviceName_directory_getWayTypes_GET(String billingAccount, String serviceName) throws IOException {
String qPath = "/telephony/{billingAccount}/service/{serviceName}/directory/getWayTypes";
StringBuilder sb = path(qPath, billingAccount, serviceName);
... | [
"public",
"ArrayList",
"<",
"OvhDirectoryWayType",
">",
"billingAccount_service_serviceName_directory_getWayTypes_GET",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/telephony/{billingAccount}/servi... | Get all the way types availables
REST: GET /telephony/{billingAccount}/service/{serviceName}/directory/getWayTypes
@param billingAccount [required] The name of your billingAccount
@param serviceName [required] | [
"Get",
"all",
"the",
"way",
"types",
"availables"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L4022-L4027 |
netty/netty | codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java | HttpConversionUtil.toFullHttpResponse | public static FullHttpResponse toFullHttpResponse(int streamId, Http2Headers http2Headers, ByteBufAllocator alloc,
boolean validateHttpHeaders)
throws Http2Exception {
"""
Create a new object to contain the response data
@param streamId T... | java | public static FullHttpResponse toFullHttpResponse(int streamId, Http2Headers http2Headers, ByteBufAllocator alloc,
boolean validateHttpHeaders)
throws Http2Exception {
HttpResponseStatus status = parseStatus(http2Headers.status());
... | [
"public",
"static",
"FullHttpResponse",
"toFullHttpResponse",
"(",
"int",
"streamId",
",",
"Http2Headers",
"http2Headers",
",",
"ByteBufAllocator",
"alloc",
",",
"boolean",
"validateHttpHeaders",
")",
"throws",
"Http2Exception",
"{",
"HttpResponseStatus",
"status",
"=",
... | Create a new object to contain the response data
@param streamId The stream associated with the response
@param http2Headers The initial set of HTTP/2 headers to create the response with
@param alloc The {@link ByteBufAllocator} to use to generate the content of the message
@param validateHttpHeaders <ul>
<li>{@code t... | [
"Create",
"a",
"new",
"object",
"to",
"contain",
"the",
"response",
"data"
] | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java#L213-L231 |
Teddy-Zhu/SilentGo | utils/src/main/java/com/silentgo/utils/asm/Type.java | Type.getClassName | public String getClassName() {
"""
Returns the binary name of the class corresponding to this type. This
method must not be used on method types.
@return the binary name of the class corresponding to this type.
"""
switch (sort) {
case VOID:
return "void";
case BOOLEAN:
... | java | public String getClassName() {
switch (sort) {
case VOID:
return "void";
case BOOLEAN:
return "boolean";
case CHAR:
return "char";
case BYTE:
return "byte";
case SHORT:
return "short";
case INT:
... | [
"public",
"String",
"getClassName",
"(",
")",
"{",
"switch",
"(",
"sort",
")",
"{",
"case",
"VOID",
":",
"return",
"\"void\"",
";",
"case",
"BOOLEAN",
":",
"return",
"\"boolean\"",
";",
"case",
"CHAR",
":",
"return",
"\"char\"",
";",
"case",
"BYTE",
":",... | Returns the binary name of the class corresponding to this type. This
method must not be used on method types.
@return the binary name of the class corresponding to this type. | [
"Returns",
"the",
"binary",
"name",
"of",
"the",
"class",
"corresponding",
"to",
"this",
"type",
".",
"This",
"method",
"must",
"not",
"be",
"used",
"on",
"method",
"types",
"."
] | train | https://github.com/Teddy-Zhu/SilentGo/blob/27f58b0cafe56b2eb9fc6993efa9ca2b529661e1/utils/src/main/java/com/silentgo/utils/asm/Type.java#L547-L578 |
cdk/cdk | legacy/src/main/java/org/openscience/cdk/isomorphism/matchers/CTFileQueryBond.java | CTFileQueryBond.ofType | public static CTFileQueryBond ofType(IBond bond, int type) {
"""
Create a CTFileQueryBond of the specified type (from the MDL spec). The
bond copies the atoms and sets the type using the value 'type', 5 = single
or double, 8 = any, etc.
@param bond an existing bond
@param type the specified type
@return a n... | java | public static CTFileQueryBond ofType(IBond bond, int type) {
CTFileQueryBond queryBond = new CTFileQueryBond(bond.getBuilder());
queryBond.setOrder(Order.UNSET);
queryBond.setAtoms(new IAtom[]{bond.getBegin(), bond.getEnd()});
switch (type) {
case 1:
queryBond... | [
"public",
"static",
"CTFileQueryBond",
"ofType",
"(",
"IBond",
"bond",
",",
"int",
"type",
")",
"{",
"CTFileQueryBond",
"queryBond",
"=",
"new",
"CTFileQueryBond",
"(",
"bond",
".",
"getBuilder",
"(",
")",
")",
";",
"queryBond",
".",
"setOrder",
"(",
"Order"... | Create a CTFileQueryBond of the specified type (from the MDL spec). The
bond copies the atoms and sets the type using the value 'type', 5 = single
or double, 8 = any, etc.
@param bond an existing bond
@param type the specified type
@return a new CTFileQueryBond | [
"Create",
"a",
"CTFileQueryBond",
"of",
"the",
"specified",
"type",
"(",
"from",
"the",
"MDL",
"spec",
")",
".",
"The",
"bond",
"copies",
"the",
"atoms",
"and",
"sets",
"the",
"type",
"using",
"the",
"value",
"type",
"5",
"=",
"single",
"or",
"double",
... | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/isomorphism/matchers/CTFileQueryBond.java#L88-L121 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java | SDNN.layerNorm | public SDVariable layerNorm(String name, SDVariable input, SDVariable gain, SDVariable bias, int... dimensions) {
"""
Apply Layer Normalization
y = gain * standardize(x) + bias
@param name Name of the output variable
@param input Input variable
@param gain gain
@param bias bias
@return Output variable
... | java | public SDVariable layerNorm(String name, SDVariable input, SDVariable gain, SDVariable bias, int... dimensions) {
validateFloatingPoint("layerNorm", "input", input);
validateFloatingPoint("layerNorm", "gain", gain);
validateFloatingPoint("layerNorm", "bias", bias);
SDVariable result = f(... | [
"public",
"SDVariable",
"layerNorm",
"(",
"String",
"name",
",",
"SDVariable",
"input",
",",
"SDVariable",
"gain",
",",
"SDVariable",
"bias",
",",
"int",
"...",
"dimensions",
")",
"{",
"validateFloatingPoint",
"(",
"\"layerNorm\"",
",",
"\"input\"",
",",
"input"... | Apply Layer Normalization
y = gain * standardize(x) + bias
@param name Name of the output variable
@param input Input variable
@param gain gain
@param bias bias
@return Output variable | [
"Apply",
"Layer",
"Normalization"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDNN.java#L716-L722 |
rubenlagus/TelegramBots | telegrambots-extensions/src/main/java/org/telegram/telegrambots/extensions/bots/commandbot/commands/DefaultBotCommand.java | DefaultBotCommand.execute | @Override
public final void execute(AbsSender absSender, User user, Chat chat, String[] arguments) {
"""
We'll override this method here for not repeating it in DefaultBotCommand's children
"""
} | java | @Override
public final void execute(AbsSender absSender, User user, Chat chat, String[] arguments) {
} | [
"@",
"Override",
"public",
"final",
"void",
"execute",
"(",
"AbsSender",
"absSender",
",",
"User",
"user",
",",
"Chat",
"chat",
",",
"String",
"[",
"]",
"arguments",
")",
"{",
"}"
] | We'll override this method here for not repeating it in DefaultBotCommand's children | [
"We",
"ll",
"override",
"this",
"method",
"here",
"for",
"not",
"repeating",
"it",
"in",
"DefaultBotCommand",
"s",
"children"
] | train | https://github.com/rubenlagus/TelegramBots/blob/d62354915d7664597a40fd9858f16bce67ef1478/telegrambots-extensions/src/main/java/org/telegram/telegrambots/extensions/bots/commandbot/commands/DefaultBotCommand.java#L39-L41 |
lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java | FactoryVisualOdometry.stereoQuadPnP | public static <T extends ImageGray<T>,Desc extends TupleDesc>
StereoVisualOdometry<T> stereoQuadPnP( double inlierPixelTol ,
double epipolarPixelTol ,
double maxDistanceF2F,
double maxAssociationError,
int ransacIterations ,
int refineIterations ,
... | java | public static <T extends ImageGray<T>,Desc extends TupleDesc>
StereoVisualOdometry<T> stereoQuadPnP( double inlierPixelTol ,
double epipolarPixelTol ,
double maxDistanceF2F,
double maxAssociationError,
int ransacIterations ,
int refineIterations ,
... | [
"public",
"static",
"<",
"T",
"extends",
"ImageGray",
"<",
"T",
">",
",",
"Desc",
"extends",
"TupleDesc",
">",
"StereoVisualOdometry",
"<",
"T",
">",
"stereoQuadPnP",
"(",
"double",
"inlierPixelTol",
",",
"double",
"epipolarPixelTol",
",",
"double",
"maxDistance... | Stereo visual odometry which uses the two most recent stereo observations (total of four views) to estimate
motion.
@see VisOdomQuadPnP
@param inlierPixelTol Pixel tolerance for RANSAC inliers - Euclidean distance
@param epipolarPixelTol Feature association tolerance in pixels.
@param maxDistanceF2F Maximum allowed d... | [
"Stereo",
"visual",
"odometry",
"which",
"uses",
"the",
"two",
"most",
"recent",
"stereo",
"observations",
"(",
"total",
"of",
"four",
"views",
")",
"to",
"estimate",
"motion",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/factory/sfm/FactoryVisualOdometry.java#L357-L411 |
alkacon/opencms-core | src/org/opencms/workplace/CmsWorkplace.java | CmsWorkplace.buttonBarStartTab | public String buttonBarStartTab(int leftPixel, int rightPixel) {
"""
Generates a button bar starter tab.<p>
@param leftPixel the amount of pixel left to the starter
@param rightPixel the amount of pixel right to the starter
@return a button bar starter tab
"""
StringBuffer result = new StringBu... | java | public String buttonBarStartTab(int leftPixel, int rightPixel) {
StringBuffer result = new StringBuffer(512);
result.append(buttonBarLineSpacer(leftPixel));
result.append("<td><span class=\"starttab\"><span style=\"width:1px; height:1px\"></span></span></td>\n");
result.append(buttonBar... | [
"public",
"String",
"buttonBarStartTab",
"(",
"int",
"leftPixel",
",",
"int",
"rightPixel",
")",
"{",
"StringBuffer",
"result",
"=",
"new",
"StringBuffer",
"(",
"512",
")",
";",
"result",
".",
"append",
"(",
"buttonBarLineSpacer",
"(",
"leftPixel",
")",
")",
... | Generates a button bar starter tab.<p>
@param leftPixel the amount of pixel left to the starter
@param rightPixel the amount of pixel right to the starter
@return a button bar starter tab | [
"Generates",
"a",
"button",
"bar",
"starter",
"tab",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/CmsWorkplace.java#L1418-L1425 |
infinispan/infinispan | core/src/main/java/org/infinispan/io/GridFilesystem.java | GridFilesystem.getWritableChannel | public WritableGridFileChannel getWritableChannel(String pathname, boolean append) throws IOException {
"""
Opens a WritableGridFileChannel for writing to the file denoted by pathname. The channel can either overwrite the
existing file or append to it.
@param pathname the path to write to
@param append if true,... | java | public WritableGridFileChannel getWritableChannel(String pathname, boolean append) throws IOException {
return getWritableChannel(pathname, append, defaultChunkSize);
} | [
"public",
"WritableGridFileChannel",
"getWritableChannel",
"(",
"String",
"pathname",
",",
"boolean",
"append",
")",
"throws",
"IOException",
"{",
"return",
"getWritableChannel",
"(",
"pathname",
",",
"append",
",",
"defaultChunkSize",
")",
";",
"}"
] | Opens a WritableGridFileChannel for writing to the file denoted by pathname. The channel can either overwrite the
existing file or append to it.
@param pathname the path to write to
@param append if true, the bytes written to the WritableGridFileChannel will be appended to the end of the file.
If false, the bytes will ... | [
"Opens",
"a",
"WritableGridFileChannel",
"for",
"writing",
"to",
"the",
"file",
"denoted",
"by",
"pathname",
".",
"The",
"channel",
"can",
"either",
"overwrite",
"the",
"existing",
"file",
"or",
"append",
"to",
"it",
"."
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/io/GridFilesystem.java#L215-L217 |
ocelotds/ocelot | ocelot-web/src/main/java/org/ocelotds/cache/CacheArgumentServices.java | CacheArgumentServices.processArg | String processArg(String[] path, String jsonArg) {
"""
Extract considerate value from json arg for compute cache key and function of key<br>
Example : if key = "a.i" and jsonarg = {\"i\":5} then return 5
@param path
@param jsonArg
@return
"""
String keyArg = jsonArg;
if (path.length > 0) {
try ... | java | String processArg(String[] path, String jsonArg) {
String keyArg = jsonArg;
if (path.length > 0) {
try {
keyArg = processSubFieldsOfArg(path, jsonArg);
} catch (Throwable ex) {
logger.warn("Fail to access to field for '{}'", jsonArg, ex);
}
}
return keyArg;
} | [
"String",
"processArg",
"(",
"String",
"[",
"]",
"path",
",",
"String",
"jsonArg",
")",
"{",
"String",
"keyArg",
"=",
"jsonArg",
";",
"if",
"(",
"path",
".",
"length",
">",
"0",
")",
"{",
"try",
"{",
"keyArg",
"=",
"processSubFieldsOfArg",
"(",
"path",... | Extract considerate value from json arg for compute cache key and function of key<br>
Example : if key = "a.i" and jsonarg = {\"i\":5} then return 5
@param path
@param jsonArg
@return | [
"Extract",
"considerate",
"value",
"from",
"json",
"arg",
"for",
"compute",
"cache",
"key",
"and",
"function",
"of",
"key<br",
">",
"Example",
":",
"if",
"key",
"=",
"a",
".",
"i",
"and",
"jsonarg",
"=",
"{",
"\\",
"i",
"\\",
":",
"5",
"}",
"then",
... | train | https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-web/src/main/java/org/ocelotds/cache/CacheArgumentServices.java#L85-L95 |
igniterealtime/Smack | smack-experimental/src/main/java/org/jivesoftware/smackx/iot/discovery/IoTDiscoveryManager.java | IoTDiscoveryManager.claimThing | public IoTClaimed claimThing(Jid registry, Collection<Tag> metaTags, boolean publicThing) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
"""
Claim a thing by providing a collection of meta tags. If the claim was successful, then a {@link IoTClaimed}
instance will be ... | java | public IoTClaimed claimThing(Jid registry, Collection<Tag> metaTags, boolean publicThing) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
interactWithRegistry(registry);
IoTMine iotMine = new IoTMine(metaTags, publicThing);
iotMine.setTo(registry);
... | [
"public",
"IoTClaimed",
"claimThing",
"(",
"Jid",
"registry",
",",
"Collection",
"<",
"Tag",
">",
"metaTags",
",",
"boolean",
"publicThing",
")",
"throws",
"NoResponseException",
",",
"XMPPErrorException",
",",
"NotConnectedException",
",",
"InterruptedException",
"{"... | Claim a thing by providing a collection of meta tags. If the claim was successful, then a {@link IoTClaimed}
instance will be returned, which contains the XMPP address of the thing. Use {@link IoTClaimed#getJid()} to
retrieve this address.
@param registry the registry use to claim the thing.
@param metaTags a collecti... | [
"Claim",
"a",
"thing",
"by",
"providing",
"a",
"collection",
"of",
"meta",
"tags",
".",
"If",
"the",
"claim",
"was",
"successful",
"then",
"a",
"{",
"@link",
"IoTClaimed",
"}",
"instance",
"will",
"be",
"returned",
"which",
"contains",
"the",
"XMPP",
"addr... | train | https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/discovery/IoTDiscoveryManager.java#L291-L304 |
lucmoreau/ProvToolbox | prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java | ProvFactory.newEntity | public Entity newEntity(QualifiedName id, Collection<Attribute> attributes) {
"""
Creates a new {@link Entity} with provided identifier and attributes
@param id a {@link QualifiedName} for the entity
@param attributes a collection of {@link Attribute} for the entity
@return an object of type {@link Entity}
... | java | public Entity newEntity(QualifiedName id, Collection<Attribute> attributes) {
Entity res = newEntity(id);
setAttributes(res, attributes);
return res;
} | [
"public",
"Entity",
"newEntity",
"(",
"QualifiedName",
"id",
",",
"Collection",
"<",
"Attribute",
">",
"attributes",
")",
"{",
"Entity",
"res",
"=",
"newEntity",
"(",
"id",
")",
";",
"setAttributes",
"(",
"res",
",",
"attributes",
")",
";",
"return",
"res"... | Creates a new {@link Entity} with provided identifier and attributes
@param id a {@link QualifiedName} for the entity
@param attributes a collection of {@link Attribute} for the entity
@return an object of type {@link Entity} | [
"Creates",
"a",
"new",
"{"
] | train | https://github.com/lucmoreau/ProvToolbox/blob/f865952868ffb69432937b08728c86bebbe4678a/prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java#L638-L642 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/StreamSupport.java | StreamSupport.intStream | public static IntStream intStream(Spliterator.OfInt spliterator, boolean parallel) {
"""
Creates a new sequential or parallel {@code IntStream} from a
{@code Spliterator.OfInt}.
<p>The spliterator is only traversed, split, or queried for estimated size
after the terminal operation of the stream pipeline comme... | java | public static IntStream intStream(Spliterator.OfInt spliterator, boolean parallel) {
return new IntPipeline.Head<>(spliterator,
StreamOpFlag.fromCharacteristics(spliterator),
parallel);
} | [
"public",
"static",
"IntStream",
"intStream",
"(",
"Spliterator",
".",
"OfInt",
"spliterator",
",",
"boolean",
"parallel",
")",
"{",
"return",
"new",
"IntPipeline",
".",
"Head",
"<>",
"(",
"spliterator",
",",
"StreamOpFlag",
".",
"fromCharacteristics",
"(",
"spl... | Creates a new sequential or parallel {@code IntStream} from a
{@code Spliterator.OfInt}.
<p>The spliterator is only traversed, split, or queried for estimated size
after the terminal operation of the stream pipeline commences.
<p>It is strongly recommended the spliterator report a characteristic of
{@code IMMUTABLE} ... | [
"Creates",
"a",
"new",
"sequential",
"or",
"parallel",
"{",
"@code",
"IntStream",
"}",
"from",
"a",
"{",
"@code",
"Spliterator",
".",
"OfInt",
"}",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/StreamSupport.java#L137-L141 |
fcrepo3/fcrepo | fcrepo-server/src/main/java/org/fcrepo/server/journal/Journaler.java | Journaler.initModule | @Override
public void initModule() throws ModuleInitializationException {
"""
Augment the parameters with values obtained from System Properties, and
create the proper worker (JournalCreator or JournalConsumer) for the
current mode.
"""
Map<String, String> parameters = getParameters();
co... | java | @Override
public void initModule() throws ModuleInitializationException {
Map<String, String> parameters = getParameters();
copyPropertiesOverParameters(parameters);
serverInterface = new ServerWrapper(getServer());
logger.info("Journaling parameters: " + parameters);
parsePa... | [
"@",
"Override",
"public",
"void",
"initModule",
"(",
")",
"throws",
"ModuleInitializationException",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
"=",
"getParameters",
"(",
")",
";",
"copyPropertiesOverParameters",
"(",
"parameters",
")",
";",
"... | Augment the parameters with values obtained from System Properties, and
create the proper worker (JournalCreator or JournalConsumer) for the
current mode. | [
"Augment",
"the",
"parameters",
"with",
"values",
"obtained",
"from",
"System",
"Properties",
"and",
"create",
"the",
"proper",
"worker",
"(",
"JournalCreator",
"or",
"JournalConsumer",
")",
"for",
"the",
"current",
"mode",
"."
] | train | https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/Journaler.java#L61-L76 |
mebigfatguy/fb-contrib | src/main/java/com/mebigfatguy/fbcontrib/detect/MethodReturnsConstant.java | MethodReturnsConstant.visitCode | @Override
public void visitCode(Code obj) {
"""
implements the visitor to reset the stack and proceed for private methods
@param obj
the context object of the currently parsed code block
"""
Method m = getMethod();
if (overloadedMethods.contains(m)) {
return;
}
... | java | @Override
public void visitCode(Code obj) {
Method m = getMethod();
if (overloadedMethods.contains(m)) {
return;
}
int aFlags = m.getAccessFlags();
if ((((aFlags & Const.ACC_PRIVATE) != 0) || ((aFlags & Const.ACC_STATIC) != 0)) && ((aFlags & Const.ACC_SYNTHETIC)... | [
"@",
"Override",
"public",
"void",
"visitCode",
"(",
"Code",
"obj",
")",
"{",
"Method",
"m",
"=",
"getMethod",
"(",
")",
";",
"if",
"(",
"overloadedMethods",
".",
"contains",
"(",
"m",
")",
")",
"{",
"return",
";",
"}",
"int",
"aFlags",
"=",
"m",
"... | implements the visitor to reset the stack and proceed for private methods
@param obj
the context object of the currently parsed code block | [
"implements",
"the",
"visitor",
"to",
"reset",
"the",
"stack",
"and",
"proceed",
"for",
"private",
"methods"
] | train | https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/MethodReturnsConstant.java#L98-L131 |
OpenLiberty/open-liberty | dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLReadServiceContext.java | SSLReadServiceContext.handleAsyncError | private void handleAsyncError(boolean forceQueue, IOException exception, TCPReadCompletedCallback inCallback) {
"""
This method handles errors when they occur during the code path of an async read. It takes
appropriate action based on the setting of the forceQueue parameter. If it is true, the
error callback is ... | java | private void handleAsyncError(boolean forceQueue, IOException exception, TCPReadCompletedCallback inCallback) {
boolean fireHere = true;
if (forceQueue) {
// Error must be returned on a separate thread.
// Reuse queuedWork object (performance), but reset the error parameters.
... | [
"private",
"void",
"handleAsyncError",
"(",
"boolean",
"forceQueue",
",",
"IOException",
"exception",
",",
"TCPReadCompletedCallback",
"inCallback",
")",
"{",
"boolean",
"fireHere",
"=",
"true",
";",
"if",
"(",
"forceQueue",
")",
"{",
"// Error must be returned on a s... | This method handles errors when they occur during the code path of an async read. It takes
appropriate action based on the setting of the forceQueue parameter. If it is true, the
error callback is called on a separate thread. Otherwise it is called right here.
@param forceQueue
@param exception
@param inCallback | [
"This",
"method",
"handles",
"errors",
"when",
"they",
"occur",
"during",
"the",
"code",
"path",
"of",
"an",
"async",
"read",
".",
"It",
"takes",
"appropriate",
"action",
"based",
"on",
"the",
"setting",
"of",
"the",
"forceQueue",
"parameter",
".",
"If",
"... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLReadServiceContext.java#L611-L636 |
languagetool-org/languagetool | languagetool-core/src/main/java/org/languagetool/rules/RuleInformation.java | RuleInformation.ignoreForIncompleteSentences | public static boolean ignoreForIncompleteSentences(String ruleId, Language lang) {
"""
Whether this rule should be ignored when the sentence isn't finished yet.
@since 4.4
"""
return rules.contains(new Key(lang.getShortCode(), ruleId));
} | java | public static boolean ignoreForIncompleteSentences(String ruleId, Language lang) {
return rules.contains(new Key(lang.getShortCode(), ruleId));
} | [
"public",
"static",
"boolean",
"ignoreForIncompleteSentences",
"(",
"String",
"ruleId",
",",
"Language",
"lang",
")",
"{",
"return",
"rules",
".",
"contains",
"(",
"new",
"Key",
"(",
"lang",
".",
"getShortCode",
"(",
")",
",",
"ruleId",
")",
")",
";",
"}"
... | Whether this rule should be ignored when the sentence isn't finished yet.
@since 4.4 | [
"Whether",
"this",
"rule",
"should",
"be",
"ignored",
"when",
"the",
"sentence",
"isn",
"t",
"finished",
"yet",
"."
] | train | https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/rules/RuleInformation.java#L65-L67 |
DV8FromTheWorld/JDA | src/main/java/net/dv8tion/jda/core/requests/restaction/GuildAction.java | GuildAction.newChannel | @CheckReturnValue
public ChannelData newChannel(ChannelType type, String name) {
"""
Creates a new {@link net.dv8tion.jda.core.requests.restaction.GuildAction.ChannelData ChannelData}
instance and adds it to this GuildAction.
@param type
The {@link net.dv8tion.jda.core.entities.ChannelType ChannelType} o... | java | @CheckReturnValue
public ChannelData newChannel(ChannelType type, String name)
{
ChannelData data = new ChannelData(type, name);
addChannel(data);
return data;
} | [
"@",
"CheckReturnValue",
"public",
"ChannelData",
"newChannel",
"(",
"ChannelType",
"type",
",",
"String",
"name",
")",
"{",
"ChannelData",
"data",
"=",
"new",
"ChannelData",
"(",
"type",
",",
"name",
")",
";",
"addChannel",
"(",
"data",
")",
";",
"return",
... | Creates a new {@link net.dv8tion.jda.core.requests.restaction.GuildAction.ChannelData ChannelData}
instance and adds it to this GuildAction.
@param type
The {@link net.dv8tion.jda.core.entities.ChannelType ChannelType} of the resulting Channel
<br>This may be of type {@link net.dv8tion.jda.core.entities.ChannelType#T... | [
"Creates",
"a",
"new",
"{",
"@link",
"net",
".",
"dv8tion",
".",
"jda",
".",
"core",
".",
"requests",
".",
"restaction",
".",
"GuildAction",
".",
"ChannelData",
"ChannelData",
"}",
"instance",
"and",
"adds",
"it",
"to",
"this",
"GuildAction",
"."
] | train | https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/GuildAction.java#L277-L283 |
beangle/beangle3 | struts/s2/src/main/java/org/beangle/struts2/freemarker/BeangleFreemarkerManager.java | BeangleFreemarkerManager.createTemplateLoader | @Override
protected TemplateLoader createTemplateLoader(ServletContext servletContext, String templatePath) {
"""
The default template loader is a MultiTemplateLoader which includes
BeangleClassTemplateLoader(classpath:) and a WebappTemplateLoader
(webapp:) and FileTemplateLoader(file:) . All template path des... | java | @Override
protected TemplateLoader createTemplateLoader(ServletContext servletContext, String templatePath) {
// construct a FileTemplateLoader for the init-param 'TemplatePath'
String[] paths = split(templatePath, ",");
List<TemplateLoader> loaders = CollectUtils.newArrayList();
for (String path : pa... | [
"@",
"Override",
"protected",
"TemplateLoader",
"createTemplateLoader",
"(",
"ServletContext",
"servletContext",
",",
"String",
"templatePath",
")",
"{",
"// construct a FileTemplateLoader for the init-param 'TemplatePath'",
"String",
"[",
"]",
"paths",
"=",
"split",
"(",
"... | The default template loader is a MultiTemplateLoader which includes
BeangleClassTemplateLoader(classpath:) and a WebappTemplateLoader
(webapp:) and FileTemplateLoader(file:) . All template path described
in init parameter templatePath or TemplatePlath
<p/>
The ClassTemplateLoader will resolve fully qualified template i... | [
"The",
"default",
"template",
"loader",
"is",
"a",
"MultiTemplateLoader",
"which",
"includes",
"BeangleClassTemplateLoader",
"(",
"classpath",
":",
")",
"and",
"a",
"WebappTemplateLoader",
"(",
"webapp",
":",
")",
"and",
"FileTemplateLoader",
"(",
"file",
":",
")"... | train | https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/struts/s2/src/main/java/org/beangle/struts2/freemarker/BeangleFreemarkerManager.java#L109-L132 |
gallandarakhneorg/afc | core/maths/mathgeom/tobeincluded/src/d3/continuous/Quaternion.java | Quaternion.mul | public final void mul(Quaternion q1, Quaternion q2) {
"""
Sets the value of this quaternion to the quaternion product of
quaternions q1 and q2 (this = q1 * q2).
Note that this is safe for aliasing (e.g. this can be q1 or q2).
@param q1 the first quaternion
@param q2 the second quaternion
"""
if (this != ... | java | public final void mul(Quaternion q1, Quaternion q2) {
if (this != q1 && this != q2) {
this.w = q1.w*q2.w - q1.x*q2.x - q1.y*q2.y - q1.z*q2.z;
this.x = q1.w*q2.x + q2.w*q1.x + q1.y*q2.z - q1.z*q2.y;
this.y = q1.w*q2.y + q2.w*q1.y - q1.x*q2.z + q1.z*q2.x;
this.z = q1.w*q2.z + q2.w*q1.z + q1.x*q2.y - q1.y*q2... | [
"public",
"final",
"void",
"mul",
"(",
"Quaternion",
"q1",
",",
"Quaternion",
"q2",
")",
"{",
"if",
"(",
"this",
"!=",
"q1",
"&&",
"this",
"!=",
"q2",
")",
"{",
"this",
".",
"w",
"=",
"q1",
".",
"w",
"*",
"q2",
".",
"w",
"-",
"q1",
".",
"x",
... | Sets the value of this quaternion to the quaternion product of
quaternions q1 and q2 (this = q1 * q2).
Note that this is safe for aliasing (e.g. this can be q1 or q2).
@param q1 the first quaternion
@param q2 the second quaternion | [
"Sets",
"the",
"value",
"of",
"this",
"quaternion",
"to",
"the",
"quaternion",
"product",
"of",
"quaternions",
"q1",
"and",
"q2",
"(",
"this",
"=",
"q1",
"*",
"q2",
")",
".",
"Note",
"that",
"this",
"is",
"safe",
"for",
"aliasing",
"(",
"e",
".",
"g"... | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Quaternion.java#L350-L368 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaMessagingEngineConnection.java | SibRaMessagingEngineConnection.createListener | SibRaListener createListener(final SIDestinationAddress destination, MessageEndpointFactory messageEndpointFactory)
throws ResourceException {
"""
Creates a new listener to the given destination.
@param destination
the destination to listen to
@return a listener
@throws ResourceException
... | java | SibRaListener createListener(final SIDestinationAddress destination, MessageEndpointFactory messageEndpointFactory)
throws ResourceException {
final String methodName = "createListener";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
SibTr.entry(th... | [
"SibRaListener",
"createListener",
"(",
"final",
"SIDestinationAddress",
"destination",
",",
"MessageEndpointFactory",
"messageEndpointFactory",
")",
"throws",
"ResourceException",
"{",
"final",
"String",
"methodName",
"=",
"\"createListener\"",
";",
"if",
"(",
"TraceCompon... | Creates a new listener to the given destination.
@param destination
the destination to listen to
@return a listener
@throws ResourceException
if the creation fails | [
"Creates",
"a",
"new",
"listener",
"to",
"the",
"given",
"destination",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaMessagingEngineConnection.java#L661-L686 |
json-path/JsonPath | json-path/src/main/java/com/jayway/jsonpath/JsonPath.java | JsonPath.put | public <T> T put(Object jsonObject, String key, Object value, Configuration configuration) {
"""
Adds or updates the Object this path points to in the provided jsonObject with a key with a value
@param jsonObject a json object
@param key the key to add or update
@param value the new value
... | java | public <T> T put(Object jsonObject, String key, Object value, Configuration configuration) {
notNull(jsonObject, "json can not be null");
notEmpty(key, "key can not be null or empty");
notNull(configuration, "configuration can not be null");
EvaluationContext evaluationContext = path.eva... | [
"public",
"<",
"T",
">",
"T",
"put",
"(",
"Object",
"jsonObject",
",",
"String",
"key",
",",
"Object",
"value",
",",
"Configuration",
"configuration",
")",
"{",
"notNull",
"(",
"jsonObject",
",",
"\"json can not be null\"",
")",
";",
"notEmpty",
"(",
"key",
... | Adds or updates the Object this path points to in the provided jsonObject with a key with a value
@param jsonObject a json object
@param key the key to add or update
@param value the new value
@param configuration configuration to use
@param <T> expected return type
@return the updated jso... | [
"Adds",
"or",
"updates",
"the",
"Object",
"this",
"path",
"points",
"to",
"in",
"the",
"provided",
"jsonObject",
"with",
"a",
"key",
"with",
"a",
"value"
] | train | https://github.com/json-path/JsonPath/blob/5a09489c3252b74bbf81992aadb3073be59c04f9/json-path/src/main/java/com/jayway/jsonpath/JsonPath.java#L294-L303 |
phax/ph-commons | ph-charset/src/main/java/com/helger/charset/utf7/UTF7StyleCharsetEncoder.java | UTF7StyleCharsetEncoder._unshift | private void _unshift (final ByteBuffer out, final char ch) {
"""
<p>
Writes the bytes necessary to leave <i>base 64 mode</i>. This might include
an unshift character.
</p>
@param out
@param ch
"""
if (!m_bBase64mode)
return;
if (m_nBitsToOutput != 0)
out.put (m_aBase64.getChar (m_nS... | java | private void _unshift (final ByteBuffer out, final char ch)
{
if (!m_bBase64mode)
return;
if (m_nBitsToOutput != 0)
out.put (m_aBase64.getChar (m_nSextet));
if (m_aBase64.contains (ch) || ch == m_nUnshift || m_bStrict)
out.put (m_nUnshift);
m_bBase64mode = false;
m_nSextet = 0;
... | [
"private",
"void",
"_unshift",
"(",
"final",
"ByteBuffer",
"out",
",",
"final",
"char",
"ch",
")",
"{",
"if",
"(",
"!",
"m_bBase64mode",
")",
"return",
";",
"if",
"(",
"m_nBitsToOutput",
"!=",
"0",
")",
"out",
".",
"put",
"(",
"m_aBase64",
".",
"getCha... | <p>
Writes the bytes necessary to leave <i>base 64 mode</i>. This might include
an unshift character.
</p>
@param out
@param ch | [
"<p",
">",
"Writes",
"the",
"bytes",
"necessary",
"to",
"leave",
"<i",
">",
"base",
"64",
"mode<",
"/",
"i",
">",
".",
"This",
"might",
"include",
"an",
"unshift",
"character",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-charset/src/main/java/com/helger/charset/utf7/UTF7StyleCharsetEncoder.java#L172-L183 |
svenkubiak/mangooio | mangooio-core/src/main/java/io/mangoo/utils/TotpUtils.java | TotpUtils.getQRCode | public static String getQRCode(String name, String issuer, String secret, HmacShaAlgorithm algorithm, String digits, String period) {
"""
Generates a QR code to share a secret with a user
@param name The name of the account
@param issuer The name of the issuer
@param secret The secret to use
@param algorithm... | java | public static String getQRCode(String name, String issuer, String secret, HmacShaAlgorithm algorithm, String digits, String period) {
Objects.requireNonNull(name, Required.ACCOUNT_NAME.toString());
Objects.requireNonNull(secret, Required.SECRET.toString());
Objects.requireNonNull(issuer, Require... | [
"public",
"static",
"String",
"getQRCode",
"(",
"String",
"name",
",",
"String",
"issuer",
",",
"String",
"secret",
",",
"HmacShaAlgorithm",
"algorithm",
",",
"String",
"digits",
",",
"String",
"period",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"name",... | Generates a QR code to share a secret with a user
@param name The name of the account
@param issuer The name of the issuer
@param secret The secret to use
@param algorithm The algorithm to use
@param digits The number of digits to use
@param period The period to use
@return An URL to Google charts API with the QR cod... | [
"Generates",
"a",
"QR",
"code",
"to",
"share",
"a",
"secret",
"with",
"a",
"user"
] | train | https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/utils/TotpUtils.java#L156-L169 |
dropbox/dropbox-sdk-java | src/main/java/com/dropbox/core/android/DbxOfficialAppConnector.java | DbxOfficialAppConnector.addExtrasToIntent | protected void addExtrasToIntent(Context context, Intent intent) {
"""
Add uid information to an explicit intent directed to DropboxApp
"""
intent.putExtra(EXTRA_DROPBOX_UID, uid);
intent.putExtra(EXTRA_CALLING_PACKAGE, context.getPackageName());
} | java | protected void addExtrasToIntent(Context context, Intent intent) {
intent.putExtra(EXTRA_DROPBOX_UID, uid);
intent.putExtra(EXTRA_CALLING_PACKAGE, context.getPackageName());
} | [
"protected",
"void",
"addExtrasToIntent",
"(",
"Context",
"context",
",",
"Intent",
"intent",
")",
"{",
"intent",
".",
"putExtra",
"(",
"EXTRA_DROPBOX_UID",
",",
"uid",
")",
";",
"intent",
".",
"putExtra",
"(",
"EXTRA_CALLING_PACKAGE",
",",
"context",
".",
"ge... | Add uid information to an explicit intent directed to DropboxApp | [
"Add",
"uid",
"information",
"to",
"an",
"explicit",
"intent",
"directed",
"to",
"DropboxApp"
] | train | https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/android/DbxOfficialAppConnector.java#L117-L120 |
jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/Record.java | Record.formatTableNames | public static final String formatTableNames(String strTableNames, boolean bAddQuotes) {
"""
Utility routine to add quotes to a string if the string contains a space.
@param strTableNames The table name to add quotes to if there is a space in the name.
@param bAddQuotes Add the quotes?
@return The new quoted tab... | java | public static final String formatTableNames(String strTableNames, boolean bAddQuotes)
{
if (bAddQuotes)
if (strTableNames.indexOf(' ') != -1)
strTableNames = BaseField.addQuotes(strTableNames, DBConstants.SQL_START_QUOTE, DBConstants.SQL_END_QUOTE); // Spaces in name, quotes ... | [
"public",
"static",
"final",
"String",
"formatTableNames",
"(",
"String",
"strTableNames",
",",
"boolean",
"bAddQuotes",
")",
"{",
"if",
"(",
"bAddQuotes",
")",
"if",
"(",
"strTableNames",
".",
"indexOf",
"(",
"'",
"'",
")",
"!=",
"-",
"1",
")",
"strTableN... | Utility routine to add quotes to a string if the string contains a space.
@param strTableNames The table name to add quotes to if there is a space in the name.
@param bAddQuotes Add the quotes?
@return The new quoted table name. | [
"Utility",
"routine",
"to",
"add",
"quotes",
"to",
"a",
"string",
"if",
"the",
"string",
"contains",
"a",
"space",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/Record.java#L847-L853 |
sarl/sarl | main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/validation/SARLUIStrings.java | SARLUIStrings.parametersToStyledString | protected StyledString parametersToStyledString(Iterable<? extends JvmFormalParameter> elements, boolean isVarArgs, boolean includeName) {
"""
Replies the styled string representation of the parameters.
@param elements the parameters.
@param isVarArgs indicates if the last parameter is variadic.
@param includ... | java | protected StyledString parametersToStyledString(Iterable<? extends JvmFormalParameter> elements, boolean isVarArgs, boolean includeName) {
return getParameterStyledString(elements, isVarArgs, includeName, this.keywords, this.annotationFinder, this);
} | [
"protected",
"StyledString",
"parametersToStyledString",
"(",
"Iterable",
"<",
"?",
"extends",
"JvmFormalParameter",
">",
"elements",
",",
"boolean",
"isVarArgs",
",",
"boolean",
"includeName",
")",
"{",
"return",
"getParameterStyledString",
"(",
"elements",
",",
"isV... | Replies the styled string representation of the parameters.
@param elements the parameters.
@param isVarArgs indicates if the last parameter is variadic.
@param includeName indicates if the names are included.
@return the styled string.
@since 0.6 | [
"Replies",
"the",
"styled",
"string",
"representation",
"of",
"the",
"parameters",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/validation/SARLUIStrings.java#L113-L115 |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java | TableCellStyleBuilder.borderAll | public TableCellStyleBuilder borderAll(final Length size, final Color borderColor,
final BorderAttribute.Style style) {
"""
Add a border style for all the borders of this cell.
@param size the size of the line
@param borderColor the color to be used in format #... | java | public TableCellStyleBuilder borderAll(final Length size, final Color borderColor,
final BorderAttribute.Style style) {
final BorderAttribute bs = new BorderAttribute(size, borderColor, style);
this.bordersBuilder.all(bs);
return this;
} | [
"public",
"TableCellStyleBuilder",
"borderAll",
"(",
"final",
"Length",
"size",
",",
"final",
"Color",
"borderColor",
",",
"final",
"BorderAttribute",
".",
"Style",
"style",
")",
"{",
"final",
"BorderAttribute",
"bs",
"=",
"new",
"BorderAttribute",
"(",
"size",
... | Add a border style for all the borders of this cell.
@param size the size of the line
@param borderColor the color to be used in format #rrggbb e.g. '#ff0000' for a red border
@param style the style of the border line, either BorderAttribute.BORDER_SOLID or BorderAttribute.BORDER_DOUBLE
@return this for f... | [
"Add",
"a",
"border",
"style",
"for",
"all",
"the",
"borders",
"of",
"this",
"cell",
"."
] | train | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/style/TableCellStyleBuilder.java#L98-L103 |
NordicSemiconductor/Android-DFU-Library | dfu/src/main/java/no/nordicsemi/android/dfu/DfuServiceListenerHelper.java | DfuServiceListenerHelper.unregisterLogListener | public static void unregisterLogListener(@NonNull final Context context, @NonNull final DfuLogListener listener) {
"""
Unregisters the previously registered log listener.
@param context the application context.
@param listener the listener to unregister.
"""
if (mLogBroadcastReceiver != null) {
final... | java | public static void unregisterLogListener(@NonNull final Context context, @NonNull final DfuLogListener listener) {
if (mLogBroadcastReceiver != null) {
final boolean empty = mLogBroadcastReceiver.removeLogListener(listener);
if (empty) {
LocalBroadcastManager.getInstance(context).unregisterReceiver(mLogBro... | [
"public",
"static",
"void",
"unregisterLogListener",
"(",
"@",
"NonNull",
"final",
"Context",
"context",
",",
"@",
"NonNull",
"final",
"DfuLogListener",
"listener",
")",
"{",
"if",
"(",
"mLogBroadcastReceiver",
"!=",
"null",
")",
"{",
"final",
"boolean",
"empty"... | Unregisters the previously registered log listener.
@param context the application context.
@param listener the listener to unregister. | [
"Unregisters",
"the",
"previously",
"registered",
"log",
"listener",
"."
] | train | https://github.com/NordicSemiconductor/Android-DFU-Library/blob/ec14c8c522bebe801a9a4c3dfbbeb1f53262c03f/dfu/src/main/java/no/nordicsemi/android/dfu/DfuServiceListenerHelper.java#L378-L387 |
UrielCh/ovh-java-sdk | ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java | ApiOvhCloud.project_serviceName_volume_volumeId_DELETE | public void project_serviceName_volume_volumeId_DELETE(String serviceName, String volumeId) throws IOException {
"""
Delete a volume
REST: DELETE /cloud/project/{serviceName}/volume/{volumeId}
@param serviceName [required] Project id
@param volumeId [required] Volume id
"""
String qPath = "/cloud/projec... | java | public void project_serviceName_volume_volumeId_DELETE(String serviceName, String volumeId) throws IOException {
String qPath = "/cloud/project/{serviceName}/volume/{volumeId}";
StringBuilder sb = path(qPath, serviceName, volumeId);
exec(qPath, "DELETE", sb.toString(), null);
} | [
"public",
"void",
"project_serviceName_volume_volumeId_DELETE",
"(",
"String",
"serviceName",
",",
"String",
"volumeId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/cloud/project/{serviceName}/volume/{volumeId}\"",
";",
"StringBuilder",
"sb",
"=",
"path",... | Delete a volume
REST: DELETE /cloud/project/{serviceName}/volume/{volumeId}
@param serviceName [required] Project id
@param volumeId [required] Volume id | [
"Delete",
"a",
"volume"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1106-L1110 |
lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/form/support/MessageSourceFieldFaceSource.java | MessageSourceFieldFaceSource.getMessage | protected String getMessage(String contextId, String fieldPath, String[] faceDescriptorProperty) {
"""
Returns the value of the required property of the FieldFace. Delegates to the getMessageKeys for the message key
generation strategy. This method uses </code>[contextId + "." + ] fieldPath [ + "." + faceDescript... | java | protected String getMessage(String contextId, String fieldPath, String[] faceDescriptorProperty) {
String[] keys = getMessageKeys(contextId, fieldPath, faceDescriptorProperty);
return getMessageSourceAccessor().getMessage(new DefaultMessageSourceResolvable(keys, null, keys[0]));
} | [
"protected",
"String",
"getMessage",
"(",
"String",
"contextId",
",",
"String",
"fieldPath",
",",
"String",
"[",
"]",
"faceDescriptorProperty",
")",
"{",
"String",
"[",
"]",
"keys",
"=",
"getMessageKeys",
"(",
"contextId",
",",
"fieldPath",
",",
"faceDescriptorP... | Returns the value of the required property of the FieldFace. Delegates to the getMessageKeys for the message key
generation strategy. This method uses </code>[contextId + "." + ] fieldPath [ + "." + faceDescriptorProperty[0]]</code>
for the default value | [
"Returns",
"the",
"value",
"of",
"the",
"required",
"property",
"of",
"the",
"FieldFace",
".",
"Delegates",
"to",
"the",
"getMessageKeys",
"for",
"the",
"message",
"key",
"generation",
"strategy",
".",
"This",
"method",
"uses",
"<",
"/",
"code",
">",
"[",
... | train | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/form/support/MessageSourceFieldFaceSource.java#L113-L116 |
rey5137/material | material/src/main/java/com/rey/material/app/DatePickerDialog.java | DatePickerDialog.dateRange | public DatePickerDialog dateRange(int minDay, int minMonth, int minYear, int maxDay, int maxMonth, int maxYear) {
"""
Set the range of selectable dates.
@param minDay The day value of minimum date.
@param minMonth The month value of minimum date.
@param minYear The year value of minimum date.
@param maxDay The... | java | public DatePickerDialog dateRange(int minDay, int minMonth, int minYear, int maxDay, int maxMonth, int maxYear){
mDatePickerLayout.setDateRange(minDay, minMonth, minYear, maxDay, maxMonth, maxYear);
return this;
} | [
"public",
"DatePickerDialog",
"dateRange",
"(",
"int",
"minDay",
",",
"int",
"minMonth",
",",
"int",
"minYear",
",",
"int",
"maxDay",
",",
"int",
"maxMonth",
",",
"int",
"maxYear",
")",
"{",
"mDatePickerLayout",
".",
"setDateRange",
"(",
"minDay",
",",
"minM... | Set the range of selectable dates.
@param minDay The day value of minimum date.
@param minMonth The month value of minimum date.
@param minYear The year value of minimum date.
@param maxDay The day value of maximum date.
@param maxMonth The month value of maximum date.
@param maxYear The year value of maximum date.
@re... | [
"Set",
"the",
"range",
"of",
"selectable",
"dates",
"."
] | train | https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/app/DatePickerDialog.java#L103-L106 |
juebanlin/util4j | util4j/src/main/java/net/jueb/util4j/proxy/methodProxy/MethodHandleUtil.java | MethodHandleUtil.proxyMethod | public static MethodHandleProxy proxyMethod(Object target,String methodName,Object ...args) {
"""
代理对象方法
会根据方法名和方法参数严格匹配
@param target 代理对象
@param methodName 对象方法名
@param args 对象方法参数
@return
"""
MethodHandle mh=findMethodHandle(target, methodName, args);
if(mh!=null)
{
return new MethodHandle... | java | public static MethodHandleProxy proxyMethod(Object target,String methodName,Object ...args)
{
MethodHandle mh=findMethodHandle(target, methodName, args);
if(mh!=null)
{
return new MethodHandleProxy(target, mh, args);
}
return null;
} | [
"public",
"static",
"MethodHandleProxy",
"proxyMethod",
"(",
"Object",
"target",
",",
"String",
"methodName",
",",
"Object",
"...",
"args",
")",
"{",
"MethodHandle",
"mh",
"=",
"findMethodHandle",
"(",
"target",
",",
"methodName",
",",
"args",
")",
";",
"if",
... | 代理对象方法
会根据方法名和方法参数严格匹配
@param target 代理对象
@param methodName 对象方法名
@param args 对象方法参数
@return | [
"代理对象方法",
"会根据方法名和方法参数严格匹配"
] | train | https://github.com/juebanlin/util4j/blob/c404b2dbdedf7a8890533b351257fa8af4f1439f/util4j/src/main/java/net/jueb/util4j/proxy/methodProxy/MethodHandleUtil.java#L34-L42 |
tango-controls/JTango | server/src/main/java/org/tango/server/events/EventManager.java | EventManager.pushAttributeDataReadyEvent | public void pushAttributeDataReadyEvent(final String deviceName, final String attributeName, final int counter)
throws DevFailed {
"""
fire event with AttDataReady
@param deviceName Specified event device
@param attributeName specified event attribute name
@param counter a counter value
... | java | public void pushAttributeDataReadyEvent(final String deviceName, final String attributeName, final int counter)
throws DevFailed {
xlogger.entry();
final String fullName = EventUtilities.buildEventName(deviceName, attributeName, EventType.DATA_READY_EVENT);
final EventImpl eventImpl ... | [
"public",
"void",
"pushAttributeDataReadyEvent",
"(",
"final",
"String",
"deviceName",
",",
"final",
"String",
"attributeName",
",",
"final",
"int",
"counter",
")",
"throws",
"DevFailed",
"{",
"xlogger",
".",
"entry",
"(",
")",
";",
"final",
"String",
"fullName"... | fire event with AttDataReady
@param deviceName Specified event device
@param attributeName specified event attribute name
@param counter a counter value
@throws DevFailed | [
"fire",
"event",
"with",
"AttDataReady"
] | train | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/events/EventManager.java#L543-L554 |
looly/hutool | hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java | SqlConnRunner.findAll | public List<Entity> findAll(Connection conn, String tableName) throws SQLException {
"""
查询数据列表,返回所有字段
@param conn 数据库连接对象
@param tableName 表名
@return 数据对象列表
@throws SQLException SQL执行异常
"""
return findAll(conn, Entity.create(tableName));
} | java | public List<Entity> findAll(Connection conn, String tableName) throws SQLException{
return findAll(conn, Entity.create(tableName));
} | [
"public",
"List",
"<",
"Entity",
">",
"findAll",
"(",
"Connection",
"conn",
",",
"String",
"tableName",
")",
"throws",
"SQLException",
"{",
"return",
"findAll",
"(",
"conn",
",",
"Entity",
".",
"create",
"(",
"tableName",
")",
")",
";",
"}"
] | 查询数据列表,返回所有字段
@param conn 数据库连接对象
@param tableName 表名
@return 数据对象列表
@throws SQLException SQL执行异常 | [
"查询数据列表,返回所有字段"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/SqlConnRunner.java#L385-L387 |
nemerosa/ontrack | ontrack-extension-general/src/main/java/net/nemerosa/ontrack/extension/general/ReleasePropertyType.java | ReleasePropertyType.canEdit | @Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
"""
If one can promote a build, he can also attach a release label to a build.
"""
return securityService.isProjectFunctionGranted(entity, PromotionRunCreate.class);
} | java | @Override
public boolean canEdit(ProjectEntity entity, SecurityService securityService) {
return securityService.isProjectFunctionGranted(entity, PromotionRunCreate.class);
} | [
"@",
"Override",
"public",
"boolean",
"canEdit",
"(",
"ProjectEntity",
"entity",
",",
"SecurityService",
"securityService",
")",
"{",
"return",
"securityService",
".",
"isProjectFunctionGranted",
"(",
"entity",
",",
"PromotionRunCreate",
".",
"class",
")",
";",
"}"
... | If one can promote a build, he can also attach a release label to a build. | [
"If",
"one",
"can",
"promote",
"a",
"build",
"he",
"can",
"also",
"attach",
"a",
"release",
"label",
"to",
"a",
"build",
"."
] | train | https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-extension-general/src/main/java/net/nemerosa/ontrack/extension/general/ReleasePropertyType.java#L48-L51 |
kuali/ojb-1.0.4 | src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java | FieldDescriptorConstraints.checkAnonymous | private void checkAnonymous(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException {
"""
Checks anonymous fields.
@param fieldDef The field descriptor
@param checkLevel The current check level (this constraint is checked in basic and strict)
@exception ConstraintException If the constraint... | java | private void checkAnonymous(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
{
if (CHECKLEVEL_NONE.equals(checkLevel))
{
return;
}
String access = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_ACCESS);
if (!"anonymous".equal... | [
"private",
"void",
"checkAnonymous",
"(",
"FieldDescriptorDef",
"fieldDef",
",",
"String",
"checkLevel",
")",
"throws",
"ConstraintException",
"{",
"if",
"(",
"CHECKLEVEL_NONE",
".",
"equals",
"(",
"checkLevel",
")",
")",
"{",
"return",
";",
"}",
"String",
"acce... | Checks anonymous fields.
@param fieldDef The field descriptor
@param checkLevel The current check level (this constraint is checked in basic and strict)
@exception ConstraintException If the constraint has been violated | [
"Checks",
"anonymous",
"fields",
"."
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/FieldDescriptorConstraints.java#L420-L438 |
b3dgs/lionengine | lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/TileCollidableModel.java | TileCollidableModel.onCollided | private void onCollided(CollisionResult result, CollisionCategory category) {
"""
Called when a collision occurred on a specified axis.
@param result The result reference.
@param category The collision category reference.
"""
for (final TileCollidableListener listener : listeners)
{
... | java | private void onCollided(CollisionResult result, CollisionCategory category)
{
for (final TileCollidableListener listener : listeners)
{
listener.notifyTileCollided(result, category);
}
} | [
"private",
"void",
"onCollided",
"(",
"CollisionResult",
"result",
",",
"CollisionCategory",
"category",
")",
"{",
"for",
"(",
"final",
"TileCollidableListener",
"listener",
":",
"listeners",
")",
"{",
"listener",
".",
"notifyTileCollided",
"(",
"result",
",",
"ca... | Called when a collision occurred on a specified axis.
@param result The result reference.
@param category The collision category reference. | [
"Called",
"when",
"a",
"collision",
"occurred",
"on",
"a",
"specified",
"axis",
"."
] | train | https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/TileCollidableModel.java#L114-L120 |
apache/incubator-heron | heron/scheduler-core/src/java/org/apache/heron/scheduler/dryrun/FormatterUtils.java | FormatterUtils.percentageChange | public static Optional<Cell> percentageChange(double oldAmount, double newAmount) {
"""
Format new amount associated with change in percentage
For example, with {@code oldAmount = 2} and {@code newAmount = 1}
the result Cell is " -50.00%" (in red color)
@param oldAmount old resource usage
@param newAmount new ... | java | public static Optional<Cell> percentageChange(double oldAmount, double newAmount) {
double delta = newAmount - oldAmount;
double percentage = delta / oldAmount * 100.0;
if (percentage == 0.0) {
return Optional.absent();
} else {
String sign = "";
if (percentage > 0.0) {
sign = ... | [
"public",
"static",
"Optional",
"<",
"Cell",
">",
"percentageChange",
"(",
"double",
"oldAmount",
",",
"double",
"newAmount",
")",
"{",
"double",
"delta",
"=",
"newAmount",
"-",
"oldAmount",
";",
"double",
"percentage",
"=",
"delta",
"/",
"oldAmount",
"*",
"... | Format new amount associated with change in percentage
For example, with {@code oldAmount = 2} and {@code newAmount = 1}
the result Cell is " -50.00%" (in red color)
@param oldAmount old resource usage
@param newAmount new resource usage
@return formatted chagne in percentage if oldAmount and newAmount differ | [
"Format",
"new",
"amount",
"associated",
"with",
"change",
"in",
"percentage",
"For",
"example",
"with",
"{"
] | train | https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/scheduler-core/src/java/org/apache/heron/scheduler/dryrun/FormatterUtils.java#L428-L447 |
lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/enhance/GEnhanceImageOps.java | GEnhanceImageOps.applyTransform | public static <T extends ImageGray<T>>
void applyTransform( T input , int transform[] , int minValue , T output ) {
"""
Applies the transformation table to the provided input image.
@param input Input image.
@param transform Input transformation table.
@param minValue Minimum possible pixel value.
@param ou... | java | public static <T extends ImageGray<T>>
void applyTransform( T input , int transform[] , int minValue , T output ) {
InputSanityCheck.checkSameShape(input, output);
if( input instanceof GrayU8) {
EnhanceImageOps.applyTransform((GrayU8) input, transform, (GrayU8) output);
} else if( input instanceof GrayS8) {
... | [
"public",
"static",
"<",
"T",
"extends",
"ImageGray",
"<",
"T",
">",
">",
"void",
"applyTransform",
"(",
"T",
"input",
",",
"int",
"transform",
"[",
"]",
",",
"int",
"minValue",
",",
"T",
"output",
")",
"{",
"InputSanityCheck",
".",
"checkSameShape",
"("... | Applies the transformation table to the provided input image.
@param input Input image.
@param transform Input transformation table.
@param minValue Minimum possible pixel value.
@param output Output image. | [
"Applies",
"the",
"transformation",
"table",
"to",
"the",
"provided",
"input",
"image",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/enhance/GEnhanceImageOps.java#L39-L56 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/NetworkInterfacesInner.java | NetworkInterfacesInner.updateTagsAsync | public Observable<NetworkInterfaceInner> updateTagsAsync(String resourceGroupName, String networkInterfaceName, Map<String, String> tags) {
"""
Updates a network interface tags.
@param resourceGroupName The name of the resource group.
@param networkInterfaceName The name of the network interface.
@param tags ... | java | public Observable<NetworkInterfaceInner> updateTagsAsync(String resourceGroupName, String networkInterfaceName, Map<String, String> tags) {
return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).map(new Func1<ServiceResponse<NetworkInterfaceInner>, NetworkInterfaceInner>() {
... | [
"public",
"Observable",
"<",
"NetworkInterfaceInner",
">",
"updateTagsAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"networkInterfaceName",
",",
"Map",
"<",
"String",
",",
"String",
">",
"tags",
")",
"{",
"return",
"updateTagsWithServiceResponseAsync",
"(... | Updates a network interface tags.
@param resourceGroupName The name of the resource group.
@param networkInterfaceName The name of the network interface.
@param tags Resource tags.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable for the request | [
"Updates",
"a",
"network",
"interface",
"tags",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/NetworkInterfacesInner.java#L757-L764 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.