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
tvesalainen/util
util/src/main/java/org/vesalainen/util/HexDump.java
HexDump.toHex
public static final String toHex(byte[] buf, int offset, int length) { """ Creates readable view to byte array content. @param buf @param offset @param length @return """ return toHex(Arrays.copyOfRange(buf, offset, offset+length)); }
java
public static final String toHex(byte[] buf, int offset, int length) { return toHex(Arrays.copyOfRange(buf, offset, offset+length)); }
[ "public", "static", "final", "String", "toHex", "(", "byte", "[", "]", "buf", ",", "int", "offset", ",", "int", "length", ")", "{", "return", "toHex", "(", "Arrays", ".", "copyOfRange", "(", "buf", ",", "offset", ",", "offset", "+", "length", ")", ")...
Creates readable view to byte array content. @param buf @param offset @param length @return
[ "Creates", "readable", "view", "to", "byte", "array", "content", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/HexDump.java#L123-L126
jenetics/jenetics
jenetics.ext/src/main/java/io/jenetics/ext/internal/random.java
random.nextBigInteger
public static BigInteger nextBigInteger( final BigInteger min, final BigInteger max, final Random random ) { """ Returns a pseudo-random, uniformly distributed int value between min and max (min and max included). @param min lower bound for generated long integer (inclusively) @param max upper bound fo...
java
public static BigInteger nextBigInteger( final BigInteger min, final BigInteger max, final Random random ) { if (min.compareTo(max) >= 0) { throw new IllegalArgumentException(format( "min >= max: %d >= %d.", min, max )); } final BigInteger n = max.subtract(min).add(BigInteger.ONE); return next...
[ "public", "static", "BigInteger", "nextBigInteger", "(", "final", "BigInteger", "min", ",", "final", "BigInteger", "max", ",", "final", "Random", "random", ")", "{", "if", "(", "min", ".", "compareTo", "(", "max", ")", ">=", "0", ")", "{", "throw", "new"...
Returns a pseudo-random, uniformly distributed int value between min and max (min and max included). @param min lower bound for generated long integer (inclusively) @param max upper bound for generated long integer (inclusively) @param random the random engine to use for calculating the random long value @return a ran...
[ "Returns", "a", "pseudo", "-", "random", "uniformly", "distributed", "int", "value", "between", "min", "and", "max", "(", "min", "and", "max", "included", ")", "." ]
train
https://github.com/jenetics/jenetics/blob/ee516770c65ef529b27deb283f071c85f344eff4/jenetics.ext/src/main/java/io/jenetics/ext/internal/random.java#L120-L133
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.addEntries
public static void addEntries(File zip, ZipEntrySource[] entries, File destZip) { """ Copies an existing ZIP file and appends it with new entries. @param zip an existing ZIP file (only read). @param entries new ZIP entries appended. @param destZip new ZIP file created. """ if (log.isDebugEnabled())...
java
public static void addEntries(File zip, ZipEntrySource[] entries, File destZip) { if (log.isDebugEnabled()) { log.debug("Copying '" + zip + "' to '" + destZip + "' and adding " + Arrays.asList(entries) + "."); } OutputStream destOut = null; try { destOut = new BufferedOutputStream(new FileO...
[ "public", "static", "void", "addEntries", "(", "File", "zip", ",", "ZipEntrySource", "[", "]", "entries", ",", "File", "destZip", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "\"Copying '\"", "+", "zi...
Copies an existing ZIP file and appends it with new entries. @param zip an existing ZIP file (only read). @param entries new ZIP entries appended. @param destZip new ZIP file created.
[ "Copies", "an", "existing", "ZIP", "file", "and", "appends", "it", "with", "new", "entries", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L2164-L2180
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.startTrack
public static void startTrack(final Object... args) { """ Begin a "track;" that is, begin logging at one level deeper. Channels other than the FORCE channel are ignored. @param args The title of the track to begin, with an optional FORCE flag. """ if(isClosed){ return; } //--Create Record fina...
java
public static void startTrack(final Object... args){ if(isClosed){ return; } //--Create Record final int len = args.length == 0 ? 0 : args.length-1; final Object content = args.length == 0 ? "" : args[len]; final Object[] tags = new Object[len]; final StackTraceElement ste = getStackTrace(...
[ "public", "static", "void", "startTrack", "(", "final", "Object", "...", "args", ")", "{", "if", "(", "isClosed", ")", "{", "return", ";", "}", "//--Create Record\r", "final", "int", "len", "=", "args", ".", "length", "==", "0", "?", "0", ":", "args", ...
Begin a "track;" that is, begin logging at one level deeper. Channels other than the FORCE channel are ignored. @param args The title of the track to begin, with an optional FORCE flag.
[ "Begin", "a", "track", ";", "that", "is", "begin", "logging", "at", "one", "level", "deeper", ".", "Channels", "other", "than", "the", "FORCE", "channel", "are", "ignored", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L468-L498
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.insertRow
void insertRow(Session session, PersistentStore store, Object[] data) { """ Mid level method for inserting rows. Performs constraint checks and fires row level triggers. """ setIdentityColumn(session, data); if (triggerLists[Trigger.INSERT_BEFORE].length != 0) { fireBeforeTrigger...
java
void insertRow(Session session, PersistentStore store, Object[] data) { setIdentityColumn(session, data); if (triggerLists[Trigger.INSERT_BEFORE].length != 0) { fireBeforeTriggers(session, Trigger.INSERT_BEFORE, null, data, null); } if (isVie...
[ "void", "insertRow", "(", "Session", "session", ",", "PersistentStore", "store", ",", "Object", "[", "]", "data", ")", "{", "setIdentityColumn", "(", "session", ",", "data", ")", ";", "if", "(", "triggerLists", "[", "Trigger", ".", "INSERT_BEFORE", "]", "....
Mid level method for inserting rows. Performs constraint checks and fires row level triggers.
[ "Mid", "level", "method", "for", "inserting", "rows", ".", "Performs", "constraint", "checks", "and", "fires", "row", "level", "triggers", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2241-L2256
apache/groovy
src/main/groovy/groovy/lang/GroovyClassLoader.java
GroovyClassLoader.parseClass
public Class parseClass(File file) throws CompilationFailedException, IOException { """ Parses the given file into a Java class capable of being run @param file the file name to parse @return the main class defined in the given script """ return parseClass(new GroovyCodeSource(file, config.getSourc...
java
public Class parseClass(File file) throws CompilationFailedException, IOException { return parseClass(new GroovyCodeSource(file, config.getSourceEncoding())); }
[ "public", "Class", "parseClass", "(", "File", "file", ")", "throws", "CompilationFailedException", ",", "IOException", "{", "return", "parseClass", "(", "new", "GroovyCodeSource", "(", "file", ",", "config", ".", "getSourceEncoding", "(", ")", ")", ")", ";", "...
Parses the given file into a Java class capable of being run @param file the file name to parse @return the main class defined in the given script
[ "Parses", "the", "given", "file", "into", "a", "Java", "class", "capable", "of", "being", "run" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/GroovyClassLoader.java#L233-L235
carewebframework/carewebframework-core
org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/event/EventManager.java
EventManager.hostSubscribe
private void hostSubscribe(String eventName, boolean subscribe) { """ Registers or unregisters a subscription with the global event dispatcher, if one is present. @param eventName Name of event @param subscribe If true, a subscription is registered. If false, it is unregistered. """ if (globalEvent...
java
private void hostSubscribe(String eventName, boolean subscribe) { if (globalEventDispatcher != null) { try { globalEventDispatcher.subscribeRemoteEvent(eventName, subscribe); } catch (Throwable e) { log.error( "Error " + (subscribe ? "s...
[ "private", "void", "hostSubscribe", "(", "String", "eventName", ",", "boolean", "subscribe", ")", "{", "if", "(", "globalEventDispatcher", "!=", "null", ")", "{", "try", "{", "globalEventDispatcher", ".", "subscribeRemoteEvent", "(", "eventName", ",", "subscribe",...
Registers or unregisters a subscription with the global event dispatcher, if one is present. @param eventName Name of event @param subscribe If true, a subscription is registered. If false, it is unregistered.
[ "Registers", "or", "unregisters", "a", "subscription", "with", "the", "global", "event", "dispatcher", "if", "one", "is", "present", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/event/EventManager.java#L144-L154
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java
PubSubManager.deleteNode
public boolean deleteNode(String nodeId) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Delete the specified node. @param nodeId @throws XMPPErrorException @throws NoResponseException @throws NotConnectedException @throws InterruptedException @return <code...
java
public boolean deleteNode(String nodeId) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { boolean res = true; try { sendPubsubPacket(Type.set, new NodeExtension(PubSubElementType.DELETE, nodeId), PubSubElementType.DELETE.getNamespace()); }...
[ "public", "boolean", "deleteNode", "(", "String", "nodeId", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "boolean", "res", "=", "true", ";", "try", "{", "sendPubsubPacket", "(", "Typ...
Delete the specified node. @param nodeId @throws XMPPErrorException @throws NoResponseException @throws NotConnectedException @throws InterruptedException @return <code>true</code> if this node existed and was deleted and <code>false</code> if this node did not exist.
[ "Delete", "the", "specified", "node", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java#L512-L525
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowTriggersInner.java
WorkflowTriggersInner.listAsync
public Observable<Page<WorkflowTriggerInner>> listAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter) { """ Gets a list of workflow triggers. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param top The number of i...
java
public Observable<Page<WorkflowTriggerInner>> listAsync(final String resourceGroupName, final String workflowName, final Integer top, final String filter) { return listWithServiceResponseAsync(resourceGroupName, workflowName, top, filter) .map(new Func1<ServiceResponse<Page<WorkflowTriggerInner>>, P...
[ "public", "Observable", "<", "Page", "<", "WorkflowTriggerInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "workflowName", ",", "final", "Integer", "top", ",", "final", "String", "filter", ")", "{", "return", ...
Gets a list of workflow triggers. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param top The number of items to be included in the result. @param filter The filter to apply on the operation. @throws IllegalArgumentException thrown if parameters fail the validation @return t...
[ "Gets", "a", "list", "of", "workflow", "triggers", "." ]
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/WorkflowTriggersInner.java#L272-L280
forge/core
resources/impl/src/main/java/org/jboss/forge/addon/resource/DirectoryResourceImpl.java
DirectoryResourceImpl.getChildOfType
@Override @SuppressWarnings("unchecked") public <E, T extends Resource<E>> T getChildOfType(final Class<T> type, final String name) throws ResourceException { """ Using the given type, obtain a reference to the child resource of the given type. If the result is not of the requested type and does not exist, ...
java
@Override @SuppressWarnings("unchecked") public <E, T extends Resource<E>> T getChildOfType(final Class<T> type, final String name) throws ResourceException { T result; Resource<?> child = getChild(name); if (type.isAssignableFrom(child.getClass())) { result = (T) child; ...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "E", ",", "T", "extends", "Resource", "<", "E", ">", ">", "T", "getChildOfType", "(", "final", "Class", "<", "T", ">", "type", ",", "final", "String", "name", ")", "thr...
Using the given type, obtain a reference to the child resource of the given type. If the result is not of the requested type and does not exist, return null. If the result is not of the requested type and exists, throw {@link ResourceException}
[ "Using", "the", "given", "type", "obtain", "a", "reference", "to", "the", "child", "resource", "of", "the", "given", "type", ".", "If", "the", "result", "is", "not", "of", "the", "requested", "type", "and", "does", "not", "exist", "return", "null", ".", ...
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/resources/impl/src/main/java/org/jboss/forge/addon/resource/DirectoryResourceImpl.java#L111-L132
twitter/cloudhopper-commons
ch-commons-gsm/src/main/java/com/cloudhopper/commons/gsm/DataCoding.java
DataCoding.createGeneralGroup
static public DataCoding createGeneralGroup(byte characterEncoding, Byte messageClass, boolean compressed) throws IllegalArgumentException { """ Creates a "General" group data coding scheme where 3 different languages are supported (8BIT, UCS2, or DEFAULT). This method validates the message class. @param chara...
java
static public DataCoding createGeneralGroup(byte characterEncoding, Byte messageClass, boolean compressed) throws IllegalArgumentException { // only default, 8bit, or UCS2 are valid if (!(characterEncoding == CHAR_ENC_DEFAULT || characterEncoding == CHAR_ENC_8BIT || characterEncoding == CHAR_ENC_UCS2)) ...
[ "static", "public", "DataCoding", "createGeneralGroup", "(", "byte", "characterEncoding", ",", "Byte", "messageClass", ",", "boolean", "compressed", ")", "throws", "IllegalArgumentException", "{", "// only default, 8bit, or UCS2 are valid", "if", "(", "!", "(", "character...
Creates a "General" group data coding scheme where 3 different languages are supported (8BIT, UCS2, or DEFAULT). This method validates the message class. @param characterEncoding Either CHAR_ENC_DEFAULT, CHAR_ENC_8BIT, or CHAR_ENC_UCS2 @param messageClass The 4 different possible message classes (0-3). If null, the "...
[ "Creates", "a", "General", "group", "data", "coding", "scheme", "where", "3", "different", "languages", "are", "supported", "(", "8BIT", "UCS2", "or", "DEFAULT", ")", ".", "This", "method", "validates", "the", "message", "class", "." ]
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-gsm/src/main/java/com/cloudhopper/commons/gsm/DataCoding.java#L255-L285
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Theme.java
Theme.createChildTheme
public Theme createChildTheme(String name, Map<String, Object> attributes) { """ Create a theme that is a child of this theme. @param name Name of the new theme. @param attributes additional attributes for new theme. @return The new theme. """ Theme theme = getInstance().create().theme(name, getPr...
java
public Theme createChildTheme(String name, Map<String, Object> attributes) { Theme theme = getInstance().create().theme(name, getProject(), attributes); theme.setParentTheme(this); theme.save(); return theme; }
[ "public", "Theme", "createChildTheme", "(", "String", "name", ",", "Map", "<", "String", ",", "Object", ">", "attributes", ")", "{", "Theme", "theme", "=", "getInstance", "(", ")", ".", "create", "(", ")", ".", "theme", "(", "name", ",", "getProject", ...
Create a theme that is a child of this theme. @param name Name of the new theme. @param attributes additional attributes for new theme. @return The new theme.
[ "Create", "a", "theme", "that", "is", "a", "child", "of", "this", "theme", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Theme.java#L240-L246
52inc/android-52Kit
library/src/main/java/com/ftinc/kit/util/Utils.java
Utils.parseInt
public static int parseInt(String val, int defValue) { """ Parse a int from a String in a safe manner. @param val the string to parse @param defValue the default value to return if parsing fails @return the parsed int, or default value """ if(TextUtils.isEmpty(val)) ret...
java
public static int parseInt(String val, int defValue){ if(TextUtils.isEmpty(val)) return defValue; try{ return Integer.parseInt(val); }catch (NumberFormatException e){ return defValue; } }
[ "public", "static", "int", "parseInt", "(", "String", "val", ",", "int", "defValue", ")", "{", "if", "(", "TextUtils", ".", "isEmpty", "(", "val", ")", ")", "return", "defValue", ";", "try", "{", "return", "Integer", ".", "parseInt", "(", "val", ")", ...
Parse a int from a String in a safe manner. @param val the string to parse @param defValue the default value to return if parsing fails @return the parsed int, or default value
[ "Parse", "a", "int", "from", "a", "String", "in", "a", "safe", "manner", "." ]
train
https://github.com/52inc/android-52Kit/blob/8644fab0f633477b1bb1dddd8147a9ef8bc03516/library/src/main/java/com/ftinc/kit/util/Utils.java#L262-L269
JM-Lab/utils-elasticsearch
src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchClient.java
JMElasticsearchClient.getAllIdList
public List<String> getAllIdList(String index, String type) { """ Gets all id list. @param index the index @param type the type @return the all id list """ return extractIdList(searchAll(index, type)); }
java
public List<String> getAllIdList(String index, String type) { return extractIdList(searchAll(index, type)); }
[ "public", "List", "<", "String", ">", "getAllIdList", "(", "String", "index", ",", "String", "type", ")", "{", "return", "extractIdList", "(", "searchAll", "(", "index", ",", "type", ")", ")", ";", "}" ]
Gets all id list. @param index the index @param type the type @return the all id list
[ "Gets", "all", "id", "list", "." ]
train
https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchClient.java#L234-L236
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerImpl.java
TransformerImpl.executeChildTemplates
public void executeChildTemplates( ElemTemplateElement elem, ContentHandler handler) throws TransformerException { """ Execute each of the children of a template element. @param elem The ElemTemplateElement that contains the children that should execute. @param handler The ContentH...
java
public void executeChildTemplates( ElemTemplateElement elem, ContentHandler handler) throws TransformerException { SerializationHandler xoh = this.getSerializationHandler(); // These may well not be the same! In this case when calling // the Redirect extension, i...
[ "public", "void", "executeChildTemplates", "(", "ElemTemplateElement", "elem", ",", "ContentHandler", "handler", ")", "throws", "TransformerException", "{", "SerializationHandler", "xoh", "=", "this", ".", "getSerializationHandler", "(", ")", ";", "// These may well not b...
Execute each of the children of a template element. @param elem The ElemTemplateElement that contains the children that should execute. @param handler The ContentHandler to where the result events should be fed. @throws TransformerException @xsl.usage advanced
[ "Execute", "each", "of", "the", "children", "of", "a", "template", "element", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerImpl.java#L2255-L2291
m-m-m/util
validation/src/main/java/net/sf/mmm/util/validation/base/ValidatorJsr303.java
ValidatorJsr303.createValidationFailure
protected ValidationFailure createValidationFailure(ConstraintViolation<?> violation, Object valueSource) { """ Creates a {@link ValidationFailure} for the given {@link ConstraintViolation}. @param violation is the {@link ConstraintViolation}. @param valueSource is the source of the value. May be {@code null}....
java
protected ValidationFailure createValidationFailure(ConstraintViolation<?> violation, Object valueSource) { String code = violation.getConstraintDescriptor().getAnnotation().annotationType().getSimpleName(); return new ValidationFailureImpl(code, valueSource, violation.getMessage()); }
[ "protected", "ValidationFailure", "createValidationFailure", "(", "ConstraintViolation", "<", "?", ">", "violation", ",", "Object", "valueSource", ")", "{", "String", "code", "=", "violation", ".", "getConstraintDescriptor", "(", ")", ".", "getAnnotation", "(", ")",...
Creates a {@link ValidationFailure} for the given {@link ConstraintViolation}. @param violation is the {@link ConstraintViolation}. @param valueSource is the source of the value. May be {@code null}. @return the created {@link ValidationFailure}.
[ "Creates", "a", "{", "@link", "ValidationFailure", "}", "for", "the", "given", "{", "@link", "ConstraintViolation", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/validation/src/main/java/net/sf/mmm/util/validation/base/ValidatorJsr303.java#L226-L230
aalmiray/Json-lib
extensions/spring/src/main/java/net/sf/json/spring/web/servlet/view/JsonView.java
JsonView.createJSON
protected JSON createJSON( Map model, HttpServletRequest request, HttpServletResponse response ) { """ Creates a JSON [JSONObject,JSONArray,JSONNUll] from the model values. """ return defaultCreateJSON( model ); }
java
protected JSON createJSON( Map model, HttpServletRequest request, HttpServletResponse response ) { return defaultCreateJSON( model ); }
[ "protected", "JSON", "createJSON", "(", "Map", "model", ",", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "{", "return", "defaultCreateJSON", "(", "model", ")", ";", "}" ]
Creates a JSON [JSONObject,JSONArray,JSONNUll] from the model values.
[ "Creates", "a", "JSON", "[", "JSONObject", "JSONArray", "JSONNUll", "]", "from", "the", "model", "values", "." ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/extensions/spring/src/main/java/net/sf/json/spring/web/servlet/view/JsonView.java#L117-L119
LevelFourAB/commons
commons-io/src/main/java/se/l4/commons/io/BytesBuilder.java
BytesBuilder.addChunk
public BytesBuilder addChunk(@NonNull byte[] buffer, int offset, int length) { """ Add a chunk of data to the {@link Bytes} instance. @param buffer byte data to add @param offset offset to start adding byte data from @param length the length of the data to add """ Objects.requireNonNull(buffer); o...
java
public BytesBuilder addChunk(@NonNull byte[] buffer, int offset, int length) { Objects.requireNonNull(buffer); out.write(buffer, offset, length); return this; }
[ "public", "BytesBuilder", "addChunk", "(", "@", "NonNull", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "{", "Objects", ".", "requireNonNull", "(", "buffer", ")", ";", "out", ".", "write", "(", "buffer", ",", "offset", "...
Add a chunk of data to the {@link Bytes} instance. @param buffer byte data to add @param offset offset to start adding byte data from @param length the length of the data to add
[ "Add", "a", "chunk", "of", "data", "to", "the", "{", "@link", "Bytes", "}", "instance", "." ]
train
https://github.com/LevelFourAB/commons/blob/aa121b3a5504b43d0c10450a1b984694fcd2b8ee/commons-io/src/main/java/se/l4/commons/io/BytesBuilder.java#L46-L52
spring-projects/spring-social
spring-social-core/src/main/java/org/springframework/social/connect/support/AbstractConnection.java
AbstractConnection.initKey
protected void initKey(String providerId, String providerUserId) { """ Hook that should be called by subclasses to initialize the key property when establishing a new connection. @param providerId the providerId @param providerUserId the providerUserId """ if (providerUserId == null) { providerUserId = ...
java
protected void initKey(String providerId, String providerUserId) { if (providerUserId == null) { providerUserId = setValues().providerUserId; } key = new ConnectionKey(providerId, providerUserId); }
[ "protected", "void", "initKey", "(", "String", "providerId", ",", "String", "providerUserId", ")", "{", "if", "(", "providerUserId", "==", "null", ")", "{", "providerUserId", "=", "setValues", "(", ")", ".", "providerUserId", ";", "}", "key", "=", "new", "...
Hook that should be called by subclasses to initialize the key property when establishing a new connection. @param providerId the providerId @param providerUserId the providerUserId
[ "Hook", "that", "should", "be", "called", "by", "subclasses", "to", "initialize", "the", "key", "property", "when", "establishing", "a", "new", "connection", "." ]
train
https://github.com/spring-projects/spring-social/blob/e41cfecb288022b83c79413b58f52511c3c9d4fc/spring-social-core/src/main/java/org/springframework/social/connect/support/AbstractConnection.java#L135-L140
headius/invokebinder
src/main/java/com/headius/invokebinder/Binder.java
Binder.setStaticQuiet
public MethodHandle setStaticQuiet(MethodHandles.Lookup lookup, Class<?> target, String name) { """ Apply the chain of transforms and bind them to an object field assignment specified using the end signature plus the given class and name. The end signature must take the target class or a subclass and the field's...
java
public MethodHandle setStaticQuiet(MethodHandles.Lookup lookup, Class<?> target, String name) { try { return setStatic(lookup, target, name); } catch (IllegalAccessException | NoSuchFieldException e) { throw new InvalidTransformException(e); } }
[ "public", "MethodHandle", "setStaticQuiet", "(", "MethodHandles", ".", "Lookup", "lookup", ",", "Class", "<", "?", ">", "target", ",", "String", "name", ")", "{", "try", "{", "return", "setStatic", "(", "lookup", ",", "target", ",", "name", ")", ";", "}"...
Apply the chain of transforms and bind them to an object field assignment specified using the end signature plus the given class and name. The end signature must take the target class or a subclass and the field's type as its arguments, and its return type must be compatible with void. If the final handle's type does ...
[ "Apply", "the", "chain", "of", "transforms", "and", "bind", "them", "to", "an", "object", "field", "assignment", "specified", "using", "the", "end", "signature", "plus", "the", "given", "class", "and", "name", ".", "The", "end", "signature", "must", "take", ...
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Binder.java#L1540-L1546
finmath/finmath-lib
src/main/java/net/finmath/marketdata2/products/SwapAnnuity.java
SwapAnnuity.getSwapAnnuity
public static RandomVariable getSwapAnnuity(Schedule schedule, ForwardCurveInterface forwardCurve) { """ Function to calculate an (idealized) single curve swap annuity for a given schedule and forward curve. The discount curve used to calculate the annuity is calculated from the forward curve using classical sin...
java
public static RandomVariable getSwapAnnuity(Schedule schedule, ForwardCurveInterface forwardCurve) { DiscountCurveInterface discountCurve = new DiscountCurveFromForwardCurve(forwardCurve.getName()); double evaluationTime = 0.0; // Consider only payment time > 0 return getSwapAnnuity(evaluationTime, schedule, disc...
[ "public", "static", "RandomVariable", "getSwapAnnuity", "(", "Schedule", "schedule", ",", "ForwardCurveInterface", "forwardCurve", ")", "{", "DiscountCurveInterface", "discountCurve", "=", "new", "DiscountCurveFromForwardCurve", "(", "forwardCurve", ".", "getName", "(", "...
Function to calculate an (idealized) single curve swap annuity for a given schedule and forward curve. The discount curve used to calculate the annuity is calculated from the forward curve using classical single curve interpretations of forwards and a default period length. The may be a crude approximation. Note: This...
[ "Function", "to", "calculate", "an", "(", "idealized", ")", "single", "curve", "swap", "annuity", "for", "a", "given", "schedule", "and", "forward", "curve", ".", "The", "discount", "curve", "used", "to", "calculate", "the", "annuity", "is", "calculated", "f...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata2/products/SwapAnnuity.java#L101-L105
phax/ph-oton
ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload5/FineUploader5Session.java
FineUploader5Session.addParam
@Nonnull public FineUploader5Session addParam (@Nonnull @Nonempty final String sKey, @Nonnull final String sValue) { """ Any parameters you would like passed with the associated GET request to your server. @param sKey Parameter name @param sValue Parameter value @return this """ ValueEnforcer.not...
java
@Nonnull public FineUploader5Session addParam (@Nonnull @Nonempty final String sKey, @Nonnull final String sValue) { ValueEnforcer.notEmpty (sKey, "Key"); ValueEnforcer.notNull (sValue, "Value"); m_aSessionParams.put (sKey, sValue); return this; }
[ "@", "Nonnull", "public", "FineUploader5Session", "addParam", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sKey", ",", "@", "Nonnull", "final", "String", "sValue", ")", "{", "ValueEnforcer", ".", "notEmpty", "(", "sKey", ",", "\"Key\"", ")", ";"...
Any parameters you would like passed with the associated GET request to your server. @param sKey Parameter name @param sValue Parameter value @return this
[ "Any", "parameters", "you", "would", "like", "passed", "with", "the", "associated", "GET", "request", "to", "your", "server", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-uictrls/src/main/java/com/helger/photon/uictrls/fineupload5/FineUploader5Session.java#L176-L184
khipu/lib-java
src/main/java/com/khipu/lib/java/Khipu.java
Khipu.getPaymentButton
public static String getPaymentButton(int receiverId, String secret, String email, String bankId, String subject, String body, int amount, Date expiresDate, String notifyUrl, String returnUrl, String cancelUrl, String pictureUrl, String custom, String transactionId, String button) { """ Entrega un String que conti...
java
public static String getPaymentButton(int receiverId, String secret, String email, String bankId, String subject, String body, int amount, Date expiresDate, String notifyUrl, String returnUrl, String cancelUrl, String pictureUrl, String custom, String transactionId, String button) { StringBuilder builder = new String...
[ "public", "static", "String", "getPaymentButton", "(", "int", "receiverId", ",", "String", "secret", ",", "String", "email", ",", "String", "bankId", ",", "String", "subject", ",", "String", "body", ",", "int", "amount", ",", "Date", "expiresDate", ",", "Str...
Entrega un String que contiene un botón de pago que dirije a khipu. @param receiverId id de cobrador @param secret llave de cobrador @param email correo del pagador. Este correo aparecerá pre-configurado en la página de pago (opcional). @param bankId el identificador del banco para hacer el pago. @p...
[ "Entrega", "un", "String", "que", "contiene", "un", "botón", "de", "pago", "que", "dirije", "a", "khipu", "." ]
train
https://github.com/khipu/lib-java/blob/7a56476a60c6f5012e13f342c81b5ef9dc2328e6/src/main/java/com/khipu/lib/java/Khipu.java#L214-L234
Azure/azure-sdk-for-java
datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.createOrUpdateFirewallRule
public FirewallRuleInner createOrUpdateFirewallRule(String resourceGroupName, String accountName, String name, FirewallRuleInner parameters) { """ Creates or updates the specified firewall rule. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. @param acco...
java
public FirewallRuleInner createOrUpdateFirewallRule(String resourceGroupName, String accountName, String name, FirewallRuleInner parameters) { return createOrUpdateFirewallRuleWithServiceResponseAsync(resourceGroupName, accountName, name, parameters).toBlocking().single().body(); }
[ "public", "FirewallRuleInner", "createOrUpdateFirewallRule", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "name", ",", "FirewallRuleInner", "parameters", ")", "{", "return", "createOrUpdateFirewallRuleWithServiceResponseAsync", "(", "resour...
Creates or updates the specified firewall rule. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account. @param accountName The name of the Data Lake Store account to which to add the firewall rule. @param name The name of the firewall rule to create or update. @param pa...
[ "Creates", "or", "updates", "the", "specified", "firewall", "rule", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakestore/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakestore/v2015_10_01_preview/implementation/AccountsInner.java#L460-L462
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java
SVGPath.relativeQuadTo
public SVGPath relativeQuadTo(double[] c1xy, double[] xy) { """ Quadratic Bezier line to the given relative coordinates. @param c1xy first control point @param xy new coordinates @return path object, for compact syntax. """ return append(PATH_QUAD_TO_RELATIVE).append(c1xy[0]).append(c1xy[1]).append(xy...
java
public SVGPath relativeQuadTo(double[] c1xy, double[] xy) { return append(PATH_QUAD_TO_RELATIVE).append(c1xy[0]).append(c1xy[1]).append(xy[0]).append(xy[1]); }
[ "public", "SVGPath", "relativeQuadTo", "(", "double", "[", "]", "c1xy", ",", "double", "[", "]", "xy", ")", "{", "return", "append", "(", "PATH_QUAD_TO_RELATIVE", ")", ".", "append", "(", "c1xy", "[", "0", "]", ")", ".", "append", "(", "c1xy", "[", "...
Quadratic Bezier line to the given relative coordinates. @param c1xy first control point @param xy new coordinates @return path object, for compact syntax.
[ "Quadratic", "Bezier", "line", "to", "the", "given", "relative", "coordinates", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java#L492-L494
aws/aws-sdk-java
aws-java-sdk-amplify/src/main/java/com/amazonaws/services/amplify/model/Step.java
Step.withScreenshots
public Step withScreenshots(java.util.Map<String, String> screenshots) { """ <p> List of screenshot Urls for the execution step, if relevant. </p> @param screenshots List of screenshot Urls for the execution step, if relevant. @return Returns a reference to this object so that method calls can be chained to...
java
public Step withScreenshots(java.util.Map<String, String> screenshots) { setScreenshots(screenshots); return this; }
[ "public", "Step", "withScreenshots", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "screenshots", ")", "{", "setScreenshots", "(", "screenshots", ")", ";", "return", "this", ";", "}" ]
<p> List of screenshot Urls for the execution step, if relevant. </p> @param screenshots List of screenshot Urls for the execution step, if relevant. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "List", "of", "screenshot", "Urls", "for", "the", "execution", "step", "if", "relevant", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-amplify/src/main/java/com/amazonaws/services/amplify/model/Step.java#L367-L370
networknt/light-4j
utility/src/main/java/com/networknt/utility/RegExUtils.java
RegExUtils.removeAll
public static String removeAll(final String text, final Pattern regex) { """ <p>Removes each substring of the text String that matches the given regular expression pattern.</p> This method is a {@code null} safe equivalent to: <ul> <li>{@code pattern.matcher(text).replaceAll(StringUtils.EMPTY)}</li> </ul> ...
java
public static String removeAll(final String text, final Pattern regex) { return replaceAll(text, regex, StringUtils.EMPTY); }
[ "public", "static", "String", "removeAll", "(", "final", "String", "text", ",", "final", "Pattern", "regex", ")", "{", "return", "replaceAll", "(", "text", ",", "regex", ",", "StringUtils", ".", "EMPTY", ")", ";", "}" ]
<p>Removes each substring of the text String that matches the given regular expression pattern.</p> This method is a {@code null} safe equivalent to: <ul> <li>{@code pattern.matcher(text).replaceAll(StringUtils.EMPTY)}</li> </ul> <p>A {@code null} reference passed to this method is a no-op.</p> <pre> StringUtils.rem...
[ "<p", ">", "Removes", "each", "substring", "of", "the", "text", "String", "that", "matches", "the", "given", "regular", "expression", "pattern", ".", "<", "/", "p", ">" ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/RegExUtils.java#L60-L62
qspin/qtaste
kernel/src/main/java/com/qspin/qtaste/tcom/jmx/impl/JMXAgent.java
JMXAgent.sendNotification
public synchronized void sendNotification(PropertyChangeEvent pEvt) { """ Send a JMX notification of a property change event @param pEvt a property change event """ String oldValue = pEvt.getOldValue() == null ? "null" : pEvt.getOldValue().toString(); String newValue = pEvt.getNewValue() == ...
java
public synchronized void sendNotification(PropertyChangeEvent pEvt) { String oldValue = pEvt.getOldValue() == null ? "null" : pEvt.getOldValue().toString(); String newValue = pEvt.getNewValue() == null ? "null" : pEvt.getNewValue().toString(); String sourceName = pEvt.getSource().getClass().getC...
[ "public", "synchronized", "void", "sendNotification", "(", "PropertyChangeEvent", "pEvt", ")", "{", "String", "oldValue", "=", "pEvt", ".", "getOldValue", "(", ")", "==", "null", "?", "\"null\"", ":", "pEvt", ".", "getOldValue", "(", ")", ".", "toString", "(...
Send a JMX notification of a property change event @param pEvt a property change event
[ "Send", "a", "JMX", "notification", "of", "a", "property", "change", "event" ]
train
https://github.com/qspin/qtaste/blob/ba45d4d86eb29b92f157c6e98536dee2002ddfdc/kernel/src/main/java/com/qspin/qtaste/tcom/jmx/impl/JMXAgent.java#L101-L110
VoltDB/voltdb
src/frontend/org/voltdb/planner/microoptimizations/MakeInsertNodesInlineIfPossible.java
MakeInsertNodesInlineIfPossible.recursivelyApply
private AbstractPlanNode recursivelyApply(AbstractPlanNode plan, int childIdx) { """ This helper function is called when we recurse down the childIdx-th child of a parent node. @param plan @param parentIdx @return """ // If this is an insert plan node, then try to // inline it. There will ...
java
private AbstractPlanNode recursivelyApply(AbstractPlanNode plan, int childIdx) { // If this is an insert plan node, then try to // inline it. There will only ever by one insert // node, so if we can't inline it we just return the // given plan. if (plan instanceof InsertPlanNode...
[ "private", "AbstractPlanNode", "recursivelyApply", "(", "AbstractPlanNode", "plan", ",", "int", "childIdx", ")", "{", "// If this is an insert plan node, then try to", "// inline it. There will only ever by one insert", "// node, so if we can't inline it we just return the", "// given p...
This helper function is called when we recurse down the childIdx-th child of a parent node. @param plan @param parentIdx @return
[ "This", "helper", "function", "is", "called", "when", "we", "recurse", "down", "the", "childIdx", "-", "th", "child", "of", "a", "parent", "node", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/microoptimizations/MakeInsertNodesInlineIfPossible.java#L38-L83
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/Channel.java
Channel.queryTransactionByID
public TransactionInfo queryTransactionByID(Collection<Peer> peers, String txID, User userContext) throws ProposalException, InvalidArgumentException { """ Query for a Fabric Transaction given its transactionID @param txID the ID of the transaction @param peers the peers to try to send the request...
java
public TransactionInfo queryTransactionByID(Collection<Peer> peers, String txID, User userContext) throws ProposalException, InvalidArgumentException { checkChannelState(); checkPeers(peers); User.userContextCheck(userContext); if (txID == null) { throw new InvalidArgumentE...
[ "public", "TransactionInfo", "queryTransactionByID", "(", "Collection", "<", "Peer", ">", "peers", ",", "String", "txID", ",", "User", "userContext", ")", "throws", "ProposalException", ",", "InvalidArgumentException", "{", "checkChannelState", "(", ")", ";", "check...
Query for a Fabric Transaction given its transactionID @param txID the ID of the transaction @param peers the peers to try to send the request. @param userContext the user context @return a {@link TransactionInfo} @throws ProposalException @throws InvalidArgumentException
[ "Query", "for", "a", "Fabric", "Transaction", "given", "its", "transactionID" ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/Channel.java#L3224-L3250
Jasig/uPortal
uPortal-groups/uPortal-groups-filesystem/src/main/java/org/apereo/portal/groups/filesystem/FileSystemGroupStore.java
FileSystemGroupStore.findParentGroups
protected Iterator findParentGroups(IEntity ent) throws GroupsException { """ Returns an <code>Iterator</code> over the <code>Collection</code> of <code>IEntityGroups </code> that the <code>IEntity</code> belongs to. @return java.util.Iterator @param ent org.apereo.portal.groups.IEntityGroup """ i...
java
protected Iterator findParentGroups(IEntity ent) throws GroupsException { if (log.isDebugEnabled()) log.debug(DEBUG_CLASS_NAME + ".findParentGroups(): for " + ent); List groups = new ArrayList(); File root = getFileRoot(ent.getType()); if (root != null) { File[] files = getA...
[ "protected", "Iterator", "findParentGroups", "(", "IEntity", "ent", ")", "throws", "GroupsException", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "log", ".", "debug", "(", "DEBUG_CLASS_NAME", "+", "\".findParentGroups(): for \"", "+", "ent", ")"...
Returns an <code>Iterator</code> over the <code>Collection</code> of <code>IEntityGroups </code> that the <code>IEntity</code> belongs to. @return java.util.Iterator @param ent org.apereo.portal.groups.IEntityGroup
[ "Returns", "an", "<code", ">", "Iterator<", "/", "code", ">", "over", "the", "<code", ">", "Collection<", "/", "code", ">", "of", "<code", ">", "IEntityGroups", "<", "/", "code", ">", "that", "the", "<code", ">", "IEntity<", "/", "code", ">", "belongs"...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-filesystem/src/main/java/org/apereo/portal/groups/filesystem/FileSystemGroupStore.java#L279-L300
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/PasswordNullifier.java
PasswordNullifier.nullify
public static String nullify(String value, byte delimiter) { """ Scan the input value for the "password=" and "client_secret=" key markers and convert the password value to a series of *s. The delimiter value can be used if the search string is a sequence like "key=value<delim>key2=value2". @param value @pa...
java
public static String nullify(String value, byte delimiter) { // check to see if we need to null out passwords if (null == value) { return null; } String source = value.toLowerCase(); StringBuilder b = new StringBuilder(value); boolean modified = optionallyMas...
[ "public", "static", "String", "nullify", "(", "String", "value", ",", "byte", "delimiter", ")", "{", "// check to see if we need to null out passwords", "if", "(", "null", "==", "value", ")", "{", "return", "null", ";", "}", "String", "source", "=", "value", "...
Scan the input value for the "password=" and "client_secret=" key markers and convert the password value to a series of *s. The delimiter value can be used if the search string is a sequence like "key=value<delim>key2=value2". @param value @param delimiter @return String
[ "Scan", "the", "input", "value", "for", "the", "password", "=", "and", "client_secret", "=", "key", "markers", "and", "convert", "the", "password", "value", "to", "a", "series", "of", "*", "s", ".", "The", "delimiter", "value", "can", "be", "used", "if",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/genericbnf/PasswordNullifier.java#L45-L60
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutMethodResponseRequest.java
PutMethodResponseRequest.withResponseModels
public PutMethodResponseRequest withResponseModels(java.util.Map<String, String> responseModels) { """ <p> Specifies the <a>Model</a> resources used for the response's content type. Response models are represented as a key/value map, with a content type as the key and a <a>Model</a> name as the value. </p> @...
java
public PutMethodResponseRequest withResponseModels(java.util.Map<String, String> responseModels) { setResponseModels(responseModels); return this; }
[ "public", "PutMethodResponseRequest", "withResponseModels", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseModels", ")", "{", "setResponseModels", "(", "responseModels", ")", ";", "return", "this", ";", "}" ]
<p> Specifies the <a>Model</a> resources used for the response's content type. Response models are represented as a key/value map, with a content type as the key and a <a>Model</a> name as the value. </p> @param responseModels Specifies the <a>Model</a> resources used for the response's content type. Response models a...
[ "<p", ">", "Specifies", "the", "<a", ">", "Model<", "/", "a", ">", "resources", "used", "for", "the", "response", "s", "content", "type", ".", "Response", "models", "are", "represented", "as", "a", "key", "/", "value", "map", "with", "a", "content", "t...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutMethodResponseRequest.java#L387-L390
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLReentrantTypeResolver.java
SARLReentrantTypeResolver.getSarlCapacityFieldType
protected LightweightTypeReference getSarlCapacityFieldType(IResolvedTypes resolvedTypes, JvmField field) { """ Replies the type of the field that represents a SARL capacity buffer. @param resolvedTypes the resolver of types. @param field the field. @return the type, never {@code null}. """ // For capac...
java
protected LightweightTypeReference getSarlCapacityFieldType(IResolvedTypes resolvedTypes, JvmField field) { // For capacity call redirection LightweightTypeReference fieldType = resolvedTypes.getActualType(field); final JvmAnnotationReference capacityAnnotation = this.annotationLookup.findAnnotation(field, Im...
[ "protected", "LightweightTypeReference", "getSarlCapacityFieldType", "(", "IResolvedTypes", "resolvedTypes", ",", "JvmField", "field", ")", "{", "// For capacity call redirection", "LightweightTypeReference", "fieldType", "=", "resolvedTypes", ".", "getActualType", "(", "field"...
Replies the type of the field that represents a SARL capacity buffer. @param resolvedTypes the resolver of types. @param field the field. @return the type, never {@code null}.
[ "Replies", "the", "type", "of", "the", "field", "that", "represents", "a", "SARL", "capacity", "buffer", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLReentrantTypeResolver.java#L143-L153
JoeKerouac/utils
src/main/java/com/joe/utils/reflect/ClassUtils.java
ClassUtils.getInstance
public static <T> T getInstance(String className, ClassLoader loader) { """ 获取class实例 @param className class名字 @param loader 加载class的classloader @param <T> class类型 @return class的实例 """ return getInstance(loadClass(className, loader)); }
java
public static <T> T getInstance(String className, ClassLoader loader) { return getInstance(loadClass(className, loader)); }
[ "public", "static", "<", "T", ">", "T", "getInstance", "(", "String", "className", ",", "ClassLoader", "loader", ")", "{", "return", "getInstance", "(", "loadClass", "(", "className", ",", "loader", ")", ")", ";", "}" ]
获取class实例 @param className class名字 @param loader 加载class的classloader @param <T> class类型 @return class的实例
[ "获取class实例" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/reflect/ClassUtils.java#L125-L127
QNJR-GROUP/EasyTransaction
easytrans-demo/rpc-dubbo/rpcdubbo-order-service/src/main/java/com/yiqiniu/easytrans/demos/order/impl/OrderApplication.java
OrderApplication.dubboConsumerCustomizationer
@Bean public DubboReferanceCustomizationer dubboConsumerCustomizationer() { """ This is an optional bean, you can modify Dubbo reference here to change the behavior of consumer @return """ return new DubboReferanceCustomizationer() { @Override public void customDubboReferance(String appId, String...
java
@Bean public DubboReferanceCustomizationer dubboConsumerCustomizationer() { return new DubboReferanceCustomizationer() { @Override public void customDubboReferance(String appId, String busCode, ReferenceConfig<GenericService> referenceConfig) { Logger logger = LoggerFactory.getLogger(getClass()); l...
[ "@", "Bean", "public", "DubboReferanceCustomizationer", "dubboConsumerCustomizationer", "(", ")", "{", "return", "new", "DubboReferanceCustomizationer", "(", ")", "{", "@", "Override", "public", "void", "customDubboReferance", "(", "String", "appId", ",", "String", "b...
This is an optional bean, you can modify Dubbo reference here to change the behavior of consumer @return
[ "This", "is", "an", "optional", "bean", "you", "can", "modify", "Dubbo", "reference", "here", "to", "change", "the", "behavior", "of", "consumer" ]
train
https://github.com/QNJR-GROUP/EasyTransaction/blob/53b031724a3fd1145f32b9a7b5c6fb8138d6a426/easytrans-demo/rpc-dubbo/rpcdubbo-order-service/src/main/java/com/yiqiniu/easytrans/demos/order/impl/OrderApplication.java#L30-L40
jboss-integration/fuse-bxms-integ
quickstarts/switchyard-rules-interview-dtable/src/main/java/org/switchyard/quickstarts/rules/interview/Transformers.java
Transformers.transformVerifyToApplicant
@Transformer(from = " { """ Transform verify to applicant. @param e the e @return the applicant """urn:switchyard-quickstart:rules-interview-dtable:0.1.0}verify") public Applicant transformVerifyToApplicant(Element e) { String name = getElementValue(e, "name"); int age = Integer.valueOf...
java
@Transformer(from = "{urn:switchyard-quickstart:rules-interview-dtable:0.1.0}verify") public Applicant transformVerifyToApplicant(Element e) { String name = getElementValue(e, "name"); int age = Integer.valueOf(getElementValue(e, "age")).intValue(); return new Applicant(name, age); }
[ "@", "Transformer", "(", "from", "=", "\"{urn:switchyard-quickstart:rules-interview-dtable:0.1.0}verify\"", ")", "public", "Applicant", "transformVerifyToApplicant", "(", "Element", "e", ")", "{", "String", "name", "=", "getElementValue", "(", "e", ",", "\"name\"", ")",...
Transform verify to applicant. @param e the e @return the applicant
[ "Transform", "verify", "to", "applicant", "." ]
train
https://github.com/jboss-integration/fuse-bxms-integ/blob/ca5c012bf867ea15d1250f0991af3cd7e708aaaf/quickstarts/switchyard-rules-interview-dtable/src/main/java/org/switchyard/quickstarts/rules/interview/Transformers.java#L46-L51
networknt/light-rest-4j
openapi-validator/src/main/java/com/networknt/openapi/ResponseValidator.java
ResponseValidator.validateResponseContent
public Status validateResponseContent(Object responseContent, String uri, String httpMethod) { """ validate a given response content object with status code "200" and media content type "application/json" uri, httpMethod, JSON_MEDIA_TYPE("200"), DEFAULT_MEDIA_TYPE("application/json") is to locate the schema to va...
java
public Status validateResponseContent(Object responseContent, String uri, String httpMethod) { return validateResponseContent(responseContent, uri, httpMethod, GOOD_STATUS_CODE); }
[ "public", "Status", "validateResponseContent", "(", "Object", "responseContent", ",", "String", "uri", ",", "String", "httpMethod", ")", "{", "return", "validateResponseContent", "(", "responseContent", ",", "uri", ",", "httpMethod", ",", "GOOD_STATUS_CODE", ")", ";...
validate a given response content object with status code "200" and media content type "application/json" uri, httpMethod, JSON_MEDIA_TYPE("200"), DEFAULT_MEDIA_TYPE("application/json") is to locate the schema to validate @param responseContent response content needs to be validated @param uri original uri of the reque...
[ "validate", "a", "given", "response", "content", "object", "with", "status", "code", "200", "and", "media", "content", "type", "application", "/", "json", "uri", "httpMethod", "JSON_MEDIA_TYPE", "(", "200", ")", "DEFAULT_MEDIA_TYPE", "(", "application", "/", "js...
train
https://github.com/networknt/light-rest-4j/blob/06b15128e6101351e617284a636ef5d632e6b1fe/openapi-validator/src/main/java/com/networknt/openapi/ResponseValidator.java#L67-L69
UrielCh/ovh-java-sdk
ovh-java-sdk-clusterhadoop/src/main/java/net/minidev/ovh/api/ApiOvhClusterhadoop.java
ApiOvhClusterhadoop.serviceName_service_restart_POST
public OvhTask serviceName_service_restart_POST(String serviceName, OvhClusterServiceNameEnum service) throws IOException { """ Restart a Cloudera Manager service (THIS ACTION WILL RESTART OTHER DEPENDANT SERVICES) REST: POST /cluster/hadoop/{serviceName}/service/restart @param service [required] Name of the s...
java
public OvhTask serviceName_service_restart_POST(String serviceName, OvhClusterServiceNameEnum service) throws IOException { String qPath = "/cluster/hadoop/{serviceName}/service/restart"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "service",...
[ "public", "OvhTask", "serviceName_service_restart_POST", "(", "String", "serviceName", ",", "OvhClusterServiceNameEnum", "service", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cluster/hadoop/{serviceName}/service/restart\"", ";", "StringBuilder", "sb", "=",...
Restart a Cloudera Manager service (THIS ACTION WILL RESTART OTHER DEPENDANT SERVICES) REST: POST /cluster/hadoop/{serviceName}/service/restart @param service [required] Name of the service to be restarted @param serviceName [required] The internal name of your cluster
[ "Restart", "a", "Cloudera", "Manager", "service", "(", "THIS", "ACTION", "WILL", "RESTART", "OTHER", "DEPENDANT", "SERVICES", ")" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-clusterhadoop/src/main/java/net/minidev/ovh/api/ApiOvhClusterhadoop.java#L129-L136
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java
MsgDestEncodingUtilsImpl.initializePropertyMaps
private static void initializePropertyMaps() { """ initializePropertyMaps Initialize the Property Maps which must each contain an entry for every supported Destination Property which is to be encoded or set via this class. """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(t...
java
private static void initializePropertyMaps() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "initializePropertyMap"); // Add all the supported properties to the PropertyMaps: // PR, DM, and TL use the PhantomPropertyCoder as they are encoded/decoded // separately rat...
[ "private", "static", "void", "initializePropertyMaps", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"initializePropertyMap\"", ")", ...
initializePropertyMaps Initialize the Property Maps which must each contain an entry for every supported Destination Property which is to be encoded or set via this class.
[ "initializePropertyMaps", "Initialize", "the", "Property", "Maps", "which", "must", "each", "contain", "an", "entry", "for", "every", "supported", "Destination", "Property", "which", "is", "to", "be", "encoded", "or", "set", "via", "this", "class", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java#L427-L460
wuman/orientdb-android
object/src/main/java/com/orientechnologies/orient/object/db/OObjectDatabaseTx.java
OObjectDatabaseTx.newInstance
public <RET extends Object> RET newInstance(final String iClassName, final Object iEnclosingClass, Object... iArgs) { """ Create a new POJO by its class name. Assure to have called the registerEntityClasses() declaring the packages that are part of entity classes. @see OEntityManager.registerEntityClasses(Stri...
java
public <RET extends Object> RET newInstance(final String iClassName, final Object iEnclosingClass, Object... iArgs) { checkSecurity(ODatabaseSecurityResources.CLASS, ORole.PERMISSION_CREATE, iClassName); try { RET enhanced = (RET) OObjectEntityEnhancer.getInstance().getProxiedInstance(entityManager.getEntit...
[ "public", "<", "RET", "extends", "Object", ">", "RET", "newInstance", "(", "final", "String", "iClassName", ",", "final", "Object", "iEnclosingClass", ",", "Object", "...", "iArgs", ")", "{", "checkSecurity", "(", "ODatabaseSecurityResources", ".", "CLASS", ",",...
Create a new POJO by its class name. Assure to have called the registerEntityClasses() declaring the packages that are part of entity classes. @see OEntityManager.registerEntityClasses(String)
[ "Create", "a", "new", "POJO", "by", "its", "class", "name", ".", "Assure", "to", "have", "called", "the", "registerEntityClasses", "()", "declaring", "the", "packages", "that", "are", "part", "of", "entity", "classes", "." ]
train
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/object/src/main/java/com/orientechnologies/orient/object/db/OObjectDatabaseTx.java#L110-L121
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsHdrsImpl.java
JsHdrsImpl.setFlagValue
private final void setFlagValue(byte flagBit, boolean value) { """ Set the boolean 'value' of one of the flags in the FLAGS field of th message. @param flagBit A byte with a single bit set on, marking the position of the required flag. @param value true if the required flag is to be set on, otherwise false ...
java
private final void setFlagValue(byte flagBit, boolean value) { if (value) { flags = (byte) (getFlags() | flagBit); } else { flags = (byte) (getFlags() & (~flagBit)); } }
[ "private", "final", "void", "setFlagValue", "(", "byte", "flagBit", ",", "boolean", "value", ")", "{", "if", "(", "value", ")", "{", "flags", "=", "(", "byte", ")", "(", "getFlags", "(", ")", "|", "flagBit", ")", ";", "}", "else", "{", "flags", "="...
Set the boolean 'value' of one of the flags in the FLAGS field of th message. @param flagBit A byte with a single bit set on, marking the position of the required flag. @param value true if the required flag is to be set on, otherwise false
[ "Set", "the", "boolean", "value", "of", "one", "of", "the", "flags", "in", "the", "FLAGS", "field", "of", "th", "message", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsHdrsImpl.java#L2572-L2579
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java
UnicodeSet.spanBack
public int spanBack(CharSequence s, SpanCondition spanCondition) { """ Span a string backwards (from the end) using this UnicodeSet. <p>To replace, count elements, or delete spans, see {@link android.icu.text.UnicodeSetSpanner UnicodeSetSpanner}. @param s The string to be spanned @param spanCondition The span c...
java
public int spanBack(CharSequence s, SpanCondition spanCondition) { return spanBack(s, s.length(), spanCondition); }
[ "public", "int", "spanBack", "(", "CharSequence", "s", ",", "SpanCondition", "spanCondition", ")", "{", "return", "spanBack", "(", "s", ",", "s", ".", "length", "(", ")", ",", "spanCondition", ")", ";", "}" ]
Span a string backwards (from the end) using this UnicodeSet. <p>To replace, count elements, or delete spans, see {@link android.icu.text.UnicodeSetSpanner UnicodeSetSpanner}. @param s The string to be spanned @param spanCondition The span condition @return The string index which starts the span (i.e. inclusive).
[ "Span", "a", "string", "backwards", "(", "from", "the", "end", ")", "using", "this", "UnicodeSet", ".", "<p", ">", "To", "replace", "count", "elements", "or", "delete", "spans", "see", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L4061-L4063
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsNotification.java
CmsNotification.sendDeferred
public void sendDeferred(final Type type, final String message) { """ Sends a new notification after all other events have been processed.<p> @param type the notification type @param message the message """ Scheduler.get().scheduleDeferred(new ScheduledCommand() { /** * @...
java
public void sendDeferred(final Type type, final String message) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { /** * @see com.google.gwt.core.client.Scheduler.ScheduledCommand#execute() */ public void execute() { send(type, messag...
[ "public", "void", "sendDeferred", "(", "final", "Type", "type", ",", "final", "String", "message", ")", "{", "Scheduler", ".", "get", "(", ")", ".", "scheduleDeferred", "(", "new", "ScheduledCommand", "(", ")", "{", "/**\n * @see com.google.gwt.core.cl...
Sends a new notification after all other events have been processed.<p> @param type the notification type @param message the message
[ "Sends", "a", "new", "notification", "after", "all", "other", "events", "have", "been", "processed", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsNotification.java#L207-L220
httl/httl
httl/src/main/java/httl/Engine.java
Engine.getTemplate
public Template getTemplate(String name, Object args) throws IOException, ParseException { """ Get template. @param name - template name @return template instance @throws IOException - If an I/O error occurs @throws ParseException - If the template cannot be parsed @see #getEngine() """ if (a...
java
public Template getTemplate(String name, Object args) throws IOException, ParseException { if (args instanceof String) return getTemplate(name, (String) args); if (args instanceof Locale) return getTemplate(name, (Locale) args); return getTemplate(name, null, null, args);...
[ "public", "Template", "getTemplate", "(", "String", "name", ",", "Object", "args", ")", "throws", "IOException", ",", "ParseException", "{", "if", "(", "args", "instanceof", "String", ")", "return", "getTemplate", "(", "name", ",", "(", "String", ")", "args"...
Get template. @param name - template name @return template instance @throws IOException - If an I/O error occurs @throws ParseException - If the template cannot be parsed @see #getEngine()
[ "Get", "template", "." ]
train
https://github.com/httl/httl/blob/e13e00f4ab41252a8f53d6dafd4a6610be9dcaad/httl/src/main/java/httl/Engine.java#L369-L375
aggregateknowledge/java-hll
src/main/java/net/agkn/hll/util/HLLUtil.java
HLLUtil.largeEstimator
public static double largeEstimator(final int log2m, final int registerSizeInBits, final double estimator) { """ The "large range correction" formula from the HyperLogLog algorithm, adapted for 64 bit hashes. Only appropriate for estimators whose value exceeds the return of {@link #largeEstimatorCutoff(int, int)...
java
public static double largeEstimator(final int log2m, final int registerSizeInBits, final double estimator) { final double twoToL = TWO_TO_L[(REG_WIDTH_INDEX_MULTIPLIER * registerSizeInBits) + log2m]; return -1 * twoToL * Math.log(1.0 - (estimator/twoToL)); }
[ "public", "static", "double", "largeEstimator", "(", "final", "int", "log2m", ",", "final", "int", "registerSizeInBits", ",", "final", "double", "estimator", ")", "{", "final", "double", "twoToL", "=", "TWO_TO_L", "[", "(", "REG_WIDTH_INDEX_MULTIPLIER", "*", "re...
The "large range correction" formula from the HyperLogLog algorithm, adapted for 64 bit hashes. Only appropriate for estimators whose value exceeds the return of {@link #largeEstimatorCutoff(int, int)}. @param log2m log-base-2 of the number of registers in the HLL. <em>b<em> in the paper. @param registerSizeInBits t...
[ "The", "large", "range", "correction", "formula", "from", "the", "HyperLogLog", "algorithm", "adapted", "for", "64", "bit", "hashes", ".", "Only", "appropriate", "for", "estimators", "whose", "value", "exceeds", "the", "return", "of", "{", "@link", "#largeEstima...
train
https://github.com/aggregateknowledge/java-hll/blob/1f4126e79a85b79581460c75bf1c1634b8a7402d/src/main/java/net/agkn/hll/util/HLLUtil.java#L198-L201
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_ProjectPoint.java
ST_ProjectPoint.projectPoint
public static Point projectPoint(Geometry point, Geometry geometry) { """ Project a point on a linestring or multilinestring @param point @param geometry @return """ if (point == null || geometry==null) { return null; } if (point.getDimension()==0 && geometry.getDimension...
java
public static Point projectPoint(Geometry point, Geometry geometry) { if (point == null || geometry==null) { return null; } if (point.getDimension()==0 && geometry.getDimension() == 1) { LengthIndexedLine ll = new LengthIndexedLine(geometry); double index = ll...
[ "public", "static", "Point", "projectPoint", "(", "Geometry", "point", ",", "Geometry", "geometry", ")", "{", "if", "(", "point", "==", "null", "||", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "point", ".", "getDimension",...
Project a point on a linestring or multilinestring @param point @param geometry @return
[ "Project", "a", "point", "on", "a", "linestring", "or", "multilinestring" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_ProjectPoint.java#L52-L63
tempodb/tempodb-java
src/main/java/com/tempodb/Client.java
Client.findDataPoints
public Cursor<DataPointFound> findDataPoints(Series series, Interval interval, Predicate predicate, DateTimeZone timezone) { """ Returns a cursor of intervals/datapoints matching a predicate specified by series. @param series The series @param interval An interval of time for the query (start/end datetimes) @...
java
public Cursor<DataPointFound> findDataPoints(Series series, Interval interval, Predicate predicate, DateTimeZone timezone) { checkNotNull(series); checkNotNull(interval); checkNotNull(predicate); checkNotNull(timezone); URI uri = null; try { URIBuilder builder = new URIBuilder(String.form...
[ "public", "Cursor", "<", "DataPointFound", ">", "findDataPoints", "(", "Series", "series", ",", "Interval", "interval", ",", "Predicate", "predicate", ",", "DateTimeZone", "timezone", ")", "{", "checkNotNull", "(", "series", ")", ";", "checkNotNull", "(", "inter...
Returns a cursor of intervals/datapoints matching a predicate specified by series. @param series The series @param interval An interval of time for the query (start/end datetimes) @param predicate The predicate for the query. @param timezone The time zone for the returned datapoints. @return A Cursor of DataPoints. Th...
[ "Returns", "a", "cursor", "of", "intervals", "/", "datapoints", "matching", "a", "predicate", "specified", "by", "series", "." ]
train
https://github.com/tempodb/tempodb-java/blob/5733f204fe4c8dda48916ba1f67cf44f5a3f9c69/src/main/java/com/tempodb/Client.java#L316-L336
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tdouble/Dcs_schol.java
Dcs_schol.cs_schol
public static Dcss cs_schol(int order, Dcs A) { """ Ordering and symbolic analysis for a Cholesky factorization. @param order ordering option (0 or 1) @param A column-compressed matrix @return symbolic analysis for Cholesky, null on error """ int n, c[], post[], P[]; Dcs C; Dc...
java
public static Dcss cs_schol(int order, Dcs A) { int n, c[], post[], P[]; Dcs C; Dcss S; if (!Dcs_util.CS_CSC(A)) return (null); /* check inputs */ n = A.n; S = new Dcss(); /* allocate result S */ P = Dcs_amd.cs_amd(order, A); /* P = amd(A+A'), ...
[ "public", "static", "Dcss", "cs_schol", "(", "int", "order", ",", "Dcs", "A", ")", "{", "int", "n", ",", "c", "[", "]", ",", "post", "[", "]", ",", "P", "[", "]", ";", "Dcs", "C", ";", "Dcss", "S", ";", "if", "(", "!", "Dcs_util", ".", "CS_...
Ordering and symbolic analysis for a Cholesky factorization. @param order ordering option (0 or 1) @param A column-compressed matrix @return symbolic analysis for Cholesky, null on error
[ "Ordering", "and", "symbolic", "analysis", "for", "a", "Cholesky", "factorization", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tdouble/Dcs_schol.java#L46-L65
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProject
public Project getProject(Object projectIdOrPath, Boolean includeStatistics) throws GitLabApiException { """ Get a specific project, which is owned by the authentication user. <pre><code>GET /projects/:id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project ...
java
public Project getProject(Object projectIdOrPath, Boolean includeStatistics) throws GitLabApiException { Form formData = new GitLabApiForm().withParam("statistics", includeStatistics); Response response = get(Response.Status.OK, formData.asMap(), "projects", this.getProjectIdOrPath(projectIdOrPath)); ...
[ "public", "Project", "getProject", "(", "Object", "projectIdOrPath", ",", "Boolean", "includeStatistics", ")", "throws", "GitLabApiException", "{", "Form", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"statistics\"", ",", "includeStati...
Get a specific project, which is owned by the authentication user. <pre><code>GET /projects/:id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param includeStatistics include project statistics @return the specified project @throws GitLabApiException ...
[ "Get", "a", "specific", "project", "which", "is", "owned", "by", "the", "authentication", "user", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L584-L588
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getAttributeBoolean
@Pure public static boolean getAttributeBoolean(Node document, String... path) { """ Replies the boolean value that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. Be careful about the fact that the names are case sensitives...
java
@Pure public static boolean getAttributeBoolean(Node document, String... path) { assert document != null : AssertMessages.notNullParameter(0); return getAttributeBooleanWithDefault(document, true, false, path); }
[ "@", "Pure", "public", "static", "boolean", "getAttributeBoolean", "(", "Node", "document", ",", "String", "...", "path", ")", "{", "assert", "document", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ")", ";", "return", "getAttributeB...
Replies the boolean value that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. Be careful about the fact that the names are case sensitives. @param document is the XML document to explore. @param path is the list of and ended by the ...
[ "Replies", "the", "boolean", "value", "that", "corresponds", "to", "the", "specified", "attribute", "s", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L299-L303
citrusframework/citrus
modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java
MailMessageConverter.handleImageBinaryPart
protected BodyPart handleImageBinaryPart(MimePart image, String contentType) throws IOException, MessagingException { """ Construct base64 body part from image data. @param image @param contentType @return @throws IOException """ ByteArrayOutputStream bos = new ByteArrayOutputStream(); File...
java
protected BodyPart handleImageBinaryPart(MimePart image, String contentType) throws IOException, MessagingException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); FileCopyUtils.copy(image.getInputStream(), bos); String base64 = Base64.encodeBase64String(bos.toByteArray()); re...
[ "protected", "BodyPart", "handleImageBinaryPart", "(", "MimePart", "image", ",", "String", "contentType", ")", "throws", "IOException", ",", "MessagingException", "{", "ByteArrayOutputStream", "bos", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "FileCopyUtils", ...
Construct base64 body part from image data. @param image @param contentType @return @throws IOException
[ "Construct", "base64", "body", "part", "from", "image", "data", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-mail/src/main/java/com/consol/citrus/mail/message/MailMessageConverter.java#L236-L241
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/zone/Ser.java
Ser.writeOffset
static void writeOffset(ZoneOffset offset, DataOutput out) throws IOException { """ Writes the state to the stream. @param offset the offset, not null @param out the output stream, not null @throws IOException if an error occurs """ final int offsetSecs = offset.getTotalSeconds(); int of...
java
static void writeOffset(ZoneOffset offset, DataOutput out) throws IOException { final int offsetSecs = offset.getTotalSeconds(); int offsetByte = offsetSecs % 900 == 0 ? offsetSecs / 900 : 127; // compress to -72 to +72 out.writeByte(offsetByte); if (offsetByte == 127) { out...
[ "static", "void", "writeOffset", "(", "ZoneOffset", "offset", ",", "DataOutput", "out", ")", "throws", "IOException", "{", "final", "int", "offsetSecs", "=", "offset", ".", "getTotalSeconds", "(", ")", ";", "int", "offsetByte", "=", "offsetSecs", "%", "900", ...
Writes the state to the stream. @param offset the offset, not null @param out the output stream, not null @throws IOException if an error occurs
[ "Writes", "the", "state", "to", "the", "stream", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/zone/Ser.java#L221-L228
ManfredTremmel/gwt-commons-lang3
src/main/resources/org/apache/commons/jre/java/util/GregorianCalendar.java
GregorianCalendar.compareDate
private int compareDate(Date a, Date b) { """ Calculate the number of days between two dates @param a Date @param b Date @return the difference in days between b and a (b - a) """ final Date ta = new Date(a.getTime()); final Date tb = new Date(b.getTime()); final long d1 = setHourToZero(ta).getTime(...
java
private int compareDate(Date a, Date b) { final Date ta = new Date(a.getTime()); final Date tb = new Date(b.getTime()); final long d1 = setHourToZero(ta).getTime(); final long d2 = setHourToZero(tb).getTime(); return (int) Math.round((d2 - d1) / 1000.0 / 60.0 / 60.0 / 24.0); }
[ "private", "int", "compareDate", "(", "Date", "a", ",", "Date", "b", ")", "{", "final", "Date", "ta", "=", "new", "Date", "(", "a", ".", "getTime", "(", ")", ")", ";", "final", "Date", "tb", "=", "new", "Date", "(", "b", ".", "getTime", "(", ")...
Calculate the number of days between two dates @param a Date @param b Date @return the difference in days between b and a (b - a)
[ "Calculate", "the", "number", "of", "days", "between", "two", "dates" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/resources/org/apache/commons/jre/java/util/GregorianCalendar.java#L365-L371
m-m-m/util
pojopath/src/main/java/net/sf/mmm/util/pojo/path/base/AbstractPojoPathNavigator.java
AbstractPojoPathNavigator.createState
protected PojoPathState createState(Object initialPojo, String pojoPath, PojoPathMode mode, PojoPathContext context) { """ This method gets the {@link PojoPathState} for the given {@code context}. @param initialPojo is the initial {@link net.sf.mmm.util.pojo.api.Pojo} this {@link PojoPathNavigator} was invoked ...
java
protected PojoPathState createState(Object initialPojo, String pojoPath, PojoPathMode mode, PojoPathContext context) { if (mode == null) { throw new NlsNullPointerException("mode"); } Map<Object, Object> rawCache = context.getCache(); if (rawCache == null) { CachingPojoPath rootPath = new C...
[ "protected", "PojoPathState", "createState", "(", "Object", "initialPojo", ",", "String", "pojoPath", ",", "PojoPathMode", "mode", ",", "PojoPathContext", "context", ")", "{", "if", "(", "mode", "==", "null", ")", "{", "throw", "new", "NlsNullPointerException", ...
This method gets the {@link PojoPathState} for the given {@code context}. @param initialPojo is the initial {@link net.sf.mmm.util.pojo.api.Pojo} this {@link PojoPathNavigator} was invoked with. @param pojoPath is the {@link net.sf.mmm.util.pojo.path.api.PojoPath} to navigate. @param mode is the {@link PojoPathMode mo...
[ "This", "method", "gets", "the", "{", "@link", "PojoPathState", "}", "for", "the", "given", "{", "@code", "context", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/pojopath/src/main/java/net/sf/mmm/util/pojo/path/base/AbstractPojoPathNavigator.java#L219-L236
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/JMessageClient.java
JMessageClient.setNoDisturb
public ResponseWrapper setNoDisturb(String username, NoDisturbPayload payload) throws APIConnectionException, APIRequestException { """ Set don't disturb service while receiving messages. You can Add or remove single conversation or group conversation @param username Necessary @param payload NoDistu...
java
public ResponseWrapper setNoDisturb(String username, NoDisturbPayload payload) throws APIConnectionException, APIRequestException { return _userClient.setNoDisturb(username, payload); }
[ "public", "ResponseWrapper", "setNoDisturb", "(", "String", "username", ",", "NoDisturbPayload", "payload", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "return", "_userClient", ".", "setNoDisturb", "(", "username", ",", "payload", ")", ";...
Set don't disturb service while receiving messages. You can Add or remove single conversation or group conversation @param username Necessary @param payload NoDisturbPayload @return No content @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Set", "don", "t", "disturb", "service", "while", "receiving", "messages", ".", "You", "can", "Add", "or", "remove", "single", "conversation", "or", "group", "conversation" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/JMessageClient.java#L277-L280
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
SqlQueryStatement.buildAliasKey
private String buildAliasKey(String aPath, List hintClasses) { """ Build the key for the TableAlias based on the path and the hints @param aPath @param hintClasses @return the key for the TableAlias """ if (hintClasses == null || hintClasses.isEmpty()) { return aPath; ...
java
private String buildAliasKey(String aPath, List hintClasses) { if (hintClasses == null || hintClasses.isEmpty()) { return aPath; } StringBuffer buf = new StringBuffer(aPath); for (Iterator iter = hintClasses.iterator(); iter.hasNext();) {...
[ "private", "String", "buildAliasKey", "(", "String", "aPath", ",", "List", "hintClasses", ")", "{", "if", "(", "hintClasses", "==", "null", "||", "hintClasses", ".", "isEmpty", "(", ")", ")", "{", "return", "aPath", ";", "}", "StringBuffer", "buf", "=", ...
Build the key for the TableAlias based on the path and the hints @param aPath @param hintClasses @return the key for the TableAlias
[ "Build", "the", "key", "for", "the", "TableAlias", "based", "on", "the", "path", "and", "the", "hints" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java#L1381-L1396
gotev/android-upload-service
uploadservice/src/main/java/net/gotev/uploadservice/HttpUploadRequest.java
HttpUploadRequest.addArrayParameter
public B addArrayParameter(final String paramName, final String... array) { """ Adds a parameter with multiple values to this upload request. @param paramName parameter name @param array values @return self instance """ for (String value : array) { httpParams.addParameter(paramName, va...
java
public B addArrayParameter(final String paramName, final String... array) { for (String value : array) { httpParams.addParameter(paramName, value); } return self(); }
[ "public", "B", "addArrayParameter", "(", "final", "String", "paramName", ",", "final", "String", "...", "array", ")", "{", "for", "(", "String", "value", ":", "array", ")", "{", "httpParams", ".", "addParameter", "(", "paramName", ",", "value", ")", ";", ...
Adds a parameter with multiple values to this upload request. @param paramName parameter name @param array values @return self instance
[ "Adds", "a", "parameter", "with", "multiple", "values", "to", "this", "upload", "request", "." ]
train
https://github.com/gotev/android-upload-service/blob/0952fcbe4b32c100150ffd0a237de3be4942e0a8/uploadservice/src/main/java/net/gotev/uploadservice/HttpUploadRequest.java#L97-L102
apache/groovy
subprojects/groovy-xml/src/main/java/groovy/xml/XmlUtil.java
XmlUtil.newSAXParser
public static SAXParser newSAXParser(String schemaLanguage, boolean namespaceAware, boolean validating, File schema) throws SAXException, ParserConfigurationException { """ Factory method to create a SAXParser configured to validate according to a particular schema language and a File containing the schema to val...
java
public static SAXParser newSAXParser(String schemaLanguage, boolean namespaceAware, boolean validating, File schema) throws SAXException, ParserConfigurationException { SchemaFactory schemaFactory = SchemaFactory.newInstance(schemaLanguage); return newSAXParser(namespaceAware, validating, schemaFactory....
[ "public", "static", "SAXParser", "newSAXParser", "(", "String", "schemaLanguage", ",", "boolean", "namespaceAware", ",", "boolean", "validating", ",", "File", "schema", ")", "throws", "SAXException", ",", "ParserConfigurationException", "{", "SchemaFactory", "schemaFact...
Factory method to create a SAXParser configured to validate according to a particular schema language and a File containing the schema to validate against. @param schemaLanguage the schema language used, e.g. XML Schema or RelaxNG (as per the String representation in javax.xml.XMLConstants) @param namespaceAware will ...
[ "Factory", "method", "to", "create", "a", "SAXParser", "configured", "to", "validate", "according", "to", "a", "particular", "schema", "language", "and", "a", "File", "containing", "the", "schema", "to", "validate", "against", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-xml/src/main/java/groovy/xml/XmlUtil.java#L291-L294
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Shape.java
Shape.doApplyShadow
protected final void doApplyShadow(final Context2D context, final Attributes attr) { """ Applies this shape's Shadow. @param context @param attr @return boolean """ if ((false == isAppliedShadow()) && (attr.hasShadow())) { setAppliedShadow(true); final Shadow shado...
java
protected final void doApplyShadow(final Context2D context, final Attributes attr) { if ((false == isAppliedShadow()) && (attr.hasShadow())) { setAppliedShadow(true); final Shadow shadow = attr.getShadow(); if (null != shadow) { conte...
[ "protected", "final", "void", "doApplyShadow", "(", "final", "Context2D", "context", ",", "final", "Attributes", "attr", ")", "{", "if", "(", "(", "false", "==", "isAppliedShadow", "(", ")", ")", "&&", "(", "attr", ".", "hasShadow", "(", ")", ")", ")", ...
Applies this shape's Shadow. @param context @param attr @return boolean
[ "Applies", "this", "shape", "s", "Shadow", "." ]
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Shape.java#L670-L683
mfornos/humanize
humanize-icu/src/main/java/humanize/ICUHumanize.java
ICUHumanize.naturalTime
public static String naturalTime(final Date reference, final Date duration) { """ <p> Computes both past and future relative dates. </p> <p> E.g. "1 day ago", "1 day from now", "10 years ago", "3 minutes from now" and so on. </p> @param reference Date to be used as reference @param duration Date to b...
java
public static String naturalTime(final Date reference, final Date duration) { long diff = duration.getTime() - reference.getTime(); return context.get().getDurationFormat().formatDurationFrom(diff, reference.getTime()); }
[ "public", "static", "String", "naturalTime", "(", "final", "Date", "reference", ",", "final", "Date", "duration", ")", "{", "long", "diff", "=", "duration", ".", "getTime", "(", ")", "-", "reference", ".", "getTime", "(", ")", ";", "return", "context", "...
<p> Computes both past and future relative dates. </p> <p> E.g. "1 day ago", "1 day from now", "10 years ago", "3 minutes from now" and so on. </p> @param reference Date to be used as reference @param duration Date to be used as duration from reference @return String representing the relative date
[ "<p", ">", "Computes", "both", "past", "and", "future", "relative", "dates", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-icu/src/main/java/humanize/ICUHumanize.java#L1336-L1340
jcuda/jcuda
JCudaJava/src/main/java/jcuda/cuDoubleComplex.java
cuDoubleComplex.cuCadd
public static cuDoubleComplex cuCadd (cuDoubleComplex x, cuDoubleComplex y) { """ Returns a new complex number that is the sum of the given complex numbers. @param x The first addend @param y The second addend @return The sum of the given addends """ return cuCmplx (cuCreal(x) + cuCreal(y), cuC...
java
public static cuDoubleComplex cuCadd (cuDoubleComplex x, cuDoubleComplex y) { return cuCmplx (cuCreal(x) + cuCreal(y), cuCimag(x) + cuCimag(y)); }
[ "public", "static", "cuDoubleComplex", "cuCadd", "(", "cuDoubleComplex", "x", ",", "cuDoubleComplex", "y", ")", "{", "return", "cuCmplx", "(", "cuCreal", "(", "x", ")", "+", "cuCreal", "(", "y", ")", ",", "cuCimag", "(", "x", ")", "+", "cuCimag", "(", ...
Returns a new complex number that is the sum of the given complex numbers. @param x The first addend @param y The second addend @return The sum of the given addends
[ "Returns", "a", "new", "complex", "number", "that", "is", "the", "sum", "of", "the", "given", "complex", "numbers", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/cuDoubleComplex.java#L104-L107
tvesalainen/util
util/src/main/java/org/vesalainen/math/ConvexPolygon.java
ConvexPolygon.distanceFromLine
public static double distanceFromLine(double x0, double y0, double x1, double y1, double x2, double y2) { """ Returns distance from point (x0, y0) to line that goes through points (x1, y1) and (x2, y2) @param x0 @param y0 @param x1 @param y1 @param x2 @param y2 @return """ double dx = x2-x1; ...
java
public static double distanceFromLine(double x0, double y0, double x1, double y1, double x2, double y2) { double dx = x2-x1; if (dx == 0.0) { return Math.abs(x1-x0); } double dy = y2-y1; if (dy == 0.0) { return Math.abs(y1-y0)...
[ "public", "static", "double", "distanceFromLine", "(", "double", "x0", ",", "double", "y0", ",", "double", "x1", ",", "double", "y1", ",", "double", "x2", ",", "double", "y2", ")", "{", "double", "dx", "=", "x2", "-", "x1", ";", "if", "(", "dx", "=...
Returns distance from point (x0, y0) to line that goes through points (x1, y1) and (x2, y2) @param x0 @param y0 @param x1 @param y1 @param x2 @param y2 @return
[ "Returns", "distance", "from", "point", "(", "x0", "y0", ")", "to", "line", "that", "goes", "through", "points", "(", "x1", "y1", ")", "and", "(", "x2", "y2", ")" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/ConvexPolygon.java#L127-L140
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/TypeUtility.java
TypeUtility.className
public static ClassName className(String className) { """ Generate class typeName. @param className the class name @return class typeName generated """ int index = className.lastIndexOf("."); if (index > 0) { return classNameWithSuffix(className.substring(0, index), className.substring(index + 1), ...
java
public static ClassName className(String className) { int index = className.lastIndexOf("."); if (index > 0) { return classNameWithSuffix(className.substring(0, index), className.substring(index + 1), ""); } return ClassName.get("", className); }
[ "public", "static", "ClassName", "className", "(", "String", "className", ")", "{", "int", "index", "=", "className", ".", "lastIndexOf", "(", "\".\"", ")", ";", "if", "(", "index", ">", "0", ")", "{", "return", "classNameWithSuffix", "(", "className", "."...
Generate class typeName. @param className the class name @return class typeName generated
[ "Generate", "class", "typeName", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/TypeUtility.java#L205-L212
spring-projects/spring-boot
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateProperties.java
HibernateProperties.determineHibernateProperties
public Map<String, Object> determineHibernateProperties( Map<String, String> jpaProperties, HibernateSettings settings) { """ Determine the configuration properties for the initialization of the main Hibernate EntityManagerFactory based on standard JPA properties and {@link HibernateSettings}. @param jpaProp...
java
public Map<String, Object> determineHibernateProperties( Map<String, String> jpaProperties, HibernateSettings settings) { Assert.notNull(jpaProperties, "JpaProperties must not be null"); Assert.notNull(settings, "Settings must not be null"); return getAdditionalProperties(jpaProperties, settings); }
[ "public", "Map", "<", "String", ",", "Object", ">", "determineHibernateProperties", "(", "Map", "<", "String", ",", "String", ">", "jpaProperties", ",", "HibernateSettings", "settings", ")", "{", "Assert", ".", "notNull", "(", "jpaProperties", ",", "\"JpaPropert...
Determine the configuration properties for the initialization of the main Hibernate EntityManagerFactory based on standard JPA properties and {@link HibernateSettings}. @param jpaProperties standard JPA properties @param settings the settings to apply when determining the configuration properties @return the Hibernate ...
[ "Determine", "the", "configuration", "properties", "for", "the", "initialization", "of", "the", "main", "Hibernate", "EntityManagerFactory", "based", "on", "standard", "JPA", "properties", "and", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateProperties.java#L90-L95
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/hc/ext/HCConditionalCommentNode.java
HCConditionalCommentNode.getAsConditionalCommentNode
@Nonnull public static HCConditionalCommentNode getAsConditionalCommentNode (@Nonnull @Nonempty final String sCondition, @Nonnull final IHCNode aNode) { """ Get the passed node wrapped in a conditional comment. This is a sanity method for <co...
java
@Nonnull public static HCConditionalCommentNode getAsConditionalCommentNode (@Nonnull @Nonempty final String sCondition, @Nonnull final IHCNode aNode) { if (aNode instanceof HCConditionalCommentNode) return (HCConditionalCommentNode) aN...
[ "@", "Nonnull", "public", "static", "HCConditionalCommentNode", "getAsConditionalCommentNode", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sCondition", ",", "@", "Nonnull", "final", "IHCNode", "aNode", ")", "{", "if", "(", "aNode", "instanceof", "HCC...
Get the passed node wrapped in a conditional comment. This is a sanity method for <code>new HCConditionalCommentNode (this, sCondition)</code>. If this node is already an {@link HCConditionalCommentNode} the object is simply casted. @param sCondition The condition to us. May neither be <code>null</code> nor empty. @pa...
[ "Get", "the", "passed", "node", "wrapped", "in", "a", "conditional", "comment", ".", "This", "is", "a", "sanity", "method", "for", "<code", ">", "new", "HCConditionalCommentNode", "(", "this", "sCondition", ")", "<", "/", "code", ">", ".", "If", "this", ...
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/hc/ext/HCConditionalCommentNode.java#L423-L430
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java
TransactionOutPoint.getConnectedRedeemData
@Nullable public RedeemData getConnectedRedeemData(KeyBag keyBag) throws ScriptException { """ Returns the RedeemData identified in the connected output, for either P2PKH, P2WPKH, P2PK or P2SH scripts. If the script forms cannot be understood, throws ScriptException. @return a RedeemData or null if the co...
java
@Nullable public RedeemData getConnectedRedeemData(KeyBag keyBag) throws ScriptException { TransactionOutput connectedOutput = getConnectedOutput(); checkNotNull(connectedOutput, "Input is not connected so cannot retrieve key"); Script connectedScript = connectedOutput.getScriptPubKey(); ...
[ "@", "Nullable", "public", "RedeemData", "getConnectedRedeemData", "(", "KeyBag", "keyBag", ")", "throws", "ScriptException", "{", "TransactionOutput", "connectedOutput", "=", "getConnectedOutput", "(", ")", ";", "checkNotNull", "(", "connectedOutput", ",", "\"Input is ...
Returns the RedeemData identified in the connected output, for either P2PKH, P2WPKH, P2PK or P2SH scripts. If the script forms cannot be understood, throws ScriptException. @return a RedeemData or null if the connected data cannot be found in the wallet.
[ "Returns", "the", "RedeemData", "identified", "in", "the", "connected", "output", "for", "either", "P2PKH", "P2WPKH", "P2PK", "or", "P2SH", "scripts", ".", "If", "the", "script", "forms", "cannot", "be", "understood", "throws", "ScriptException", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/TransactionOutPoint.java#L165-L185
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/regions/RegionMetadataParser.java
RegionMetadataParser.parseRegionMetadata
@Deprecated public List<Region> parseRegionMetadata(final InputStream input, final boolean endpointVerification) throws IOException { """ Parses the specified input stream and optionally verifies that all of the endpoints end in ".amazonaws.com". This me...
java
@Deprecated public List<Region> parseRegionMetadata(final InputStream input, final boolean endpointVerification) throws IOException { return internalParse(input, endpointVerification); }
[ "@", "Deprecated", "public", "List", "<", "Region", ">", "parseRegionMetadata", "(", "final", "InputStream", "input", ",", "final", "boolean", "endpointVerification", ")", "throws", "IOException", "{", "return", "internalParse", "(", "input", ",", "endpointVerificat...
Parses the specified input stream and optionally verifies that all of the endpoints end in ".amazonaws.com". This method is deprecated, since not all valid AWS endpoints end in ".amazonaws.com" any more. @param input The stream containing the region metadata to parse. @param endpointVerification Whether to verify each...
[ "Parses", "the", "specified", "input", "stream", "and", "optionally", "verifies", "that", "all", "of", "the", "endpoints", "end", "in", ".", "amazonaws", ".", "com", ".", "This", "method", "is", "deprecated", "since", "not", "all", "valid", "AWS", "endpoints...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/regions/RegionMetadataParser.java#L99-L105
jbundle/jbundle
thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/memory/MemoryRemoteTable.java
MemoryRemoteTable.set
public void set(Object data, int iOpenMode) throws DBException, RemoteException { """ Update the current record. @param The data to update. @exception Exception File exception. """ if (m_objCurrentKey == null) throw new DBException(Constants.INVALID_RECORD); Object key = this.getK...
java
public void set(Object data, int iOpenMode) throws DBException, RemoteException { if (m_objCurrentKey == null) throw new DBException(Constants.INVALID_RECORD); Object key = this.getKey(data); if (!key.equals(m_objCurrentKey)) m_mDataMap.remove(key); m_mDataMap...
[ "public", "void", "set", "(", "Object", "data", ",", "int", "iOpenMode", ")", "throws", "DBException", ",", "RemoteException", "{", "if", "(", "m_objCurrentKey", "==", "null", ")", "throw", "new", "DBException", "(", "Constants", ".", "INVALID_RECORD", ")", ...
Update the current record. @param The data to update. @exception Exception File exception.
[ "Update", "the", "current", "record", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/memory/MemoryRemoteTable.java#L160-L169
nohana/Amalgam
amalgam/src/main/java/com/amalgam/app/DialogFragmentUtils.java
DialogFragmentUtils.supportShowOnLoaderCallback
public static void supportShowOnLoaderCallback(final android.support.v4.app.FragmentManager manager, final android.support.v4.app.DialogFragment fragment, final String tag) { """ Show {@link android.support.v4.app.DialogFragment} with the specified tag on the loader callbacks. @param manager the manager. @param ...
java
public static void supportShowOnLoaderCallback(final android.support.v4.app.FragmentManager manager, final android.support.v4.app.DialogFragment fragment, final String tag) { supportShowOnLoaderCallback(HandlerUtils.getMainHandler(), manager, fragment, tag); }
[ "public", "static", "void", "supportShowOnLoaderCallback", "(", "final", "android", ".", "support", ".", "v4", ".", "app", ".", "FragmentManager", "manager", ",", "final", "android", ".", "support", ".", "v4", ".", "app", ".", "DialogFragment", "fragment", ","...
Show {@link android.support.v4.app.DialogFragment} with the specified tag on the loader callbacks. @param manager the manager. @param fragment the fragment. @param tag the tag string that is related to the {@link android.support.v4.app.DialogFragment}.
[ "Show", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/app/DialogFragmentUtils.java#L150-L152
gsi-upm/BeastTool
beast-tool/src/main/java/es/upm/dit/gsi/beast/reader/mas/CreateMASCaseManager.java
CreateMASCaseManager.closeMASCaseManager
public static void closeMASCaseManager(File caseManager) { """ Method to close the file caseManager. It is called just one time, by the MASReader, once every test and stroy have been added. @param caseManager """ FileWriter caseManagerWriter; try { caseManagerWriter = new FileW...
java
public static void closeMASCaseManager(File caseManager) { FileWriter caseManagerWriter; try { caseManagerWriter = new FileWriter(caseManager, true); caseManagerWriter.write("}\n"); caseManagerWriter.flush(); caseManagerWriter.close(); } catch (IO...
[ "public", "static", "void", "closeMASCaseManager", "(", "File", "caseManager", ")", "{", "FileWriter", "caseManagerWriter", ";", "try", "{", "caseManagerWriter", "=", "new", "FileWriter", "(", "caseManager", ",", "true", ")", ";", "caseManagerWriter", ".", "write"...
Method to close the file caseManager. It is called just one time, by the MASReader, once every test and stroy have been added. @param caseManager
[ "Method", "to", "close", "the", "file", "caseManager", ".", "It", "is", "called", "just", "one", "time", "by", "the", "MASReader", "once", "every", "test", "and", "stroy", "have", "been", "added", "." ]
train
https://github.com/gsi-upm/BeastTool/blob/cc7fdc75cb818c5d60802aaf32c27829e0ca144c/beast-tool/src/main/java/es/upm/dit/gsi/beast/reader/mas/CreateMASCaseManager.java#L244-L258
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/OAuthApi.java
OAuthApi.loadLegacyTokenProperties
private Properties loadLegacyTokenProperties(InputStream inputStream) throws JinxException { """ /* Load legacy properties. The legacy token object stored its data as an XML properties file. Given the input stream to that file, we load a Properties object and return it. """ Properties p = new Properties...
java
private Properties loadLegacyTokenProperties(InputStream inputStream) throws JinxException { Properties p = new Properties(); try { p.loadFromXML(inputStream); } catch (Exception e) { throw new JinxException("Unable to load data from input stream.", e); } return p; }
[ "private", "Properties", "loadLegacyTokenProperties", "(", "InputStream", "inputStream", ")", "throws", "JinxException", "{", "Properties", "p", "=", "new", "Properties", "(", ")", ";", "try", "{", "p", ".", "loadFromXML", "(", "inputStream", ")", ";", "}", "c...
/* Load legacy properties. The legacy token object stored its data as an XML properties file. Given the input stream to that file, we load a Properties object and return it.
[ "/", "*", "Load", "legacy", "properties", ".", "The", "legacy", "token", "object", "stored", "its", "data", "as", "an", "XML", "properties", "file", ".", "Given", "the", "input", "stream", "to", "that", "file", "we", "load", "a", "Properties", "object", ...
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/OAuthApi.java#L188-L196
katjahahn/PortEx
src/main/java/com/github/katjahahn/tools/visualizer/Visualizer.java
Visualizer.writeImage
public void writeImage(File input, File output, String formatName) throws IOException { """ Writes an image to the output file that displays the structure of the PE file. @param input the PE file to create an image from @param output the file to write the image to @param formatName the format name for ...
java
public void writeImage(File input, File output, String formatName) throws IOException { BufferedImage image = createImage(input); ImageIO.write(image, formatName, output); }
[ "public", "void", "writeImage", "(", "File", "input", ",", "File", "output", ",", "String", "formatName", ")", "throws", "IOException", "{", "BufferedImage", "image", "=", "createImage", "(", "input", ")", ";", "ImageIO", ".", "write", "(", "image", ",", "...
Writes an image to the output file that displays the structure of the PE file. @param input the PE file to create an image from @param output the file to write the image to @param formatName the format name for the output image @throws IOException if sections can not be read
[ "Writes", "an", "image", "to", "the", "output", "file", "that", "displays", "the", "structure", "of", "the", "PE", "file", "." ]
train
https://github.com/katjahahn/PortEx/blob/319f08560aa58e3d5d7abe346ffdf623d6dc6990/src/main/java/com/github/katjahahn/tools/visualizer/Visualizer.java#L339-L343
Azure/azure-sdk-for-java
mixedreality/resource-manager/v2019_02_28_preview/src/main/java/com/microsoft/azure/management/mixedreality/v2019_02_28_preview/implementation/SpatialAnchorsAccountsInner.java
SpatialAnchorsAccountsInner.getKeys
public SpatialAnchorsAccountKeysInner getKeys(String resourceGroupName, String spatialAnchorsAccountName) { """ Get Both of the 2 Keys of a Spatial Anchors Account. @param resourceGroupName Name of an Azure resource group. @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. @thr...
java
public SpatialAnchorsAccountKeysInner getKeys(String resourceGroupName, String spatialAnchorsAccountName) { return getKeysWithServiceResponseAsync(resourceGroupName, spatialAnchorsAccountName).toBlocking().single().body(); }
[ "public", "SpatialAnchorsAccountKeysInner", "getKeys", "(", "String", "resourceGroupName", ",", "String", "spatialAnchorsAccountName", ")", "{", "return", "getKeysWithServiceResponseAsync", "(", "resourceGroupName", ",", "spatialAnchorsAccountName", ")", ".", "toBlocking", "(...
Get Both of the 2 Keys of a Spatial Anchors Account. @param resourceGroupName Name of an Azure resource group. @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the reques...
[ "Get", "Both", "of", "the", "2", "Keys", "of", "a", "Spatial", "Anchors", "Account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mixedreality/resource-manager/v2019_02_28_preview/src/main/java/com/microsoft/azure/management/mixedreality/v2019_02_28_preview/implementation/SpatialAnchorsAccountsInner.java#L705-L707
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.readFile
public static String readFile(File file, long start, int length) throws IOException { """ 从指定位置读取指定长度 @param file 文件 @param start 开始位置 @param length 读取长度 @return 文件内容 @throws IOException 异常 """ byte[] bs = new byte[length]; try (FileInputStream fis = new FileInputStream(file)) { ...
java
public static String readFile(File file, long start, int length) throws IOException { byte[] bs = new byte[length]; try (FileInputStream fis = new FileInputStream(file)) { fis.skip(start); fis.read(bs); } return new String(bs); }
[ "public", "static", "String", "readFile", "(", "File", "file", ",", "long", "start", ",", "int", "length", ")", "throws", "IOException", "{", "byte", "[", "]", "bs", "=", "new", "byte", "[", "length", "]", ";", "try", "(", "FileInputStream", "fis", "="...
从指定位置读取指定长度 @param file 文件 @param start 开始位置 @param length 读取长度 @return 文件内容 @throws IOException 异常
[ "从指定位置读取指定长度" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L946-L953
Azure/azure-sdk-for-java
streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/StreamingJobsInner.java
StreamingJobsInner.beginCreateOrReplaceAsync
public Observable<StreamingJobInner> beginCreateOrReplaceAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch, String ifNoneMatch) { """ Creates a streaming job or replaces an already existing streaming job. @param resourceGroupName The name of the resource group that c...
java
public Observable<StreamingJobInner> beginCreateOrReplaceAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch, String ifNoneMatch) { return beginCreateOrReplaceWithServiceResponseAsync(resourceGroupName, jobName, streamingJob, ifMatch, ifNoneMatch).map(new Func1<Service...
[ "public", "Observable", "<", "StreamingJobInner", ">", "beginCreateOrReplaceAsync", "(", "String", "resourceGroupName", ",", "String", "jobName", ",", "StreamingJobInner", "streamingJob", ",", "String", "ifMatch", ",", "String", "ifNoneMatch", ")", "{", "return", "beg...
Creates a streaming job or replaces an already existing streaming job. @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 jobName The name of the streaming job. @param streamingJob The definition of the...
[ "Creates", "a", "streaming", "job", "or", "replaces", "an", "already", "existing", "streaming", "job", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/StreamingJobsInner.java#L428-L435
finmath/finmath-lib
src/main/java/net/finmath/marketdata/products/SwapAnnuity.java
SwapAnnuity.getSwapAnnuity
public static double getSwapAnnuity(double evaluationTime, Schedule schedule, DiscountCurve discountCurve, AnalyticModel model) { """ Function to calculate an (idealized) swap annuity for a given schedule and discount curve. Note that, the value returned is divided by the discount factor at evaluation. This ma...
java
public static double getSwapAnnuity(double evaluationTime, Schedule schedule, DiscountCurve discountCurve, AnalyticModel model) { double value = 0.0; for(int periodIndex=0; periodIndex<schedule.getNumberOfPeriods(); periodIndex++) { double paymentDate = schedule.getPayment(periodIndex); if(paymentDate <= eva...
[ "public", "static", "double", "getSwapAnnuity", "(", "double", "evaluationTime", ",", "Schedule", "schedule", ",", "DiscountCurve", "discountCurve", ",", "AnalyticModel", "model", ")", "{", "double", "value", "=", "0.0", ";", "for", "(", "int", "periodIndex", "=...
Function to calculate an (idealized) swap annuity for a given schedule and discount curve. Note that, the value returned is divided by the discount factor at evaluation. This matters, if the discount factor at evaluationTime is not equal to 1.0. @param evaluationTime The evaluation time as double. Cash flows prior an...
[ "Function", "to", "calculate", "an", "(", "idealized", ")", "swap", "annuity", "for", "a", "given", "schedule", "and", "discount", "curve", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/products/SwapAnnuity.java#L117-L130
nostra13/Android-Universal-Image-Loader
library/src/main/java/com/nostra13/universalimageloader/core/download/BaseImageDownloader.java
BaseImageDownloader.getStreamFromAssets
protected InputStream getStreamFromAssets(String imageUri, Object extra) throws IOException { """ Retrieves {@link InputStream} of image by URI (image is located in assets of application). @param imageUri Image URI @param extra Auxiliary object which was passed to {@link DisplayImageOptions.Builder#extraFor...
java
protected InputStream getStreamFromAssets(String imageUri, Object extra) throws IOException { String filePath = Scheme.ASSETS.crop(imageUri); return context.getAssets().open(filePath); }
[ "protected", "InputStream", "getStreamFromAssets", "(", "String", "imageUri", ",", "Object", "extra", ")", "throws", "IOException", "{", "String", "filePath", "=", "Scheme", ".", "ASSETS", ".", "crop", "(", "imageUri", ")", ";", "return", "context", ".", "getA...
Retrieves {@link InputStream} of image by URI (image is located in assets of application). @param imageUri Image URI @param extra Auxiliary object which was passed to {@link DisplayImageOptions.Builder#extraForDownloader(Object) DisplayImageOptions.extraForDownloader(Object)}; can be null @return {@link InputStream...
[ "Retrieves", "{", "@link", "InputStream", "}", "of", "image", "by", "URI", "(", "image", "is", "located", "in", "assets", "of", "application", ")", "." ]
train
https://github.com/nostra13/Android-Universal-Image-Loader/blob/fc3c5f6779bb4f702e233653b61bd9d559e345cc/library/src/main/java/com/nostra13/universalimageloader/core/download/BaseImageDownloader.java#L247-L250
codeprimate-software/cp-elements
src/main/java/org/cp/elements/beans/AbstractBean.java
AbstractBean.newPropertyChangeEvent
protected PropertyChangeEvent newPropertyChangeEvent(String propertyName, Object oldValue, Object newValue) { """ Creates a new instance of the PropertyChangeEvent initialized with this Bean as the source as well as the name of the property that is changing along with the property's old and new values. A Propert...
java
protected PropertyChangeEvent newPropertyChangeEvent(String propertyName, Object oldValue, Object newValue) { if (isEventDispatchEnabled()) { if (vetoableChangeSupport.hasListeners(propertyName) || propertyChangeSupport.hasListeners(propertyName)) { return new PropertyChangeEvent(this, propertyName, o...
[ "protected", "PropertyChangeEvent", "newPropertyChangeEvent", "(", "String", "propertyName", ",", "Object", "oldValue", ",", "Object", "newValue", ")", "{", "if", "(", "isEventDispatchEnabled", "(", ")", ")", "{", "if", "(", "vetoableChangeSupport", ".", "hasListene...
Creates a new instance of the PropertyChangeEvent initialized with this Bean as the source as well as the name of the property that is changing along with the property's old and new values. A PropertyChangeEvent will be created only if event dispatching to registered listeners is enabled and there are either PropertyC...
[ "Creates", "a", "new", "instance", "of", "the", "PropertyChangeEvent", "initialized", "with", "this", "Bean", "as", "the", "source", "as", "well", "as", "the", "name", "of", "the", "property", "that", "is", "changing", "along", "with", "the", "property", "s"...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/beans/AbstractBean.java#L487-L495
criccomini/ezdb
ezdb-api/src/main/java/ezdb/comparator/SerdeComparator.java
SerdeComparator.innerCompare
protected int innerCompare(Comparable<Object> co1, Comparable<Object> co2) { """ Override this to customize the comparation itself. E.g. inversing it. """ return co1.compareTo(co2); }
java
protected int innerCompare(Comparable<Object> co1, Comparable<Object> co2) { return co1.compareTo(co2); }
[ "protected", "int", "innerCompare", "(", "Comparable", "<", "Object", ">", "co1", ",", "Comparable", "<", "Object", ">", "co2", ")", "{", "return", "co1", ".", "compareTo", "(", "co2", ")", ";", "}" ]
Override this to customize the comparation itself. E.g. inversing it.
[ "Override", "this", "to", "customize", "the", "comparation", "itself", ".", "E", ".", "g", ".", "inversing", "it", "." ]
train
https://github.com/criccomini/ezdb/blob/2adaccee179614f01e1c7e5af82a4f731e4e72cc/ezdb-api/src/main/java/ezdb/comparator/SerdeComparator.java#L37-L39
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/mmax/MMAXAnnotation.java
MMAXAnnotation.setPointerList
public void setPointerList(int i, MMAXPointer v) { """ indexed setter for pointerList - sets an indexed value - The list of MMAX pointers of the MMAX annotation. @generated @param i index in the array to set @param v value to set into the array """ if (MMAXAnnotation_Type.featOkTst && ((MMAXAnnotation_...
java
public void setPointerList(int i, MMAXPointer v) { if (MMAXAnnotation_Type.featOkTst && ((MMAXAnnotation_Type)jcasType).casFeat_pointerList == null) jcasType.jcas.throwFeatMissing("pointerList", "de.julielab.jules.types.mmax.MMAXAnnotation"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(...
[ "public", "void", "setPointerList", "(", "int", "i", ",", "MMAXPointer", "v", ")", "{", "if", "(", "MMAXAnnotation_Type", ".", "featOkTst", "&&", "(", "(", "MMAXAnnotation_Type", ")", "jcasType", ")", ".", "casFeat_pointerList", "==", "null", ")", "jcasType", ...
indexed setter for pointerList - sets an indexed value - The list of MMAX pointers of the MMAX annotation. @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "pointerList", "-", "sets", "an", "indexed", "value", "-", "The", "list", "of", "MMAX", "pointers", "of", "the", "MMAX", "annotation", "." ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/mmax/MMAXAnnotation.java#L251-L255
jglobus/JGlobus
gridftp/src/main/java/org/globus/ftp/FTPClient.java
FTPClient.getChecksum
public String getChecksum(String algorithm, String path) throws ClientException, ServerException, IOException { """ GridFTP v2 CKSM command for the whole file @param algorithm ckeckum alorithm @param path @return ckecksum value returned by the server @throws org.globus.ftp.e...
java
public String getChecksum(String algorithm, String path) throws ClientException, ServerException, IOException { return getChecksum(algorithm,0,-1,path); }
[ "public", "String", "getChecksum", "(", "String", "algorithm", ",", "String", "path", ")", "throws", "ClientException", ",", "ServerException", ",", "IOException", "{", "return", "getChecksum", "(", "algorithm", ",", "0", ",", "-", "1", ",", "path", ")", ";"...
GridFTP v2 CKSM command for the whole file @param algorithm ckeckum alorithm @param path @return ckecksum value returned by the server @throws org.globus.ftp.exception.ClientException @throws org.globus.ftp.exception.ServerException @throws java.io.IOException
[ "GridFTP", "v2", "CKSM", "command", "for", "the", "whole", "file" ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gridftp/src/main/java/org/globus/ftp/FTPClient.java#L2186-L2190
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/LabsInner.java
LabsInner.update
public LabInner update(String resourceGroupName, String labAccountName, String labName, LabFragment lab) { """ Modify properties of labs. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labName The name of the lab. @param lab Represents a lab...
java
public LabInner update(String resourceGroupName, String labAccountName, String labName, LabFragment lab) { return updateWithServiceResponseAsync(resourceGroupName, labAccountName, labName, lab).toBlocking().single().body(); }
[ "public", "LabInner", "update", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "String", "labName", ",", "LabFragment", "lab", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "labAccountName", ",", "labNa...
Modify properties of labs. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labName The name of the lab. @param lab Represents a lab. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request ...
[ "Modify", "properties", "of", "labs", "." ]
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/LabsInner.java#L835-L837
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/learning/ConfusionMatrixPanel.java
ConfusionMatrixPanel.renderLabels
private void renderLabels(Graphics2D g2, double fontSize) { """ Renders the names on each category to the side of the confusion matrix """ int numCategories = confusion.getNumRows(); int longestLabel = 0; if(renderLabels) { for (int i = 0; i < numCategories; i++) { longestLabel = Math.max(longest...
java
private void renderLabels(Graphics2D g2, double fontSize) { int numCategories = confusion.getNumRows(); int longestLabel = 0; if(renderLabels) { for (int i = 0; i < numCategories; i++) { longestLabel = Math.max(longestLabel,labels.get(i).length()); } } Font fontLabel = new Font("monospaced", Font....
[ "private", "void", "renderLabels", "(", "Graphics2D", "g2", ",", "double", "fontSize", ")", "{", "int", "numCategories", "=", "confusion", ".", "getNumRows", "(", ")", ";", "int", "longestLabel", "=", "0", ";", "if", "(", "renderLabels", ")", "{", "for", ...
Renders the names on each category to the side of the confusion matrix
[ "Renders", "the", "names", "on", "each", "category", "to", "the", "side", "of", "the", "confusion", "matrix" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/learning/ConfusionMatrixPanel.java#L200-L236
GwtMaterialDesign/gwt-material-addins
src/main/java/gwt/material/design/addins/client/autocomplete/MaterialAutoComplete.java
MaterialAutoComplete.setup
protected void setup(SuggestOracle suggestions) { """ Generate and build the List Items to be set on Auto Complete box. """ if (itemBoxKeyDownHandler != null) { itemBoxKeyDownHandler.removeHandler(); } list.setStyleName(AddinsCssName.MULTIVALUESUGGESTBOX_LIST); thi...
java
protected void setup(SuggestOracle suggestions) { if (itemBoxKeyDownHandler != null) { itemBoxKeyDownHandler.removeHandler(); } list.setStyleName(AddinsCssName.MULTIVALUESUGGESTBOX_LIST); this.suggestions = suggestions; final ListItem item = new ListItem(); ...
[ "protected", "void", "setup", "(", "SuggestOracle", "suggestions", ")", "{", "if", "(", "itemBoxKeyDownHandler", "!=", "null", ")", "{", "itemBoxKeyDownHandler", ".", "removeHandler", "(", ")", ";", "}", "list", ".", "setStyleName", "(", "AddinsCssName", ".", ...
Generate and build the List Items to be set on Auto Complete box.
[ "Generate", "and", "build", "the", "List", "Items", "to", "be", "set", "on", "Auto", "Complete", "box", "." ]
train
https://github.com/GwtMaterialDesign/gwt-material-addins/blob/11aec9d92918225f70f936285d0ae94f2178c36e/src/main/java/gwt/material/design/addins/client/autocomplete/MaterialAutoComplete.java#L312-L349
op4j/op4j
src/main/java/org/op4j/Op.java
Op.onArrayFor
public static <T> Level0ArrayOperator<Date[],Date> onArrayFor(final Date... elements) { """ <p> Creates an array with the specified elements and an <i>operation expression</i> on it. </p> @param elements the elements of the array being created @return an operator, ready for chaining """ return o...
java
public static <T> Level0ArrayOperator<Date[],Date> onArrayFor(final Date... elements) { return onArrayOf(Types.DATE, VarArgsUtil.asRequiredObjectArray(elements)); }
[ "public", "static", "<", "T", ">", "Level0ArrayOperator", "<", "Date", "[", "]", ",", "Date", ">", "onArrayFor", "(", "final", "Date", "...", "elements", ")", "{", "return", "onArrayOf", "(", "Types", ".", "DATE", ",", "VarArgsUtil", ".", "asRequiredObject...
<p> Creates an array with the specified elements and an <i>operation expression</i> on it. </p> @param elements the elements of the array being created @return an operator, ready for chaining
[ "<p", ">", "Creates", "an", "array", "with", "the", "specified", "elements", "and", "an", "<i", ">", "operation", "expression<", "/", "i", ">", "on", "it", ".", "<", "/", "p", ">" ]
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/Op.java#L1036-L1038
alibaba/otter
node/etl/src/main/java/com/alibaba/otter/node/etl/common/db/utils/SqlUtils.java
SqlUtils.getResultSetValue
private static String getResultSetValue(ResultSet rs, int index) throws SQLException { """ Retrieve a JDBC column value from a ResultSet, using the most appropriate value type. The returned value should be a detached value object, not having any ties to the active ResultSet: in particular, it should not be a Bl...
java
private static String getResultSetValue(ResultSet rs, int index) throws SQLException { Object obj = rs.getObject(index); return (obj == null) ? null : convertUtilsBean.convert(obj); }
[ "private", "static", "String", "getResultSetValue", "(", "ResultSet", "rs", ",", "int", "index", ")", "throws", "SQLException", "{", "Object", "obj", "=", "rs", ".", "getObject", "(", "index", ")", ";", "return", "(", "obj", "==", "null", ")", "?", "null...
Retrieve a JDBC column value from a ResultSet, using the most appropriate value type. The returned value should be a detached value object, not having any ties to the active ResultSet: in particular, it should not be a Blob or Clob object but rather a byte array respectively String representation. <p> Uses the <code>ge...
[ "Retrieve", "a", "JDBC", "column", "value", "from", "a", "ResultSet", "using", "the", "most", "appropriate", "value", "type", ".", "The", "returned", "value", "should", "be", "a", "detached", "value", "object", "not", "having", "any", "ties", "to", "the", ...
train
https://github.com/alibaba/otter/blob/c7b5f94a0dd162e01ddffaf3a63cade7d23fca55/node/etl/src/main/java/com/alibaba/otter/node/etl/common/db/utils/SqlUtils.java#L310-L313
Coveros/selenified
src/main/java/com/coveros/selenified/services/HTTP.java
HTTP.getConnection
private HttpURLConnection getConnection(URL url) throws IOException { """ Opens the URL connection, and if a proxy is provided, uses the proxy to establish the connection @param url - the url to connect to @return HttpURLConnection: our established http connection @throws IOException: if the connection can't ...
java
private HttpURLConnection getConnection(URL url) throws IOException { Proxy proxy = Proxy.NO_PROXY; if (Property.isProxySet()) { SocketAddress addr = new InetSocketAddress(Property.getProxyHost(), Property.getProxyPort()); proxy = new Proxy(Proxy.Type.HTTP, addr); } ...
[ "private", "HttpURLConnection", "getConnection", "(", "URL", "url", ")", "throws", "IOException", "{", "Proxy", "proxy", "=", "Proxy", ".", "NO_PROXY", ";", "if", "(", "Property", ".", "isProxySet", "(", ")", ")", "{", "SocketAddress", "addr", "=", "new", ...
Opens the URL connection, and if a proxy is provided, uses the proxy to establish the connection @param url - the url to connect to @return HttpURLConnection: our established http connection @throws IOException: if the connection can't be established, an IOException is thrown
[ "Opens", "the", "URL", "connection", "and", "if", "a", "proxy", "is", "provided", "uses", "the", "proxy", "to", "establish", "the", "connection" ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/services/HTTP.java#L327-L334
facebookarchive/hadoop-20
src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java
ImageLibrary.newImage
private boolean newImage(String name, String filename) { """ Load and register a new image. If the image resource does not exist or fails to load, a default "error" resource is supplied. @param name name of the image @param filename name of the file containing the image @return whether the image has correctl...
java
private boolean newImage(String name, String filename) { ImageDescriptor id; boolean success; try { URL fileURL = FileLocator.find(bundle, new Path(RESOURCE_DIR + filename), null); id = ImageDescriptor.createFromURL(FileLocator.toFileURL(fileURL)); success = true; } catch (...
[ "private", "boolean", "newImage", "(", "String", "name", ",", "String", "filename", ")", "{", "ImageDescriptor", "id", ";", "boolean", "success", ";", "try", "{", "URL", "fileURL", "=", "FileLocator", ".", "find", "(", "bundle", ",", "new", "Path", "(", ...
Load and register a new image. If the image resource does not exist or fails to load, a default "error" resource is supplied. @param name name of the image @param filename name of the file containing the image @return whether the image has correctly been loaded
[ "Load", "and", "register", "a", "new", "image", ".", "If", "the", "image", "resource", "does", "not", "exist", "or", "fails", "to", "load", "a", "default", "error", "resource", "is", "supplied", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/eclipse-plugin/src/java/org/apache/hadoop/eclipse/ImageLibrary.java#L176-L198
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/io/VASPReader.java
VASPReader.nextVASPTokenFollowing
public String nextVASPTokenFollowing(String string) throws IOException { """ Find the next token of a VASP file beginning with the *next* line. """ int index; String line; while (inputBuffer.ready()) { line = inputBuffer.readLine(); index = line.indexOf(string);...
java
public String nextVASPTokenFollowing(String string) throws IOException { int index; String line; while (inputBuffer.ready()) { line = inputBuffer.readLine(); index = line.indexOf(string); if (index > 0) { index = index + string.length(); ...
[ "public", "String", "nextVASPTokenFollowing", "(", "String", "string", ")", "throws", "IOException", "{", "int", "index", ";", "String", "line", ";", "while", "(", "inputBuffer", ".", "ready", "(", ")", ")", "{", "line", "=", "inputBuffer", ".", "readLine", ...
Find the next token of a VASP file beginning with the *next* line.
[ "Find", "the", "next", "token", "of", "a", "VASP", "file", "beginning", "with", "the", "*", "next", "*", "line", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/io/VASPReader.java#L310-L333
knowm/XChange
xchange-core/src/main/java/org/knowm/xchange/utils/DateUtils.java
DateUtils.fromISO8601DateString
public static Date fromISO8601DateString(String iso8601FormattedDate) throws com.fasterxml.jackson.databind.exc.InvalidFormatException { """ Converts an ISO 8601 formatted Date String to a Java Date ISO 8601 format: yyyy-MM-dd'T'HH:mm:ss @param iso8601FormattedDate @return Date @throws com.fasterxml.ja...
java
public static Date fromISO8601DateString(String iso8601FormattedDate) throws com.fasterxml.jackson.databind.exc.InvalidFormatException { SimpleDateFormat iso8601Format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); // set UTC time zone iso8601Format.setTimeZone(TimeZone.getTimeZone("UTC")); try...
[ "public", "static", "Date", "fromISO8601DateString", "(", "String", "iso8601FormattedDate", ")", "throws", "com", ".", "fasterxml", ".", "jackson", ".", "databind", ".", "exc", ".", "InvalidFormatException", "{", "SimpleDateFormat", "iso8601Format", "=", "new", "Sim...
Converts an ISO 8601 formatted Date String to a Java Date ISO 8601 format: yyyy-MM-dd'T'HH:mm:ss @param iso8601FormattedDate @return Date @throws com.fasterxml.jackson.databind.exc.InvalidFormatException
[ "Converts", "an", "ISO", "8601", "formatted", "Date", "String", "to", "a", "Java", "Date", "ISO", "8601", "format", ":", "yyyy", "-", "MM", "-", "dd", "T", "HH", ":", "mm", ":", "ss" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-core/src/main/java/org/knowm/xchange/utils/DateUtils.java#L74-L85
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java
MarshallUtil.marshallMap
public static <K, V, T extends Map<K, V>> void marshallMap(T map, ObjectOutput out) throws IOException { """ Marshall the {@code map} to the {@code ObjectOutput}. <p> {@code null} maps are supported. @param map {@link Map} to marshall. @param out {@link ObjectOutput} to write. It must be non-null. @param <K...
java
public static <K, V, T extends Map<K, V>> void marshallMap(T map, ObjectOutput out) throws IOException { final int mapSize = map == null ? NULL_VALUE : map.size(); marshallSize(out, mapSize); if (mapSize <= 0) return; for (Map.Entry<K, V> me : map.entrySet()) { out.writeObject(me.getKe...
[ "public", "static", "<", "K", ",", "V", ",", "T", "extends", "Map", "<", "K", ",", "V", ">", ">", "void", "marshallMap", "(", "T", "map", ",", "ObjectOutput", "out", ")", "throws", "IOException", "{", "final", "int", "mapSize", "=", "map", "==", "n...
Marshall the {@code map} to the {@code ObjectOutput}. <p> {@code null} maps are supported. @param map {@link Map} to marshall. @param out {@link ObjectOutput} to write. It must be non-null. @param <K> Key type of the map. @param <V> Value type of the map. @param <T> Type of the {@link Map}. @throws IOException If any ...
[ "Marshall", "the", "{", "@code", "map", "}", "to", "the", "{", "@code", "ObjectOutput", "}", ".", "<p", ">", "{", "@code", "null", "}", "maps", "are", "supported", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java#L56-L65
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/TaskOperations.java
TaskOperations.createTask
public void createTask(String jobId, TaskAddParameter taskToAdd) throws BatchErrorException, IOException { """ Adds a single task to a job. @param jobId The ID of the job to which to add the task. @param taskToAdd The {@link TaskAddParameter task} to add. @throws BatchErrorException Exception thrown when a...
java
public void createTask(String jobId, TaskAddParameter taskToAdd) throws BatchErrorException, IOException { createTask(jobId, taskToAdd, null); }
[ "public", "void", "createTask", "(", "String", "jobId", ",", "TaskAddParameter", "taskToAdd", ")", "throws", "BatchErrorException", ",", "IOException", "{", "createTask", "(", "jobId", ",", "taskToAdd", ",", "null", ")", ";", "}" ]
Adds a single task to a job. @param jobId The ID of the job to which to add the task. @param taskToAdd The {@link TaskAddParameter task} to add. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException Exception thrown when there is an error in seriali...
[ "Adds", "a", "single", "task", "to", "a", "job", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/TaskOperations.java#L94-L96
square/dagger
compiler/src/main/java/dagger/internal/codegen/GraphAnalysisLoader.java
GraphAnalysisLoader.resolveType
@VisibleForTesting static TypeElement resolveType(Elements elements, String className) { """ Resolves the given class name into a {@link TypeElement}. The class name is a binary name, but {@link Elements#getTypeElement(CharSequence)} wants a canonical name. So this method searches the space of possible canonical...
java
@VisibleForTesting static TypeElement resolveType(Elements elements, String className) { int index = nextDollar(className, className, 0); if (index == -1) { return getTypeElement(elements, className); } // have to test various possibilities of replacing '$' with '.' since '.' in a canonical name ...
[ "@", "VisibleForTesting", "static", "TypeElement", "resolveType", "(", "Elements", "elements", ",", "String", "className", ")", "{", "int", "index", "=", "nextDollar", "(", "className", ",", "className", ",", "0", ")", ";", "if", "(", "index", "==", "-", "...
Resolves the given class name into a {@link TypeElement}. The class name is a binary name, but {@link Elements#getTypeElement(CharSequence)} wants a canonical name. So this method searches the space of possible canonical names, starting with the most likely (since '$' is rarely used in canonical class names).
[ "Resolves", "the", "given", "class", "name", "into", "a", "{" ]
train
https://github.com/square/dagger/blob/572cdd2fe97fc3c148fb3d8e1b2ce7beb4dcbcde/compiler/src/main/java/dagger/internal/codegen/GraphAnalysisLoader.java#L64-L73
OpenLiberty/open-liberty
dev/com.ibm.ws.security.fat.common/src/com/ibm/ws/security/fat/common/utils/CommonExpectations.java
CommonExpectations.successfullyReachedUrl
public static Expectations successfullyReachedUrl(String testAction, String url) { """ Sets expectations that will check: <ol> <li>200 status code in the response for the specified test action <li>Response URL is equivalent to provided URL </ol> """ Expectations expectations = new Expectations(); ...
java
public static Expectations successfullyReachedUrl(String testAction, String url) { Expectations expectations = new Expectations(); expectations.addSuccessStatusCodesForActions(new String[] { testAction }); expectations.addExpectation(new ResponseUrlExpectation(testAction, Constants.STRING_EQUALS...
[ "public", "static", "Expectations", "successfullyReachedUrl", "(", "String", "testAction", ",", "String", "url", ")", "{", "Expectations", "expectations", "=", "new", "Expectations", "(", ")", ";", "expectations", ".", "addSuccessStatusCodesForActions", "(", "new", ...
Sets expectations that will check: <ol> <li>200 status code in the response for the specified test action <li>Response URL is equivalent to provided URL </ol>
[ "Sets", "expectations", "that", "will", "check", ":", "<ol", ">", "<li", ">", "200", "status", "code", "in", "the", "response", "for", "the", "specified", "test", "action", "<li", ">", "Response", "URL", "is", "equivalent", "to", "provided", "URL", "<", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.fat.common/src/com/ibm/ws/security/fat/common/utils/CommonExpectations.java#L30-L35
awslabs/amazon-sqs-java-messaging-lib
src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java
AmazonSQSMessagingClientWrapper.deleteMessage
public void deleteMessage(DeleteMessageRequest deleteMessageRequest) throws JMSException { """ Calls <code>deleteMessage</code> and wraps <code>AmazonClientException</code>. This is used to acknowledge single messages, so that they can be deleted from SQS queue. @param deleteMessageRequest Container for the n...
java
public void deleteMessage(DeleteMessageRequest deleteMessageRequest) throws JMSException { try { prepareRequest(deleteMessageRequest); amazonSQSClient.deleteMessage(deleteMessageRequest); } catch (AmazonClientException e) { throw handleException(e, "deleteMessage"); ...
[ "public", "void", "deleteMessage", "(", "DeleteMessageRequest", "deleteMessageRequest", ")", "throws", "JMSException", "{", "try", "{", "prepareRequest", "(", "deleteMessageRequest", ")", ";", "amazonSQSClient", ".", "deleteMessage", "(", "deleteMessageRequest", ")", ";...
Calls <code>deleteMessage</code> and wraps <code>AmazonClientException</code>. This is used to acknowledge single messages, so that they can be deleted from SQS queue. @param deleteMessageRequest Container for the necessary parameters to execute the deleteMessage service method on AmazonSQS. @throws JMSException
[ "Calls", "<code", ">", "deleteMessage<", "/", "code", ">", "and", "wraps", "<code", ">", "AmazonClientException<", "/", "code", ">", ".", "This", "is", "used", "to", "acknowledge", "single", "messages", "so", "that", "they", "can", "be", "deleted", "from", ...
train
https://github.com/awslabs/amazon-sqs-java-messaging-lib/blob/efa716d34d51ef1c5572790626cdb795419cb342/src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java#L156-L163
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Flowable.java
Flowable.groupJoin
@CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final <TRight, TLeftEnd, TRightEnd, R> Flowable<R> groupJoin( Publisher<? extends TRight> other, Function<? super T, ? extends Publisher<TLeftEnd>> leftEnd, Func...
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.ERROR) @SchedulerSupport(SchedulerSupport.NONE) public final <TRight, TLeftEnd, TRightEnd, R> Flowable<R> groupJoin( Publisher<? extends TRight> other, Function<? super T, ? extends Publisher<TLeftEnd>> leftEnd, Func...
[ "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "ERROR", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "<", "TRight", ",", "TLeftEnd", ",", "TRightEnd", ",", "R", ">", "Flowable", ...
Returns a Flowable that correlates two Publishers when they overlap in time and groups the results. <p> There are no guarantees in what order the items get combined when multiple items from one or both source Publishers overlap. <p> <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/...
[ "Returns", "a", "Flowable", "that", "correlates", "two", "Publishers", "when", "they", "overlap", "in", "time", "and", "groups", "the", "results", ".", "<p", ">", "There", "are", "no", "guarantees", "in", "what", "order", "the", "items", "get", "combined", ...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Flowable.java#L10619-L10633
nohana/Amalgam
amalgam/src/main/java/com/amalgam/content/pm/PackageManagerUtils.java
PackageManagerUtils.getActivityPackageInfo
public static PackageInfo getActivityPackageInfo(Context context, String targetPackage) throws NameNotFoundException { """ Get the {@link android.content.pm.PackageInfo} that contains all activities declaration for the context. @param context the context. @return the {@link android.content.pm.PackageInfo}. @thr...
java
public static PackageInfo getActivityPackageInfo(Context context, String targetPackage) throws NameNotFoundException { PackageManager manager = context.getPackageManager(); return manager.getPackageInfo(targetPackage, PackageManager.GET_ACTIVITIES); }
[ "public", "static", "PackageInfo", "getActivityPackageInfo", "(", "Context", "context", ",", "String", "targetPackage", ")", "throws", "NameNotFoundException", "{", "PackageManager", "manager", "=", "context", ".", "getPackageManager", "(", ")", ";", "return", "manage...
Get the {@link android.content.pm.PackageInfo} that contains all activities declaration for the context. @param context the context. @return the {@link android.content.pm.PackageInfo}. @throws NameNotFoundException if no package found.
[ "Get", "the", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/content/pm/PackageManagerUtils.java#L132-L135
alkacon/opencms-core
src-setup/org/opencms/setup/CmsSetupBean.java
CmsSetupBean.importModuleFromDefault
protected void importModuleFromDefault(String importFile) throws Exception { """ Imports a module (zipfile) from the default module directory, creating a temporary project for this.<p> @param importFile the name of the import module located in the default module directory @throws Exception if something goes...
java
protected void importModuleFromDefault(String importFile) throws Exception { String fileName = getModuleFolder() + importFile; OpenCms.getImportExportManager().importData( m_cms, new CmsShellReport(m_cms.getRequestContext().getLocale()), new CmsImportParameters(fileN...
[ "protected", "void", "importModuleFromDefault", "(", "String", "importFile", ")", "throws", "Exception", "{", "String", "fileName", "=", "getModuleFolder", "(", ")", "+", "importFile", ";", "OpenCms", ".", "getImportExportManager", "(", ")", ".", "importData", "("...
Imports a module (zipfile) from the default module directory, creating a temporary project for this.<p> @param importFile the name of the import module located in the default module directory @throws Exception if something goes wrong @see org.opencms.importexport.CmsImportExportManager#importData(CmsObject, org.open...
[ "Imports", "a", "module", "(", "zipfile", ")", "from", "the", "default", "module", "directory", "creating", "a", "temporary", "project", "for", "this", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-setup/org/opencms/setup/CmsSetupBean.java#L2580-L2587
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java
PJsonObject.getJSONArray
public final PJsonArray getJSONArray(final String key) { """ Get a property as a json array or throw exception. @param key the property name """ final JSONArray val = this.obj.optJSONArray(key); if (val == null) { throw new ObjectMissingException(this, key); } ret...
java
public final PJsonArray getJSONArray(final String key) { final JSONArray val = this.obj.optJSONArray(key); if (val == null) { throw new ObjectMissingException(this, key); } return new PJsonArray(this, val, key); }
[ "public", "final", "PJsonArray", "getJSONArray", "(", "final", "String", "key", ")", "{", "final", "JSONArray", "val", "=", "this", ".", "obj", ".", "optJSONArray", "(", "key", ")", ";", "if", "(", "val", "==", "null", ")", "{", "throw", "new", "Object...
Get a property as a json array or throw exception. @param key the property name
[ "Get", "a", "property", "as", "a", "json", "array", "or", "throw", "exception", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/json/PJsonObject.java#L168-L174