repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
204
func_name
stringlengths
5
103
whole_func_string
stringlengths
87
3.44k
language
stringclasses
1 value
func_code_string
stringlengths
87
3.44k
func_code_tokens
listlengths
21
714
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
482
split_name
stringclasses
1 value
func_code_url
stringlengths
102
309
daimajia/AndroidSwipeLayout
library/src/main/java/com/daimajia/swipe/SwipeLayout.java
SwipeLayout.addRevealListener
public void addRevealListener(int childId, OnRevealListener l) { View child = findViewById(childId); if (child == null) { throw new IllegalArgumentException("Child does not belong to SwipeListener."); } if (!mShowEntirely.containsKey(child)) { mShowEntirely.put(c...
java
public void addRevealListener(int childId, OnRevealListener l) { View child = findViewById(childId); if (child == null) { throw new IllegalArgumentException("Child does not belong to SwipeListener."); } if (!mShowEntirely.containsKey(child)) { mShowEntirely.put(c...
[ "public", "void", "addRevealListener", "(", "int", "childId", ",", "OnRevealListener", "l", ")", "{", "View", "child", "=", "findViewById", "(", "childId", ")", ";", "if", "(", "child", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(",...
bind a view with a specific {@link com.daimajia.swipe.SwipeLayout.OnRevealListener} @param childId the view id. @param l the target {@link com.daimajia.swipe.SwipeLayout.OnRevealListener}
[ "bind", "a", "view", "with", "a", "specific", "{", "@link", "com", ".", "daimajia", ".", "swipe", ".", "SwipeLayout", ".", "OnRevealListener", "}" ]
train
https://github.com/daimajia/AndroidSwipeLayout/blob/5f8678b04751fb8510a88586b22e07ccf64bca99/library/src/main/java/com/daimajia/swipe/SwipeLayout.java#L176-L189
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/arrays/DoubleIntegerArrayQuickSort.java
DoubleIntegerArrayQuickSort.insertionSort
private static void insertionSort(double[] keys, int[] vals, final int start, final int end) { // Classic insertion sort. for(int i = start + 1; i < end; i++) { for(int j = i; j > start; j--) { if(keys[j] >= keys[j - 1]) { break; } swap(keys, vals, j, j - 1); } ...
java
private static void insertionSort(double[] keys, int[] vals, final int start, final int end) { // Classic insertion sort. for(int i = start + 1; i < end; i++) { for(int j = i; j > start; j--) { if(keys[j] >= keys[j - 1]) { break; } swap(keys, vals, j, j - 1); } ...
[ "private", "static", "void", "insertionSort", "(", "double", "[", "]", "keys", ",", "int", "[", "]", "vals", ",", "final", "int", "start", ",", "final", "int", "end", ")", "{", "// Classic insertion sort.", "for", "(", "int", "i", "=", "start", "+", "1...
Sort via insertion sort. @param keys Keys @param vals Values @param start Interval start @param end Interval end
[ "Sort", "via", "insertion", "sort", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/arrays/DoubleIntegerArrayQuickSort.java#L195-L205
primefaces/primefaces
src/main/java/org/primefaces/renderkit/CoreRenderer.java
CoreRenderer.renderDummyMarkup
protected void renderDummyMarkup(FacesContext context, UIComponent component, String clientId) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement("div", null); writer.writeAttribute("id", clientId, null); writer.writeAttribute("style", "display...
java
protected void renderDummyMarkup(FacesContext context, UIComponent component, String clientId) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement("div", null); writer.writeAttribute("id", clientId, null); writer.writeAttribute("style", "display...
[ "protected", "void", "renderDummyMarkup", "(", "FacesContext", "context", ",", "UIComponent", "component", ",", "String", "clientId", ")", "throws", "IOException", "{", "ResponseWriter", "writer", "=", "context", ".", "getResponseWriter", "(", ")", ";", "writer", ...
Used by script-only widget to fix #3265 and allow updating of the component. @param context the {@link FacesContext}. @param component the widget without actual HTML markup. @param clientId the component clientId. @throws IOException
[ "Used", "by", "script", "-", "only", "widget", "to", "fix", "#3265", "and", "allow", "updating", "of", "the", "component", "." ]
train
https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/renderkit/CoreRenderer.java#L821-L831
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/complex/CmsDataViewClientWidget.java
CmsDataViewClientWidget.isTrue
private boolean isTrue(JSONObject obj, String property) { JSONValue val = obj.get(property); if (val == null) { return false; } boolean stringTrue = ((val.isString() != null) && Boolean.parseBoolean(val.isString().stringValue())); boolean boolTrue = ((val.isBoolean()...
java
private boolean isTrue(JSONObject obj, String property) { JSONValue val = obj.get(property); if (val == null) { return false; } boolean stringTrue = ((val.isString() != null) && Boolean.parseBoolean(val.isString().stringValue())); boolean boolTrue = ((val.isBoolean()...
[ "private", "boolean", "isTrue", "(", "JSONObject", "obj", ",", "String", "property", ")", "{", "JSONValue", "val", "=", "obj", ".", "get", "(", "property", ")", ";", "if", "(", "val", "==", "null", ")", "{", "return", "false", ";", "}", "boolean", "s...
Checks if a property in a JSON object is either the boolean value 'true' or a string representation of that value.<p> @param obj the JSON object @param property the property name @return true if the value represents the boolean 'true'
[ "Checks", "if", "a", "property", "in", "a", "JSON", "object", "is", "either", "the", "boolean", "value", "true", "or", "a", "string", "representation", "of", "that", "value", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/complex/CmsDataViewClientWidget.java#L198-L207
OpenLiberty/open-liberty
dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/web/utils/SocialWebUtils.java
SocialWebUtils.removeRequestUrlAndParameters
public void removeRequestUrlAndParameters(HttpServletRequest request, HttpServletResponse response) { ReferrerURLCookieHandler referrerURLCookieHandler = getCookieHandler(); referrerURLCookieHandler.invalidateReferrerURLCookie(request, response, ReferrerURLCookieHandler.REFERRER_URL_COOKIENAME); ...
java
public void removeRequestUrlAndParameters(HttpServletRequest request, HttpServletResponse response) { ReferrerURLCookieHandler referrerURLCookieHandler = getCookieHandler(); referrerURLCookieHandler.invalidateReferrerURLCookie(request, response, ReferrerURLCookieHandler.REFERRER_URL_COOKIENAME); ...
[ "public", "void", "removeRequestUrlAndParameters", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "{", "ReferrerURLCookieHandler", "referrerURLCookieHandler", "=", "getCookieHandler", "(", ")", ";", "referrerURLCookieHandler", ".", "invalid...
Invalidates the original request URL cookie or removes the same respective session attributes, depending on how the data was saved.
[ "Invalidates", "the", "original", "request", "URL", "cookie", "or", "removes", "the", "same", "respective", "session", "attributes", "depending", "on", "how", "the", "data", "was", "saved", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/web/utils/SocialWebUtils.java#L238-L248
inkstand-io/scribble
scribble-http/src/main/java/io/inkstand/scribble/http/rules/HttpServerBuilder.java
HttpServerBuilder.contentFrom
public HttpServerBuilder contentFrom(String contextRoot, String contentResource){ URL resource = resolver.resolve(contentResource,CallStack.getCallerClass()); resources.put(contextRoot, resource); return this; }
java
public HttpServerBuilder contentFrom(String contextRoot, String contentResource){ URL resource = resolver.resolve(contentResource,CallStack.getCallerClass()); resources.put(contextRoot, resource); return this; }
[ "public", "HttpServerBuilder", "contentFrom", "(", "String", "contextRoot", ",", "String", "contentResource", ")", "{", "URL", "resource", "=", "resolver", ".", "resolve", "(", "contentResource", ",", "CallStack", ".", "getCallerClass", "(", ")", ")", ";", "reso...
Defines a ZIP resource on the classpath that provides the static content the server should host. @param contextRoot the root path to the content @param contentResource the name of the classpath resource denoting a file that should be hosted. If the file denotes a zip file, its content is hosted instead of the file itse...
[ "Defines", "a", "ZIP", "resource", "on", "the", "classpath", "that", "provides", "the", "static", "content", "the", "server", "should", "host", "." ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-http/src/main/java/io/inkstand/scribble/http/rules/HttpServerBuilder.java#L86-L90
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/UcsApi.java
UcsApi.getContactDetails
public ApiSuccessResponse getContactDetails(String id, ContactDetailsData contactDetailsData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = getContactDetailsWithHttpInfo(id, contactDetailsData); return resp.getData(); }
java
public ApiSuccessResponse getContactDetails(String id, ContactDetailsData contactDetailsData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = getContactDetailsWithHttpInfo(id, contactDetailsData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "getContactDetails", "(", "String", "id", ",", "ContactDetailsData", "contactDetailsData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "getContactDetailsWithHttpInfo", "(", "id", ",", "c...
Get the details of a contact @param id id of the Contact (required) @param contactDetailsData (required) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Get", "the", "details", "of", "a", "contact" ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/UcsApi.java#L901-L904
google/truth
extensions/proto/src/main/java/com/google/common/truth/extensions/proto/IterableOfProtosSubject.java
IterableOfProtosSubject.ignoringFieldDescriptors
public IterableOfProtosFluentAssertion<M> ignoringFieldDescriptors( FieldDescriptor firstFieldDescriptor, FieldDescriptor... rest) { return ignoringFieldDescriptors(asList(firstFieldDescriptor, rest)); }
java
public IterableOfProtosFluentAssertion<M> ignoringFieldDescriptors( FieldDescriptor firstFieldDescriptor, FieldDescriptor... rest) { return ignoringFieldDescriptors(asList(firstFieldDescriptor, rest)); }
[ "public", "IterableOfProtosFluentAssertion", "<", "M", ">", "ignoringFieldDescriptors", "(", "FieldDescriptor", "firstFieldDescriptor", ",", "FieldDescriptor", "...", "rest", ")", "{", "return", "ignoringFieldDescriptors", "(", "asList", "(", "firstFieldDescriptor", ",", ...
Excludes all message fields matching the given {@link FieldDescriptor}s from the comparison. <p>This method adds on any previous {@link FieldScope} related settings, overriding previous changes to ensure the specified fields are ignored recursively. All sub-fields of these field descriptors are ignored, no matter wher...
[ "Excludes", "all", "message", "fields", "matching", "the", "given", "{", "@link", "FieldDescriptor", "}", "s", "from", "the", "comparison", "." ]
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/extensions/proto/src/main/java/com/google/common/truth/extensions/proto/IterableOfProtosSubject.java#L922-L925
jcuda/jcurand
JCurandJava/src/main/java/jcuda/jcurand/JCurand.java
JCurand.curandGenerate
public static int curandGenerate(curandGenerator generator, Pointer outputPtr, long num) { return checkResult(curandGenerateNative(generator, outputPtr, num)); }
java
public static int curandGenerate(curandGenerator generator, Pointer outputPtr, long num) { return checkResult(curandGenerateNative(generator, outputPtr, num)); }
[ "public", "static", "int", "curandGenerate", "(", "curandGenerator", "generator", ",", "Pointer", "outputPtr", ",", "long", "num", ")", "{", "return", "checkResult", "(", "curandGenerateNative", "(", "generator", ",", "outputPtr", ",", "num", ")", ")", ";", "}...
<pre> Generate 32-bit pseudo or quasirandom numbers. Use generator to generate num 32-bit results into the device memory at outputPtr. The device memory must have been previously allocated and be large enough to hold all the results. Launches are done with the stream set using ::curandSetStream(), or the null stream...
[ "<pre", ">", "Generate", "32", "-", "bit", "pseudo", "or", "quasirandom", "numbers", "." ]
train
https://github.com/jcuda/jcurand/blob/0f463d2bb72cd93b3988f7ce148cdb6069ba4fd9/JCurandJava/src/main/java/jcuda/jcurand/JCurand.java#L527-L530
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/StringUtils.java
StringUtils.swapCase
@GwtIncompatible("incompatible method") public static String swapCase(final String str) { if (StringUtils.isEmpty(str)) { return str; } final int strLen = str.length(); final int newCodePoints[] = new int[strLen]; // cannot be longer than the char array int outOf...
java
@GwtIncompatible("incompatible method") public static String swapCase(final String str) { if (StringUtils.isEmpty(str)) { return str; } final int strLen = str.length(); final int newCodePoints[] = new int[strLen]; // cannot be longer than the char array int outOf...
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "public", "static", "String", "swapCase", "(", "final", "String", "str", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "str", ")", ")", "{", "return", "str", ";", "}", "final", "int", ...
<p>Swaps the case of a String changing upper and title case to lower case, and lower case to upper case.</p> <ul> <li>Upper case character converts to Lower case</li> <li>Title case character converts to Lower case</li> <li>Lower case character converts to Upper case</li> </ul> <p>For a word based algorithm, see {@li...
[ "<p", ">", "Swaps", "the", "case", "of", "a", "String", "changing", "upper", "and", "title", "case", "to", "lower", "case", "and", "lower", "case", "to", "upper", "case", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L6815-L6840
jamesagnew/hapi-fhir
hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation/BaseValidator.java
BaseValidator.txWarning
protected boolean txWarning(List<ValidationMessage> errors, String txLink, IssueType type, int line, int col, String path, boolean thePass, String msg, Object... theMessageArguments) { if (!thePass) { msg = formatMessage(msg, theMessageArguments); errors.add(new ValidationMessage(Source.TerminologyEngin...
java
protected boolean txWarning(List<ValidationMessage> errors, String txLink, IssueType type, int line, int col, String path, boolean thePass, String msg, Object... theMessageArguments) { if (!thePass) { msg = formatMessage(msg, theMessageArguments); errors.add(new ValidationMessage(Source.TerminologyEngin...
[ "protected", "boolean", "txWarning", "(", "List", "<", "ValidationMessage", ">", "errors", ",", "String", "txLink", ",", "IssueType", "type", ",", "int", "line", ",", "int", "col", ",", "String", "path", ",", "boolean", "thePass", ",", "String", "msg", ","...
Test a rule and add a {@link IssueSeverity#WARNING} validation message if the validation fails @param thePass Set this parameter to <code>false</code> if the validation does not pass @return Returns <code>thePass</code> (in other words, returns <code>true</code> if the rule did not fail validation)
[ "Test", "a", "rule", "and", "add", "a", "{", "@link", "IssueSeverity#WARNING", "}", "validation", "message", "if", "the", "validation", "fails" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation/BaseValidator.java#L338-L345
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/model/globalfac/ConsecutiveSiblingsFactor.java
ConsecutiveSiblingsFactor.getLinkVar
public LinkVar getLinkVar(int parent, int child) { if (parent == -1) { return rootVars[child]; } else { return childVars[parent][child]; } }
java
public LinkVar getLinkVar(int parent, int child) { if (parent == -1) { return rootVars[child]; } else { return childVars[parent][child]; } }
[ "public", "LinkVar", "getLinkVar", "(", "int", "parent", ",", "int", "child", ")", "{", "if", "(", "parent", "==", "-", "1", ")", "{", "return", "rootVars", "[", "child", "]", ";", "}", "else", "{", "return", "childVars", "[", "parent", "]", "[", "...
Get the link var corresponding to the specified parent and child position. @param parent The parent word position, or -1 to indicate the wall node. @param child The child word position. @return The link variable.
[ "Get", "the", "link", "var", "corresponding", "to", "the", "specified", "parent", "and", "child", "position", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/model/globalfac/ConsecutiveSiblingsFactor.java#L179-L185
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/TreeCRI.java
TreeCRI.execute
public boolean execute(Context context) throws Exception { assert context != null; assert context instanceof WebChainContext; assert ((WebChainContext)context).getServletRequest() instanceof HttpServletRequest; assert ((WebChainContext)context).getServletResponse() instanceof Ht...
java
public boolean execute(Context context) throws Exception { assert context != null; assert context instanceof WebChainContext; assert ((WebChainContext)context).getServletRequest() instanceof HttpServletRequest; assert ((WebChainContext)context).getServletResponse() instanceof Ht...
[ "public", "boolean", "execute", "(", "Context", "context", ")", "throws", "Exception", "{", "assert", "context", "!=", "null", ";", "assert", "context", "instanceof", "WebChainContext", ";", "assert", "(", "(", "WebChainContext", ")", "context", ")", ".", "get...
Implementation of the {@link Command} interface for using this class as part of a Chain of Responsibility. @param context the Chain's context object @return <code>true</code> if the request was handled by this command; <code>false</code> otherwise @throws Exception any exception that is throw during processing
[ "Implementation", "of", "the", "{", "@link", "Command", "}", "interface", "for", "using", "this", "class", "as", "part", "of", "a", "Chain", "of", "Responsibility", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/TreeCRI.java#L65-L79
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/reportv2/ReportClient.java
ReportClient.getMessageStatistic
public MessageStatListResult getMessageStatistic(String timeUnit, String start, int duration) throws APIConnectionException, APIRequestException { Preconditions.checkArgument(verifyDateFormat(timeUnit, start), "Time format error, please check your argument"); if (timeUnit.equals("HOUR")) { ...
java
public MessageStatListResult getMessageStatistic(String timeUnit, String start, int duration) throws APIConnectionException, APIRequestException { Preconditions.checkArgument(verifyDateFormat(timeUnit, start), "Time format error, please check your argument"); if (timeUnit.equals("HOUR")) { ...
[ "public", "MessageStatListResult", "getMessageStatistic", "(", "String", "timeUnit", ",", "String", "start", ",", "int", "duration", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "Preconditions", ".", "checkArgument", "(", "verifyDateFormat", ...
Get message statistic. Detail instructions please refer to https://docs.jiguang.cn/jmessage/server/rest_api_im_report_v2/#_6 @param timeUnit MUST be one of HOUR, DAY, MONTH @param start start time, when timeUnit is HOUR, format: yyyy-MM-dd HH, @param duration depends on timeUnit, the duration has limit @return {@link M...
[ "Get", "message", "statistic", ".", "Detail", "instructions", "please", "refer", "to", "https", ":", "//", "docs", ".", "jiguang", ".", "cn", "/", "jmessage", "/", "server", "/", "rest_api_im_report_v2", "/", "#_6" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/reportv2/ReportClient.java#L273-L286
motown-io/motown
domain/core-api/src/main/java/io/motown/domain/api/chargingstation/NumberedTransactionId.java
NumberedTransactionId.numberFromTransactionIdString
private int numberFromTransactionIdString(ChargingStationId chargingStationId, String protocol, String transactionId) { String transactionIdPartBeforeNumber = String.format("%s_%s_", chargingStationId.getId(), protocol); try { return Integer.parseInt(transactionId.substring(transactionIdPart...
java
private int numberFromTransactionIdString(ChargingStationId chargingStationId, String protocol, String transactionId) { String transactionIdPartBeforeNumber = String.format("%s_%s_", chargingStationId.getId(), protocol); try { return Integer.parseInt(transactionId.substring(transactionIdPart...
[ "private", "int", "numberFromTransactionIdString", "(", "ChargingStationId", "chargingStationId", ",", "String", "protocol", ",", "String", "transactionId", ")", "{", "String", "transactionIdPartBeforeNumber", "=", "String", ".", "format", "(", "\"%s_%s_\"", ",", "charg...
Retrieves the number from a transaction id string. ChargingStationId and protocol are passed to make a better guess at the number. @param chargingStationId the charging station's identifier. @param protocol the protocol identifier. @param transactionId the transaction id containing the number. @r...
[ "Retrieves", "the", "number", "from", "a", "transaction", "id", "string", ".", "ChargingStationId", "and", "protocol", "are", "passed", "to", "make", "a", "better", "guess", "at", "the", "number", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/domain/core-api/src/main/java/io/motown/domain/api/chargingstation/NumberedTransactionId.java#L110-L117
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/Utils.java
Utils.putByteBuffer
public static void putByteBuffer(ByteBuffer source, ByteBuffer target) { if (source.hasArray()) { byte[] array = source.array(); int arrayOffset = source.arrayOffset(); target.put(array, arrayOffset + source.position(), source.remaining()); } else { ...
java
public static void putByteBuffer(ByteBuffer source, ByteBuffer target) { if (source.hasArray()) { byte[] array = source.array(); int arrayOffset = source.arrayOffset(); target.put(array, arrayOffset + source.position(), source.remaining()); } else { ...
[ "public", "static", "void", "putByteBuffer", "(", "ByteBuffer", "source", ",", "ByteBuffer", "target", ")", "{", "if", "(", "source", ".", "hasArray", "(", ")", ")", "{", "byte", "[", "]", "array", "=", "source", ".", "array", "(", ")", ";", "int", "...
Writes the contents of source to target without mutating source (so safe for multithreaded access to source) and without GC (unless source is a direct buffer).
[ "Writes", "the", "contents", "of", "source", "to", "target", "without", "mutating", "source", "(", "so", "safe", "for", "multithreaded", "access", "to", "source", ")", "and", "without", "GC", "(", "unless", "source", "is", "a", "direct", "buffer", ")", "."...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/Utils.java#L465-L474
apache/groovy
src/main/groovy/groovy/lang/Script.java
Script.printf
public void printf(String format, Object value) { Object object; try { object = getProperty("out"); } catch (MissingPropertyException e) { DefaultGroovyMethods.printf(System.out, format, value); return; } InvokerHelper.invokeMethod(object, "p...
java
public void printf(String format, Object value) { Object object; try { object = getProperty("out"); } catch (MissingPropertyException e) { DefaultGroovyMethods.printf(System.out, format, value); return; } InvokerHelper.invokeMethod(object, "p...
[ "public", "void", "printf", "(", "String", "format", ",", "Object", "value", ")", "{", "Object", "object", ";", "try", "{", "object", "=", "getProperty", "(", "\"out\"", ")", ";", "}", "catch", "(", "MissingPropertyException", "e", ")", "{", "DefaultGroovy...
Prints a formatted string using the specified format string and argument. @param format the format to follow @param value the value to be formatted
[ "Prints", "a", "formatted", "string", "using", "the", "specified", "format", "string", "and", "argument", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/Script.java#L167-L178
wcm-io-caravan/caravan-commons
httpclient/src/main/java/io/wcm/caravan/commons/httpclient/impl/helpers/CertificateLoader.java
CertificateLoader.getKeyManagerFactory
public static KeyManagerFactory getKeyManagerFactory(String keyStoreFilename, StoreProperties storeProperties) throws IOException, GeneralSecurityException { InputStream is = getResourceAsStream(keyStoreFilename); if (is == null) { throw new FileNotFoundException("Certificate file not found: " + get...
java
public static KeyManagerFactory getKeyManagerFactory(String keyStoreFilename, StoreProperties storeProperties) throws IOException, GeneralSecurityException { InputStream is = getResourceAsStream(keyStoreFilename); if (is == null) { throw new FileNotFoundException("Certificate file not found: " + get...
[ "public", "static", "KeyManagerFactory", "getKeyManagerFactory", "(", "String", "keyStoreFilename", ",", "StoreProperties", "storeProperties", ")", "throws", "IOException", ",", "GeneralSecurityException", "{", "InputStream", "is", "=", "getResourceAsStream", "(", "keyStore...
Get key manager factory @param keyStoreFilename Keystore file name @param storeProperties store properties @return Key manager factory @throws IOException @throws GeneralSecurityException
[ "Get", "key", "manager", "factory" ]
train
https://github.com/wcm-io-caravan/caravan-commons/blob/12e605bdfeb5a1ce7404e30d9f32274552cb8ce8/httpclient/src/main/java/io/wcm/caravan/commons/httpclient/impl/helpers/CertificateLoader.java#L113-L130
EsotericSoftware/kryo
src/com/esotericsoftware/kryo/unsafe/UnsafeUtil.java
UnsafeUtil.newDirectBuffer
static public ByteBuffer newDirectBuffer (long address, int size) { if (directByteBufferConstructor == null) throw new UnsupportedOperationException("No direct ByteBuffer constructor is available."); try { return directByteBufferConstructor.newInstance(address, size, null); } catch (Exception ex) { throw...
java
static public ByteBuffer newDirectBuffer (long address, int size) { if (directByteBufferConstructor == null) throw new UnsupportedOperationException("No direct ByteBuffer constructor is available."); try { return directByteBufferConstructor.newInstance(address, size, null); } catch (Exception ex) { throw...
[ "static", "public", "ByteBuffer", "newDirectBuffer", "(", "long", "address", ",", "int", "size", ")", "{", "if", "(", "directByteBufferConstructor", "==", "null", ")", "throw", "new", "UnsupportedOperationException", "(", "\"No direct ByteBuffer constructor is available.\...
Create a ByteBuffer that uses the specified off-heap memory address instead of allocating a new one. @param address Address of the memory region to be used for a ByteBuffer. @param size Size in bytes of the memory region. @throws UnsupportedOperationException if creating a ByteBuffer this way is not available.
[ "Create", "a", "ByteBuffer", "that", "uses", "the", "specified", "off", "-", "heap", "memory", "address", "instead", "of", "allocating", "a", "new", "one", "." ]
train
https://github.com/EsotericSoftware/kryo/blob/a8be1ab26f347f299a3c3f7171d6447dd5390845/src/com/esotericsoftware/kryo/unsafe/UnsafeUtil.java#L123-L131
azkaban/azkaban
azkaban-common/src/main/java/azkaban/utils/FileIOUtils.java
FileIOUtils.dumpNumberToFile
public static void dumpNumberToFile(final Path filePath, final long num) throws IOException { try (final BufferedWriter writer = Files .newBufferedWriter(filePath, StandardCharsets.UTF_8)) { writer.write(String.valueOf(num)); } catch (final IOException e) { log.error("Failed to write the num...
java
public static void dumpNumberToFile(final Path filePath, final long num) throws IOException { try (final BufferedWriter writer = Files .newBufferedWriter(filePath, StandardCharsets.UTF_8)) { writer.write(String.valueOf(num)); } catch (final IOException e) { log.error("Failed to write the num...
[ "public", "static", "void", "dumpNumberToFile", "(", "final", "Path", "filePath", ",", "final", "long", "num", ")", "throws", "IOException", "{", "try", "(", "final", "BufferedWriter", "writer", "=", "Files", ".", "newBufferedWriter", "(", "filePath", ",", "St...
Dumps a number into a new file. @param filePath the target file @param num the number to dump @throws IOException if file already exists
[ "Dumps", "a", "number", "into", "a", "new", "file", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/utils/FileIOUtils.java#L101-L109
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/domain/builders/GroupBuilder.java
GroupBuilder.setAllowSplitting
public GroupBuilder setAllowSplitting(boolean headerSplit, boolean footerSplit) { group.setAllowHeaederSplit(headerSplit); group.setAllowFooterSplit(footerSplit); return this; }
java
public GroupBuilder setAllowSplitting(boolean headerSplit, boolean footerSplit) { group.setAllowHeaederSplit(headerSplit); group.setAllowFooterSplit(footerSplit); return this; }
[ "public", "GroupBuilder", "setAllowSplitting", "(", "boolean", "headerSplit", ",", "boolean", "footerSplit", ")", "{", "group", ".", "setAllowHeaederSplit", "(", "headerSplit", ")", ";", "group", ".", "setAllowFooterSplit", "(", "footerSplit", ")", ";", "return", ...
* pass-through property to setup group header and footer bands "allowSplit" property. When FALSE, if the content reaches end of the page, the whole band gets pushed to the next page. @param headerSplit @param footerSplit @return
[ "*", "pass", "-", "through", "property", "to", "setup", "group", "header", "and", "footer", "bands", "allowSplit", "property", ".", "When", "FALSE", "if", "the", "content", "reaches", "end", "of", "the", "page", "the", "whole", "band", "gets", "pushed", "t...
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/GroupBuilder.java#L334-L338
dbflute-session/tomcat-boot
src/main/java/org/dbflute/tomcat/util/BotmReflectionUtil.java
BotmReflectionUtil.getPublicMethodFlexibly
public static Method getPublicMethodFlexibly(Class<?> clazz, String methodName, Class<?>[] argTypes) { assertObjectNotNull("clazz", clazz); assertStringNotNullAndNotTrimmedEmpty("methodName", methodName); return findMethod(clazz, methodName, argTypes, VisibilityType.PUBLIC, true); }
java
public static Method getPublicMethodFlexibly(Class<?> clazz, String methodName, Class<?>[] argTypes) { assertObjectNotNull("clazz", clazz); assertStringNotNullAndNotTrimmedEmpty("methodName", methodName); return findMethod(clazz, methodName, argTypes, VisibilityType.PUBLIC, true); }
[ "public", "static", "Method", "getPublicMethodFlexibly", "(", "Class", "<", "?", ">", "clazz", ",", "String", "methodName", ",", "Class", "<", "?", ">", "[", "]", "argTypes", ")", "{", "assertObjectNotNull", "(", "\"clazz\"", ",", "clazz", ")", ";", "asser...
Get the public method. <br> And it has the flexibly searching so you can specify types of sub-class to argTypes. <br> But if overload methods exist, it returns the first-found method. <br> And no cache so you should cache it yourself if you call several times. <br> @param clazz The type of class that defines the method...
[ "Get", "the", "public", "method", ".", "<br", ">", "And", "it", "has", "the", "flexibly", "searching", "so", "you", "can", "specify", "types", "of", "sub", "-", "class", "to", "argTypes", ".", "<br", ">", "But", "if", "overload", "methods", "exist", "i...
train
https://github.com/dbflute-session/tomcat-boot/blob/fe941f88b6be083781873126f5b12d4c16bb9073/src/main/java/org/dbflute/tomcat/util/BotmReflectionUtil.java#L384-L388
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.getClosedListEntityRoles
public List<EntityRole> getClosedListEntityRoles(UUID appId, String versionId, UUID entityId) { return getClosedListEntityRolesWithServiceResponseAsync(appId, versionId, entityId).toBlocking().single().body(); }
java
public List<EntityRole> getClosedListEntityRoles(UUID appId, String versionId, UUID entityId) { return getClosedListEntityRolesWithServiceResponseAsync(appId, versionId, entityId).toBlocking().single().body(); }
[ "public", "List", "<", "EntityRole", ">", "getClosedListEntityRoles", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ")", "{", "return", "getClosedListEntityRolesWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "entityId", ...
Get All Entity Roles for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId entity Id @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @throws RuntimeException all other wr...
[ "Get", "All", "Entity", "Roles", "for", "a", "given", "entity", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L8219-L8221
marklogic/java-client-api
marklogic-client-api/src/main/java/com/marklogic/client/query/AggregateResult.java
AggregateResult.get
public <T> T get(String type, Class<T> as) { return ValueConverter.convertToJava(type, value, as); }
java
public <T> T get(String type, Class<T> as) { return ValueConverter.convertToJava(type, value, as); }
[ "public", "<", "T", ">", "T", "get", "(", "String", "type", ",", "Class", "<", "T", ">", "as", ")", "{", "return", "ValueConverter", ".", "convertToJava", "(", "type", ",", "value", ",", "as", ")", ";", "}" ]
Returns the value cast to the specified type. This method converts the value according to the supplied type and then casts it to the specified class. <p>The following types are supported: <code>xs:anySimpleType</code>, <code>xs:base64Binary</code>, <code>xs:boolean</code>, <code>xs:byte</code>, <code>xs:date</code>, ...
[ "Returns", "the", "value", "cast", "to", "the", "specified", "type", "." ]
train
https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/query/AggregateResult.java#L78-L80
alkacon/opencms-core
src/org/opencms/workplace/editors/directedit/CmsDirectEditJQueryProvider.java
CmsDirectEditJQueryProvider.appendDirectEditData
private String appendDirectEditData(CmsDirectEditParams params, boolean disabled) { StringBuffer result = new StringBuffer(512); String editId = getNextDirectEditId(); result.append("\n<script type=\"text/javascript\">\n"); result.append("ocms_de_data['").append(editId).append("']= {\...
java
private String appendDirectEditData(CmsDirectEditParams params, boolean disabled) { StringBuffer result = new StringBuffer(512); String editId = getNextDirectEditId(); result.append("\n<script type=\"text/javascript\">\n"); result.append("ocms_de_data['").append(editId).append("']= {\...
[ "private", "String", "appendDirectEditData", "(", "CmsDirectEditParams", "params", ",", "boolean", "disabled", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "512", ")", ";", "String", "editId", "=", "getNextDirectEditId", "(", ")", ";", "r...
Appends the data for the direct edit buttons, which are dynamically created with jQuery.<p> Generates the following code:<p> <pre> &#60;script type="text/javascript" &#62; ocms_de_data['key']= { id: key, resource: res, ... }; &#60;/script &#62; </pre> @param params the direct edit parameters @param disabled if the bu...
[ "Appends", "the", "data", "for", "the", "direct", "edit", "buttons", "which", "are", "dynamically", "created", "with", "jQuery", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/editors/directedit/CmsDirectEditJQueryProvider.java#L144-L189
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/searchindex/sourcesearch/CmsSourceSearchCollector.java
CmsSourceSearchCollector.getResource
@Override public CmsResource getResource(CmsObject cms, CmsListItem item) { CmsResource res = null; CmsUUID id = new CmsUUID(item.getId()); if (!id.isNullUUID()) { try { res = cms.readResource(id, CmsResourceFilter.ALL); } catch (CmsException e) { ...
java
@Override public CmsResource getResource(CmsObject cms, CmsListItem item) { CmsResource res = null; CmsUUID id = new CmsUUID(item.getId()); if (!id.isNullUUID()) { try { res = cms.readResource(id, CmsResourceFilter.ALL); } catch (CmsException e) { ...
[ "@", "Override", "public", "CmsResource", "getResource", "(", "CmsObject", "cms", ",", "CmsListItem", "item", ")", "{", "CmsResource", "res", "=", "null", ";", "CmsUUID", "id", "=", "new", "CmsUUID", "(", "item", ".", "getId", "(", ")", ")", ";", "if", ...
Returns the resource for the given item.<p> @param cms the cms object @param item the item @return the resource
[ "Returns", "the", "resource", "for", "the", "given", "item", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/searchindex/sourcesearch/CmsSourceSearchCollector.java#L92-L110
lucee/Lucee
core/src/main/java/lucee/runtime/type/scope/client/ClientCookie.java
ClientCookie.getInstance
public static Client getInstance(String name, PageContext pc, Log log) { if (!StringUtil.isEmpty(name)) name = StringUtil.toUpperCase(StringUtil.toVariableName(name)); String cookieName = "CF_" + TYPE + "_" + name; return new ClientCookie(pc, cookieName, _loadData(pc, cookieName, SCOPE_CLIENT, "client", log)); }
java
public static Client getInstance(String name, PageContext pc, Log log) { if (!StringUtil.isEmpty(name)) name = StringUtil.toUpperCase(StringUtil.toVariableName(name)); String cookieName = "CF_" + TYPE + "_" + name; return new ClientCookie(pc, cookieName, _loadData(pc, cookieName, SCOPE_CLIENT, "client", log)); }
[ "public", "static", "Client", "getInstance", "(", "String", "name", ",", "PageContext", "pc", ",", "Log", "log", ")", "{", "if", "(", "!", "StringUtil", ".", "isEmpty", "(", "name", ")", ")", "name", "=", "StringUtil", ".", "toUpperCase", "(", "StringUti...
load new instance of the class @param name @param pc @param log @return
[ "load", "new", "instance", "of", "the", "class" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/scope/client/ClientCookie.java#L60-L64
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPTextWriter.java
JBBPTextWriter.SetHR
public JBBPTextWriter SetHR(final String prefix, final int length, final char ch) { this.prefixHR = prefix == null ? "" : prefix; this.hrChar = ch; this.hrLength = length; return this; }
java
public JBBPTextWriter SetHR(final String prefix, final int length, final char ch) { this.prefixHR = prefix == null ? "" : prefix; this.hrChar = ch; this.hrLength = length; return this; }
[ "public", "JBBPTextWriter", "SetHR", "(", "final", "String", "prefix", ",", "final", "int", "length", ",", "final", "char", "ch", ")", "{", "this", ".", "prefixHR", "=", "prefix", "==", "null", "?", "\"\"", ":", "prefix", ";", "this", ".", "hrChar", "=...
Change parameters for horizontal rule. @param prefix the prefix to be printed before rule, it can be null @param length the length in symbols. @param ch symbol to draw @return the context
[ "Change", "parameters", "for", "horizontal", "rule", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPTextWriter.java#L1188-L1193
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/VariableStack.java
VariableStack.getLocalVariable
public XObject getLocalVariable(int index, int frame) throws TransformerException { index += frame; XObject val = _stackFrames[index]; return val; }
java
public XObject getLocalVariable(int index, int frame) throws TransformerException { index += frame; XObject val = _stackFrames[index]; return val; }
[ "public", "XObject", "getLocalVariable", "(", "int", "index", ",", "int", "frame", ")", "throws", "TransformerException", "{", "index", "+=", "frame", ";", "XObject", "val", "=", "_stackFrames", "[", "index", "]", ";", "return", "val", ";", "}" ]
Get a local variable or parameter in the current stack frame. @param index Local variable index relative to the given frame bottom. NEEDSDOC @param frame @return The value of the variable. @throws TransformerException
[ "Get", "a", "local", "variable", "or", "parameter", "in", "the", "current", "stack", "frame", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/VariableStack.java#L336-L345
leancloud/java-sdk-all
realtime/src/main/java/cn/leancloud/im/v2/AVIMConversation.java
AVIMConversation.getAllMemberInfo
public void getAllMemberInfo(int offset, int limit, final AVIMConversationMemberQueryCallback callback) { QueryConditions conditions = new QueryConditions(); conditions.addWhereItem("cid", QueryOperation.EQUAL_OP, this.conversationId); conditions.setSkip(offset); conditions.setLimit(limit); queryMem...
java
public void getAllMemberInfo(int offset, int limit, final AVIMConversationMemberQueryCallback callback) { QueryConditions conditions = new QueryConditions(); conditions.addWhereItem("cid", QueryOperation.EQUAL_OP, this.conversationId); conditions.setSkip(offset); conditions.setLimit(limit); queryMem...
[ "public", "void", "getAllMemberInfo", "(", "int", "offset", ",", "int", "limit", ",", "final", "AVIMConversationMemberQueryCallback", "callback", ")", "{", "QueryConditions", "conditions", "=", "new", "QueryConditions", "(", ")", ";", "conditions", ".", "addWhereIte...
获取当前对话的所有角色信息 @param offset 查询结果的起始点 @param limit 查询结果集上限 @param callback 结果回调函数
[ "获取当前对话的所有角色信息" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/realtime/src/main/java/cn/leancloud/im/v2/AVIMConversation.java#L1129-L1135
jayantk/jklol
src/com/jayantkrish/jklol/lisp/LispUtil.java
LispUtil.checkArgument
public static void checkArgument(boolean condition, String message, Object ... values) { if (!condition) { throw new EvalError(String.format(message, values)); } }
java
public static void checkArgument(boolean condition, String message, Object ... values) { if (!condition) { throw new EvalError(String.format(message, values)); } }
[ "public", "static", "void", "checkArgument", "(", "boolean", "condition", ",", "String", "message", ",", "Object", "...", "values", ")", "{", "if", "(", "!", "condition", ")", "{", "throw", "new", "EvalError", "(", "String", ".", "format", "(", "message", ...
Identical to Preconditions.checkArgument but throws an {@code EvalError} instead of an IllegalArgumentException. Use this check to verify properties of a Lisp program execution, i.e., whenever the raised exception should be catchable by the evaluator of the program. @param condition @param message @param values
[ "Identical", "to", "Preconditions", ".", "checkArgument", "but", "throws", "an", "{", "@code", "EvalError", "}", "instead", "of", "an", "IllegalArgumentException", ".", "Use", "this", "check", "to", "verify", "properties", "of", "a", "Lisp", "program", "executio...
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/lisp/LispUtil.java#L56-L60
Waikato/moa
moa/src/main/java/moa/classifiers/oneclass/HSTreeNode.java
HSTreeNode.updateMass
public void updateMass(Instance inst, boolean referenceWindow) { if(referenceWindow) r++; else l++; if(internalNode) { if(inst.value(this.splitAttribute) > this.splitValue) right.updateMass(inst, referenceWindow); else left.updateMass(inst, referenceWindow); } }
java
public void updateMass(Instance inst, boolean referenceWindow) { if(referenceWindow) r++; else l++; if(internalNode) { if(inst.value(this.splitAttribute) > this.splitValue) right.updateMass(inst, referenceWindow); else left.updateMass(inst, referenceWindow); } }
[ "public", "void", "updateMass", "(", "Instance", "inst", ",", "boolean", "referenceWindow", ")", "{", "if", "(", "referenceWindow", ")", "r", "++", ";", "else", "l", "++", ";", "if", "(", "internalNode", ")", "{", "if", "(", "inst", ".", "value", "(", ...
Update the mass profile of this node. @param inst the instance being passed through the HSTree. @param referenceWindow if the HSTree is in the initial reference window: <b>true</b>, else: <b>false</b>
[ "Update", "the", "mass", "profile", "of", "this", "node", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/classifiers/oneclass/HSTreeNode.java#L120-L134
sockeqwe/mosby
mvp/src/main/java/com/hannesdorfmann/mosby3/mvp/MvpActivity.java
MvpActivity.getMvpDelegate
@NonNull protected ActivityMvpDelegate<V, P> getMvpDelegate() { if (mvpDelegate == null) { mvpDelegate = new ActivityMvpDelegateImpl(this, this, true); } return mvpDelegate; }
java
@NonNull protected ActivityMvpDelegate<V, P> getMvpDelegate() { if (mvpDelegate == null) { mvpDelegate = new ActivityMvpDelegateImpl(this, this, true); } return mvpDelegate; }
[ "@", "NonNull", "protected", "ActivityMvpDelegate", "<", "V", ",", "P", ">", "getMvpDelegate", "(", ")", "{", "if", "(", "mvpDelegate", "==", "null", ")", "{", "mvpDelegate", "=", "new", "ActivityMvpDelegateImpl", "(", "this", ",", "this", ",", "true", ")"...
Get the mvp delegate. This is internally used for creating presenter, attaching and detaching view from presenter. <p><b>Please note that only one instance of mvp delegate should be used per Activity instance</b>. </p> <p> Only override this method if you really know what you are doing. </p> @return {@link ActivityM...
[ "Get", "the", "mvp", "delegate", ".", "This", "is", "internally", "used", "for", "creating", "presenter", "attaching", "and", "detaching", "view", "from", "presenter", "." ]
train
https://github.com/sockeqwe/mosby/blob/7f22118c950b5e6fbba0ec42d8e97586dfb08940/mvp/src/main/java/com/hannesdorfmann/mosby3/mvp/MvpActivity.java#L111-L117
rpau/javalang
src/main/java/org/walkmod/javalang/ast/Refactorization.java
Refactorization.refactorVariable
public boolean refactorVariable(SymbolDefinition n, final String newName) { Map<String, SymbolDefinition> scope = n.getVariableDefinitions(); if (!scope.containsKey(newName)) { if (n.getUsages() != null) { List<SymbolReference> usages = new LinkedList<SymbolReference>(n.get...
java
public boolean refactorVariable(SymbolDefinition n, final String newName) { Map<String, SymbolDefinition> scope = n.getVariableDefinitions(); if (!scope.containsKey(newName)) { if (n.getUsages() != null) { List<SymbolReference> usages = new LinkedList<SymbolReference>(n.get...
[ "public", "boolean", "refactorVariable", "(", "SymbolDefinition", "n", ",", "final", "String", "newName", ")", "{", "Map", "<", "String", ",", "SymbolDefinition", ">", "scope", "=", "n", ".", "getVariableDefinitions", "(", ")", ";", "if", "(", "!", "scope", ...
Generic method to rename a SymbolDefinition variable/parameter. @param n variable to rename. @param newName new name to set. @return if the rename procedure has been applied successfully.
[ "Generic", "method", "to", "rename", "a", "SymbolDefinition", "variable", "/", "parameter", "." ]
train
https://github.com/rpau/javalang/blob/17ab1d6cbe7527a2f272049c4958354328de2171/src/main/java/org/walkmod/javalang/ast/Refactorization.java#L34-L71
bazaarvoice/emodb
common/json/src/main/java/com/bazaarvoice/emodb/common/json/deferred/LazyJsonMap.java
LazyJsonMap.put
@Override public Object put(String key, Object value) { DeserializationState deserializationState = _deserState.get(); if (deserializationState.isDeserialized()) { return deserializationState.deserialized.put(key, value); } return deserializationState.overrides.put(key, v...
java
@Override public Object put(String key, Object value) { DeserializationState deserializationState = _deserState.get(); if (deserializationState.isDeserialized()) { return deserializationState.deserialized.put(key, value); } return deserializationState.overrides.put(key, v...
[ "@", "Override", "public", "Object", "put", "(", "String", "key", ",", "Object", "value", ")", "{", "DeserializationState", "deserializationState", "=", "_deserState", ".", "get", "(", ")", ";", "if", "(", "deserializationState", ".", "isDeserialized", "(", ")...
For efficiency this method breaks the contract that the old value is returned. Otherwise common operations such as adding intrinsics and template attributes would require deserializing the object.
[ "For", "efficiency", "this", "method", "breaks", "the", "contract", "that", "the", "old", "value", "is", "returned", ".", "Otherwise", "common", "operations", "such", "as", "adding", "intrinsics", "and", "template", "attributes", "would", "require", "deserializing...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/common/json/src/main/java/com/bazaarvoice/emodb/common/json/deferred/LazyJsonMap.java#L183-L190
clanie/clanie-core
src/main/java/dk/clanie/collections/NumberMap.java
NumberMap.newBigIntegerMap
public static <K> NumberMap<K, BigInteger> newBigIntegerMap() { return new NumberMap<K, BigInteger>() { @Override public void add(K key, BigInteger addend) { put(key, containsKey(key) ? get(key).add(addend) : addend); } @Override public void sub(K key, BigInteger subtrahend) { put(key, (contain...
java
public static <K> NumberMap<K, BigInteger> newBigIntegerMap() { return new NumberMap<K, BigInteger>() { @Override public void add(K key, BigInteger addend) { put(key, containsKey(key) ? get(key).add(addend) : addend); } @Override public void sub(K key, BigInteger subtrahend) { put(key, (contain...
[ "public", "static", "<", "K", ">", "NumberMap", "<", "K", ",", "BigInteger", ">", "newBigIntegerMap", "(", ")", "{", "return", "new", "NumberMap", "<", "K", ",", "BigInteger", ">", "(", ")", "{", "@", "Override", "public", "void", "add", "(", "K", "k...
Creates a NumberMap for BigIntegers. @param <K> @return NumberMap&lt;K, BigInteger&gt;
[ "Creates", "a", "NumberMap", "for", "BigIntegers", "." ]
train
https://github.com/clanie/clanie-core/blob/ac8a655b93127f0e281b741c4d53f429be2816ad/src/main/java/dk/clanie/collections/NumberMap.java#L92-L103
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/JavaBean.java
JavaBean.newBean
public static <T> T newBean(Map<?,?> aValues, Class<?> aClass) throws InstantiationException, IllegalAccessException { return newBean(aValues,aClass,null); }
java
public static <T> T newBean(Map<?,?> aValues, Class<?> aClass) throws InstantiationException, IllegalAccessException { return newBean(aValues,aClass,null); }
[ "public", "static", "<", "T", ">", "T", "newBean", "(", "Map", "<", "?", ",", "?", ">", "aValues", ",", "Class", "<", "?", ">", "aClass", ")", "throws", "InstantiationException", ",", "IllegalAccessException", "{", "return", "newBean", "(", "aValues", ",...
Create new instance of the object @param aValues the map value @param aClass the class to create @param <T> the type of the bean @return the create object instance @throws InstantiationException @throws IllegalAccessException
[ "Create", "new", "instance", "of", "the", "object" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/JavaBean.java#L50-L54
anothem/android-range-seek-bar
rangeseekbar/src/main/java/org/florescu/android/rangeseekbar/RangeSeekBar.java
RangeSeekBar.drawThumb
private void drawThumb(float screenCoord, boolean pressed, Canvas canvas, boolean areSelectedValuesDefault) { Bitmap buttonToDraw; if (!activateOnDefaultValues && areSelectedValuesDefault) { buttonToDraw = thumbDisabledImage; } else { buttonToDraw = pressed ? thumbPressed...
java
private void drawThumb(float screenCoord, boolean pressed, Canvas canvas, boolean areSelectedValuesDefault) { Bitmap buttonToDraw; if (!activateOnDefaultValues && areSelectedValuesDefault) { buttonToDraw = thumbDisabledImage; } else { buttonToDraw = pressed ? thumbPressed...
[ "private", "void", "drawThumb", "(", "float", "screenCoord", ",", "boolean", "pressed", ",", "Canvas", "canvas", ",", "boolean", "areSelectedValuesDefault", ")", "{", "Bitmap", "buttonToDraw", ";", "if", "(", "!", "activateOnDefaultValues", "&&", "areSelectedValuesD...
Draws the "normal" resp. "pressed" thumb image on specified x-coordinate. @param screenCoord The x-coordinate in screen space where to draw the image. @param pressed Is the thumb currently in "pressed" state? @param canvas The canvas to draw upon.
[ "Draws", "the", "normal", "resp", ".", "pressed", "thumb", "image", "on", "specified", "x", "-", "coordinate", "." ]
train
https://github.com/anothem/android-range-seek-bar/blob/a88663da2d9e835907d3551b8a8569100c5b7b0f/rangeseekbar/src/main/java/org/florescu/android/rangeseekbar/RangeSeekBar.java#L735-L746
jMotif/SAX
src/main/java/net/seninp/util/HeatChart.java
HeatChart.setZValues
public void setZValues(double[][] zValues, double low, double high) { this.zValues = zValues; this.lowValue = low; this.highValue = high; }
java
public void setZValues(double[][] zValues, double low, double high) { this.zValues = zValues; this.lowValue = low; this.highValue = high; }
[ "public", "void", "setZValues", "(", "double", "[", "]", "[", "]", "zValues", ",", "double", "low", ",", "double", "high", ")", "{", "this", ".", "zValues", "=", "zValues", ";", "this", ".", "lowValue", "=", "low", ";", "this", ".", "highValue", "=",...
Replaces the z-values array. The number of elements should match the number of y-values, with each element containing a double array with an equal number of elements that matches the number of x-values. Use this method where the minimum and maximum values possible are not contained within the dataset. @param zValues t...
[ "Replaces", "the", "z", "-", "values", "array", ".", "The", "number", "of", "elements", "should", "match", "the", "number", "of", "y", "-", "values", "with", "each", "element", "containing", "a", "double", "array", "with", "an", "equal", "number", "of", ...
train
https://github.com/jMotif/SAX/blob/39ee07a69facaa330def5130b8790aeda85f1061/src/main/java/net/seninp/util/HeatChart.java#L341-L345
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/weights/WeightInitUtil.java
WeightInitUtil.initWeights
@Deprecated public static INDArray initWeights(double fanIn, double fanOut, int[] shape, WeightInit initScheme, Distribution dist, INDArray paramView) { return initWeights(fanIn, fanOut, ArrayUtil.toLongArray(shape), initScheme, dist, DEFAULT_WEIGHT_INIT_ORDER, paramView); }
java
@Deprecated public static INDArray initWeights(double fanIn, double fanOut, int[] shape, WeightInit initScheme, Distribution dist, INDArray paramView) { return initWeights(fanIn, fanOut, ArrayUtil.toLongArray(shape), initScheme, dist, DEFAULT_WEIGHT_INIT_ORDER, paramView); }
[ "@", "Deprecated", "public", "static", "INDArray", "initWeights", "(", "double", "fanIn", ",", "double", "fanOut", ",", "int", "[", "]", "shape", ",", "WeightInit", "initScheme", ",", "Distribution", "dist", ",", "INDArray", "paramView", ")", "{", "return", ...
Initializes a matrix with the given weight initialization scheme. Note: Defaults to fortran ('f') order arrays for the weights. Use {@link #initWeights(int[], WeightInit, Distribution, char, INDArray)} to control this @param shape the shape of the matrix @param initScheme the scheme to use @return a matrix of the...
[ "Initializes", "a", "matrix", "with", "the", "given", "weight", "initialization", "scheme", ".", "Note", ":", "Defaults", "to", "fortran", "(", "f", ")", "order", "arrays", "for", "the", "weights", ".", "Use", "{", "@link", "#initWeights", "(", "int", "[]"...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/weights/WeightInitUtil.java#L59-L63
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/table/KrakenImpl.java
KrakenImpl.findStream
private void findStream(QueryKraken query, Object []args, ResultStream<Cursor> result) { try { TableKraken table = query.table(); TableKelp tableKelp = table.getTableKelp(); TablePod tablePod = table.getTablePod(); if (query.isStaticNo...
java
private void findStream(QueryKraken query, Object []args, ResultStream<Cursor> result) { try { TableKraken table = query.table(); TableKelp tableKelp = table.getTableKelp(); TablePod tablePod = table.getTablePod(); if (query.isStaticNo...
[ "private", "void", "findStream", "(", "QueryKraken", "query", ",", "Object", "[", "]", "args", ",", "ResultStream", "<", "Cursor", ">", "result", ")", "{", "try", "{", "TableKraken", "table", "=", "query", ".", "table", "(", ")", ";", "TableKelp", "table...
Query implementation for multiple result with the parsed query.
[ "Query", "implementation", "for", "multiple", "result", "with", "the", "parsed", "query", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/table/KrakenImpl.java#L542-L575
phax/ph-css
ph-css/src/main/java/com/helger/css/parser/CSSParseHelper.java
CSSParseHelper.extractStringValue
@Nullable public static String extractStringValue (@Nullable final String sStr) { if (StringHelper.hasNoText (sStr) || sStr.length () < 2) return sStr; final char cFirst = sStr.charAt (0); if ((cFirst == '"' || cFirst == '\'') && StringHelper.getLastChar (sStr) == cFirst) { // Remove qu...
java
@Nullable public static String extractStringValue (@Nullable final String sStr) { if (StringHelper.hasNoText (sStr) || sStr.length () < 2) return sStr; final char cFirst = sStr.charAt (0); if ((cFirst == '"' || cFirst == '\'') && StringHelper.getLastChar (sStr) == cFirst) { // Remove qu...
[ "@", "Nullable", "public", "static", "String", "extractStringValue", "(", "@", "Nullable", "final", "String", "sStr", ")", "{", "if", "(", "StringHelper", ".", "hasNoText", "(", "sStr", ")", "||", "sStr", ".", "length", "(", ")", "<", "2", ")", "return",...
Remove surrounding quotes (single or double) of a string (if present). If the start and the end quote are not equal, nothing happens. @param sStr The string where the quotes should be removed @return The string without quotes.
[ "Remove", "surrounding", "quotes", "(", "single", "or", "double", ")", "of", "a", "string", "(", "if", "present", ")", ".", "If", "the", "start", "and", "the", "end", "quote", "are", "not", "equal", "nothing", "happens", "." ]
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/parser/CSSParseHelper.java#L66-L79
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/trace/TraceId.java
TraceId.copyLowerBase16To
public void copyLowerBase16To(char[] dest, int destOffset) { BigendianEncoding.longToBase16String(idHi, dest, destOffset); BigendianEncoding.longToBase16String(idLo, dest, destOffset + BASE16_SIZE / 2); }
java
public void copyLowerBase16To(char[] dest, int destOffset) { BigendianEncoding.longToBase16String(idHi, dest, destOffset); BigendianEncoding.longToBase16String(idLo, dest, destOffset + BASE16_SIZE / 2); }
[ "public", "void", "copyLowerBase16To", "(", "char", "[", "]", "dest", ",", "int", "destOffset", ")", "{", "BigendianEncoding", ".", "longToBase16String", "(", "idHi", ",", "dest", ",", "destOffset", ")", ";", "BigendianEncoding", ".", "longToBase16String", "(", ...
Copies the lowercase base16 representations of the {@code TraceId} into the {@code dest} beginning at the {@code destOffset} offset. @param dest the destination buffer. @param destOffset the starting offset in the destination buffer. @throws IndexOutOfBoundsException if {@code destOffset + 2 * TraceId.SIZE} is greater...
[ "Copies", "the", "lowercase", "base16", "representations", "of", "the", "{", "@code", "TraceId", "}", "into", "the", "{", "@code", "dest", "}", "beginning", "at", "the", "{", "@code", "destOffset", "}", "offset", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/trace/TraceId.java#L189-L192
m-m-m/util
reflect/src/main/java/net/sf/mmm/util/reflect/base/ReflectionUtilImpl.java
ReflectionUtilImpl.visitResourceNames
public void visitResourceNames(String packageName, boolean includeSubPackages, ClassLoader classLoader, ResourceVisitor visitor) { try { String path = packageName.replace('.', '/'); if (path.isEmpty()) { LOG.debug("Scanning entire classpath..."); } else { LOG.trace("Scanning for r...
java
public void visitResourceNames(String packageName, boolean includeSubPackages, ClassLoader classLoader, ResourceVisitor visitor) { try { String path = packageName.replace('.', '/'); if (path.isEmpty()) { LOG.debug("Scanning entire classpath..."); } else { LOG.trace("Scanning for r...
[ "public", "void", "visitResourceNames", "(", "String", "packageName", ",", "boolean", "includeSubPackages", ",", "ClassLoader", "classLoader", ",", "ResourceVisitor", "visitor", ")", "{", "try", "{", "String", "path", "=", "packageName", ".", "replace", "(", "'", ...
This method does the actual magic to locate resources on the classpath. @param packageName is the name of the {@link Package} to scan. Both "." and "/" are accepted as separator (e.g. "net.sf.mmm.util.reflect). @param includeSubPackages - if {@code true} all sub-packages of the specified {@link Package} will be includ...
[ "This", "method", "does", "the", "actual", "magic", "to", "locate", "resources", "on", "the", "classpath", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/reflect/src/main/java/net/sf/mmm/util/reflect/base/ReflectionUtilImpl.java#L731-L759
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/handler/bundle/AbstractResourceBundleHandler.java
AbstractResourceBundleHandler.getResourceBundleChannel
public ReadableByteChannel getResourceBundleChannel(String bundleName, boolean gzipBundle) throws ResourceNotFoundException { String tempFileName = getStoredBundlePath(bundleName, gzipBundle); InputStream is = getTemporaryResourceAsStream(tempFileName); return Channels.newChannel(is); }
java
public ReadableByteChannel getResourceBundleChannel(String bundleName, boolean gzipBundle) throws ResourceNotFoundException { String tempFileName = getStoredBundlePath(bundleName, gzipBundle); InputStream is = getTemporaryResourceAsStream(tempFileName); return Channels.newChannel(is); }
[ "public", "ReadableByteChannel", "getResourceBundleChannel", "(", "String", "bundleName", ",", "boolean", "gzipBundle", ")", "throws", "ResourceNotFoundException", "{", "String", "tempFileName", "=", "getStoredBundlePath", "(", "bundleName", ",", "gzipBundle", ")", ";", ...
Returns the readable byte channel from the bundle name @param bundleName the bundle name @param gzipBundle the flag indicating if we want to retrieve the gzip version or not @return the readable byte channel from the bundle name @throws ResourceNotFoundException if the resource is not found
[ "Returns", "the", "readable", "byte", "channel", "from", "the", "bundle", "name" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/handler/bundle/AbstractResourceBundleHandler.java#L412-L418
before/uadetector
modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/CachingXmlDataStore.java
CachingXmlDataStore.createCachingXmlDataStore
@Nonnull @Deprecated public static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final File cacheFile, @Nonnull final DataStore fallback) { return createCachingXmlDataStore(cacheFile, UrlUtil.build(DEFAULT_DATA_URL), UrlUtil.build(DEFAULT_VERSION_URL), DEFAULT_CHARSET, fallback); }
java
@Nonnull @Deprecated public static CachingXmlDataStore createCachingXmlDataStore(@Nonnull final File cacheFile, @Nonnull final DataStore fallback) { return createCachingXmlDataStore(cacheFile, UrlUtil.build(DEFAULT_DATA_URL), UrlUtil.build(DEFAULT_VERSION_URL), DEFAULT_CHARSET, fallback); }
[ "@", "Nonnull", "@", "Deprecated", "public", "static", "CachingXmlDataStore", "createCachingXmlDataStore", "(", "@", "Nonnull", "final", "File", "cacheFile", ",", "@", "Nonnull", "final", "DataStore", "fallback", ")", "{", "return", "createCachingXmlDataStore", "(", ...
Constructs a new instance of {@code CachingXmlDataStore} with the given arguments. The given {@code cacheFile} can be empty or filled with previously cached data in XML format. The file must be writable otherwise an exception will be thrown. @param cacheFile file with cached <em>UAS data</em> in XML format or empty fi...
[ "Constructs", "a", "new", "instance", "of", "{", "@code", "CachingXmlDataStore", "}", "with", "the", "given", "arguments", ".", "The", "given", "{", "@code", "cacheFile", "}", "can", "be", "empty", "or", "filled", "with", "previously", "cached", "data", "in"...
train
https://github.com/before/uadetector/blob/215fb652723c52866572cff885f52a3fe67b9db5/modules/uadetector-core/src/main/java/net/sf/uadetector/datastore/CachingXmlDataStore.java#L143-L148
kotcrab/vis-ui
ui/src/main/java/com/kotcrab/vis/ui/widget/VisWindow.java
VisWindow.closeOnEscape
public void closeOnEscape () { addListener(new InputListener() { @Override public boolean keyDown (InputEvent event, int keycode) { if (keycode == Keys.ESCAPE) { close(); return true; } return false; } @Override public boolean keyUp (InputEvent event, int keycode) { if (keyc...
java
public void closeOnEscape () { addListener(new InputListener() { @Override public boolean keyDown (InputEvent event, int keycode) { if (keycode == Keys.ESCAPE) { close(); return true; } return false; } @Override public boolean keyUp (InputEvent event, int keycode) { if (keyc...
[ "public", "void", "closeOnEscape", "(", ")", "{", "addListener", "(", "new", "InputListener", "(", ")", "{", "@", "Override", "public", "boolean", "keyDown", "(", "InputEvent", "event", ",", "int", "keycode", ")", "{", "if", "(", "keycode", "==", "Keys", ...
Will make this window close when escape key or back key was pressed. After pressing escape or back, {@link #close()} is called. Back key is Android and iOS only
[ "Will", "make", "this", "window", "close", "when", "escape", "key", "or", "back", "key", "was", "pressed", ".", "After", "pressing", "escape", "or", "back", "{" ]
train
https://github.com/kotcrab/vis-ui/blob/3b68f82d94ae32bffa2a3399c63f432e0f4908e0/ui/src/main/java/com/kotcrab/vis/ui/widget/VisWindow.java#L197-L219
sebastiangraf/jSCSI
bundles/initiator/src/main/java/org/jscsi/initiator/connection/SenderWorker.java
SenderWorker.receiveFromWire
public ProtocolDataUnit receiveFromWire () throws DigestException , InternetSCSIException , IOException { final ProtocolDataUnit protocolDataUnit = protocolDataUnitFactory.create(connection.getSetting(OperationalTextKey.HEADER_DIGEST), connection.getSetting(OperationalTextKey.DATA_DIGEST)); try { ...
java
public ProtocolDataUnit receiveFromWire () throws DigestException , InternetSCSIException , IOException { final ProtocolDataUnit protocolDataUnit = protocolDataUnitFactory.create(connection.getSetting(OperationalTextKey.HEADER_DIGEST), connection.getSetting(OperationalTextKey.DATA_DIGEST)); try { ...
[ "public", "ProtocolDataUnit", "receiveFromWire", "(", ")", "throws", "DigestException", ",", "InternetSCSIException", ",", "IOException", "{", "final", "ProtocolDataUnit", "protocolDataUnit", "=", "protocolDataUnitFactory", ".", "create", "(", "connection", ".", "getSetti...
Receives a <code>ProtocolDataUnit</code> from the socket and appends it to the end of the receiving queue of this connection. @return Queue with the resulting units @throws IOException if an I/O error occurs. @throws InternetSCSIException if any violation of the iSCSI-Standard emerge. @throws DigestException if a mism...
[ "Receives", "a", "<code", ">", "ProtocolDataUnit<", "/", "code", ">", "from", "the", "socket", "and", "appends", "it", "to", "the", "end", "of", "the", "receiving", "queue", "of", "this", "connection", "." ]
train
https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/initiator/src/main/java/org/jscsi/initiator/connection/SenderWorker.java#L115-L155
GenesysPureEngage/provisioning-client-java
src/main/java/com/genesys/internal/provisioning/api/SamlSettingsApi.java
SamlSettingsApi.getSPMetadataAsync
public com.squareup.okhttp.Call getSPMetadataAsync(String location, Boolean download, Boolean noSpinner, final ApiCallback<GetSPMetadataResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestLis...
java
public com.squareup.okhttp.Call getSPMetadataAsync(String location, Boolean download, Boolean noSpinner, final ApiCallback<GetSPMetadataResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestLis...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "getSPMetadataAsync", "(", "String", "location", ",", "Boolean", "download", ",", "Boolean", "noSpinner", ",", "final", "ApiCallback", "<", "GetSPMetadataResponse", ">", "callback", ")", "throws", "Ap...
Get Metadata (asynchronously) Returns exist Metadata xml file. @param location Define SAML location. (required) @param download Define if need download file. (required) @param noSpinner Define if need page reload (optional) @param callback The callback to be executed when the API call finishes @return The request call ...
[ "Get", "Metadata", "(", "asynchronously", ")", "Returns", "exist", "Metadata", "xml", "file", "." ]
train
https://github.com/GenesysPureEngage/provisioning-client-java/blob/1ad594c3767cec83052168e350994f922a26f75e/src/main/java/com/genesys/internal/provisioning/api/SamlSettingsApi.java#L653-L678
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LocalNetworkGatewaysInner.java
LocalNetworkGatewaysInner.beginUpdateTagsAsync
public Observable<LocalNetworkGatewayInner> beginUpdateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).map(new Func1<ServiceResponse<LocalNetworkGatewayInner>, LocalNe...
java
public Observable<LocalNetworkGatewayInner> beginUpdateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).map(new Func1<ServiceResponse<LocalNetworkGatewayInner>, LocalNe...
[ "public", "Observable", "<", "LocalNetworkGatewayInner", ">", "beginUpdateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "localNetworkGatewayName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "beginUpdateTagsWithServiceResp...
Updates a local network gateway tags. @param resourceGroupName The name of the resource group. @param localNetworkGatewayName The name of the local network gateway. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the LocalNetworkGatewayInne...
[ "Updates", "a", "local", "network", "gateway", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LocalNetworkGatewaysInner.java#L771-L778
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/math/RangeBigInteger.java
RangeBigInteger.removeIntersect
public Pair<RangeBigInteger,RangeBigInteger> removeIntersect(RangeBigInteger o) { if (o.max.compareTo(min) < 0 || o.min.compareTo(max) > 0) // o is outside: no intersection return new Pair<>(copy(), null); if (o.min.compareTo(min) <= 0) { // nothing before if (o.max.compareTo(max) >= 0) return ne...
java
public Pair<RangeBigInteger,RangeBigInteger> removeIntersect(RangeBigInteger o) { if (o.max.compareTo(min) < 0 || o.min.compareTo(max) > 0) // o is outside: no intersection return new Pair<>(copy(), null); if (o.min.compareTo(min) <= 0) { // nothing before if (o.max.compareTo(max) >= 0) return ne...
[ "public", "Pair", "<", "RangeBigInteger", ",", "RangeBigInteger", ">", "removeIntersect", "(", "RangeBigInteger", "o", ")", "{", "if", "(", "o", ".", "max", ".", "compareTo", "(", "min", ")", "<", "0", "||", "o", ".", "min", ".", "compareTo", "(", "max...
Remove the intersection between this range and the given range, and return the range before and the range after the intersection.
[ "Remove", "the", "intersection", "between", "this", "range", "and", "the", "given", "range", "and", "return", "the", "range", "before", "and", "the", "range", "after", "the", "intersection", "." ]
train
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/math/RangeBigInteger.java#L84-L99
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/ProcfsBasedProcessTree.java
ProcfsBasedProcessTree.checkPidPgrpidForMatch
static boolean checkPidPgrpidForMatch(String pidStr, String procfsDir) { Integer pId = Integer.parseInt(pidStr); // Get information for this process ProcessInfo pInfo = new ProcessInfo(pId); pInfo = constructProcessInfo(pInfo, procfsDir); if (pInfo == null) { // process group leader may have f...
java
static boolean checkPidPgrpidForMatch(String pidStr, String procfsDir) { Integer pId = Integer.parseInt(pidStr); // Get information for this process ProcessInfo pInfo = new ProcessInfo(pId); pInfo = constructProcessInfo(pInfo, procfsDir); if (pInfo == null) { // process group leader may have f...
[ "static", "boolean", "checkPidPgrpidForMatch", "(", "String", "pidStr", ",", "String", "procfsDir", ")", "{", "Integer", "pId", "=", "Integer", ".", "parseInt", "(", "pidStr", ")", ";", "// Get information for this process", "ProcessInfo", "pInfo", "=", "new", "Pr...
Verify that the given process id is same as its process group id. @param pidStr Process id of the to-be-verified-process @param procfsDir Procfs root dir
[ "Verify", "that", "the", "given", "process", "id", "is", "same", "as", "its", "process", "group", "id", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/ProcfsBasedProcessTree.java#L268-L289
alkacon/opencms-core
src/org/opencms/ui/CmsVaadinUtils.java
CmsVaadinUtils.getMessageText
public static String getMessageText(I_CmsMessageBundle messages, String key, Object... args) { return messages.getBundle(A_CmsUI.get().getLocale()).key(key, args); }
java
public static String getMessageText(I_CmsMessageBundle messages, String key, Object... args) { return messages.getBundle(A_CmsUI.get().getLocale()).key(key, args); }
[ "public", "static", "String", "getMessageText", "(", "I_CmsMessageBundle", "messages", ",", "String", "key", ",", "Object", "...", "args", ")", "{", "return", "messages", ".", "getBundle", "(", "A_CmsUI", ".", "get", "(", ")", ".", "getLocale", "(", ")", "...
Gets the message for the current locale and the given key and arguments.<p> @param messages the messages instance @param key the message key @param args the message arguments @return the message text for the current locale
[ "Gets", "the", "message", "for", "the", "current", "locale", "and", "the", "given", "key", "and", "arguments", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/CmsVaadinUtils.java#L631-L634
JadiraOrg/jadira
bindings/src/main/java/org/jadira/bindings/core/binder/BasicBinder.java
BasicBinder.convertTo
public <S, T> T convertTo(Class<S> input, Class<T> output, Object object, Class<? extends Annotation> qualifier) { return convertTo(new ConverterKey<S,T>(input, output, qualifier), object); }
java
public <S, T> T convertTo(Class<S> input, Class<T> output, Object object, Class<? extends Annotation> qualifier) { return convertTo(new ConverterKey<S,T>(input, output, qualifier), object); }
[ "public", "<", "S", ",", "T", ">", "T", "convertTo", "(", "Class", "<", "S", ">", "input", ",", "Class", "<", "T", ">", "output", ",", "Object", "object", ",", "Class", "<", "?", "extends", "Annotation", ">", "qualifier", ")", "{", "return", "conve...
Convert an object which is an instance of source class to the given target class @param input The class of the object to be converted @param output The target class to convert the object to @param object The object to be converted @param qualifier Match the converter with the given qualifier
[ "Convert", "an", "object", "which", "is", "an", "instance", "of", "source", "class", "to", "the", "given", "target", "class" ]
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/bindings/src/main/java/org/jadira/bindings/core/binder/BasicBinder.java#L805-L808
JRebirth/JRebirth
org.jrebirth.af/presentation/src/main/java/org/jrebirth/af/presentation/ui/template/AbstractTemplateView.java
AbstractTemplateView.addSlideItem
protected void addSlideItem(final VBox vbox, final SlideItem item) { Node node = null; if (item.isLink()) { final Hyperlink link = HyperlinkBuilder.create() .opacity(1.0) .text(item.getVal...
java
protected void addSlideItem(final VBox vbox, final SlideItem item) { Node node = null; if (item.isLink()) { final Hyperlink link = HyperlinkBuilder.create() .opacity(1.0) .text(item.getVal...
[ "protected", "void", "addSlideItem", "(", "final", "VBox", "vbox", ",", "final", "SlideItem", "item", ")", "{", "Node", "node", "=", "null", ";", "if", "(", "item", ".", "isLink", "(", ")", ")", "{", "final", "Hyperlink", "link", "=", "HyperlinkBuilder",...
Add a slide item by managing level. @param vbox the layout node @param item the slide item to add
[ "Add", "a", "slide", "item", "by", "managing", "level", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/presentation/src/main/java/org/jrebirth/af/presentation/ui/template/AbstractTemplateView.java#L488-L552
joniles/mpxj
src/main/java/net/sf/mpxj/mpp/MPP14Reader.java
MPP14Reader.getCustomFieldOutlineCodeValue
private String getCustomFieldOutlineCodeValue(Var2Data varData, Var2Data outlineCodeVarData, Integer id) { String result = null; int uniqueId = id.intValue(); if (uniqueId == 0) { return ""; } CustomFieldValueItem item = m_file.getCustomFields().getCustomFieldValueItemB...
java
private String getCustomFieldOutlineCodeValue(Var2Data varData, Var2Data outlineCodeVarData, Integer id) { String result = null; int uniqueId = id.intValue(); if (uniqueId == 0) { return ""; } CustomFieldValueItem item = m_file.getCustomFields().getCustomFieldValueItemB...
[ "private", "String", "getCustomFieldOutlineCodeValue", "(", "Var2Data", "varData", ",", "Var2Data", "outlineCodeVarData", ",", "Integer", "id", ")", "{", "String", "result", "=", "null", ";", "int", "uniqueId", "=", "id", ".", "intValue", "(", ")", ";", "if", ...
Retrieve custom field value. @param varData var data block @param outlineCodeVarData var data block @param id parent item ID @return item value
[ "Retrieve", "custom", "field", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpp/MPP14Reader.java#L1999-L2029
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.setVpnclientIpsecParametersAsync
public Observable<VpnClientIPsecParametersInner> setVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { return setVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIp...
java
public Observable<VpnClientIPsecParametersInner> setVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { return setVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIp...
[ "public", "Observable", "<", "VpnClientIPsecParametersInner", ">", "setVpnclientIpsecParametersAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ",", "VpnClientIPsecParametersInner", "vpnclientIpsecParams", ")", "{", "return", "setVpnclientIp...
The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @par...
[ "The", "Set", "VpnclientIpsecParameters", "operation", "sets", "the", "vpnclient", "ipsec", "policy", "for", "P2S", "client", "of", "virtual", "network", "gateway", "in", "the", "specified", "resource", "group", "through", "Network", "resource", "provider", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L2686-L2693
resilience4j/resilience4j
resilience4j-prometheus/src/main/java/io/github/resilience4j/prometheus/CircuitBreakerExports.java
CircuitBreakerExports.ofSupplier
public static CircuitBreakerExports ofSupplier(String prefix, Supplier<Iterable<CircuitBreaker>> circuitBreakersSupplier) { return new CircuitBreakerExports(prefix, circuitBreakersSupplier); }
java
public static CircuitBreakerExports ofSupplier(String prefix, Supplier<Iterable<CircuitBreaker>> circuitBreakersSupplier) { return new CircuitBreakerExports(prefix, circuitBreakersSupplier); }
[ "public", "static", "CircuitBreakerExports", "ofSupplier", "(", "String", "prefix", ",", "Supplier", "<", "Iterable", "<", "CircuitBreaker", ">", ">", "circuitBreakersSupplier", ")", "{", "return", "new", "CircuitBreakerExports", "(", "prefix", ",", "circuitBreakersSu...
Creates a new instance of {@link CircuitBreakerExports} with specified metrics names prefix and {@link Supplier} of circuit breakers @param prefix the prefix of metrics names @param circuitBreakersSupplier the supplier of circuit breakers
[ "Creates", "a", "new", "instance", "of", "{", "@link", "CircuitBreakerExports", "}", "with", "specified", "metrics", "names", "prefix", "and", "{", "@link", "Supplier", "}", "of", "circuit", "breakers" ]
train
https://github.com/resilience4j/resilience4j/blob/fa843d30f531c00f0c3dc218b65a7f2bb51af336/resilience4j-prometheus/src/main/java/io/github/resilience4j/prometheus/CircuitBreakerExports.java#L61-L63
facebookarchive/hadoop-20
src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/servers/HadoopLocationWizard.java
HadoopLocationWizard.createConfNameEditor
private Text createConfNameEditor(ModifyListener listener, Composite parent, String propName, String labelText) { { ConfProp prop = ConfProp.getByName(propName); if (prop != null) return createConfLabelText(listener, parent, prop, labelText); } Label label = new Label(parent, SWT...
java
private Text createConfNameEditor(ModifyListener listener, Composite parent, String propName, String labelText) { { ConfProp prop = ConfProp.getByName(propName); if (prop != null) return createConfLabelText(listener, parent, prop, labelText); } Label label = new Label(parent, SWT...
[ "private", "Text", "createConfNameEditor", "(", "ModifyListener", "listener", ",", "Composite", "parent", ",", "String", "propName", ",", "String", "labelText", ")", "{", "{", "ConfProp", "prop", "=", "ConfProp", ".", "getByName", "(", "propName", ")", ";", "i...
Create an editor entry for the given configuration name @param listener the listener to trigger on property change @param parent the SWT parent container @param propName the name of the property to create an editor for @param labelText a label (null will defaults to the property name) @return a SWT Text field
[ "Create", "an", "editor", "entry", "for", "the", "given", "configuration", "name" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/servers/HadoopLocationWizard.java#L562-L584
looly/hutool
hutool-db/src/main/java/cn/hutool/db/sql/SqlExecutor.java
SqlExecutor.execute
public static boolean execute(PreparedStatement ps, Object... params) throws SQLException { StatementUtil.fillParams(ps, params); return ps.execute(); }
java
public static boolean execute(PreparedStatement ps, Object... params) throws SQLException { StatementUtil.fillParams(ps, params); return ps.execute(); }
[ "public", "static", "boolean", "execute", "(", "PreparedStatement", "ps", ",", "Object", "...", "params", ")", "throws", "SQLException", "{", "StatementUtil", ".", "fillParams", "(", "ps", ",", "params", ")", ";", "return", "ps", ".", "execute", "(", ")", ...
可用于执行任何SQL语句,返回一个boolean值,表明执行该SQL语句是否返回了ResultSet。<br> 如果执行后第一个结果是ResultSet,则返回true,否则返回false。<br> 此方法不会关闭PreparedStatement @param ps PreparedStatement对象 @param params 参数 @return 如果执行后第一个结果是ResultSet,则返回true,否则返回false。 @throws SQLException SQL执行异常
[ "可用于执行任何SQL语句,返回一个boolean值,表明执行该SQL语句是否返回了ResultSet。<br", ">", "如果执行后第一个结果是ResultSet,则返回true,否则返回false。<br", ">", "此方法不会关闭PreparedStatement" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/sql/SqlExecutor.java#L296-L299
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/openal/AudioLoader.java
AudioLoader.getAudio
public static Audio getAudio(String format, InputStream in) throws IOException { init(); if (format.equals(AIF)) { return SoundStore.get().getAIF(in); } if (format.equals(WAV)) { return SoundStore.get().getWAV(in); } if (format.equals(OGG)) { return SoundStore.get().getOgg(in); } ...
java
public static Audio getAudio(String format, InputStream in) throws IOException { init(); if (format.equals(AIF)) { return SoundStore.get().getAIF(in); } if (format.equals(WAV)) { return SoundStore.get().getWAV(in); } if (format.equals(OGG)) { return SoundStore.get().getOgg(in); } ...
[ "public", "static", "Audio", "getAudio", "(", "String", "format", ",", "InputStream", "in", ")", "throws", "IOException", "{", "init", "(", ")", ";", "if", "(", "format", ".", "equals", "(", "AIF", ")", ")", "{", "return", "SoundStore", ".", "get", "("...
Get audio data in a playable state by loading the complete audio into memory. @param format The format of the audio to be loaded (something like "XM" or "OGG") @param in The input stream from which to load the audio data @return An object representing the audio data @throws IOException Indicates a failure to access th...
[ "Get", "audio", "data", "in", "a", "playable", "state", "by", "loading", "the", "complete", "audio", "into", "memory", "." ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/openal/AudioLoader.java#L47-L61
alkacon/opencms-core
src/org/opencms/gwt/shared/property/CmsClientProperty.java
CmsClientProperty.removeEmptyProperties
public static void removeEmptyProperties(Map<String, CmsClientProperty> props) { Iterator<Map.Entry<String, CmsClientProperty>> iter = props.entrySet().iterator(); while (iter.hasNext()) { Map.Entry<String, CmsClientProperty> entry = iter.next(); CmsClientProperty value = entry....
java
public static void removeEmptyProperties(Map<String, CmsClientProperty> props) { Iterator<Map.Entry<String, CmsClientProperty>> iter = props.entrySet().iterator(); while (iter.hasNext()) { Map.Entry<String, CmsClientProperty> entry = iter.next(); CmsClientProperty value = entry....
[ "public", "static", "void", "removeEmptyProperties", "(", "Map", "<", "String", ",", "CmsClientProperty", ">", "props", ")", "{", "Iterator", "<", "Map", ".", "Entry", "<", "String", ",", "CmsClientProperty", ">", ">", "iter", "=", "props", ".", "entrySet", ...
Helper method for removing empty properties from a map.<p> @param props the map from which to remove empty properties
[ "Helper", "method", "for", "removing", "empty", "properties", "from", "a", "map", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/shared/property/CmsClientProperty.java#L227-L237
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java
MemberSummaryBuilder.buildAnnotationTypeRequiredMemberSummary
public void buildAnnotationTypeRequiredMemberSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED]; VisibleMemberMap visibleMemberMap = visibleMemberMaps[VisibleMemberMap.ANNO...
java
public void buildAnnotationTypeRequiredMemberSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED]; VisibleMemberMap visibleMemberMap = visibleMemberMaps[VisibleMemberMap.ANNO...
[ "public", "void", "buildAnnotationTypeRequiredMemberSummary", "(", "XMLNode", "node", ",", "Content", "memberSummaryTree", ")", "{", "MemberSummaryWriter", "writer", "=", "memberSummaryWriters", "[", "VisibleMemberMap", ".", "ANNOTATION_TYPE_MEMBER_REQUIRED", "]", ";", "Vis...
Build the summary for the optional members. @param node the XML element that specifies which components to document @param memberSummaryTree the content tree to which the documentation will be added
[ "Build", "the", "summary", "for", "the", "optional", "members", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java#L250-L256
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsMetaClassUtils.java
GrailsMetaClassUtils.getPropertyIfExists
public static Object getPropertyIfExists(Object instance, String property) { return getPropertyIfExists(instance, property, Object.class); }
java
public static Object getPropertyIfExists(Object instance, String property) { return getPropertyIfExists(instance, property, Object.class); }
[ "public", "static", "Object", "getPropertyIfExists", "(", "Object", "instance", ",", "String", "property", ")", "{", "return", "getPropertyIfExists", "(", "instance", ",", "property", ",", "Object", ".", "class", ")", ";", "}" ]
Obtains a property of an instance if it exists @param instance The instance @param property The property @return The value of null if non-exists
[ "Obtains", "a", "property", "of", "an", "instance", "if", "it", "exists" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsMetaClassUtils.java#L195-L197
primefaces-extensions/core
src/main/java/org/primefaces/extensions/model/dynaform/DynaFormRow.java
DynaFormRow.addModel
public DynaFormModelElement addModel(final DynaFormModel model, final int colspan, final int rowspan) { final DynaFormModelElement nestedModel = new DynaFormModelElement(model, colspan, rowspan, row, elements.size() + 1, ...
java
public DynaFormModelElement addModel(final DynaFormModel model, final int colspan, final int rowspan) { final DynaFormModelElement nestedModel = new DynaFormModelElement(model, colspan, rowspan, row, elements.size() + 1, ...
[ "public", "DynaFormModelElement", "addModel", "(", "final", "DynaFormModel", "model", ",", "final", "int", "colspan", ",", "final", "int", "rowspan", ")", "{", "final", "DynaFormModelElement", "nestedModel", "=", "new", "DynaFormModelElement", "(", "model", ",", "...
* Adds nested model with given colspan and rowspan. @param model @param colspan @param rowspan @return DynaFormModelElement added model
[ "*", "Adds", "nested", "model", "with", "given", "colspan", "and", "rowspan", "." ]
train
https://github.com/primefaces-extensions/core/blob/afdbca591f60f47898e3517e1e939bc2f63d5355/src/main/java/org/primefaces/extensions/model/dynaform/DynaFormRow.java#L130-L144
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/scoping/ScopedServletUtils.java
ScopedServletUtils.getScopedRequestAttribute
public static Object getScopedRequestAttribute( String attrName, ServletRequest request ) { if ( request instanceof ScopedRequest ) { return ( ( ScopedRequest ) request ).getAttribute( attrName, false ); } return request.getAttribute( attrName ); }
java
public static Object getScopedRequestAttribute( String attrName, ServletRequest request ) { if ( request instanceof ScopedRequest ) { return ( ( ScopedRequest ) request ).getAttribute( attrName, false ); } return request.getAttribute( attrName ); }
[ "public", "static", "Object", "getScopedRequestAttribute", "(", "String", "attrName", ",", "ServletRequest", "request", ")", "{", "if", "(", "request", "instanceof", "ScopedRequest", ")", "{", "return", "(", "(", "ScopedRequest", ")", "request", ")", ".", "getAt...
Get an attribute from the given request, and if it is a {@link ScopedRequest}, ensure that the attribute is <strong>not</strong> "showing through" from the outer request, even if the ScopedRequest allows that by default. @exclude
[ "Get", "an", "attribute", "from", "the", "given", "request", "and", "if", "it", "is", "a", "{", "@link", "ScopedRequest", "}", "ensure", "that", "the", "attribute", "is", "<strong", ">", "not<", "/", "strong", ">", "showing", "through", "from", "the", "o...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/scoping/ScopedServletUtils.java#L358-L366
Jasig/uPortal
uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/cache/PortletCacheControlServiceImpl.java
PortletCacheControlServiceImpl.cacheElement
protected void cacheElement( Ehcache cache, Serializable cacheKey, CachedPortletResultHolder<?> data, CacheControl cacheControl) { // using validation method, ignore expirationTime and defer to cache configuration if (cacheControl.getETag() != null) { ...
java
protected void cacheElement( Ehcache cache, Serializable cacheKey, CachedPortletResultHolder<?> data, CacheControl cacheControl) { // using validation method, ignore expirationTime and defer to cache configuration if (cacheControl.getETag() != null) { ...
[ "protected", "void", "cacheElement", "(", "Ehcache", "cache", ",", "Serializable", "cacheKey", ",", "CachedPortletResultHolder", "<", "?", ">", "data", ",", "CacheControl", "cacheControl", ")", "{", "// using validation method, ignore expirationTime and defer to cache configu...
Construct an appropriate Cache {@link Element} for the cacheKey and data. The element's ttl will be set depending on whether expiration or validation method is indicated from the CacheControl and the cache's configuration.
[ "Construct", "an", "appropriate", "Cache", "{" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-rendering/src/main/java/org/apereo/portal/portlet/container/cache/PortletCacheControlServiceImpl.java#L517-L547
protostuff/protostuff
protostuff-parser/src/main/java/io/protostuff/parser/DefaultProtoLoader.java
DefaultProtoLoader.getResource
public static URL getResource(String resource, Class<?> context, boolean checkParent) { URL url = Thread.currentThread().getContextClassLoader().getResource(resource); if (url != null) return url; if (context != null) { ClassLoader loader = context.ge...
java
public static URL getResource(String resource, Class<?> context, boolean checkParent) { URL url = Thread.currentThread().getContextClassLoader().getResource(resource); if (url != null) return url; if (context != null) { ClassLoader loader = context.ge...
[ "public", "static", "URL", "getResource", "(", "String", "resource", ",", "Class", "<", "?", ">", "context", ",", "boolean", "checkParent", ")", "{", "URL", "url", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ".", ...
Loads a {@link URL} resource from the classloader; If not found, the classloader of the {@code context} class specified will be used. If the flag {@code checkParent} is true, the classloader's parent is included in the lookup.
[ "Loads", "a", "{" ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-parser/src/main/java/io/protostuff/parser/DefaultProtoLoader.java#L299-L318
google/closure-compiler
src/com/google/javascript/jscomp/TypeCheck.java
TypeCheck.checkCallConventions
private void checkCallConventions(NodeTraversal t, Node n) { SubclassRelationship relationship = compiler.getCodingConvention().getClassesDefinedByCall(n); TypedScope scope = t.getTypedScope(); if (relationship != null) { ObjectType superClass = TypeValidator.getInstanceOfCtor( ...
java
private void checkCallConventions(NodeTraversal t, Node n) { SubclassRelationship relationship = compiler.getCodingConvention().getClassesDefinedByCall(n); TypedScope scope = t.getTypedScope(); if (relationship != null) { ObjectType superClass = TypeValidator.getInstanceOfCtor( ...
[ "private", "void", "checkCallConventions", "(", "NodeTraversal", "t", ",", "Node", "n", ")", "{", "SubclassRelationship", "relationship", "=", "compiler", ".", "getCodingConvention", "(", ")", ".", "getClassesDefinedByCall", "(", "n", ")", ";", "TypedScope", "scop...
Validate class-defining calls. Because JS has no 'native' syntax for defining classes, we need to do this manually.
[ "Validate", "class", "-", "defining", "calls", ".", "Because", "JS", "has", "no", "native", "syntax", "for", "defining", "classes", "we", "need", "to", "do", "this", "manually", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeCheck.java#L2506-L2525
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.unescapeXml
public static void unescapeXml(final char[] text, final int offset, final int len, final Writer writer) throws IOException{ if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } final int textLen = (text =...
java
public static void unescapeXml(final char[] text, final int offset, final int len, final Writer writer) throws IOException{ if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } final int textLen = (text =...
[ "public", "static", "void", "unescapeXml", "(", "final", "char", "[", "]", "text", ",", "final", "int", "offset", ",", "final", "int", "len", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", "...
<p> Perform an XML <strong>unescape</strong> operation on a <tt>char[]</tt> input. </p> <p> No additional configuration arguments are required. Unescape operations will always perform <em>complete</em> XML 1.0/1.1 unescape of CERs, decimal and hexadecimal references. </p> <p> This method is <strong>thread-safe</strong>...
[ "<p", ">", "Perform", "an", "XML", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "char", "[]", "<", "/", "tt", ">", "input", ".", "<", "/", "p", ">", "<p", ">", "No", "additional", "configuration", "arguments", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L2423-L2445
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicAtomGenerator.java
BasicAtomGenerator.canDraw
protected boolean canDraw(IAtom atom, IAtomContainer container, RendererModel model) { // don't draw atoms without coordinates if (!hasCoordinates(atom)) { return false; } // don't draw invisible hydrogens if (invisibleHydrogen(atom, model)) { return fals...
java
protected boolean canDraw(IAtom atom, IAtomContainer container, RendererModel model) { // don't draw atoms without coordinates if (!hasCoordinates(atom)) { return false; } // don't draw invisible hydrogens if (invisibleHydrogen(atom, model)) { return fals...
[ "protected", "boolean", "canDraw", "(", "IAtom", "atom", ",", "IAtomContainer", "container", ",", "RendererModel", "model", ")", "{", "// don't draw atoms without coordinates", "if", "(", "!", "hasCoordinates", "(", "atom", ")", ")", "{", "return", "false", ";", ...
Checks an atom to see if it should be drawn. There are three reasons not to draw an atom - a) no coordinates, b) an invisible hydrogen or c) an invisible carbon. @param atom the atom to check @param container the atom container the atom is part of @param model the renderer model @return true if the atom should be draw...
[ "Checks", "an", "atom", "to", "see", "if", "it", "should", "be", "drawn", ".", "There", "are", "three", "reasons", "not", "to", "draw", "an", "atom", "-", "a", ")", "no", "coordinates", "b", ")", "an", "invisible", "hydrogen", "or", "c", ")", "an", ...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicAtomGenerator.java#L289-L306
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.getCompositeEntityAsync
public Observable<CompositeEntityExtractor> getCompositeEntityAsync(UUID appId, String versionId, UUID cEntityId) { return getCompositeEntityWithServiceResponseAsync(appId, versionId, cEntityId).map(new Func1<ServiceResponse<CompositeEntityExtractor>, CompositeEntityExtractor>() { @Override ...
java
public Observable<CompositeEntityExtractor> getCompositeEntityAsync(UUID appId, String versionId, UUID cEntityId) { return getCompositeEntityWithServiceResponseAsync(appId, versionId, cEntityId).map(new Func1<ServiceResponse<CompositeEntityExtractor>, CompositeEntityExtractor>() { @Override ...
[ "public", "Observable", "<", "CompositeEntityExtractor", ">", "getCompositeEntityAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "cEntityId", ")", "{", "return", "getCompositeEntityWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", ...
Gets information about the composite entity model. @param appId The application ID. @param versionId The version ID. @param cEntityId The composite entity extractor ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the CompositeEntityExtractor object
[ "Gets", "information", "about", "the", "composite", "entity", "model", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L3964-L3971
junit-team/junit4
src/main/java/org/junit/runners/ParentRunner.java
ParentRunner.withBeforeClasses
protected Statement withBeforeClasses(Statement statement) { List<FrameworkMethod> befores = testClass .getAnnotatedMethods(BeforeClass.class); return befores.isEmpty() ? statement : new RunBefores(statement, befores, null); }
java
protected Statement withBeforeClasses(Statement statement) { List<FrameworkMethod> befores = testClass .getAnnotatedMethods(BeforeClass.class); return befores.isEmpty() ? statement : new RunBefores(statement, befores, null); }
[ "protected", "Statement", "withBeforeClasses", "(", "Statement", "statement", ")", "{", "List", "<", "FrameworkMethod", ">", "befores", "=", "testClass", ".", "getAnnotatedMethods", "(", "BeforeClass", ".", "class", ")", ";", "return", "befores", ".", "isEmpty", ...
Returns a {@link Statement}: run all non-overridden {@code @BeforeClass} methods on this class and superclasses before executing {@code statement}; if any throws an Exception, stop execution and pass the exception on.
[ "Returns", "a", "{" ]
train
https://github.com/junit-team/junit4/blob/d9861ecdb6e487f6c352437ee823879aca3b81d4/src/main/java/org/junit/runners/ParentRunner.java#L236-L241
moleculer-java/moleculer-java
src/main/java/services/moleculer/cacher/DistributedCacher.java
DistributedCacher.getCacheKey
@Override public String getCacheKey(String name, Tree params, String... keys) { if (params == null) { return name; } StringBuilder buffer = new StringBuilder(128); serializeKey(buffer, params, keys); String serializedParams = buffer.toString(); int paramsLength = serializedParams.length(); if...
java
@Override public String getCacheKey(String name, Tree params, String... keys) { if (params == null) { return name; } StringBuilder buffer = new StringBuilder(128); serializeKey(buffer, params, keys); String serializedParams = buffer.toString(); int paramsLength = serializedParams.length(); if...
[ "@", "Override", "public", "String", "getCacheKey", "(", "String", "name", ",", "Tree", "params", ",", "String", "...", "keys", ")", "{", "if", "(", "params", "==", "null", ")", "{", "return", "name", ";", "}", "StringBuilder", "buffer", "=", "new", "S...
Creates a cacher-specific key by name and params. Concatenates the name and params. @param name action name @param params input (JSON) structure @param keys keys in the "params" structure (optional) @return generated cache key String
[ "Creates", "a", "cacher", "-", "specific", "key", "by", "name", "and", "params", ".", "Concatenates", "the", "name", "and", "params", "." ]
train
https://github.com/moleculer-java/moleculer-java/blob/27575c44b9ecacc17c4456ceacf5d1851abf1cc4/src/main/java/services/moleculer/cacher/DistributedCacher.java#L82-L124
Waikato/moa
moa/src/main/java/moa/classifiers/oneclass/NearestNeighbourDescription.java
NearestNeighbourDescription.getNearestNeighbour
private Instance getNearestNeighbour(Instance inst, List<Instance> neighbourhood2, boolean inNbhd) { double dist = Double.MAX_VALUE; Instance nearestNeighbour = null; for(Instance candidateNN : neighbourhood2) { // If inst is in neighbourhood2 and an identical instance is found, then it is no longer requ...
java
private Instance getNearestNeighbour(Instance inst, List<Instance> neighbourhood2, boolean inNbhd) { double dist = Double.MAX_VALUE; Instance nearestNeighbour = null; for(Instance candidateNN : neighbourhood2) { // If inst is in neighbourhood2 and an identical instance is found, then it is no longer requ...
[ "private", "Instance", "getNearestNeighbour", "(", "Instance", "inst", ",", "List", "<", "Instance", ">", "neighbourhood2", ",", "boolean", "inNbhd", ")", "{", "double", "dist", "=", "Double", ".", "MAX_VALUE", ";", "Instance", "nearestNeighbour", "=", "null", ...
Searches the neighbourhood in order to find the argument instance's nearest neighbour. @param inst the instance whose nearest neighbour is sought @param neighbourhood2 the neighbourhood to search for the nearest neighbour @param inNbhd if inst is in neighbourhood2: <b>true</b>, else: <b>false</b> @return the instance...
[ "Searches", "the", "neighbourhood", "in", "order", "to", "find", "the", "argument", "instance", "s", "nearest", "neighbour", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/classifiers/oneclass/NearestNeighbourDescription.java#L170-L194
ulisesbocchio/spring-boot-security-saml
spring-boot-security-saml/src/main/java/com/github/ulisesbocchio/spring/boot/security/saml/resource/KeystoreFactory.java
KeystoreFactory.loadKeystore
@SneakyThrows public KeyStore loadKeystore(String certResourceLocation, String privateKeyResourceLocation, String alias, String keyPassword) { KeyStore keystore = createEmptyKeystore(); X509Certificate cert = loadCert(certResourceLocation); RSAPrivateKey privateKey = loadPrivateKey(privateKe...
java
@SneakyThrows public KeyStore loadKeystore(String certResourceLocation, String privateKeyResourceLocation, String alias, String keyPassword) { KeyStore keystore = createEmptyKeystore(); X509Certificate cert = loadCert(certResourceLocation); RSAPrivateKey privateKey = loadPrivateKey(privateKe...
[ "@", "SneakyThrows", "public", "KeyStore", "loadKeystore", "(", "String", "certResourceLocation", ",", "String", "privateKeyResourceLocation", ",", "String", "alias", ",", "String", "keyPassword", ")", "{", "KeyStore", "keystore", "=", "createEmptyKeystore", "(", ")",...
Based on a public certificate, private key, alias and password, this method will load the certificate and private key as an entry into a newly created keystore, and it will set the provided alias and password to the keystore entry. @param certResourceLocation @param privateKeyResourceLocation @param alias @param keyPa...
[ "Based", "on", "a", "public", "certificate", "private", "key", "alias", "and", "password", "this", "method", "will", "load", "the", "certificate", "and", "private", "key", "as", "an", "entry", "into", "a", "newly", "created", "keystore", "and", "it", "will",...
train
https://github.com/ulisesbocchio/spring-boot-security-saml/blob/63596fe9b4b5504053392b9ee9a925b9a77644d4/spring-boot-security-saml/src/main/java/com/github/ulisesbocchio/spring/boot/security/saml/resource/KeystoreFactory.java#L46-L53
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java
HttpChannelConfig.parseThrowIOEForInboundConnections
private void parseThrowIOEForInboundConnections(Map<?, ?> props) { //PI57542 Object value = props.get(HttpConfigConstants.PROPNAME_THROW_IOE_FOR_INBOUND_CONNECTIONS); if (null != value) { this.throwIOEForInboundConnections = convertBoolean(value); if ((TraceComponent.isAn...
java
private void parseThrowIOEForInboundConnections(Map<?, ?> props) { //PI57542 Object value = props.get(HttpConfigConstants.PROPNAME_THROW_IOE_FOR_INBOUND_CONNECTIONS); if (null != value) { this.throwIOEForInboundConnections = convertBoolean(value); if ((TraceComponent.isAn...
[ "private", "void", "parseThrowIOEForInboundConnections", "(", "Map", "<", "?", ",", "?", ">", "props", ")", "{", "//PI57542", "Object", "value", "=", "props", ".", "get", "(", "HttpConfigConstants", ".", "PROPNAME_THROW_IOE_FOR_INBOUND_CONNECTIONS", ")", ";", "if"...
Check the configuration map for if we should swallow inbound connections IOEs @ param props
[ "Check", "the", "configuration", "map", "for", "if", "we", "should", "swallow", "inbound", "connections", "IOEs" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpChannelConfig.java#L1326-L1335
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/ExceptionUtils.java
ExceptionUtils.throwAsIAE
public static void throwAsIAE(Throwable t, String msg) { throwIfRTE(t); throwIfError(t); throw new IllegalArgumentException(msg, t); }
java
public static void throwAsIAE(Throwable t, String msg) { throwIfRTE(t); throwIfError(t); throw new IllegalArgumentException(msg, t); }
[ "public", "static", "void", "throwAsIAE", "(", "Throwable", "t", ",", "String", "msg", ")", "{", "throwIfRTE", "(", "t", ")", ";", "throwIfError", "(", "t", ")", ";", "throw", "new", "IllegalArgumentException", "(", "msg", ",", "t", ")", ";", "}" ]
Method that will wrap 't' as an {@link IllegalArgumentException} (and with specified message) if it is a checked exception; otherwise (runtime exception or error) throw as is. @param t the Throwable to possibly propagate @param msg the detail message
[ "Method", "that", "will", "wrap", "t", "as", "an", "{", "@link", "IllegalArgumentException", "}", "(", "and", "with", "specified", "message", ")", "if", "it", "is", "a", "checked", "exception", ";", "otherwise", "(", "runtime", "exception", "or", "error", ...
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/ExceptionUtils.java#L146-L150
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/ParagraphBuilder.java
ParagraphBuilder.styledSpan
public ParagraphBuilder styledSpan(final String text, final TextStyle ts) { final ParagraphElement paragraphElement = new Span(text, ts); this.paragraphElements.add(paragraphElement); return this; }
java
public ParagraphBuilder styledSpan(final String text, final TextStyle ts) { final ParagraphElement paragraphElement = new Span(text, ts); this.paragraphElements.add(paragraphElement); return this; }
[ "public", "ParagraphBuilder", "styledSpan", "(", "final", "String", "text", ",", "final", "TextStyle", "ts", ")", "{", "final", "ParagraphElement", "paragraphElement", "=", "new", "Span", "(", "text", ",", "ts", ")", ";", "this", ".", "paragraphElements", ".",...
Create a styled span with a text content @param text the text @param ts the style @return this for fluent style
[ "Create", "a", "styled", "span", "with", "a", "text", "content" ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/ParagraphBuilder.java#L183-L187
yshrsmz/KeyboardVisibilityEvent
keyboardvisibilityevent/src/main/java/net/yslibrary/android/keyboardvisibilityevent/util/UIUtil.java
UIUtil.showKeyboard
public static void showKeyboard(Context context, EditText target) { if (context == null || target == null) { return; } InputMethodManager imm = getInputMethodManager(context); imm.showSoftInput(target, InputMethodManager.SHOW_IMPLICIT); }
java
public static void showKeyboard(Context context, EditText target) { if (context == null || target == null) { return; } InputMethodManager imm = getInputMethodManager(context); imm.showSoftInput(target, InputMethodManager.SHOW_IMPLICIT); }
[ "public", "static", "void", "showKeyboard", "(", "Context", "context", ",", "EditText", "target", ")", "{", "if", "(", "context", "==", "null", "||", "target", "==", "null", ")", "{", "return", ";", "}", "InputMethodManager", "imm", "=", "getInputMethodManag...
Show keyboard and focus to given EditText @param context Context @param target EditText to focus
[ "Show", "keyboard", "and", "focus", "to", "given", "EditText" ]
train
https://github.com/yshrsmz/KeyboardVisibilityEvent/blob/fbde29a2c28ff1b2fa44f43cdd1ff3ec1d3321d8/keyboardvisibilityevent/src/main/java/net/yslibrary/android/keyboardvisibilityevent/util/UIUtil.java#L30-L38
thombergs/docx-stamper
src/main/java/org/wickedsource/docxstamper/replace/PlaceholderReplacer.java
PlaceholderReplacer.resolveExpressions
public void resolveExpressions(final WordprocessingMLPackage document, ProxyBuilder<T> proxyBuilder) { try { final T expressionContext = proxyBuilder.build(); CoordinatesWalker walker = new BaseCoordinatesWalker(document) { @Override protected void onParagraph(ParagraphCoordinates paragr...
java
public void resolveExpressions(final WordprocessingMLPackage document, ProxyBuilder<T> proxyBuilder) { try { final T expressionContext = proxyBuilder.build(); CoordinatesWalker walker = new BaseCoordinatesWalker(document) { @Override protected void onParagraph(ParagraphCoordinates paragr...
[ "public", "void", "resolveExpressions", "(", "final", "WordprocessingMLPackage", "document", ",", "ProxyBuilder", "<", "T", ">", "proxyBuilder", ")", "{", "try", "{", "final", "T", "expressionContext", "=", "proxyBuilder", ".", "build", "(", ")", ";", "Coordinat...
Finds expressions in a document and resolves them against the specified context object. The expressions in the document are then replaced by the resolved values. @param document the document in which to replace all expressions. @param proxyBuilder builder for a proxy around the context root to customize ...
[ "Finds", "expressions", "in", "a", "document", "and", "resolves", "them", "against", "the", "specified", "context", "object", ".", "The", "expressions", "in", "the", "document", "are", "then", "replaced", "by", "the", "resolved", "values", "." ]
train
https://github.com/thombergs/docx-stamper/blob/f1a7e3e92a59abaffac299532fe49450c3b041eb/src/main/java/org/wickedsource/docxstamper/replace/PlaceholderReplacer.java#L75-L88
meertensinstituut/mtas
src/main/java/mtas/search/spans/MtasSpanRecurrenceSpans.java
MtasSpanRecurrenceSpans.expandWithIgnoreItem
private List<Match> expandWithIgnoreItem(int docId, Match match) { List<Match> list = new ArrayList<>(); try { Set<Integer> ignoreList = ignoreItem.getFullEndPositionList(docId, match.endPosition); if (ignoreList != null) { for (Integer endPosition : ignoreList) { list.ad...
java
private List<Match> expandWithIgnoreItem(int docId, Match match) { List<Match> list = new ArrayList<>(); try { Set<Integer> ignoreList = ignoreItem.getFullEndPositionList(docId, match.endPosition); if (ignoreList != null) { for (Integer endPosition : ignoreList) { list.ad...
[ "private", "List", "<", "Match", ">", "expandWithIgnoreItem", "(", "int", "docId", ",", "Match", "match", ")", "{", "List", "<", "Match", ">", "list", "=", "new", "ArrayList", "<>", "(", ")", ";", "try", "{", "Set", "<", "Integer", ">", "ignoreList", ...
Expand with ignore item. @param docId the doc id @param match the match @return the list
[ "Expand", "with", "ignore", "item", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/search/spans/MtasSpanRecurrenceSpans.java#L353-L367
autermann/yaml
src/main/java/com/github/autermann/yaml/nodes/YamlMappingNode.java
YamlMappingNode.put
public T put(YamlNode key, BigInteger value) { return put(key, getNodeFactory().bigIntegerNode(value)); }
java
public T put(YamlNode key, BigInteger value) { return put(key, getNodeFactory().bigIntegerNode(value)); }
[ "public", "T", "put", "(", "YamlNode", "key", ",", "BigInteger", "value", ")", "{", "return", "put", "(", "key", ",", "getNodeFactory", "(", ")", ".", "bigIntegerNode", "(", "value", ")", ")", ";", "}" ]
Adds the specified {@code key}/{@code value} pair to this mapping. @param key the key @param value the value @return {@code this}
[ "Adds", "the", "specified", "{", "@code", "key", "}", "/", "{", "@code", "value", "}", "pair", "to", "this", "mapping", "." ]
train
https://github.com/autermann/yaml/blob/5f8ab03e4fec3a2abe72c03561cdaa3a3936634d/src/main/java/com/github/autermann/yaml/nodes/YamlMappingNode.java#L588-L590
yidongnan/grpc-spring-boot-starter
grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientAutoConfiguration.java
GrpcClientAutoConfiguration.grpcNameResolverFactory
@ConditionalOnMissingBean @Lazy // Not needed for InProcessChannelFactories @Bean public NameResolver.Factory grpcNameResolverFactory(final GrpcChannelsProperties channelProperties) { return new ConfigMappedNameResolverFactory(channelProperties, NameResolverProvider.asFactory(), Stat...
java
@ConditionalOnMissingBean @Lazy // Not needed for InProcessChannelFactories @Bean public NameResolver.Factory grpcNameResolverFactory(final GrpcChannelsProperties channelProperties) { return new ConfigMappedNameResolverFactory(channelProperties, NameResolverProvider.asFactory(), Stat...
[ "@", "ConditionalOnMissingBean", "@", "Lazy", "// Not needed for InProcessChannelFactories", "@", "Bean", "public", "NameResolver", ".", "Factory", "grpcNameResolverFactory", "(", "final", "GrpcChannelsProperties", "channelProperties", ")", "{", "return", "new", "ConfigMapped...
Creates a new name resolver factory with the given channel properties. The properties are used to map the client name to the actual service addresses. If you want to add more name resolver schemes or modify existing ones, you can do that in the following ways: <ul> <li>If you only rely on the client properties or othe...
[ "Creates", "a", "new", "name", "resolver", "factory", "with", "the", "given", "channel", "properties", ".", "The", "properties", "are", "used", "to", "map", "the", "client", "name", "to", "the", "actual", "service", "addresses", ".", "If", "you", "want", "...
train
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientAutoConfiguration.java#L125-L131
mfornos/humanize
humanize-slim/src/main/java/humanize/Humanize.java
Humanize.paceFormat
public static String paceFormat(final Number value, final PaceParameters params) { params.checkArguments(); Pace args = pace(value, params.interval); ResourceBundle bundle = context.get().getBundle(); String accuracy = bundle.getString(args.getAccuracy()); String timeUnit ...
java
public static String paceFormat(final Number value, final PaceParameters params) { params.checkArguments(); Pace args = pace(value, params.interval); ResourceBundle bundle = context.get().getBundle(); String accuracy = bundle.getString(args.getAccuracy()); String timeUnit ...
[ "public", "static", "String", "paceFormat", "(", "final", "Number", "value", ",", "final", "PaceParameters", "params", ")", "{", "params", ".", "checkArguments", "(", ")", ";", "Pace", "args", "=", "pace", "(", "value", ",", "params", ".", "interval", ")",...
Matches a pace (value and interval) with a logical time frame. Very useful for slow paces. @param value The number of occurrences within the specified interval @param params The pace format parameterization @return an human readable textual representation of the pace
[ "Matches", "a", "pace", "(", "value", "and", "interval", ")", "with", "a", "logical", "time", "frame", ".", "Very", "useful", "for", "slow", "paces", "." ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L2093-L2107
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateSecretAsync
public ServiceFuture<SecretBundle> updateSecretAsync(String vaultBaseUrl, String secretName, String secretVersion, final ServiceCallback<SecretBundle> serviceCallback) { return ServiceFuture.fromResponse(updateSecretWithServiceResponseAsync(vaultBaseUrl, secretName, secretVersion), serviceCallback); }
java
public ServiceFuture<SecretBundle> updateSecretAsync(String vaultBaseUrl, String secretName, String secretVersion, final ServiceCallback<SecretBundle> serviceCallback) { return ServiceFuture.fromResponse(updateSecretWithServiceResponseAsync(vaultBaseUrl, secretName, secretVersion), serviceCallback); }
[ "public", "ServiceFuture", "<", "SecretBundle", ">", "updateSecretAsync", "(", "String", "vaultBaseUrl", ",", "String", "secretName", ",", "String", "secretVersion", ",", "final", "ServiceCallback", "<", "SecretBundle", ">", "serviceCallback", ")", "{", "return", "S...
Updates the attributes associated with a specified secret in a given key vault. The UPDATE operation changes specified attributes of an existing stored secret. Attributes that are not specified in the request are left unchanged. The value of a secret itself cannot be changed. This operation requires the secrets/set per...
[ "Updates", "the", "attributes", "associated", "with", "a", "specified", "secret", "in", "a", "given", "key", "vault", ".", "The", "UPDATE", "operation", "changes", "specified", "attributes", "of", "an", "existing", "stored", "secret", ".", "Attributes", "that", ...
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#L3635-L3637
Whiley/WhileyCompiler
src/main/java/wyil/transform/VerificationConditionGenerator.java
VerificationConditionGenerator.translateAssert
private Context translateAssert(WyilFile.Stmt.Assert stmt, Context context) { Pair<Expr, Context> p = translateExpressionWithChecks(stmt.getCondition(), null, context); Expr condition = p.first(); context = p.second(); // VerificationCondition verificationCondition = new VerificationCondition("assertion faile...
java
private Context translateAssert(WyilFile.Stmt.Assert stmt, Context context) { Pair<Expr, Context> p = translateExpressionWithChecks(stmt.getCondition(), null, context); Expr condition = p.first(); context = p.second(); // VerificationCondition verificationCondition = new VerificationCondition("assertion faile...
[ "private", "Context", "translateAssert", "(", "WyilFile", ".", "Stmt", ".", "Assert", "stmt", ",", "Context", "context", ")", "{", "Pair", "<", "Expr", ",", "Context", ">", "p", "=", "translateExpressionWithChecks", "(", "stmt", ".", "getCondition", "(", ")"...
Translate an assert statement. This emits a verification condition which ensures the assert condition holds, given the current context. @param stmt @param wyalFile
[ "Translate", "an", "assert", "statement", ".", "This", "emits", "a", "verification", "condition", "which", "ensures", "the", "assert", "condition", "holds", "given", "the", "current", "context", "." ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/transform/VerificationConditionGenerator.java#L474-L484
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.partValue
public static int partValue(int total, int partCount, boolean isPlusOneWhenHasRem) { int partValue = 0; if (total % partCount == 0) { partValue = total / partCount; } else { partValue = (int) Math.floor(total / partCount); if (isPlusOneWhenHasRem) { partValue += 1; } } return partVal...
java
public static int partValue(int total, int partCount, boolean isPlusOneWhenHasRem) { int partValue = 0; if (total % partCount == 0) { partValue = total / partCount; } else { partValue = (int) Math.floor(total / partCount); if (isPlusOneWhenHasRem) { partValue += 1; } } return partVal...
[ "public", "static", "int", "partValue", "(", "int", "total", ",", "int", "partCount", ",", "boolean", "isPlusOneWhenHasRem", ")", "{", "int", "partValue", "=", "0", ";", "if", "(", "total", "%", "partCount", "==", "0", ")", "{", "partValue", "=", "total"...
把给定的总数平均分成N份,返回每份的个数<br> 如果isPlusOneWhenHasRem为true,则当除以分数有余数时每份+1,否则丢弃余数部分 @param total 总数 @param partCount 份数 @param isPlusOneWhenHasRem 在有余数时是否每份+1 @return 每份的个数 @since 4.0.7
[ "把给定的总数平均分成N份,返回每份的个数<br", ">", "如果isPlusOneWhenHasRem为true,则当除以分数有余数时每份", "+", "1,否则丢弃余数部分" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L2072-L2083
tvesalainen/util
util/src/main/java/org/vesalainen/util/CmdArgs.java
CmdArgs.addOption
public final <T> void addOption(Class<T> cls, String name, String description) { addOption(cls, name, description, null); }
java
public final <T> void addOption(Class<T> cls, String name, String description) { addOption(cls, name, description, null); }
[ "public", "final", "<", "T", ">", "void", "addOption", "(", "Class", "<", "T", ">", "cls", ",", "String", "name", ",", "String", "description", ")", "{", "addOption", "(", "cls", ",", "name", ",", "description", ",", "null", ")", ";", "}" ]
Add a mandatory option @param <T> Type of option @param cls Option type class @param name Option name Option name without @param description Option description
[ "Add", "a", "mandatory", "option" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/CmdArgs.java#L331-L334
graknlabs/grakn
server/src/server/exception/TransactionException.java
TransactionException.illegalUnhasWithInstance
public static TransactionException illegalUnhasWithInstance(String type, String attributeType, boolean isKey) { return create(ErrorMessage.ILLEGAL_TYPE_UNHAS_ATTRIBUTE_WITH_INSTANCE.getMessage(type, isKey ? "key" : "has", attributeType)); }
java
public static TransactionException illegalUnhasWithInstance(String type, String attributeType, boolean isKey) { return create(ErrorMessage.ILLEGAL_TYPE_UNHAS_ATTRIBUTE_WITH_INSTANCE.getMessage(type, isKey ? "key" : "has", attributeType)); }
[ "public", "static", "TransactionException", "illegalUnhasWithInstance", "(", "String", "type", ",", "String", "attributeType", ",", "boolean", "isKey", ")", "{", "return", "create", "(", "ErrorMessage", ".", "ILLEGAL_TYPE_UNHAS_ATTRIBUTE_WITH_INSTANCE", ".", "getMessage",...
Thrown when there exists and instance of {@code type} HAS {@code attributeType} upon unlinking the AttributeType from the Type
[ "Thrown", "when", "there", "exists", "and", "instance", "of", "{" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/server/exception/TransactionException.java#L122-L124
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.angleSparseDense
public static double angleSparseDense(SparseNumberVector v1, NumberVector v2) { // TODO: exploit precomputed length, when available. final int dim2 = v2.getDimensionality(); double l1 = 0., l2 = 0., cross = 0.; int i1 = v1.iter(), d2 = 0; while(v1.iterValid(i1)) { final int d1 = v1.iterDim(i1)...
java
public static double angleSparseDense(SparseNumberVector v1, NumberVector v2) { // TODO: exploit precomputed length, when available. final int dim2 = v2.getDimensionality(); double l1 = 0., l2 = 0., cross = 0.; int i1 = v1.iter(), d2 = 0; while(v1.iterValid(i1)) { final int d1 = v1.iterDim(i1)...
[ "public", "static", "double", "angleSparseDense", "(", "SparseNumberVector", "v1", ",", "NumberVector", "v2", ")", "{", "// TODO: exploit precomputed length, when available.", "final", "int", "dim2", "=", "v2", ".", "getDimensionality", "(", ")", ";", "double", "l1", ...
Compute the angle for a sparse and a dense vector. @param v1 Sparse first vector @param v2 Dense second vector @return angle
[ "Compute", "the", "angle", "for", "a", "sparse", "and", "a", "dense", "vector", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L179-L216
grpc/grpc-java
netty/src/main/java/io/grpc/netty/GrpcSslContexts.java
GrpcSslContexts.configure
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1784") @CanIgnoreReturnValue public static SslContextBuilder configure(SslContextBuilder builder, SslProvider provider) { switch (provider) { case JDK: { Provider jdkProvider = findJdkProvider(); if (jdkProvider == null) { ...
java
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1784") @CanIgnoreReturnValue public static SslContextBuilder configure(SslContextBuilder builder, SslProvider provider) { switch (provider) { case JDK: { Provider jdkProvider = findJdkProvider(); if (jdkProvider == null) { ...
[ "@", "ExperimentalApi", "(", "\"https://github.com/grpc/grpc-java/issues/1784\"", ")", "@", "CanIgnoreReturnValue", "public", "static", "SslContextBuilder", "configure", "(", "SslContextBuilder", "builder", ",", "SslProvider", "provider", ")", "{", "switch", "(", "provider"...
Set ciphers and APN appropriate for gRPC. Precisely what is set is permitted to change, so if an application requires particular settings it should override the options set here.
[ "Set", "ciphers", "and", "APN", "appropriate", "for", "gRPC", ".", "Precisely", "what", "is", "set", "is", "permitted", "to", "change", "so", "if", "an", "application", "requires", "particular", "settings", "it", "should", "override", "the", "options", "set", ...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/netty/src/main/java/io/grpc/netty/GrpcSslContexts.java#L178-L207
ZieIony/Carbon
carbon/src/main/java/carbon/drawable/ripple/LollipopDrawablesCompat.java
LollipopDrawablesCompat.applyTheme
public static void applyTheme(Drawable d, Resources.Theme t) { IMPL.applyTheme(d, t); }
java
public static void applyTheme(Drawable d, Resources.Theme t) { IMPL.applyTheme(d, t); }
[ "public", "static", "void", "applyTheme", "(", "Drawable", "d", ",", "Resources", ".", "Theme", "t", ")", "{", "IMPL", ".", "applyTheme", "(", "d", ",", "t", ")", ";", "}" ]
Applies the specified theme to this Drawable and its children.
[ "Applies", "the", "specified", "theme", "to", "this", "Drawable", "and", "its", "children", "." ]
train
https://github.com/ZieIony/Carbon/blob/78b0a432bd49edc7a6a13ce111cab274085d1693/carbon/src/main/java/carbon/drawable/ripple/LollipopDrawablesCompat.java#L62-L64
alkacon/opencms-core
src/org/opencms/ui/components/CmsBasicDialog.java
CmsBasicDialog.createResourceListPanel
protected Panel createResourceListPanel(String caption, List<CmsResource> resources) { Panel result = null; if (CmsStringUtil.isEmptyOrWhitespaceOnly(caption)) { result = new Panel(); } else { result = new Panel(caption); } result.addStyleName("v-scrollab...
java
protected Panel createResourceListPanel(String caption, List<CmsResource> resources) { Panel result = null; if (CmsStringUtil.isEmptyOrWhitespaceOnly(caption)) { result = new Panel(); } else { result = new Panel(caption); } result.addStyleName("v-scrollab...
[ "protected", "Panel", "createResourceListPanel", "(", "String", "caption", ",", "List", "<", "CmsResource", ">", "resources", ")", "{", "Panel", "result", "=", "null", ";", "if", "(", "CmsStringUtil", ".", "isEmptyOrWhitespaceOnly", "(", "caption", ")", ")", "...
Creates a resource list panel.<p> @param caption the caption to use @param resources the resources @return the panel
[ "Creates", "a", "resource", "list", "panel", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/CmsBasicDialog.java#L514-L534
thorntail/thorntail
thorntail-runner/src/main/java/org/wildfly/swarm/runner/FatJarBuilder.java
FatJarBuilder.buildWar
private File buildWar(List<ArtifactOrFile> classPathEntries) { try { List<String> classesUrls = classPathEntries.stream() .map(ArtifactOrFile::file) .filter(this::isDirectory) .filter(url -> url.contains("classes")) .col...
java
private File buildWar(List<ArtifactOrFile> classPathEntries) { try { List<String> classesUrls = classPathEntries.stream() .map(ArtifactOrFile::file) .filter(this::isDirectory) .filter(url -> url.contains("classes")) .col...
[ "private", "File", "buildWar", "(", "List", "<", "ArtifactOrFile", ">", "classPathEntries", ")", "{", "try", "{", "List", "<", "String", ">", "classesUrls", "=", "classPathEntries", ".", "stream", "(", ")", ".", "map", "(", "ArtifactOrFile", "::", "file", ...
builds war with classes inside @param classPathEntries class path entries as ArtifactSpec or URLs @return the war file
[ "builds", "war", "with", "classes", "inside" ]
train
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/thorntail-runner/src/main/java/org/wildfly/swarm/runner/FatJarBuilder.java#L151-L169
j-easy/easy-random
easy-random-core/src/main/java/org/jeasy/random/randomizers/range/SqlDateRangeRandomizer.java
SqlDateRangeRandomizer.aNewSqlDateRangeRandomizer
public static SqlDateRangeRandomizer aNewSqlDateRangeRandomizer(final Date min, final Date max, final long seed) { return new SqlDateRangeRandomizer(min, max, seed); }
java
public static SqlDateRangeRandomizer aNewSqlDateRangeRandomizer(final Date min, final Date max, final long seed) { return new SqlDateRangeRandomizer(min, max, seed); }
[ "public", "static", "SqlDateRangeRandomizer", "aNewSqlDateRangeRandomizer", "(", "final", "Date", "min", ",", "final", "Date", "max", ",", "final", "long", "seed", ")", "{", "return", "new", "SqlDateRangeRandomizer", "(", "min", ",", "max", ",", "seed", ")", "...
Create a new {@link SqlDateRangeRandomizer}. @param min min value @param max max value @param seed initial seed @return a new {@link SqlDateRangeRandomizer}.
[ "Create", "a", "new", "{", "@link", "SqlDateRangeRandomizer", "}", "." ]
train
https://github.com/j-easy/easy-random/blob/816b0d6a74c7288af111e70ae1b0b57d7fe3b59d/easy-random-core/src/main/java/org/jeasy/random/randomizers/range/SqlDateRangeRandomizer.java#L75-L77
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/ConnectedStreams.java
ConnectedStreams.flatMap
public <R> SingleOutputStreamOperator<R> flatMap( CoFlatMapFunction<IN1, IN2, R> coFlatMapper) { TypeInformation<R> outTypeInfo = TypeExtractor.getBinaryOperatorReturnType( coFlatMapper, CoFlatMapFunction.class, 0, 1, 2, TypeExtractor.NO_INDEX, getType1(), getType2(), Utils.getCallLocat...
java
public <R> SingleOutputStreamOperator<R> flatMap( CoFlatMapFunction<IN1, IN2, R> coFlatMapper) { TypeInformation<R> outTypeInfo = TypeExtractor.getBinaryOperatorReturnType( coFlatMapper, CoFlatMapFunction.class, 0, 1, 2, TypeExtractor.NO_INDEX, getType1(), getType2(), Utils.getCallLocat...
[ "public", "<", "R", ">", "SingleOutputStreamOperator", "<", "R", ">", "flatMap", "(", "CoFlatMapFunction", "<", "IN1", ",", "IN2", ",", "R", ">", "coFlatMapper", ")", "{", "TypeInformation", "<", "R", ">", "outTypeInfo", "=", "TypeExtractor", ".", "getBinary...
Applies a CoFlatMap transformation on a {@link ConnectedStreams} and maps the output to a common type. The transformation calls a {@link CoFlatMapFunction#flatMap1} for each element of the first input and {@link CoFlatMapFunction#flatMap2} for each element of the second input. Each CoFlatMapFunction call returns any nu...
[ "Applies", "a", "CoFlatMap", "transformation", "on", "a", "{", "@link", "ConnectedStreams", "}", "and", "maps", "the", "output", "to", "a", "common", "type", ".", "The", "transformation", "calls", "a", "{", "@link", "CoFlatMapFunction#flatMap1", "}", "for", "e...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/ConnectedStreams.java#L257-L273
lotaris/rox-commons-maven-plugin
src/main/java/org/twdata/maven/mojoexecutor/MojoExecutor.java
MojoExecutor.executeMojo
public static void executeMojo(Plugin plugin, String goal, Xpp3Dom configuration, ExecutionEnvironment env) throws MojoExecutionException { if (configuration == null) { throw new NullPointerException("configuration may not be null"); } try { String executionId = null; if (goal != null && goal.l...
java
public static void executeMojo(Plugin plugin, String goal, Xpp3Dom configuration, ExecutionEnvironment env) throws MojoExecutionException { if (configuration == null) { throw new NullPointerException("configuration may not be null"); } try { String executionId = null; if (goal != null && goal.l...
[ "public", "static", "void", "executeMojo", "(", "Plugin", "plugin", ",", "String", "goal", ",", "Xpp3Dom", "configuration", ",", "ExecutionEnvironment", "env", ")", "throws", "MojoExecutionException", "{", "if", "(", "configuration", "==", "null", ")", "{", "thr...
Entry point for executing a mojo @param plugin The plugin to execute @param goal The goal to execute @param configuration The execution configuration @param env The execution environment @throws MojoExecutionException If there are any exceptions locating or executing the mojo
[ "Entry", "point", "for", "executing", "a", "mojo" ]
train
https://github.com/lotaris/rox-commons-maven-plugin/blob/e2602d7f1e8c2e6994c0df07cc0003828adfa2af/src/main/java/org/twdata/maven/mojoexecutor/MojoExecutor.java#L73-L112
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/MapOutputFile.java
MapOutputFile.getInputFile
public Path getInputFile(int mapId, TaskAttemptID reduceTaskId) throws IOException { // TODO *oom* should use a format here return lDirAlloc.getLocalPathToRead(TaskTracker.getIntermediateOutputDir( jobId.toString(), reduceTaskId.toString()) + "/map_" + mapId + "...
java
public Path getInputFile(int mapId, TaskAttemptID reduceTaskId) throws IOException { // TODO *oom* should use a format here return lDirAlloc.getLocalPathToRead(TaskTracker.getIntermediateOutputDir( jobId.toString(), reduceTaskId.toString()) + "/map_" + mapId + "...
[ "public", "Path", "getInputFile", "(", "int", "mapId", ",", "TaskAttemptID", "reduceTaskId", ")", "throws", "IOException", "{", "// TODO *oom* should use a format here", "return", "lDirAlloc", ".", "getLocalPathToRead", "(", "TaskTracker", ".", "getIntermediateOutputDir", ...
Return a local reduce input file created earlier @param mapTaskId a map task id @param reduceTaskId a reduce task id
[ "Return", "a", "local", "reduce", "input", "file", "created", "earlier" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/MapOutputFile.java#L154-L161
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/MethodUtils.java
MethodUtils.invokeSetter
public static void invokeSetter(Object object, String setterName, Object[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { int index = setterName.indexOf('.'); if (index > 0) { String getterName = setterName.substring(0, index); ...
java
public static void invokeSetter(Object object, String setterName, Object[] args) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { int index = setterName.indexOf('.'); if (index > 0) { String getterName = setterName.substring(0, index); ...
[ "public", "static", "void", "invokeSetter", "(", "Object", "object", ",", "String", "setterName", ",", "Object", "[", "]", "args", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", ",", "InvocationTargetException", "{", "int", "index", "=", "s...
Sets the value of a bean property to an Object. @param object the bean to change @param setterName the property name or setter method name @param args use this arguments @throws NoSuchMethodException the no such method exception @throws IllegalAccessException the illegal access exception @throws InvocationTargetExcept...
[ "Sets", "the", "value", "of", "a", "bean", "property", "to", "an", "Object", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/MethodUtils.java#L69-L82