repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
google/j2objc
jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java
DecimalFormat.addAffixes
private void addAffixes(char[] container, char[] prefix, char[] suffix) { """ private void addAffixes(boolean isNegative, char[] container) { """ // We add affixes only if needed (affix length > 0). int pl = prefix.length; int sl = suffix.length; if (pl != 0) prependPrefix(pref...
java
private void addAffixes(char[] container, char[] prefix, char[] suffix) { // We add affixes only if needed (affix length > 0). int pl = prefix.length; int sl = suffix.length; if (pl != 0) prependPrefix(prefix, pl, container); if (sl != 0) appendSuffix(suffix, sl, container); ...
[ "private", "void", "addAffixes", "(", "char", "[", "]", "container", ",", "char", "[", "]", "prefix", ",", "char", "[", "]", "suffix", ")", "{", "// We add affixes only if needed (affix length > 0).", "int", "pl", "=", "prefix", ".", "length", ";", "int", "s...
private void addAffixes(boolean isNegative, char[] container) {
[ "private", "void", "addAffixes", "(", "boolean", "isNegative", "char", "[]", "container", ")", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java#L1324-L1332
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EpicsApi.java
EpicsApi.getEpic
public Epic getEpic(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { """ Get a single epic for the specified group. <pre><code>GitLab Endpoint: GET /groups/:id/epics/:epic_iid</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path...
java
public Epic getEpic(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid); return (response.readEntity(Epic.class)); }
[ "public", "Epic", "getEpic", "(", "Object", "groupIdOrPath", ",", "Integer", "epicIid", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"groups\"", ",", "getGroupIdOrP...
Get a single epic for the specified group. <pre><code>GitLab Endpoint: GET /groups/:id/epics/:epic_iid</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param epicIid the IID of the epic to get @return an Epic instance for the specified Epic @throws G...
[ "Get", "a", "single", "epic", "for", "the", "specified", "group", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L193-L196
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/ReadSecondaryHandler.java
ReadSecondaryHandler.addFieldPair
public MoveOnValidHandler addFieldPair(BaseField fldDest, BaseField fldSource, boolean bMoveToDependent, boolean bMoveBackOnChange, Converter convCheckMark, Converter convBackconvCheckMark) { """ Add a field source and dest. @param fldDest The destination field. @param fldSource The source field. @param bMoveTo...
java
public MoveOnValidHandler addFieldPair(BaseField fldDest, BaseField fldSource, boolean bMoveToDependent, boolean bMoveBackOnChange, Converter convCheckMark, Converter convBackconvCheckMark) { // BaseField will return iSourceFieldSeq if m_OwnerField is 'Y'es MoveOnValidHandler moveBehavior = null; ...
[ "public", "MoveOnValidHandler", "addFieldPair", "(", "BaseField", "fldDest", ",", "BaseField", "fldSource", ",", "boolean", "bMoveToDependent", ",", "boolean", "bMoveBackOnChange", ",", "Converter", "convCheckMark", ",", "Converter", "convBackconvCheckMark", ")", "{", "...
Add a field source and dest. @param fldDest The destination field. @param fldSource The source field. @param bMoveToDependent If true adds a MoveOnValidHandler to the secondary record. @param bMoveBackOnChange If true, adds a CopyFieldHandler to the destination field (moves to the source). @param convCheckMark Check ma...
[ "Add", "a", "field", "source", "and", "dest", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/ReadSecondaryHandler.java#L211-L231
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/SerializationUtils.java
SerializationUtils.fromByteArrayKryo
@SuppressWarnings("unchecked") public static <T> T fromByteArrayKryo(byte[] data, Class<T> clazz, ClassLoader classLoader) { """ Deserialize a byte array back to an object, with custom class loader. <p> This method uses Kryo lib. </p> @param data @param clazz @param classLoader @return """ ...
java
@SuppressWarnings("unchecked") public static <T> T fromByteArrayKryo(byte[] data, Class<T> clazz, ClassLoader classLoader) { if (data == null) { return null; } Kryo kryo = kryoPool.obtain(); try { ClassLoader oldClassLoader = Thread.currentThread().getContextC...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "fromByteArrayKryo", "(", "byte", "[", "]", "data", ",", "Class", "<", "T", ">", "clazz", ",", "ClassLoader", "classLoader", ")", "{", "if", "(", "data", "==", ...
Deserialize a byte array back to an object, with custom class loader. <p> This method uses Kryo lib. </p> @param data @param clazz @param classLoader @return
[ "Deserialize", "a", "byte", "array", "back", "to", "an", "object", "with", "custom", "class", "loader", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/SerializationUtils.java#L299-L327
TrueNight/Utils
utils/src/main/java/xyz/truenight/utils/Cache.java
Cache.that
@SuppressWarnings("unchecked") public static <T> T that(Object key, Supplier<T> what) { """ Registers creator of item and returns item from cache or creator """ if (CACHE.get(key) != null) { try { return (T) CACHE.get(key); } catch (ClassCastException e) { ...
java
@SuppressWarnings("unchecked") public static <T> T that(Object key, Supplier<T> what) { if (CACHE.get(key) != null) { try { return (T) CACHE.get(key); } catch (ClassCastException e) { System.out.print("E/Cache: Can't use cached object: wrong type"); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "that", "(", "Object", "key", ",", "Supplier", "<", "T", ">", "what", ")", "{", "if", "(", "CACHE", ".", "get", "(", "key", ")", "!=", "null", ")", "{", "...
Registers creator of item and returns item from cache or creator
[ "Registers", "creator", "of", "item", "and", "returns", "item", "from", "cache", "or", "creator" ]
train
https://github.com/TrueNight/Utils/blob/78a11faa16258b09f08826797370310ab650530c/utils/src/main/java/xyz/truenight/utils/Cache.java#L33-L46
stormpath/stormpath-shiro
core/src/main/java/com/stormpath/shiro/realm/ApplicationRealm.java
ApplicationRealm.ensureApplicationReference
protected final Application ensureApplicationReference() { """ acquisition, so it is negligible if this executes a few times instead of just once. """ if (this.application == null) { assertState(); Application tmpApp = applicationResolver.getApplication(client, applicationRestUr...
java
protected final Application ensureApplicationReference() { if (this.application == null) { assertState(); Application tmpApp = applicationResolver.getApplication(client, applicationRestUrl); if (tmpApp == null) { throw new IllegalStateException("ApplicationRes...
[ "protected", "final", "Application", "ensureApplicationReference", "(", ")", "{", "if", "(", "this", ".", "application", "==", "null", ")", "{", "assertState", "(", ")", ";", "Application", "tmpApp", "=", "applicationResolver", ".", "getApplication", "(", "clien...
acquisition, so it is negligible if this executes a few times instead of just once.
[ "acquisition", "so", "it", "is", "negligible", "if", "this", "executes", "a", "few", "times", "instead", "of", "just", "once", "." ]
train
https://github.com/stormpath/stormpath-shiro/blob/7a3c4fd3bd0ed9bb4546932495c79e6ad6fa1a92/core/src/main/java/com/stormpath/shiro/realm/ApplicationRealm.java#L337-L347
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuGraphNodeGetDependencies
public static int cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode dependencies[], long numDependencies[]) { """ Returns a node's dependencies.<br> <br> Returns a list of \p node's dependencies. \p dependencies may be NULL, in which case this function will return the number of dependencies in \p numDep...
java
public static int cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode dependencies[], long numDependencies[]) { return checkResult(cuGraphNodeGetDependenciesNative(hNode, dependencies, numDependencies)); }
[ "public", "static", "int", "cuGraphNodeGetDependencies", "(", "CUgraphNode", "hNode", ",", "CUgraphNode", "dependencies", "[", "]", ",", "long", "numDependencies", "[", "]", ")", "{", "return", "checkResult", "(", "cuGraphNodeGetDependenciesNative", "(", "hNode", ",...
Returns a node's dependencies.<br> <br> Returns a list of \p node's dependencies. \p dependencies may be NULL, in which case this function will return the number of dependencies in \p numDependencies. Otherwise, \p numDependencies entries will be filled in. If \p numDependencies is higher than the actual number of depe...
[ "Returns", "a", "node", "s", "dependencies", ".", "<br", ">", "<br", ">", "Returns", "a", "list", "of", "\\", "p", "node", "s", "dependencies", ".", "\\", "p", "dependencies", "may", "be", "NULL", "in", "which", "case", "this", "function", "will", "ret...
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L12781-L12784
line/armeria
thrift/src/main/java/com/linecorp/armeria/server/thrift/THttpService.java
THttpService.newDecorator
public static Function<Service<RpcRequest, RpcResponse>, THttpService> newDecorator( SerializationFormat defaultSerializationFormat, SerializationFormat... otherAllowedSerializationFormats) { """ Creates a new decorator that supports only the formats specified and defaults to the specified ...
java
public static Function<Service<RpcRequest, RpcResponse>, THttpService> newDecorator( SerializationFormat defaultSerializationFormat, SerializationFormat... otherAllowedSerializationFormats) { requireNonNull(otherAllowedSerializationFormats, "otherAllowedSerializationFormats"); r...
[ "public", "static", "Function", "<", "Service", "<", "RpcRequest", ",", "RpcResponse", ">", ",", "THttpService", ">", "newDecorator", "(", "SerializationFormat", "defaultSerializationFormat", ",", "SerializationFormat", "...", "otherAllowedSerializationFormats", ")", "{",...
Creates a new decorator that supports only the formats specified and defaults to the specified {@code defaultSerializationFormat} when the client doesn't specify one. Currently, the only way to specify a serialization format is by using the HTTP session protocol and setting the Content-Type header to the appropriate {@...
[ "Creates", "a", "new", "decorator", "that", "supports", "only", "the", "formats", "specified", "and", "defaults", "to", "the", "specified", "{", "@code", "defaultSerializationFormat", "}", "when", "the", "client", "doesn", "t", "specify", "one", ".", "Currently"...
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/thrift/src/main/java/com/linecorp/armeria/server/thrift/THttpService.java#L313-L319
sirthias/parboiled
parboiled-java/src/main/java/org/parboiled/transform/AsmUtils.java
AsmUtils.loadClass
public static Class<?> loadClass(String className, byte[] code, ClassLoader classLoader) { """ Loads the class defined with the given name and bytecode using the given class loader. Since package and class idendity includes the ClassLoader instance used to load a class we use reflection on the given class loader...
java
public static Class<?> loadClass(String className, byte[] code, ClassLoader classLoader) { checkArgNotNull(className, "className"); checkArgNotNull(code, "code"); checkArgNotNull(classLoader, "classLoader"); try { Class<?> classLoaderBaseClass = Class.forName("java.lang.Class...
[ "public", "static", "Class", "<", "?", ">", "loadClass", "(", "String", "className", ",", "byte", "[", "]", "code", ",", "ClassLoader", "classLoader", ")", "{", "checkArgNotNull", "(", "className", ",", "\"className\"", ")", ";", "checkArgNotNull", "(", "cod...
Loads the class defined with the given name and bytecode using the given class loader. Since package and class idendity includes the ClassLoader instance used to load a class we use reflection on the given class loader to define generated classes. If we used our own class loader (in order to be able to access the prote...
[ "Loads", "the", "class", "defined", "with", "the", "given", "name", "and", "bytecode", "using", "the", "given", "class", "loader", ".", "Since", "package", "and", "class", "idendity", "includes", "the", "ClassLoader", "instance", "used", "to", "load", "a", "...
train
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-java/src/main/java/org/parboiled/transform/AsmUtils.java#L234-L253
rzwitserloot/lombok
src/core/lombok/javac/handlers/JavacHandlerUtil.java
JavacHandlerUtil.generateNullCheck
public static JCStatement generateNullCheck(JavacTreeMaker maker, JavacNode variable, JCVariableDecl varDecl, JavacNode source) { """ Generates a new statement that checks if the given variable is null, and if so, throws a configured exception with the variable name as message. This is a special case method re...
java
public static JCStatement generateNullCheck(JavacTreeMaker maker, JavacNode variable, JCVariableDecl varDecl, JavacNode source) { NullCheckExceptionType exceptionType = source.getAst().readConfiguration(ConfigurationKeys.NON_NULL_EXCEPTION_TYPE); if (exceptionType == null) exceptionType = NullCheckExceptionType.NUL...
[ "public", "static", "JCStatement", "generateNullCheck", "(", "JavacTreeMaker", "maker", ",", "JavacNode", "variable", ",", "JCVariableDecl", "varDecl", ",", "JavacNode", "source", ")", "{", "NullCheckExceptionType", "exceptionType", "=", "source", ".", "getAst", "(", ...
Generates a new statement that checks if the given variable is null, and if so, throws a configured exception with the variable name as message. This is a special case method reserved for use when the provided declaration differs from the variable's declaration, i.e. in a constructor or setter where the local paramete...
[ "Generates", "a", "new", "statement", "that", "checks", "if", "the", "given", "variable", "is", "null", "and", "if", "so", "throws", "a", "configured", "exception", "with", "the", "variable", "name", "as", "message", "." ]
train
https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/core/lombok/javac/handlers/JavacHandlerUtil.java#L1483-L1500
marvinlabs/android-slideshow-widget
library/src/main/java/com/marvinlabs/widget/slideshow/adapter/BitmapAdapter.java
BitmapAdapter.onBitmapLoaded
protected void onBitmapLoaded(int position, Bitmap bitmap) { """ This function should be called by subclasses once they have actually loaded the bitmap. @param position the position of the item @param bitmap the bitmap that has been loaded """ BitmapCache bc = cachedBitmaps.get(position); ...
java
protected void onBitmapLoaded(int position, Bitmap bitmap) { BitmapCache bc = cachedBitmaps.get(position); if (bc != null) { bc.status = bitmap == null ? SlideStatus.NOT_AVAILABLE : SlideStatus.READY; bc.bitmap = new WeakReference<Bitmap>(bitmap); } }
[ "protected", "void", "onBitmapLoaded", "(", "int", "position", ",", "Bitmap", "bitmap", ")", "{", "BitmapCache", "bc", "=", "cachedBitmaps", ".", "get", "(", "position", ")", ";", "if", "(", "bc", "!=", "null", ")", "{", "bc", ".", "status", "=", "bitm...
This function should be called by subclasses once they have actually loaded the bitmap. @param position the position of the item @param bitmap the bitmap that has been loaded
[ "This", "function", "should", "be", "called", "by", "subclasses", "once", "they", "have", "actually", "loaded", "the", "bitmap", "." ]
train
https://github.com/marvinlabs/android-slideshow-widget/blob/0d8ddca9a8f62787d78b5eb7f184cabfee569d8d/library/src/main/java/com/marvinlabs/widget/slideshow/adapter/BitmapAdapter.java#L79-L85
linkhub-sdk/popbill.sdk.java
src/main/java/com/popbill/api/statement/StatementServiceImp.java
StatementServiceImp.sendFAX
@Override public Response sendFAX(String CorpNum, int ItemCode, String MgtKey, String Sender, String Receiver) throws PopbillException { """ /* (non-Javadoc) @see com.popbill.api.StatementService#sendFAX(java.lang.String, java.number.Integer, java.lang.String, java.lang.String, java.lang.String) """ ...
java
@Override public Response sendFAX(String CorpNum, int ItemCode, String MgtKey, String Sender, String Receiver) throws PopbillException { return sendFAX(CorpNum, ItemCode, MgtKey, Sender, Receiver, null); }
[ "@", "Override", "public", "Response", "sendFAX", "(", "String", "CorpNum", ",", "int", "ItemCode", ",", "String", "MgtKey", ",", "String", "Sender", ",", "String", "Receiver", ")", "throws", "PopbillException", "{", "return", "sendFAX", "(", "CorpNum", ",", ...
/* (non-Javadoc) @see com.popbill.api.StatementService#sendFAX(java.lang.String, java.number.Integer, java.lang.String, java.lang.String, java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/linkhub-sdk/popbill.sdk.java/blob/63a341fefe96d60a368776638f3d4c81888238b7/src/main/java/com/popbill/api/statement/StatementServiceImp.java#L305-L309
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Normalizer2Impl.java
Normalizer2Impl.getTrailCCFromCompYesAndZeroCC
int getTrailCCFromCompYesAndZeroCC(CharSequence s, int cpStart, int cpLimit) { """ requires that the [cpStart..cpLimit[ character passes isCompYesAndZeroCC() """ int c; if(cpStart==(cpLimit-1)) { c=s.charAt(cpStart); } else { c=Character.codePointAt(s, cpStart); ...
java
int getTrailCCFromCompYesAndZeroCC(CharSequence s, int cpStart, int cpLimit) { int c; if(cpStart==(cpLimit-1)) { c=s.charAt(cpStart); } else { c=Character.codePointAt(s, cpStart); } int prevNorm16=getNorm16(c); if(prevNorm16<=minYesNo) { ...
[ "int", "getTrailCCFromCompYesAndZeroCC", "(", "CharSequence", "s", ",", "int", "cpStart", ",", "int", "cpLimit", ")", "{", "int", "c", ";", "if", "(", "cpStart", "==", "(", "cpLimit", "-", "1", ")", ")", "{", "c", "=", "s", ".", "charAt", "(", "cpSta...
requires that the [cpStart..cpLimit[ character passes isCompYesAndZeroCC()
[ "requires", "that", "the", "[", "cpStart", "..", "cpLimit", "[", "character", "passes", "isCompYesAndZeroCC", "()" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Normalizer2Impl.java#L1701-L1714
motown-io/motown
chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java
DomainService.updateChargingStationType
public ChargingStationType updateChargingStationType(Long id, ChargingStationType chargingStationType) { """ Update a charging station type. @param id the id of the entity to find. @param chargingStationType the payload from the request. """ chargingStationType.setId(id); return chargingSta...
java
public ChargingStationType updateChargingStationType(Long id, ChargingStationType chargingStationType) { chargingStationType.setId(id); return chargingStationTypeRepository.createOrUpdate(chargingStationType); }
[ "public", "ChargingStationType", "updateChargingStationType", "(", "Long", "id", ",", "ChargingStationType", "chargingStationType", ")", "{", "chargingStationType", ".", "setId", "(", "id", ")", ";", "return", "chargingStationTypeRepository", ".", "createOrUpdate", "(", ...
Update a charging station type. @param id the id of the entity to find. @param chargingStationType the payload from the request.
[ "Update", "a", "charging", "station", "type", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java#L131-L134
powermock/powermock
powermock-modules/powermock-module-javaagent/src/main/java/sun/tools/attach/HotSpotVirtualMachine.java
HotSpotVirtualMachine.loadAgentLibrary
private void loadAgentLibrary(String agentLibrary, boolean isAbsolute, String options) throws AgentLoadException, AgentInitializationException, IOException { """ /* Load agent library If isAbsolute is true then the agent library is the absolute path to the library and thus will not be expanded in the ta...
java
private void loadAgentLibrary(String agentLibrary, boolean isAbsolute, String options) throws AgentLoadException, AgentInitializationException, IOException { InputStream in = execute("load", agentLibrary, isAbsolute ? "true" : "false"...
[ "private", "void", "loadAgentLibrary", "(", "String", "agentLibrary", ",", "boolean", "isAbsolute", ",", "String", "options", ")", "throws", "AgentLoadException", ",", "AgentInitializationException", ",", "IOException", "{", "InputStream", "in", "=", "execute", "(", ...
/* Load agent library If isAbsolute is true then the agent library is the absolute path to the library and thus will not be expanded in the target VM. if isAbsolute is false then the agent library is just a library name and it will be expended in the target VM.
[ "/", "*", "Load", "agent", "library", "If", "isAbsolute", "is", "true", "then", "the", "agent", "library", "is", "the", "absolute", "path", "to", "the", "library", "and", "thus", "will", "not", "be", "expanded", "in", "the", "target", "VM", ".", "if", ...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-modules/powermock-module-javaagent/src/main/java/sun/tools/attach/HotSpotVirtualMachine.java#L54-L70
shrinkwrap/shrinkwrap
impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/io/tar/TarHeader.java
TarHeader.getCheckSumOctalBytes
public static int getCheckSumOctalBytes(long value, byte[] buf, int offset, int length) { """ Parse the checksum octal integer from a header buffer. @param header The header buffer from which to parse. @param offset The offset into the buffer from which to parse. @param length The number of header bytes to...
java
public static int getCheckSumOctalBytes(long value, byte[] buf, int offset, int length) { TarHeader.getOctalBytes(value, buf, offset, length); buf[offset + length - 1] = (byte) ' '; buf[offset + length - 2] = 0; return offset + length; }
[ "public", "static", "int", "getCheckSumOctalBytes", "(", "long", "value", ",", "byte", "[", "]", "buf", ",", "int", "offset", ",", "int", "length", ")", "{", "TarHeader", ".", "getOctalBytes", "(", "value", ",", "buf", ",", "offset", ",", "length", ")", ...
Parse the checksum octal integer from a header buffer. @param header The header buffer from which to parse. @param offset The offset into the buffer from which to parse. @param length The number of header bytes to parse. @return The integer value of the entry's checksum.
[ "Parse", "the", "checksum", "octal", "integer", "from", "a", "header", "buffer", "." ]
train
https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/io/tar/TarHeader.java#L479-L484
mgormley/pacaya
src/main/java/edu/jhu/pacaya/sch/tasks/SumPaths.java
SumPaths.approxSumPaths
public static double approxSumPaths(WeightedIntDiGraph g, RealVector startWeights, RealVector endWeights, Iterator<DiEdge> seq, DoubleConsumer c) { """ Computes the approximate sum of paths through the graph where the weight of each path is the product of edge weights along the path; If consumer c ...
java
public static double approxSumPaths(WeightedIntDiGraph g, RealVector startWeights, RealVector endWeights, Iterator<DiEdge> seq, DoubleConsumer c) { // we keep track of the total weight of discovered paths ending along // each edge and the total weight // of all paths ending at each n...
[ "public", "static", "double", "approxSumPaths", "(", "WeightedIntDiGraph", "g", ",", "RealVector", "startWeights", ",", "RealVector", "endWeights", ",", "Iterator", "<", "DiEdge", ">", "seq", ",", "DoubleConsumer", "c", ")", "{", "// we keep track of the total weight ...
Computes the approximate sum of paths through the graph where the weight of each path is the product of edge weights along the path; If consumer c is not null, it will be given the intermediate estimates as they are available
[ "Computes", "the", "approximate", "sum", "of", "paths", "through", "the", "graph", "where", "the", "weight", "of", "each", "path", "is", "the", "product", "of", "edge", "weights", "along", "the", "path", ";" ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/sch/tasks/SumPaths.java#L170-L213
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.getDefaultAnnotation
private static @CheckForNull TypeQualifierAnnotation getDefaultAnnotation(AnnotatedObject o, TypeQualifierValue<?> typeQualifierValue, ElementType elementType) { """ Look for a default type qualifier annotation. @param o an AnnotatedObject @param typeQualifierValue a TypeQualifierValue @param elementTyp...
java
private static @CheckForNull TypeQualifierAnnotation getDefaultAnnotation(AnnotatedObject o, TypeQualifierValue<?> typeQualifierValue, ElementType elementType) { // // Try to find a default annotation using the standard JSR-305 // default annotation mechanism. // TypeQualifie...
[ "private", "static", "@", "CheckForNull", "TypeQualifierAnnotation", "getDefaultAnnotation", "(", "AnnotatedObject", "o", ",", "TypeQualifierValue", "<", "?", ">", "typeQualifierValue", ",", "ElementType", "elementType", ")", "{", "//", "// Try to find a default annotation ...
Look for a default type qualifier annotation. @param o an AnnotatedObject @param typeQualifierValue a TypeQualifierValue @param elementType type of element for which we're looking for a default annotation @return default TypeQualifierAnnotation, or null if none
[ "Look", "for", "a", "default", "type", "qualifier", "annotation", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L410-L464
googleads/googleads-java-lib
examples/adwords_axis/src/main/java/adwords/axis/v201809/misc/UploadMediaBundle.java
UploadMediaBundle.runExample
public static void runExample(AdWordsServicesInterface adWordsServices, AdWordsSession session) throws IOException { """ Runs the example. @param adWordsServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws Rem...
java
public static void runExample(AdWordsServicesInterface adWordsServices, AdWordsSession session) throws IOException { // Get the MediaService. MediaServiceInterface mediaService = adWordsServices.get(session, MediaServiceInterface.class); // Create HTML5 media. byte[] html5Zip = com.google...
[ "public", "static", "void", "runExample", "(", "AdWordsServicesInterface", "adWordsServices", ",", "AdWordsSession", "session", ")", "throws", "IOException", "{", "// Get the MediaService.", "MediaServiceInterface", "mediaService", "=", "adWordsServices", ".", "get", "(", ...
Runs the example. @param adWordsServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors. @throws IOException if unable to get media data from the URL.
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/adwords_axis/src/main/java/adwords/axis/v201809/misc/UploadMediaBundle.java#L116-L140
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
PackageSummaryBuilder.buildPackageDoc
public void buildPackageDoc(XMLNode node, Content contentTree) throws Exception { """ Build the package documentation. @param node the XML element that specifies which components to document @param contentTree the content tree to which the documentation will be added """ contentTree = packageWriter...
java
public void buildPackageDoc(XMLNode node, Content contentTree) throws Exception { contentTree = packageWriter.getPackageHeader(Util.getPackageName(packageDoc)); buildChildren(node, contentTree); packageWriter.addPackageFooter(contentTree); packageWriter.printDocument(contentTree); ...
[ "public", "void", "buildPackageDoc", "(", "XMLNode", "node", ",", "Content", "contentTree", ")", "throws", "Exception", "{", "contentTree", "=", "packageWriter", ".", "getPackageHeader", "(", "Util", ".", "getPackageName", "(", "packageDoc", ")", ")", ";", "buil...
Build the package documentation. @param node the XML element that specifies which components to document @param contentTree the content tree to which the documentation will be added
[ "Build", "the", "package", "documentation", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java#L122-L129
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java
ListIndexedIterating.sawOpcodeLoop
private void sawOpcodeLoop(final int seen) { """ the first pass of the method opcode to collet for loops information @param seen the currently parsed opcode """ try { stack.mergeJumps(this); switch (state) { case SAW_NOTHING: if ((seen ==...
java
private void sawOpcodeLoop(final int seen) { try { stack.mergeJumps(this); switch (state) { case SAW_NOTHING: if ((seen == Const.IINC) && (getIntConstant() == 1)) { loopReg = getRegisterOperand(); state ...
[ "private", "void", "sawOpcodeLoop", "(", "final", "int", "seen", ")", "{", "try", "{", "stack", ".", "mergeJumps", "(", "this", ")", ";", "switch", "(", "state", ")", "{", "case", "SAW_NOTHING", ":", "if", "(", "(", "seen", "==", "Const", ".", "IINC"...
the first pass of the method opcode to collet for loops information @param seen the currently parsed opcode
[ "the", "first", "pass", "of", "the", "method", "opcode", "to", "collet", "for", "loops", "information" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/ListIndexedIterating.java#L155-L186
apache/groovy
src/main/java/org/codehaus/groovy/control/SourceUnit.java
SourceUnit.convert
public void convert() throws CompilationFailedException { """ Generates an AST from the CST. You can retrieve it with getAST(). """ if (this.phase == Phases.PARSING && this.phaseComplete) { gotoPhase(Phases.CONVERSION); } if (this.phase != Phases.CONVERSION) { ...
java
public void convert() throws CompilationFailedException { if (this.phase == Phases.PARSING && this.phaseComplete) { gotoPhase(Phases.CONVERSION); } if (this.phase != Phases.CONVERSION) { throw new GroovyBugError("SourceUnit not ready for convert()"); } /...
[ "public", "void", "convert", "(", ")", "throws", "CompilationFailedException", "{", "if", "(", "this", ".", "phase", "==", "Phases", ".", "PARSING", "&&", "this", ".", "phaseComplete", ")", "{", "gotoPhase", "(", "Phases", ".", "CONVERSION", ")", ";", "}",...
Generates an AST from the CST. You can retrieve it with getAST().
[ "Generates", "an", "AST", "from", "the", "CST", ".", "You", "can", "retrieve", "it", "with", "getAST", "()", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/control/SourceUnit.java#L235-L267
DJCordhose/jmte
src/com/floreysoft/jmte/Engine.java
Engine.variablesAvailable
public boolean variablesAvailable(Map<String, Object> model, String... vars) { """ Checks if all given variables are there and if so, that they evaluate to true inside an if. """ final TemplateContext context = new TemplateContext(null, null, null, new ScopedMap(model), modelAdaptor, this, new SilentEr...
java
public boolean variablesAvailable(Map<String, Object> model, String... vars) { final TemplateContext context = new TemplateContext(null, null, null, new ScopedMap(model), modelAdaptor, this, new SilentErrorHandler(), null); for (String var : vars) { final IfToken token = new IfToken(var, false); if (...
[ "public", "boolean", "variablesAvailable", "(", "Map", "<", "String", ",", "Object", ">", "model", ",", "String", "...", "vars", ")", "{", "final", "TemplateContext", "context", "=", "new", "TemplateContext", "(", "null", ",", "null", ",", "null", ",", "ne...
Checks if all given variables are there and if so, that they evaluate to true inside an if.
[ "Checks", "if", "all", "given", "variables", "are", "there", "and", "if", "so", "that", "they", "evaluate", "to", "true", "inside", "an", "if", "." ]
train
https://github.com/DJCordhose/jmte/blob/7334e6d111cc2198c5cf69ee336584ab9e192fe5/src/com/floreysoft/jmte/Engine.java#L120-L130
j256/ormlite-core
src/main/java/com/j256/ormlite/stmt/mapped/MappedQueryForFieldEq.java
MappedQueryForFieldEq.execute
public T execute(DatabaseConnection databaseConnection, ID id, ObjectCache objectCache) throws SQLException { """ Query for an object in the database which matches the id argument. """ if (objectCache != null) { T result = objectCache.get(clazz, id); if (result != null) { return result; } } ...
java
public T execute(DatabaseConnection databaseConnection, ID id, ObjectCache objectCache) throws SQLException { if (objectCache != null) { T result = objectCache.get(clazz, id); if (result != null) { return result; } } Object[] args = new Object[] { convertIdToFieldObject(id) }; // @SuppressWarnings(...
[ "public", "T", "execute", "(", "DatabaseConnection", "databaseConnection", ",", "ID", "id", ",", "ObjectCache", "objectCache", ")", "throws", "SQLException", "{", "if", "(", "objectCache", "!=", "null", ")", "{", "T", "result", "=", "objectCache", ".", "get", ...
Query for an object in the database which matches the id argument.
[ "Query", "for", "an", "object", "in", "the", "database", "which", "matches", "the", "id", "argument", "." ]
train
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/stmt/mapped/MappedQueryForFieldEq.java#L30-L53
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/NetworkInterfacesInner.java
NetworkInterfacesInner.listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { """ Get the specified net...
java
public Observable<ServiceResponse<Page<NetworkInterfaceIPConfigurationInner>>> listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { return listVirtualMach...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "NetworkInterfaceIPConfigurationInner", ">", ">", ">", "listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "virtualMachineSca...
Get the specified network interface ip configuration in a virtual machine scale set. @param resourceGroupName The name of the resource group. @param virtualMachineScaleSetName The name of the virtual machine scale set. @param virtualmachineIndex The virtual machine index. @param networkInterfaceName The name of the ne...
[ "Get", "the", "specified", "network", "interface", "ip", "configuration", "in", "a", "virtual", "machine", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/NetworkInterfacesInner.java#L2005-L2017
leancloud/java-sdk-all
realtime/src/main/java/cn/leancloud/im/v2/AVIMMessageInterval.java
AVIMMessageInterval.createBound
public static AVIMMessageIntervalBound createBound(String messageId, long timestamp, boolean closed) { """ create query bound @param messageId - message id @param timestamp - message timestamp @param closed - included specified message flag. true: include false: not include. @return query interval bound ...
java
public static AVIMMessageIntervalBound createBound(String messageId, long timestamp, boolean closed) { return new AVIMMessageIntervalBound(messageId, timestamp, closed); }
[ "public", "static", "AVIMMessageIntervalBound", "createBound", "(", "String", "messageId", ",", "long", "timestamp", ",", "boolean", "closed", ")", "{", "return", "new", "AVIMMessageIntervalBound", "(", "messageId", ",", "timestamp", ",", "closed", ")", ";", "}" ]
create query bound @param messageId - message id @param timestamp - message timestamp @param closed - included specified message flag. true: include false: not include. @return query interval bound instance
[ "create", "query", "bound" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/realtime/src/main/java/cn/leancloud/im/v2/AVIMMessageInterval.java#L32-L34
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/topology/TopologyBuilder.java
TopologyBuilder.setBolt
public BoltDeclarer setBolt(String id, IRichBolt bolt, Number parallelism_hint) throws IllegalArgumentException { """ Define a new bolt in this topology with the specified amount of parallelism. @param id the id of this component. This id is referenced by other components that want to consume this bolt's output...
java
public BoltDeclarer setBolt(String id, IRichBolt bolt, Number parallelism_hint) throws IllegalArgumentException { validateUnusedId(id); initCommon(id, bolt, parallelism_hint); _bolts.put(id, bolt); return new BoltGetter(id); }
[ "public", "BoltDeclarer", "setBolt", "(", "String", "id", ",", "IRichBolt", "bolt", ",", "Number", "parallelism_hint", ")", "throws", "IllegalArgumentException", "{", "validateUnusedId", "(", "id", ")", ";", "initCommon", "(", "id", ",", "bolt", ",", "parallelis...
Define a new bolt in this topology with the specified amount of parallelism. @param id the id of this component. This id is referenced by other components that want to consume this bolt's outputs. @param bolt the bolt @param parallelism_hint the number of tasks that should be assigned to execute this bolt. Each task w...
[ "Define", "a", "new", "bolt", "in", "this", "topology", "with", "the", "specified", "amount", "of", "parallelism", "." ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/topology/TopologyBuilder.java#L186-L191
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java
CPOptionValuePersistenceImpl.fetchByUUID_G
@Override public CPOptionValue fetchByUUID_G(String uuid, long groupId) { """ Returns the cp option value where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching cp option value,...
java
@Override public CPOptionValue fetchByUUID_G(String uuid, long groupId) { return fetchByUUID_G(uuid, groupId, true); }
[ "@", "Override", "public", "CPOptionValue", "fetchByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "{", "return", "fetchByUUID_G", "(", "uuid", ",", "groupId", ",", "true", ")", ";", "}" ]
Returns the cp option value where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching cp option value, or <code>null</code> if a matching cp option value could not be found
[ "Returns", "the", "cp", "option", "value", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", "finder", "cach...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java#L699-L702
leancloud/java-sdk-all
realtime/src/main/java/cn/leancloud/im/v2/AVIMConversationsQuery.java
AVIMConversationsQuery.whereWithinRadians
public AVIMConversationsQuery whereWithinRadians(String key, AVGeoPoint point, double maxDistance) { """ 增加一个基于地理位置的近似查询,当conversation的属性中有对应的地址位置与指定的地理位置间距不超过指定距离时返回 @param key @param point 指定的地理位置 @param maxDistance 距离,以角度计算 @return """ conditions.whereWithinRadians(key, point, maxDistance); ...
java
public AVIMConversationsQuery whereWithinRadians(String key, AVGeoPoint point, double maxDistance) { conditions.whereWithinRadians(key, point, maxDistance); return this; }
[ "public", "AVIMConversationsQuery", "whereWithinRadians", "(", "String", "key", ",", "AVGeoPoint", "point", ",", "double", "maxDistance", ")", "{", "conditions", ".", "whereWithinRadians", "(", "key", ",", "point", ",", "maxDistance", ")", ";", "return", "this", ...
增加一个基于地理位置的近似查询,当conversation的属性中有对应的地址位置与指定的地理位置间距不超过指定距离时返回 @param key @param point 指定的地理位置 @param maxDistance 距离,以角度计算 @return
[ "增加一个基于地理位置的近似查询,当conversation的属性中有对应的地址位置与指定的地理位置间距不超过指定距离时返回" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/realtime/src/main/java/cn/leancloud/im/v2/AVIMConversationsQuery.java#L343-L346
liyiorg/weixin-popular
src/main/java/weixin/popular/api/SemanticAPI.java
SemanticAPI.addvoicetorecofortext
public static BaseResult addvoicetorecofortext(String accessToken, String voiceId, String lang, InputStream inputStream) { """ 提交语音 @param accessToken 接口调用凭证 @param voiceId 语音唯一标识 @param lang 语言,zh_CN 或 en_US,默认中文 @param inputStream 文件格式 只支持mp3,16k,单声道,最大1M @return BaseResult @since 2.8.22 "...
java
public static BaseResult addvoicetorecofortext(String accessToken, String voiceId, String lang, InputStream inputStream) { HttpPost httpPost = new HttpPost(BASE_URI + "/cgi-bin/media/voice/addvoicetorecofortext"); byte[] data; try { data = StreamUtils.copyToByteArray(inputStream)...
[ "public", "static", "BaseResult", "addvoicetorecofortext", "(", "String", "accessToken", ",", "String", "voiceId", ",", "String", "lang", ",", "InputStream", "inputStream", ")", "{", "HttpPost", "httpPost", "=", "new", "HttpPost", "(", "BASE_URI", "+", "\"/cgi-bin...
提交语音 @param accessToken 接口调用凭证 @param voiceId 语音唯一标识 @param lang 语言,zh_CN 或 en_US,默认中文 @param inputStream 文件格式 只支持mp3,16k,单声道,最大1M @return BaseResult @since 2.8.22
[ "提交语音" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/SemanticAPI.java#L149-L169
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropertyWriteUtil.java
PropertyWriteUtil.writeAttributes
public static void writeAttributes(XMLStreamWriter xmlStreamWriter, HierarchicalProperty property) throws XMLStreamException { """ Writes property attributes into XML. @param xmlStreamWriter XML writer @param property property @throws XMLStreamException {@link XMLStreamException} """ Map<Str...
java
public static void writeAttributes(XMLStreamWriter xmlStreamWriter, HierarchicalProperty property) throws XMLStreamException { Map<String, String> attributes = property.getAttributes(); Iterator<String> keyIter = attributes.keySet().iterator(); while (keyIter.hasNext()) { ...
[ "public", "static", "void", "writeAttributes", "(", "XMLStreamWriter", "xmlStreamWriter", ",", "HierarchicalProperty", "property", ")", "throws", "XMLStreamException", "{", "Map", "<", "String", ",", "String", ">", "attributes", "=", "property", ".", "getAttributes", ...
Writes property attributes into XML. @param xmlStreamWriter XML writer @param property property @throws XMLStreamException {@link XMLStreamException}
[ "Writes", "property", "attributes", "into", "XML", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/xml/PropertyWriteUtil.java#L148-L159
davidcarboni/cryptolite-java
src/main/java/com/github/davidcarboni/cryptolite/Keys.java
Keys.generateSecretKey
static SecretKey generateSecretKey(String password, String salt) { """ Generates a new secret (or symmetric) key for use with AES using the given password and salt values. Given the same password and salt, this method will always (re)generate the same key. @param password The starting point to use in generat...
java
static SecretKey generateSecretKey(String password, String salt) { if (password == null) { return null; } // Get a SecretKeyFactory for ALGORITHM. // If PBKDF2WithHmacSHA256, add BouncyCastle and recurse to retry. SecretKeyFactory factory; try { ...
[ "static", "SecretKey", "generateSecretKey", "(", "String", "password", ",", "String", "salt", ")", "{", "if", "(", "password", "==", "null", ")", "{", "return", "null", ";", "}", "// Get a SecretKeyFactory for ALGORITHM.\r", "// If PBKDF2WithHmacSHA256, add BouncyCastle...
Generates a new secret (or symmetric) key for use with AES using the given password and salt values. Given the same password and salt, this method will always (re)generate the same key. @param password The starting point to use in generating the key. This can be a password, or any suitably secret string. It's worth n...
[ "Generates", "a", "new", "secret", "(", "or", "symmetric", ")", "key", "for", "use", "with", "AES", "using", "the", "given", "password", "and", "salt", "values", "." ]
train
https://github.com/davidcarboni/cryptolite-java/blob/e67954181a04ffc9beb1d9abca1421195fcf9764/src/main/java/com/github/davidcarboni/cryptolite/Keys.java#L179-L215
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/interceptor/LoggingInterceptorSupport.java
LoggingInterceptorSupport.logSoapMessage
protected void logSoapMessage(String logMessage, SoapMessage soapMessage, boolean incoming) throws TransformerException { """ Log SOAP message with transformer instance. @param logMessage the customized log message. @param soapMessage the message content as SOAP envelope source. @param incoming @throws Trans...
java
protected void logSoapMessage(String logMessage, SoapMessage soapMessage, boolean incoming) throws TransformerException { Transformer transformer = createIndentingTransformer(); StringWriter writer = new StringWriter(); transformer.transform(soapMessage.getEnvelope().getSource(), new St...
[ "protected", "void", "logSoapMessage", "(", "String", "logMessage", ",", "SoapMessage", "soapMessage", ",", "boolean", "incoming", ")", "throws", "TransformerException", "{", "Transformer", "transformer", "=", "createIndentingTransformer", "(", ")", ";", "StringWriter",...
Log SOAP message with transformer instance. @param logMessage the customized log message. @param soapMessage the message content as SOAP envelope source. @param incoming @throws TransformerException
[ "Log", "SOAP", "message", "with", "transformer", "instance", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/interceptor/LoggingInterceptorSupport.java#L97-L103
sarxos/v4l4j
src/main/java/au/edu/jcu/v4l4j/DeviceInfo.java
DeviceInfo.listIntervals
public synchronized FrameInterval listIntervals(ImageFormat imf, int width, int height) { """ This method returns a {@link FrameInterval} object containing information about the supported frame intervals for capture at the given resolution and image format. <b>Note that the returned {@link FrameInterval} obj...
java
public synchronized FrameInterval listIntervals(ImageFormat imf, int width, int height){ checkRelease(); return doListIntervals(object, imf.getIndex(), width, height); }
[ "public", "synchronized", "FrameInterval", "listIntervals", "(", "ImageFormat", "imf", ",", "int", "width", ",", "int", "height", ")", "{", "checkRelease", "(", ")", ";", "return", "doListIntervals", "(", "object", ",", "imf", ".", "getIndex", "(", ")", ",",...
This method returns a {@link FrameInterval} object containing information about the supported frame intervals for capture at the given resolution and image format. <b>Note that the returned {@link FrameInterval} object could have its type set to {@link FrameInterval.Type#UNSUPPORTED} if the driver does not support fram...
[ "This", "method", "returns", "a", "{" ]
train
https://github.com/sarxos/v4l4j/blob/4fc0eec2c3a1a4260593f6ac03b7a8013e3804c9/src/main/java/au/edu/jcu/v4l4j/DeviceInfo.java#L237-L241
alkacon/opencms-core
src/org/opencms/ade/contenteditor/CmsContentEditorActionElement.java
CmsContentEditorActionElement.addExternalResourceTags
private void addExternalResourceTags(StringBuffer sb, CmsContentDefinition definition) { """ Adds link and script tags to the buffer if required for external widgets.<p> @param sb the string buffer to append the tags to @param definition the content definition """ Set<String> includedScripts = n...
java
private void addExternalResourceTags(StringBuffer sb, CmsContentDefinition definition) { Set<String> includedScripts = new HashSet<String>(); Set<String> includedStyles = new HashSet<String>(); for (CmsExternalWidgetConfiguration configuration : definition.getExternalWidgetConfigurations())...
[ "private", "void", "addExternalResourceTags", "(", "StringBuffer", "sb", ",", "CmsContentDefinition", "definition", ")", "{", "Set", "<", "String", ">", "includedScripts", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "Set", "<", "String", ">", "...
Adds link and script tags to the buffer if required for external widgets.<p> @param sb the string buffer to append the tags to @param definition the content definition
[ "Adds", "link", "and", "script", "tags", "to", "the", "buffer", "if", "required", "for", "external", "widgets", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/contenteditor/CmsContentEditorActionElement.java#L97-L117
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/ifx/Segment3ifx.java
Segment3ifx.x1Property
@Pure public IntegerProperty x1Property() { """ Replies the property that is the x coordinate of the first segment point. @return the x1 property. """ if (this.p1.x == null) { this.p1.x = new SimpleIntegerProperty(this, MathFXAttributeNames.X1); } return this.p1.x; }
java
@Pure public IntegerProperty x1Property() { if (this.p1.x == null) { this.p1.x = new SimpleIntegerProperty(this, MathFXAttributeNames.X1); } return this.p1.x; }
[ "@", "Pure", "public", "IntegerProperty", "x1Property", "(", ")", "{", "if", "(", "this", ".", "p1", ".", "x", "==", "null", ")", "{", "this", ".", "p1", ".", "x", "=", "new", "SimpleIntegerProperty", "(", "this", ",", "MathFXAttributeNames", ".", "X1"...
Replies the property that is the x coordinate of the first segment point. @return the x1 property.
[ "Replies", "the", "property", "that", "is", "the", "x", "coordinate", "of", "the", "first", "segment", "point", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/ifx/Segment3ifx.java#L204-L210
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountBatchConfigurationsInner.java
IntegrationAccountBatchConfigurationsInner.createOrUpdate
public BatchConfigurationInner createOrUpdate(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner batchConfiguration) { """ Create or update a batch configuration for an integration account. @param resourceGroupName The resource group name. @param int...
java
public BatchConfigurationInner createOrUpdate(String resourceGroupName, String integrationAccountName, String batchConfigurationName, BatchConfigurationInner batchConfiguration) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName, batchConfiguration)...
[ "public", "BatchConfigurationInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "String", "batchConfigurationName", ",", "BatchConfigurationInner", "batchConfiguration", ")", "{", "return", "createOrUpdateWithServiceRespons...
Create or update a batch configuration for an integration account. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param batchConfigurationName The batch configuration name. @param batchConfiguration The batch configuration. @throws IllegalArgumentExceptio...
[ "Create", "or", "update", "a", "batch", "configuration", "for", "an", "integration", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountBatchConfigurationsInner.java#L273-L275
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java
MDAG.createSimpleMDAGTransitionSet
private int createSimpleMDAGTransitionSet(MDAGNode node, SimpleMDAGNode[] mdagDataArray, int onePastLastCreatedTransitionSetIndex) { """ Creates a SimpleMDAGNode version of an MDAGNode's outgoing _transition set in mdagDataArray. @param node the MDAGNode containing the _transitio...
java
private int createSimpleMDAGTransitionSet(MDAGNode node, SimpleMDAGNode[] mdagDataArray, int onePastLastCreatedTransitionSetIndex) { int pivotIndex = onePastLastCreatedTransitionSetIndex; // node自己的位置 node.setTransitionSetBeginIndex(pivotIndex); onePastLastCreatedTransitionSetIndex += node...
[ "private", "int", "createSimpleMDAGTransitionSet", "(", "MDAGNode", "node", ",", "SimpleMDAGNode", "[", "]", "mdagDataArray", ",", "int", "onePastLastCreatedTransitionSetIndex", ")", "{", "int", "pivotIndex", "=", "onePastLastCreatedTransitionSetIndex", ";", "// node自己的位置",...
Creates a SimpleMDAGNode version of an MDAGNode's outgoing _transition set in mdagDataArray. @param node the MDAGNode containing the _transition set to be inserted in to {@code mdagDataArray} @param mdagDataArray an array of SimpleMDAGNodes containing a subset of ...
[ "Creates", "a", "SimpleMDAGNode", "version", "of", "an", "MDAGNode", "s", "outgoing", "_transition", "set", "in", "mdagDataArray", "." ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java#L723-L752
johncarl81/transfuse
transfuse-support/src/main/java/org/androidtransfuse/adapter/element/ASTElementFactory.java
ASTElementFactory.getField
public ASTField getField(VariableElement variableElement) { """ Build a ASTElementField from the given VariableElement @param variableElement required input Element @return ASTElementField """ ASTAccessModifier modifier = buildAccessModifier(variableElement); return new ASTElementField(var...
java
public ASTField getField(VariableElement variableElement) { ASTAccessModifier modifier = buildAccessModifier(variableElement); return new ASTElementField(variableElement, astTypeBuilderVisitor, modifier, getAnnotations(variableElement)); }
[ "public", "ASTField", "getField", "(", "VariableElement", "variableElement", ")", "{", "ASTAccessModifier", "modifier", "=", "buildAccessModifier", "(", "variableElement", ")", ";", "return", "new", "ASTElementField", "(", "variableElement", ",", "astTypeBuilderVisitor", ...
Build a ASTElementField from the given VariableElement @param variableElement required input Element @return ASTElementField
[ "Build", "a", "ASTElementField", "from", "the", "given", "VariableElement" ]
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-support/src/main/java/org/androidtransfuse/adapter/element/ASTElementFactory.java#L186-L190
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java
DBEntitySequenceFactory.toEntityCategory
static String toEntityCategory(String table, List<String> fields) { """ Converts an entity type and scalar field name list to an 'entity category' Entity category is represented as String: "table[field1,field2]" @param table entity type @param fields scalar field names the entity should be initialized with ...
java
static String toEntityCategory(String table, List<String> fields) { if (fields == null || fields.size() == 0) { return table + "[]"; } StringBuffer buffer = new StringBuffer(); buffer.append(table).append('[').append(fields.get(0)); for (int i = 1; i < fields.size(); i++) { buffer.append(',').app...
[ "static", "String", "toEntityCategory", "(", "String", "table", ",", "List", "<", "String", ">", "fields", ")", "{", "if", "(", "fields", "==", "null", "||", "fields", ".", "size", "(", ")", "==", "0", ")", "{", "return", "table", "+", "\"[]\"", ";",...
Converts an entity type and scalar field name list to an 'entity category' Entity category is represented as String: "table[field1,field2]" @param table entity type @param fields scalar field names the entity should be initialized with @return entity category
[ "Converts", "an", "entity", "type", "and", "scalar", "field", "name", "list", "to", "an", "entity", "category", "Entity", "category", "is", "represented", "as", "String", ":", "table", "[", "field1", "field2", "]" ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/search/aggregate/DBEntitySequenceFactory.java#L485-L496
NextFaze/power-adapters
power-adapters/src/main/java/com/nextfaze/poweradapters/DividerAdapterBuilder.java
DividerAdapterBuilder.innerView
@NonNull public DividerAdapterBuilder innerView(@NonNull ViewFactory viewFactory) { """ Sets the divider that appears between all of the wrapped adapters items. """ mInnerItem = new Item(checkNotNull(viewFactory, "viewFactory"), false); return this; }
java
@NonNull public DividerAdapterBuilder innerView(@NonNull ViewFactory viewFactory) { mInnerItem = new Item(checkNotNull(viewFactory, "viewFactory"), false); return this; }
[ "@", "NonNull", "public", "DividerAdapterBuilder", "innerView", "(", "@", "NonNull", "ViewFactory", "viewFactory", ")", "{", "mInnerItem", "=", "new", "Item", "(", "checkNotNull", "(", "viewFactory", ",", "\"viewFactory\"", ")", ",", "false", ")", ";", "return",...
Sets the divider that appears between all of the wrapped adapters items.
[ "Sets", "the", "divider", "that", "appears", "between", "all", "of", "the", "wrapped", "adapters", "items", "." ]
train
https://github.com/NextFaze/power-adapters/blob/cdf00b1b723ed9d6bcd549ae9741a19dd59651e1/power-adapters/src/main/java/com/nextfaze/poweradapters/DividerAdapterBuilder.java#L64-L68
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.escapeXml10AttributeMinimal
public static void escapeXml10AttributeMinimal(final String text, final Writer writer) throws IOException { """ <p> Perform an XML 1.0 level 1 (only markup-significant chars) <strong>escape</strong> operation on a <tt>String</tt> input meant to be an XML attribute value, writing results to a <tt>Writ...
java
public static void escapeXml10AttributeMinimal(final String text, final Writer writer) throws IOException { escapeXml(text, writer, XmlEscapeSymbols.XML10_ATTRIBUTE_SYMBOLS, XmlEscapeType.CHARACTER_ENTITY_REFERENCES_DEFAULT_TO_HEXA, XmlEscapeLevel.LEVEL_1_ONLY_MARKUP_...
[ "public", "static", "void", "escapeXml10AttributeMinimal", "(", "final", "String", "text", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeXml", "(", "text", ",", "writer", ",", "XmlEscapeSymbols", ".", "XML10_ATTRIBUTE_SYMBOLS", ",", "...
<p> Perform an XML 1.0 level 1 (only markup-significant chars) <strong>escape</strong> operation on a <tt>String</tt> input meant to be an XML attribute value, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 1</em> means this method will only escape the five markup-significant characters which are <em>predefin...
[ "<p", ">", "Perform", "an", "XML", "1", ".", "0", "level", "1", "(", "only", "markup", "-", "significant", "chars", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "meant", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L778-L783
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java
GlobalUsersInner.getEnvironmentAsync
public Observable<GetEnvironmentResponseInner> getEnvironmentAsync(String userName, String environmentId) { """ Gets the virtual machine details. @param userName The name of the user. @param environmentId The resourceId of the environment @throws IllegalArgumentException thrown if parameters fail the validati...
java
public Observable<GetEnvironmentResponseInner> getEnvironmentAsync(String userName, String environmentId) { return getEnvironmentWithServiceResponseAsync(userName, environmentId).map(new Func1<ServiceResponse<GetEnvironmentResponseInner>, GetEnvironmentResponseInner>() { @Override public...
[ "public", "Observable", "<", "GetEnvironmentResponseInner", ">", "getEnvironmentAsync", "(", "String", "userName", ",", "String", "environmentId", ")", "{", "return", "getEnvironmentWithServiceResponseAsync", "(", "userName", ",", "environmentId", ")", ".", "map", "(", ...
Gets the virtual machine details. @param userName The name of the user. @param environmentId The resourceId of the environment @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the GetEnvironmentResponseInner object
[ "Gets", "the", "virtual", "machine", "details", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java#L153-L160
xwiki/xwiki-rendering
xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XMLWikiPrinter.java
XMLWikiPrinter.printXMLElement
public void printXMLElement(String name, Map<String, String> attributes) { """ Print the xml element. In the form {@code <name att1="value1" att2="value2"/>}. @param name the xml element to print @param attributes the xml attributes of the element to print """ Element element = new DefaultElement(n...
java
public void printXMLElement(String name, Map<String, String> attributes) { Element element = new DefaultElement(name); if (attributes != null && !attributes.isEmpty()) { for (Map.Entry<String, String> entry : attributes.entrySet()) { element.addAttribute(entry.getKey(), ...
[ "public", "void", "printXMLElement", "(", "String", "name", ",", "Map", "<", "String", ",", "String", ">", "attributes", ")", "{", "Element", "element", "=", "new", "DefaultElement", "(", "name", ")", ";", "if", "(", "attributes", "!=", "null", "&&", "!"...
Print the xml element. In the form {@code <name att1="value1" att2="value2"/>}. @param name the xml element to print @param attributes the xml attributes of the element to print
[ "Print", "the", "xml", "element", ".", "In", "the", "form", "{", "@code", "<name", "att1", "=", "value1", "att2", "=", "value2", "/", ">", "}", "." ]
train
https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XMLWikiPrinter.java#L122-L137
fommil/matrix-toolkits-java
src/main/java/no/uib/cipr/matrix/DenseLU.java
DenseLU.rcond
public double rcond(Matrix A, Norm norm) { """ Computes the reciprocal condition number, using either the infinity norm of the 1 norm. @param A The matrix this is a decomposition of @param norm Either <code>Norm.One</code> or <code>Norm.Infinity</code> @return The reciprocal condition number. Values close ...
java
public double rcond(Matrix A, Norm norm) { if (norm != Norm.One && norm != Norm.Infinity) throw new IllegalArgumentException( "Only the 1 or the Infinity norms are supported"); double anorm = A.norm(norm); int n = A.numRows(); intW info = new intW(0); ...
[ "public", "double", "rcond", "(", "Matrix", "A", ",", "Norm", "norm", ")", "{", "if", "(", "norm", "!=", "Norm", ".", "One", "&&", "norm", "!=", "Norm", ".", "Infinity", ")", "throw", "new", "IllegalArgumentException", "(", "\"Only the 1 or the Infinity norm...
Computes the reciprocal condition number, using either the infinity norm of the 1 norm. @param A The matrix this is a decomposition of @param norm Either <code>Norm.One</code> or <code>Norm.Infinity</code> @return The reciprocal condition number. Values close to unity indicate a well-conditioned system, while numbers ...
[ "Computes", "the", "reciprocal", "condition", "number", "using", "either", "the", "infinity", "norm", "of", "the", "1", "norm", "." ]
train
https://github.com/fommil/matrix-toolkits-java/blob/6157618bc86bcda3749af2a60bf869d8f3292960/src/main/java/no/uib/cipr/matrix/DenseLU.java#L138-L157
logic-ng/LogicNG
src/main/java/org/logicng/solvers/sat/CleaneLingSolver.java
CleaneLingSolver.doResolve
private void doResolve(final CLClause c, final int pivot, final CLClause d) { """ Performs resolution on two given clauses and a pivot literal. @param c the first clause @param pivot the pivot literal @param d the second clause """ assert !c.dumped() && !c.satisfied(); assert !d.dump...
java
private void doResolve(final CLClause c, final int pivot, final CLClause d) { assert !c.dumped() && !c.satisfied(); assert !d.dumped() && !d.satisfied(); assert this.addedlits.empty(); this.stats.steps++; for (int i = 0; i < c.lits().size(); i++) { final int lit = c.l...
[ "private", "void", "doResolve", "(", "final", "CLClause", "c", ",", "final", "int", "pivot", ",", "final", "CLClause", "d", ")", "{", "assert", "!", "c", ".", "dumped", "(", ")", "&&", "!", "c", ".", "satisfied", "(", ")", ";", "assert", "!", "d", ...
Performs resolution on two given clauses and a pivot literal. @param c the first clause @param pivot the pivot literal @param d the second clause
[ "Performs", "resolution", "on", "two", "given", "clauses", "and", "a", "pivot", "literal", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/sat/CleaneLingSolver.java#L1013-L1029
netceteragroup/trema-core
src/main/java/com/netcetera/trema/core/importing/ChangesAnalyzer.java
ChangesAnalyzer.createChange
protected Change createChange(String key) { """ Creates a <code>Change</code> object for a given key. Note that only the conflict attributes of the change (i.e. conflicting/non-conflicting, acceptable/not acceptable, to be accepted/not to be accepted and the values to be accepted) are <b>not</b> set. Use {@li...
java
protected Change createChange(String key) { String language = importSource.getLanguage(); String importedValue = importSource.getValue(key); Status importedStatus = importSource.getStatus(key); // basic change Change change = new Change(Change.TYPE_NO_CHANGE, language, key, importedValue, importedS...
[ "protected", "Change", "createChange", "(", "String", "key", ")", "{", "String", "language", "=", "importSource", ".", "getLanguage", "(", ")", ";", "String", "importedValue", "=", "importSource", ".", "getValue", "(", "key", ")", ";", "Status", "importedStatu...
Creates a <code>Change</code> object for a given key. Note that only the conflict attributes of the change (i.e. conflicting/non-conflicting, acceptable/not acceptable, to be accepted/not to be accepted and the values to be accepted) are <b>not</b> set. Use {@link ChangesAnalyzer#setConflictAttributes(Change)} for that...
[ "Creates", "a", "<code", ">", "Change<", "/", "code", ">", "object", "for", "a", "given", "key", ".", "Note", "that", "only", "the", "conflict", "attributes", "of", "the", "change", "(", "i", ".", "e", ".", "conflicting", "/", "non", "-", "conflicting"...
train
https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/importing/ChangesAnalyzer.java#L94-L132
tommyettinger/RegExodus
src/main/java/regexodus/ds/CharArrayList.java
CharArrayList.subList
@Override public List<Character> subList(int fromIndex, int toIndex) { """ Returns a view of the portion of this list between the specified <tt>fromIndex</tt>, inclusive, and <tt>toIndex</tt>, exclusive. (If <tt>fromIndex</tt> and <tt>toIndex</tt> are equal, the returned list is empty.) The returned list ...
java
@Override public List<Character> subList(int fromIndex, int toIndex) { return new CharArrayList(a, fromIndex, toIndex - fromIndex); }
[ "@", "Override", "public", "List", "<", "Character", ">", "subList", "(", "int", "fromIndex", ",", "int", "toIndex", ")", "{", "return", "new", "CharArrayList", "(", "a", ",", "fromIndex", ",", "toIndex", "-", "fromIndex", ")", ";", "}" ]
Returns a view of the portion of this list between the specified <tt>fromIndex</tt>, inclusive, and <tt>toIndex</tt>, exclusive. (If <tt>fromIndex</tt> and <tt>toIndex</tt> are equal, the returned list is empty.) The returned list is backed by this list, so non-structural changes in the returned list are reflected in...
[ "Returns", "a", "view", "of", "the", "portion", "of", "this", "list", "between", "the", "specified", "<tt", ">", "fromIndex<", "/", "tt", ">", "inclusive", "and", "<tt", ">", "toIndex<", "/", "tt", ">", "exclusive", ".", "(", "If", "<tt", ">", "fromInd...
train
https://github.com/tommyettinger/RegExodus/blob/d4af9bb7c132c5f9d29f45b76121f93b2f89de16/src/main/java/regexodus/ds/CharArrayList.java#L666-L669
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java
AbstractManagedType.onCheckMapAttribute
private <V> boolean onCheckMapAttribute(PluralAttribute<? super X, ?, ?> pluralAttribute, Class<V> valueClazz) { """ On check map attribute. @param <V> the value type @param pluralAttribute the plural attribute @param valueClazz the value clazz @return true, if successful """ if (pluralAttribu...
java
private <V> boolean onCheckMapAttribute(PluralAttribute<? super X, ?, ?> pluralAttribute, Class<V> valueClazz) { if (pluralAttribute != null) { if (isMapAttribute(pluralAttribute) && isBindable(pluralAttribute, valueClazz)) { return true; } ...
[ "private", "<", "V", ">", "boolean", "onCheckMapAttribute", "(", "PluralAttribute", "<", "?", "super", "X", ",", "?", ",", "?", ">", "pluralAttribute", ",", "Class", "<", "V", ">", "valueClazz", ")", "{", "if", "(", "pluralAttribute", "!=", "null", ")", ...
On check map attribute. @param <V> the value type @param pluralAttribute the plural attribute @param valueClazz the value clazz @return true, if successful
[ "On", "check", "map", "attribute", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java#L1006-L1018
wildfly/wildfly-core
remoting/subsystem/src/main/java/org/jboss/as/remoting/management/ManagementRemotingServices.java
ManagementRemotingServices.isManagementResourceRemoveable
public static void isManagementResourceRemoveable(OperationContext context, PathAddress otherManagementEndpoint) throws OperationFailedException { """ Manual check because introducing a capability can't be done without a full refactoring. This has to go as soon as the management interfaces are redesigned. @param...
java
public static void isManagementResourceRemoveable(OperationContext context, PathAddress otherManagementEndpoint) throws OperationFailedException { ModelNode remotingConnector; try { remotingConnector = context.readResourceFromRoot( PathAddress.pathAddress(PathElement.path...
[ "public", "static", "void", "isManagementResourceRemoveable", "(", "OperationContext", "context", ",", "PathAddress", "otherManagementEndpoint", ")", "throws", "OperationFailedException", "{", "ModelNode", "remotingConnector", ";", "try", "{", "remotingConnector", "=", "con...
Manual check because introducing a capability can't be done without a full refactoring. This has to go as soon as the management interfaces are redesigned. @param context the OperationContext @param otherManagementEndpoint : the address to check that may provide an exposed jboss-remoting endpoint. @throws OperationFail...
[ "Manual", "check", "because", "introducing", "a", "capability", "can", "t", "be", "done", "without", "a", "full", "refactoring", ".", "This", "has", "to", "go", "as", "soon", "as", "the", "management", "interfaces", "are", "redesigned", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/remoting/subsystem/src/main/java/org/jboss/as/remoting/management/ManagementRemotingServices.java#L183-L199
nguyenq/tess4j
src/main/java/net/sourceforge/tess4j/Tesseract1.java
Tesseract1.doOCR
@Override public String doOCR(List<IIOImage> imageList, Rectangle rect) throws TesseractException { """ Performs OCR operation. @param imageList a list of <code>IIOImage</code> objects @param rect the bounding rectangle defines the region of the image to be recognized. A rectangle of zero dimension or <co...
java
@Override public String doOCR(List<IIOImage> imageList, Rectangle rect) throws TesseractException { return doOCR(imageList, null, rect); }
[ "@", "Override", "public", "String", "doOCR", "(", "List", "<", "IIOImage", ">", "imageList", ",", "Rectangle", "rect", ")", "throws", "TesseractException", "{", "return", "doOCR", "(", "imageList", ",", "null", ",", "rect", ")", ";", "}" ]
Performs OCR operation. @param imageList a list of <code>IIOImage</code> objects @param rect the bounding rectangle defines the region of the image to be recognized. A rectangle of zero dimension or <code>null</code> indicates the whole image. @return the recognized text @throws TesseractException
[ "Performs", "OCR", "operation", "." ]
train
https://github.com/nguyenq/tess4j/blob/cfcd4a8a44042f150b4aaf7bdf5ffc485a2236e1/src/main/java/net/sourceforge/tess4j/Tesseract1.java#L273-L276
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.telephony_lines_serviceName_hardware_GET
public OvhOrder telephony_lines_serviceName_hardware_GET(String serviceName, String hardware, String mondialRelayId, Boolean retractation, String shippingContactId) throws IOException { """ Get prices and contracts information REST: GET /order/telephony/lines/{serviceName}/hardware @param hardware [required] T...
java
public OvhOrder telephony_lines_serviceName_hardware_GET(String serviceName, String hardware, String mondialRelayId, Boolean retractation, String shippingContactId) throws IOException { String qPath = "/order/telephony/lines/{serviceName}/hardware"; StringBuilder sb = path(qPath, serviceName); query(sb, "hardware...
[ "public", "OvhOrder", "telephony_lines_serviceName_hardware_GET", "(", "String", "serviceName", ",", "String", "hardware", ",", "String", "mondialRelayId", ",", "Boolean", "retractation", ",", "String", "shippingContactId", ")", "throws", "IOException", "{", "String", "...
Get prices and contracts information REST: GET /order/telephony/lines/{serviceName}/hardware @param hardware [required] The hardware you want to order for this specific line @param mondialRelayId [required] Use /supply/mondialRelay entry point to specify a relay point and ignore shipping contact address information en...
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L6903-L6912
jtrfp/javamod
src/main/java/de/quippy/javamod/mixer/dsp/iir/filter/IIRFilter.java
IIRFilter.doFilter
public int doFilter(final float[] ringBuffer, final int start, final int length, final int useBands) { """ This will perform the filter on the samples @param ringBuffer @param preAmpedResultBuffer @param start @param length @since 12.01.2012 """ final float internalPreAmp = 1f/useBands; final float re...
java
public int doFilter(final float[] ringBuffer, final int start, final int length, final int useBands) { final float internalPreAmp = 1f/useBands; final float rest = 1.0f - internalPreAmp; final int end = start + length; int index = start; while (index < end) { for (int c=0; c<channels; c++) { fina...
[ "public", "int", "doFilter", "(", "final", "float", "[", "]", "ringBuffer", ",", "final", "int", "start", ",", "final", "int", "length", ",", "final", "int", "useBands", ")", "{", "final", "float", "internalPreAmp", "=", "1f", "/", "useBands", ";", "fina...
This will perform the filter on the samples @param ringBuffer @param preAmpedResultBuffer @param start @param length @since 12.01.2012
[ "This", "will", "perform", "the", "filter", "on", "the", "samples" ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/mixer/dsp/iir/filter/IIRFilter.java#L110-L139
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java
PrepareRequestInterceptor.addEntitySelector
private void addEntitySelector(Map<String, String> requestParameters, StringBuilder uri) { """ adding additional selector in the URI, which is required for READ operation Main purpose is to select or modify requested resource with well-defined keyword @param requestParameters @param uri """ if (Stri...
java
private void addEntitySelector(Map<String, String> requestParameters, StringBuilder uri) { if (StringUtils.hasText(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR))) { uri.append("/").append(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_SELECTOR)); } }
[ "private", "void", "addEntitySelector", "(", "Map", "<", "String", ",", "String", ">", "requestParameters", ",", "StringBuilder", "uri", ")", "{", "if", "(", "StringUtils", ".", "hasText", "(", "requestParameters", ".", "get", "(", "RequestElements", ".", "REQ...
adding additional selector in the URI, which is required for READ operation Main purpose is to select or modify requested resource with well-defined keyword @param requestParameters @param uri
[ "adding", "additional", "selector", "in", "the", "URI", "which", "is", "required", "for", "READ", "operation", "Main", "purpose", "is", "to", "select", "or", "modify", "requested", "resource", "with", "well", "-", "defined", "keyword" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L348-L352
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/LongStream.java
LongStream.flatMap
@NotNull public LongStream flatMap(@NotNull final LongFunction<? extends LongStream> mapper) { """ Returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element. <p>This is an inte...
java
@NotNull public LongStream flatMap(@NotNull final LongFunction<? extends LongStream> mapper) { return new LongStream(params, new LongFlatMap(iterator, mapper)); }
[ "@", "NotNull", "public", "LongStream", "flatMap", "(", "@", "NotNull", "final", "LongFunction", "<", "?", "extends", "LongStream", ">", "mapper", ")", "{", "return", "new", "LongStream", "(", "params", ",", "new", "LongFlatMap", "(", "iterator", ",", "mappe...
Returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element. <p>This is an intermediate operation. <p>Example: <pre> mapper: (a) -&gt; [a, a + 5] stream: [1, 2, 3, 4] result: [1, 6, 2, 7, 3,...
[ "Returns", "a", "stream", "consisting", "of", "the", "results", "of", "replacing", "each", "element", "of", "this", "stream", "with", "the", "contents", "of", "a", "mapped", "stream", "produced", "by", "applying", "the", "provided", "mapping", "function", "to"...
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/LongStream.java#L563-L566
hawkular/hawkular-apm
client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java
APMSpan.initFromExtractedTraceState
protected void initFromExtractedTraceState(APMSpanBuilder builder, TraceRecorder recorder, Reference ref, ContextSampler sampler) { """ This method initialises the span based on extracted trace state. @param builder The span builder @param recorder The trace recorder @param ref The reference @param sam...
java
protected void initFromExtractedTraceState(APMSpanBuilder builder, TraceRecorder recorder, Reference ref, ContextSampler sampler) { APMSpanBuilder parentBuilder = (APMSpanBuilder) ref.getReferredTo(); initTopLevelState(this, recorder, sampler); // Check for passed state if (parentBuild...
[ "protected", "void", "initFromExtractedTraceState", "(", "APMSpanBuilder", "builder", ",", "TraceRecorder", "recorder", ",", "Reference", "ref", ",", "ContextSampler", "sampler", ")", "{", "APMSpanBuilder", "parentBuilder", "=", "(", "APMSpanBuilder", ")", "ref", ".",...
This method initialises the span based on extracted trace state. @param builder The span builder @param recorder The trace recorder @param ref The reference @param sampler The sampler
[ "This", "method", "initialises", "the", "span", "based", "on", "extracted", "trace", "state", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/opentracing/src/main/java/io/opentracing/impl/APMSpan.java#L179-L196
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java
ManagedDatabasesInner.beginUpdate
public ManagedDatabaseInner beginUpdate(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { """ Updates an existing database. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Re...
java
public ManagedDatabaseInner beginUpdate(String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, parameters).toBlocking().single().body(); }
[ "public", "ManagedDatabaseInner", "beginUpdate", "(", "String", "resourceGroupName", ",", "String", "managedInstanceName", ",", "String", "databaseName", ",", "ManagedDatabaseUpdate", "parameters", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroup...
Updates an existing database. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managedInstanceName The name of the managed instance. @param databaseName The name of the database. @param parameters The...
[ "Updates", "an", "existing", "database", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabasesInner.java#L955-L957
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java
VirtualNetworksInner.beginUpdateTags
public VirtualNetworkInner beginUpdateTags(String resourceGroupName, String virtualNetworkName) { """ Updates a virtual network tags. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @throws IllegalArgumentException thrown if parameters fail t...
java
public VirtualNetworkInner beginUpdateTags(String resourceGroupName, String virtualNetworkName) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().single().body(); }
[ "public", "VirtualNetworkInner", "beginUpdateTags", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkName", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualNetworkName", ")", ".", "toBlocking", "(", ")",...
Updates a virtual network tags. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all o...
[ "Updates", "a", "virtual", "network", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java#L766-L768
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java
SheetResourcesImpl.sortSheet
public Sheet sortSheet(long sheetId, SortSpecifier sortSpecifier) throws SmartsheetException { """ Sort a sheet according to the sort criteria. It mirrors to the following Smartsheet REST API method: POST /sheet/{sheetId}/sort Exceptions: - IllegalArgumentException : if any argument is null - InvalidReques...
java
public Sheet sortSheet(long sheetId, SortSpecifier sortSpecifier) throws SmartsheetException { return this.sortSheet(sheetId, sortSpecifier, null); }
[ "public", "Sheet", "sortSheet", "(", "long", "sheetId", ",", "SortSpecifier", "sortSpecifier", ")", "throws", "SmartsheetException", "{", "return", "this", ".", "sortSheet", "(", "sheetId", ",", "sortSpecifier", ",", "null", ")", ";", "}" ]
Sort a sheet according to the sort criteria. It mirrors to the following Smartsheet REST API method: POST /sheet/{sheetId}/sort Exceptions: - IllegalArgumentException : if any argument is null - InvalidRequestException : if there is any problem with the REST API request - AuthorizationException : if there is any prob...
[ "Sort", "a", "sheet", "according", "to", "the", "sort", "criteria", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SheetResourcesImpl.java#L1138-L1140
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/cdn/CdnClient.java
CdnClient.setDomainCacheFullUrl
public void setDomainCacheFullUrl(String domain, boolean setting) { """ Update cache policy of specified domain acceleration. @param domain Name of the domain. @param setting For true, treat the full URL as unique cache id, otherwise ignore query string parameters. """ SetDomainCacheFullUrlRequest...
java
public void setDomainCacheFullUrl(String domain, boolean setting) { SetDomainCacheFullUrlRequest request = new SetDomainCacheFullUrlRequest() .withDomain(domain); request.setCacheFullUrl(setting); setDomainCacheFullUrl(request); }
[ "public", "void", "setDomainCacheFullUrl", "(", "String", "domain", ",", "boolean", "setting", ")", "{", "SetDomainCacheFullUrlRequest", "request", "=", "new", "SetDomainCacheFullUrlRequest", "(", ")", ".", "withDomain", "(", "domain", ")", ";", "request", ".", "s...
Update cache policy of specified domain acceleration. @param domain Name of the domain. @param setting For true, treat the full URL as unique cache id, otherwise ignore query string parameters.
[ "Update", "cache", "policy", "of", "specified", "domain", "acceleration", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/cdn/CdnClient.java#L371-L376
opengeospatial/teamengine
teamengine-core/src/main/java/com/occamlab/te/parsers/XMLValidatingParser.java
XMLValidatingParser.checkXMLRules
public boolean checkXMLRules(Document doc, Document instruction) throws Exception { """ A method to validate a pool of schemas outside of the request element. @param Document doc The file document to validate @param Document instruction The xml encapsulated schema information (file locations) @return f...
java
public boolean checkXMLRules(Document doc, Document instruction) throws Exception { if (doc == null || doc.getDocumentElement() == null) return false; Element e = instruction.getDocumentElement(); PrintWriter logger = new PrintWriter(System.out); Document parsedDoc = parse(doc, e, logger); retu...
[ "public", "boolean", "checkXMLRules", "(", "Document", "doc", ",", "Document", "instruction", ")", "throws", "Exception", "{", "if", "(", "doc", "==", "null", "||", "doc", ".", "getDocumentElement", "(", ")", "==", "null", ")", "return", "false", ";", "Ele...
A method to validate a pool of schemas outside of the request element. @param Document doc The file document to validate @param Document instruction The xml encapsulated schema information (file locations) @return false if there were errors, true if none.
[ "A", "method", "to", "validate", "a", "pool", "of", "schemas", "outside", "of", "the", "request", "element", "." ]
train
https://github.com/opengeospatial/teamengine/blob/b6b890214b6784bbe19460bf753bdf28a9514bee/teamengine-core/src/main/java/com/occamlab/te/parsers/XMLValidatingParser.java#L335-L344
mapcode-foundation/mapcode-java
src/main/java/com/mapcode/Mapcode.java
Mapcode.getCodeWithTerritoryFullname
@Nonnull public String getCodeWithTerritoryFullname(final int precision, @Nullable final Alphabet alphabet) throws IllegalArgumentException { """ Return the full international mapcode, including the full name of the territory and the mapcode code itself. The format of the string is: full-territory-name cde ...
java
@Nonnull public String getCodeWithTerritoryFullname(final int precision, @Nullable final Alphabet alphabet) throws IllegalArgumentException { return territory.getFullName() + ' ' + getCode(precision, alphabet); }
[ "@", "Nonnull", "public", "String", "getCodeWithTerritoryFullname", "(", "final", "int", "precision", ",", "@", "Nullable", "final", "Alphabet", "alphabet", ")", "throws", "IllegalArgumentException", "{", "return", "territory", ".", "getFullName", "(", ")", "+", "...
Return the full international mapcode, including the full name of the territory and the mapcode code itself. The format of the string is: full-territory-name cde Example: Netherlands 49.4V (regular code) Netherlands 49.4V-K2 (high precision code) @param precision Precision specifier. Range: [0, 8]. @...
[ "Return", "the", "full", "international", "mapcode", "including", "the", "full", "name", "of", "the", "territory", "and", "the", "mapcode", "code", "itself", ".", "The", "format", "of", "the", "string", "is", ":", "full", "-", "territory", "-", "name", "cd...
train
https://github.com/mapcode-foundation/mapcode-java/blob/f12d4d9fbd460472ac0fff1f702f2ac716bc0ab8/src/main/java/com/mapcode/Mapcode.java#L183-L186
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/searchindex/CmsDeleteFieldConfigurationDialog.java
CmsDeleteFieldConfigurationDialog.createDialogHtml
@Override protected String createDialogHtml(String dialog) { """ Creates the dialog HTML for all defined widgets of the named dialog (page).<p> This overwrites the method from the super class to create a layout variation for the widgets.<p> @param dialog the dialog (page) to get the HTML for @return the...
java
@Override protected String createDialogHtml(String dialog) { StringBuffer result = new StringBuffer(512); result.append(createWidgetTableStart()); // show error header once if there were validation errors result.append(createWidgetErrorHeader()); if (dialog.equals(PAGES[0]...
[ "@", "Override", "protected", "String", "createDialogHtml", "(", "String", "dialog", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "512", ")", ";", "result", ".", "append", "(", "createWidgetTableStart", "(", ")", ")", ";", "// show erro...
Creates the dialog HTML for all defined widgets of the named dialog (page).<p> This overwrites the method from the super class to create a layout variation for the widgets.<p> @param dialog the dialog (page) to get the HTML for @return the dialog HTML for all defined widgets of the named dialog (page)
[ "Creates", "the", "dialog", "HTML", "for", "all", "defined", "widgets", "of", "the", "named", "dialog", "(", "page", ")", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/searchindex/CmsDeleteFieldConfigurationDialog.java#L110-L136
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/GIntegralImageOps.java
GIntegralImageOps.block_zero
public static <T extends ImageGray<T>> double block_zero( T integral , int x0 , int y0 , int x1 , int y1 ) { """ <p> Computes the value of a block inside an integral image and treats pixels outside of the image as zero. The block is defined as follows: x0 &lt; x &le; x1 and y0 &lt; y &le; y1. </p> @param i...
java
public static <T extends ImageGray<T>> double block_zero( T integral , int x0 , int y0 , int x1 , int y1 ) { if( integral instanceof GrayF32) { return IntegralImageOps.block_zero((GrayF32)integral,x0,y0,x1,y1); } else if( integral instanceof GrayF64) { return IntegralImageOps.block_zero((GrayF64)integral,x0...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "double", "block_zero", "(", "T", "integral", ",", "int", "x0", ",", "int", "y0", ",", "int", "x1", ",", "int", "y1", ")", "{", "if", "(", "integral", "instanceof", "GrayF32", ...
<p> Computes the value of a block inside an integral image and treats pixels outside of the image as zero. The block is defined as follows: x0 &lt; x &le; x1 and y0 &lt; y &le; y1. </p> @param integral Integral image. @param x0 Lower bound of the block. Exclusive. @param y0 Lower bound of the block. Exclusive. @par...
[ "<p", ">", "Computes", "the", "value", "of", "a", "block", "inside", "an", "integral", "image", "and", "treats", "pixels", "outside", "of", "the", "image", "as", "zero", ".", "The", "block", "is", "defined", "as", "follows", ":", "x0", "&lt", ";", "x",...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/GIntegralImageOps.java#L162-L176
alkacon/opencms-core
src/org/opencms/acacia/shared/CmsEntity.java
CmsEntity.addAttributeValue
public void addAttributeValue(String attributeName, String value) { """ Adds the given attribute value.<p> @param attributeName the attribute name @param value the attribute value """ if (m_entityAttributes.containsKey(attributeName)) { throw new RuntimeException("Attribute already ...
java
public void addAttributeValue(String attributeName, String value) { if (m_entityAttributes.containsKey(attributeName)) { throw new RuntimeException("Attribute already exists with a entity type value."); } if (m_simpleAttributes.containsKey(attributeName)) { m_simpl...
[ "public", "void", "addAttributeValue", "(", "String", "attributeName", ",", "String", "value", ")", "{", "if", "(", "m_entityAttributes", ".", "containsKey", "(", "attributeName", ")", ")", "{", "throw", "new", "RuntimeException", "(", "\"Attribute already exists wi...
Adds the given attribute value.<p> @param attributeName the attribute name @param value the attribute value
[ "Adds", "the", "given", "attribute", "value", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/acacia/shared/CmsEntity.java#L248-L261
Waikato/moa
moa/src/main/java/moa/clusterers/clustream/WithKmeans.java
WithKmeans.kMeans_gta
public static Clustering kMeans_gta(int k, Clustering clustering, Clustering gtClustering) { """ k-means of (micro)clusters, with ground-truth-aided initialization. (to produce best results) @param k @param data @return (macro)clustering - CFClusters """ ArrayList<CFCluster> microclusters = new Arra...
java
public static Clustering kMeans_gta(int k, Clustering clustering, Clustering gtClustering) { ArrayList<CFCluster> microclusters = new ArrayList<CFCluster>(); for (int i = 0; i < clustering.size(); i++) { if (clustering.get(i) instanceof CFCluster) { microclusters.add((CFCluster)...
[ "public", "static", "Clustering", "kMeans_gta", "(", "int", "k", ",", "Clustering", "clustering", ",", "Clustering", "gtClustering", ")", "{", "ArrayList", "<", "CFCluster", ">", "microclusters", "=", "new", "ArrayList", "<", "CFCluster", ">", "(", ")", ";", ...
k-means of (micro)clusters, with ground-truth-aided initialization. (to produce best results) @param k @param data @return (macro)clustering - CFClusters
[ "k", "-", "means", "of", "(", "micro", ")", "clusters", "with", "ground", "-", "truth", "-", "aided", "initialization", ".", "(", "to", "produce", "best", "results", ")" ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/clusterers/clustream/WithKmeans.java#L233-L262
xwiki/xwiki-rendering
xwiki-rendering-transformations/xwiki-rendering-transformation-linkchecker/src/main/java/org/xwiki/rendering/internal/transformation/linkchecker/DefaultLinkCheckerThread.java
DefaultLinkCheckerThread.sendEvent
private void sendEvent(String url, Map<String, Object> data) { """ Send an {@link InvalidURLEvent} event. @param url the failing URL @param data the Map containing data (link url, link source reference, state object) """ // Dynamically look for an Observation Manager and only send the event if one ...
java
private void sendEvent(String url, Map<String, Object> data) { // Dynamically look for an Observation Manager and only send the event if one can be found. try { ObservationManager observationManager = this.observationManagerProvider.get(); observationManager.notify(new Invali...
[ "private", "void", "sendEvent", "(", "String", "url", ",", "Map", "<", "String", ",", "Object", ">", "data", ")", "{", "// Dynamically look for an Observation Manager and only send the event if one can be found.", "try", "{", "ObservationManager", "observationManager", "=",...
Send an {@link InvalidURLEvent} event. @param url the failing URL @param data the Map containing data (link url, link source reference, state object)
[ "Send", "an", "{", "@link", "InvalidURLEvent", "}", "event", "." ]
train
https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-transformations/xwiki-rendering-transformation-linkchecker/src/main/java/org/xwiki/rendering/internal/transformation/linkchecker/DefaultLinkCheckerThread.java#L227-L238
sevensource/html-email-service
src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java
DefaultEmailModel.toInternetAddress
private InternetAddress toInternetAddress(String address, String personal) throws AddressException { """ converts an email address and a name to an {@link InternetAddress} @param address a valid email address @param personal the real world name of the sender (can be null) @return the converted InternetAddress...
java
private InternetAddress toInternetAddress(String address, String personal) throws AddressException { if (logger.isDebugEnabled()) { logger.debug("Creating InternetAddress from address [{}] and personal [{}]", address, personal); } InternetAddress internetAddress; try { internetAddress = new InternetAdd...
[ "private", "InternetAddress", "toInternetAddress", "(", "String", "address", ",", "String", "personal", ")", "throws", "AddressException", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"Creating InternetAddress...
converts an email address and a name to an {@link InternetAddress} @param address a valid email address @param personal the real world name of the sender (can be null) @return the converted InternetAddress @throws AddressException in case of an invalid email address
[ "converts", "an", "email", "address", "and", "a", "name", "to", "an", "{", "@link", "InternetAddress", "}" ]
train
https://github.com/sevensource/html-email-service/blob/a55d9ef1a2173917cb5f870854bc24e5aaebd182/src/main/java/org/sevensource/commons/email/model/DefaultEmailModel.java#L163-L185
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UTF16.java
UTF16.lastIndexOf
public static int lastIndexOf(String source, String str) { """ Returns the index within the argument UTF16 format Unicode string of the last occurrence of the argument string str. This method is implemented based on codepoints, hence a "lead surrogate character + trail surrogate character" is treated as one enti...
java
public static int lastIndexOf(String source, String str) { int strLength = str.length(); // non-surrogate ends if (!isTrailSurrogate(str.charAt(0)) && !isLeadSurrogate(str.charAt(strLength - 1))) { return source.lastIndexOf(str); } int result = source.lastIndexOf(str...
[ "public", "static", "int", "lastIndexOf", "(", "String", "source", ",", "String", "str", ")", "{", "int", "strLength", "=", "str", ".", "length", "(", ")", ";", "// non-surrogate ends", "if", "(", "!", "isTrailSurrogate", "(", "str", ".", "charAt", "(", ...
Returns the index within the argument UTF16 format Unicode string of the last occurrence of the argument string str. This method is implemented based on codepoints, hence a "lead surrogate character + trail surrogate character" is treated as one entity.e Hence if the str starts with trail surrogate character at index 0...
[ "Returns", "the", "index", "within", "the", "argument", "UTF16", "format", "Unicode", "string", "of", "the", "last", "occurrence", "of", "the", "argument", "string", "str", ".", "This", "method", "is", "implemented", "based", "on", "codepoints", "hence", "a", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UTF16.java#L1728-L1749
tvesalainen/util
util/src/main/java/org/vesalainen/util/concurrent/CachedScheduledThreadPool.java
CachedScheduledThreadPool.submitAfter
public Future<?> submitAfter(Waiter waiter, Runnable runnable) { """ submits callable after waiting future to complete @param waiter @param runnable @return """ return submitAfter(waiter, runnable, Long.MAX_VALUE, TimeUnit.MILLISECONDS); }
java
public Future<?> submitAfter(Waiter waiter, Runnable runnable) { return submitAfter(waiter, runnable, Long.MAX_VALUE, TimeUnit.MILLISECONDS); }
[ "public", "Future", "<", "?", ">", "submitAfter", "(", "Waiter", "waiter", ",", "Runnable", "runnable", ")", "{", "return", "submitAfter", "(", "waiter", ",", "runnable", ",", "Long", ".", "MAX_VALUE", ",", "TimeUnit", ".", "MILLISECONDS", ")", ";", "}" ]
submits callable after waiting future to complete @param waiter @param runnable @return
[ "submits", "callable", "after", "waiting", "future", "to", "complete" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/concurrent/CachedScheduledThreadPool.java#L275-L278
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.setMetaClass
public static void setMetaClass(Object self, MetaClass metaClass) { """ Set the metaclass for an object. @param self the object whose metaclass we want to set @param metaClass the new metaclass value @since 1.6.0 """ if (metaClass instanceof HandleMetaClass) metaClass = ((HandleMetaClass...
java
public static void setMetaClass(Object self, MetaClass metaClass) { if (metaClass instanceof HandleMetaClass) metaClass = ((HandleMetaClass)metaClass).getAdaptee(); if (self instanceof Class) { GroovySystem.getMetaClassRegistry().setMetaClass((Class) self, metaClass); } ...
[ "public", "static", "void", "setMetaClass", "(", "Object", "self", ",", "MetaClass", "metaClass", ")", "{", "if", "(", "metaClass", "instanceof", "HandleMetaClass", ")", "metaClass", "=", "(", "(", "HandleMetaClass", ")", "metaClass", ")", ".", "getAdaptee", "...
Set the metaclass for an object. @param self the object whose metaclass we want to set @param metaClass the new metaclass value @since 1.6.0
[ "Set", "the", "metaclass", "for", "an", "object", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L17292-L17301
icode/ameba
src/main/java/ameba/db/ebean/internal/ModelInterceptor.java
ModelInterceptor.fetchRowCount
public static FutureRowCount fetchRowCount(MultivaluedMap<String, String> queryParams, Query query) { """ <p>fetchRowCount.</p> @param queryParams a {@link javax.ws.rs.core.MultivaluedMap} object. @param query a {@link io.ebean.Query} object. @return a {@link io.ebean.FutureRowCount} object. """ ...
java
public static FutureRowCount fetchRowCount(MultivaluedMap<String, String> queryParams, Query query) { String reqTotalCount = getSingleParam(queryParams.get(REQ_TOTAL_COUNT_PARAM_NAME)); if (reqTotalCount != null && !"false".equalsIgnoreCase(reqTotalCount) && !"0".equals(reqTotalCount)) { ret...
[ "public", "static", "FutureRowCount", "fetchRowCount", "(", "MultivaluedMap", "<", "String", ",", "String", ">", "queryParams", ",", "Query", "query", ")", "{", "String", "reqTotalCount", "=", "getSingleParam", "(", "queryParams", ".", "get", "(", "REQ_TOTAL_COUNT...
<p>fetchRowCount.</p> @param queryParams a {@link javax.ws.rs.core.MultivaluedMap} object. @param query a {@link io.ebean.Query} object. @return a {@link io.ebean.FutureRowCount} object.
[ "<p", ">", "fetchRowCount", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/db/ebean/internal/ModelInterceptor.java#L253-L259
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.signIn
@SuppressWarnings("unchecked") public User signIn(String provider, String providerToken, boolean rememberJWT) { """ Takes an identity provider access token and fetches the user data from that provider. A new {@link User} object is created if that user doesn't exist. Access tokens are returned upon successful a...
java
@SuppressWarnings("unchecked") public User signIn(String provider, String providerToken, boolean rememberJWT) { if (!StringUtils.isBlank(provider) && !StringUtils.isBlank(providerToken)) { Map<String, String> credentials = new HashMap<>(); credentials.put(Config._APPID, accessKey); credentials.put("provider...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "User", "signIn", "(", "String", "provider", ",", "String", "providerToken", ",", "boolean", "rememberJWT", ")", "{", "if", "(", "!", "StringUtils", ".", "isBlank", "(", "provider", ")", "&&", "!"...
Takes an identity provider access token and fetches the user data from that provider. A new {@link User} object is created if that user doesn't exist. Access tokens are returned upon successful authentication using one of the SDKs from Facebook, Google, Twitter, etc. <b>Note:</b> Twitter uses OAuth 1 and gives you a t...
[ "Takes", "an", "identity", "provider", "access", "token", "and", "fetches", "the", "user", "data", "from", "that", "provider", ".", "A", "new", "{" ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L1575-L1598
Ordinastie/MalisisCore
src/main/java/net/malisis/core/asm/AsmUtils.java
AsmUtils.ldcInsnEqual
public static boolean ldcInsnEqual(LdcInsnNode insn1, LdcInsnNode insn2) { """ Checks if two {@link LdcInsnNode} are equals. @param insn1 the insn1 @param insn2 the insn2 @return true, if successful """ if (insn1.cst.equals("~") || insn2.cst.equals("~")) return true; return insn1.cst.equals(insn2....
java
public static boolean ldcInsnEqual(LdcInsnNode insn1, LdcInsnNode insn2) { if (insn1.cst.equals("~") || insn2.cst.equals("~")) return true; return insn1.cst.equals(insn2.cst); }
[ "public", "static", "boolean", "ldcInsnEqual", "(", "LdcInsnNode", "insn1", ",", "LdcInsnNode", "insn2", ")", "{", "if", "(", "insn1", ".", "cst", ".", "equals", "(", "\"~\"", ")", "||", "insn2", ".", "cst", ".", "equals", "(", "\"~\"", ")", ")", "retu...
Checks if two {@link LdcInsnNode} are equals. @param insn1 the insn1 @param insn2 the insn2 @return true, if successful
[ "Checks", "if", "two", "{", "@link", "LdcInsnNode", "}", "are", "equals", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/asm/AsmUtils.java#L219-L225
vnesek/nmote-iim4j
src/main/java/com/nmote/iim4j/IIMFile.java
IIMFile.addDateTimeHelper
public void addDateTimeHelper(int ds, Date date) throws SerializationException, InvalidDataSetException { """ Adds a data set with date-time value to IIM file. @param ds data set id (see constants in IIM class) @param date date to set. Null values are silently ignored. @throws SerializationException if val...
java
public void addDateTimeHelper(int ds, Date date) throws SerializationException, InvalidDataSetException { if (date == null) { return; } DataSetInfo dsi = dsiFactory.create(ds); SimpleDateFormat df = new SimpleDateFormat(dsi.getSerializer().toString()); String value = df.format(date); byte[] da...
[ "public", "void", "addDateTimeHelper", "(", "int", "ds", ",", "Date", "date", ")", "throws", "SerializationException", ",", "InvalidDataSetException", "{", "if", "(", "date", "==", "null", ")", "{", "return", ";", "}", "DataSetInfo", "dsi", "=", "dsiFactory", ...
Adds a data set with date-time value to IIM file. @param ds data set id (see constants in IIM class) @param date date to set. Null values are silently ignored. @throws SerializationException if value can't be serialized by data set's serializer @throws InvalidDataSetException if data set isn't defined
[ "Adds", "a", "data", "set", "with", "date", "-", "time", "value", "to", "IIM", "file", "." ]
train
https://github.com/vnesek/nmote-iim4j/blob/ec55b02fc644cd722e93051ac0bdb96b00cb42a8/src/main/java/com/nmote/iim4j/IIMFile.java#L102-L114
Wikidata/Wikidata-Toolkit
wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/StatementUpdate.java
StatementUpdate.mergeStatements
private Statement mergeStatements(Statement statement1, Statement statement2) { """ Returns a statement obtained by merging two given statements, if possible, or null if the statements cannot be merged. Statements are merged if they contain the same claim, but possibly with qualifiers in a different order. The ...
java
private Statement mergeStatements(Statement statement1, Statement statement2) { if (!equivalentClaims(statement1.getClaim(), statement2.getClaim())) { return null; } StatementRank newRank = statement1.getRank(); if (newRank == StatementRank.NORMAL) { newRank = statement2.getRank(); } else if (statement...
[ "private", "Statement", "mergeStatements", "(", "Statement", "statement1", ",", "Statement", "statement2", ")", "{", "if", "(", "!", "equivalentClaims", "(", "statement1", ".", "getClaim", "(", ")", ",", "statement2", ".", "getClaim", "(", ")", ")", ")", "{"...
Returns a statement obtained by merging two given statements, if possible, or null if the statements cannot be merged. Statements are merged if they contain the same claim, but possibly with qualifiers in a different order. The statements may have different ids, ranks, and references. References will be merged. Differe...
[ "Returns", "a", "statement", "obtained", "by", "merging", "two", "given", "statements", "if", "possible", "or", "null", "if", "the", "statements", "cannot", "be", "merged", ".", "Statements", "are", "merged", "if", "they", "contain", "the", "same", "claim", ...
train
https://github.com/Wikidata/Wikidata-Toolkit/blob/7732851dda47e1febff406fba27bfec023f4786e/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/StatementUpdate.java#L471-L494
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ClusterHeartbeatManager.java
ClusterHeartbeatManager.pingMemberIfRequired
private void pingMemberIfRequired(long now, Member member) { """ Pings the {@code member} if {@link GroupProperty#ICMP_ENABLED} is true and more than {@link #HEART_BEAT_INTERVAL_FACTOR} heartbeats have passed. """ if (!icmpEnabled || icmpParallelMode) { return; } long last...
java
private void pingMemberIfRequired(long now, Member member) { if (!icmpEnabled || icmpParallelMode) { return; } long lastHeartbeat = heartbeatFailureDetector.lastHeartbeat(member); if ((now - lastHeartbeat) >= legacyIcmpCheckThresholdMillis) { runPingTask(member);...
[ "private", "void", "pingMemberIfRequired", "(", "long", "now", ",", "Member", "member", ")", "{", "if", "(", "!", "icmpEnabled", "||", "icmpParallelMode", ")", "{", "return", ";", "}", "long", "lastHeartbeat", "=", "heartbeatFailureDetector", ".", "lastHeartbeat...
Pings the {@code member} if {@link GroupProperty#ICMP_ENABLED} is true and more than {@link #HEART_BEAT_INTERVAL_FACTOR} heartbeats have passed.
[ "Pings", "the", "{" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ClusterHeartbeatManager.java#L576-L585
ManuelPeinado/MultiChoiceAdapter
samples/actionbarsherlock/src/com/tjeannin/provigen/ProviGenProvider.java
ProviGenProvider.createTable
@SuppressWarnings("rawtypes") public void createTable(SQLiteDatabase database, Class contractClass) { """ Creates a table in the database for the specified {@link Contract}.<br/> This may be used if you're <b>not</b> calling {@code super.onCreateDatabase(database)}. @param database The database. @param contra...
java
@SuppressWarnings("rawtypes") public void createTable(SQLiteDatabase database, Class contractClass) { try { openHelper.createTable(database, new ContractHolder(contractClass)); } catch (InvalidContractException exception) { exception.printStackTrace(); } }
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "void", "createTable", "(", "SQLiteDatabase", "database", ",", "Class", "contractClass", ")", "{", "try", "{", "openHelper", ".", "createTable", "(", "database", ",", "new", "ContractHolder", "(", "con...
Creates a table in the database for the specified {@link Contract}.<br/> This may be used if you're <b>not</b> calling {@code super.onCreateDatabase(database)}. @param database The database. @param contractClass A {@link Contract} class to create the table with.
[ "Creates", "a", "table", "in", "the", "database", "for", "the", "specified", "{" ]
train
https://github.com/ManuelPeinado/MultiChoiceAdapter/blob/c733879f93b67ecf920f80bf7971af38d7212c9b/samples/actionbarsherlock/src/com/tjeannin/provigen/ProviGenProvider.java#L107-L114
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionManipulator.java
ReactionManipulator.getMappedChemObject
public static IChemObject getMappedChemObject(IReaction reaction, IChemObject chemObject) { """ get the IAtom which is mapped @param reaction The IReaction which contains the mapping @param chemObject The IChemObject which will be searched its mapped IChemObject @return The mapped IChemObject ...
java
public static IChemObject getMappedChemObject(IReaction reaction, IChemObject chemObject) { for (IMapping mapping : reaction.mappings()) { if (mapping.getChemObject(0).equals(chemObject)) { return mapping.getChemObject(1); } else if (mapping.getChemObject(1).equals(chemOb...
[ "public", "static", "IChemObject", "getMappedChemObject", "(", "IReaction", "reaction", ",", "IChemObject", "chemObject", ")", "{", "for", "(", "IMapping", "mapping", ":", "reaction", ".", "mappings", "(", ")", ")", "{", "if", "(", "mapping", ".", "getChemObje...
get the IAtom which is mapped @param reaction The IReaction which contains the mapping @param chemObject The IChemObject which will be searched its mapped IChemObject @return The mapped IChemObject
[ "get", "the", "IAtom", "which", "is", "mapped" ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionManipulator.java#L297-L304
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java
RuntimeExceptionsFactory.newTypeNotPresentException
public static TypeNotPresentException newTypeNotPresentException(String message, Object... args) { """ Constructs and initializes a new {@link TypeNotPresentException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link ...
java
public static TypeNotPresentException newTypeNotPresentException(String message, Object... args) { return newTypeNotPresentException(null, message, args); }
[ "public", "static", "TypeNotPresentException", "newTypeNotPresentException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newTypeNotPresentException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link TypeNotPresentException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link TypeNotPresentException exception}. @param args {@link Object[] arguments} used to replace format placeholders ...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "TypeNotPresentException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java#L225-L227
mailin-api/sendinblue-java-mvn
src/main/java/com/sendinblue/Sendinblue.java
Sendinblue.get_user
public String get_user(Map<String, String> data) { """ /* Get Access a specific user Information. @param {Object} data contains json objects as a key value pair from HashMap. @options data {String} email: Email address of the already existing user in the SendinBlue contacts [Mandatory] """ String id...
java
public String get_user(Map<String, String> data) { String id = data.get("email"); return get("user/" + id, EMPTY_STRING); }
[ "public", "String", "get_user", "(", "Map", "<", "String", ",", "String", ">", "data", ")", "{", "String", "id", "=", "data", ".", "get", "(", "\"email\"", ")", ";", "return", "get", "(", "\"user/\"", "+", "id", ",", "EMPTY_STRING", ")", ";", "}" ]
/* Get Access a specific user Information. @param {Object} data contains json objects as a key value pair from HashMap. @options data {String} email: Email address of the already existing user in the SendinBlue contacts [Mandatory]
[ "/", "*", "Get", "Access", "a", "specific", "user", "Information", "." ]
train
https://github.com/mailin-api/sendinblue-java-mvn/blob/3a186b004003450f18d619aa084adc8d75086183/src/main/java/com/sendinblue/Sendinblue.java#L796-L799
netplex/json-smart-v2
json-smart/src/main/java/net/minidev/json/JSONValue.java
JSONValue.toJSONString
public static String toJSONString(Object value, JSONStyle compression) { """ Convert an object to JSON text. <p> If this object is a Map or a List, and it's also a JSONAware, JSONAware will be considered firstly. <p> DO NOT call this method from toJSONString() of a class that implements both JSONAware and Ma...
java
public static String toJSONString(Object value, JSONStyle compression) { StringBuilder sb = new StringBuilder(); try { writeJSONString(value, sb, compression); } catch (IOException e) { // can not append on a StringBuilder } return sb.toString(); }
[ "public", "static", "String", "toJSONString", "(", "Object", "value", ",", "JSONStyle", "compression", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "try", "{", "writeJSONString", "(", "value", ",", "sb", ",", "compression", ")...
Convert an object to JSON text. <p> If this object is a Map or a List, and it's also a JSONAware, JSONAware will be considered firstly. <p> DO NOT call this method from toJSONString() of a class that implements both JSONAware and Map or List with "this" as the parameter, use JSONObject.toJSONString(Map) or JSONArray.to...
[ "Convert", "an", "object", "to", "JSON", "text", ".", "<p", ">", "If", "this", "object", "is", "a", "Map", "or", "a", "List", "and", "it", "s", "also", "a", "JSONAware", "JSONAware", "will", "be", "considered", "firstly", ".", "<p", ">", "DO", "NOT",...
train
https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/JSONValue.java#L619-L627
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/TransactionInput.java
TransactionInput.getConnectedOutput
@Nullable TransactionOutput getConnectedOutput(Map<Sha256Hash, Transaction> transactions) { """ Locates the referenced output from the given pool of transactions. @return The TransactionOutput or null if the transactions map doesn't contain the referenced tx. """ Transaction tx = transactions.ge...
java
@Nullable TransactionOutput getConnectedOutput(Map<Sha256Hash, Transaction> transactions) { Transaction tx = transactions.get(outpoint.getHash()); if (tx == null) return null; return tx.getOutputs().get((int) outpoint.getIndex()); }
[ "@", "Nullable", "TransactionOutput", "getConnectedOutput", "(", "Map", "<", "Sha256Hash", ",", "Transaction", ">", "transactions", ")", "{", "Transaction", "tx", "=", "transactions", ".", "get", "(", "outpoint", ".", "getHash", "(", ")", ")", ";", "if", "("...
Locates the referenced output from the given pool of transactions. @return The TransactionOutput or null if the transactions map doesn't contain the referenced tx.
[ "Locates", "the", "referenced", "output", "from", "the", "given", "pool", "of", "transactions", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/TransactionInput.java#L319-L325
joniles/mpxj
src/main/java/net/sf/mpxj/Task.java
Task.setDuration
public void setDuration(int index, Duration value) { """ Set a duration value. @param index duration index (1-10) @param value duration value """ set(selectField(TaskFieldLists.CUSTOM_DURATION, index), value); }
java
public void setDuration(int index, Duration value) { set(selectField(TaskFieldLists.CUSTOM_DURATION, index), value); }
[ "public", "void", "setDuration", "(", "int", "index", ",", "Duration", "value", ")", "{", "set", "(", "selectField", "(", "TaskFieldLists", ".", "CUSTOM_DURATION", ",", "index", ")", ",", "value", ")", ";", "}" ]
Set a duration value. @param index duration index (1-10) @param value duration value
[ "Set", "a", "duration", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L1954-L1957
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/spargel/ScatterGatherConfiguration.java
ScatterGatherConfiguration.addBroadcastSetForGatherFunction
public void addBroadcastSetForGatherFunction(String name, DataSet<?> data) { """ Adds a data set as a broadcast set to the gather function. @param name The name under which the broadcast data is available in the gather function. @param data The data set to be broadcast. """ this.bcVarsGather.add(new Tupl...
java
public void addBroadcastSetForGatherFunction(String name, DataSet<?> data) { this.bcVarsGather.add(new Tuple2<>(name, data)); }
[ "public", "void", "addBroadcastSetForGatherFunction", "(", "String", "name", ",", "DataSet", "<", "?", ">", "data", ")", "{", "this", ".", "bcVarsGather", ".", "add", "(", "new", "Tuple2", "<>", "(", "name", ",", "data", ")", ")", ";", "}" ]
Adds a data set as a broadcast set to the gather function. @param name The name under which the broadcast data is available in the gather function. @param data The data set to be broadcast.
[ "Adds", "a", "data", "set", "as", "a", "broadcast", "set", "to", "the", "gather", "function", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/spargel/ScatterGatherConfiguration.java#L71-L73
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/TypeHandler.java
TypeHandler.createValue
public static Object createValue(String str, Object obj) throws ParseException { """ Returns the <code>Object</code> of type <code>obj</code> with the value of <code>str</code>. @param str the command line value @param obj the type of argument @return The instance of <code>obj</code> initialised with the va...
java
public static Object createValue(String str, Object obj) throws ParseException { return createValue(str, (Class<?>) obj); }
[ "public", "static", "Object", "createValue", "(", "String", "str", ",", "Object", "obj", ")", "throws", "ParseException", "{", "return", "createValue", "(", "str", ",", "(", "Class", "<", "?", ">", ")", "obj", ")", ";", "}" ]
Returns the <code>Object</code> of type <code>obj</code> with the value of <code>str</code>. @param str the command line value @param obj the type of argument @return The instance of <code>obj</code> initialised with the value of <code>str</code>. @throws ParseException if the value creation for the given object type ...
[ "Returns", "the", "<code", ">", "Object<", "/", "code", ">", "of", "type", "<code", ">", "obj<", "/", "code", ">", "with", "the", "value", "of", "<code", ">", "str<", "/", "code", ">", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/TypeHandler.java#L47-L50
Hygieia/Hygieia
collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java
DefaultJiraClient.processSprintData
protected void processSprintData(Feature feature, Sprint sprint) { """ Process Sprint data for a feature, updating the passed in feature @param feature @param sprint """ // sSprintChangeDate - does not exist in Jira feature.setsSprintChangeDate(""); // sSprintIsDeleted - does not e...
java
protected void processSprintData(Feature feature, Sprint sprint) { // sSprintChangeDate - does not exist in Jira feature.setsSprintChangeDate(""); // sSprintIsDeleted - does not exist in Jira feature.setsSprintIsDeleted("False"); feature.setsSprintID(sprint.getId()); fe...
[ "protected", "void", "processSprintData", "(", "Feature", "feature", ",", "Sprint", "sprint", ")", "{", "// sSprintChangeDate - does not exist in Jira", "feature", ".", "setsSprintChangeDate", "(", "\"\"", ")", ";", "// sSprintIsDeleted - does not exist in Jira", "feature", ...
Process Sprint data for a feature, updating the passed in feature @param feature @param sprint
[ "Process", "Sprint", "data", "for", "a", "feature", "updating", "the", "passed", "in", "feature" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java#L574-L593
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenuRenderer.java
SelectOneMenuRenderer.startColSpanDiv
protected String startColSpanDiv(ResponseWriter rw, SelectOneMenu menu, String clientId) throws IOException { """ Start the column span div (if there's one). This method is protected in order to allow third-party frameworks to derive from it. @param rw the response writer @throws IOException may be thrown b...
java
protected String startColSpanDiv(ResponseWriter rw, SelectOneMenu menu, String clientId) throws IOException { String clazz = Responsive.getResponsiveStyleClass(menu, false); if (clazz != null && clazz.trim().length() > 0) { clazz = clazz.trim(); rw.startElement("div", menu); rw.writeAttribute("class", claz...
[ "protected", "String", "startColSpanDiv", "(", "ResponseWriter", "rw", ",", "SelectOneMenu", "menu", ",", "String", "clientId", ")", "throws", "IOException", "{", "String", "clazz", "=", "Responsive", ".", "getResponsiveStyleClass", "(", "menu", ",", "false", ")",...
Start the column span div (if there's one). This method is protected in order to allow third-party frameworks to derive from it. @param rw the response writer @throws IOException may be thrown by the response writer
[ "Start", "the", "column", "span", "div", "(", "if", "there", "s", "one", ")", ".", "This", "method", "is", "protected", "in", "order", "to", "allow", "third", "-", "party", "frameworks", "to", "derive", "from", "it", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/selectOneMenu/SelectOneMenuRenderer.java#L613-L624
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/mapreduce/aggregation/Aggregations.java
Aggregations.doubleSum
public static <Key, Value> Aggregation<Key, Double, Double> doubleSum() { """ Returns an aggregation to calculate the double sum of all supplied values.<br/> This aggregation is similar to: <pre>SELECT SUM(value) FROM x</pre> @param <Key> the input key type @param <Value> the supplied value type @return th...
java
public static <Key, Value> Aggregation<Key, Double, Double> doubleSum() { return new AggregationAdapter(new DoubleSumAggregation<Key, Value>()); }
[ "public", "static", "<", "Key", ",", "Value", ">", "Aggregation", "<", "Key", ",", "Double", ",", "Double", ">", "doubleSum", "(", ")", "{", "return", "new", "AggregationAdapter", "(", "new", "DoubleSumAggregation", "<", "Key", ",", "Value", ">", "(", ")...
Returns an aggregation to calculate the double sum of all supplied values.<br/> This aggregation is similar to: <pre>SELECT SUM(value) FROM x</pre> @param <Key> the input key type @param <Value> the supplied value type @return the sum over all supplied values
[ "Returns", "an", "aggregation", "to", "calculate", "the", "double", "sum", "of", "all", "supplied", "values", ".", "<br", "/", ">", "This", "aggregation", "is", "similar", "to", ":", "<pre", ">", "SELECT", "SUM", "(", "value", ")", "FROM", "x<", "/", "...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/mapreduce/aggregation/Aggregations.java#L210-L212
apache/groovy
subprojects/groovy-json/src/main/java/groovy/json/StringEscapeUtils.java
StringEscapeUtils.escapeJava
public static void escapeJava(Writer out, String str) throws IOException { """ Escapes the characters in a <code>String</code> using Java String rules to a <code>Writer</code>. <p> A <code>null</code> string input has no effect. @see #escapeJava(java.lang.String) @param out Writer to write escaped string i...
java
public static void escapeJava(Writer out, String str) throws IOException { escapeJavaStyleString(out, str, false, false); }
[ "public", "static", "void", "escapeJava", "(", "Writer", "out", ",", "String", "str", ")", "throws", "IOException", "{", "escapeJavaStyleString", "(", "out", ",", "str", ",", "false", ",", "false", ")", ";", "}" ]
Escapes the characters in a <code>String</code> using Java String rules to a <code>Writer</code>. <p> A <code>null</code> string input has no effect. @see #escapeJava(java.lang.String) @param out Writer to write escaped string into @param str String to escape values in, may be null @throws IllegalArgumentException i...
[ "Escapes", "the", "characters", "in", "a", "<code", ">", "String<", "/", "code", ">", "using", "Java", "String", "rules", "to", "a", "<code", ">", "Writer<", "/", "code", ">", ".", "<p", ">", "A", "<code", ">", "null<", "/", "code", ">", "string", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-json/src/main/java/groovy/json/StringEscapeUtils.java#L100-L102
thinkaurelius/titan
titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/configuration/backend/KCVSConfiguration.java
KCVSConfiguration.get
@Override public <O> O get(final String key, final Class<O> datatype) { """ Reads the configuration property for this StoreManager @param key Key identifying the configuration property @return Value stored for the key or null if the configuration property has not (yet) been defined. @throws com.thinkaurel...
java
@Override public <O> O get(final String key, final Class<O> datatype) { StaticBuffer column = string2StaticBuffer(key); final KeySliceQuery query = new KeySliceQuery(rowKey,column, BufferUtil.nextBiggerBuffer(column)); StaticBuffer result = BackendOperation.execute(new BackendOperation.Trans...
[ "@", "Override", "public", "<", "O", ">", "O", "get", "(", "final", "String", "key", ",", "final", "Class", "<", "O", ">", "datatype", ")", "{", "StaticBuffer", "column", "=", "string2StaticBuffer", "(", "key", ")", ";", "final", "KeySliceQuery", "query"...
Reads the configuration property for this StoreManager @param key Key identifying the configuration property @return Value stored for the key or null if the configuration property has not (yet) been defined. @throws com.thinkaurelius.titan.diskstorage.BackendException
[ "Reads", "the", "configuration", "property", "for", "this", "StoreManager" ]
train
https://github.com/thinkaurelius/titan/blob/ee226e52415b8bf43b700afac75fa5b9767993a5/titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/configuration/backend/KCVSConfiguration.java#L84-L103
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java
SegmentAggregator.getFlushArgs
private FlushArgs getFlushArgs() throws DataCorruptionException { """ Returns a FlushArgs which contains the data needing to be flushed to Storage. @return The aggregated object that can be used for flushing. @throws DataCorruptionException If a unable to retrieve required data from the Data Source. """ ...
java
private FlushArgs getFlushArgs() throws DataCorruptionException { StorageOperation first = this.operations.getFirst(); if (!(first instanceof AggregatedAppendOperation)) { // Nothing to flush - first operation is not an AggregatedAppend. return new FlushArgs(null, 0, Collections....
[ "private", "FlushArgs", "getFlushArgs", "(", ")", "throws", "DataCorruptionException", "{", "StorageOperation", "first", "=", "this", ".", "operations", ".", "getFirst", "(", ")", ";", "if", "(", "!", "(", "first", "instanceof", "AggregatedAppendOperation", ")", ...
Returns a FlushArgs which contains the data needing to be flushed to Storage. @return The aggregated object that can be used for flushing. @throws DataCorruptionException If a unable to retrieve required data from the Data Source.
[ "Returns", "a", "FlushArgs", "which", "contains", "the", "data", "needing", "to", "be", "flushed", "to", "Storage", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java#L809-L837
SeaCloudsEU/SeaCloudsPlatform
planner/aamwriter/src/main/java/eu/seaclouds/platform/planner/aamwriter/modelaam/NodeTemplate.java
NodeTemplate.addConnectionRequirement
public String addConnectionRequirement(NodeTemplate target, String type, String varName) { """ Add an endpoint requirement to a NodeTemplate @return name given to the requirement """ Map<String, Object> requirement = new LinkedHashMap(); String requirementName = "endpoint"; ...
java
public String addConnectionRequirement(NodeTemplate target, String type, String varName) { Map<String, Object> requirement = new LinkedHashMap(); String requirementName = "endpoint"; Map requirementMap = new LinkedHashMap<String, Object>(); requirement.put(requirementName, ...
[ "public", "String", "addConnectionRequirement", "(", "NodeTemplate", "target", ",", "String", "type", ",", "String", "varName", ")", "{", "Map", "<", "String", ",", "Object", ">", "requirement", "=", "new", "LinkedHashMap", "(", ")", ";", "String", "requiremen...
Add an endpoint requirement to a NodeTemplate @return name given to the requirement
[ "Add", "an", "endpoint", "requirement", "to", "a", "NodeTemplate" ]
train
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/aamwriter/src/main/java/eu/seaclouds/platform/planner/aamwriter/modelaam/NodeTemplate.java#L98-L114
mapsforge/mapsforge
mapsforge-map/src/main/java/org/mapsforge/map/datastore/MapDataStore.java
MapDataStore.readPoiData
public MapReadResult readPoiData(Tile upperLeft, Tile lowerRight) { """ Reads POI data for an area defined by the tile in the upper left and the tile in the lower right corner. The default implementation combines the results from all tiles, a possibly inefficient solution. Precondition: upperLeft.tileX <= lower...
java
public MapReadResult readPoiData(Tile upperLeft, Tile lowerRight) { if (upperLeft.tileX > lowerRight.tileX || upperLeft.tileY > lowerRight.tileY) { new IllegalArgumentException("upperLeft tile must be above and left of lowerRight tile"); } MapReadResult result = new MapReadResult(); ...
[ "public", "MapReadResult", "readPoiData", "(", "Tile", "upperLeft", ",", "Tile", "lowerRight", ")", "{", "if", "(", "upperLeft", ".", "tileX", ">", "lowerRight", ".", "tileX", "||", "upperLeft", ".", "tileY", ">", "lowerRight", ".", "tileY", ")", "{", "new...
Reads POI data for an area defined by the tile in the upper left and the tile in the lower right corner. The default implementation combines the results from all tiles, a possibly inefficient solution. Precondition: upperLeft.tileX <= lowerRight.tileX && upperLeft.tileY <= lowerRight.tileY @param upperLeft tile that ...
[ "Reads", "POI", "data", "for", "an", "area", "defined", "by", "the", "tile", "in", "the", "upper", "left", "and", "the", "tile", "in", "the", "lower", "right", "corner", ".", "The", "default", "implementation", "combines", "the", "results", "from", "all", ...
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map/src/main/java/org/mapsforge/map/datastore/MapDataStore.java#L206-L218
xiancloud/xian
xian-log/xian-gelf-common/src/main/java/biz/paluch/logging/StackTraceFilter.java
StackTraceFilter.getFilteredStackTrace
public static String getFilteredStackTrace(Throwable t, int ref) { """ Filter stack trace by selecting the {@link Throwable} using a reference position. Intermediate throwables will be printed with just their header. @param t the throwable @param ref throwable reference position, see {@link #getThrowable(List...
java
public static String getFilteredStackTrace(Throwable t, int ref) { StringWriter sw = new StringWriter(); FilterWriter filterWriter = new StackTraceFilterWriter(sw); printStackTrace(t, filterWriter, ref); return sw.getBuffer().toString(); }
[ "public", "static", "String", "getFilteredStackTrace", "(", "Throwable", "t", ",", "int", "ref", ")", "{", "StringWriter", "sw", "=", "new", "StringWriter", "(", ")", ";", "FilterWriter", "filterWriter", "=", "new", "StackTraceFilterWriter", "(", "sw", ")", ";...
Filter stack trace by selecting the {@link Throwable} using a reference position. Intermediate throwables will be printed with just their header. @param t the throwable @param ref throwable reference position, see {@link #getThrowable(List, int)}. @return String containing the stack trace. @since 1.11.1
[ "Filter", "stack", "trace", "by", "selecting", "the", "{", "@link", "Throwable", "}", "using", "a", "reference", "position", ".", "Intermediate", "throwables", "will", "be", "printed", "with", "just", "their", "header", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-log/xian-gelf-common/src/main/java/biz/paluch/logging/StackTraceFilter.java#L247-L255
r0adkll/PostOffice
library/src/main/java/com/r0adkll/postoffice/PostOffice.java
PostOffice.newEditTextMail
public static Delivery newEditTextMail(@NotNull Context ctx, CharSequence title, CharSequence hint, int inputType, EditTextStyle.OnTextAcceptedListener listener) { """ Create a new EditText Dialog 'Mail' Delivery to display - This creates a dialog with 2 buttons and an EditText field for the content and retrieve...
java
public static Delivery newEditTextMail(@NotNull Context ctx, CharSequence title, CharSequence hint, int inputType, EditTextStyle.OnTextAcceptedListener listener){ // Create the delivery Delivery.Builder builder = newMail(ctx) .setTitle(title) .setStyle(new EditTextStyle.B...
[ "public", "static", "Delivery", "newEditTextMail", "(", "@", "NotNull", "Context", "ctx", ",", "CharSequence", "title", ",", "CharSequence", "hint", ",", "int", "inputType", ",", "EditTextStyle", ".", "OnTextAcceptedListener", "listener", ")", "{", "// Create the de...
Create a new EditText Dialog 'Mail' Delivery to display - This creates a dialog with 2 buttons and an EditText field for the content and retrieves text input from your user @param ctx the application context @param title the dialog title @param hint the EditText hint text @param inputType ...
[ "Create", "a", "new", "EditText", "Dialog", "Mail", "Delivery", "to", "display", "-", "This", "creates", "a", "dialog", "with", "2", "buttons", "and", "an", "EditText", "field", "for", "the", "content", "and", "retrieves", "text", "input", "from", "your", ...
train
https://github.com/r0adkll/PostOffice/blob/f98e365fd66c004ccce64ee87d9f471b97e4e3c2/library/src/main/java/com/r0adkll/postoffice/PostOffice.java#L317-L329
PureSolTechnologies/genesis
commons.cassandra/src/main/java/com/puresoltechnologies/genesis/commons/cassandra/CassandraUtils.java
CassandraUtils.connectCluster
public static Cluster connectCluster(String host, int port) { """ Connects to the specified host and port. @param host is the host name to connect to. @param port if the port to connect to. @return A {@link Cluster} object is returned. """ Builder clusterBuilder = Cluster.builder(); // Socket Options ...
java
public static Cluster connectCluster(String host, int port) { Builder clusterBuilder = Cluster.builder(); // Socket Options SocketOptions socketOptions = new SocketOptions(); socketOptions.setConnectTimeoutMillis(60000); socketOptions.setKeepAlive(true); socketOptions.setReadTimeoutMillis(30000); return clusterB...
[ "public", "static", "Cluster", "connectCluster", "(", "String", "host", ",", "int", "port", ")", "{", "Builder", "clusterBuilder", "=", "Cluster", ".", "builder", "(", ")", ";", "// Socket Options", "SocketOptions", "socketOptions", "=", "new", "SocketOptions", ...
Connects to the specified host and port. @param host is the host name to connect to. @param port if the port to connect to. @return A {@link Cluster} object is returned.
[ "Connects", "to", "the", "specified", "host", "and", "port", "." ]
train
https://github.com/PureSolTechnologies/genesis/blob/1031027c5edcfeaad670896802058f78a2f7b159/commons.cassandra/src/main/java/com/puresoltechnologies/genesis/commons/cassandra/CassandraUtils.java#L50-L59
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bos/BosClient.java
BosClient.assertStringNotNullOrEmpty
private void assertStringNotNullOrEmpty(String parameterValue, String errorMessage) { """ Asserts that the specified parameter value is not <code>null</code> or <code>empty</code> and if it is, throws an <code>IllegalArgumentException</code> with the specified error message. @param parameterValue The parameter...
java
private void assertStringNotNullOrEmpty(String parameterValue, String errorMessage) { if (parameterValue == null) { throw new IllegalArgumentException(errorMessage); } if (parameterValue.isEmpty()) { throw new IllegalArgumentException(errorMessage); } }
[ "private", "void", "assertStringNotNullOrEmpty", "(", "String", "parameterValue", ",", "String", "errorMessage", ")", "{", "if", "(", "parameterValue", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "errorMessage", ")", ";", "}", "if", ...
Asserts that the specified parameter value is not <code>null</code> or <code>empty</code> and if it is, throws an <code>IllegalArgumentException</code> with the specified error message. @param parameterValue The parameter value being checked. @param errorMessage The error message to include in the IllegalArgumentExcep...
[ "Asserts", "that", "the", "specified", "parameter", "value", "is", "not", "<code", ">", "null<", "/", "code", ">", "or", "<code", ">", "empty<", "/", "code", ">", "and", "if", "it", "is", "throws", "an", "<code", ">", "IllegalArgumentException<", "/", "c...
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bos/BosClient.java#L1569-L1576
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/extensions/ExpressionVisitor.java
ExpressionVisitor.visitFunction
public boolean visitFunction(ExpressionOwner owner, Function func) { """ If the function is an extension function, register the namespace. @param owner The current XPath object that owns the expression. @param func The function currently being visited. @return true to continue the visit in the subtree, if a...
java
public boolean visitFunction(ExpressionOwner owner, Function func) { if (func instanceof FuncExtFunction) { String namespace = ((FuncExtFunction)func).getNamespace(); m_sroot.getExtensionNamespacesManager().registerExtension(namespace); } else if (func instanceof FuncExtFunctionAvail...
[ "public", "boolean", "visitFunction", "(", "ExpressionOwner", "owner", ",", "Function", "func", ")", "{", "if", "(", "func", "instanceof", "FuncExtFunction", ")", "{", "String", "namespace", "=", "(", "(", "FuncExtFunction", ")", "func", ")", ".", "getNamespac...
If the function is an extension function, register the namespace. @param owner The current XPath object that owns the expression. @param func The function currently being visited. @return true to continue the visit in the subtree, if any.
[ "If", "the", "function", "is", "an", "extension", "function", "register", "the", "namespace", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/extensions/ExpressionVisitor.java#L62-L80
landawn/AbacusUtil
src/com/landawn/abacus/util/FilenameUtil.java
FilenameUtil.wildcardMatchOnSystem
public static boolean wildcardMatchOnSystem(final String filename, final String wildcardfilter) { """ Checks a filename to see if it matches the specified wildcard filter using the case rules of the system. <p> The wildcard filter uses the characters '?' and '*' to represent a single or multiple (zero or more)...
java
public static boolean wildcardMatchOnSystem(final String filename, final String wildcardfilter) { return wildcardMatch(filename, wildcardfilter, IOCase.SYSTEM); }
[ "public", "static", "boolean", "wildcardMatchOnSystem", "(", "final", "String", "filename", ",", "final", "String", "wildcardfilter", ")", "{", "return", "wildcardMatch", "(", "filename", ",", "wildcardfilter", ",", "IOCase", ".", "SYSTEM", ")", ";", "}" ]
Checks a filename to see if it matches the specified wildcard filter using the case rules of the system. <p> The wildcard filter uses the characters '?' and '*' to represent a single or multiple (zero or more) wildcard characters. This is the same as often found on Dos/Unix command lines. The check is case-sensitive on...
[ "Checks", "a", "filename", "to", "see", "if", "it", "matches", "the", "specified", "wildcard", "filter", "using", "the", "case", "rules", "of", "the", "system", ".", "<p", ">", "The", "wildcard", "filter", "uses", "the", "characters", "?", "and", "*", "t...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/FilenameUtil.java#L1282-L1284