repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
201
func_name
stringlengths
4
126
whole_func_string
stringlengths
75
3.57k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.57k
func_code_tokens
listlengths
21
599
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
aalmiray/Json-lib
src/main/java/net/sf/json/JSONObject.java
JSONObject.element
public JSONObject element( String key, boolean value ) { verifyIsNull(); return element( key, value ? Boolean.TRUE : Boolean.FALSE ); }
java
public JSONObject element( String key, boolean value ) { verifyIsNull(); return element( key, value ? Boolean.TRUE : Boolean.FALSE ); }
[ "public", "JSONObject", "element", "(", "String", "key", ",", "boolean", "value", ")", "{", "verifyIsNull", "(", ")", ";", "return", "element", "(", "key", ",", "value", "?", "Boolean", ".", "TRUE", ":", "Boolean", ".", "FALSE", ")", ";", "}" ]
Put a key/boolean pair in the JSONObject. @param key A key string. @param value A boolean which is the value. @return this. @throws JSONException If the key is null.
[ "Put", "a", "key", "/", "boolean", "pair", "in", "the", "JSONObject", "." ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JSONObject.java#L1569-L1572
fabric8io/kubernetes-client
openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/BuildConfigOperationsImpl.java
BuildConfigOperationsImpl.deleteBuilds
private void deleteBuilds() { if (getName() == null) { return; } String buildConfigLabelValue = getName().substring(0, Math.min(getName().length(), 63)); BuildList matchingBuilds = new BuildOperationsImpl(client, (OpenShiftConfig) config).inNamespace(namespace).withLabel(BUILD_CONFIG_LABEL, buil...
java
private void deleteBuilds() { if (getName() == null) { return; } String buildConfigLabelValue = getName().substring(0, Math.min(getName().length(), 63)); BuildList matchingBuilds = new BuildOperationsImpl(client, (OpenShiftConfig) config).inNamespace(namespace).withLabel(BUILD_CONFIG_LABEL, buil...
[ "private", "void", "deleteBuilds", "(", ")", "{", "if", "(", "getName", "(", ")", "==", "null", ")", "{", "return", ";", "}", "String", "buildConfigLabelValue", "=", "getName", "(", ")", ".", "substring", "(", "0", ",", "Math", ".", "min", "(", "getN...
/* Labels are limited to 63 chars so need to first truncate the build config name (if required), retrieve builds with matching label, then check the build config name against the builds' build config annotation which have no such length restriction (but aren't usable for searching). Would be better if referenced build ...
[ "/", "*", "Labels", "are", "limited", "to", "63", "chars", "so", "need", "to", "first", "truncate", "the", "build", "config", "name", "(", "if", "required", ")", "retrieve", "builds", "with", "matching", "label", "then", "check", "the", "build", "config", ...
train
https://github.com/fabric8io/kubernetes-client/blob/141668a882ed8e902c045a5cd0a80f14bd17d132/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/BuildConfigOperationsImpl.java#L178-L200
twilio/twilio-java
src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountryReader.java
AvailablePhoneNumberCountryReader.getPage
@Override @SuppressWarnings("checkstyle:linelength") public Page<AvailablePhoneNumberCountry> getPage(final String targetUrl, final TwilioRestClient client) { this.pathAccountSid = this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; Request request = new Request( ...
java
@Override @SuppressWarnings("checkstyle:linelength") public Page<AvailablePhoneNumberCountry> getPage(final String targetUrl, final TwilioRestClient client) { this.pathAccountSid = this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; Request request = new Request( ...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"checkstyle:linelength\"", ")", "public", "Page", "<", "AvailablePhoneNumberCountry", ">", "getPage", "(", "final", "String", "targetUrl", ",", "final", "TwilioRestClient", "client", ")", "{", "this", ".", "pathAccoun...
Retrieve the target page from the Twilio API. @param targetUrl API-generated URL for the requested results page @param client TwilioRestClient with which to make the request @return AvailablePhoneNumberCountry ResourceSet
[ "Retrieve", "the", "target", "page", "from", "the", "Twilio", "API", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountryReader.java#L80-L90
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/LogAnalyticsInner.java
LogAnalyticsInner.exportThrottledRequestsAsync
public Observable<LogAnalyticsOperationResultInner> exportThrottledRequestsAsync(String location, ThrottledRequestsInput parameters) { return exportThrottledRequestsWithServiceResponseAsync(location, parameters).map(new Func1<ServiceResponse<LogAnalyticsOperationResultInner>, LogAnalyticsOperationResultInner>()...
java
public Observable<LogAnalyticsOperationResultInner> exportThrottledRequestsAsync(String location, ThrottledRequestsInput parameters) { return exportThrottledRequestsWithServiceResponseAsync(location, parameters).map(new Func1<ServiceResponse<LogAnalyticsOperationResultInner>, LogAnalyticsOperationResultInner>()...
[ "public", "Observable", "<", "LogAnalyticsOperationResultInner", ">", "exportThrottledRequestsAsync", "(", "String", "location", ",", "ThrottledRequestsInput", "parameters", ")", "{", "return", "exportThrottledRequestsWithServiceResponseAsync", "(", "location", ",", "parameters...
Export logs that show total throttled Api requests for this subscription in the given time window. @param location The location upon which virtual-machine-sizes is queried. @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. @throws IllegalArgumentException thrown if parameters fail the...
[ "Export", "logs", "that", "show", "total", "throttled", "Api", "requests", "for", "this", "subscription", "in", "the", "given", "time", "window", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/LogAnalyticsInner.java#L269-L276
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/StorageUtil.java
StorageUtil.toBoolean
public boolean toBoolean(Element el, String attributeName) { return Caster.toBooleanValue(el.getAttribute(attributeName), false); }
java
public boolean toBoolean(Element el, String attributeName) { return Caster.toBooleanValue(el.getAttribute(attributeName), false); }
[ "public", "boolean", "toBoolean", "(", "Element", "el", ",", "String", "attributeName", ")", "{", "return", "Caster", ".", "toBooleanValue", "(", "el", ".", "getAttribute", "(", "attributeName", ")", ",", "false", ")", ";", "}" ]
reads a XML Element Attribute ans cast it to a boolean value @param el XML Element to read Attribute from it @param attributeName Name of the Attribute to read @return Attribute Value
[ "reads", "a", "XML", "Element", "Attribute", "ans", "cast", "it", "to", "a", "boolean", "value" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L186-L188
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/cluster/RedisClusterClient.java
RedisClusterClient.forEachCloseable
@SuppressWarnings("unchecked") protected <T extends Closeable> void forEachCloseable(Predicate<? super Closeable> selector, Consumer<T> function) { for (Closeable c : closeableResources) { if (selector.test(c)) { function.accept((T) c); } } }
java
@SuppressWarnings("unchecked") protected <T extends Closeable> void forEachCloseable(Predicate<? super Closeable> selector, Consumer<T> function) { for (Closeable c : closeableResources) { if (selector.test(c)) { function.accept((T) c); } } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "<", "T", "extends", "Closeable", ">", "void", "forEachCloseable", "(", "Predicate", "<", "?", "super", "Closeable", ">", "selector", ",", "Consumer", "<", "T", ">", "function", ")", "{", "for"...
Apply a {@link Consumer} of {@link Closeable} to all active connections. @param <T> @param function the {@link Consumer}.
[ "Apply", "a", "{", "@link", "Consumer", "}", "of", "{", "@link", "Closeable", "}", "to", "all", "active", "connections", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/cluster/RedisClusterClient.java#L1061-L1068
legsem/legstar.avro
legstar.avro.cob2avro/src/main/java/com/legstar/avro/cob2avro/io/ZosVarRdwDatumReader.java
ZosVarRdwDatumReader.getRecordLen
private static int getRecordLen(byte[] hostData, int start, int length) { int len = getRawRdw(hostData, start, length); if (len < RDW_LEN || len > hostData.length) { throw new IllegalArgumentException( "Record does not start with a Record Descriptor Word"); } ...
java
private static int getRecordLen(byte[] hostData, int start, int length) { int len = getRawRdw(hostData, start, length); if (len < RDW_LEN || len > hostData.length) { throw new IllegalArgumentException( "Record does not start with a Record Descriptor Word"); } ...
[ "private", "static", "int", "getRecordLen", "(", "byte", "[", "]", "hostData", ",", "int", "start", ",", "int", "length", ")", "{", "int", "len", "=", "getRawRdw", "(", "hostData", ",", "start", ",", "length", ")", ";", "if", "(", "len", "<", "RDW_LE...
RDW is a 4 bytes numeric stored in Big Endian as a binary 2's complement. @param hostData the mainframe data @param start where the RDW starts @param length the total size of the mainframe data @return the size of the record (actual data without the rdw itself)
[ "RDW", "is", "a", "4", "bytes", "numeric", "stored", "in", "Big", "Endian", "as", "a", "binary", "2", "s", "complement", "." ]
train
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro/src/main/java/com/legstar/avro/cob2avro/io/ZosVarRdwDatumReader.java#L96-L105
crowmagnumb/s6-util
src/main/java/net/crowmagnumb/util/reflect/SimpleMethodInvoker.java
SimpleMethodInvoker.invokeMethod
private static Object invokeMethod( final Object obj, final String methodName, final Object[] args, final Class<?>[] parameterTypes ) throws UtilException ...
java
private static Object invokeMethod( final Object obj, final String methodName, final Object[] args, final Class<?>[] parameterTypes ) throws UtilException ...
[ "private", "static", "Object", "invokeMethod", "(", "final", "Object", "obj", ",", "final", "String", "methodName", ",", "final", "Object", "[", "]", "args", ",", "final", "Class", "<", "?", ">", "[", "]", "parameterTypes", ")", "throws", "UtilException", ...
We have an object and a method name, but in order to invoke a method on an object, we need the object's Class (type). Given this Class we can then check that such a method exists and throw an exception if it doesn't. @param obj to invoke method on @param methodName to invoke @param args to use @param parameterTypes t...
[ "We", "have", "an", "object", "and", "a", "method", "name", "but", "in", "order", "to", "invoke", "a", "method", "on", "an", "object", "we", "need", "the", "object", "s", "Class", "(", "type", ")", "." ]
train
https://github.com/crowmagnumb/s6-util/blob/0f9969bc0809e8a617501fa57c135e9b3984fae0/src/main/java/net/crowmagnumb/util/reflect/SimpleMethodInvoker.java#L301-L309
drinkjava2/jBeanBox
jbeanbox/src/main/java/com/github/drinkjava2/asm5_0_3/util/CheckClassAdapter.java
CheckClassAdapter.checkTypeRefAndPath
static void checkTypeRefAndPath(int typeRef, TypePath typePath) { int mask = 0; switch (typeRef >>> 24) { case TypeReference.CLASS_TYPE_PARAMETER: case TypeReference.METHOD_TYPE_PARAMETER: case TypeReference.METHOD_FORMAL_PARAMETER: mask = 0xFFFF0000; brea...
java
static void checkTypeRefAndPath(int typeRef, TypePath typePath) { int mask = 0; switch (typeRef >>> 24) { case TypeReference.CLASS_TYPE_PARAMETER: case TypeReference.METHOD_TYPE_PARAMETER: case TypeReference.METHOD_FORMAL_PARAMETER: mask = 0xFFFF0000; brea...
[ "static", "void", "checkTypeRefAndPath", "(", "int", "typeRef", ",", "TypePath", "typePath", ")", "{", "int", "mask", "=", "0", ";", "switch", "(", "typeRef", ">>>", "24", ")", "{", "case", "TypeReference", ".", "CLASS_TYPE_PARAMETER", ":", "case", "TypeRefe...
Checks the reference to a type in a type annotation. @param typeRef a reference to an annotated type. @param typePath the path to the annotated type argument, wildcard bound, array element type, or static inner type within 'typeRef'. May be <tt>null</tt> if the annotation targets 'typeRef' as a whole.
[ "Checks", "the", "reference", "to", "a", "type", "in", "a", "type", "annotation", "." ]
train
https://github.com/drinkjava2/jBeanBox/blob/01c216599ffa2e5f2d9c01df2adaad0f45567c04/jbeanbox/src/main/java/com/github/drinkjava2/asm5_0_3/util/CheckClassAdapter.java#L705-L764
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxws.clientcontainer/src/com/ibm/ws/jaxws/client/injection/WebServiceRefBinding.java
WebServiceRefBinding.processExistingWSDL
private void processExistingWSDL(String wsdlLocation, Member newMember) throws InjectionException { // if the wsdlLocation for this service reference is specified in the DD, log a debug statement and continue if (wsrInfo.getWsdlLocation() != null && !"".equals(wsrInfo.getWsdlLocation())) { i...
java
private void processExistingWSDL(String wsdlLocation, Member newMember) throws InjectionException { // if the wsdlLocation for this service reference is specified in the DD, log a debug statement and continue if (wsrInfo.getWsdlLocation() != null && !"".equals(wsrInfo.getWsdlLocation())) { i...
[ "private", "void", "processExistingWSDL", "(", "String", "wsdlLocation", ",", "Member", "newMember", ")", "throws", "InjectionException", "{", "// if the wsdlLocation for this service reference is specified in the DD, log a debug statement and continue", "if", "(", "wsrInfo", ".", ...
This will compare the wsdlLocation attribute of the various annotations that have refer to the same service reference. If they differ we will throw an exception as the runtime will not be able to determine which WSDL to use. We will only do this checking if there was not a WSDL location specified in the deployment desc...
[ "This", "will", "compare", "the", "wsdlLocation", "attribute", "of", "the", "various", "annotations", "that", "have", "refer", "to", "the", "same", "service", "reference", ".", "If", "they", "differ", "we", "will", "throw", "an", "exception", "as", "the", "r...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxws.clientcontainer/src/com/ibm/ws/jaxws/client/injection/WebServiceRefBinding.java#L343-L357
GwtMaterialDesign/gwt-material-addins
src/main/java/gwt/material/design/addins/client/combobox/MaterialComboBox.java
MaterialComboBox.setValues
public void setValues(List<T> values, boolean fireEvents) { String[] stringValues = new String[values.size()]; for (int i = 0; i < values.size(); i++) { stringValues[i] = keyFactory.generateKey(values.get(i)); } suppressChangeEvent = !fireEvents; $(listbox.getElement(...
java
public void setValues(List<T> values, boolean fireEvents) { String[] stringValues = new String[values.size()]; for (int i = 0; i < values.size(); i++) { stringValues[i] = keyFactory.generateKey(values.get(i)); } suppressChangeEvent = !fireEvents; $(listbox.getElement(...
[ "public", "void", "setValues", "(", "List", "<", "T", ">", "values", ",", "boolean", "fireEvents", ")", "{", "String", "[", "]", "stringValues", "=", "new", "String", "[", "values", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0",...
Set directly all the values that will be stored into combobox and build options into it.
[ "Set", "directly", "all", "the", "values", "that", "will", "be", "stored", "into", "combobox", "and", "build", "options", "into", "it", "." ]
train
https://github.com/GwtMaterialDesign/gwt-material-addins/blob/11aec9d92918225f70f936285d0ae94f2178c36e/src/main/java/gwt/material/design/addins/client/combobox/MaterialComboBox.java#L584-L592
att/AAF
cadi/aaf/src/main/java/com/att/cadi/aaf/client/ErrMessage.java
ErrMessage.toMsg
public StringBuilder toMsg(StringBuilder sb, String attErrJson) throws APIException { return toMsg(sb,errDF.newData().in(TYPE.JSON).load(attErrJson).asObject()); }
java
public StringBuilder toMsg(StringBuilder sb, String attErrJson) throws APIException { return toMsg(sb,errDF.newData().in(TYPE.JSON).load(attErrJson).asObject()); }
[ "public", "StringBuilder", "toMsg", "(", "StringBuilder", "sb", ",", "String", "attErrJson", ")", "throws", "APIException", "{", "return", "toMsg", "(", "sb", ",", "errDF", ".", "newData", "(", ")", ".", "in", "(", "TYPE", ".", "JSON", ")", ".", "load", ...
AT&T Requires a specific Error Format for RESTful Services, which AAF complies with. This code will create a meaningful string from this format. @param sb @param df @param r @throws APIException
[ "AT&T", "Requires", "a", "specific", "Error", "Format", "for", "RESTful", "Services", "which", "AAF", "complies", "with", "." ]
train
https://github.com/att/AAF/blob/090562e956c0035db972aafba844dc6d3fc948ee/cadi/aaf/src/main/java/com/att/cadi/aaf/client/ErrMessage.java#L50-L52
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Variable.java
Variable.fixupVariables
public void fixupVariables(java.util.Vector vars, int globalsSize) { m_fixUpWasCalled = true; int sz = vars.size(); for (int i = vars.size()-1; i >= 0; i--) { QName qn = (QName)vars.elementAt(i); // System.out.println("qn: "+qn); if(qn.equals(m_qname)) { if(i...
java
public void fixupVariables(java.util.Vector vars, int globalsSize) { m_fixUpWasCalled = true; int sz = vars.size(); for (int i = vars.size()-1; i >= 0; i--) { QName qn = (QName)vars.elementAt(i); // System.out.println("qn: "+qn); if(qn.equals(m_qname)) { if(i...
[ "public", "void", "fixupVariables", "(", "java", ".", "util", ".", "Vector", "vars", ",", "int", "globalsSize", ")", "{", "m_fixUpWasCalled", "=", "true", ";", "int", "sz", "=", "vars", ".", "size", "(", ")", ";", "for", "(", "int", "i", "=", "vars",...
This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time. @param vars List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corresponds to the variable reference qname. The position of the QName in the vector f...
[ "This", "function", "is", "used", "to", "fixup", "variables", "from", "QNames", "to", "stack", "frame", "indexes", "at", "stylesheet", "build", "time", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Variable.java#L117-L150
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Extern.java
Extern.readPackageListFromFile
private void readPackageListFromFile(String path, DocFile pkgListPath) throws Fault { DocFile file = pkgListPath.resolve(DocPaths.PACKAGE_LIST); if (! (file.isAbsolute() || linkoffline)){ file = file.resolveAgainst(DocumentationTool.Location.DOCUMENTATION_OUTPUT); } ...
java
private void readPackageListFromFile(String path, DocFile pkgListPath) throws Fault { DocFile file = pkgListPath.resolve(DocPaths.PACKAGE_LIST); if (! (file.isAbsolute() || linkoffline)){ file = file.resolveAgainst(DocumentationTool.Location.DOCUMENTATION_OUTPUT); } ...
[ "private", "void", "readPackageListFromFile", "(", "String", "path", ",", "DocFile", "pkgListPath", ")", "throws", "Fault", "{", "DocFile", "file", "=", "pkgListPath", ".", "resolve", "(", "DocPaths", ".", "PACKAGE_LIST", ")", ";", "if", "(", "!", "(", "file...
Read the "package-list" file which is available locally. @param path URL or directory path to the packages. @param pkgListPath Path to the local "package-list" file.
[ "Read", "the", "package", "-", "list", "file", "which", "is", "available", "locally", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Extern.java#L252-L270
tvesalainen/bcc
src/main/java/org/vesalainen/bcc/ClassFile.java
ClassFile.getMethodIndex
int getMethodIndex(ExecutableElement method) { TypeElement declaringClass = (TypeElement) method.getEnclosingElement(); String fullyQualifiedname = declaringClass.getQualifiedName().toString(); return getRefIndex(Methodref.class, fullyQualifiedname, method.getSimpleName().toString(), Descrip...
java
int getMethodIndex(ExecutableElement method) { TypeElement declaringClass = (TypeElement) method.getEnclosingElement(); String fullyQualifiedname = declaringClass.getQualifiedName().toString(); return getRefIndex(Methodref.class, fullyQualifiedname, method.getSimpleName().toString(), Descrip...
[ "int", "getMethodIndex", "(", "ExecutableElement", "method", ")", "{", "TypeElement", "declaringClass", "=", "(", "TypeElement", ")", "method", ".", "getEnclosingElement", "(", ")", ";", "String", "fullyQualifiedname", "=", "declaringClass", ".", "getQualifiedName", ...
Returns the constant map index to method @param method @return
[ "Returns", "the", "constant", "map", "index", "to", "method" ]
train
https://github.com/tvesalainen/bcc/blob/4e84e313018d487f1a8cca3952d71bc21e77d16b/src/main/java/org/vesalainen/bcc/ClassFile.java#L234-L239
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/net/BlockingClient.java
BlockingClient.runReadLoop
public static void runReadLoop(InputStream stream, StreamConnection connection) throws Exception { ByteBuffer dbuf = ByteBuffer.allocateDirect(Math.min(Math.max(connection.getMaxMessageSize(), BUFFER_SIZE_LOWER_BOUND), BUFFER_SIZE_UPPER_BOUND)); byte[] readBuff = new byte[dbuf.capacity()]; while...
java
public static void runReadLoop(InputStream stream, StreamConnection connection) throws Exception { ByteBuffer dbuf = ByteBuffer.allocateDirect(Math.min(Math.max(connection.getMaxMessageSize(), BUFFER_SIZE_LOWER_BOUND), BUFFER_SIZE_UPPER_BOUND)); byte[] readBuff = new byte[dbuf.capacity()]; while...
[ "public", "static", "void", "runReadLoop", "(", "InputStream", "stream", ",", "StreamConnection", "connection", ")", "throws", "Exception", "{", "ByteBuffer", "dbuf", "=", "ByteBuffer", ".", "allocateDirect", "(", "Math", ".", "min", "(", "Math", ".", "max", "...
A blocking call that never returns, except by throwing an exception. It reads bytes from the input stream and feeds them to the provided {@link StreamConnection}, for example, a {@link Peer}.
[ "A", "blocking", "call", "that", "never", "returns", "except", "by", "throwing", "an", "exception", ".", "It", "reads", "bytes", "from", "the", "input", "stream", "and", "feeds", "them", "to", "the", "provided", "{" ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/net/BlockingClient.java#L108-L128
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/CASH.java
CASH.runDerivator
private LinearEquationSystem runDerivator(Relation<ParameterizationFunction> relation, int dimensionality, DBIDs ids) { try { // build database for derivator Database derivatorDB = buildDerivatorDB(relation, ids); PCARunner pca = new PCARunner(new StandardCovarianceMatrixBuilder()); EigenPa...
java
private LinearEquationSystem runDerivator(Relation<ParameterizationFunction> relation, int dimensionality, DBIDs ids) { try { // build database for derivator Database derivatorDB = buildDerivatorDB(relation, ids); PCARunner pca = new PCARunner(new StandardCovarianceMatrixBuilder()); EigenPa...
[ "private", "LinearEquationSystem", "runDerivator", "(", "Relation", "<", "ParameterizationFunction", ">", "relation", ",", "int", "dimensionality", ",", "DBIDs", "ids", ")", "{", "try", "{", "// build database for derivator", "Database", "derivatorDB", "=", "buildDeriva...
Runs the derivator on the specified interval and assigns all points having a distance less then the standard deviation of the derivator model to the model to this model. @param relation the database containing the parameterization functions @param ids the ids to build the model @param dimensionality the dimensionality...
[ "Runs", "the", "derivator", "on", "the", "specified", "interval", "and", "assigns", "all", "points", "having", "a", "distance", "less", "then", "the", "standard", "deviation", "of", "the", "derivator", "model", "to", "the", "model", "to", "this", "model", "....
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/CASH.java#L692-L708
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/BootstrapConfig.java
BootstrapConfig.substituteSymbols
protected void substituteSymbols(Map<String, String> initProps) { for (Entry<String, String> entry : initProps.entrySet()) { Object value = entry.getValue(); if (value instanceof String) { String strValue = (String) value; Matcher m = SYMBOL_DEF.matcher(st...
java
protected void substituteSymbols(Map<String, String> initProps) { for (Entry<String, String> entry : initProps.entrySet()) { Object value = entry.getValue(); if (value instanceof String) { String strValue = (String) value; Matcher m = SYMBOL_DEF.matcher(st...
[ "protected", "void", "substituteSymbols", "(", "Map", "<", "String", ",", "String", ">", "initProps", ")", "{", "for", "(", "Entry", "<", "String", ",", "String", ">", "entry", ":", "initProps", ".", "entrySet", "(", ")", ")", "{", "Object", "value", "...
Perform substitution of symbols used in config @param initProps
[ "Perform", "substitution", "of", "symbols", "used", "in", "config" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/BootstrapConfig.java#L748-L765
palatable/lambda
src/main/java/com/jnape/palatable/lambda/optics/lenses/CollectionLens.java
CollectionLens.asCopy
public static <X, CX extends Collection<X>> Lens.Simple<CX, CX> asCopy(Function<? super CX, ? extends CX> copyFn) { return simpleLens(copyFn, (__, copy) -> copy); }
java
public static <X, CX extends Collection<X>> Lens.Simple<CX, CX> asCopy(Function<? super CX, ? extends CX> copyFn) { return simpleLens(copyFn, (__, copy) -> copy); }
[ "public", "static", "<", "X", ",", "CX", "extends", "Collection", "<", "X", ">", ">", "Lens", ".", "Simple", "<", "CX", ",", "CX", ">", "asCopy", "(", "Function", "<", "?", "super", "CX", ",", "?", "extends", "CX", ">", "copyFn", ")", "{", "retur...
Convenience static factory method for creating a lens that focuses on a copy of a <code>Collection</code>, given a function that creates the copy. Useful for composition to avoid mutating a <code>Collection</code> reference. @param copyFn the copying function @param <X> the collection element type @param <CX> the...
[ "Convenience", "static", "factory", "method", "for", "creating", "a", "lens", "that", "focuses", "on", "a", "copy", "of", "a", "<code", ">", "Collection<", "/", "code", ">", "given", "a", "function", "that", "creates", "the", "copy", ".", "Useful", "for", ...
train
https://github.com/palatable/lambda/blob/b643ba836c5916d1d8193822e5efb4e7b40c489a/src/main/java/com/jnape/palatable/lambda/optics/lenses/CollectionLens.java#L30-L32
bignerdranch/expandable-recycler-view
expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java
ExpandableRecyclerAdapter.notifyParentMoved
@UiThread public void notifyParentMoved(int fromParentPosition, int toParentPosition) { int fromFlatParentPosition = getFlatParentPosition(fromParentPosition); ExpandableWrapper<P, C> fromParentWrapper = mFlatItemList.get(fromFlatParentPosition); // If the parent is collapsed we can take ad...
java
@UiThread public void notifyParentMoved(int fromParentPosition, int toParentPosition) { int fromFlatParentPosition = getFlatParentPosition(fromParentPosition); ExpandableWrapper<P, C> fromParentWrapper = mFlatItemList.get(fromFlatParentPosition); // If the parent is collapsed we can take ad...
[ "@", "UiThread", "public", "void", "notifyParentMoved", "(", "int", "fromParentPosition", ",", "int", "toParentPosition", ")", "{", "int", "fromFlatParentPosition", "=", "getFlatParentPosition", "(", "fromParentPosition", ")", ";", "ExpandableWrapper", "<", "P", ",", ...
Notify any registered observers that the parent and its children reflected at {@code fromParentPosition} has been moved to {@code toParentPosition}. <p> <p>This is a structural change event. Representations of other existing items in the data set are still considered up to date and will not be rebound, though their pos...
[ "Notify", "any", "registered", "observers", "that", "the", "parent", "and", "its", "children", "reflected", "at", "{", "@code", "fromParentPosition", "}", "has", "been", "moved", "to", "{", "@code", "toParentPosition", "}", ".", "<p", ">", "<p", ">", "This",...
train
https://github.com/bignerdranch/expandable-recycler-view/blob/930912510620894c531d236856fa79d646e2f1ed/expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java#L1057-L1109
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPManager.java
AMPManager.isActionSupported
public static boolean isActionSupported(XMPPConnection connection, AMPExtension.Action action) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { String featureName = AMPExtension.NAMESPACE + "?action=" + action.toString(); return isFeatureSupportedByServer(con...
java
public static boolean isActionSupported(XMPPConnection connection, AMPExtension.Action action) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { String featureName = AMPExtension.NAMESPACE + "?action=" + action.toString(); return isFeatureSupportedByServer(con...
[ "public", "static", "boolean", "isActionSupported", "(", "XMPPConnection", "connection", ",", "AMPExtension", ".", "Action", "action", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "String"...
Check if server supports specified action. @param connection active xmpp connection @param action action to check @return true if this action is supported. @throws XMPPErrorException @throws NoResponseException @throws NotConnectedException @throws InterruptedException
[ "Check", "if", "server", "supports", "specified", "action", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPManager.java#L93-L96
graphhopper/graphhopper
core/src/main/java/com/graphhopper/storage/BaseGraph.java
BaseGraph.initNodeRefs
void initNodeRefs(long oldCapacity, long newCapacity) { for (long pointer = oldCapacity + N_EDGE_REF; pointer < newCapacity; pointer += nodeEntryBytes) { nodes.setInt(pointer, EdgeIterator.NO_EDGE); } if (extStorage.isRequireNodeField()) { for (long pointer = oldCapacity ...
java
void initNodeRefs(long oldCapacity, long newCapacity) { for (long pointer = oldCapacity + N_EDGE_REF; pointer < newCapacity; pointer += nodeEntryBytes) { nodes.setInt(pointer, EdgeIterator.NO_EDGE); } if (extStorage.isRequireNodeField()) { for (long pointer = oldCapacity ...
[ "void", "initNodeRefs", "(", "long", "oldCapacity", ",", "long", "newCapacity", ")", "{", "for", "(", "long", "pointer", "=", "oldCapacity", "+", "N_EDGE_REF", ";", "pointer", "<", "newCapacity", ";", "pointer", "+=", "nodeEntryBytes", ")", "{", "nodes", "."...
Initializes the node area with the empty edge value and default additional value.
[ "Initializes", "the", "node", "area", "with", "the", "empty", "edge", "value", "and", "default", "additional", "value", "." ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/storage/BaseGraph.java#L258-L267
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/ChatApi.java
ChatApi.sendMessage
public ApiSuccessResponse sendMessage(String id, AcceptData1 acceptData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = sendMessageWithHttpInfo(id, acceptData); return resp.getData(); }
java
public ApiSuccessResponse sendMessage(String id, AcceptData1 acceptData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = sendMessageWithHttpInfo(id, acceptData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "sendMessage", "(", "String", "id", ",", "AcceptData1", "acceptData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "sendMessageWithHttpInfo", "(", "id", ",", "acceptData", ")", ";", ...
Send a message Send a message to participants in the specified chat. @param id The ID of the chat interaction. (required) @param acceptData Request parameters. (optional) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Send", "a", "message", "Send", "a", "message", "to", "participants", "in", "the", "specified", "chat", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/ChatApi.java#L1572-L1575
bwkimmel/java-util
src/main/java/ca/eandb/util/FloatArray.java
FloatArray.addAll
public boolean addAll(int index, float[] items) { if (index < 0 || index > size) { throw new IndexOutOfBoundsException(); } ensureCapacity(size + items.length); if (index < size) { for (int i = size - 1; i >= index; i--) { elements[i + items.length] = elements[i]; } } f...
java
public boolean addAll(int index, float[] items) { if (index < 0 || index > size) { throw new IndexOutOfBoundsException(); } ensureCapacity(size + items.length); if (index < size) { for (int i = size - 1; i >= index; i--) { elements[i + items.length] = elements[i]; } } f...
[ "public", "boolean", "addAll", "(", "int", "index", ",", "float", "[", "]", "items", ")", "{", "if", "(", "index", "<", "0", "||", "index", ">", "size", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", ")", ";", "}", "ensureCapacity", "(", ...
Inserts values into the array at the specified index. @param index The index at which to insert the new values. @param items An array of values to insert. @return A value indicating if the array has changed. @throws IndexOutOfBoundsException if <code>index &lt; 0 || index &gt; size()</code>.
[ "Inserts", "values", "into", "the", "array", "at", "the", "specified", "index", "." ]
train
https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/FloatArray.java#L429-L444
motown-io/motown
chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java
DomainService.deleteEvse
public void deleteEvse(Long chargingStationTypeId, Long id) { ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId); chargingStationType.getEvses().remove(getEvseById(chargingStationType, id)); updateChargingStationType(chargingStationType.getId...
java
public void deleteEvse(Long chargingStationTypeId, Long id) { ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId); chargingStationType.getEvses().remove(getEvseById(chargingStationType, id)); updateChargingStationType(chargingStationType.getId...
[ "public", "void", "deleteEvse", "(", "Long", "chargingStationTypeId", ",", "Long", "id", ")", "{", "ChargingStationType", "chargingStationType", "=", "chargingStationTypeRepository", ".", "findOne", "(", "chargingStationTypeId", ")", ";", "chargingStationType", ".", "ge...
Delete an evse. @param chargingStationTypeId charging station identifier. @param id the id of the evse to delete.
[ "Delete", "an", "evse", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java#L304-L310
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/websocket/utils/QuoteUtil.java
QuoteUtil.quoteIfNeeded
public static void quoteIfNeeded(StringBuilder buf, String str, String delim) { if (str == null) { return; } // check for delimiters in input string int len = str.length(); if (len == 0) { return; } int ch; for (int i = 0; i < len; ...
java
public static void quoteIfNeeded(StringBuilder buf, String str, String delim) { if (str == null) { return; } // check for delimiters in input string int len = str.length(); if (len == 0) { return; } int ch; for (int i = 0; i < len; ...
[ "public", "static", "void", "quoteIfNeeded", "(", "StringBuilder", "buf", ",", "String", "str", ",", "String", "delim", ")", "{", "if", "(", "str", "==", "null", ")", "{", "return", ";", "}", "// check for delimiters in input string", "int", "len", "=", "str...
Append into buf the provided string, adding quotes if needed. <p> Quoting is determined if any of the characters in the <code>delim</code> are found in the input <code>str</code>. @param buf the buffer to append to @param str the string to possibly quote @param delim the delimiter characters that will trigger auto...
[ "Append", "into", "buf", "the", "provided", "string", "adding", "quotes", "if", "needed", ".", "<p", ">", "Quoting", "is", "determined", "if", "any", "of", "the", "characters", "in", "the", "<code", ">", "delim<", "/", "code", ">", "are", "found", "in", ...
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/websocket/utils/QuoteUtil.java#L245-L266
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.spare_spare_serviceInfos_GET
public OvhService spare_spare_serviceInfos_GET(String spare) throws IOException { String qPath = "/telephony/spare/{spare}/serviceInfos"; StringBuilder sb = path(qPath, spare); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhService.class); }
java
public OvhService spare_spare_serviceInfos_GET(String spare) throws IOException { String qPath = "/telephony/spare/{spare}/serviceInfos"; StringBuilder sb = path(qPath, spare); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhService.class); }
[ "public", "OvhService", "spare_spare_serviceInfos_GET", "(", "String", "spare", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/spare/{spare}/serviceInfos\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "spare", ")", ";", "St...
Get this object properties REST: GET /telephony/spare/{spare}/serviceInfos @param spare [required] The internal name of your spare
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L9065-L9070
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java
SameDiff.addVariableMappingForField
public void addVariableMappingForField(DifferentialFunction function, String fieldName, String varName) { fieldVariableResolutionMapping.put(function.getOwnName(), fieldName, varName); }
java
public void addVariableMappingForField(DifferentialFunction function, String fieldName, String varName) { fieldVariableResolutionMapping.put(function.getOwnName(), fieldName, varName); }
[ "public", "void", "addVariableMappingForField", "(", "DifferentialFunction", "function", ",", "String", "fieldName", ",", "String", "varName", ")", "{", "fieldVariableResolutionMapping", ".", "put", "(", "function", ".", "getOwnName", "(", ")", ",", "fieldName", ","...
Adds a field name -> variable name mapping for a given function.<br> This is used for model import where there is an unresolved variable at the time of calling any {@link org.nd4j.imports.graphmapper.GraphMapper#importGraph(File)} . <p> This data structure is typically accessed during {@link DifferentialFunction#resolv...
[ "Adds", "a", "field", "name", "-", ">", "variable", "name", "mapping", "for", "a", "given", "function", ".", "<br", ">", "This", "is", "used", "for", "model", "import", "where", "there", "is", "an", "unresolved", "variable", "at", "the", "time", "of", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java#L1033-L1035
wonderpush/wonderpush-android-sdk
sdk/src/main/java/com/wonderpush/sdk/DataManager.java
DataManager.downloadAllData
static boolean downloadAllData() { String data; try { data = export().get(); } catch (InterruptedException ex) { Log.e(WonderPush.TAG, "Unexpected error while exporting data", ex); return false; } catch (ExecutionException ex) { Log.e(Wonde...
java
static boolean downloadAllData() { String data; try { data = export().get(); } catch (InterruptedException ex) { Log.e(WonderPush.TAG, "Unexpected error while exporting data", ex); return false; } catch (ExecutionException ex) { Log.e(Wonde...
[ "static", "boolean", "downloadAllData", "(", ")", "{", "String", "data", ";", "try", "{", "data", "=", "export", "(", ")", ".", "get", "(", ")", ";", "}", "catch", "(", "InterruptedException", "ex", ")", "{", "Log", ".", "e", "(", "WonderPush", ".", ...
Blocks until interrupted or completed. @return {@code true} if successfully called startActivity() with a sharing intent.
[ "Blocks", "until", "interrupted", "or", "completed", "." ]
train
https://github.com/wonderpush/wonderpush-android-sdk/blob/ba0a1568f705cdd6206639bfab1e5cf529084b59/sdk/src/main/java/com/wonderpush/sdk/DataManager.java#L191-L234
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuGLGetDevices
public static int cuGLGetDevices(int pCudaDeviceCount[], CUdevice pCudaDevices[], int cudaDeviceCount, int CUGLDeviceList_deviceList) { return checkResult(cuGLGetDevicesNative(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, CUGLDeviceList_deviceList)); }
java
public static int cuGLGetDevices(int pCudaDeviceCount[], CUdevice pCudaDevices[], int cudaDeviceCount, int CUGLDeviceList_deviceList) { return checkResult(cuGLGetDevicesNative(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, CUGLDeviceList_deviceList)); }
[ "public", "static", "int", "cuGLGetDevices", "(", "int", "pCudaDeviceCount", "[", "]", ",", "CUdevice", "pCudaDevices", "[", "]", ",", "int", "cudaDeviceCount", ",", "int", "CUGLDeviceList_deviceList", ")", "{", "return", "checkResult", "(", "cuGLGetDevicesNative", ...
Gets the CUDA devices associated with the current OpenGL context. <pre> CUresult cuGLGetDevices ( unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList ) </pre> <div> <p>Gets the CUDA devices associated with the current OpenGL context. Returns in <tt>*pCudaDe...
[ "Gets", "the", "CUDA", "devices", "associated", "with", "the", "current", "OpenGL", "context", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L15187-L15190
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdSupportingStructure.java
XsdSupportingStructure.textGroupMethod
private static void textGroupMethod(ClassWriter classWriter, String varName, String visitName){ MethodVisitor mVisitor = classWriter.visitMethod(ACC_PUBLIC, varName, "(" + JAVA_OBJECT_DESC + ")" + elementTypeDesc, "<R:" + JAVA_OBJECT_DESC + ">(TR;)TT;", null); mVisitor.visitLocalVariable(varName, JAVA_S...
java
private static void textGroupMethod(ClassWriter classWriter, String varName, String visitName){ MethodVisitor mVisitor = classWriter.visitMethod(ACC_PUBLIC, varName, "(" + JAVA_OBJECT_DESC + ")" + elementTypeDesc, "<R:" + JAVA_OBJECT_DESC + ">(TR;)TT;", null); mVisitor.visitLocalVariable(varName, JAVA_S...
[ "private", "static", "void", "textGroupMethod", "(", "ClassWriter", "classWriter", ",", "String", "varName", ",", "String", "visitName", ")", "{", "MethodVisitor", "mVisitor", "=", "classWriter", ".", "visitMethod", "(", "ACC_PUBLIC", ",", "varName", ",", "\"(\"",...
Creates a method present in the TextGroup interface. Code: getVisitor().visitComment(new Text<>(self(), getVisitor(), text)); return this.self(); @param classWriter The TextGroup {@link ClassWriter} object. @param varName The name of the method, i.e. text or comment. @param visitName The name of the visit method to inv...
[ "Creates", "a", "method", "present", "in", "the", "TextGroup", "interface", ".", "Code", ":", "getVisitor", "()", ".", "visitComment", "(", "new", "Text<", ">", "(", "self", "()", "getVisitor", "()", "text", "))", ";", "return", "this", ".", "self", "()"...
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdSupportingStructure.java#L181-L201
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/utils/PermissionUtil.java
PermissionUtil.getEffectivePermission
public static long getEffectivePermission(Channel channel, Role role) { Checks.notNull(channel, "Channel"); Checks.notNull(role, "Role"); Guild guild = channel.getGuild(); if (!guild.equals(role.getGuild())) throw new IllegalArgumentException("Provided channel and role a...
java
public static long getEffectivePermission(Channel channel, Role role) { Checks.notNull(channel, "Channel"); Checks.notNull(role, "Role"); Guild guild = channel.getGuild(); if (!guild.equals(role.getGuild())) throw new IllegalArgumentException("Provided channel and role a...
[ "public", "static", "long", "getEffectivePermission", "(", "Channel", "channel", ",", "Role", "role", ")", "{", "Checks", ".", "notNull", "(", "channel", ",", "\"Channel\"", ")", ";", "Checks", ".", "notNull", "(", "role", ",", "\"Role\"", ")", ";", "Guild...
Gets the {@code long} representation of the effective permissions allowed for this {@link net.dv8tion.jda.core.entities.Role Role} in this {@link net.dv8tion.jda.core.entities.Channel Channel}. This can be used in conjunction with {@link net.dv8tion.jda.core.Permission#getPermissions(long) Permission.getPermissions(lon...
[ "Gets", "the", "{", "@code", "long", "}", "representation", "of", "the", "effective", "permissions", "allowed", "for", "this", "{", "@link", "net", ".", "dv8tion", ".", "jda", ".", "core", ".", "entities", ".", "Role", "Role", "}", "in", "this", "{", "...
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/utils/PermissionUtil.java#L424-L451
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.elementDiv
public static void elementDiv(DMatrixD1 a , DMatrixD1 b ) { if( a.numCols != b.numCols || a.numRows != b.numRows ) { throw new MatrixDimensionException("The 'a' and 'b' matrices do not have compatible dimensions"); } int length = a.getNumElements(); for( int i = 0; i < ...
java
public static void elementDiv(DMatrixD1 a , DMatrixD1 b ) { if( a.numCols != b.numCols || a.numRows != b.numRows ) { throw new MatrixDimensionException("The 'a' and 'b' matrices do not have compatible dimensions"); } int length = a.getNumElements(); for( int i = 0; i < ...
[ "public", "static", "void", "elementDiv", "(", "DMatrixD1", "a", ",", "DMatrixD1", "b", ")", "{", "if", "(", "a", ".", "numCols", "!=", "b", ".", "numCols", "||", "a", ".", "numRows", "!=", "b", ".", "numRows", ")", "{", "throw", "new", "MatrixDimens...
<p>Performs the an element by element division operation:<br> <br> a<sub>ij</sub> = a<sub>ij</sub> / b<sub>ij</sub> <br> </p> @param a The left matrix in the division operation. Modified. @param b The right matrix in the division operation. Not modified.
[ "<p", ">", "Performs", "the", "an", "element", "by", "element", "division", "operation", ":", "<br", ">", "<br", ">", "a<sub", ">", "ij<", "/", "sub", ">", "=", "a<sub", ">", "ij<", "/", "sub", ">", "/", "b<sub", ">", "ij<", "/", "sub", ">", "<br...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L1551-L1562
bozaro/git-lfs-java
gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java
Client.getObject
@NotNull public <T> T getObject(@Nullable final Meta meta, @NotNull final Links links, @NotNull final StreamHandler<T> handler) throws IOException { final Link link = links.getLinks().get(LinkType.Download); if (link == null) { throw new FileNotFoundException(); } return doRequest(link, new Obje...
java
@NotNull public <T> T getObject(@Nullable final Meta meta, @NotNull final Links links, @NotNull final StreamHandler<T> handler) throws IOException { final Link link = links.getLinks().get(LinkType.Download); if (link == null) { throw new FileNotFoundException(); } return doRequest(link, new Obje...
[ "@", "NotNull", "public", "<", "T", ">", "T", "getObject", "(", "@", "Nullable", "final", "Meta", "meta", ",", "@", "NotNull", "final", "Links", "links", ",", "@", "NotNull", "final", "StreamHandler", "<", "T", ">", "handler", ")", "throws", "IOException...
Download object by metadata. @param meta Object metadata for stream validation. @param links Object links. @param handler Stream handler. @return Stream handler result. @throws FileNotFoundException File not found exception if object don't exists on LFS server. @throws IOException On some errors.
[ "Download", "object", "by", "metadata", "." ]
train
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java#L151-L158
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.listUsagesWithServiceResponseAsync
public Observable<ServiceResponse<Page<CsmUsageQuotaInner>>> listUsagesWithServiceResponseAsync(final String resourceGroupName, final String name, final String filter) { return listUsagesSinglePageAsync(resourceGroupName, name, filter) .concatMap(new Func1<ServiceResponse<Page<CsmUsageQuotaInner>>, ...
java
public Observable<ServiceResponse<Page<CsmUsageQuotaInner>>> listUsagesWithServiceResponseAsync(final String resourceGroupName, final String name, final String filter) { return listUsagesSinglePageAsync(resourceGroupName, name, filter) .concatMap(new Func1<ServiceResponse<Page<CsmUsageQuotaInner>>, ...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "CsmUsageQuotaInner", ">", ">", ">", "listUsagesWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "String", "filter", ")", "{", "r...
Gets server farm usage information. Gets server farm usage information. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of App Service Plan @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value...
[ "Gets", "server", "farm", "usage", "information", ".", "Gets", "server", "farm", "usage", "information", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L2915-L2927
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AbstractInputHandler.java
AbstractInputHandler.handleControlMessage
public void handleControlMessage(SIBUuid8 sourceMEUuid, ControlMessage cMsg) throws SIIncorrectCallException, SIErrorException, SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "handleControlMessage", new Object[] { sourceMEUuid, cMsg }); // Nex...
java
public void handleControlMessage(SIBUuid8 sourceMEUuid, ControlMessage cMsg) throws SIIncorrectCallException, SIErrorException, SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "handleControlMessage", new Object[] { sourceMEUuid, cMsg }); // Nex...
[ "public", "void", "handleControlMessage", "(", "SIBUuid8", "sourceMEUuid", ",", "ControlMessage", "cMsg", ")", "throws", "SIIncorrectCallException", ",", "SIErrorException", ",", "SIResourceException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", "...
/* (non-Javadoc) @see com.ibm.ws.sib.processor.impl.interfaces.ControlHandler#handleControlMessage(com.ibm.ws.sib.trm.topology.Cellule, com.ibm.ws.sib.mfp.control.ControlMessage) Handle all downstream control messages i.e. target control messages
[ "/", "*", "(", "non", "-", "Javadoc", ")", "@see", "com", ".", "ibm", ".", "ws", ".", "sib", ".", "processor", ".", "impl", ".", "interfaces", ".", "ControlHandler#handleControlMessage", "(", "com", ".", "ibm", ".", "ws", ".", "sib", ".", "trm", ".",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AbstractInputHandler.java#L674-L710
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java
MapUtil.sort
public static <K, V> TreeMap<K, V> sort(Map<K, V> map) { return sort(map, null); }
java
public static <K, V> TreeMap<K, V> sort(Map<K, V> map) { return sort(map, null); }
[ "public", "static", "<", "K", ",", "V", ">", "TreeMap", "<", "K", ",", "V", ">", "sort", "(", "Map", "<", "K", ",", "V", ">", "map", ")", "{", "return", "sort", "(", "map", ",", "null", ")", ";", "}" ]
排序已有Map,Key有序的Map,使用默认Key排序方式(字母顺序) @param map Map @return TreeMap @since 4.0.1 @see #newTreeMap(Map, Comparator)
[ "排序已有Map,Key有序的Map,使用默认Key排序方式(字母顺序)" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L638-L640
finmath/finmath-lib
src/main/java/net/finmath/modelling/descriptor/xmlparser/FIPXMLParser.java
FIPXMLParser.getSwapLegProductDescriptor
private static InterestRateSwapLegProductDescriptor getSwapLegProductDescriptor(Element leg, String forwardCurveName, String discountCurveName, DayCountConvention daycountConvention) { boolean isFixed = leg.getElementsByTagName("interestType").item(0).getTextContent().equalsIgnoreCase("FIX"); ArrayList<Pe...
java
private static InterestRateSwapLegProductDescriptor getSwapLegProductDescriptor(Element leg, String forwardCurveName, String discountCurveName, DayCountConvention daycountConvention) { boolean isFixed = leg.getElementsByTagName("interestType").item(0).getTextContent().equalsIgnoreCase("FIX"); ArrayList<Pe...
[ "private", "static", "InterestRateSwapLegProductDescriptor", "getSwapLegProductDescriptor", "(", "Element", "leg", ",", "String", "forwardCurveName", ",", "String", "discountCurveName", ",", "DayCountConvention", "daycountConvention", ")", "{", "boolean", "isFixed", "=", "l...
Construct an InterestRateSwapLegProductDescriptor from a node in a FIPXML file. @param leg The node containing the leg. @param forwardCurveName Forward curve name form outside the node. @param discountCurveName Discount curve name form outside the node. @param daycountConvention Daycount convention from outside the no...
[ "Construct", "an", "InterestRateSwapLegProductDescriptor", "from", "a", "node", "in", "a", "FIPXML", "file", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/modelling/descriptor/xmlparser/FIPXMLParser.java#L152-L196
reactor/reactor-netty
src/main/java/reactor/netty/tcp/TcpServer.java
TcpServer.bindUntilJavaShutdown
public final void bindUntilJavaShutdown(Duration timeout, @Nullable Consumer<DisposableServer> onStart) { Objects.requireNonNull(timeout, "timeout"); DisposableServer facade = bindNow(); Objects.requireNonNull(facade, "facade"); if (onStart != null) { onStart.accept(facade); } Runtime.getRuntime() ...
java
public final void bindUntilJavaShutdown(Duration timeout, @Nullable Consumer<DisposableServer> onStart) { Objects.requireNonNull(timeout, "timeout"); DisposableServer facade = bindNow(); Objects.requireNonNull(facade, "facade"); if (onStart != null) { onStart.accept(facade); } Runtime.getRuntime() ...
[ "public", "final", "void", "bindUntilJavaShutdown", "(", "Duration", "timeout", ",", "@", "Nullable", "Consumer", "<", "DisposableServer", ">", "onStart", ")", "{", "Objects", ".", "requireNonNull", "(", "timeout", ",", "\"timeout\"", ")", ";", "DisposableServer",...
Start the server in a fully blocking fashion, not only waiting for it to initialize but also blocking during the full lifecycle of the server. Since most servers will be long-lived, this is more adapted to running a server out of a main method, only allowing shutdown of the servers through {@code sigkill}. <p> Note: {@...
[ "Start", "the", "server", "in", "a", "fully", "blocking", "fashion", "not", "only", "waiting", "for", "it", "to", "initialize", "but", "also", "blocking", "during", "the", "full", "lifecycle", "of", "the", "server", ".", "Since", "most", "servers", "will", ...
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/tcp/TcpServer.java#L211-L227
pravega/pravega
segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/LogMetadata.java
LogMetadata.removeEmptyLedgers
LogMetadata removeEmptyLedgers(int skipCountFromEnd) { val newLedgers = new ArrayList<LedgerMetadata>(); int cutoffIndex = this.ledgers.size() - skipCountFromEnd; for (int i = 0; i < cutoffIndex; i++) { LedgerMetadata lm = this.ledgers.get(i); if (lm.getStatus() != Ledger...
java
LogMetadata removeEmptyLedgers(int skipCountFromEnd) { val newLedgers = new ArrayList<LedgerMetadata>(); int cutoffIndex = this.ledgers.size() - skipCountFromEnd; for (int i = 0; i < cutoffIndex; i++) { LedgerMetadata lm = this.ledgers.get(i); if (lm.getStatus() != Ledger...
[ "LogMetadata", "removeEmptyLedgers", "(", "int", "skipCountFromEnd", ")", "{", "val", "newLedgers", "=", "new", "ArrayList", "<", "LedgerMetadata", ">", "(", ")", ";", "int", "cutoffIndex", "=", "this", ".", "ledgers", ".", "size", "(", ")", "-", "skipCountF...
Removes LedgerMetadata instances for those Ledgers that are known to be empty. @param skipCountFromEnd The number of Ledgers to spare, counting from the end of the LedgerMetadata list. @return A new instance of LogMetadata with the updated ledger list.
[ "Removes", "LedgerMetadata", "instances", "for", "those", "Ledgers", "that", "are", "known", "to", "be", "empty", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/storage/impl/src/main/java/io/pravega/segmentstore/storage/impl/bookkeeper/LogMetadata.java#L165-L182
RestComm/media-core
stun/src/main/java/org/restcomm/media/core/stun/messages/StunMessage.java
StunMessage.validateFingerprint
private static boolean validateFingerprint(FingerprintAttribute fingerprint, byte[] message, int offset, int length) { byte[] incomingCrcBytes = fingerprint.getChecksum(); // now check whether the CRC really is what it's supposed to be. // re calculate the check sum byte[] realCrcBytes = FingerprintAttribute.ca...
java
private static boolean validateFingerprint(FingerprintAttribute fingerprint, byte[] message, int offset, int length) { byte[] incomingCrcBytes = fingerprint.getChecksum(); // now check whether the CRC really is what it's supposed to be. // re calculate the check sum byte[] realCrcBytes = FingerprintAttribute.ca...
[ "private", "static", "boolean", "validateFingerprint", "(", "FingerprintAttribute", "fingerprint", ",", "byte", "[", "]", "message", ",", "int", "offset", ",", "int", "length", ")", "{", "byte", "[", "]", "incomingCrcBytes", "=", "fingerprint", ".", "getChecksum...
Recalculates the FINGERPRINT CRC32 checksum of the <tt>message</tt> array so that we could compare it with the value brought by the {@link FingerprintAttribute}. @param fingerprint the attribute that we need to validate. @param message the message whose CRC32 checksum we'd need to recalculate. @param offset the index ...
[ "Recalculates", "the", "FINGERPRINT", "CRC32", "checksum", "of", "the", "<tt", ">", "message<", "/", "tt", ">", "array", "so", "that", "we", "could", "compare", "it", "with", "the", "value", "brought", "by", "the", "{", "@link", "FingerprintAttribute", "}", ...
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/stun/src/main/java/org/restcomm/media/core/stun/messages/StunMessage.java#L956-L973
mygreen/excel-cellformatter
src/main/java/com/github/mygreen/cellformatter/FormatterResolver.java
FormatterResolver.createDefaultFormatter
protected CellFormatter createDefaultFormatter(final String name, final Locale... locales) { final String key = String.format("format.%s", name); final String defaultFormat = messageResolver.getMessage(key); if(defaultFormat == null) { return null; } ...
java
protected CellFormatter createDefaultFormatter(final String name, final Locale... locales) { final String key = String.format("format.%s", name); final String defaultFormat = messageResolver.getMessage(key); if(defaultFormat == null) { return null; } ...
[ "protected", "CellFormatter", "createDefaultFormatter", "(", "final", "String", "name", ",", "final", "Locale", "...", "locales", ")", "{", "final", "String", "key", "=", "String", ".", "format", "(", "\"format.%s\"", ",", "name", ")", ";", "final", "String", ...
指定したインデックスでプロパティに定義されているフォーマットを作成する。 @param name 書式の名前。({@literal format.<書式の名前>=}) @param locales 検索するロケール。 @return 存在しないインデックス番号の時は、nullを返す。
[ "指定したインデックスでプロパティに定義されているフォーマットを作成する。" ]
train
https://github.com/mygreen/excel-cellformatter/blob/e802af273d49889500591e03799c9262cbf29185/src/main/java/com/github/mygreen/cellformatter/FormatterResolver.java#L114-L155
jfinal/jfinal
src/main/java/com/jfinal/plugin/activerecord/Db.java
Db.findByIds
public static Record findByIds(String tableName, String primaryKey, Object... idValues) { return MAIN.findByIds(tableName, primaryKey, idValues); }
java
public static Record findByIds(String tableName, String primaryKey, Object... idValues) { return MAIN.findByIds(tableName, primaryKey, idValues); }
[ "public", "static", "Record", "findByIds", "(", "String", "tableName", ",", "String", "primaryKey", ",", "Object", "...", "idValues", ")", "{", "return", "MAIN", ".", "findByIds", "(", "tableName", ",", "primaryKey", ",", "idValues", ")", ";", "}" ]
Find record by ids. <pre> Example: Record user = Db.findByIds("user", "user_id", 123); Record userRole = Db.findByIds("user_role", "user_id, role_id", 123, 456); </pre> @param tableName the table name of the table @param primaryKey the primary key of the table, composite primary key is separated by comma character: ","...
[ "Find", "record", "by", "ids", ".", "<pre", ">", "Example", ":", "Record", "user", "=", "Db", ".", "findByIds", "(", "user", "user_id", "123", ")", ";", "Record", "userRole", "=", "Db", ".", "findByIds", "(", "user_role", "user_id", "role_id", "123", "...
train
https://github.com/jfinal/jfinal/blob/fc07f0f5d56e85ccd3cfcdd587b56b8dd9c663e9/src/main/java/com/jfinal/plugin/activerecord/Db.java#L332-L334
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/ui/impl/UTCTimeBoxImplShared.java
UTCTimeBoxImplShared.parseUsingFallbacksWithColon
protected static final Long parseUsingFallbacksWithColon(String text, DateTimeFormat timeFormat) { if (text.indexOf(':') == -1) { text = text.replace(" ", ""); int numdigits = 0; int lastdigit = 0; for (int i = 0; i < text.length(); i++) { char c =...
java
protected static final Long parseUsingFallbacksWithColon(String text, DateTimeFormat timeFormat) { if (text.indexOf(':') == -1) { text = text.replace(" ", ""); int numdigits = 0; int lastdigit = 0; for (int i = 0; i < text.length(); i++) { char c =...
[ "protected", "static", "final", "Long", "parseUsingFallbacksWithColon", "(", "String", "text", ",", "DateTimeFormat", "timeFormat", ")", "{", "if", "(", "text", ".", "indexOf", "(", "'", "'", ")", "==", "-", "1", ")", "{", "text", "=", "text", ".", "repl...
Attempts to insert a colon so that a value without a colon can be parsed.
[ "Attempts", "to", "insert", "a", "colon", "so", "that", "a", "value", "without", "a", "colon", "can", "be", "parsed", "." ]
train
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/ui/impl/UTCTimeBoxImplShared.java#L129-L156
craterdog/java-smart-objects
src/main/java/craterdog/smart/SmartObject.java
SmartObject.addSerializableClass
protected void addSerializableClass(Class<?> serializable, Class<?> mixin) { safeMapper.addMixIn(serializable, mixin); fullMapper.addMixIn(serializable, mixin); }
java
protected void addSerializableClass(Class<?> serializable, Class<?> mixin) { safeMapper.addMixIn(serializable, mixin); fullMapper.addMixIn(serializable, mixin); }
[ "protected", "void", "addSerializableClass", "(", "Class", "<", "?", ">", "serializable", ",", "Class", "<", "?", ">", "mixin", ")", "{", "safeMapper", ".", "addMixIn", "(", "serializable", ",", "mixin", ")", ";", "fullMapper", ".", "addMixIn", "(", "seria...
This protected method allows a subclass to add to the mappers a class type that can be serialized using mixin class. @param serializable The type of class that can be serialized using its toString() method. @param mixin The type of class that can be used to serialized the serializable class.
[ "This", "protected", "method", "allows", "a", "subclass", "to", "add", "to", "the", "mappers", "a", "class", "type", "that", "can", "be", "serialized", "using", "mixin", "class", "." ]
train
https://github.com/craterdog/java-smart-objects/blob/6d11e2f345e4d2836e3aca3990c8ed2db330d856/src/main/java/craterdog/smart/SmartObject.java#L265-L268
Samsung/GearVRf
GVRf/Extensions/3DCursor/IODevices/gearwear/PhoneSide/gearinputprovider/src/main/java/com/samsung/mpl/gearinputprovider/backend/InputProviderService.java
InputProviderService.sendEvent
public static void sendEvent(Context context, Parcelable event) { Intent intent = new Intent(EventManager.ACTION_ACCESSORY_EVENT); intent.putExtra(EventManager.EXTRA_EVENT, event); context.sendBroadcast(intent); }
java
public static void sendEvent(Context context, Parcelable event) { Intent intent = new Intent(EventManager.ACTION_ACCESSORY_EVENT); intent.putExtra(EventManager.EXTRA_EVENT, event); context.sendBroadcast(intent); }
[ "public", "static", "void", "sendEvent", "(", "Context", "context", ",", "Parcelable", "event", ")", "{", "Intent", "intent", "=", "new", "Intent", "(", "EventManager", ".", "ACTION_ACCESSORY_EVENT", ")", ";", "intent", ".", "putExtra", "(", "EventManager", "....
Send an event to other applications @param context context in which to send the broadcast @param event event to send
[ "Send", "an", "event", "to", "other", "applications" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/3DCursor/IODevices/gearwear/PhoneSide/gearinputprovider/src/main/java/com/samsung/mpl/gearinputprovider/backend/InputProviderService.java#L286-L290
ksclarke/freelib-utils
src/main/java/info/freelibrary/util/StringUtils.java
StringUtils.joinKeys
public static String joinKeys(final Map<String, ?> aMap, final char aSeparator) { if (aMap.isEmpty()) { return ""; } final Iterator<String> iterator = aMap.keySet().iterator(); final StringBuilder buffer = new StringBuilder(); while (iterator.hasNext()) { ...
java
public static String joinKeys(final Map<String, ?> aMap, final char aSeparator) { if (aMap.isEmpty()) { return ""; } final Iterator<String> iterator = aMap.keySet().iterator(); final StringBuilder buffer = new StringBuilder(); while (iterator.hasNext()) { ...
[ "public", "static", "String", "joinKeys", "(", "final", "Map", "<", "String", ",", "?", ">", "aMap", ",", "final", "char", "aSeparator", ")", "{", "if", "(", "aMap", ".", "isEmpty", "(", ")", ")", "{", "return", "\"\"", ";", "}", "final", "Iterator",...
Turns the keys in a map into a character delimited string. The order is only consistent if the map is sorted. @param aMap The map from which to pull the keys @param aSeparator The character separator for the construction of the string @return A string constructed from the keys in the map
[ "Turns", "the", "keys", "in", "a", "map", "into", "a", "character", "delimited", "string", ".", "The", "order", "is", "only", "consistent", "if", "the", "map", "is", "sorted", "." ]
train
https://github.com/ksclarke/freelib-utils/blob/54e822ae4c11b3d74793fd82a1a535ffafffaf45/src/main/java/info/freelibrary/util/StringUtils.java#L399-L414
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/core/CoreAdapterFactory.java
CoreAdapterFactory.getAdapter
protected static <AdapterType> AdapterType getAdapter(Resource resource, Class<AdapterType> type) { if (type == ResourceHandle.class) { return type.cast(new ResourceHandle(resource)); } log.info("Unable to adapt resource on {} to type {}", resource.getPath(), type.getName()); ...
java
protected static <AdapterType> AdapterType getAdapter(Resource resource, Class<AdapterType> type) { if (type == ResourceHandle.class) { return type.cast(new ResourceHandle(resource)); } log.info("Unable to adapt resource on {} to type {}", resource.getPath(), type.getName()); ...
[ "protected", "static", "<", "AdapterType", ">", "AdapterType", "getAdapter", "(", "Resource", "resource", ",", "Class", "<", "AdapterType", ">", "type", ")", "{", "if", "(", "type", "==", "ResourceHandle", ".", "class", ")", "{", "return", "type", ".", "ca...
Handles <code>resource.adaptTo(ResourceHandle.class)</code>, to wrap a resource with an ResourceHandle. @param resource resource to adapt/wrap @param type target type @return wrapped resource
[ "Handles", "<code", ">", "resource", ".", "adaptTo", "(", "ResourceHandle", ".", "class", ")", "<", "/", "code", ">", "to", "wrap", "a", "resource", "with", "an", "ResourceHandle", "." ]
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/CoreAdapterFactory.java#L71-L77
hal/core
gui/src/main/java/org/useware/kernel/gui/behaviour/Integrity.java
Integrity.assertConsumer
private static void assertConsumer(InteractionUnit unit, Map<QName, Set<Procedure>> behaviours, IntegrityErrors err) { Set<Resource<ResourceType>> producedTypes = unit.getOutputs(); for (Resource<ResourceType> resource : producedTypes) { boolean match = false; for(QName id : b...
java
private static void assertConsumer(InteractionUnit unit, Map<QName, Set<Procedure>> behaviours, IntegrityErrors err) { Set<Resource<ResourceType>> producedTypes = unit.getOutputs(); for (Resource<ResourceType> resource : producedTypes) { boolean match = false; for(QName id : b...
[ "private", "static", "void", "assertConsumer", "(", "InteractionUnit", "unit", ",", "Map", "<", "QName", ",", "Set", "<", "Procedure", ">", ">", "behaviours", ",", "IntegrityErrors", "err", ")", "{", "Set", "<", "Resource", "<", "ResourceType", ">>", "produc...
Assertion that a consumer exists for the produced resources of an interaction unit. @param unit @param err
[ "Assertion", "that", "a", "consumer", "exists", "for", "the", "produced", "resources", "of", "an", "interaction", "unit", "." ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/useware/kernel/gui/behaviour/Integrity.java#L63-L84
groupby/api-java
src/main/java/com/groupbyinc/api/Query.java
Query.setRestrictNavigation
public Query setRestrictNavigation(String name, int count) { this.restrictNavigation = new RestrictNavigation().setName(name).setCount(count); return this; }
java
public Query setRestrictNavigation(String name, int count) { this.restrictNavigation = new RestrictNavigation().setName(name).setCount(count); return this; }
[ "public", "Query", "setRestrictNavigation", "(", "String", "name", ",", "int", "count", ")", "{", "this", ".", "restrictNavigation", "=", "new", "RestrictNavigation", "(", ")", ".", "setName", "(", "name", ")", ".", "setCount", "(", "count", ")", ";", "ret...
<code> <b>Warning</b> See {@link Query#setRestrictNavigation(RestrictNavigation)}. This is a convenience method. </code> @param name the name of the field should be used in the navigation restriction in the second query. @param count the number of fields matches @return this query
[ "<code", ">", "<b", ">", "Warning<", "/", "b", ">", "See", "{", "@link", "Query#setRestrictNavigation", "(", "RestrictNavigation", ")", "}", ".", "This", "is", "a", "convenience", "method", ".", "<", "/", "code", ">" ]
train
https://github.com/groupby/api-java/blob/257c4ed0777221e5e4ade3b29b9921300fac4e2e/src/main/java/com/groupbyinc/api/Query.java#L1123-L1126
dnsjava/dnsjava
org/xbill/DNS/TSIG.java
TSIG.apply
public void apply(Message m, TSIGRecord old) { apply(m, Rcode.NOERROR, old); }
java
public void apply(Message m, TSIGRecord old) { apply(m, Rcode.NOERROR, old); }
[ "public", "void", "apply", "(", "Message", "m", ",", "TSIGRecord", "old", ")", "{", "apply", "(", "m", ",", "Rcode", ".", "NOERROR", ",", "old", ")", ";", "}" ]
Generates a TSIG record for a message and adds it to the message @param m The message @param old If this message is a response, the TSIG from the request
[ "Generates", "a", "TSIG", "record", "for", "a", "message", "and", "adds", "it", "to", "the", "message" ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/TSIG.java#L362-L365
bazaarvoice/emodb
web/src/main/java/com/bazaarvoice/emodb/web/resources/uac/RoleResource1.java
RoleResource1.updateRoleFromUpdateRequest
@PUT @Path("{group}/{id}") @Consumes("application/x.json-update-role") public SuccessResponse updateRoleFromUpdateRequest(@PathParam("group") String group, @PathParam("id") String id, UpdateEmoRoleRequest request, @Authenticated Subject subject) { ...
java
@PUT @Path("{group}/{id}") @Consumes("application/x.json-update-role") public SuccessResponse updateRoleFromUpdateRequest(@PathParam("group") String group, @PathParam("id") String id, UpdateEmoRoleRequest request, @Authenticated Subject subject) { ...
[ "@", "PUT", "@", "Path", "(", "\"{group}/{id}\"", ")", "@", "Consumes", "(", "\"application/x.json-update-role\"", ")", "public", "SuccessResponse", "updateRoleFromUpdateRequest", "(", "@", "PathParam", "(", "\"group\"", ")", "String", "group", ",", "@", "PathParam"...
Alternate endpoint for updating a role. Although not REST compliant it provides a more flexible interface for specifying role attributes, such as by supporting partial updates.
[ "Alternate", "endpoint", "for", "updating", "a", "role", ".", "Although", "not", "REST", "compliant", "it", "provides", "a", "more", "flexible", "interface", "for", "specifying", "role", "attributes", "such", "as", "by", "supporting", "partial", "updates", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/web/src/main/java/com/bazaarvoice/emodb/web/resources/uac/RoleResource1.java#L137-L144
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java
JsonUtil.getBoolean
public static boolean getBoolean(JsonObject object, String field) { final JsonValue value = object.get(field); throwExceptionIfNull(value, field); return value.asBoolean(); }
java
public static boolean getBoolean(JsonObject object, String field) { final JsonValue value = object.get(field); throwExceptionIfNull(value, field); return value.asBoolean(); }
[ "public", "static", "boolean", "getBoolean", "(", "JsonObject", "object", ",", "String", "field", ")", "{", "final", "JsonValue", "value", "=", "object", ".", "get", "(", "field", ")", ";", "throwExceptionIfNull", "(", "value", ",", "field", ")", ";", "ret...
Returns a field in a Json object as a boolean. Throws IllegalArgumentException if the field value is null. @param object the Json Object @param field the field in the Json object to return @return the Json field value as a boolean
[ "Returns", "a", "field", "in", "a", "Json", "object", "as", "a", "boolean", ".", "Throws", "IllegalArgumentException", "if", "the", "field", "value", "is", "null", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L199-L203
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java
Unchecked.longSupplier
public static LongSupplier longSupplier(CheckedLongSupplier supplier, Consumer<Throwable> handler) { return () -> { try { return supplier.getAsLong(); } catch (Throwable e) { handler.accept(e); throw new IllegalStateException("...
java
public static LongSupplier longSupplier(CheckedLongSupplier supplier, Consumer<Throwable> handler) { return () -> { try { return supplier.getAsLong(); } catch (Throwable e) { handler.accept(e); throw new IllegalStateException("...
[ "public", "static", "LongSupplier", "longSupplier", "(", "CheckedLongSupplier", "supplier", ",", "Consumer", "<", "Throwable", ">", "handler", ")", "{", "return", "(", ")", "->", "{", "try", "{", "return", "supplier", ".", "getAsLong", "(", ")", ";", "}", ...
Wrap a {@link CheckedLongSupplier} in a {@link LongSupplier} with a custom handler for checked exceptions. <p> Example: <code><pre> ResultSet rs = statement.executeQuery(); Stream.generate(Unchecked.longSupplier( () -> rs.getLong(1), e -> { throw new IllegalStateException(e); } )); </pre></code>
[ "Wrap", "a", "{", "@link", "CheckedLongSupplier", "}", "in", "a", "{", "@link", "LongSupplier", "}", "with", "a", "custom", "handler", "for", "checked", "exceptions", ".", "<p", ">", "Example", ":", "<code", ">", "<pre", ">", "ResultSet", "rs", "=", "sta...
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Unchecked.java#L1774-L1785
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/IndexWriter.java
IndexWriter.generateBackpointerUpdates
private void generateBackpointerUpdates(BucketUpdate update, UpdateInstructions updateInstructions) { // Keep track of the previous, non-deleted Key's offset. The first one points to nothing. AtomicLong previousOffset = new AtomicLong(Attributes.NULL_ATTRIBUTE_VALUE); // Keep track of whether t...
java
private void generateBackpointerUpdates(BucketUpdate update, UpdateInstructions updateInstructions) { // Keep track of the previous, non-deleted Key's offset. The first one points to nothing. AtomicLong previousOffset = new AtomicLong(Attributes.NULL_ATTRIBUTE_VALUE); // Keep track of whether t...
[ "private", "void", "generateBackpointerUpdates", "(", "BucketUpdate", "update", ",", "UpdateInstructions", "updateInstructions", ")", "{", "// Keep track of the previous, non-deleted Key's offset. The first one points to nothing.", "AtomicLong", "previousOffset", "=", "new", "AtomicL...
Generates the necessary Backpointer updates for the given {@link BucketUpdate}. @param update The BucketUpdate to generate Backpointers for. @param updateInstructions A {@link UpdateInstructions} object to collect updates into.
[ "Generates", "the", "necessary", "Backpointer", "updates", "for", "the", "given", "{", "@link", "BucketUpdate", "}", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/IndexWriter.java#L256-L307
box/box-java-sdk
src/main/java/com/box/sdk/BoxCollaboration.java
BoxCollaboration.getInfo
public Info getInfo() { BoxAPIConnection api = this.getAPI(); URL url = COLLABORATION_URL_TEMPLATE.build(api.getBaseURL(), this.getID()); BoxAPIRequest request = new BoxAPIRequest(api, url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject jsonObjec...
java
public Info getInfo() { BoxAPIConnection api = this.getAPI(); URL url = COLLABORATION_URL_TEMPLATE.build(api.getBaseURL(), this.getID()); BoxAPIRequest request = new BoxAPIRequest(api, url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject jsonObjec...
[ "public", "Info", "getInfo", "(", ")", "{", "BoxAPIConnection", "api", "=", "this", ".", "getAPI", "(", ")", ";", "URL", "url", "=", "COLLABORATION_URL_TEMPLATE", ".", "build", "(", "api", ".", "getBaseURL", "(", ")", ",", "this", ".", "getID", "(", ")...
Gets information about this collaboration. @return info about this collaboration.
[ "Gets", "information", "about", "this", "collaboration", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxCollaboration.java#L132-L140
puniverse/capsule
capsule-util/src/main/java/co/paralleluniverse/capsule/Jar.java
Jar.addEntries
public Jar addEntries(String path, Path dirOrZip, Filter filter) throws IOException { return addEntries(path != null ? Paths.get(path) : null, dirOrZip, filter); }
java
public Jar addEntries(String path, Path dirOrZip, Filter filter) throws IOException { return addEntries(path != null ? Paths.get(path) : null, dirOrZip, filter); }
[ "public", "Jar", "addEntries", "(", "String", "path", ",", "Path", "dirOrZip", ",", "Filter", "filter", ")", "throws", "IOException", "{", "return", "addEntries", "(", "path", "!=", "null", "?", "Paths", ".", "get", "(", "path", ")", ":", "null", ",", ...
Adds a directory (with all its subdirectories) or the contents of a zip/JAR to this JAR. @param path the path within the JAR where the root of the directory/zip will be placed, or {@code null} for the JAR's root @param dirOrZip the directory to add as an entry or a zip/JAR file whose contents will be extracted and...
[ "Adds", "a", "directory", "(", "with", "all", "its", "subdirectories", ")", "or", "the", "contents", "of", "a", "zip", "/", "JAR", "to", "this", "JAR", "." ]
train
https://github.com/puniverse/capsule/blob/291a54e501a32aaf0284707b8c1fbff6a566822b/capsule-util/src/main/java/co/paralleluniverse/capsule/Jar.java#L422-L424
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderTransaction.java
SpiderTransaction.addIDValueColumn
public void addIDValueColumn(TableDefinition tableDef, String objID) { addColumn(SpiderService.objectsStoreName(tableDef), objID, CommonDefs.ID_FIELD, Utils.toBytes(objID)); }
java
public void addIDValueColumn(TableDefinition tableDef, String objID) { addColumn(SpiderService.objectsStoreName(tableDef), objID, CommonDefs.ID_FIELD, Utils.toBytes(objID)); }
[ "public", "void", "addIDValueColumn", "(", "TableDefinition", "tableDef", ",", "String", "objID", ")", "{", "addColumn", "(", "SpiderService", ".", "objectsStoreName", "(", "tableDef", ")", ",", "objID", ",", "CommonDefs", ".", "ID_FIELD", ",", "Utils", ".", "...
Similar to {@link #addScalarValueColumn(DBObject, String, String)} but specialized for the _ID field. Adds the _ID column for the object's primary store. @param tableDef {@link TableDefinition} of owning table. @param objID ID of object whose _ID value to set. @see #addScalarValueColumn(DBObject, Stri...
[ "Similar", "to", "{", "@link", "#addScalarValueColumn", "(", "DBObject", "String", "String", ")", "}", "but", "specialized", "for", "the", "_ID", "field", ".", "Adds", "the", "_ID", "column", "for", "the", "object", "s", "primary", "store", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderTransaction.java#L223-L225
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/release/maven/MavenReleaseWrapper.java
MavenReleaseWrapper.getMavenModules
private List<String> getMavenModules(MavenModuleSetBuild mavenBuild) throws IOException, InterruptedException { FilePath pathToModuleRoot = mavenBuild.getModuleRoot(); FilePath pathToPom = new FilePath(pathToModuleRoot, mavenBuild.getProject().getRootPOM(null)); return pathToPom.act(new MavenMod...
java
private List<String> getMavenModules(MavenModuleSetBuild mavenBuild) throws IOException, InterruptedException { FilePath pathToModuleRoot = mavenBuild.getModuleRoot(); FilePath pathToPom = new FilePath(pathToModuleRoot, mavenBuild.getProject().getRootPOM(null)); return pathToPom.act(new MavenMod...
[ "private", "List", "<", "String", ">", "getMavenModules", "(", "MavenModuleSetBuild", "mavenBuild", ")", "throws", "IOException", ",", "InterruptedException", "{", "FilePath", "pathToModuleRoot", "=", "mavenBuild", ".", "getModuleRoot", "(", ")", ";", "FilePath", "p...
Retrieve from the parent pom the path to the modules of the project
[ "Retrieve", "from", "the", "parent", "pom", "the", "path", "to", "the", "modules", "of", "the", "project" ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/maven/MavenReleaseWrapper.java#L238-L242
devnied/EMV-NFC-Paycard-Enrollment
library/src/main/java/com/github/devnied/emvnfccard/parser/apdu/impl/DataFactory.java
DataFactory.getString
private static String getString(final AnnotationData pAnnotation, final BitUtils pBit) { String obj = null; if (pAnnotation.isReadHexa()) { obj = pBit.getNextHexaString(pAnnotation.getSize()); } else { obj = pBit.getNextString(pAnnotation.getSize()).trim(); } return obj; }
java
private static String getString(final AnnotationData pAnnotation, final BitUtils pBit) { String obj = null; if (pAnnotation.isReadHexa()) { obj = pBit.getNextHexaString(pAnnotation.getSize()); } else { obj = pBit.getNextString(pAnnotation.getSize()).trim(); } return obj; }
[ "private", "static", "String", "getString", "(", "final", "AnnotationData", "pAnnotation", ",", "final", "BitUtils", "pBit", ")", "{", "String", "obj", "=", "null", ";", "if", "(", "pAnnotation", ".", "isReadHexa", "(", ")", ")", "{", "obj", "=", "pBit", ...
This method get a string (Hexa or ASCII) from a bit table @param pAnnotation annotation data @param pBit bit table @return A string
[ "This", "method", "get", "a", "string", "(", "Hexa", "or", "ASCII", ")", "from", "a", "bit", "table" ]
train
https://github.com/devnied/EMV-NFC-Paycard-Enrollment/blob/bfbd3960708689154a7a75c8a9a934197d738a5b/library/src/main/java/com/github/devnied/emvnfccard/parser/apdu/impl/DataFactory.java#L212-L222
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.performMaintenanceAsync
public Observable<OperationStatusResponseInner> performMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { ...
java
public Observable<OperationStatusResponseInner> performMaintenanceAsync(String resourceGroupName, String vmScaleSetName) { return performMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { ...
[ "public", "Observable", "<", "OperationStatusResponseInner", ">", "performMaintenanceAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ")", "{", "return", "performMaintenanceWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetName", ...
Perform maintenance on one or more virtual machines in a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Perform", "maintenance", "on", "one", "or", "more", "virtual", "machines", "in", "a", "VM", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetsInner.java#L3218-L3225
undera/jmeter-plugins
plugins/functions/src/main/java/kg/apc/jmeter/functions/CaseFormat.java
CaseFormat.caseFormatWithDelimiter
private static String caseFormatWithDelimiter(String str, String delimiter, boolean isAllUpper, boolean isAllLower) { StringBuilder builder = new StringBuilder(str.length()); String[] tokens = NOT_ALPHANUMERIC_REGEX.split(str); boolean shouldAddDelimiter = StringUtils.isNotEmpty(delimiter); for (int i = 0; i < ...
java
private static String caseFormatWithDelimiter(String str, String delimiter, boolean isAllUpper, boolean isAllLower) { StringBuilder builder = new StringBuilder(str.length()); String[] tokens = NOT_ALPHANUMERIC_REGEX.split(str); boolean shouldAddDelimiter = StringUtils.isNotEmpty(delimiter); for (int i = 0; i < ...
[ "private", "static", "String", "caseFormatWithDelimiter", "(", "String", "str", ",", "String", "delimiter", ",", "boolean", "isAllUpper", ",", "boolean", "isAllLower", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", "str", ".", "length", ...
Change case using delimiter between words @param str @param delimiter @param isAllUpper @param isAllLower @return string after change case
[ "Change", "case", "using", "delimiter", "between", "words" ]
train
https://github.com/undera/jmeter-plugins/blob/416d2a77249ab921c7e4134c3e6a9639901ef7e8/plugins/functions/src/main/java/kg/apc/jmeter/functions/CaseFormat.java#L178-L197
landawn/AbacusUtil
src/com/landawn/abacus/util/N.java
N.mapToInt
public static <T, E extends Exception> IntList mapToInt(final T[] a, final int fromIndex, final int toIndex, final Try.ToIntFunction<? super T, E> func) throws E { checkFromToIndex(fromIndex, toIndex, len(a)); N.checkArgNotNull(func); if (N.isNullOrEmpty(a)) { retu...
java
public static <T, E extends Exception> IntList mapToInt(final T[] a, final int fromIndex, final int toIndex, final Try.ToIntFunction<? super T, E> func) throws E { checkFromToIndex(fromIndex, toIndex, len(a)); N.checkArgNotNull(func); if (N.isNullOrEmpty(a)) { retu...
[ "public", "static", "<", "T", ",", "E", "extends", "Exception", ">", "IntList", "mapToInt", "(", "final", "T", "[", "]", "a", ",", "final", "int", "fromIndex", ",", "final", "int", "toIndex", ",", "final", "Try", ".", "ToIntFunction", "<", "?", "super"...
Mostly it's designed for one-step operation to complete the operation in one step. <code>java.util.stream.Stream</code> is preferred for multiple phases operation. @param a @param fromIndex @param toIndex @param func @return
[ "Mostly", "it", "s", "designed", "for", "one", "-", "step", "operation", "to", "complete", "the", "operation", "in", "one", "step", ".", "<code", ">", "java", ".", "util", ".", "stream", ".", "Stream<", "/", "code", ">", "is", "preferred", "for", "mult...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L14883-L14899
scalecube/scalecube-services
services-api/src/main/java/io/scalecube/services/api/ServiceMessage.java
ServiceMessage.setHeaders
void setHeaders(Map<String, String> headers) { this.headers = Collections.unmodifiableMap(new HashMap<>(headers)); }
java
void setHeaders(Map<String, String> headers) { this.headers = Collections.unmodifiableMap(new HashMap<>(headers)); }
[ "void", "setHeaders", "(", "Map", "<", "String", ",", "String", ">", "headers", ")", "{", "this", ".", "headers", "=", "Collections", ".", "unmodifiableMap", "(", "new", "HashMap", "<>", "(", "headers", ")", ")", ";", "}" ]
Sets headers for deserialization purpose. @param headers headers to set
[ "Sets", "headers", "for", "deserialization", "purpose", "." ]
train
https://github.com/scalecube/scalecube-services/blob/76c8de6019e5480a1436d12b37acf163f70eea47/services-api/src/main/java/io/scalecube/services/api/ServiceMessage.java#L93-L95
icode/ameba
src/main/java/ameba/feature/AmebaFeature.java
AmebaFeature.subscribeSystemEvent
protected <E extends Event> void subscribeSystemEvent(Class<E> eventClass, final Listener<E> listener) { locator.inject(listener); locator.postConstruct(listener); SystemEventBus.subscribe(eventClass, listener); }
java
protected <E extends Event> void subscribeSystemEvent(Class<E> eventClass, final Listener<E> listener) { locator.inject(listener); locator.postConstruct(listener); SystemEventBus.subscribe(eventClass, listener); }
[ "protected", "<", "E", "extends", "Event", ">", "void", "subscribeSystemEvent", "(", "Class", "<", "E", ">", "eventClass", ",", "final", "Listener", "<", "E", ">", "listener", ")", "{", "locator", ".", "inject", "(", "listener", ")", ";", "locator", ".",...
<p>subscribeSystemEvent.</p> @param eventClass a {@link java.lang.Class} object. @param listener a {@link ameba.event.Listener} object. @since 0.1.6e @param <E> a E object.
[ "<p", ">", "subscribeSystemEvent", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/feature/AmebaFeature.java#L128-L132
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ScriptExecutor.java
ScriptExecutor.executeScript
public boolean executeScript(final File script, final Properties scriptProperties) { checkState(script.exists(), "Script file does not exist: %s", script); checkState(script.canRead(), "Script file is not readable: %s", script); Reader reader = null; boolean success = false; Throwable throwable = null; sc...
java
public boolean executeScript(final File script, final Properties scriptProperties) { checkState(script.exists(), "Script file does not exist: %s", script); checkState(script.canRead(), "Script file is not readable: %s", script); Reader reader = null; boolean success = false; Throwable throwable = null; sc...
[ "public", "boolean", "executeScript", "(", "final", "File", "script", ",", "final", "Properties", "scriptProperties", ")", "{", "checkState", "(", "script", ".", "exists", "(", ")", ",", "\"Script file does not exist: %s\"", ",", "script", ")", ";", "checkState", ...
Executes the specified Groovy script. @param script the script file @param scriptProperties properties that are set to the script engine's binding and thus will be available as variables in the Groovy script @return the execution result, {@code true} if successful, {@code false} code
[ "Executes", "the", "specified", "Groovy", "script", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ScriptExecutor.java#L92-L159
cdk/cdk
descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/AtomPairs2DFingerprinter.java
AtomPairs2DFingerprinter.encodePath
private static String encodePath(int dist, IAtom a, IAtom b) { return dist + "_" + a.getSymbol() + "_" + b.getSymbol(); }
java
private static String encodePath(int dist, IAtom a, IAtom b) { return dist + "_" + a.getSymbol() + "_" + b.getSymbol(); }
[ "private", "static", "String", "encodePath", "(", "int", "dist", ",", "IAtom", "a", ",", "IAtom", "b", ")", "{", "return", "dist", "+", "\"_\"", "+", "a", ".", "getSymbol", "(", ")", "+", "\"_\"", "+", "b", ".", "getSymbol", "(", ")", ";", "}" ]
Creates the fingerprint name which is used as a key in our hashes @param dist @param a @param b @return
[ "Creates", "the", "fingerprint", "name", "which", "is", "used", "as", "a", "key", "in", "our", "hashes" ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/AtomPairs2DFingerprinter.java#L114-L116
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/ModelRegistry.java
ModelRegistry.dateFormat
void dateFormat(DateFormat format, String... attributes) { convertWith(new DateToStringConverter(format), attributes); convertWith(new StringToSqlDateConverter(format), attributes); }
java
void dateFormat(DateFormat format, String... attributes) { convertWith(new DateToStringConverter(format), attributes); convertWith(new StringToSqlDateConverter(format), attributes); }
[ "void", "dateFormat", "(", "DateFormat", "format", ",", "String", "...", "attributes", ")", "{", "convertWith", "(", "new", "DateToStringConverter", "(", "format", ")", ",", "attributes", ")", ";", "convertWith", "(", "new", "StringToSqlDateConverter", "(", "for...
Registers date converters (Date -> String -> java.sql.Date) for specified model attributes.
[ "Registers", "date", "converters", "(", "Date", "-", ">", "String", "-", ">", "java", ".", "sql", ".", "Date", ")", "for", "specified", "model", "attributes", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/ModelRegistry.java#L65-L68
datacleaner/AnalyzerBeans
components/date-gap/src/main/java/org/eobjects/analyzer/beans/dategap/TimeLine.java
TimeLine.getTimeGapIntervals
public SortedSet<TimeInterval> getTimeGapIntervals() { SortedSet<TimeInterval> flattenedIntervals = getFlattenedIntervals(); SortedSet<TimeInterval> gaps = new TreeSet<TimeInterval>(); TimeInterval previous = null; for (TimeInterval timeInterval : flattenedIntervals) { if (previous != null) { long from ...
java
public SortedSet<TimeInterval> getTimeGapIntervals() { SortedSet<TimeInterval> flattenedIntervals = getFlattenedIntervals(); SortedSet<TimeInterval> gaps = new TreeSet<TimeInterval>(); TimeInterval previous = null; for (TimeInterval timeInterval : flattenedIntervals) { if (previous != null) { long from ...
[ "public", "SortedSet", "<", "TimeInterval", ">", "getTimeGapIntervals", "(", ")", "{", "SortedSet", "<", "TimeInterval", ">", "flattenedIntervals", "=", "getFlattenedIntervals", "(", ")", ";", "SortedSet", "<", "TimeInterval", ">", "gaps", "=", "new", "TreeSet", ...
Gets a set of intervals representing the times that are NOT represented in this timeline. @return
[ "Gets", "a", "set", "of", "intervals", "representing", "the", "times", "that", "are", "NOT", "represented", "in", "this", "timeline", "." ]
train
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/components/date-gap/src/main/java/org/eobjects/analyzer/beans/dategap/TimeLine.java#L127-L143
grpc/grpc-java
okhttp/src/main/java/io/grpc/okhttp/OkHttpClientTransport.java
OkHttpClientTransport.onError
private void onError(ErrorCode errorCode, String moreDetail) { startGoAway(0, errorCode, toGrpcStatus(errorCode).augmentDescription(moreDetail)); }
java
private void onError(ErrorCode errorCode, String moreDetail) { startGoAway(0, errorCode, toGrpcStatus(errorCode).augmentDescription(moreDetail)); }
[ "private", "void", "onError", "(", "ErrorCode", "errorCode", ",", "String", "moreDetail", ")", "{", "startGoAway", "(", "0", ",", "errorCode", ",", "toGrpcStatus", "(", "errorCode", ")", ".", "augmentDescription", "(", "moreDetail", ")", ")", ";", "}" ]
Send GOAWAY to the server, then finish all active streams and close the transport.
[ "Send", "GOAWAY", "to", "the", "server", "then", "finish", "all", "active", "streams", "and", "close", "the", "transport", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/okhttp/src/main/java/io/grpc/okhttp/OkHttpClientTransport.java#L837-L839
joniles/mpxj
src/main/java/net/sf/mpxj/sample/MppDump.java
MppDump.asciidump
private static long asciidump(InputStream is, PrintWriter pw) throws Exception { byte[] buffer = new byte[BUFFER_SIZE]; long byteCount = 0; char c; int loop; int count; StringBuilder sb = new StringBuilder(); while (true) { count = is.read(buffer); ...
java
private static long asciidump(InputStream is, PrintWriter pw) throws Exception { byte[] buffer = new byte[BUFFER_SIZE]; long byteCount = 0; char c; int loop; int count; StringBuilder sb = new StringBuilder(); while (true) { count = is.read(buffer); ...
[ "private", "static", "long", "asciidump", "(", "InputStream", "is", ",", "PrintWriter", "pw", ")", "throws", "Exception", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "BUFFER_SIZE", "]", ";", "long", "byteCount", "=", "0", ";", "char", "c", ...
This method dumps the entire contents of a file to an output print writer as ascii data. @param is Input Stream @param pw Output PrintWriter @return number of bytes read @throws Exception Thrown on file read errors
[ "This", "method", "dumps", "the", "entire", "contents", "of", "a", "file", "to", "an", "output", "print", "writer", "as", "ascii", "data", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sample/MppDump.java#L233-L269
amsa-code/risky
ais/src/main/java/au/gov/amsa/ais/AisExtractor.java
AisExtractor.getValue
public synchronized int getValue(int from, int to) { try { // is synchronized so that values of bitSet and calculated can be // lazily // calculated and safely published (thread safe). SixBit.convertSixBitToBits(message, padBits, bitSet, calculated, from, to); ...
java
public synchronized int getValue(int from, int to) { try { // is synchronized so that values of bitSet and calculated can be // lazily // calculated and safely published (thread safe). SixBit.convertSixBitToBits(message, padBits, bitSet, calculated, from, to); ...
[ "public", "synchronized", "int", "getValue", "(", "int", "from", ",", "int", "to", ")", "{", "try", "{", "// is synchronized so that values of bitSet and calculated can be", "// lazily", "// calculated and safely published (thread safe).", "SixBit", ".", "convertSixBitToBits", ...
Returns an unsigned integer value using the bits from character position start to position stop in the decoded message. @param from @param to @return
[ "Returns", "an", "unsigned", "integer", "value", "using", "the", "bits", "from", "character", "position", "start", "to", "position", "stop", "in", "the", "decoded", "message", "." ]
train
https://github.com/amsa-code/risky/blob/13649942aeddfdb9210eec072c605bc5d7a6daf3/ais/src/main/java/au/gov/amsa/ais/AisExtractor.java#L62-L72
dadoonet/elasticsearch-beyonder
src/main/java/fr/pilato/elasticsearch/tools/template/TemplateElasticsearchUpdater.java
TemplateElasticsearchUpdater.createTemplate
@Deprecated public static void createTemplate(Client client, String root, String template, boolean force) throws Exception { String json = TemplateSettingsReader.readTemplate(root, template); createTemplateWithJson(client, template, json, force); }
java
@Deprecated public static void createTemplate(Client client, String root, String template, boolean force) throws Exception { String json = TemplateSettingsReader.readTemplate(root, template); createTemplateWithJson(client, template, json, force); }
[ "@", "Deprecated", "public", "static", "void", "createTemplate", "(", "Client", "client", ",", "String", "root", ",", "String", "template", ",", "boolean", "force", ")", "throws", "Exception", "{", "String", "json", "=", "TemplateSettingsReader", ".", "readTempl...
Create a template in Elasticsearch. @param client Elasticsearch client @param root dir within the classpath @param template Template name @param force set it to true if you want to force cleaning template before adding it @throws Exception if something goes wrong @deprecated Will be removed when we don't support Transp...
[ "Create", "a", "template", "in", "Elasticsearch", "." ]
train
https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/template/TemplateElasticsearchUpdater.java#L50-L54
Prototik/HoloEverywhere
library/src/org/holoeverywhere/widget/datetimepicker/time/RadialPickerLayout.java
RadialPickerLayout.onMeasure
@Override public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int measuredWidth = MeasureSpec.getSize(widthMeasureSpec); int widthMode = MeasureSpec.getMode(widthMeasureSpec); int measuredHeight = MeasureSpec.getSize(heightMeasureSpec); int heightMode = MeasureSpec.g...
java
@Override public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int measuredWidth = MeasureSpec.getSize(widthMeasureSpec); int widthMode = MeasureSpec.getMode(widthMeasureSpec); int measuredHeight = MeasureSpec.getSize(heightMeasureSpec); int heightMode = MeasureSpec.g...
[ "@", "Override", "public", "void", "onMeasure", "(", "int", "widthMeasureSpec", ",", "int", "heightMeasureSpec", ")", "{", "int", "measuredWidth", "=", "MeasureSpec", ".", "getSize", "(", "widthMeasureSpec", ")", ";", "int", "widthMode", "=", "MeasureSpec", ".",...
Measure the view to end up as a square, based on the minimum of the height and width.
[ "Measure", "the", "view", "to", "end", "up", "as", "a", "square", "based", "on", "the", "minimum", "of", "the", "height", "and", "width", "." ]
train
https://github.com/Prototik/HoloEverywhere/blob/b870abb5ab009a5a6dbab3fb855ec2854e35e125/library/src/org/holoeverywhere/widget/datetimepicker/time/RadialPickerLayout.java#L142-L152
libgdx/gdx-ai
gdx-ai/src/com/badlogic/gdx/ai/btree/utils/BehaviorTreeLibrary.java
BehaviorTreeLibrary.registerArchetypeTree
public void registerArchetypeTree (String treeReference, BehaviorTree<?> archetypeTree) { if (archetypeTree == null) { throw new IllegalArgumentException("The registered archetype must not be null."); } repository.put(treeReference, archetypeTree); }
java
public void registerArchetypeTree (String treeReference, BehaviorTree<?> archetypeTree) { if (archetypeTree == null) { throw new IllegalArgumentException("The registered archetype must not be null."); } repository.put(treeReference, archetypeTree); }
[ "public", "void", "registerArchetypeTree", "(", "String", "treeReference", ",", "BehaviorTree", "<", "?", ">", "archetypeTree", ")", "{", "if", "(", "archetypeTree", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The registered archetype...
Registers the {@link BehaviorTree} archetypeTree with the specified reference. Existing archetypes in the repository with the same treeReference will be replaced. @param treeReference the tree identifier, typically a path. @param archetypeTree the archetype tree. @throws IllegalArgumentException if the archetypeTree is...
[ "Registers", "the", "{" ]
train
https://github.com/libgdx/gdx-ai/blob/2d1523a97193a45e18e11a4837c6800d08f177c5/gdx-ai/src/com/badlogic/gdx/ai/btree/utils/BehaviorTreeLibrary.java#L141-L146
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/runtime/ClassInterpreter.java
ClassInterpreter.execute
@Override public Value execute(String line, DBGPReader dbgp) throws Exception { PExp expr = parseExpression(line, getDefaultName()); Environment env = getGlobalEnvironment(); Environment created = new FlatCheckedEnvironment(assistantFactory, createdDefinitions.asList(), env, NameScope.NAMESANDSTATE); typeChe...
java
@Override public Value execute(String line, DBGPReader dbgp) throws Exception { PExp expr = parseExpression(line, getDefaultName()); Environment env = getGlobalEnvironment(); Environment created = new FlatCheckedEnvironment(assistantFactory, createdDefinitions.asList(), env, NameScope.NAMESANDSTATE); typeChe...
[ "@", "Override", "public", "Value", "execute", "(", "String", "line", ",", "DBGPReader", "dbgp", ")", "throws", "Exception", "{", "PExp", "expr", "=", "parseExpression", "(", "line", ",", "getDefaultName", "(", ")", ")", ";", "Environment", "env", "=", "ge...
Parse the line passed, type check it and evaluate it as an expression in the initial context. @param line A VDM expression. @return The value of the expression. @throws Exception Parser, type checking or runtime errors.
[ "Parse", "the", "line", "passed", "type", "check", "it", "and", "evaluate", "it", "as", "an", "expression", "in", "the", "initial", "context", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/runtime/ClassInterpreter.java#L282-L291
phax/ph-schedule
ph-schedule/src/main/java/com/helger/schedule/quartz/trigger/JDK8TriggerBuilder.java
JDK8TriggerBuilder.usingJobData
@Nonnull public JDK8TriggerBuilder <T> usingJobData (final String dataKey, final int value) { return usingJobData (dataKey, Integer.valueOf (value)); }
java
@Nonnull public JDK8TriggerBuilder <T> usingJobData (final String dataKey, final int value) { return usingJobData (dataKey, Integer.valueOf (value)); }
[ "@", "Nonnull", "public", "JDK8TriggerBuilder", "<", "T", ">", "usingJobData", "(", "final", "String", "dataKey", ",", "final", "int", "value", ")", "{", "return", "usingJobData", "(", "dataKey", ",", "Integer", ".", "valueOf", "(", "value", ")", ")", ";",...
Add the given key-value pair to the Trigger's {@link JobDataMap}. @param dataKey Job data key. @param value Job data value @return the updated JDK8TriggerBuilder @see ITrigger#getJobDataMap()
[ "Add", "the", "given", "key", "-", "value", "pair", "to", "the", "Trigger", "s", "{", "@link", "JobDataMap", "}", "." ]
train
https://github.com/phax/ph-schedule/blob/b000790b46a9f8d23ad44cc20591f753d07c0229/ph-schedule/src/main/java/com/helger/schedule/quartz/trigger/JDK8TriggerBuilder.java#L405-L409
elki-project/elki
elki-data-generator/src/main/java/de/lmu/ifi/dbs/elki/datasource/GeneratorXMLDatabaseConnection.java
GeneratorXMLDatabaseConnection.processElementClipping
private void processElementClipping(GeneratorSingleCluster cluster, Node cur) { double[] cmin = null, cmax = null; String minstr = ((Element) cur).getAttribute(ATTR_MIN); if(minstr != null && minstr.length() > 0) { cmin = parseVector(minstr); } String maxstr = ((Element) cur).getAttribute(ATT...
java
private void processElementClipping(GeneratorSingleCluster cluster, Node cur) { double[] cmin = null, cmax = null; String minstr = ((Element) cur).getAttribute(ATTR_MIN); if(minstr != null && minstr.length() > 0) { cmin = parseVector(minstr); } String maxstr = ((Element) cur).getAttribute(ATT...
[ "private", "void", "processElementClipping", "(", "GeneratorSingleCluster", "cluster", ",", "Node", "cur", ")", "{", "double", "[", "]", "cmin", "=", "null", ",", "cmax", "=", "null", ";", "String", "minstr", "=", "(", "(", "Element", ")", "cur", ")", "....
Process a 'clipping' Element in the XML stream. @param cluster @param cur Current document nod
[ "Process", "a", "clipping", "Element", "in", "the", "XML", "stream", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-data-generator/src/main/java/de/lmu/ifi/dbs/elki/datasource/GeneratorXMLDatabaseConnection.java#L601-L627
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java
FacebookRestClient.callMethod
protected T callMethod(IFacebookMethod method, Pair<String, CharSequence>... paramPairs) throws FacebookException, IOException { return callMethod(method, Arrays.asList(paramPairs)); }
java
protected T callMethod(IFacebookMethod method, Pair<String, CharSequence>... paramPairs) throws FacebookException, IOException { return callMethod(method, Arrays.asList(paramPairs)); }
[ "protected", "T", "callMethod", "(", "IFacebookMethod", "method", ",", "Pair", "<", "String", ",", "CharSequence", ">", "...", "paramPairs", ")", "throws", "FacebookException", ",", "IOException", "{", "return", "callMethod", "(", "method", ",", "Arrays", ".", ...
Call the specified method, with the given parameters, and return a DOM tree with the results. @param method the fieldName of the method @param paramPairs a list of arguments to the method @throws Exception with a description of any errors given to us by the server.
[ "Call", "the", "specified", "method", "with", "the", "given", "parameters", "and", "return", "a", "DOM", "tree", "with", "the", "results", "." ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L651-L654
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/Cursor.java
Cursor.setArea
public void setArea(int minX, int minY, int maxX, int maxY) { this.minX = Math.min(minX, maxX); this.minY = Math.min(minY, maxY); this.maxX = Math.max(maxX, minX); this.maxY = Math.max(maxY, minY); }
java
public void setArea(int minX, int minY, int maxX, int maxY) { this.minX = Math.min(minX, maxX); this.minY = Math.min(minY, maxY); this.maxX = Math.max(maxX, minX); this.maxY = Math.max(maxY, minY); }
[ "public", "void", "setArea", "(", "int", "minX", ",", "int", "minY", ",", "int", "maxX", ",", "int", "maxY", ")", "{", "this", ".", "minX", "=", "Math", ".", "min", "(", "minX", ",", "maxX", ")", ";", "this", ".", "minY", "=", "Math", ".", "min...
Allows cursor to move only inside the specified area. The cursor location will not exceed this area. @param minX The minimal x. @param minY The minimal y. @param maxX The maximal x. @param maxY The maximal y.
[ "Allows", "cursor", "to", "move", "only", "inside", "the", "specified", "area", ".", "The", "cursor", "location", "will", "not", "exceed", "this", "area", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/Cursor.java#L214-L220
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/fit/SoapCallMapColumnFixture.java
SoapCallMapColumnFixture.callServiceImpl
protected Response callServiceImpl(String urlSymbolKey, String soapAction) { String url = getSymbol(urlSymbolKey).toString(); Response response = getEnvironment().createInstance(getResponseClass()); callSoapService(url, getTemplateName(), soapAction, response); return response; }
java
protected Response callServiceImpl(String urlSymbolKey, String soapAction) { String url = getSymbol(urlSymbolKey).toString(); Response response = getEnvironment().createInstance(getResponseClass()); callSoapService(url, getTemplateName(), soapAction, response); return response; }
[ "protected", "Response", "callServiceImpl", "(", "String", "urlSymbolKey", ",", "String", "soapAction", ")", "{", "String", "url", "=", "getSymbol", "(", "urlSymbolKey", ")", ".", "toString", "(", ")", ";", "Response", "response", "=", "getEnvironment", "(", "...
Creates response, calls service using configured template and current row's values and calls SOAP service. @param urlSymbolKey key of symbol containing service's URL. @param soapAction SOAPAction header value (null if no header is required). @return filled response
[ "Creates", "response", "calls", "service", "using", "configured", "template", "and", "current", "row", "s", "values", "and", "calls", "SOAP", "service", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/fit/SoapCallMapColumnFixture.java#L56-L61
pietermartin/sqlg
sqlg-postgres-parent/sqlg-postgres-dialect/src/main/java/org/umlg/sqlg/sql/dialect/PostgresDialect.java
PostgresDialect.sqlTypeToPropertyType
@Override public PropertyType sqlTypeToPropertyType(SqlgGraph sqlgGraph, String schema, String table, String column, int sqlType, String typeName, ListIterator<Triple<String, Integer, String>> metaDataIter) { switch (sqlType) { case Types.BIT: return PropertyType.BOOLEAN; ...
java
@Override public PropertyType sqlTypeToPropertyType(SqlgGraph sqlgGraph, String schema, String table, String column, int sqlType, String typeName, ListIterator<Triple<String, Integer, String>> metaDataIter) { switch (sqlType) { case Types.BIT: return PropertyType.BOOLEAN; ...
[ "@", "Override", "public", "PropertyType", "sqlTypeToPropertyType", "(", "SqlgGraph", "sqlgGraph", ",", "String", "schema", ",", "String", "table", ",", "String", "column", ",", "int", "sqlType", ",", "String", "typeName", ",", "ListIterator", "<", "Triple", "<"...
This is only used for upgrading from pre sqlg_schema sqlg to a sqlg_schema
[ "This", "is", "only", "used", "for", "upgrading", "from", "pre", "sqlg_schema", "sqlg", "to", "a", "sqlg_schema" ]
train
https://github.com/pietermartin/sqlg/blob/c1845a1b31328a5ffda646873b0369ee72af56a7/sqlg-postgres-parent/sqlg-postgres-dialect/src/main/java/org/umlg/sqlg/sql/dialect/PostgresDialect.java#L2108-L2152
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/util/InvocationUtil.java
InvocationUtil.executeLocallyWithRetry
public static LocalRetryableExecution executeLocallyWithRetry(NodeEngine nodeEngine, Operation operation) { if (operation.getOperationResponseHandler() != null) { throw new IllegalArgumentException("Operation must not have a response handler set"); } if (!operation.returnsResponse())...
java
public static LocalRetryableExecution executeLocallyWithRetry(NodeEngine nodeEngine, Operation operation) { if (operation.getOperationResponseHandler() != null) { throw new IllegalArgumentException("Operation must not have a response handler set"); } if (!operation.returnsResponse())...
[ "public", "static", "LocalRetryableExecution", "executeLocallyWithRetry", "(", "NodeEngine", "nodeEngine", ",", "Operation", "operation", ")", "{", "if", "(", "operation", ".", "getOperationResponseHandler", "(", ")", "!=", "null", ")", "{", "throw", "new", "Illegal...
Constructs a local execution with retry logic. The operation must not have an {@link OperationResponseHandler}, it must return a response and it must not validate the target. @return the local execution @throws IllegalArgumentException if the operation has a response handler set, if it does not return a response or if...
[ "Constructs", "a", "local", "execution", "with", "retry", "logic", ".", "The", "operation", "must", "not", "have", "an", "{", "@link", "OperationResponseHandler", "}", "it", "must", "return", "a", "response", "and", "it", "must", "not", "validate", "the", "t...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/InvocationUtil.java#L102-L115
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/Scheduler.java
Scheduler.addSession
public void addSession(String id, Session session) { for (SchedulerForType scheduleThread : schedulersForTypes.values()) { scheduleThread.addSession(id, session); } }
java
public void addSession(String id, Session session) { for (SchedulerForType scheduleThread : schedulersForTypes.values()) { scheduleThread.addSession(id, session); } }
[ "public", "void", "addSession", "(", "String", "id", ",", "Session", "session", ")", "{", "for", "(", "SchedulerForType", "scheduleThread", ":", "schedulersForTypes", ".", "values", "(", ")", ")", "{", "scheduleThread", ".", "addSession", "(", "id", ",", "se...
Add a session for scheduling. @param id Identifies the session @param session Actual session to be scheduled
[ "Add", "a", "session", "for", "scheduling", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/Scheduler.java#L124-L128
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.createPlanAddOn
public AddOn createPlanAddOn(final String planCode, final AddOn addOn) { return doPOST(Plan.PLANS_RESOURCE + "/" + planCode + AddOn.ADDONS_RESOURCE, addOn, AddOn.class); }
java
public AddOn createPlanAddOn(final String planCode, final AddOn addOn) { return doPOST(Plan.PLANS_RESOURCE + "/" + planCode + AddOn.ADDONS_RESOURCE, addOn, AddOn.class); }
[ "public", "AddOn", "createPlanAddOn", "(", "final", "String", "planCode", ",", "final", "AddOn", "addOn", ")", "{", "return", "doPOST", "(", "Plan", ".", "PLANS_RESOURCE", "+", "\"/\"", "+", "planCode", "+", "AddOn", ".", "ADDONS_RESOURCE", ",", "addOn", ","...
Create an AddOn to a Plan <p> @param planCode The planCode of the {@link Plan } to create within recurly @param addOn The {@link AddOn} to create within recurly @return the {@link AddOn} object as identified by the passed in object
[ "Create", "an", "AddOn", "to", "a", "Plan", "<p", ">" ]
train
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1438-L1444
lionsoul2014/jcseg
jcseg-core/src/main/java/org/lionsoul/jcseg/util/StringUtil.java
StringUtil.isDigit
public static boolean isDigit(String str, int beginIndex, int endIndex) { char c; for ( int j = beginIndex; j < endIndex; j++ ) { c = str.charAt(j); //make full-width char half-width if ( c > 65280 ) c -= 65248; if ( c < 48 || c > 57 ) { ...
java
public static boolean isDigit(String str, int beginIndex, int endIndex) { char c; for ( int j = beginIndex; j < endIndex; j++ ) { c = str.charAt(j); //make full-width char half-width if ( c > 65280 ) c -= 65248; if ( c < 48 || c > 57 ) { ...
[ "public", "static", "boolean", "isDigit", "(", "String", "str", ",", "int", "beginIndex", ",", "int", "endIndex", ")", "{", "char", "c", ";", "for", "(", "int", "j", "=", "beginIndex", ";", "j", "<", "endIndex", ";", "j", "++", ")", "{", "c", "=", ...
check the specified char is a digit or not true will return if it is or return false this method can recognize full-with char @param str @param beginIndex @param endIndex @return boolean
[ "check", "the", "specified", "char", "is", "a", "digit", "or", "not", "true", "will", "return", "if", "it", "is", "or", "return", "false", "this", "method", "can", "recognize", "full", "-", "with", "char" ]
train
https://github.com/lionsoul2014/jcseg/blob/7c8a912e3bbcaf4f8de701180b9c24e2e444a94b/jcseg-core/src/main/java/org/lionsoul/jcseg/util/StringUtil.java#L272-L285
xerial/snappy-java
src/main/java/org/xerial/snappy/Snappy.java
Snappy.rawUncompress
public static long rawUncompress(long inputAddr, long inputSize, long destAddr) throws IOException { return impl.rawUncompress(inputAddr, inputSize, destAddr); }
java
public static long rawUncompress(long inputAddr, long inputSize, long destAddr) throws IOException { return impl.rawUncompress(inputAddr, inputSize, destAddr); }
[ "public", "static", "long", "rawUncompress", "(", "long", "inputAddr", ",", "long", "inputSize", ",", "long", "destAddr", ")", "throws", "IOException", "{", "return", "impl", ".", "rawUncompress", "(", "inputAddr", ",", "inputSize", ",", "destAddr", ")", ";", ...
Zero-copy decompress using memory addresses. @param inputAddr input memory address @param inputSize input byte size @param destAddr destination address of the uncompressed data @return the uncompressed data size @throws IOException
[ "Zero", "-", "copy", "decompress", "using", "memory", "addresses", "." ]
train
https://github.com/xerial/snappy-java/blob/9df6ed7bbce88186c82f2e7cdcb7b974421b3340/src/main/java/org/xerial/snappy/Snappy.java#L403-L407
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.xdsl_setting_GET
public OvhSetting xdsl_setting_GET() throws IOException { String qPath = "/me/xdsl/setting"; StringBuilder sb = path(qPath); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhSetting.class); }
java
public OvhSetting xdsl_setting_GET() throws IOException { String qPath = "/me/xdsl/setting"; StringBuilder sb = path(qPath); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhSetting.class); }
[ "public", "OvhSetting", "xdsl_setting_GET", "(", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/xdsl/setting\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";", "String", "resp", "=", "exec", "(", "qPath", ",", "\"GET\"", ...
Get xdsl settings linked to the nichandle REST: GET /me/xdsl/setting
[ "Get", "xdsl", "settings", "linked", "to", "the", "nichandle" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L2167-L2172
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java
WrapperInvocationHandler.getDatabaseMetaDataSurrogate
protected Object getDatabaseMetaDataSurrogate(final Method method, final Object[] args) throws Throwable { if (this.dbmdHandler == null) { Object dbmd = method.invoke(this.delegate, args); this.dbmdHandler = new WrapperInvocationHandler(dbmd, this); } retur...
java
protected Object getDatabaseMetaDataSurrogate(final Method method, final Object[] args) throws Throwable { if (this.dbmdHandler == null) { Object dbmd = method.invoke(this.delegate, args); this.dbmdHandler = new WrapperInvocationHandler(dbmd, this); } retur...
[ "protected", "Object", "getDatabaseMetaDataSurrogate", "(", "final", "Method", "method", ",", "final", "Object", "[", "]", "args", ")", "throws", "Throwable", "{", "if", "(", "this", ".", "dbmdHandler", "==", "null", ")", "{", "Object", "dbmd", "=", "method"...
Surrogate for any method of the delegate that returns an instance of <tt>DatabaseMetaData</tt> object. <p> @param method returning <tt>DatabaseMetaData</tt> @param args to the method @throws java.lang.Throwable the exception, if any, thrown by invoking the given method with the given arguments upon the delegate @retur...
[ "Surrogate", "for", "any", "method", "of", "the", "delegate", "that", "returns", "an", "instance", "of", "<tt", ">", "DatabaseMetaData<", "/", "tt", ">", "object", ".", "<p", ">" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java#L874-L884
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/RepositoryApi.java
RepositoryApi.deleteBranch
public void deleteBranch(Object projectIdOrPath, String branchName) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), ...
java
public void deleteBranch(Object projectIdOrPath, String branchName) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), ...
[ "public", "void", "deleteBranch", "(", "Object", "projectIdOrPath", ",", "String", "branchName", ")", "throws", "GitLabApiException", "{", "Response", ".", "Status", "expectedStatus", "=", "(", "isApiVersion", "(", "ApiVersion", ".", "V3", ")", "?", "Response", ...
Delete a single project repository branch. <pre><code>GitLab Endpoint: DELETE /projects/:id/repository/branches/:branch</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param branchName the name of the branch to delete @throws GitLabApiException if any ...
[ "Delete", "a", "single", "project", "repository", "branch", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L158-L162
jhunters/jprotobuf
v3/src/main/java/com/baidu/bjf/remoting/protobuf/MapEntryLite.java
MapEntryLite.parseEntry
static <K, V> Map.Entry<K, V> parseEntry(CodedInputStream input, Metadata<K, V> metadata, ExtensionRegistryLite extensionRegistry) throws IOException { K key = metadata.defaultKey; V value = metadata.defaultValue; while (true) { int tag = input.readTag(); if (...
java
static <K, V> Map.Entry<K, V> parseEntry(CodedInputStream input, Metadata<K, V> metadata, ExtensionRegistryLite extensionRegistry) throws IOException { K key = metadata.defaultKey; V value = metadata.defaultValue; while (true) { int tag = input.readTag(); if (...
[ "static", "<", "K", ",", "V", ">", "Map", ".", "Entry", "<", "K", ",", "V", ">", "parseEntry", "(", "CodedInputStream", "input", ",", "Metadata", "<", "K", ",", "V", ">", "metadata", ",", "ExtensionRegistryLite", "extensionRegistry", ")", "throws", "IOEx...
Parses the entry. @param <K> the key type @param <V> the value type @param input the input @param metadata the metadata @param extensionRegistry the extension registry @return the map. entry @throws IOException Signals that an I/O exception has occurred.
[ "Parses", "the", "entry", "." ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/v3/src/main/java/com/baidu/bjf/remoting/protobuf/MapEntryLite.java#L277-L297
lamydev/Android-Notification
core/src/zemin/notification/NotificationViewCallback.java
NotificationViewCallback.onShowNotification
public void onShowNotification(NotificationView view, View contentView, NotificationEntry entry, int layoutId) { if (DBG) Log.v(TAG, "onShowNotification - " + entry.ID); final Drawable icon = entry.iconDrawable; final CharSequence title = entry.title; final CharSequence text = entry.tex...
java
public void onShowNotification(NotificationView view, View contentView, NotificationEntry entry, int layoutId) { if (DBG) Log.v(TAG, "onShowNotification - " + entry.ID); final Drawable icon = entry.iconDrawable; final CharSequence title = entry.title; final CharSequence text = entry.tex...
[ "public", "void", "onShowNotification", "(", "NotificationView", "view", ",", "View", "contentView", ",", "NotificationEntry", "entry", ",", "int", "layoutId", ")", "{", "if", "(", "DBG", ")", "Log", ".", "v", "(", "TAG", ",", "\"onShowNotification - \"", "+",...
Called when a notification is being displayed. This is the place to update the user interface of child-views for the new notification. @param view @param contentView @param entry @param layoutId
[ "Called", "when", "a", "notification", "is", "being", "displayed", ".", "This", "is", "the", "place", "to", "update", "the", "user", "interface", "of", "child", "-", "views", "for", "the", "new", "notification", "." ]
train
https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationViewCallback.java#L108-L143
google/jimfs
jimfs/src/main/java/com/google/common/jimfs/PathService.java
PathService.createPathInternal
protected final JimfsPath createPathInternal(@Nullable Name root, Iterable<Name> names) { return new JimfsPath(this, root, names); }
java
protected final JimfsPath createPathInternal(@Nullable Name root, Iterable<Name> names) { return new JimfsPath(this, root, names); }
[ "protected", "final", "JimfsPath", "createPathInternal", "(", "@", "Nullable", "Name", "root", ",", "Iterable", "<", "Name", ">", "names", ")", "{", "return", "new", "JimfsPath", "(", "this", ",", "root", ",", "names", ")", ";", "}" ]
Returns a path with the given root (or no root, if null) and the given names.
[ "Returns", "a", "path", "with", "the", "given", "root", "(", "or", "no", "root", "if", "null", ")", "and", "the", "given", "names", "." ]
train
https://github.com/google/jimfs/blob/3eadff747a3afa7b498030f420d2d04ce700534a/jimfs/src/main/java/com/google/common/jimfs/PathService.java#L176-L178
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/RedisClient.java
RedisClient.connectSentinel
public <K, V> StatefulRedisSentinelConnection<K, V> connectSentinel(RedisCodec<K, V> codec) { checkForRedisURI(); return getConnection(connectSentinelAsync(codec, redisURI, timeout)); }
java
public <K, V> StatefulRedisSentinelConnection<K, V> connectSentinel(RedisCodec<K, V> codec) { checkForRedisURI(); return getConnection(connectSentinelAsync(codec, redisURI, timeout)); }
[ "public", "<", "K", ",", "V", ">", "StatefulRedisSentinelConnection", "<", "K", ",", "V", ">", "connectSentinel", "(", "RedisCodec", "<", "K", ",", "V", ">", "codec", ")", "{", "checkForRedisURI", "(", ")", ";", "return", "getConnection", "(", "connectSent...
Open a connection to a Redis Sentinel that treats keys and use the supplied {@link RedisCodec codec} to encode/decode keys and values. The client {@link RedisURI} must contain one or more sentinels. @param codec Use this codec to encode/decode keys and values, must not be {@literal null} @param <K> Key type @param <V>...
[ "Open", "a", "connection", "to", "a", "Redis", "Sentinel", "that", "treats", "keys", "and", "use", "the", "supplied", "{", "@link", "RedisCodec", "codec", "}", "to", "encode", "/", "decode", "keys", "and", "values", ".", "The", "client", "{", "@link", "R...
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/RedisClient.java#L464-L467
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/implementation/MethodDelegation.java
MethodDelegation.toField
public static MethodDelegation toField(String name, MethodGraph.Compiler methodGraphCompiler) { return withDefaultConfiguration().toField(name, methodGraphCompiler); }
java
public static MethodDelegation toField(String name, MethodGraph.Compiler methodGraphCompiler) { return withDefaultConfiguration().toField(name, methodGraphCompiler); }
[ "public", "static", "MethodDelegation", "toField", "(", "String", "name", ",", "MethodGraph", ".", "Compiler", "methodGraphCompiler", ")", "{", "return", "withDefaultConfiguration", "(", ")", ".", "toField", "(", "name", ",", "methodGraphCompiler", ")", ";", "}" ]
Delegates any intercepted method to invoke a non-{@code static} method on the instance of the supplied field. To be considered a valid delegation target, a method must be visible and accessible to the instrumented type. This is the case if the method's declaring type is either public or in the same package as the instr...
[ "Delegates", "any", "intercepted", "method", "to", "invoke", "a", "non", "-", "{", "@code", "static", "}", "method", "on", "the", "instance", "of", "the", "supplied", "field", ".", "To", "be", "considered", "a", "valid", "delegation", "target", "a", "metho...
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/MethodDelegation.java#L480-L482
pressgang-ccms/PressGangCCMSCommonUtilities
src/main/java/org/jboss/pressgang/ccms/utils/common/HTTPUtilities.java
HTTPUtilities.writeOutContent
public static void writeOutContent(final byte[] data, final String filename, final String mime) { writeOutContent(data, filename, mime, true); }
java
public static void writeOutContent(final byte[] data, final String filename, final String mime) { writeOutContent(data, filename, mime, true); }
[ "public", "static", "void", "writeOutContent", "(", "final", "byte", "[", "]", "data", ",", "final", "String", "filename", ",", "final", "String", "mime", ")", "{", "writeOutContent", "(", "data", ",", "filename", ",", "mime", ",", "true", ")", ";", "}" ...
Used to send arbitrary data to the user (i.e. to download files) @param data The contents of the file @param filename The name of the file to send to the browser @param mime The MIME type of the file
[ "Used", "to", "send", "arbitrary", "data", "to", "the", "user", "(", "i", ".", "e", ".", "to", "download", "files", ")" ]
train
https://github.com/pressgang-ccms/PressGangCCMSCommonUtilities/blob/5ebf5ed30a94c34c33f4708caa04a8da99cbb15c/src/main/java/org/jboss/pressgang/ccms/utils/common/HTTPUtilities.java#L50-L52
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/web/SeleniumDriverSetup.java
SeleniumDriverSetup.connectToDriverForVersionOnAt
public boolean connectToDriverForVersionOnAt(String browser, String version, String platformName, String url) throws MalformedURLException { Platform platform = Platform.valueOf(platformName); DesiredCapabilities desiredCapabilities = new DesiredCapabilities(browser, version, platform); ...
java
public boolean connectToDriverForVersionOnAt(String browser, String version, String platformName, String url) throws MalformedURLException { Platform platform = Platform.valueOf(platformName); DesiredCapabilities desiredCapabilities = new DesiredCapabilities(browser, version, platform); ...
[ "public", "boolean", "connectToDriverForVersionOnAt", "(", "String", "browser", ",", "String", "version", ",", "String", "platformName", ",", "String", "url", ")", "throws", "MalformedURLException", "{", "Platform", "platform", "=", "Platform", ".", "valueOf", "(", ...
Connects SeleniumHelper to a remote web driver. @param browser name of browser to connect to. @param version version of browser. @param platformName platform browser must run on. @param url url to connect to browser. @return true. @throws MalformedURLException if supplied url can not be transformed to URL.
[ "Connects", "SeleniumHelper", "to", "a", "remote", "web", "driver", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/web/SeleniumDriverSetup.java#L138-L144
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java
HttpMessage.setIntField
public void setIntField(String name, int value) { if (_state!=__MSG_EDITABLE) return; _header.put(name, TypeUtil.toString(value)); }
java
public void setIntField(String name, int value) { if (_state!=__MSG_EDITABLE) return; _header.put(name, TypeUtil.toString(value)); }
[ "public", "void", "setIntField", "(", "String", "name", ",", "int", "value", ")", "{", "if", "(", "_state", "!=", "__MSG_EDITABLE", ")", "return", ";", "_header", ".", "put", "(", "name", ",", "TypeUtil", ".", "toString", "(", "value", ")", ")", ";", ...
Sets the value of an integer field. Header or Trailer fields are set depending on message state. @param name the field name @param value the field integer value
[ "Sets", "the", "value", "of", "an", "integer", "field", ".", "Header", "or", "Trailer", "fields", "are", "set", "depending", "on", "message", "state", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L333-L338
brunocvcunha/inutils4j
src/main/java/org/brunocvcunha/inutils4j/thirdparty/DateUtils.java
DateUtils.dateTimeEquals
@SuppressWarnings("deprecation") public static boolean dateTimeEquals(java.util.Date d1, java.util.Date d2) { if (d1 == null || d2 == null) { return false; } return d1.getDate() == d2.getDate() && d1.getMonth() == d2.getMonth() && d1.getYear() == d2....
java
@SuppressWarnings("deprecation") public static boolean dateTimeEquals(java.util.Date d1, java.util.Date d2) { if (d1 == null || d2 == null) { return false; } return d1.getDate() == d2.getDate() && d1.getMonth() == d2.getMonth() && d1.getYear() == d2....
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "static", "boolean", "dateTimeEquals", "(", "java", ".", "util", ".", "Date", "d1", ",", "java", ".", "util", ".", "Date", "d2", ")", "{", "if", "(", "d1", "==", "null", "||", "d2", "==", ...
Checks the second, hour, month, day, month and year are equal.
[ "Checks", "the", "second", "hour", "month", "day", "month", "and", "year", "are", "equal", "." ]
train
https://github.com/brunocvcunha/inutils4j/blob/223c4443c2cee662576ce644e552588fa114aa94/src/main/java/org/brunocvcunha/inutils4j/thirdparty/DateUtils.java#L237-L249
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalAddressClient.java
GlobalAddressClient.insertGlobalAddress
@BetaApi public final Operation insertGlobalAddress(ProjectName project, Address addressResource) { InsertGlobalAddressHttpRequest request = InsertGlobalAddressHttpRequest.newBuilder() .setProject(project == null ? null : project.toString()) .setAddressResource(addressResource) ...
java
@BetaApi public final Operation insertGlobalAddress(ProjectName project, Address addressResource) { InsertGlobalAddressHttpRequest request = InsertGlobalAddressHttpRequest.newBuilder() .setProject(project == null ? null : project.toString()) .setAddressResource(addressResource) ...
[ "@", "BetaApi", "public", "final", "Operation", "insertGlobalAddress", "(", "ProjectName", "project", ",", "Address", "addressResource", ")", "{", "InsertGlobalAddressHttpRequest", "request", "=", "InsertGlobalAddressHttpRequest", ".", "newBuilder", "(", ")", ".", "setP...
Creates an address resource in the specified project using the data included in the request. <p>Sample code: <pre><code> try (GlobalAddressClient globalAddressClient = GlobalAddressClient.create()) { ProjectName project = ProjectName.of("[PROJECT]"); Address addressResource = Address.newBuilder().build(); Operation r...
[ "Creates", "an", "address", "resource", "in", "the", "specified", "project", "using", "the", "data", "included", "in", "the", "request", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/GlobalAddressClient.java#L375-L384