repository_name stringlengths 7 58 | func_path_in_repository stringlengths 18 201 | func_name stringlengths 4 126 | whole_func_string stringlengths 75 3.57k | language stringclasses 1
value | func_code_string stringlengths 75 3.57k | func_code_tokens listlengths 21 599 | func_documentation_string stringlengths 61 1.95k | func_documentation_tokens listlengths 1 478 | split_name stringclasses 1
value | func_code_url stringlengths 111 308 |
|---|---|---|---|---|---|---|---|---|---|---|
amaembo/streamex | src/main/java/one/util/streamex/IntStreamEx.java | IntStreamEx.ofIndices | public static IntStreamEx ofIndices(int[] array, IntPredicate predicate) {
return seq(IntStream.range(0, array.length).filter(i -> predicate.test(array[i])));
} | java | public static IntStreamEx ofIndices(int[] array, IntPredicate predicate) {
return seq(IntStream.range(0, array.length).filter(i -> predicate.test(array[i])));
} | [
"public",
"static",
"IntStreamEx",
"ofIndices",
"(",
"int",
"[",
"]",
"array",
",",
"IntPredicate",
"predicate",
")",
"{",
"return",
"seq",
"(",
"IntStream",
".",
"range",
"(",
"0",
",",
"array",
".",
"length",
")",
".",
"filter",
"(",
"i",
"->",
"pred... | Returns a sequential ordered {@code IntStreamEx} containing all the
indices of the supplied array elements which match given predicate.
@param array array to get the stream of its indices
@param predicate a predicate to test array elements
@return a sequential {@code IntStreamEx} of the matched array indices
@since 0.... | [
"Returns",
"a",
"sequential",
"ordered",
"{",
"@code",
"IntStreamEx",
"}",
"containing",
"all",
"the",
"indices",
"of",
"the",
"supplied",
"array",
"elements",
"which",
"match",
"given",
"predicate",
"."
] | train | https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/IntStreamEx.java#L2083-L2085 |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/ProjectApi.java | ProjectApi.getMember | public Member getMember(Object projectIdOrPath, Integer userId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "members", userId);
return (response.readEntity(Member.class));
} | java | public Member getMember(Object projectIdOrPath, Integer userId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "members", userId);
return (response.readEntity(Member.class));
} | [
"public",
"Member",
"getMember",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"userId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"projects\"",
",",
"getPro... | Gets a project team member.
<pre><code>GET /projects/:id/members/:user_id</code></pre>
@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param userId the user ID of the member
@return the member specified by the project ID/user ID pair
@throws GitLabA... | [
"Gets",
"a",
"project",
"team",
"member",
"."
] | train | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1226-L1229 |
bmwcarit/joynr | java/javaapi/src/main/java/io/joynr/provider/AbstractSubscriptionPublisher.java | AbstractSubscriptionPublisher.unregisterBroadcastListener | @Override
public void unregisterBroadcastListener(String broadcastName, BroadcastListener broadcastListener) {
List<BroadcastListener> listeners = broadcastListeners.get(broadcastName);
if (listeners == null) {
LOG.error("trying to unregister a listener for broadcast \"" + broadcastName
... | java | @Override
public void unregisterBroadcastListener(String broadcastName, BroadcastListener broadcastListener) {
List<BroadcastListener> listeners = broadcastListeners.get(broadcastName);
if (listeners == null) {
LOG.error("trying to unregister a listener for broadcast \"" + broadcastName
... | [
"@",
"Override",
"public",
"void",
"unregisterBroadcastListener",
"(",
"String",
"broadcastName",
",",
"BroadcastListener",
"broadcastListener",
")",
"{",
"List",
"<",
"BroadcastListener",
">",
"listeners",
"=",
"broadcastListeners",
".",
"get",
"(",
"broadcastName",
... | Unregisters a broadcast listener.
@param broadcastName the broadcast name as defined in the Franca model
to unsubscribe from.
@param broadcastListener the listener to remove. | [
"Unregisters",
"a",
"broadcast",
"listener",
"."
] | train | https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/javaapi/src/main/java/io/joynr/provider/AbstractSubscriptionPublisher.java#L185-L201 |
alamkanak/Android-Week-View | library/src/main/java/com/alamkanak/weekview/WeekView.java | WeekView.sortEvents | private void sortEvents(List<? extends WeekViewEvent> events) {
Collections.sort(events, new Comparator<WeekViewEvent>() {
@Override
public int compare(WeekViewEvent event1, WeekViewEvent event2) {
long start1 = event1.getStartTime().getTimeInMillis();
lon... | java | private void sortEvents(List<? extends WeekViewEvent> events) {
Collections.sort(events, new Comparator<WeekViewEvent>() {
@Override
public int compare(WeekViewEvent event1, WeekViewEvent event2) {
long start1 = event1.getStartTime().getTimeInMillis();
lon... | [
"private",
"void",
"sortEvents",
"(",
"List",
"<",
"?",
"extends",
"WeekViewEvent",
">",
"events",
")",
"{",
"Collections",
".",
"sort",
"(",
"events",
",",
"new",
"Comparator",
"<",
"WeekViewEvent",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"int",
... | Sorts the events in ascending order.
@param events The events to be sorted. | [
"Sorts",
"the",
"events",
"in",
"ascending",
"order",
"."
] | train | https://github.com/alamkanak/Android-Week-View/blob/dc3f97d65d44785d1a761b52b58527c86c4eee1b/library/src/main/java/com/alamkanak/weekview/WeekView.java#L1077-L1092 |
dita-ot/dita-ot | src/main/plugins/org.dita.eclipsehelp/src/main/java/org/dita/dost/writer/EclipseIndexWriter.java | EclipseIndexWriter.outputIndexTermEndElement | private void outputIndexTermEndElement(final IndexTerm term, final XMLStreamWriter serializer, final boolean indexsee) throws XMLStreamException {
if (indexsee){
if (term.getTermPrefix() != null) {
serializer.writeEndElement(); // see
inIndexsee = false;
}... | java | private void outputIndexTermEndElement(final IndexTerm term, final XMLStreamWriter serializer, final boolean indexsee) throws XMLStreamException {
if (indexsee){
if (term.getTermPrefix() != null) {
serializer.writeEndElement(); // see
inIndexsee = false;
}... | [
"private",
"void",
"outputIndexTermEndElement",
"(",
"final",
"IndexTerm",
"term",
",",
"final",
"XMLStreamWriter",
"serializer",
",",
"final",
"boolean",
"indexsee",
")",
"throws",
"XMLStreamException",
"{",
"if",
"(",
"indexsee",
")",
"{",
"if",
"(",
"term",
"... | /*
Logic for adding various end index entry elements for Eclipse help.
@param term The indexterm to be processed.
@param printWriter The Writer used for writing content to disk.
@param indexsee Boolean value for using the new markup for see references. | [
"/",
"*",
"Logic",
"for",
"adding",
"various",
"end",
"index",
"entry",
"elements",
"for",
"Eclipse",
"help",
"."
] | train | https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/plugins/org.dita.eclipsehelp/src/main/java/org/dita/dost/writer/EclipseIndexWriter.java#L346-L359 |
sarl/sarl | main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java | SARLOperationHelper._hasSideEffects | protected Boolean _hasSideEffects(XReturnExpression expression, ISideEffectContext context) {
return hasSideEffects(expression.getExpression(), context);
} | java | protected Boolean _hasSideEffects(XReturnExpression expression, ISideEffectContext context) {
return hasSideEffects(expression.getExpression(), context);
} | [
"protected",
"Boolean",
"_hasSideEffects",
"(",
"XReturnExpression",
"expression",
",",
"ISideEffectContext",
"context",
")",
"{",
"return",
"hasSideEffects",
"(",
"expression",
".",
"getExpression",
"(",
")",
",",
"context",
")",
";",
"}"
] | Test if the given expression has side effects.
@param expression the expression.
@param context the list of context expressions.
@return {@code true} if the expression has side effects. | [
"Test",
"if",
"the",
"given",
"expression",
"has",
"side",
"effects",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java#L339-L341 |
mgormley/prim | src/main/java/edu/jhu/prim/arrays/DoubleArrays.java | DoubleArrays.indexOf | public static int indexOf(double[] array, double val) {
for (int i=0; i<array.length; i++) {
if (array[i] == val) {
return i;
}
}
return -1;
} | java | public static int indexOf(double[] array, double val) {
for (int i=0; i<array.length; i++) {
if (array[i] == val) {
return i;
}
}
return -1;
} | [
"public",
"static",
"int",
"indexOf",
"(",
"double",
"[",
"]",
"array",
",",
"double",
"val",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"array",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"array",
"[",
"i",
"]",
"=="... | Gets the first index of a given value in an array or -1 if not present. | [
"Gets",
"the",
"first",
"index",
"of",
"a",
"given",
"value",
"in",
"an",
"array",
"or",
"-",
"1",
"if",
"not",
"present",
"."
] | train | https://github.com/mgormley/prim/blob/5dce5e1ae94a9ae558a6262fc246e1a24f56686c/src/main/java/edu/jhu/prim/arrays/DoubleArrays.java#L514-L521 |
JDBDT/jdbdt | src/main/java/org/jdbdt/DBAssert.java | DBAssert.dataSetAssertion | static void dataSetAssertion(CallInfo callInfo, DataSet expected, DataSet actual) {
validateDataSetAssertion(expected, actual);
DataSource source = expected.getSource();
Delta delta = new Delta(expected, actual);
DataSetAssertion assertion = new DataSetAssertion(expected, delta);
source.getDB().log... | java | static void dataSetAssertion(CallInfo callInfo, DataSet expected, DataSet actual) {
validateDataSetAssertion(expected, actual);
DataSource source = expected.getSource();
Delta delta = new Delta(expected, actual);
DataSetAssertion assertion = new DataSetAssertion(expected, delta);
source.getDB().log... | [
"static",
"void",
"dataSetAssertion",
"(",
"CallInfo",
"callInfo",
",",
"DataSet",
"expected",
",",
"DataSet",
"actual",
")",
"{",
"validateDataSetAssertion",
"(",
"expected",
",",
"actual",
")",
";",
"DataSource",
"source",
"=",
"expected",
".",
"getSource",
"(... | Perform a data set assertion.
@param callInfo Call info.
@param expected Expected data.
@param actual Actual data.
@throws DBAssertionError If the assertion fails.
@throws InvalidOperationException If the arguments are invalid. | [
"Perform",
"a",
"data",
"set",
"assertion",
"."
] | train | https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/DBAssert.java#L113-L123 |
respoke/respoke-sdk-android | respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java | RespokeGroup.postGetGroupMembersError | private void postGetGroupMembersError(final GetGroupMembersCompletionListener completionListener, final String errorMessage) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != completionListener) {
com... | java | private void postGetGroupMembersError(final GetGroupMembersCompletionListener completionListener, final String errorMessage) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (null != completionListener) {
com... | [
"private",
"void",
"postGetGroupMembersError",
"(",
"final",
"GetGroupMembersCompletionListener",
"completionListener",
",",
"final",
"String",
"errorMessage",
")",
"{",
"new",
"Handler",
"(",
"Looper",
".",
"getMainLooper",
"(",
")",
")",
".",
"post",
"(",
"new",
... | A convenience method for posting errors to a GetGroupMembersCompletionListener
@param completionListener The listener to notify
@param errorMessage The human-readable error message that occurred | [
"A",
"convenience",
"method",
"for",
"posting",
"errors",
"to",
"a",
"GetGroupMembersCompletionListener"
] | train | https://github.com/respoke/respoke-sdk-android/blob/34a15f0558d29b1f1bc8481bbc5c505e855e05ef/respokeSDK/src/main/java/com/digium/respokesdk/RespokeGroup.java#L434-L443 |
jferard/fastods | fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java | OdsElements.addChildCellStyle | public void addChildCellStyle(final TableCellStyle style, final TableCell.Type type) {
this.contentElement.addChildCellStyle(style, type);
} | java | public void addChildCellStyle(final TableCellStyle style, final TableCell.Type type) {
this.contentElement.addChildCellStyle(style, type);
} | [
"public",
"void",
"addChildCellStyle",
"(",
"final",
"TableCellStyle",
"style",
",",
"final",
"TableCell",
".",
"Type",
"type",
")",
"{",
"this",
".",
"contentElement",
".",
"addChildCellStyle",
"(",
"style",
",",
"type",
")",
";",
"}"
] | Create an automatic style for this TableCellStyle and this type of cell.
Do not produce any effect if the type is Type.STRING or Type.VOID
@param style the style of the cell (color, data style, etc.)
@param type the type of the cell | [
"Create",
"an",
"automatic",
"style",
"for",
"this",
"TableCellStyle",
"and",
"this",
"type",
"of",
"cell",
".",
"Do",
"not",
"produce",
"any",
"effect",
"if",
"the",
"type",
"is",
"Type",
".",
"STRING",
"or",
"Type",
".",
"VOID"
] | train | https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/odselement/OdsElements.java#L127-L129 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaCommonEndpointActivation.java | SibRaCommonEndpointActivation.sessionError | @Override
void sessionError(SibRaMessagingEngineConnection connection, ConsumerSession session, Throwable throwable)
{
final String methodName = "sessionError";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
{
SibTr.entry(this, TRACE, methodName, new Obje... | java | @Override
void sessionError(SibRaMessagingEngineConnection connection, ConsumerSession session, Throwable throwable)
{
final String methodName = "sessionError";
if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
{
SibTr.entry(this, TRACE, methodName, new Obje... | [
"@",
"Override",
"void",
"sessionError",
"(",
"SibRaMessagingEngineConnection",
"connection",
",",
"ConsumerSession",
"session",
",",
"Throwable",
"throwable",
")",
"{",
"final",
"String",
"methodName",
"=",
"\"sessionError\"",
";",
"if",
"(",
"TraceComponent",
".",
... | A session error has occured on the connection, drop the connection and, if necessary,
try to create a new connection | [
"A",
"session",
"error",
"has",
"occured",
"on",
"the",
"connection",
"drop",
"the",
"connection",
"and",
"if",
"necessary",
"try",
"to",
"create",
"a",
"new",
"connection"
] | 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/SibRaCommonEndpointActivation.java#L1190-L1210 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java | ApiOvhDedicatedserver.serviceName_statistics_raid_unit_volume_volume_port_port_GET | public OvhRtmRaidVolumePort serviceName_statistics_raid_unit_volume_volume_port_port_GET(String serviceName, String unit, String volume, String port) throws IOException {
String qPath = "/dedicated/server/{serviceName}/statistics/raid/{unit}/volume/{volume}/port/{port}";
StringBuilder sb = path(qPath, serviceName, ... | java | public OvhRtmRaidVolumePort serviceName_statistics_raid_unit_volume_volume_port_port_GET(String serviceName, String unit, String volume, String port) throws IOException {
String qPath = "/dedicated/server/{serviceName}/statistics/raid/{unit}/volume/{volume}/port/{port}";
StringBuilder sb = path(qPath, serviceName, ... | [
"public",
"OvhRtmRaidVolumePort",
"serviceName_statistics_raid_unit_volume_volume_port_port_GET",
"(",
"String",
"serviceName",
",",
"String",
"unit",
",",
"String",
"volume",
",",
"String",
"port",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/dedicated/... | Get this object properties
REST: GET /dedicated/server/{serviceName}/statistics/raid/{unit}/volume/{volume}/port/{port}
@param serviceName [required] The internal name of your dedicated server
@param unit [required] Raid unit
@param volume [required] Raid volume name
@param port [required] Raid volume port | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1417-L1422 |
threerings/narya | core/src/main/java/com/threerings/presents/server/RebootManager.java | RebootManager.getRebootMessage | protected String getRebootMessage (String key, int minutes)
{
String msg = getCustomRebootMessage();
if (StringUtil.isBlank(msg)) {
msg = "m.reboot_msg_standard";
}
return MessageBundle.compose(key, MessageBundle.taint("" + minutes), msg);
} | java | protected String getRebootMessage (String key, int minutes)
{
String msg = getCustomRebootMessage();
if (StringUtil.isBlank(msg)) {
msg = "m.reboot_msg_standard";
}
return MessageBundle.compose(key, MessageBundle.taint("" + minutes), msg);
} | [
"protected",
"String",
"getRebootMessage",
"(",
"String",
"key",
",",
"int",
"minutes",
")",
"{",
"String",
"msg",
"=",
"getCustomRebootMessage",
"(",
")",
";",
"if",
"(",
"StringUtil",
".",
"isBlank",
"(",
"msg",
")",
")",
"{",
"msg",
"=",
"\"m.reboot_msg... | Composes the given reboot message with the minutes and either the custom or standard details
about the pending reboot. | [
"Composes",
"the",
"given",
"reboot",
"message",
"with",
"the",
"minutes",
"and",
"either",
"the",
"custom",
"or",
"standard",
"details",
"about",
"the",
"pending",
"reboot",
"."
] | train | https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/RebootManager.java#L256-L264 |
BorderTech/wcomponents | wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/SimpleTabs.java | SimpleTabs.addTab | public void addTab(final WComponent card, final String name) {
WContainer titledCard = new WContainer();
WText title = new WText("<b>[" + name + "]:</b><br/>");
title.setEncodeText(false);
titledCard.add(title);
titledCard.add(card);
deck.add(titledCard);
final TabButton button = new TabButton(name, tit... | java | public void addTab(final WComponent card, final String name) {
WContainer titledCard = new WContainer();
WText title = new WText("<b>[" + name + "]:</b><br/>");
title.setEncodeText(false);
titledCard.add(title);
titledCard.add(card);
deck.add(titledCard);
final TabButton button = new TabButton(name, tit... | [
"public",
"void",
"addTab",
"(",
"final",
"WComponent",
"card",
",",
"final",
"String",
"name",
")",
"{",
"WContainer",
"titledCard",
"=",
"new",
"WContainer",
"(",
")",
";",
"WText",
"title",
"=",
"new",
"WText",
"(",
"\"<b>[\"",
"+",
"name",
"+",
"\"]:... | Adds a tab.
@param card the tab content.
@param name the tab name. | [
"Adds",
"a",
"tab",
"."
] | train | https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/SimpleTabs.java#L46-L65 |
mygreen/xlsmapper | src/main/java/com/gh/mygreen/xlsmapper/XlsLoader.java | XlsLoader.loadMultiple | @SuppressWarnings("unchecked")
public <P> P[] loadMultiple(final InputStream xlsIn, final Class<P> clazz) throws XlsMapperException, IOException {
return loadMultipleDetail(xlsIn, clazz).getAll().stream()
.map(s -> s.getTarget())
.toArray(n -> (P[])Array.newInstance(cla... | java | @SuppressWarnings("unchecked")
public <P> P[] loadMultiple(final InputStream xlsIn, final Class<P> clazz) throws XlsMapperException, IOException {
return loadMultipleDetail(xlsIn, clazz).getAll().stream()
.map(s -> s.getTarget())
.toArray(n -> (P[])Array.newInstance(cla... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"P",
">",
"P",
"[",
"]",
"loadMultiple",
"(",
"final",
"InputStream",
"xlsIn",
",",
"final",
"Class",
"<",
"P",
">",
"clazz",
")",
"throws",
"XlsMapperException",
",",
"IOException",
"{",
"... | Excelファイルの複数シートを読み込み、任意のクラスにマップする。
<p>{@link XlsSheet#regex()}により、複数のシートが同じ形式で、同じクラスにマッピングすする際に使用します。</p>
@param <P> シートをマッピングするクラスタイプ
@param xlsIn 読み込み元のExcelファイルのストリーム。
@param clazz マッピング先のクラスタイプ。
@return マッピングした複数のシート。
{@link Configuration#isIgnoreSheetNotFound()}の値がtrueで、シートが見つからない場合、マッピング結果には含まれません。
@throws Illeg... | [
"Excelファイルの複数シートを読み込み、任意のクラスにマップする。",
"<p",
">",
"{",
"@link",
"XlsSheet#regex",
"()",
"}",
"により、複数のシートが同じ形式で、同じクラスにマッピングすする際に使用します。<",
"/",
"p",
">"
] | train | https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/XlsLoader.java#L154-L160 |
protostuff/protostuff | protostuff-xml/src/main/java/io/protostuff/XmlIOUtil.java | XmlIOUtil.writeTo | public static <T> void writeTo(Writer w, T message, Schema<T> schema)
throws IOException
{
writeTo(w, message, schema, DEFAULT_OUTPUT_FACTORY);
} | java | public static <T> void writeTo(Writer w, T message, Schema<T> schema)
throws IOException
{
writeTo(w, message, schema, DEFAULT_OUTPUT_FACTORY);
} | [
"public",
"static",
"<",
"T",
">",
"void",
"writeTo",
"(",
"Writer",
"w",
",",
"T",
"message",
",",
"Schema",
"<",
"T",
">",
"schema",
")",
"throws",
"IOException",
"{",
"writeTo",
"(",
"w",
",",
"message",
",",
"schema",
",",
"DEFAULT_OUTPUT_FACTORY",
... | Serializes the {@code message} into a {@link Writer} using the given {@code schema}. | [
"Serializes",
"the",
"{"
] | train | https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-xml/src/main/java/io/protostuff/XmlIOUtil.java#L399-L403 |
looly/hutool | hutool-db/src/main/java/cn/hutool/db/AbstractDb.java | AbstractDb.update | public int update(Entity record, Entity where) throws SQLException {
Connection conn = null;
try {
conn = this.getConnection();
return runner.update(conn, record, where);
} catch (SQLException e) {
throw e;
} finally {
this.closeConnection(conn);
}
} | java | public int update(Entity record, Entity where) throws SQLException {
Connection conn = null;
try {
conn = this.getConnection();
return runner.update(conn, record, where);
} catch (SQLException e) {
throw e;
} finally {
this.closeConnection(conn);
}
} | [
"public",
"int",
"update",
"(",
"Entity",
"record",
",",
"Entity",
"where",
")",
"throws",
"SQLException",
"{",
"Connection",
"conn",
"=",
"null",
";",
"try",
"{",
"conn",
"=",
"this",
".",
"getConnection",
"(",
")",
";",
"return",
"runner",
".",
"update... | 更新数据<br>
更新条件为多个key value对表示,默认key = value,如果使用其它条件可以使用:where.put("key", " > 1"),value也可以传Condition对象,key被忽略
@param record 记录
@param where 条件
@return 影响行数
@throws SQLException SQL执行异常 | [
"更新数据<br",
">",
"更新条件为多个key",
"value对表示,默认key",
"=",
"value,如果使用其它条件可以使用:where",
".",
"put",
"(",
"key",
">",
";",
"1",
")",
",value也可以传Condition对象,key被忽略"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/AbstractDb.java#L380-L390 |
ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/dptxlator/DPTXlatorDateTime.java | DPTXlatorDateTime.setDate | public final void setDate(int year, int month, int day)
{
set(data, 0, YEAR, year);
set(data, 0, MONTH, month);
set(data, 0, DAY, day);
} | java | public final void setDate(int year, int month, int day)
{
set(data, 0, YEAR, year);
set(data, 0, MONTH, month);
set(data, 0, DAY, day);
} | [
"public",
"final",
"void",
"setDate",
"(",
"int",
"year",
",",
"int",
"month",
",",
"int",
"day",
")",
"{",
"set",
"(",
"data",
",",
"0",
",",
"YEAR",
",",
"year",
")",
";",
"set",
"(",
"data",
",",
"0",
",",
"MONTH",
",",
"month",
")",
";",
... | Sets year, month and day of month information of the first date/time item.
<p>
This method does not reset other item data or discard other translation items.
@param year year value, 1900 <= year <= 2155
@param month month value, 1 <= month <= 12
@param day day value, 1 <= day <= 31 | [
"Sets",
"year",
"month",
"and",
"day",
"of",
"month",
"information",
"of",
"the",
"first",
"date",
"/",
"time",
"item",
".",
"<p",
">",
"This",
"method",
"does",
"not",
"reset",
"other",
"item",
"data",
"or",
"discard",
"other",
"translation",
"items",
"... | train | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/dptxlator/DPTXlatorDateTime.java#L300-L305 |
spotify/ssh-agent-proxy | src/main/java/com/spotify/sshagentproxy/AgentOutput.java | AgentOutput.signRequest | void signRequest(final RSAPublicKey rsaPublicKey, final byte[] data) throws IOException {
// TODO (dxia) Support more than just Rsa keys
final String keyType = Rsa.RSA_LABEL;
final byte[] publicExponent = rsaPublicKey.getPublicExponent().toByteArray();
final byte[] modulus = rsaPublicKey.getModulus().to... | java | void signRequest(final RSAPublicKey rsaPublicKey, final byte[] data) throws IOException {
// TODO (dxia) Support more than just Rsa keys
final String keyType = Rsa.RSA_LABEL;
final byte[] publicExponent = rsaPublicKey.getPublicExponent().toByteArray();
final byte[] modulus = rsaPublicKey.getModulus().to... | [
"void",
"signRequest",
"(",
"final",
"RSAPublicKey",
"rsaPublicKey",
",",
"final",
"byte",
"[",
"]",
"data",
")",
"throws",
"IOException",
"{",
"// TODO (dxia) Support more than just Rsa keys",
"final",
"String",
"keyType",
"=",
"Rsa",
".",
"RSA_LABEL",
";",
"final"... | Send a SSH2_AGENTC_SIGN_REQUEST message to ssh-agent.
@param rsaPublicKey The {@link RSAPublicKey} that tells ssh-agent which private key to use to
sign the data.
@param data The data in bytes to be signed. | [
"Send",
"a",
"SSH2_AGENTC_SIGN_REQUEST",
"message",
"to",
"ssh",
"-",
"agent",
"."
] | train | https://github.com/spotify/ssh-agent-proxy/blob/b678792750c0157bd5ed3fb6a18895ff95effbc4/src/main/java/com/spotify/sshagentproxy/AgentOutput.java#L113-L167 |
alibaba/jstorm | jstorm-core/src/main/java/backtype/storm/topology/TopologyBuilder.java | TopologyBuilder.setBolt | public BoltDeclarer setBolt(String id, IBasicBolt bolt, Number parallelism_hint) throws IllegalArgumentException {
return setBolt(id, new BasicBoltExecutor(bolt), parallelism_hint);
} | java | public BoltDeclarer setBolt(String id, IBasicBolt bolt, Number parallelism_hint) throws IllegalArgumentException {
return setBolt(id, new BasicBoltExecutor(bolt), parallelism_hint);
} | [
"public",
"BoltDeclarer",
"setBolt",
"(",
"String",
"id",
",",
"IBasicBolt",
"bolt",
",",
"Number",
"parallelism_hint",
")",
"throws",
"IllegalArgumentException",
"{",
"return",
"setBolt",
"(",
"id",
",",
"new",
"BasicBoltExecutor",
"(",
"bolt",
")",
",",
"paral... | Define a new bolt in this topology. This defines a basic bolt, which is a
simpler to use but more restricted kind of bolt. Basic bolts are intended
for non-aggregation processing and automate the anchoring/acking process to
achieve proper reliability in the topology.
@param id the id of this component. This id is refe... | [
"Define",
"a",
"new",
"bolt",
"in",
"this",
"topology",
".",
"This",
"defines",
"a",
"basic",
"bolt",
"which",
"is",
"a",
"simpler",
"to",
"use",
"but",
"more",
"restricted",
"kind",
"of",
"bolt",
".",
"Basic",
"bolts",
"are",
"intended",
"for",
"non",
... | train | https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/topology/TopologyBuilder.java#L220-L222 |
Azure/azure-sdk-for-java | appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/ResourceHealthMetadatasInner.java | ResourceHealthMetadatasInner.listBySiteSlotWithServiceResponseAsync | public Observable<ServiceResponse<Page<ResourceHealthMetadataInner>>> listBySiteSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) {
return listBySiteSlotSinglePageAsync(resourceGroupName, name, slot)
.concatMap(new Func1<ServiceResponse<Page<ResourceH... | java | public Observable<ServiceResponse<Page<ResourceHealthMetadataInner>>> listBySiteSlotWithServiceResponseAsync(final String resourceGroupName, final String name, final String slot) {
return listBySiteSlotSinglePageAsync(resourceGroupName, name, slot)
.concatMap(new Func1<ServiceResponse<Page<ResourceH... | [
"public",
"Observable",
"<",
"ServiceResponse",
"<",
"Page",
"<",
"ResourceHealthMetadataInner",
">",
">",
">",
"listBySiteSlotWithServiceResponseAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"name",
",",
"final",
"String",
"slot",
")",
... | Gets the category of ResourceHealthMetadata to use for the given site as a collection.
Gets the category of ResourceHealthMetadata to use for the given site as a collection.
@param resourceGroupName Name of the resource group to which the resource belongs.
@param name Name of web app.
@param slot Name of web app slot.... | [
"Gets",
"the",
"category",
"of",
"ResourceHealthMetadata",
"to",
"use",
"for",
"the",
"given",
"site",
"as",
"a",
"collection",
".",
"Gets",
"the",
"category",
"of",
"ResourceHealthMetadata",
"to",
"use",
"for",
"the",
"given",
"site",
"as",
"a",
"collection",... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/ResourceHealthMetadatasInner.java#L628-L640 |
stratosphere/stratosphere | stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobgraph/JobGraph.java | JobGraph.collectVertices | private void collectVertices(final AbstractJobVertex jv, final List<AbstractJobVertex> collector) {
if (jv == null) {
final Iterator<AbstractJobInputVertex> iter = getInputVertices();
while (iter.hasNext()) {
collectVertices(iter.next(), collector);
}
} else {
if (!collector.contains(jv)) {
co... | java | private void collectVertices(final AbstractJobVertex jv, final List<AbstractJobVertex> collector) {
if (jv == null) {
final Iterator<AbstractJobInputVertex> iter = getInputVertices();
while (iter.hasNext()) {
collectVertices(iter.next(), collector);
}
} else {
if (!collector.contains(jv)) {
co... | [
"private",
"void",
"collectVertices",
"(",
"final",
"AbstractJobVertex",
"jv",
",",
"final",
"List",
"<",
"AbstractJobVertex",
">",
"collector",
")",
"{",
"if",
"(",
"jv",
"==",
"null",
")",
"{",
"final",
"Iterator",
"<",
"AbstractJobInputVertex",
">",
"iter",... | Auxiliary method to collect all vertices which are reachable from the input vertices.
@param jv
the currently considered job vertex
@param collector
a temporary list to store the vertices that have already been visisted | [
"Auxiliary",
"method",
"to",
"collect",
"all",
"vertices",
"which",
"are",
"reachable",
"from",
"the",
"input",
"vertices",
"."
] | train | https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobgraph/JobGraph.java#L304-L323 |
voldemort/voldemort | src/java/voldemort/client/rebalance/RebalancePlan.java | RebalancePlan.storageOverhead | private String storageOverhead(Map<Integer, Integer> finalNodeToOverhead) {
double maxOverhead = Double.MIN_VALUE;
PartitionBalance pb = new PartitionBalance(currentCluster, currentStoreDefs);
StringBuilder sb = new StringBuilder();
sb.append("Per-node store-overhead:").append(Utils.NEWL... | java | private String storageOverhead(Map<Integer, Integer> finalNodeToOverhead) {
double maxOverhead = Double.MIN_VALUE;
PartitionBalance pb = new PartitionBalance(currentCluster, currentStoreDefs);
StringBuilder sb = new StringBuilder();
sb.append("Per-node store-overhead:").append(Utils.NEWL... | [
"private",
"String",
"storageOverhead",
"(",
"Map",
"<",
"Integer",
",",
"Integer",
">",
"finalNodeToOverhead",
")",
"{",
"double",
"maxOverhead",
"=",
"Double",
".",
"MIN_VALUE",
";",
"PartitionBalance",
"pb",
"=",
"new",
"PartitionBalance",
"(",
"currentCluster"... | Determines storage overhead and returns pretty printed summary.
@param finalNodeToOverhead Map of node IDs from final cluster to number
of partition-stores to be moved to the node.
@return pretty printed string summary of storage overhead. | [
"Determines",
"storage",
"overhead",
"and",
"returns",
"pretty",
"printed",
"summary",
"."
] | train | https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/client/rebalance/RebalancePlan.java#L235-L267 |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/MergeRequestApi.java | MergeRequestApi.acceptMergeRequest | public MergeRequest acceptMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
return (acceptMergeRequest(projectIdOrPath, mergeRequestIid, null, null, null, null));
} | java | public MergeRequest acceptMergeRequest(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException {
return (acceptMergeRequest(projectIdOrPath, mergeRequestIid, null, null, null, null));
} | [
"public",
"MergeRequest",
"acceptMergeRequest",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"acceptMergeRequest",
"(",
"projectIdOrPath",
",",
"mergeRequestIid",
",",
"null",
",",
"null",
... | Merge changes to the merge request. If the MR has any conflicts and can not be merged,
you'll get a 405 and the error message 'Branch cannot be merged'. If merge request is
already merged or closed, you'll get a 406 and the error message 'Method Not Allowed'.
If the sha parameter is passed and does not match the HEAD o... | [
"Merge",
"changes",
"to",
"the",
"merge",
"request",
".",
"If",
"the",
"MR",
"has",
"any",
"conflicts",
"and",
"can",
"not",
"be",
"merged",
"you",
"ll",
"get",
"a",
"405",
"and",
"the",
"error",
"message",
"Branch",
"cannot",
"be",
"merged",
".",
"If"... | train | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L585-L587 |
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor | MapCore/src/main/java/org/wwarn/mapcore/client/components/customwidgets/map/MapBuilder.java | MapBuilder.configureMapDimension | public MapBuilder configureMapDimension(Integer width, Integer height) {
this.mapHeight = height;
this.mapWidth = width;
return this;
} | java | public MapBuilder configureMapDimension(Integer width, Integer height) {
this.mapHeight = height;
this.mapWidth = width;
return this;
} | [
"public",
"MapBuilder",
"configureMapDimension",
"(",
"Integer",
"width",
",",
"Integer",
"height",
")",
"{",
"this",
".",
"mapHeight",
"=",
"height",
";",
"this",
".",
"mapWidth",
"=",
"width",
";",
"return",
"this",
";",
"}"
] | Setup map display properties
@param width value in px
@param height value in px | [
"Setup",
"map",
"display",
"properties"
] | train | https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/MapCore/src/main/java/org/wwarn/mapcore/client/components/customwidgets/map/MapBuilder.java#L100-L104 |
apereo/cas | core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/util/CoreTicketUtils.java | CoreTicketUtils.newTicketRegistryCipherExecutor | public static CipherExecutor newTicketRegistryCipherExecutor(final EncryptionRandomizedSigningJwtCryptographyProperties registry,
final String registryName) {
return newTicketRegistryCipherExecutor(registry, false, registryName);
} | java | public static CipherExecutor newTicketRegistryCipherExecutor(final EncryptionRandomizedSigningJwtCryptographyProperties registry,
final String registryName) {
return newTicketRegistryCipherExecutor(registry, false, registryName);
} | [
"public",
"static",
"CipherExecutor",
"newTicketRegistryCipherExecutor",
"(",
"final",
"EncryptionRandomizedSigningJwtCryptographyProperties",
"registry",
",",
"final",
"String",
"registryName",
")",
"{",
"return",
"newTicketRegistryCipherExecutor",
"(",
"registry",
",",
"false... | New ticket registry cipher executor cipher executor.
@param registry the registry
@param registryName the registry name
@return the cipher executor | [
"New",
"ticket",
"registry",
"cipher",
"executor",
"cipher",
"executor",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/util/CoreTicketUtils.java#L29-L32 |
ehcache/ehcache3 | impl/src/main/java/org/ehcache/config/builders/CacheConfigurationBuilder.java | CacheConfigurationBuilder.withValueCopier | public CacheConfigurationBuilder<K, V> withValueCopier(Class<? extends Copier<V>> valueCopierClass) {
return withCopier(new DefaultCopierConfiguration<>(requireNonNull(valueCopierClass, "Null value copier class"), DefaultCopierConfiguration.Type.VALUE));
} | java | public CacheConfigurationBuilder<K, V> withValueCopier(Class<? extends Copier<V>> valueCopierClass) {
return withCopier(new DefaultCopierConfiguration<>(requireNonNull(valueCopierClass, "Null value copier class"), DefaultCopierConfiguration.Type.VALUE));
} | [
"public",
"CacheConfigurationBuilder",
"<",
"K",
",",
"V",
">",
"withValueCopier",
"(",
"Class",
"<",
"?",
"extends",
"Copier",
"<",
"V",
">",
">",
"valueCopierClass",
")",
"{",
"return",
"withCopier",
"(",
"new",
"DefaultCopierConfiguration",
"<>",
"(",
"requ... | Adds by-value semantic using the provided {@link Copier} class for the value on heap.
<p>
{@link Copier}s are what enable control of by-reference / by-value semantics for on-heap tier.
@param valueCopierClass the value copier class to use
@return a new builder with the added value copier | [
"Adds",
"by",
"-",
"value",
"semantic",
"using",
"the",
"provided",
"{",
"@link",
"Copier",
"}",
"class",
"for",
"the",
"value",
"on",
"heap",
".",
"<p",
">",
"{",
"@link",
"Copier",
"}",
"s",
"are",
"what",
"enable",
"control",
"of",
"by",
"-",
"ref... | train | https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/config/builders/CacheConfigurationBuilder.java#L444-L446 |
aws/aws-sdk-java | aws-java-sdk-core/src/main/java/com/amazonaws/event/ProgressInputStream.java | ProgressInputStream.inputStreamForResponse | public static InputStream inputStreamForResponse(InputStream is, AmazonWebServiceRequest req) {
return req == null
? is
: new ResponseProgressInputStream(is, req.getGeneralProgressListener());
} | java | public static InputStream inputStreamForResponse(InputStream is, AmazonWebServiceRequest req) {
return req == null
? is
: new ResponseProgressInputStream(is, req.getGeneralProgressListener());
} | [
"public",
"static",
"InputStream",
"inputStreamForResponse",
"(",
"InputStream",
"is",
",",
"AmazonWebServiceRequest",
"req",
")",
"{",
"return",
"req",
"==",
"null",
"?",
"is",
":",
"new",
"ResponseProgressInputStream",
"(",
"is",
",",
"req",
".",
"getGeneralProg... | Returns an input stream for response progress tracking purposes. If
request/response progress tracking is not enabled, this method simply
return the given input stream as is.
@param is the response content input stream | [
"Returns",
"an",
"input",
"stream",
"for",
"response",
"progress",
"tracking",
"purposes",
".",
"If",
"request",
"/",
"response",
"progress",
"tracking",
"is",
"not",
"enabled",
"this",
"method",
"simply",
"return",
"the",
"given",
"input",
"stream",
"as",
"is... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/event/ProgressInputStream.java#L66-L70 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Trie2Writable.java | Trie2Writable.getDataBlock | private int getDataBlock(int c, boolean forLSCP) {
int i2, oldBlock, newBlock;
i2=getIndex2Block(c, forLSCP);
i2+=(c>>UTRIE2_SHIFT_2)&UTRIE2_INDEX_2_MASK;
oldBlock=index2[i2];
if(isWritableBlock(oldBlock)) {
return oldBlock;
}
/* allocate a ... | java | private int getDataBlock(int c, boolean forLSCP) {
int i2, oldBlock, newBlock;
i2=getIndex2Block(c, forLSCP);
i2+=(c>>UTRIE2_SHIFT_2)&UTRIE2_INDEX_2_MASK;
oldBlock=index2[i2];
if(isWritableBlock(oldBlock)) {
return oldBlock;
}
/* allocate a ... | [
"private",
"int",
"getDataBlock",
"(",
"int",
"c",
",",
"boolean",
"forLSCP",
")",
"{",
"int",
"i2",
",",
"oldBlock",
",",
"newBlock",
";",
"i2",
"=",
"getIndex2Block",
"(",
"c",
",",
"forLSCP",
")",
";",
"i2",
"+=",
"(",
"c",
">>",
"UTRIE2_SHIFT_2",
... | No error checking for illegal arguments.
@hide draft / provisional / internal are hidden on Android | [
"No",
"error",
"checking",
"for",
"illegal",
"arguments",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Trie2Writable.java#L273-L288 |
lessthanoptimal/ejml | main/ejml-zdense/src/org/ejml/dense/row/MatrixFeatures_ZDRM.java | MatrixFeatures_ZDRM.isLowerTriangle | public static boolean isLowerTriangle(ZMatrixRMaj A , int hessenberg , double tol ) {
tol *= tol;
for( int i = 0; i < A.numRows-hessenberg-1; i++ ) {
for( int j = i+hessenberg+1; j < A.numCols; j++ ) {
int index = (i*A.numCols+j)*2;
double real = A.data[index... | java | public static boolean isLowerTriangle(ZMatrixRMaj A , int hessenberg , double tol ) {
tol *= tol;
for( int i = 0; i < A.numRows-hessenberg-1; i++ ) {
for( int j = i+hessenberg+1; j < A.numCols; j++ ) {
int index = (i*A.numCols+j)*2;
double real = A.data[index... | [
"public",
"static",
"boolean",
"isLowerTriangle",
"(",
"ZMatrixRMaj",
"A",
",",
"int",
"hessenberg",
",",
"double",
"tol",
")",
"{",
"tol",
"*=",
"tol",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"A",
".",
"numRows",
"-",
"hessenberg",
"-"... | <p>
Checks to see if a matrix is lower triangular or Hessenberg. A Hessenberg matrix of degree N
has the following property:<br>
<br>
a<sub>ij</sub> ≤ 0 for all i < j+N<br>
<br>
A triangular matrix is a Hessenberg matrix of degree 0.
</p>
@param A Matrix being tested. Not modified.
@param hessenberg The degree o... | [
"<p",
">",
"Checks",
"to",
"see",
"if",
"a",
"matrix",
"is",
"lower",
"triangular",
"or",
"Hessenberg",
".",
"A",
"Hessenberg",
"matrix",
"of",
"degree",
"N",
"has",
"the",
"following",
"property",
":",
"<br",
">",
"<br",
">",
"a<sub",
">",
"ij<",
"/",... | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/MatrixFeatures_ZDRM.java#L399-L415 |
buschmais/jqa-maven-plugin | src/main/java/com/buschmais/jqassistant/scm/maven/AbstractProjectMojo.java | AbstractProjectMojo.isLastModuleInProject | private boolean isLastModuleInProject(Set<MavenProject> executedModules, List<MavenProject> projectModules) {
Set<MavenProject> remainingModules = new HashSet<>();
if (execution.getPlugin().getExecutions().isEmpty()) {
getLog().debug("No configured executions found, assuming CLI invocation."... | java | private boolean isLastModuleInProject(Set<MavenProject> executedModules, List<MavenProject> projectModules) {
Set<MavenProject> remainingModules = new HashSet<>();
if (execution.getPlugin().getExecutions().isEmpty()) {
getLog().debug("No configured executions found, assuming CLI invocation."... | [
"private",
"boolean",
"isLastModuleInProject",
"(",
"Set",
"<",
"MavenProject",
">",
"executedModules",
",",
"List",
"<",
"MavenProject",
">",
"projectModules",
")",
"{",
"Set",
"<",
"MavenProject",
">",
"remainingModules",
"=",
"new",
"HashSet",
"<>",
"(",
")",... | Determines if the last module for a project is currently executed.
@param projectModules The modules of the project.
@return <code>true</code> if the current module is the last of the project. | [
"Determines",
"if",
"the",
"last",
"module",
"for",
"a",
"project",
"is",
"currently",
"executed",
"."
] | train | https://github.com/buschmais/jqa-maven-plugin/blob/5c21a8058fc1b013333081907fbf00d3525e11c3/src/main/java/com/buschmais/jqassistant/scm/maven/AbstractProjectMojo.java#L45-L73 |
VoltDB/voltdb | src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java | JDBC4DatabaseMetaData.getSuperTables | @Override
public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException
{
checkClosed();
throw SQLError.noSupport();
} | java | @Override
public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException
{
checkClosed();
throw SQLError.noSupport();
} | [
"@",
"Override",
"public",
"ResultSet",
"getSuperTables",
"(",
"String",
"catalog",
",",
"String",
"schemaPattern",
",",
"String",
"tableNamePattern",
")",
"throws",
"SQLException",
"{",
"checkClosed",
"(",
")",
";",
"throw",
"SQLError",
".",
"noSupport",
"(",
"... | Retrieves a description of the table hierarchies defined in a particular schema in this database. | [
"Retrieves",
"a",
"description",
"of",
"the",
"table",
"hierarchies",
"defined",
"in",
"a",
"particular",
"schema",
"in",
"this",
"database",
"."
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L764-L769 |
lestard/advanced-bindings | src/main/java/eu/lestard/advanced_bindings/api/MathBindings.java | MathBindings.floorMod | public static IntegerBinding floorMod(final ObservableIntegerValue x, final ObservableIntegerValue y) {
return createIntegerBinding(() -> Math.floorMod(x.get(), y.get()), x, y);
} | java | public static IntegerBinding floorMod(final ObservableIntegerValue x, final ObservableIntegerValue y) {
return createIntegerBinding(() -> Math.floorMod(x.get(), y.get()), x, y);
} | [
"public",
"static",
"IntegerBinding",
"floorMod",
"(",
"final",
"ObservableIntegerValue",
"x",
",",
"final",
"ObservableIntegerValue",
"y",
")",
"{",
"return",
"createIntegerBinding",
"(",
"(",
")",
"->",
"Math",
".",
"floorMod",
"(",
"x",
".",
"get",
"(",
")"... | Binding for {@link java.lang.Math#floorMod(int, int)}
@param x the dividend
@param y the divisor
@return the floor modulus {@code x - (floorDiv(x, y) * y)}
@throws ArithmeticException if the divisor {@code y} is zero | [
"Binding",
"for",
"{",
"@link",
"java",
".",
"lang",
".",
"Math#floorMod",
"(",
"int",
"int",
")",
"}"
] | train | https://github.com/lestard/advanced-bindings/blob/054a5dde261c29f862b971765fa3da3704a13ab4/src/main/java/eu/lestard/advanced_bindings/api/MathBindings.java#L493-L495 |
duracloud/duracloud | snapshotstorageprovider/src/main/java/org/duracloud/snapshottask/snapshot/RequestRestoreSnapshotTaskRunner.java | RequestRestoreSnapshotTaskRunner.buildBridgeBody | protected String buildBridgeBody(String snapshotId,
String userEmail) {
RequestRestoreBridgeParameters bridgeParams =
new RequestRestoreBridgeParameters(dcHost, dcPort, dcStoreId, snapshotId, userEmail);
return bridgeParams.serialize();
} | java | protected String buildBridgeBody(String snapshotId,
String userEmail) {
RequestRestoreBridgeParameters bridgeParams =
new RequestRestoreBridgeParameters(dcHost, dcPort, dcStoreId, snapshotId, userEmail);
return bridgeParams.serialize();
} | [
"protected",
"String",
"buildBridgeBody",
"(",
"String",
"snapshotId",
",",
"String",
"userEmail",
")",
"{",
"RequestRestoreBridgeParameters",
"bridgeParams",
"=",
"new",
"RequestRestoreBridgeParameters",
"(",
"dcHost",
",",
"dcPort",
",",
"dcStoreId",
",",
"snapshotId"... | /*
Creates the body of the request that will be sent to the bridge app | [
"/",
"*",
"Creates",
"the",
"body",
"of",
"the",
"request",
"that",
"will",
"be",
"sent",
"to",
"the",
"bridge",
"app"
] | train | https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/snapshotstorageprovider/src/main/java/org/duracloud/snapshottask/snapshot/RequestRestoreSnapshotTaskRunner.java#L112-L117 |
virgo47/javasimon | jdbc41/src/main/java/org/javasimon/jdbc4/SimonConnectionConfiguration.java | SimonConnectionConfiguration.getProperty | private static String getProperty(String driverId, String propertyName) {
String propertyValue = PROPERTIES.getProperty(DEFAULT_PREFIX + "." + driverId + "." + propertyName);
if (propertyValue != null) {
propertyValue = propertyValue.trim();
if (propertyValue.isEmpty()) {
propertyValue = null;
}
}
... | java | private static String getProperty(String driverId, String propertyName) {
String propertyValue = PROPERTIES.getProperty(DEFAULT_PREFIX + "." + driverId + "." + propertyName);
if (propertyValue != null) {
propertyValue = propertyValue.trim();
if (propertyValue.isEmpty()) {
propertyValue = null;
}
}
... | [
"private",
"static",
"String",
"getProperty",
"(",
"String",
"driverId",
",",
"String",
"propertyName",
")",
"{",
"String",
"propertyValue",
"=",
"PROPERTIES",
".",
"getProperty",
"(",
"DEFAULT_PREFIX",
"+",
"\".\"",
"+",
"driverId",
"+",
"\".\"",
"+",
"property... | Gets value of the specified property.
@param driverId Driver Id
@param propertyName Property name
@return property value or {@code null} | [
"Gets",
"value",
"of",
"the",
"specified",
"property",
"."
] | train | https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/jdbc41/src/main/java/org/javasimon/jdbc4/SimonConnectionConfiguration.java#L156-L165 |
raydac/java-binary-block-parser | jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPTextWriter.java | JBBPTextWriter.Double | public JBBPTextWriter Double(final double[] values, int off, int len) throws IOException {
while (len-- > 0) {
this.Double(values[off++]);
}
return this;
} | java | public JBBPTextWriter Double(final double[] values, int off, int len) throws IOException {
while (len-- > 0) {
this.Double(values[off++]);
}
return this;
} | [
"public",
"JBBPTextWriter",
"Double",
"(",
"final",
"double",
"[",
"]",
"values",
",",
"int",
"off",
",",
"int",
"len",
")",
"throws",
"IOException",
"{",
"while",
"(",
"len",
"--",
">",
"0",
")",
"{",
"this",
".",
"Double",
"(",
"values",
"[",
"off"... | Print values from double array
@param values double value array, must not be null
@param off offset to the first element
@param len number of elements to print
@return the context
@throws IOException it will be thrown for transport error
@since 1.4.0 | [
"Print",
"values",
"from",
"double",
"array"
] | train | https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPTextWriter.java#L991-L996 |
ManfredTremmel/gwt-bean-validators | mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/impl/EmptyIfOtherHasValueValidator.java | EmptyIfOtherHasValueValidator.isValid | @Override
public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) {
if (pvalue == null) {
return true;
}
try {
final String fieldCheckValue =
BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, fieldCheckName);
final String fieldCompare... | java | @Override
public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) {
if (pvalue == null) {
return true;
}
try {
final String fieldCheckValue =
BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, fieldCheckName);
final String fieldCompare... | [
"@",
"Override",
"public",
"final",
"boolean",
"isValid",
"(",
"final",
"Object",
"pvalue",
",",
"final",
"ConstraintValidatorContext",
"pcontext",
")",
"{",
"if",
"(",
"pvalue",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"try",
"{",
"final",
"Str... | {@inheritDoc} check if given object is valid.
@see javax.validation.ConstraintValidator#isValid(Object,
javax.validation.ConstraintValidatorContext) | [
"{",
"@inheritDoc",
"}",
"check",
"if",
"given",
"object",
"is",
"valid",
"."
] | train | https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/impl/EmptyIfOtherHasValueValidator.java#L72-L92 |
ogaclejapan/SmartTabLayout | utils-v4/src/main/java/com/ogaclejapan/smarttablayout/utils/v4/Bundler.java | Bundler.putCharSequenceArray | @TargetApi(8)
public Bundler putCharSequenceArray(String key, CharSequence[] value) {
bundle.putCharSequenceArray(key, value);
return this;
} | java | @TargetApi(8)
public Bundler putCharSequenceArray(String key, CharSequence[] value) {
bundle.putCharSequenceArray(key, value);
return this;
} | [
"@",
"TargetApi",
"(",
"8",
")",
"public",
"Bundler",
"putCharSequenceArray",
"(",
"String",
"key",
",",
"CharSequence",
"[",
"]",
"value",
")",
"{",
"bundle",
".",
"putCharSequenceArray",
"(",
"key",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Inserts a CharSequence array value into the mapping of this Bundle, replacing
any existing value for the given key. Either key or value may be null.
@param key a String, or null
@param value a CharSequence array object, or null
@return this | [
"Inserts",
"a",
"CharSequence",
"array",
"value",
"into",
"the",
"mapping",
"of",
"this",
"Bundle",
"replacing",
"any",
"existing",
"value",
"for",
"the",
"given",
"key",
".",
"Either",
"key",
"or",
"value",
"may",
"be",
"null",
"."
] | train | https://github.com/ogaclejapan/SmartTabLayout/blob/712e81a92f1e12a3c33dcbda03d813e0162e8589/utils-v4/src/main/java/com/ogaclejapan/smarttablayout/utils/v4/Bundler.java#L330-L334 |
ThreeTen/threetenbp | src/main/java/org/threeten/bp/jdk8/Jdk8Methods.java | Jdk8Methods.safeAdd | public static int safeAdd(int a, int b) {
int sum = a + b;
// check for a change of sign in the result when the inputs have the same sign
if ((a ^ sum) < 0 && (a ^ b) >= 0) {
throw new ArithmeticException("Addition overflows an int: " + a + " + " + b);
}
return sum;
... | java | public static int safeAdd(int a, int b) {
int sum = a + b;
// check for a change of sign in the result when the inputs have the same sign
if ((a ^ sum) < 0 && (a ^ b) >= 0) {
throw new ArithmeticException("Addition overflows an int: " + a + " + " + b);
}
return sum;
... | [
"public",
"static",
"int",
"safeAdd",
"(",
"int",
"a",
",",
"int",
"b",
")",
"{",
"int",
"sum",
"=",
"a",
"+",
"b",
";",
"// check for a change of sign in the result when the inputs have the same sign",
"if",
"(",
"(",
"a",
"^",
"sum",
")",
"<",
"0",
"&&",
... | Safely adds two int values.
@param a the first value
@param b the second value
@return the result
@throws ArithmeticException if the result overflows an int | [
"Safely",
"adds",
"two",
"int",
"values",
"."
] | train | https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/jdk8/Jdk8Methods.java#L145-L152 |
tango-controls/JTango | client/src/main/java/fr/soleil/tango/clientapi/TangoCommand.java | TangoCommand.executeExtractList | public <T> List<T> executeExtractList(final Class<T> clazz, final Object... value) throws DevFailed {
final Object result = command.executeExtract(value);
return extractList(TypeConversionUtil.castToArray(clazz, result));
} | java | public <T> List<T> executeExtractList(final Class<T> clazz, final Object... value) throws DevFailed {
final Object result = command.executeExtract(value);
return extractList(TypeConversionUtil.castToArray(clazz, result));
} | [
"public",
"<",
"T",
">",
"List",
"<",
"T",
">",
"executeExtractList",
"(",
"final",
"Class",
"<",
"T",
">",
"clazz",
",",
"final",
"Object",
"...",
"value",
")",
"throws",
"DevFailed",
"{",
"final",
"Object",
"result",
"=",
"command",
".",
"executeExtrac... | Execute a command with argin which is an array
@param <T>
@param clazz
@param value
@return
@throws DevFailed | [
"Execute",
"a",
"command",
"with",
"argin",
"which",
"is",
"an",
"array"
] | train | https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/fr/soleil/tango/clientapi/TangoCommand.java#L204-L207 |
Azure/azure-sdk-for-java | mixedreality/resource-manager/v2019_02_28_preview/src/main/java/com/microsoft/azure/management/mixedreality/v2019_02_28_preview/implementation/SpatialAnchorsAccountsInner.java | SpatialAnchorsAccountsInner.update | public SpatialAnchorsAccountInner update(String resourceGroupName, String spatialAnchorsAccountName, SpatialAnchorsAccountInner spatialAnchorsAccount) {
return updateWithServiceResponseAsync(resourceGroupName, spatialAnchorsAccountName, spatialAnchorsAccount).toBlocking().single().body();
} | java | public SpatialAnchorsAccountInner update(String resourceGroupName, String spatialAnchorsAccountName, SpatialAnchorsAccountInner spatialAnchorsAccount) {
return updateWithServiceResponseAsync(resourceGroupName, spatialAnchorsAccountName, spatialAnchorsAccount).toBlocking().single().body();
} | [
"public",
"SpatialAnchorsAccountInner",
"update",
"(",
"String",
"resourceGroupName",
",",
"String",
"spatialAnchorsAccountName",
",",
"SpatialAnchorsAccountInner",
"spatialAnchorsAccount",
")",
"{",
"return",
"updateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"sp... | Updating a Spatial Anchors Account.
@param resourceGroupName Name of an Azure resource group.
@param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account.
@param spatialAnchorsAccount Spatial Anchors Account parameter.
@throws IllegalArgumentException thrown if parameters fail the validation
@thr... | [
"Updating",
"a",
"Spatial",
"Anchors",
"Account",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mixedreality/resource-manager/v2019_02_28_preview/src/main/java/com/microsoft/azure/management/mixedreality/v2019_02_28_preview/implementation/SpatialAnchorsAccountsInner.java#L517-L519 |
apache/incubator-gobblin | gobblin-service/src/main/java/org/apache/gobblin/service/modules/template/StaticFlowTemplate.java | StaticFlowTemplate.isResolvable | @Override
public boolean isResolvable(Config userConfig, DatasetDescriptor inputDescriptor, DatasetDescriptor outputDescriptor)
throws SpecNotFoundException, JobTemplate.TemplateException {
Config inputDescriptorConfig = inputDescriptor.getRawConfig().atPath(DatasetDescriptorConfigKeys.FLOW_EDGE_INPUT_DATAS... | java | @Override
public boolean isResolvable(Config userConfig, DatasetDescriptor inputDescriptor, DatasetDescriptor outputDescriptor)
throws SpecNotFoundException, JobTemplate.TemplateException {
Config inputDescriptorConfig = inputDescriptor.getRawConfig().atPath(DatasetDescriptorConfigKeys.FLOW_EDGE_INPUT_DATAS... | [
"@",
"Override",
"public",
"boolean",
"isResolvable",
"(",
"Config",
"userConfig",
",",
"DatasetDescriptor",
"inputDescriptor",
",",
"DatasetDescriptor",
"outputDescriptor",
")",
"throws",
"SpecNotFoundException",
",",
"JobTemplate",
".",
"TemplateException",
"{",
"Config... | Checks if the {@link FlowTemplate} is resolvable using the provided {@link Config} object. A {@link FlowTemplate}
is resolvable only if each of the {@link JobTemplate}s in the flow is resolvable
@param userConfig User supplied Config
@return true if the {@link FlowTemplate} is resolvable | [
"Checks",
"if",
"the",
"{"
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/template/StaticFlowTemplate.java#L155-L171 |
andrehertwig/admintool | admin-tools-log4j2/src/main/java/de/chandre/admintool/log4j2/AdminToolLog4j2Util.java | AdminToolLog4j2Util.changeLogger | public void changeLogger(final String name, final String levelStr, boolean parent) throws IllegalArgumentException
{
Level level = getLevel(levelStr);
changeLogger(name, level, parent);
} | java | public void changeLogger(final String name, final String levelStr, boolean parent) throws IllegalArgumentException
{
Level level = getLevel(levelStr);
changeLogger(name, level, parent);
} | [
"public",
"void",
"changeLogger",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"levelStr",
",",
"boolean",
"parent",
")",
"throws",
"IllegalArgumentException",
"{",
"Level",
"level",
"=",
"getLevel",
"(",
"levelStr",
")",
";",
"changeLogger",
"(",
"... | changes the level of an logger
@param name logger name
@param levelStr level as string
@param parent if the logger is a parent logger
@throws IllegalArgumentException | [
"changes",
"the",
"level",
"of",
"an",
"logger"
] | train | https://github.com/andrehertwig/admintool/blob/6d391e2d26969b70e3ccabfc34202abe8d915080/admin-tools-log4j2/src/main/java/de/chandre/admintool/log4j2/AdminToolLog4j2Util.java#L215-L219 |
calimero-project/calimero-core | src/tuwien/auto/calimero/mgmt/TransportLayerImpl.java | TransportLayerImpl.createDestination | @Override
public Destination createDestination(final IndividualAddress remote,
final boolean connectionOriented, final boolean keepAlive, final boolean verifyMode)
{
if (detached)
throw new IllegalStateException("TL detached");
synchronized (proxies) {
if (proxies.containsKey(remote))
throw new KNXIll... | java | @Override
public Destination createDestination(final IndividualAddress remote,
final boolean connectionOriented, final boolean keepAlive, final boolean verifyMode)
{
if (detached)
throw new IllegalStateException("TL detached");
synchronized (proxies) {
if (proxies.containsKey(remote))
throw new KNXIll... | [
"@",
"Override",
"public",
"Destination",
"createDestination",
"(",
"final",
"IndividualAddress",
"remote",
",",
"final",
"boolean",
"connectionOriented",
",",
"final",
"boolean",
"keepAlive",
",",
"final",
"boolean",
"verifyMode",
")",
"{",
"if",
"(",
"detached",
... | {@inheritDoc} Only one destination can be created per remote address. If a
destination with the supplied remote address already exists for this transport
layer, a {@link KNXIllegalArgumentException} is thrown.<br>
A transport layer can only handle one connection per destination, because it can't
distinguish incoming me... | [
"{"
] | train | https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/mgmt/TransportLayerImpl.java#L233-L248 |
rapidpro/expressions | java/src/main/java/io/rapidpro/expressions/functions/ExcelFunctions.java | ExcelFunctions.datedif | public static int datedif(EvaluationContext ctx, Object startDate, Object endDate, Object unit) {
LocalDate _startDate = Conversions.toDate(startDate, ctx);
LocalDate _endDate = Conversions.toDate(endDate, ctx);
String _unit = Conversions.toString(unit, ctx).toLowerCase();
if (_startDat... | java | public static int datedif(EvaluationContext ctx, Object startDate, Object endDate, Object unit) {
LocalDate _startDate = Conversions.toDate(startDate, ctx);
LocalDate _endDate = Conversions.toDate(endDate, ctx);
String _unit = Conversions.toString(unit, ctx).toLowerCase();
if (_startDat... | [
"public",
"static",
"int",
"datedif",
"(",
"EvaluationContext",
"ctx",
",",
"Object",
"startDate",
",",
"Object",
"endDate",
",",
"Object",
"unit",
")",
"{",
"LocalDate",
"_startDate",
"=",
"Conversions",
".",
"toDate",
"(",
"startDate",
",",
"ctx",
")",
";"... | Calculates the number of days, months, or years between two dates. | [
"Calculates",
"the",
"number",
"of",
"days",
"months",
"or",
"years",
"between",
"two",
"dates",
"."
] | train | https://github.com/rapidpro/expressions/blob/b03d91ec58fc328960bce90ecb5fa49dcf467627/java/src/main/java/io/rapidpro/expressions/functions/ExcelFunctions.java#L214-L239 |
JOML-CI/JOML | src/org/joml/Matrix4x3f.java | Matrix4x3f.setTranslation | public Matrix4x3f setTranslation(float x, float y, float z) {
m30 = x;
m31 = y;
m32 = z;
properties &= ~(PROPERTY_IDENTITY);
return this;
} | java | public Matrix4x3f setTranslation(float x, float y, float z) {
m30 = x;
m31 = y;
m32 = z;
properties &= ~(PROPERTY_IDENTITY);
return this;
} | [
"public",
"Matrix4x3f",
"setTranslation",
"(",
"float",
"x",
",",
"float",
"y",
",",
"float",
"z",
")",
"{",
"m30",
"=",
"x",
";",
"m31",
"=",
"y",
";",
"m32",
"=",
"z",
";",
"properties",
"&=",
"~",
"(",
"PROPERTY_IDENTITY",
")",
";",
"return",
"t... | Set only the translation components <code>(m30, m31, m32)</code> of this matrix to the given values <code>(x, y, z)</code>.
<p>
To build a translation matrix instead, use {@link #translation(float, float, float)}.
To apply a translation, use {@link #translate(float, float, float)}.
@see #translation(float, float, floa... | [
"Set",
"only",
"the",
"translation",
"components",
"<code",
">",
"(",
"m30",
"m31",
"m32",
")",
"<",
"/",
"code",
">",
"of",
"this",
"matrix",
"to",
"the",
"given",
"values",
"<code",
">",
"(",
"x",
"y",
"z",
")",
"<",
"/",
"code",
">",
".",
"<p"... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3f.java#L1610-L1616 |
looly/hutool | hutool-extra/src/main/java/cn/hutool/extra/mail/MailUtil.java | MailUtil.send | public static void send(Collection<String> tos, String subject, String content, boolean isHtml, File... files) {
send(GlobalMailAccount.INSTANCE.getAccount(), tos, subject, content, isHtml, files);
} | java | public static void send(Collection<String> tos, String subject, String content, boolean isHtml, File... files) {
send(GlobalMailAccount.INSTANCE.getAccount(), tos, subject, content, isHtml, files);
} | [
"public",
"static",
"void",
"send",
"(",
"Collection",
"<",
"String",
">",
"tos",
",",
"String",
"subject",
",",
"String",
"content",
",",
"boolean",
"isHtml",
",",
"File",
"...",
"files",
")",
"{",
"send",
"(",
"GlobalMailAccount",
".",
"INSTANCE",
".",
... | 使用配置文件中设置的账户发送邮件,发送给多人
@param tos 收件人列表
@param subject 标题
@param content 正文
@param isHtml 是否为HTML
@param files 附件列表 | [
"使用配置文件中设置的账户发送邮件,发送给多人"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/mail/MailUtil.java#L111-L113 |
aws/aws-sdk-java | aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/model/transform/AckEventUnmarshaller.java | AckEventUnmarshaller.getTextField | private String getTextField(JsonNode json, String fieldName) {
if (!json.has(fieldName)) {
return null;
}
return json.get(fieldName).asText();
} | java | private String getTextField(JsonNode json, String fieldName) {
if (!json.has(fieldName)) {
return null;
}
return json.get(fieldName).asText();
} | [
"private",
"String",
"getTextField",
"(",
"JsonNode",
"json",
",",
"String",
"fieldName",
")",
"{",
"if",
"(",
"!",
"json",
".",
"has",
"(",
"fieldName",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"json",
".",
"get",
"(",
"fieldName",
")",
... | Get a String field from the JSON.
@param json JSON document.
@param fieldName Field name to get.
@return String value of field or null if not present. | [
"Get",
"a",
"String",
"field",
"from",
"the",
"JSON",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-kinesisvideo/src/main/java/com/amazonaws/services/kinesisvideo/model/transform/AckEventUnmarshaller.java#L57-L62 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.purgeDeletedCertificateAsync | public ServiceFuture<Void> purgeDeletedCertificateAsync(String vaultBaseUrl, String certificateName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(purgeDeletedCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName), serviceCallback);
} | java | public ServiceFuture<Void> purgeDeletedCertificateAsync(String vaultBaseUrl, String certificateName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(purgeDeletedCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName), serviceCallback);
} | [
"public",
"ServiceFuture",
"<",
"Void",
">",
"purgeDeletedCertificateAsync",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"certificateName",
",",
"final",
"ServiceCallback",
"<",
"Void",
">",
"serviceCallback",
")",
"{",
"return",
"ServiceFuture",
".",
"fromResponse"... | Permanently deletes the specified deleted certificate.
The PurgeDeletedCertificate operation performs an irreversible deletion of the specified certificate, without possibility for recovery. The operation is not available if the recovery level does not specify 'Purgeable'. This operation requires the certificate/purge ... | [
"Permanently",
"deletes",
"the",
"specified",
"deleted",
"certificate",
".",
"The",
"PurgeDeletedCertificate",
"operation",
"performs",
"an",
"irreversible",
"deletion",
"of",
"the",
"specified",
"certificate",
"without",
"possibility",
"for",
"recovery",
".",
"The",
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L8635-L8637 |
OpenLiberty/open-liberty | dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/ReferrerURLCookieHandler.java | ReferrerURLCookieHandler.setReferrerURLCookie | public void setReferrerURLCookie(HttpServletRequest req, AuthenticationResult authResult, String url) {
//PM81345: If the URL contains favicon, then we will not update the value of the ReffererURL. The only way
//we will do it, is if the value of the cookie is null. This will solve the Error 500.
... | java | public void setReferrerURLCookie(HttpServletRequest req, AuthenticationResult authResult, String url) {
//PM81345: If the URL contains favicon, then we will not update the value of the ReffererURL. The only way
//we will do it, is if the value of the cookie is null. This will solve the Error 500.
... | [
"public",
"void",
"setReferrerURLCookie",
"(",
"HttpServletRequest",
"req",
",",
"AuthenticationResult",
"authResult",
",",
"String",
"url",
")",
"{",
"//PM81345: If the URL contains favicon, then we will not update the value of the ReffererURL. The only way",
"//we will do it, is if t... | Sets the referrer URL cookie into the AuthenticationResult. If
PRESERVE_FULLY_QUALIFIED_REFERRER_URL is not set, or set to false,
then the host name of the referrer URL is removed.
@param authResult AuthenticationResult instance
@param url non-null URL String
@param securityConfig SecurityConfig instance | [
"Sets",
"the",
"referrer",
"URL",
"cookie",
"into",
"the",
"AuthenticationResult",
".",
"If",
"PRESERVE_FULLY_QUALIFIED_REFERRER_URL",
"is",
"not",
"set",
"or",
"set",
"to",
"false",
"then",
"the",
"host",
"name",
"of",
"the",
"referrer",
"URL",
"is",
"removed",... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/ReferrerURLCookieHandler.java#L221-L238 |
SeleniumHQ/selenium | java/client/src/org/openqa/selenium/remote/BaseAugmenter.java | BaseAugmenter.augment | public WebDriver augment(WebDriver driver) {
RemoteWebDriver remoteDriver = extractRemoteWebDriver(driver);
if (remoteDriver == null) {
return driver;
}
return create(remoteDriver, driverAugmentors, driver);
} | java | public WebDriver augment(WebDriver driver) {
RemoteWebDriver remoteDriver = extractRemoteWebDriver(driver);
if (remoteDriver == null) {
return driver;
}
return create(remoteDriver, driverAugmentors, driver);
} | [
"public",
"WebDriver",
"augment",
"(",
"WebDriver",
"driver",
")",
"{",
"RemoteWebDriver",
"remoteDriver",
"=",
"extractRemoteWebDriver",
"(",
"driver",
")",
";",
"if",
"(",
"remoteDriver",
"==",
"null",
")",
"{",
"return",
"driver",
";",
"}",
"return",
"creat... | Enhance the interfaces implemented by this instance of WebDriver iff that instance is a
{@link org.openqa.selenium.remote.RemoteWebDriver}.
The WebDriver that is returned may well be a dynamic proxy. You cannot rely on the concrete
implementing class to remain constant.
@param driver The driver to enhance
@return A c... | [
"Enhance",
"the",
"interfaces",
"implemented",
"by",
"this",
"instance",
"of",
"WebDriver",
"iff",
"that",
"instance",
"is",
"a",
"{",
"@link",
"org",
".",
"openqa",
".",
"selenium",
".",
"remote",
".",
"RemoteWebDriver",
"}",
"."
] | train | https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/remote/BaseAugmenter.java#L92-L98 |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/transform/description/AbstractTransformationDescriptionBuilder.java | AbstractTransformationDescriptionBuilder.buildDefault | protected TransformationDescription buildDefault(final DiscardPolicy discardPolicy, boolean inherited, final AttributeTransformationDescriptionBuilderImpl.AttributeTransformationDescriptionBuilderRegistry registry, List<String> discardedOperations) {
// Build attribute rules
final Map<String, AttributeT... | java | protected TransformationDescription buildDefault(final DiscardPolicy discardPolicy, boolean inherited, final AttributeTransformationDescriptionBuilderImpl.AttributeTransformationDescriptionBuilderRegistry registry, List<String> discardedOperations) {
// Build attribute rules
final Map<String, AttributeT... | [
"protected",
"TransformationDescription",
"buildDefault",
"(",
"final",
"DiscardPolicy",
"discardPolicy",
",",
"boolean",
"inherited",
",",
"final",
"AttributeTransformationDescriptionBuilderImpl",
".",
"AttributeTransformationDescriptionBuilderRegistry",
"registry",
",",
"List",
... | Build the default transformation description.
@param discardPolicy the discard policy to use
@param inherited whether the definition is inherited
@param registry the attribute transformation rules for the resource
@param discardedOperations the discarded operations
@return the transformation description | [
"Build",
"the",
"default",
"transformation",
"description",
"."
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/description/AbstractTransformationDescriptionBuilder.java#L87-L109 |
grpc/grpc-java | examples/android/clientcache/app/src/main/java/io/grpc/clientcacheexample/SafeMethodCachingInterceptor.java | SafeMethodCachingInterceptor.newLruCache | public static Cache newLruCache(final int cacheSizeInBytes) {
return new Cache() {
private final LruCache<Key, Value> lruCache =
new LruCache<Key, Value>(cacheSizeInBytes) {
protected int sizeOf(Key key, Value value) {
return value.response.getSerializedSize();
... | java | public static Cache newLruCache(final int cacheSizeInBytes) {
return new Cache() {
private final LruCache<Key, Value> lruCache =
new LruCache<Key, Value>(cacheSizeInBytes) {
protected int sizeOf(Key key, Value value) {
return value.response.getSerializedSize();
... | [
"public",
"static",
"Cache",
"newLruCache",
"(",
"final",
"int",
"cacheSizeInBytes",
")",
"{",
"return",
"new",
"Cache",
"(",
")",
"{",
"private",
"final",
"LruCache",
"<",
"Key",
",",
"Value",
">",
"lruCache",
"=",
"new",
"LruCache",
"<",
"Key",
",",
"V... | Obtain a new cache with a least-recently used eviction policy and the specified size limit. The
backing caching implementation is provided by {@link LruCache}. It is safe for a single cache
to be shared across multiple {@link SafeMethodCachingInterceptor}s without synchronization. | [
"Obtain",
"a",
"new",
"cache",
"with",
"a",
"least",
"-",
"recently",
"used",
"eviction",
"policy",
"and",
"the",
"specified",
"size",
"limit",
".",
"The",
"backing",
"caching",
"implementation",
"is",
"provided",
"by",
"{"
] | train | https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/examples/android/clientcache/app/src/main/java/io/grpc/clientcacheexample/SafeMethodCachingInterceptor.java#L107-L136 |
facebookarchive/hadoop-20 | src/mapred/org/apache/hadoop/mapred/Counters.java | Counters.findCounter | public synchronized Counter findCounter(String group, String name) {
return getGroup(group).getCounterForName(name);
} | java | public synchronized Counter findCounter(String group, String name) {
return getGroup(group).getCounterForName(name);
} | [
"public",
"synchronized",
"Counter",
"findCounter",
"(",
"String",
"group",
",",
"String",
"name",
")",
"{",
"return",
"getGroup",
"(",
"group",
")",
".",
"getCounterForName",
"(",
"name",
")",
";",
"}"
] | Find a counter given the group and the name.
@param group the name of the group
@param name the internal name of the counter
@return the counter for that name | [
"Find",
"a",
"counter",
"given",
"the",
"group",
"and",
"the",
"name",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/Counters.java#L390-L392 |
docusign/docusign-java-client | src/main/java/com/docusign/esign/api/CloudStorageApi.java | CloudStorageApi.getProvider | public CloudStorageProviders getProvider(String accountId, String userId, String serviceId) throws ApiException {
return getProvider(accountId, userId, serviceId, null);
} | java | public CloudStorageProviders getProvider(String accountId, String userId, String serviceId) throws ApiException {
return getProvider(accountId, userId, serviceId, null);
} | [
"public",
"CloudStorageProviders",
"getProvider",
"(",
"String",
"accountId",
",",
"String",
"userId",
",",
"String",
"serviceId",
")",
"throws",
"ApiException",
"{",
"return",
"getProvider",
"(",
"accountId",
",",
"userId",
",",
"serviceId",
",",
"null",
")",
"... | Gets the specified Cloud Storage Provider configuration for the User.
Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.
@param accountId The external account number (int) or account ID Guid. (required)
@param userId The user ID of the user being access... | [
"Gets",
"the",
"specified",
"Cloud",
"Storage",
"Provider",
"configuration",
"for",
"the",
"User",
".",
"Retrieves",
"the",
"list",
"of",
"cloud",
"storage",
"providers",
"enabled",
"for",
"the",
"account",
"and",
"the",
"configuration",
"information",
"for",
"t... | train | https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/CloudStorageApi.java#L221-L223 |
BotMill/fb-botmill | src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/PassengerSegmentInfoBuilder.java | PassengerSegmentInfoBuilder.addProductInfo | public PassengerSegmentInfoBuilder addProductInfo(String title, String value) {
ProductInfo productInfo = new ProductInfo(title, value);
segmentInfo.addProductInfo(productInfo);
return this;
} | java | public PassengerSegmentInfoBuilder addProductInfo(String title, String value) {
ProductInfo productInfo = new ProductInfo(title, value);
segmentInfo.addProductInfo(productInfo);
return this;
} | [
"public",
"PassengerSegmentInfoBuilder",
"addProductInfo",
"(",
"String",
"title",
",",
"String",
"value",
")",
"{",
"ProductInfo",
"productInfo",
"=",
"new",
"ProductInfo",
"(",
"title",
",",
"value",
")",
";",
"segmentInfo",
".",
"addProductInfo",
"(",
"productI... | Adds a {@link ProductInfo} object to the list of products the passenger
purchased in the current {@link PassengerSegmentInfo}. This field is
mandatory and there must be at least one element.
@param title
the product title. It can't be empty.
@param value
the product description. It can't be empty.
@return this builder... | [
"Adds",
"a",
"{",
"@link",
"ProductInfo",
"}",
"object",
"to",
"the",
"list",
"of",
"products",
"the",
"passenger",
"purchased",
"in",
"the",
"current",
"{",
"@link",
"PassengerSegmentInfo",
"}",
".",
"This",
"field",
"is",
"mandatory",
"and",
"there",
"must... | train | https://github.com/BotMill/fb-botmill/blob/d94da3615a7339822c137ef75c92a03d791ee969/src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/PassengerSegmentInfoBuilder.java#L86-L90 |
wildfly/wildfly-core | server/src/main/java/org/jboss/as/server/deploymentoverlay/AffectedDeploymentOverlay.java | AffectedDeploymentOverlay.listDeployments | public static Set<String> listDeployments(Resource deploymentRootResource, Set<String> runtimeNames) {
Set<Pattern> set = new HashSet<>();
for (String wildcardExpr : runtimeNames) {
Pattern pattern = DeploymentOverlayIndex.getPattern(wildcardExpr);
set.add(pattern);
... | java | public static Set<String> listDeployments(Resource deploymentRootResource, Set<String> runtimeNames) {
Set<Pattern> set = new HashSet<>();
for (String wildcardExpr : runtimeNames) {
Pattern pattern = DeploymentOverlayIndex.getPattern(wildcardExpr);
set.add(pattern);
... | [
"public",
"static",
"Set",
"<",
"String",
">",
"listDeployments",
"(",
"Resource",
"deploymentRootResource",
",",
"Set",
"<",
"String",
">",
"runtimeNames",
")",
"{",
"Set",
"<",
"Pattern",
">",
"set",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"for",
"... | Returns the deployment names with the specified runtime names at the specified deploymentRootAddress.
@param deploymentRootResource
@param runtimeNames
@return the deployment names with the specified runtime names at the specified deploymentRootAddress. | [
"Returns",
"the",
"deployment",
"names",
"with",
"the",
"specified",
"runtime",
"names",
"at",
"the",
"specified",
"deploymentRootAddress",
"."
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deploymentoverlay/AffectedDeploymentOverlay.java#L225-L232 |
synchronoss/cpo-api | cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java | JdbcCpoAdapter.getReadConnection | protected Connection getReadConnection() throws CpoException {
Connection connection;
try {
if (!(invalidReadConnection_)) {
connection = getReadDataSource().getConnection();
} else {
connection = getWriteDataSource().getConnection();
}
connection.setAutoCommit(false);
... | java | protected Connection getReadConnection() throws CpoException {
Connection connection;
try {
if (!(invalidReadConnection_)) {
connection = getReadDataSource().getConnection();
} else {
connection = getWriteDataSource().getConnection();
}
connection.setAutoCommit(false);
... | [
"protected",
"Connection",
"getReadConnection",
"(",
")",
"throws",
"CpoException",
"{",
"Connection",
"connection",
";",
"try",
"{",
"if",
"(",
"!",
"(",
"invalidReadConnection_",
")",
")",
"{",
"connection",
"=",
"getReadDataSource",
"(",
")",
".",
"getConnect... | DOCUMENT ME!
@return DOCUMENT ME!
@throws CpoException DOCUMENT ME! | [
"DOCUMENT",
"ME!"
] | train | https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-jdbc/src/main/java/org/synchronoss/cpo/jdbc/JdbcCpoAdapter.java#L2044-L2071 |
ben-manes/caffeine | simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/product/CollisionPolicy.java | CollisionPolicy.policies | public static Set<Policy> policies(Config config) {
CollisionSettings settings = new CollisionSettings(config);
return settings.density()
.map(density -> new CollisionPolicy(settings, density))
.collect(toSet());
} | java | public static Set<Policy> policies(Config config) {
CollisionSettings settings = new CollisionSettings(config);
return settings.density()
.map(density -> new CollisionPolicy(settings, density))
.collect(toSet());
} | [
"public",
"static",
"Set",
"<",
"Policy",
">",
"policies",
"(",
"Config",
"config",
")",
"{",
"CollisionSettings",
"settings",
"=",
"new",
"CollisionSettings",
"(",
"config",
")",
";",
"return",
"settings",
".",
"density",
"(",
")",
".",
"map",
"(",
"densi... | Returns all variations of this policy based on the configuration parameters. | [
"Returns",
"all",
"variations",
"of",
"this",
"policy",
"based",
"on",
"the",
"configuration",
"parameters",
"."
] | train | https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/product/CollisionPolicy.java#L67-L72 |
goldmansachs/gs-collections | collections/src/main/java/com/gs/collections/impl/utility/Iterate.java | Iterate.sortThisBy | public static <T, V extends Comparable<? super V>, L extends List<T>> L sortThisBy(L list, Function<? super T, ? extends V> function)
{
return Iterate.sortThis(list, Comparators.byFunction(function));
} | java | public static <T, V extends Comparable<? super V>, L extends List<T>> L sortThisBy(L list, Function<? super T, ? extends V> function)
{
return Iterate.sortThis(list, Comparators.byFunction(function));
} | [
"public",
"static",
"<",
"T",
",",
"V",
"extends",
"Comparable",
"<",
"?",
"super",
"V",
">",
",",
"L",
"extends",
"List",
"<",
"T",
">",
">",
"L",
"sortThisBy",
"(",
"L",
"list",
",",
"Function",
"<",
"?",
"super",
"T",
",",
"?",
"extends",
"V",... | Sort the list by comparing an attribute defined by the function.
SortThisBy is a mutating method. The List passed in is also returned. | [
"Sort",
"the",
"list",
"by",
"comparing",
"an",
"attribute",
"defined",
"by",
"the",
"function",
".",
"SortThisBy",
"is",
"a",
"mutating",
"method",
".",
"The",
"List",
"passed",
"in",
"is",
"also",
"returned",
"."
] | train | https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/Iterate.java#L919-L922 |
elki-project/elki | addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPlot.java | SVGPlot.saveAsPDF | public void saveAsPDF(File file) throws IOException, TranscoderException, ClassNotFoundException {
try {
Object t = Class.forName("org.apache.fop.svg.PDFTranscoder").newInstance();
transcode(file, (Transcoder) t);
}
catch(InstantiationException | IllegalAccessException e) {
throw new Class... | java | public void saveAsPDF(File file) throws IOException, TranscoderException, ClassNotFoundException {
try {
Object t = Class.forName("org.apache.fop.svg.PDFTranscoder").newInstance();
transcode(file, (Transcoder) t);
}
catch(InstantiationException | IllegalAccessException e) {
throw new Class... | [
"public",
"void",
"saveAsPDF",
"(",
"File",
"file",
")",
"throws",
"IOException",
",",
"TranscoderException",
",",
"ClassNotFoundException",
"{",
"try",
"{",
"Object",
"t",
"=",
"Class",
".",
"forName",
"(",
"\"org.apache.fop.svg.PDFTranscoder\"",
")",
".",
"newIn... | Transcode file to PDF.
@param file Output filename
@throws IOException On write errors
@throws TranscoderException On input/parsing errors.
@throws ClassNotFoundException PDF transcoder not installed | [
"Transcode",
"file",
"to",
"PDF",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPlot.java#L461-L469 |
OpenLiberty/open-liberty | dev/com.ibm.ws.kernel.feature.core/src/com/ibm/ws/kernel/feature/internal/subsystem/FeatureRepository.java | FeatureRepository.updateBadManifestCache | private void updateBadManifestCache(String line) {
String[] parts = FeatureDefinitionUtils.splitPattern.split(line);
if (parts.length == 3) {
File f = new File(parts[0]);
long lastModified = FeatureDefinitionUtils.getLongValue(parts[1], -1);
long length = FeatureDefin... | java | private void updateBadManifestCache(String line) {
String[] parts = FeatureDefinitionUtils.splitPattern.split(line);
if (parts.length == 3) {
File f = new File(parts[0]);
long lastModified = FeatureDefinitionUtils.getLongValue(parts[1], -1);
long length = FeatureDefin... | [
"private",
"void",
"updateBadManifestCache",
"(",
"String",
"line",
")",
"{",
"String",
"[",
"]",
"parts",
"=",
"FeatureDefinitionUtils",
".",
"splitPattern",
".",
"split",
"(",
"line",
")",
";",
"if",
"(",
"parts",
".",
"length",
"==",
"3",
")",
"{",
"F... | Read the data from the cache: if the file still exists, add it to the list
of known bad features. It will be checked for updates alongside the other
checks for current-ness in {@link #readFeatureManifests()}
@param line line read from the cache file | [
"Read",
"the",
"data",
"from",
"the",
"cache",
":",
"if",
"the",
"file",
"still",
"exists",
"add",
"it",
"to",
"the",
"list",
"of",
"known",
"bad",
"features",
".",
"It",
"will",
"be",
"checked",
"for",
"updates",
"alongside",
"the",
"other",
"checks",
... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.feature.core/src/com/ibm/ws/kernel/feature/internal/subsystem/FeatureRepository.java#L316-L328 |
apache/groovy | src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java | IOGroovyMethods.eachObject | public static void eachObject(ObjectInputStream ois, Closure closure) throws IOException, ClassNotFoundException {
try {
while (true) {
try {
Object obj = ois.readObject();
// we allow null objects in the object stream
closu... | java | public static void eachObject(ObjectInputStream ois, Closure closure) throws IOException, ClassNotFoundException {
try {
while (true) {
try {
Object obj = ois.readObject();
// we allow null objects in the object stream
closu... | [
"public",
"static",
"void",
"eachObject",
"(",
"ObjectInputStream",
"ois",
",",
"Closure",
"closure",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"try",
"{",
"while",
"(",
"true",
")",
"{",
"try",
"{",
"Object",
"obj",
"=",
"ois",
".",
... | Iterates through the given object stream object by object. The
ObjectInputStream is closed afterwards.
@param ois an ObjectInputStream, closed after the operation
@param closure a closure
@throws IOException if an IOException occurs.
@throws ClassNotFoundException if the class is not found.
@since 1.0 | [
"Iterates",
"through",
"the",
"given",
"object",
"stream",
"object",
"by",
"object",
".",
"The",
"ObjectInputStream",
"is",
"closed",
"afterwards",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java#L299-L316 |
mapsforge/mapsforge | sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java | SQLiteDatabase.rawQuery | public Cursor rawQuery(String sql, String[] selectionArgs) {
return rawQueryWithFactory(null, sql, selectionArgs, null, null);
} | java | public Cursor rawQuery(String sql, String[] selectionArgs) {
return rawQueryWithFactory(null, sql, selectionArgs, null, null);
} | [
"public",
"Cursor",
"rawQuery",
"(",
"String",
"sql",
",",
"String",
"[",
"]",
"selectionArgs",
")",
"{",
"return",
"rawQueryWithFactory",
"(",
"null",
",",
"sql",
",",
"selectionArgs",
",",
"null",
",",
"null",
")",
";",
"}"
] | Runs the provided SQL and returns a {@link Cursor} over the result set.
@param sql the SQL query. The SQL string must not be ; terminated
@param selectionArgs You may include ?s in where clause in the query,
which will be replaced by the values from selectionArgs. The
values will be bound as Strings.
@return A {@link ... | [
"Runs",
"the",
"provided",
"SQL",
"and",
"returns",
"a",
"{",
"@link",
"Cursor",
"}",
"over",
"the",
"result",
"set",
"."
] | train | https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java#L1258-L1260 |
facebookarchive/swift | swift-service/src/main/java/com/facebook/swift/service/ThriftServerConfig.java | ThriftServerConfig.getOrBuildWorkerExecutor | public ExecutorService getOrBuildWorkerExecutor(Map<String, ExecutorService> boundWorkerExecutors)
{
if (workerExecutorKey.isPresent()) {
checkState(!workerExecutor.isPresent(),
"Worker executor key should not be set along with a specific worker executor instance");
... | java | public ExecutorService getOrBuildWorkerExecutor(Map<String, ExecutorService> boundWorkerExecutors)
{
if (workerExecutorKey.isPresent()) {
checkState(!workerExecutor.isPresent(),
"Worker executor key should not be set along with a specific worker executor instance");
... | [
"public",
"ExecutorService",
"getOrBuildWorkerExecutor",
"(",
"Map",
"<",
"String",
",",
"ExecutorService",
">",
"boundWorkerExecutors",
")",
"{",
"if",
"(",
"workerExecutorKey",
".",
"isPresent",
"(",
")",
")",
"{",
"checkState",
"(",
"!",
"workerExecutor",
".",
... | <p>Builds the {@link java.util.concurrent.ExecutorService} used for running Thrift server methods.</p>
<p>The details of the {@link java.util.concurrent.ExecutorService} that gets built can be tweaked
by calling any of the following (though only <b>one</b> of these should actually be called):</p>
<ul>
<li>{@link com.... | [
"<p",
">",
"Builds",
"the",
"{",
"@link",
"java",
".",
"util",
".",
"concurrent",
".",
"ExecutorService",
"}",
"used",
"for",
"running",
"Thrift",
"server",
"methods",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/facebookarchive/swift/blob/3f1f098a50d6106f50cd6fe1c361dd373ede0197/swift-service/src/main/java/com/facebook/swift/service/ThriftServerConfig.java#L374-L402 |
lucee/Lucee | core/src/main/java/lucee/runtime/op/date/DateCaster.java | DateCaster.toDateSimple | public static DateTime toDateSimple(String str, short convertingType, boolean alsoMonthString, TimeZone timeZone) throws PageException {
DateTime dt = toDateSimple(str, convertingType, alsoMonthString, timeZone, null);
if (dt == null) throw new ExpressionException("can't cast value to a Date Object");
return dt;
... | java | public static DateTime toDateSimple(String str, short convertingType, boolean alsoMonthString, TimeZone timeZone) throws PageException {
DateTime dt = toDateSimple(str, convertingType, alsoMonthString, timeZone, null);
if (dt == null) throw new ExpressionException("can't cast value to a Date Object");
return dt;
... | [
"public",
"static",
"DateTime",
"toDateSimple",
"(",
"String",
"str",
",",
"short",
"convertingType",
",",
"boolean",
"alsoMonthString",
",",
"TimeZone",
"timeZone",
")",
"throws",
"PageException",
"{",
"DateTime",
"dt",
"=",
"toDateSimple",
"(",
"str",
",",
"co... | converts a Object to a DateTime Object, returns null if invalid string
@param str Stringt to Convert
@param convertingType one of the following values: - CONVERTING_TYPE_NONE: number are not
converted at all - CONVERTING_TYPE_YEAR: integers are handled as years -
CONVERTING_TYPE_OFFSET: numbers are handled as offset f... | [
"converts",
"a",
"Object",
"to",
"a",
"DateTime",
"Object",
"returns",
"null",
"if",
"invalid",
"string"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/date/DateCaster.java#L501-L505 |
infinispan/infinispan | core/src/main/java/org/infinispan/configuration/global/ExecutorFactoryConfigurationBuilder.java | ExecutorFactoryConfigurationBuilder.addProperty | public ExecutorFactoryConfigurationBuilder addProperty(String key, String value) {
attributes.attribute(PROPERTIES).get().put(key, value);
return this;
} | java | public ExecutorFactoryConfigurationBuilder addProperty(String key, String value) {
attributes.attribute(PROPERTIES).get().put(key, value);
return this;
} | [
"public",
"ExecutorFactoryConfigurationBuilder",
"addProperty",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"attributes",
".",
"attribute",
"(",
"PROPERTIES",
")",
".",
"get",
"(",
")",
".",
"put",
"(",
"key",
",",
"value",
")",
";",
"return",
... | Add key/value property pair to this executor factory configuration
@param key property key
@param value property value
@return this ExecutorFactoryConfig | [
"Add",
"key",
"/",
"value",
"property",
"pair",
"to",
"this",
"executor",
"factory",
"configuration"
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/global/ExecutorFactoryConfigurationBuilder.java#L45-L48 |
joniles/mpxj | src/main/java/net/sf/mpxj/Resource.java | Resource.setEnterpriseCustomField | public void setEnterpriseCustomField(int index, String value)
{
set(selectField(ResourceFieldLists.ENTERPRISE_CUSTOM_FIELD, index), value);
} | java | public void setEnterpriseCustomField(int index, String value)
{
set(selectField(ResourceFieldLists.ENTERPRISE_CUSTOM_FIELD, index), value);
} | [
"public",
"void",
"setEnterpriseCustomField",
"(",
"int",
"index",
",",
"String",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"ResourceFieldLists",
".",
"ENTERPRISE_CUSTOM_FIELD",
",",
"index",
")",
",",
"value",
")",
";",
"}"
] | Set an enterprise custom field value.
@param index field index
@param value field value | [
"Set",
"an",
"enterprise",
"custom",
"field",
"value",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Resource.java#L2183-L2186 |
UrielCh/ovh-java-sdk | ovh-java-sdk-horizonView/src/main/java/net/minidev/ovh/api/ApiOvhHorizonView.java | ApiOvhHorizonView.serviceName_domainTrust_POST | public ArrayList<OvhTask> serviceName_domainTrust_POST(String serviceName, String activeDirectoryIP, String dns1, String dns2, String domain) throws IOException {
String qPath = "/horizonView/{serviceName}/domainTrust";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Ob... | java | public ArrayList<OvhTask> serviceName_domainTrust_POST(String serviceName, String activeDirectoryIP, String dns1, String dns2, String domain) throws IOException {
String qPath = "/horizonView/{serviceName}/domainTrust";
StringBuilder sb = path(qPath, serviceName);
HashMap<String, Object>o = new HashMap<String, Ob... | [
"public",
"ArrayList",
"<",
"OvhTask",
">",
"serviceName_domainTrust_POST",
"(",
"String",
"serviceName",
",",
"String",
"activeDirectoryIP",
",",
"String",
"dns1",
",",
"String",
"dns2",
",",
"String",
"domain",
")",
"throws",
"IOException",
"{",
"String",
"qPath... | Link your Active Directory to your CDI Active Directory
REST: POST /horizonView/{serviceName}/domainTrust
@param activeDirectoryIP [required] IP of your Active Directory
@param domain [required] Domain of your active directory (for example domain.local)
@param dns2 [required] IP of your second DNS
@param dns1 [require... | [
"Link",
"your",
"Active",
"Directory",
"to",
"your",
"CDI",
"Active",
"Directory"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-horizonView/src/main/java/net/minidev/ovh/api/ApiOvhHorizonView.java#L381-L391 |
fuinorg/objects4j | src/main/java/org/fuin/objects4j/vo/HourRange.java | HourRange.normalize | public final List<HourRange> normalize() {
final List<HourRange> ranges = new ArrayList<>();
if (this.from.toMinutes() > this.to.toMinutes()) {
ranges.add(new HourRange(this.from, new Hour(24, 00)));
ranges.add(new HourRange(new Hour(0, 0), this.to));
} else {
... | java | public final List<HourRange> normalize() {
final List<HourRange> ranges = new ArrayList<>();
if (this.from.toMinutes() > this.to.toMinutes()) {
ranges.add(new HourRange(this.from, new Hour(24, 00)));
ranges.add(new HourRange(new Hour(0, 0), this.to));
} else {
... | [
"public",
"final",
"List",
"<",
"HourRange",
">",
"normalize",
"(",
")",
"{",
"final",
"List",
"<",
"HourRange",
">",
"ranges",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"if",
"(",
"this",
".",
"from",
".",
"toMinutes",
"(",
")",
">",
"this",
"... | If the hour range represents two different days, this method returns two hour ranges, one for each day. Example: '18:00-03:00' will
be splitted into '18:00-24:00' and '00:00-03:00'.
@return This range or range for today and tomorrow. | [
"If",
"the",
"hour",
"range",
"represents",
"two",
"different",
"days",
"this",
"method",
"returns",
"two",
"hour",
"ranges",
"one",
"for",
"each",
"day",
".",
"Example",
":",
"18",
":",
"00",
"-",
"03",
":",
"00",
"will",
"be",
"splitted",
"into",
"18... | train | https://github.com/fuinorg/objects4j/blob/e7f278b5bae073ebb6a76053650571c718f36246/src/main/java/org/fuin/objects4j/vo/HourRange.java#L193-L202 |
samskivert/samskivert | src/main/java/com/samskivert/servlet/MessageManager.java | MessageManager.getMessage | public String getMessage (HttpServletRequest req, String path, Object[] args)
{
String msg = getMessage(req, path, true);
// we may cache message formatters later, but for now just use the static convenience
// function
return MessageFormat.format(MessageUtil.escape(msg), args);
... | java | public String getMessage (HttpServletRequest req, String path, Object[] args)
{
String msg = getMessage(req, path, true);
// we may cache message formatters later, but for now just use the static convenience
// function
return MessageFormat.format(MessageUtil.escape(msg), args);
... | [
"public",
"String",
"getMessage",
"(",
"HttpServletRequest",
"req",
",",
"String",
"path",
",",
"Object",
"[",
"]",
"args",
")",
"{",
"String",
"msg",
"=",
"getMessage",
"(",
"req",
",",
"path",
",",
"true",
")",
";",
"// we may cache message formatters later,... | Looks up the message with the specified path in the resource bundle most appropriate for the
locales described as preferred by the request, then substitutes the supplied arguments into
that message using a <code>MessageFormat</code> object.
@see java.text.MessageFormat | [
"Looks",
"up",
"the",
"message",
"with",
"the",
"specified",
"path",
"in",
"the",
"resource",
"bundle",
"most",
"appropriate",
"for",
"the",
"locales",
"described",
"as",
"preferred",
"by",
"the",
"request",
"then",
"substitutes",
"the",
"supplied",
"arguments",... | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/MessageManager.java#L84-L90 |
OpenLiberty/open-liberty | dev/com.ibm.ws.injection/src/com/ibm/ws/injectionengine/osgi/internal/IndirectJndiLookupObjectFactory.java | IndirectJndiLookupObjectFactory.createDefaultResource | private Object createDefaultResource(String className, ResourceInfo resourceRefInfo) throws Exception {
if (className != null) {
String javaCompDefaultFilter = "(" + com.ibm.ws.resource.ResourceFactory.JAVA_COMP_DEFAULT_NAME + "=*)";
String createsFilter = FilterUtils.createPropertyFilte... | java | private Object createDefaultResource(String className, ResourceInfo resourceRefInfo) throws Exception {
if (className != null) {
String javaCompDefaultFilter = "(" + com.ibm.ws.resource.ResourceFactory.JAVA_COMP_DEFAULT_NAME + "=*)";
String createsFilter = FilterUtils.createPropertyFilte... | [
"private",
"Object",
"createDefaultResource",
"(",
"String",
"className",
",",
"ResourceInfo",
"resourceRefInfo",
")",
"throws",
"Exception",
"{",
"if",
"(",
"className",
"!=",
"null",
")",
"{",
"String",
"javaCompDefaultFilter",
"=",
"\"(\"",
"+",
"com",
".",
"... | Try to obtain an object instance by creating a resource using a
ResourceFactory for a default resource. | [
"Try",
"to",
"obtain",
"an",
"object",
"instance",
"by",
"creating",
"a",
"resource",
"using",
"a",
"ResourceFactory",
"for",
"a",
"default",
"resource",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.injection/src/com/ibm/ws/injectionengine/osgi/internal/IndirectJndiLookupObjectFactory.java#L345-L353 |
RestComm/sipunit | src/main/java/org/cafesip/sipunit/SipSession.java | SipSession.sendReply | public SipTransaction sendReply(RequestEvent request, Response response) {
initErrorInfo();
if (request == null) {
setReturnCode(INVALID_ARGUMENT);
setErrorMessage("A response cannot be sent because the request event is null.");
return null;
}
// The ServerTransaction needed will be ... | java | public SipTransaction sendReply(RequestEvent request, Response response) {
initErrorInfo();
if (request == null) {
setReturnCode(INVALID_ARGUMENT);
setErrorMessage("A response cannot be sent because the request event is null.");
return null;
}
// The ServerTransaction needed will be ... | [
"public",
"SipTransaction",
"sendReply",
"(",
"RequestEvent",
"request",
",",
"Response",
"response",
")",
"{",
"initErrorInfo",
"(",
")",
";",
"if",
"(",
"request",
"==",
"null",
")",
"{",
"setReturnCode",
"(",
"INVALID_ARGUMENT",
")",
";",
"setErrorMessage",
... | This method sends a stateful response to a previously received request. Call this method after
calling waitRequest(). The returned SipTransaction object must be used in any subsequent calls
to sendReply() for the same received request, if there are any.
@param request The RequestEvent object that was returned by a pre... | [
"This",
"method",
"sends",
"a",
"stateful",
"response",
"to",
"a",
"previously",
"received",
"request",
".",
"Call",
"this",
"method",
"after",
"calling",
"waitRequest",
"()",
".",
"The",
"returned",
"SipTransaction",
"object",
"must",
"be",
"used",
"in",
"any... | train | https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/SipSession.java#L1382-L1430 |
facebookarchive/hadoop-20 | src/mapred/org/apache/hadoop/mapred/FileOutputFormat.java | FileOutputFormat.getTaskOutputPath | public static Path getTaskOutputPath(JobConf conf, String name)
throws IOException {
// ${mapred.out.dir}
Path outputPath = getOutputPath(conf);
if (outputPath == null) {
throw new IOException("Undefined job output-path");
}
OutputCommitter committer = conf.getOutputCommitter();
Path w... | java | public static Path getTaskOutputPath(JobConf conf, String name)
throws IOException {
// ${mapred.out.dir}
Path outputPath = getOutputPath(conf);
if (outputPath == null) {
throw new IOException("Undefined job output-path");
}
OutputCommitter committer = conf.getOutputCommitter();
Path w... | [
"public",
"static",
"Path",
"getTaskOutputPath",
"(",
"JobConf",
"conf",
",",
"String",
"name",
")",
"throws",
"IOException",
"{",
"// ${mapred.out.dir}",
"Path",
"outputPath",
"=",
"getOutputPath",
"(",
"conf",
")",
";",
"if",
"(",
"outputPath",
"==",
"null",
... | Helper function to create the task's temporary output directory and
return the path to the task's output file.
@param conf job-configuration
@param name temporary task-output filename
@return path to the task's temporary output file
@throws IOException | [
"Helper",
"function",
"to",
"create",
"the",
"task",
"s",
"temporary",
"output",
"directory",
"and",
"return",
"the",
"path",
"to",
"the",
"task",
"s",
"output",
"file",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/FileOutputFormat.java#L231-L250 |
apache/flink | flink-runtime/src/main/java/org/apache/flink/runtime/operators/BatchTask.java | BatchTask.cancelChainedTasks | public static void cancelChainedTasks(List<ChainedDriver<?, ?>> tasks) {
for (int i = 0; i < tasks.size(); i++) {
try {
tasks.get(i).cancelTask();
} catch (Throwable t) {
// do nothing
}
}
} | java | public static void cancelChainedTasks(List<ChainedDriver<?, ?>> tasks) {
for (int i = 0; i < tasks.size(); i++) {
try {
tasks.get(i).cancelTask();
} catch (Throwable t) {
// do nothing
}
}
} | [
"public",
"static",
"void",
"cancelChainedTasks",
"(",
"List",
"<",
"ChainedDriver",
"<",
"?",
",",
"?",
">",
">",
"tasks",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"tasks",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"tr... | Cancels all tasks via their {@link ChainedDriver#cancelTask()} method. Any occurring exception
and error is suppressed, such that the canceling method of every task is invoked in all cases.
@param tasks The tasks to be canceled. | [
"Cancels",
"all",
"tasks",
"via",
"their",
"{",
"@link",
"ChainedDriver#cancelTask",
"()",
"}",
"method",
".",
"Any",
"occurring",
"exception",
"and",
"error",
"is",
"suppressed",
"such",
"that",
"the",
"canceling",
"method",
"of",
"every",
"task",
"is",
"invo... | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/BatchTask.java#L1420-L1428 |
umeding/fuzzer | src/main/java/com/uwemeding/fuzzer/Program.java | Program.addItem | private <T extends NameBearer> void addItem(T item, Map<String, T> items, String typeName) {
String itemName = item.getName();
if (items.containsKey(itemName)) {
throw new FuzzerException(name + ": '" + itemName + "' already present in " + typeName);
}
items.put(itemName, item);
} | java | private <T extends NameBearer> void addItem(T item, Map<String, T> items, String typeName) {
String itemName = item.getName();
if (items.containsKey(itemName)) {
throw new FuzzerException(name + ": '" + itemName + "' already present in " + typeName);
}
items.put(itemName, item);
} | [
"private",
"<",
"T",
"extends",
"NameBearer",
">",
"void",
"addItem",
"(",
"T",
"item",
",",
"Map",
"<",
"String",
",",
"T",
">",
"items",
",",
"String",
"typeName",
")",
"{",
"String",
"itemName",
"=",
"item",
".",
"getName",
"(",
")",
";",
"if",
... | Add an item to a map.
<p>
@param <T> the item type
@param item the item
@param items the item map
@param typeName the item type name string | [
"Add",
"an",
"item",
"to",
"a",
"map",
".",
"<p",
">"
] | train | https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/Program.java#L385-L391 |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java | HttpChannelConfig.parseIncomingHdrBufferSize | private void parseIncomingHdrBufferSize(Map<Object, Object> props) {
Object value = props.get(HttpConfigConstants.PROPNAME_INCOMING_HDR_BUFFSIZE);
if (null != value) {
try {
this.incomingHdrBuffSize = rangeLimit(convertInteger(value), HttpConfigConstants.MIN_BUFFER_SIZE, Http... | java | private void parseIncomingHdrBufferSize(Map<Object, Object> props) {
Object value = props.get(HttpConfigConstants.PROPNAME_INCOMING_HDR_BUFFSIZE);
if (null != value) {
try {
this.incomingHdrBuffSize = rangeLimit(convertInteger(value), HttpConfigConstants.MIN_BUFFER_SIZE, Http... | [
"private",
"void",
"parseIncomingHdrBufferSize",
"(",
"Map",
"<",
"Object",
",",
"Object",
">",
"props",
")",
"{",
"Object",
"value",
"=",
"props",
".",
"get",
"(",
"HttpConfigConstants",
".",
"PROPNAME_INCOMING_HDR_BUFFSIZE",
")",
";",
"if",
"(",
"null",
"!="... | Check the input configuration for the buffer size to use when parsing
the incoming headers.
@param props | [
"Check",
"the",
"input",
"configuration",
"for",
"the",
"buffer",
"size",
"to",
"use",
"when",
"parsing",
"the",
"incoming",
"headers",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java#L589-L604 |
alkacon/opencms-core | src/org/opencms/staticexport/CmsStaticExportManager.java | CmsStaticExportManager.getRfsPath | public static String getRfsPath(String filename, String extension, String parameters) {
boolean appendSlash = false;
if (filename.endsWith("/")) {
appendSlash = true;
filename = filename.substring(0, filename.length() - 1);
}
StringBuffer buf = new StringBuffer(1... | java | public static String getRfsPath(String filename, String extension, String parameters) {
boolean appendSlash = false;
if (filename.endsWith("/")) {
appendSlash = true;
filename = filename.substring(0, filename.length() - 1);
}
StringBuffer buf = new StringBuffer(1... | [
"public",
"static",
"String",
"getRfsPath",
"(",
"String",
"filename",
",",
"String",
"extension",
",",
"String",
"parameters",
")",
"{",
"boolean",
"appendSlash",
"=",
"false",
";",
"if",
"(",
"filename",
".",
"endsWith",
"(",
"\"/\"",
")",
")",
"{",
"app... | Creates unique, valid RFS name for the given filename that contains
a coded version of the given parameters, with the given file extension appended.<p>
Adapted from CmsFileUtil.getRfsPath().
@param filename the base file name
@param extension the extension to use
@param parameters the parameters to code in the result... | [
"Creates",
"unique",
"valid",
"RFS",
"name",
"for",
"the",
"given",
"filename",
"that",
"contains",
"a",
"coded",
"version",
"of",
"the",
"given",
"parameters",
"with",
"the",
"given",
"file",
"extension",
"appended",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/staticexport/CmsStaticExportManager.java#L317-L335 |
HanSolo/SteelSeries-Swing | src/main/java/eu/hansolo/steelseries/tools/GradientWrapper.java | GradientWrapper.copyArrays | private void copyArrays(final float[] FRACTIONS, final Color[] colors) {
fractions = new float[FRACTIONS.length];
System.arraycopy(FRACTIONS, 0, fractions, 0, FRACTIONS.length);
this.colors = colors.clone();
} | java | private void copyArrays(final float[] FRACTIONS, final Color[] colors) {
fractions = new float[FRACTIONS.length];
System.arraycopy(FRACTIONS, 0, fractions, 0, FRACTIONS.length);
this.colors = colors.clone();
} | [
"private",
"void",
"copyArrays",
"(",
"final",
"float",
"[",
"]",
"FRACTIONS",
",",
"final",
"Color",
"[",
"]",
"colors",
")",
"{",
"fractions",
"=",
"new",
"float",
"[",
"FRACTIONS",
".",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"FRACTIONS",... | Just create a local copy of the fractions and colors array
@param FRACTIONS
@param colors | [
"Just",
"create",
"a",
"local",
"copy",
"of",
"the",
"fractions",
"and",
"colors",
"array"
] | train | https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/tools/GradientWrapper.java#L161-L165 |
derari/cthul | xml/src/main/java/org/cthul/resolve/ResolvingException.java | ResolvingException.againAs | public <T1 extends Throwable>
RuntimeException againAs(Class<T1> t1)
throws T1 {
return againAs(t1, NULL_EX, NULL_EX, NULL_EX);
} | java | public <T1 extends Throwable>
RuntimeException againAs(Class<T1> t1)
throws T1 {
return againAs(t1, NULL_EX, NULL_EX, NULL_EX);
} | [
"public",
"<",
"T1",
"extends",
"Throwable",
">",
"RuntimeException",
"againAs",
"(",
"Class",
"<",
"T1",
">",
"t1",
")",
"throws",
"T1",
"{",
"return",
"againAs",
"(",
"t1",
",",
"NULL_EX",
",",
"NULL_EX",
",",
"NULL_EX",
")",
";",
"}"
] | Throws the {@linkplain #getResolvingCause() cause} if it is the
specified type, otherwise returns a
{@linkplain #asRuntimeException() runtime exception}.
<p>
Intended to be written as {@code throw e.againAs(IOException.class)}.
@param <T1>
@param t1
@return
@throws T1 | [
"Throws",
"the",
"{"
] | train | https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/xml/src/main/java/org/cthul/resolve/ResolvingException.java#L143-L147 |
zhangguangyong/codes | codes-persistent-hibernate/src/main/java/com/codes/persistence/hibernate/dao/QueryParameterWrap.java | QueryParameterWrap.addParameters | public QueryParameterWrap addParameters(String name, Object first, Object second,
Object... rest) {
List<Object> parameters = new ArrayList<Object>();
parameters.add(first);
parameters.add(second);
if (notEmpty(rest)) {
parameters.addAll(Arrays.asList(rest));
}
return addParameters(name, param... | java | public QueryParameterWrap addParameters(String name, Object first, Object second,
Object... rest) {
List<Object> parameters = new ArrayList<Object>();
parameters.add(first);
parameters.add(second);
if (notEmpty(rest)) {
parameters.addAll(Arrays.asList(rest));
}
return addParameters(name, param... | [
"public",
"QueryParameterWrap",
"addParameters",
"(",
"String",
"name",
",",
"Object",
"first",
",",
"Object",
"second",
",",
"Object",
"...",
"rest",
")",
"{",
"List",
"<",
"Object",
">",
"parameters",
"=",
"new",
"ArrayList",
"<",
"Object",
">",
"(",
")"... | 添加命名的参数 :propertyName ->命名的参数
@param name
@param first
第一个,不能为空
@param second
第二个,不能为空
@param rest
后面的,可为空
@return | [
"添加命名的参数",
":",
"propertyName",
"-",
">",
"命名的参数"
] | train | https://github.com/zhangguangyong/codes/blob/5585c17ea46af665582734f399c05dfbba18c30d/codes-persistent-hibernate/src/main/java/com/codes/persistence/hibernate/dao/QueryParameterWrap.java#L128-L137 |
apache/flink | flink-scala-shell/src/main/java/org/apache/flink/api/java/JarHelper.java | JarHelper.jarDir | public void jarDir(File dirOrFile2Jar, File destJar)
throws IOException {
if (dirOrFile2Jar == null || destJar == null) {
throw new IllegalArgumentException();
}
mDestJarName = destJar.getCanonicalPath();
FileOutputStream fout = new FileOutputStream(destJar);
JarOutputStream jout = new JarOutputStream(... | java | public void jarDir(File dirOrFile2Jar, File destJar)
throws IOException {
if (dirOrFile2Jar == null || destJar == null) {
throw new IllegalArgumentException();
}
mDestJarName = destJar.getCanonicalPath();
FileOutputStream fout = new FileOutputStream(destJar);
JarOutputStream jout = new JarOutputStream(... | [
"public",
"void",
"jarDir",
"(",
"File",
"dirOrFile2Jar",
",",
"File",
"destJar",
")",
"throws",
"IOException",
"{",
"if",
"(",
"dirOrFile2Jar",
"==",
"null",
"||",
"destJar",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",... | Jars a given directory or single file into a JarOutputStream. | [
"Jars",
"a",
"given",
"directory",
"or",
"single",
"file",
"into",
"a",
"JarOutputStream",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-scala-shell/src/main/java/org/apache/flink/api/java/JarHelper.java#L71-L90 |
ops4j/org.ops4j.pax.swissbox | pax-swissbox-core/src/main/java/org/ops4j/pax/swissbox/core/BundleUtils.java | BundleUtils.getBundle | public static Bundle getBundle( BundleContext bc, String symbolicName )
{
return getBundle( bc, symbolicName, null );
} | java | public static Bundle getBundle( BundleContext bc, String symbolicName )
{
return getBundle( bc, symbolicName, null );
} | [
"public",
"static",
"Bundle",
"getBundle",
"(",
"BundleContext",
"bc",
",",
"String",
"symbolicName",
")",
"{",
"return",
"getBundle",
"(",
"bc",
",",
"symbolicName",
",",
"null",
")",
";",
"}"
] | Returns any bundle with the given symbolic name, or null if no such bundle exists. If there
are multiple bundles with the same symbolic name and different version, this method returns
the first bundle found.
@param bc bundle context
@param symbolicName bundle symbolic name
@return matching bundle, or null | [
"Returns",
"any",
"bundle",
"with",
"the",
"given",
"symbolic",
"name",
"or",
"null",
"if",
"no",
"such",
"bundle",
"exists",
".",
"If",
"there",
"are",
"multiple",
"bundles",
"with",
"the",
"same",
"symbolic",
"name",
"and",
"different",
"version",
"this",
... | train | https://github.com/ops4j/org.ops4j.pax.swissbox/blob/00b0ee16cdbe8017984a4d7ba808b10d985c5b5c/pax-swissbox-core/src/main/java/org/ops4j/pax/swissbox/core/BundleUtils.java#L94-L97 |
apache/incubator-gobblin | gobblin-compaction/src/main/java/org/apache/gobblin/compaction/event/CompactionSlaEventHelper.java | CompactionSlaEventHelper.getEventSubmitterBuilder | public static SlaEventSubmitterBuilder getEventSubmitterBuilder(Dataset dataset, Optional<Job> job, FileSystem fs) {
SlaEventSubmitterBuilder builder =
SlaEventSubmitter.builder().datasetUrn(dataset.getUrn())
.partition(dataset.jobProps().getProp(MRCompactor.COMPACTION_JOB_DEST_PARTITION, ""))
... | java | public static SlaEventSubmitterBuilder getEventSubmitterBuilder(Dataset dataset, Optional<Job> job, FileSystem fs) {
SlaEventSubmitterBuilder builder =
SlaEventSubmitter.builder().datasetUrn(dataset.getUrn())
.partition(dataset.jobProps().getProp(MRCompactor.COMPACTION_JOB_DEST_PARTITION, ""))
... | [
"public",
"static",
"SlaEventSubmitterBuilder",
"getEventSubmitterBuilder",
"(",
"Dataset",
"dataset",
",",
"Optional",
"<",
"Job",
">",
"job",
",",
"FileSystem",
"fs",
")",
"{",
"SlaEventSubmitterBuilder",
"builder",
"=",
"SlaEventSubmitter",
".",
"builder",
"(",
"... | Get an {@link SlaEventSubmitterBuilder} that has dataset urn, partition, record count, previous publish timestamp
and dedupe status set.
The caller MUST set eventSubmitter, eventname before submitting. | [
"Get",
"an",
"{"
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/event/CompactionSlaEventHelper.java#L71-L93 |
code4everything/util | src/main/java/com/zhazhapan/util/FileExecutor.java | FileExecutor.saveFile | public static synchronized void saveFile(File file, String content, boolean append) throws IOException {
if (Checker.isNotNull(file)) {
if (!file.exists()) {
file.createNewFile();
}
try (BufferedWriter out = new BufferedWriter(new FileWriter(file, append))) {
... | java | public static synchronized void saveFile(File file, String content, boolean append) throws IOException {
if (Checker.isNotNull(file)) {
if (!file.exists()) {
file.createNewFile();
}
try (BufferedWriter out = new BufferedWriter(new FileWriter(file, append))) {
... | [
"public",
"static",
"synchronized",
"void",
"saveFile",
"(",
"File",
"file",
",",
"String",
"content",
",",
"boolean",
"append",
")",
"throws",
"IOException",
"{",
"if",
"(",
"Checker",
".",
"isNotNull",
"(",
"file",
")",
")",
"{",
"if",
"(",
"!",
"file"... | 保存文件
@param file 文件
@param content 内容
@param append 保存方式
@throws IOException 异常 | [
"保存文件"
] | train | https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L980-L990 |
pravega/pravega | client/src/main/java/io/pravega/client/stream/impl/ReaderGroupStateManager.java | ReaderGroupStateManager.readerShutdown | static void readerShutdown(String readerId, Position lastPosition, StateSynchronizer<ReaderGroupState> sync) {
sync.updateState((state, updates) -> {
Set<Segment> segments = state.getSegments(readerId);
if (segments == null) {
return;
}
log.debug("... | java | static void readerShutdown(String readerId, Position lastPosition, StateSynchronizer<ReaderGroupState> sync) {
sync.updateState((state, updates) -> {
Set<Segment> segments = state.getSegments(readerId);
if (segments == null) {
return;
}
log.debug("... | [
"static",
"void",
"readerShutdown",
"(",
"String",
"readerId",
",",
"Position",
"lastPosition",
",",
"StateSynchronizer",
"<",
"ReaderGroupState",
">",
"sync",
")",
"{",
"sync",
".",
"updateState",
"(",
"(",
"state",
",",
"updates",
")",
"->",
"{",
"Set",
"<... | Shuts down a reader, releasing all of its segments. The reader should cease all operations.
@param lastPosition The last position the reader successfully read from. | [
"Shuts",
"down",
"a",
"reader",
"releasing",
"all",
"of",
"its",
"segments",
".",
"The",
"reader",
"should",
"cease",
"all",
"operations",
"."
] | train | https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/client/src/main/java/io/pravega/client/stream/impl/ReaderGroupStateManager.java#L133-L143 |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.core/src/com/ibm/websphere/ras/DataFormatHelper.java | DataFormatHelper.printFieldStackTrace | private static final boolean printFieldStackTrace(PrintWriter p, Throwable t, String className, String fieldName) {
for (Class<?> c = t.getClass(); c != Object.class; c = c.getSuperclass()) {
if (c.getName().equals(className)) {
try {
Object value = c.getField(fie... | java | private static final boolean printFieldStackTrace(PrintWriter p, Throwable t, String className, String fieldName) {
for (Class<?> c = t.getClass(); c != Object.class; c = c.getSuperclass()) {
if (c.getName().equals(className)) {
try {
Object value = c.getField(fie... | [
"private",
"static",
"final",
"boolean",
"printFieldStackTrace",
"(",
"PrintWriter",
"p",
",",
"Throwable",
"t",
",",
"String",
"className",
",",
"String",
"fieldName",
")",
"{",
"for",
"(",
"Class",
"<",
"?",
">",
"c",
"=",
"t",
".",
"getClass",
"(",
")... | Find a field value in the class hierarchy of an exception, and if the
field contains another Throwable, then print its stack trace.
@param p the writer to print to
@param t the outer throwable
@param className the name of the class to look for
@param fieldName the field in the class to look for
@return true if the fie... | [
"Find",
"a",
"field",
"value",
"in",
"the",
"class",
"hierarchy",
"of",
"an",
"exception",
"and",
"if",
"the",
"field",
"contains",
"another",
"Throwable",
"then",
"print",
"its",
"stack",
"trace",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.core/src/com/ibm/websphere/ras/DataFormatHelper.java#L260-L277 |
OpenLiberty/open-liberty | dev/com.ibm.ws.install.map/src/com/ibm/ws/install/map/InstallMap.java | InstallMap.sortFile | public static void sortFile(List<File> jarsList, final String fName) {
Collections.sort(jarsList, new Comparator<File>() {
@Override
public int compare(File f1, File f2) {
String f1Name = f1.getName();
f1Name = f1Name.substring(fName.length() + 1, f1Name.l... | java | public static void sortFile(List<File> jarsList, final String fName) {
Collections.sort(jarsList, new Comparator<File>() {
@Override
public int compare(File f1, File f2) {
String f1Name = f1.getName();
f1Name = f1Name.substring(fName.length() + 1, f1Name.l... | [
"public",
"static",
"void",
"sortFile",
"(",
"List",
"<",
"File",
">",
"jarsList",
",",
"final",
"String",
"fName",
")",
"{",
"Collections",
".",
"sort",
"(",
"jarsList",
",",
"new",
"Comparator",
"<",
"File",
">",
"(",
")",
"{",
"@",
"Override",
"publ... | Compare files in jarsList based on file name's length
Sort the files depending on the comparison
@param jarsList -abstract representation of file/directory names
@param fName - name of file | [
"Compare",
"files",
"in",
"jarsList",
"based",
"on",
"file",
"name",
"s",
"length",
"Sort",
"the",
"files",
"depending",
"on",
"the",
"comparison"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.install.map/src/com/ibm/ws/install/map/InstallMap.java#L323-L338 |
OpenLiberty/open-liberty | dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/persistent/htod/HashtableOnDisk.java | HashtableOnDisk.getInstance | static public HashtableOnDisk getInstance(FileManager filemgr,
boolean auto_rehash,
long instanceid,
boolean hasCacheValue,
HTODDynacach... | java | static public HashtableOnDisk getInstance(FileManager filemgr,
boolean auto_rehash,
long instanceid,
boolean hasCacheValue,
HTODDynacach... | [
"static",
"public",
"HashtableOnDisk",
"getInstance",
"(",
"FileManager",
"filemgr",
",",
"boolean",
"auto_rehash",
",",
"long",
"instanceid",
",",
"boolean",
"hasCacheValue",
",",
"HTODDynacache",
"htoddc",
")",
"throws",
"FileManagerException",
",",
"ClassNotFoundExce... | ***********************************************************************
getInstance. Initializes a HashtableOnDisk instance over the specified
FileManager, from the specified instanceid. The instanceid was
used to originally create the instance in the createInstance method.
@param filemgr The FileManager for the HTOD.... | [
"***********************************************************************",
"getInstance",
".",
"Initializes",
"a",
"HashtableOnDisk",
"instance",
"over",
"the",
"specified",
"FileManager",
"from",
"the",
"specified",
"instanceid",
".",
"The",
"instanceid",
"was",
"used",
"to"... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/persistent/htod/HashtableOnDisk.java#L353-L363 |
raydac/java-binary-block-parser | jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java | JBBPDslBuilder.UShort | public JBBPDslBuilder UShort(final String name) {
final Item item = new Item(BinType.USHORT, name, this.byteOrder);
this.addItem(item);
return this;
} | java | public JBBPDslBuilder UShort(final String name) {
final Item item = new Item(BinType.USHORT, name, this.byteOrder);
this.addItem(item);
return this;
} | [
"public",
"JBBPDslBuilder",
"UShort",
"(",
"final",
"String",
"name",
")",
"{",
"final",
"Item",
"item",
"=",
"new",
"Item",
"(",
"BinType",
".",
"USHORT",
",",
"name",
",",
"this",
".",
"byteOrder",
")",
";",
"this",
".",
"addItem",
"(",
"item",
")",
... | Add named unsigned short field.
@param name name of the field, can be null for anonymous
@return the builder instance, must not be null | [
"Add",
"named",
"unsigned",
"short",
"field",
"."
] | train | https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java#L1025-L1029 |
drinkjava2/jDialects | core/src/main/java/com/github/drinkjava2/jdialects/GuessDialectUtils.java | GuessDialectUtils.guessDialect | public static Dialect guessDialect(Connection jdbcConnection) {
String databaseName;
String driverName;
int majorVersion;
int minorVersion;
try {
DatabaseMetaData meta = jdbcConnection.getMetaData();
driverName = meta.getDriverName();
databaseName = meta.getDatabaseProductName();
majorVersion = me... | java | public static Dialect guessDialect(Connection jdbcConnection) {
String databaseName;
String driverName;
int majorVersion;
int minorVersion;
try {
DatabaseMetaData meta = jdbcConnection.getMetaData();
driverName = meta.getDriverName();
databaseName = meta.getDatabaseProductName();
majorVersion = me... | [
"public",
"static",
"Dialect",
"guessDialect",
"(",
"Connection",
"jdbcConnection",
")",
"{",
"String",
"databaseName",
";",
"String",
"driverName",
";",
"int",
"majorVersion",
";",
"int",
"minorVersion",
";",
"try",
"{",
"DatabaseMetaData",
"meta",
"=",
"jdbcConn... | Guess dialect based on given JDBC connection instance, Note: this method does
not close connection
@param jdbcConnection
The connection
@return dialect or null if can not guess out which dialect | [
"Guess",
"dialect",
"based",
"on",
"given",
"JDBC",
"connection",
"instance",
"Note",
":",
"this",
"method",
"does",
"not",
"close",
"connection"
] | train | https://github.com/drinkjava2/jDialects/blob/1c165f09c6042a599b681c279024abcc1b848b88/core/src/main/java/com/github/drinkjava2/jdialects/GuessDialectUtils.java#L40-L55 |
facebook/fresco | imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java | PlatformBitmapFactory.createBitmap | public CloseableReference<Bitmap> createBitmap(
int width,
int height,
Bitmap.Config bitmapConfig,
@Nullable Object callerContext) {
return createBitmapInternal(width, height, bitmapConfig);
} | java | public CloseableReference<Bitmap> createBitmap(
int width,
int height,
Bitmap.Config bitmapConfig,
@Nullable Object callerContext) {
return createBitmapInternal(width, height, bitmapConfig);
} | [
"public",
"CloseableReference",
"<",
"Bitmap",
">",
"createBitmap",
"(",
"int",
"width",
",",
"int",
"height",
",",
"Bitmap",
".",
"Config",
"bitmapConfig",
",",
"@",
"Nullable",
"Object",
"callerContext",
")",
"{",
"return",
"createBitmapInternal",
"(",
"width"... | Creates a bitmap of the specified width and height.
@param width the width of the bitmap
@param height the height of the bitmap
@param bitmapConfig the Bitmap.Config used to create the Bitmap
@param callerContext the Tag to track who create the Bitmap
@return a reference to the bitmap
@throws TooManyBitmapsException i... | [
"Creates",
"a",
"bitmap",
"of",
"the",
"specified",
"width",
"and",
"height",
"."
] | train | https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java#L69-L75 |
grails/grails-core | grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java | GrailsASTUtils.addCompileStaticAnnotation | public static AnnotatedNode addCompileStaticAnnotation(AnnotatedNode annotatedNode, boolean skip) {
if(annotatedNode != null) {
AnnotationNode an = new AnnotationNode(COMPILESTATIC_CLASS_NODE);
if(skip) {
an.addMember("value", new PropertyExpression(new ClassExpression(TY... | java | public static AnnotatedNode addCompileStaticAnnotation(AnnotatedNode annotatedNode, boolean skip) {
if(annotatedNode != null) {
AnnotationNode an = new AnnotationNode(COMPILESTATIC_CLASS_NODE);
if(skip) {
an.addMember("value", new PropertyExpression(new ClassExpression(TY... | [
"public",
"static",
"AnnotatedNode",
"addCompileStaticAnnotation",
"(",
"AnnotatedNode",
"annotatedNode",
",",
"boolean",
"skip",
")",
"{",
"if",
"(",
"annotatedNode",
"!=",
"null",
")",
"{",
"AnnotationNode",
"an",
"=",
"new",
"AnnotationNode",
"(",
"COMPILESTATIC_... | Adds @CompileStatic annotation to method
@param annotatedNode
@param skip
@return The annotated method | [
"Adds",
"@CompileStatic",
"annotation",
"to",
"method"
] | train | https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L1178-L1190 |
OpenLiberty/open-liberty | dev/com.ibm.ws.channelfw/src/com/ibm/websphere/channelfw/ChannelUtils.java | ChannelUtils.printThreadStackTrace | public static void printThreadStackTrace(TraceComponent logger, Thread thread) {
if (logger.isDebugEnabled()) {
chTrace.traceThreadStack(logger, thread);
}
} | java | public static void printThreadStackTrace(TraceComponent logger, Thread thread) {
if (logger.isDebugEnabled()) {
chTrace.traceThreadStack(logger, thread);
}
} | [
"public",
"static",
"void",
"printThreadStackTrace",
"(",
"TraceComponent",
"logger",
",",
"Thread",
"thread",
")",
"{",
"if",
"(",
"logger",
".",
"isDebugEnabled",
"(",
")",
")",
"{",
"chTrace",
".",
"traceThreadStack",
"(",
"logger",
",",
"thread",
")",
";... | Print debug stacktrace using given trace component.
@param logger
@param thread | [
"Print",
"debug",
"stacktrace",
"using",
"given",
"trace",
"component",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/websphere/channelfw/ChannelUtils.java#L94-L98 |
rythmengine/rythmengine | src/main/java/org/rythmengine/internal/ExtensionManager.java | ExtensionManager.registerUserDefinedParsers | public ExtensionManager registerUserDefinedParsers(String dialect, IParserFactory... parsers) {
engine.dialectManager().registerExternalParsers(dialect, parsers);
return this;
} | java | public ExtensionManager registerUserDefinedParsers(String dialect, IParserFactory... parsers) {
engine.dialectManager().registerExternalParsers(dialect, parsers);
return this;
} | [
"public",
"ExtensionManager",
"registerUserDefinedParsers",
"(",
"String",
"dialect",
",",
"IParserFactory",
"...",
"parsers",
")",
"{",
"engine",
".",
"dialectManager",
"(",
")",
".",
"registerExternalParsers",
"(",
"dialect",
",",
"parsers",
")",
";",
"return",
... | Register a special case parser to a dialect
<p/>
<p>for example, the play-rythm plugin might want to register a special case parser to
process something like @{Controller.actionMethod()} or &{'MSG_ID'} etc to "japid"
and "play-groovy" dialects
@param dialect
@param parsers | [
"Register",
"a",
"special",
"case",
"parser",
"to",
"a",
"dialect",
"<p",
"/",
">",
"<p",
">",
"for",
"example",
"the",
"play",
"-",
"rythm",
"plugin",
"might",
"want",
"to",
"register",
"a",
"special",
"case",
"parser",
"to",
"process",
"something",
"li... | train | https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/internal/ExtensionManager.java#L69-L72 |
deephacks/confit | api-model/src/main/java/org/deephacks/confit/model/Bean.java | Bean.addReference | public void addReference(final String propertyName, final Collection<BeanId> refs) {
Preconditions.checkNotNull(refs);
Preconditions.checkNotNull(propertyName);
checkCircularReference(refs.toArray(new BeanId[refs.size()]));
List<BeanId> list = references.get(propertyName);
if (li... | java | public void addReference(final String propertyName, final Collection<BeanId> refs) {
Preconditions.checkNotNull(refs);
Preconditions.checkNotNull(propertyName);
checkCircularReference(refs.toArray(new BeanId[refs.size()]));
List<BeanId> list = references.get(propertyName);
if (li... | [
"public",
"void",
"addReference",
"(",
"final",
"String",
"propertyName",
",",
"final",
"Collection",
"<",
"BeanId",
">",
"refs",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"refs",
")",
";",
"Preconditions",
".",
"checkNotNull",
"(",
"propertyName",
... | Add a list of references to a property on this bean.
A reference identify other beans based on schema and instance id.
@param propertyName name of the property as defined by the bean's schema.
@param refs the reference as defined by the bean's schema. | [
"Add",
"a",
"list",
"of",
"references",
"to",
"a",
"property",
"on",
"this",
"bean",
"."
] | train | https://github.com/deephacks/confit/blob/4e6d4ee5fed32cbc5104433e61de1bcf1b360832/api-model/src/main/java/org/deephacks/confit/model/Bean.java#L286-L298 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToXMLStream.java | ToXMLStream.pushNamespace | protected boolean pushNamespace(String prefix, String uri)
{
try
{
if (m_prefixMap.pushNamespace(
prefix, uri, m_elemContext.m_currentElemDepth))
{
startPrefixMapping(prefix, uri);
return true;
}
}
ca... | java | protected boolean pushNamespace(String prefix, String uri)
{
try
{
if (m_prefixMap.pushNamespace(
prefix, uri, m_elemContext.m_currentElemDepth))
{
startPrefixMapping(prefix, uri);
return true;
}
}
ca... | [
"protected",
"boolean",
"pushNamespace",
"(",
"String",
"prefix",
",",
"String",
"uri",
")",
"{",
"try",
"{",
"if",
"(",
"m_prefixMap",
".",
"pushNamespace",
"(",
"prefix",
",",
"uri",
",",
"m_elemContext",
".",
"m_currentElemDepth",
")",
")",
"{",
"startPre... | From XSLTC
Declare a prefix to point to a namespace URI. Inform SAX handler
if this is a new prefix mapping. | [
"From",
"XSLTC",
"Declare",
"a",
"prefix",
"to",
"point",
"to",
"a",
"namespace",
"URI",
".",
"Inform",
"SAX",
"handler",
"if",
"this",
"is",
"a",
"new",
"prefix",
"mapping",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToXMLStream.java#L557-L573 |
netceteragroup/valdr-bean-validation | valdr-bean-validation/src/main/java/com/github/valdr/thirdparty/spring/AnnotationUtils.java | AnnotationUtils.isAnnotationInherited | public static boolean isAnnotationInherited(Class<? extends Annotation> annotationType, Class<?> clazz) {
return (clazz.isAnnotationPresent(annotationType) && !isAnnotationDeclaredLocally(annotationType, clazz));
} | java | public static boolean isAnnotationInherited(Class<? extends Annotation> annotationType, Class<?> clazz) {
return (clazz.isAnnotationPresent(annotationType) && !isAnnotationDeclaredLocally(annotationType, clazz));
} | [
"public",
"static",
"boolean",
"isAnnotationInherited",
"(",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"annotationType",
",",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"return",
"(",
"clazz",
".",
"isAnnotationPresent",
"(",
"annotationType",
")",
"&&"... | Determine whether an annotation for the specified {@code annotationType} is present
on the supplied {@code clazz} and is {@linkplain java.lang.annotation.Inherited inherited}
(i.e., not declared locally for the class).
<p>If the supplied {@code clazz} is an interface, only the interface itself will be checked.
In accor... | [
"Determine",
"whether",
"an",
"annotation",
"for",
"the",
"specified",
"{"
] | train | https://github.com/netceteragroup/valdr-bean-validation/blob/3f49f1357c575a11331be2de867cf47809a83823/valdr-bean-validation/src/main/java/com/github/valdr/thirdparty/spring/AnnotationUtils.java#L303-L305 |
xcesco/kripton | kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLChecker.java | JQLChecker.extractPlaceHoldersAsSet | public Set<JQLPlaceHolder> extractPlaceHoldersAsSet(final JQLContext jqlContext, String jql) {
return extractPlaceHolders(jqlContext, jql, new LinkedHashSet<JQLPlaceHolder>());
} | java | public Set<JQLPlaceHolder> extractPlaceHoldersAsSet(final JQLContext jqlContext, String jql) {
return extractPlaceHolders(jqlContext, jql, new LinkedHashSet<JQLPlaceHolder>());
} | [
"public",
"Set",
"<",
"JQLPlaceHolder",
">",
"extractPlaceHoldersAsSet",
"(",
"final",
"JQLContext",
"jqlContext",
",",
"String",
"jql",
")",
"{",
"return",
"extractPlaceHolders",
"(",
"jqlContext",
",",
"jql",
",",
"new",
"LinkedHashSet",
"<",
"JQLPlaceHolder",
"... | Extract all bind parameters and dynamic part used in query.
@param jqlContext
the jql context
@param jql
the jql
@return the sets the | [
"Extract",
"all",
"bind",
"parameters",
"and",
"dynamic",
"part",
"used",
"in",
"query",
"."
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/grammars/jql/JQLChecker.java#L833-L835 |
opencb/biodata | biodata-tools/src/main/java/org/opencb/biodata/tools/feature/WigUtils.java | WigUtils.getHeaderInfo | private static String getHeaderInfo(String name, String headerLine) {
String[] fields = headerLine.split("[\t ]");
for (String field : fields) {
if (field.startsWith(name + "=")) {
String[] subfields = field.split("=");
return subfields[1];
}
... | java | private static String getHeaderInfo(String name, String headerLine) {
String[] fields = headerLine.split("[\t ]");
for (String field : fields) {
if (field.startsWith(name + "=")) {
String[] subfields = field.split("=");
return subfields[1];
}
... | [
"private",
"static",
"String",
"getHeaderInfo",
"(",
"String",
"name",
",",
"String",
"headerLine",
")",
"{",
"String",
"[",
"]",
"fields",
"=",
"headerLine",
".",
"split",
"(",
"\"[\\t ]\"",
")",
";",
"for",
"(",
"String",
"field",
":",
"fields",
")",
"... | Get information from a Wig header line.
@param name Name of the information, e.g.: span, chrom, step,...
@param headerLine Header line where to search that information
@return Value of the information | [
"Get",
"information",
"from",
"a",
"Wig",
"header",
"line",
"."
] | train | https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/feature/WigUtils.java#L240-L249 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.