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
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocal.java
ODataLocal.addRecord
public long addRecord(final ORecordId iRid, final byte[] iContent) throws IOException { """ Add the record content in file. @param iContent The content to write @return The record offset. @throws IOException """ if (iContent.length == 0) // AVOID UNUSEFUL CREATION OF EMPTY RECORD: IT WILL B...
java
public long addRecord(final ORecordId iRid, final byte[] iContent) throws IOException { if (iContent.length == 0) // AVOID UNUSEFUL CREATION OF EMPTY RECORD: IT WILL BE CREATED AT FIRST UPDATE return -1; final int recordSize = iContent.length + RECORD_FIX_SIZE; acquireExclusiveLock();...
[ "public", "long", "addRecord", "(", "final", "ORecordId", "iRid", ",", "final", "byte", "[", "]", "iContent", ")", "throws", "IOException", "{", "if", "(", "iContent", ".", "length", "==", "0", ")", "// AVOID UNUSEFUL CREATION OF EMPTY RECORD: IT WILL BE CREATED AT ...
Add the record content in file. @param iContent The content to write @return The record offset. @throws IOException
[ "Add", "the", "record", "content", "in", "file", "." ]
train
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/ODataLocal.java#L187-L205
telly/groundy
library/src/main/java/com/telly/groundy/util/DownloadUtils.java
DownloadUtils.getDownloadListenerForTask
public static DownloadProgressListener getDownloadListenerForTask(final GroundyTask groundyTask) { """ Returns a progress listener that will post progress to the specified groundyTask. @param groundyTask the groundyTask to post progress to. Cannot be null. @return a progress listener """ return new Dow...
java
public static DownloadProgressListener getDownloadListenerForTask(final GroundyTask groundyTask) { return new DownloadProgressListener() { @Override public void onProgress(String url, int progress) { groundyTask.updateProgress(progress); } }; }
[ "public", "static", "DownloadProgressListener", "getDownloadListenerForTask", "(", "final", "GroundyTask", "groundyTask", ")", "{", "return", "new", "DownloadProgressListener", "(", ")", "{", "@", "Override", "public", "void", "onProgress", "(", "String", "url", ",", ...
Returns a progress listener that will post progress to the specified groundyTask. @param groundyTask the groundyTask to post progress to. Cannot be null. @return a progress listener
[ "Returns", "a", "progress", "listener", "that", "will", "post", "progress", "to", "the", "specified", "groundyTask", "." ]
train
https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/util/DownloadUtils.java#L102-L109
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/lang/EnumHelper.java
EnumHelper.getFromIDCaseInsensitiveOrDefault
@Nullable public static <ENUMTYPE extends Enum <ENUMTYPE> & IHasID <String>> ENUMTYPE getFromIDCaseInsensitiveOrDefault (@Nonnull final Class <ENUMTYPE> aClass, @Nullable final String sID, ...
java
@Nullable public static <ENUMTYPE extends Enum <ENUMTYPE> & IHasID <String>> ENUMTYPE getFromIDCaseInsensitiveOrDefault (@Nonnull final Class <ENUMTYPE> aClass, @Nullable final String sID, ...
[ "@", "Nullable", "public", "static", "<", "ENUMTYPE", "extends", "Enum", "<", "ENUMTYPE", ">", "&", "IHasID", "<", "String", ">", ">", "ENUMTYPE", "getFromIDCaseInsensitiveOrDefault", "(", "@", "Nonnull", "final", "Class", "<", "ENUMTYPE", ">", "aClass", ",", ...
Get the enum value with the passed string ID case insensitive @param <ENUMTYPE> The enum type @param aClass The enum class @param sID The ID to search @param eDefault The default value to be returned, if the ID was not found. @return The default parameter if no enum item with the given ID is present.
[ "Get", "the", "enum", "value", "with", "the", "passed", "string", "ID", "case", "insensitive" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/lang/EnumHelper.java#L192-L202
hdbeukel/james-core
src/main/java/org/jamesframework/core/subset/neigh/SinglePerturbationNeighbourhood.java
SinglePerturbationNeighbourhood.canRemove
private boolean canRemove(SubsetSolution solution, Set<Integer> deleteCandidates) { """ Check if it is allowed to remove one more item from the selection. @param solution solution for which moves are generated @param deleteCandidates set of candidate IDs to be deleted @return <code>true</code> if it is allowe...
java
private boolean canRemove(SubsetSolution solution, Set<Integer> deleteCandidates){ return !deleteCandidates.isEmpty() && isValidSubsetSize(solution.getNumSelectedIDs()-1); }
[ "private", "boolean", "canRemove", "(", "SubsetSolution", "solution", ",", "Set", "<", "Integer", ">", "deleteCandidates", ")", "{", "return", "!", "deleteCandidates", ".", "isEmpty", "(", ")", "&&", "isValidSubsetSize", "(", "solution", ".", "getNumSelectedIDs", ...
Check if it is allowed to remove one more item from the selection. @param solution solution for which moves are generated @param deleteCandidates set of candidate IDs to be deleted @return <code>true</code> if it is allowed to remove an item from the selection
[ "Check", "if", "it", "is", "allowed", "to", "remove", "one", "more", "item", "from", "the", "selection", "." ]
train
https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/subset/neigh/SinglePerturbationNeighbourhood.java#L233-L236
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/rng/distribution/impl/SaddlePointExpansion.java
SaddlePointExpansion.getDeviancePart
public static double getDeviancePart(double x, double mu) { """ A part of the deviance portion of the saddle point approximation. <p> References: <ol> <li>Catherine Loader (2000). "Fast and Accurate Computation of Binomial Probabilities.". <a target="_blank" href="http://www.herine.net/stat/papers/dbinom.pdf...
java
public static double getDeviancePart(double x, double mu) { double ret; if (FastMath.abs(x - mu) < 0.1 * (x + mu)) { double d = x - mu; double v = d / (x + mu); double s1 = v * d; double s = Double.NaN; double ej = 2.0 * x * v; v = ...
[ "public", "static", "double", "getDeviancePart", "(", "double", "x", ",", "double", "mu", ")", "{", "double", "ret", ";", "if", "(", "FastMath", ".", "abs", "(", "x", "-", "mu", ")", "<", "0.1", "*", "(", "x", "+", "mu", ")", ")", "{", "double", ...
A part of the deviance portion of the saddle point approximation. <p> References: <ol> <li>Catherine Loader (2000). "Fast and Accurate Computation of Binomial Probabilities.". <a target="_blank" href="http://www.herine.net/stat/papers/dbinom.pdf"> http://www.herine.net/stat/papers/dbinom.pdf</a></li> </ol> </p> @param...
[ "A", "part", "of", "the", "deviance", "portion", "of", "the", "saddle", "point", "approximation", ".", "<p", ">", "References", ":", "<ol", ">", "<li", ">", "Catherine", "Loader", "(", "2000", ")", ".", "Fast", "and", "Accurate", "Computation", "of", "Bi...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/rng/distribution/impl/SaddlePointExpansion.java#L145-L166
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/pascal/PascalTemplate.java
PascalTemplate.setValue
public void setValue(String fieldName, String value) { """ Sets template values. @param fieldName (i.e. workshopname, workshopdate) """ int index = getFieldIndex(fieldName); assert(index != -1); values[index] = value; }
java
public void setValue(String fieldName, String value) { int index = getFieldIndex(fieldName); assert(index != -1); values[index] = value; }
[ "public", "void", "setValue", "(", "String", "fieldName", ",", "String", "value", ")", "{", "int", "index", "=", "getFieldIndex", "(", "fieldName", ")", ";", "assert", "(", "index", "!=", "-", "1", ")", ";", "values", "[", "index", "]", "=", "value", ...
Sets template values. @param fieldName (i.e. workshopname, workshopdate)
[ "Sets", "template", "values", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/pascal/PascalTemplate.java#L149-L153
astrapi69/jaulp-wicket
jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/ComponentFinder.java
ComponentFinder.findParent
public static Component findParent(final Component childComponent, final Class<? extends Component> parentClass, final boolean byClassname) { """ Finds the first parent of the given childComponent from the given parentClass and a flag if the search shell be continued with the class name if the search with the g...
java
public static Component findParent(final Component childComponent, final Class<? extends Component> parentClass, final boolean byClassname) { Component parent = childComponent.getParent(); while (parent != null) { if (parent.getClass().equals(parentClass)) { break; } parent = parent.getParent()...
[ "public", "static", "Component", "findParent", "(", "final", "Component", "childComponent", ",", "final", "Class", "<", "?", "extends", "Component", ">", "parentClass", ",", "final", "boolean", "byClassname", ")", "{", "Component", "parent", "=", "childComponent",...
Finds the first parent of the given childComponent from the given parentClass and a flag if the search shell be continued with the class name if the search with the given parentClass returns null. @param childComponent the child component @param parentClass the parent class @param byClassname the flag to search by cla...
[ "Finds", "the", "first", "parent", "of", "the", "given", "childComponent", "from", "the", "given", "parentClass", "and", "a", "flag", "if", "the", "search", "shell", "be", "continued", "with", "the", "class", "name", "if", "the", "search", "with", "the", "...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/ComponentFinder.java#L112-L129
spring-projects/spring-android
spring-android-rest-template/src/main/java/org/springframework/http/HttpHeaders.java
HttpHeaders.setContentDispositionFormData
public void setContentDispositionFormData(String name, String filename) { """ Set the (new) value of the {@code Content-Disposition} header for {@code form-data}. @param name the control name @param filename the filename (may be {@code null}) """ Assert.notNull(name, "'name' must not be null"); StringBu...
java
public void setContentDispositionFormData(String name, String filename) { Assert.notNull(name, "'name' must not be null"); StringBuilder builder = new StringBuilder("form-data; name=\""); builder.append(name).append('\"'); if (filename != null) { builder.append("; filename=\""); builder.append(filename).a...
[ "public", "void", "setContentDispositionFormData", "(", "String", "name", ",", "String", "filename", ")", "{", "Assert", ".", "notNull", "(", "name", ",", "\"'name' must not be null\"", ")", ";", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", "\"for...
Set the (new) value of the {@code Content-Disposition} header for {@code form-data}. @param name the control name @param filename the filename (may be {@code null})
[ "Set", "the", "(", "new", ")", "value", "of", "the", "{" ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-rest-template/src/main/java/org/springframework/http/HttpHeaders.java#L568-L577
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/CmsSelectBox.java
CmsSelectBox.setItems
public void setItems(Map<String, String> items) { """ Sets the items using a map from option values to label texts.<p> @param items the map containing the select options """ clearItems(); m_items = items; for (Map.Entry<String, String> entry : items.entrySet()) { addOpti...
java
public void setItems(Map<String, String> items) { clearItems(); m_items = items; for (Map.Entry<String, String> entry : items.entrySet()) { addOption(entry.getKey(), entry.getValue()); } }
[ "public", "void", "setItems", "(", "Map", "<", "String", ",", "String", ">", "items", ")", "{", "clearItems", "(", ")", ";", "m_items", "=", "items", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "entry", ":", "items", "....
Sets the items using a map from option values to label texts.<p> @param items the map containing the select options
[ "Sets", "the", "items", "using", "a", "map", "from", "option", "values", "to", "label", "texts", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/CmsSelectBox.java#L267-L274
zaproxy/zaproxy
src/org/parosproxy/paros/db/DbUtils.java
DbUtils.hasIndex
public static boolean hasIndex(final Connection connection, final String tableName, final String indexName) throws SQLException { """ Tells whether the table {@code tableName} has an index with the given {@code indexName}, or not. @param connection the connection to the database @param tableName the name of...
java
public static boolean hasIndex(final Connection connection, final String tableName, final String indexName) throws SQLException { boolean hasIndex = false; ResultSet rs = null; try { rs = connection.getMetaData().getIndexInfo(null, null, tableName, false, false); ...
[ "public", "static", "boolean", "hasIndex", "(", "final", "Connection", "connection", ",", "final", "String", "tableName", ",", "final", "String", "indexName", ")", "throws", "SQLException", "{", "boolean", "hasIndex", "=", "false", ";", "ResultSet", "rs", "=", ...
Tells whether the table {@code tableName} has an index with the given {@code indexName}, or not. @param connection the connection to the database @param tableName the name of the table that may have the index @param indexName the name of the index that will be checked @return {@code true} if the table {@code tableName...
[ "Tells", "whether", "the", "table", "{", "@code", "tableName", "}", "has", "an", "index", "with", "the", "given", "{", "@code", "indexName", "}", "or", "not", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/db/DbUtils.java#L128-L153
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java
ConfigUtils.hasNonEmptyPath
public static boolean hasNonEmptyPath(Config config, String key) { """ Check if the given <code>key</code> exists in <code>config</code> and it is not null or empty Uses {@link StringUtils#isNotBlank(CharSequence)} @param config which may have the key @param key to look for in the config @return True if key ...
java
public static boolean hasNonEmptyPath(Config config, String key) { return config.hasPath(key) && StringUtils.isNotBlank(config.getString(key)); }
[ "public", "static", "boolean", "hasNonEmptyPath", "(", "Config", "config", ",", "String", "key", ")", "{", "return", "config", ".", "hasPath", "(", "key", ")", "&&", "StringUtils", ".", "isNotBlank", "(", "config", ".", "getString", "(", "key", ")", ")", ...
Check if the given <code>key</code> exists in <code>config</code> and it is not null or empty Uses {@link StringUtils#isNotBlank(CharSequence)} @param config which may have the key @param key to look for in the config @return True if key exits and not null or empty. False otherwise
[ "Check", "if", "the", "given", "<code", ">", "key<", "/", "code", ">", "exists", "in", "<code", ">", "config<", "/", "code", ">", "and", "it", "is", "not", "null", "or", "empty", "Uses", "{", "@link", "StringUtils#isNotBlank", "(", "CharSequence", ")", ...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java#L474-L476
Samsung/GearVRf
GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java
GVRScriptManager.bindScriptBundle
@Override public void bindScriptBundle(final IScriptBundle scriptBundle, final GVRMain gvrMain, boolean bindToMainScene) throws IOException, GVRScriptException { """ Binds a script bundle to a {@link GVRScene} object. @param scriptBundle The script bundle. @param gvrMain The {@link GVRMain} t...
java
@Override public void bindScriptBundle(final IScriptBundle scriptBundle, final GVRMain gvrMain, boolean bindToMainScene) throws IOException, GVRScriptException { // Here, bind to all targets except SCENE_OBJECTS. Scene objects are bound when scene is set. bindHelper((GVRScriptBundle)scri...
[ "@", "Override", "public", "void", "bindScriptBundle", "(", "final", "IScriptBundle", "scriptBundle", ",", "final", "GVRMain", "gvrMain", ",", "boolean", "bindToMainScene", ")", "throws", "IOException", ",", "GVRScriptException", "{", "// Here, bind to all targets except ...
Binds a script bundle to a {@link GVRScene} object. @param scriptBundle The script bundle. @param gvrMain The {@link GVRMain} to bind to. @param bindToMainScene If {@code true}, also bind it to the main scene on the event {@link GVRMain#onAfterInit}. @throws IOException if script bundle file cannot be read. @throws GV...
[ "Binds", "a", "script", "bundle", "to", "a", "{", "@link", "GVRScene", "}", "object", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptManager.java#L269-L302
lazy-koala/java-toolkit
fast-toolkit/src/main/java/com/thankjava/toolkit/core/thread/ThreadTask.java
ThreadTask.addTaskRunOnce
public void addTaskRunOnce(int startDelayTime, Runnable runnable) { """ 运行一次的指定任务 <p>Function: addTaskRunOnce</p> <p>Description: </p> @param startDelayTime 延迟时间(s) @param runnable @author acexy@thankjava.com @date 2016年10月8日 下午3:00:51 @version 1.0 """ scheduledExecutorService.schedule(runnabl...
java
public void addTaskRunOnce(int startDelayTime, Runnable runnable) { scheduledExecutorService.schedule(runnable, startDelayTime, TimeUnit.SECONDS); }
[ "public", "void", "addTaskRunOnce", "(", "int", "startDelayTime", ",", "Runnable", "runnable", ")", "{", "scheduledExecutorService", ".", "schedule", "(", "runnable", ",", "startDelayTime", ",", "TimeUnit", ".", "SECONDS", ")", ";", "}" ]
运行一次的指定任务 <p>Function: addTaskRunOnce</p> <p>Description: </p> @param startDelayTime 延迟时间(s) @param runnable @author acexy@thankjava.com @date 2016年10月8日 下午3:00:51 @version 1.0
[ "运行一次的指定任务", "<p", ">", "Function", ":", "addTaskRunOnce<", "/", "p", ">", "<p", ">", "Description", ":", "<", "/", "p", ">" ]
train
https://github.com/lazy-koala/java-toolkit/blob/f46055fae0cc73049597a3708e515f5c6582d27a/fast-toolkit/src/main/java/com/thankjava/toolkit/core/thread/ThreadTask.java#L141-L143
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/ActionsConfig.java
ActionsConfig.exports
private static void exports(Xml node, ActionRef action) { """ Export the action. @param node The xml node (must not be <code>null</code>). @param action The action to export (must not be <code>null</code>). @throws LionEngineException If unable to write node. """ final Xml nodeAction = node.creat...
java
private static void exports(Xml node, ActionRef action) { final Xml nodeAction = node.createChild(NODE_ACTION); nodeAction.writeString(ATT_PATH, action.getPath()); for (final ActionRef ref : action.getRefs()) { exports(nodeAction, ref); } }
[ "private", "static", "void", "exports", "(", "Xml", "node", ",", "ActionRef", "action", ")", "{", "final", "Xml", "nodeAction", "=", "node", ".", "createChild", "(", "NODE_ACTION", ")", ";", "nodeAction", ".", "writeString", "(", "ATT_PATH", ",", "action", ...
Export the action. @param node The xml node (must not be <code>null</code>). @param action The action to export (must not be <code>null</code>). @throws LionEngineException If unable to write node.
[ "Export", "the", "action", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/ActionsConfig.java#L139-L148
threerings/narya
core/src/main/java/com/threerings/presents/dobj/DObject.java
DObject.requestOidRemove
protected void requestOidRemove (String name, OidList list, int oid) { """ Calls by derived instances when an oid remover method was called. """ // if we're on the authoritative server, we update the set immediately boolean applyImmediately = isAuthoritative(); if (applyImmediately) { ...
java
protected void requestOidRemove (String name, OidList list, int oid) { // if we're on the authoritative server, we update the set immediately boolean applyImmediately = isAuthoritative(); if (applyImmediately) { list.remove(oid); } // dispatch an object removed ev...
[ "protected", "void", "requestOidRemove", "(", "String", "name", ",", "OidList", "list", ",", "int", "oid", ")", "{", "// if we're on the authoritative server, we update the set immediately", "boolean", "applyImmediately", "=", "isAuthoritative", "(", ")", ";", "if", "("...
Calls by derived instances when an oid remover method was called.
[ "Calls", "by", "derived", "instances", "when", "an", "oid", "remover", "method", "was", "called", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/dobj/DObject.java#L864-L873
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java
DocumentSubscriptions.dropConnection
public void dropConnection(String name, String database) { """ Force server to close current client subscription connection to the server @param name Subscription name @param database Database to use """ RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.firstNonNull(database, _s...
java
public void dropConnection(String name, String database) { RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.firstNonNull(database, _store.getDatabase())); DropSubscriptionConnectionCommand command = new DropSubscriptionConnectionCommand(name); requestExecutor.execute(comm...
[ "public", "void", "dropConnection", "(", "String", "name", ",", "String", "database", ")", "{", "RequestExecutor", "requestExecutor", "=", "_store", ".", "getRequestExecutor", "(", "ObjectUtils", ".", "firstNonNull", "(", "database", ",", "_store", ".", "getDataba...
Force server to close current client subscription connection to the server @param name Subscription name @param database Database to use
[ "Force", "server", "to", "close", "current", "client", "subscription", "connection", "to", "the", "server" ]
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java#L436-L441
google/closure-compiler
src/com/google/javascript/rhino/jstype/JSTypeRegistry.java
JSTypeRegistry.createEnumType
public EnumType createEnumType(String name, Node source, JSType elementsType) { """ Creates an enum type. @param name The human-readable name associated with the enum, or null if unknown. """ return new EnumType(this, name, source, elementsType); }
java
public EnumType createEnumType(String name, Node source, JSType elementsType) { return new EnumType(this, name, source, elementsType); }
[ "public", "EnumType", "createEnumType", "(", "String", "name", ",", "Node", "source", ",", "JSType", "elementsType", ")", "{", "return", "new", "EnumType", "(", "this", ",", "name", ",", "source", ",", "elementsType", ")", ";", "}" ]
Creates an enum type. @param name The human-readable name associated with the enum, or null if unknown.
[ "Creates", "an", "enum", "type", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/JSTypeRegistry.java#L1547-L1549
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataComplementOfImpl_CustomFieldSerializer.java
OWLDataComplementOfImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDataComplementOfImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDataComplementOfImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLDataComplementOfImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataComplementOfImpl_CustomFieldSerializer.java#L69-L72
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/elements/MarkedElement.java
MarkedElement.markupAtom
public static MarkedElement markupAtom(IRenderingElement elem, IAtom atom) { """ Markup a atom with the class 'atom' and optionally the ids/classes from it's properties. @param elem rendering element @param atom atom @return the marked element """ if (elem == null) return null; ...
java
public static MarkedElement markupAtom(IRenderingElement elem, IAtom atom) { if (elem == null) return null; MarkedElement tagElem = markupChemObj(elem, atom); tagElem.aggClass("atom"); return tagElem; }
[ "public", "static", "MarkedElement", "markupAtom", "(", "IRenderingElement", "elem", ",", "IAtom", "atom", ")", "{", "if", "(", "elem", "==", "null", ")", "return", "null", ";", "MarkedElement", "tagElem", "=", "markupChemObj", "(", "elem", ",", "atom", ")",...
Markup a atom with the class 'atom' and optionally the ids/classes from it's properties. @param elem rendering element @param atom atom @return the marked element
[ "Markup", "a", "atom", "with", "the", "class", "atom", "and", "optionally", "the", "ids", "/", "classes", "from", "it", "s", "properties", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/elements/MarkedElement.java#L166-L172
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/ClientCommsDiagnosticModule.java
ClientCommsDiagnosticModule.dumpClientConversation
private void dumpClientConversation(IncidentStream is, Conversation conv) throws SIException { """ This method dumps the particulars of a particular client conversation. @param is @param conv @throws SIException of the getResolvedUserId() call fails. """ // Get the conversation state ClientC...
java
private void dumpClientConversation(IncidentStream is, Conversation conv) throws SIException { // Get the conversation state ClientConversationState convState = (ClientConversationState) conv.getAttachment(); SICoreConnection siConn = convState.getSICoreConnection(); if (siConn == null...
[ "private", "void", "dumpClientConversation", "(", "IncidentStream", "is", ",", "Conversation", "conv", ")", "throws", "SIException", "{", "// Get the conversation state", "ClientConversationState", "convState", "=", "(", "ClientConversationState", ")", "conv", ".", "getAt...
This method dumps the particulars of a particular client conversation. @param is @param conv @throws SIException of the getResolvedUserId() call fails.
[ "This", "method", "dumps", "the", "particulars", "of", "a", "particular", "client", "conversation", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/ClientCommsDiagnosticModule.java#L144-L187
rsocket/rsocket-java
rsocket-core/src/main/java/io/rsocket/util/DefaultPayload.java
DefaultPayload.create
public static Payload create(CharSequence data, @Nullable CharSequence metadata) { """ Static factory method for a text payload. Mainly looks better than "new DefaultPayload(data, metadata)" @param data the data of the payload. @param metadata the metadata for the payload. @return a payload. """ retu...
java
public static Payload create(CharSequence data, @Nullable CharSequence metadata) { return create( StandardCharsets.UTF_8.encode(CharBuffer.wrap(data)), metadata == null ? null : StandardCharsets.UTF_8.encode(CharBuffer.wrap(metadata))); }
[ "public", "static", "Payload", "create", "(", "CharSequence", "data", ",", "@", "Nullable", "CharSequence", "metadata", ")", "{", "return", "create", "(", "StandardCharsets", ".", "UTF_8", ".", "encode", "(", "CharBuffer", ".", "wrap", "(", "data", ")", ")",...
Static factory method for a text payload. Mainly looks better than "new DefaultPayload(data, metadata)" @param data the data of the payload. @param metadata the metadata for the payload. @return a payload.
[ "Static", "factory", "method", "for", "a", "text", "payload", ".", "Mainly", "looks", "better", "than", "new", "DefaultPayload", "(", "data", "metadata", ")" ]
train
https://github.com/rsocket/rsocket-java/blob/5101748fbd224ec86570351cebd24d079b63fbfc/rsocket-core/src/main/java/io/rsocket/util/DefaultPayload.java#L61-L65
maguro/aunit
junit/src/main/java/com/toolazydogs/aunit/Assert.java
Assert.assertTree
public static void assertTree(int rootType, String preorder, Tree tree) { """ Asserts a parse tree. @param rootType the type of the root of the tree. @param preorder the preorder traversal of the tree. @param tree an ANTLR tree to assert on. """ assertNotNull("tree should be non-null", tree); ...
java
public static void assertTree(int rootType, String preorder, Tree tree) { assertNotNull("tree should be non-null", tree); assertPreordered(null, preorder, tree); assertEquals("Comparing root type", rootType, tree.getType()); }
[ "public", "static", "void", "assertTree", "(", "int", "rootType", ",", "String", "preorder", ",", "Tree", "tree", ")", "{", "assertNotNull", "(", "\"tree should be non-null\"", ",", "tree", ")", ";", "assertPreordered", "(", "null", ",", "preorder", ",", "tree...
Asserts a parse tree. @param rootType the type of the root of the tree. @param preorder the preorder traversal of the tree. @param tree an ANTLR tree to assert on.
[ "Asserts", "a", "parse", "tree", "." ]
train
https://github.com/maguro/aunit/blob/1f972e35b28327e5e2e7881befc928df0546d74c/junit/src/main/java/com/toolazydogs/aunit/Assert.java#L242-L247
apache/incubator-gobblin
gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetricsRegistry.java
GobblinMetricsRegistry.putIfAbsent
public GobblinMetrics putIfAbsent(String id, GobblinMetrics gobblinMetrics) { """ Associate a {@link GobblinMetrics} instance with a given ID if the ID is not already associated with a {@link GobblinMetrics} instance. @param id the given {@link GobblinMetrics} ID @param gobblinMetrics the {@link GobblinMetric...
java
public GobblinMetrics putIfAbsent(String id, GobblinMetrics gobblinMetrics) { return this.metricsCache.asMap().putIfAbsent(id, gobblinMetrics); }
[ "public", "GobblinMetrics", "putIfAbsent", "(", "String", "id", ",", "GobblinMetrics", "gobblinMetrics", ")", "{", "return", "this", ".", "metricsCache", ".", "asMap", "(", ")", ".", "putIfAbsent", "(", "id", ",", "gobblinMetrics", ")", ";", "}" ]
Associate a {@link GobblinMetrics} instance with a given ID if the ID is not already associated with a {@link GobblinMetrics} instance. @param id the given {@link GobblinMetrics} ID @param gobblinMetrics the {@link GobblinMetrics} instance to be associated with the given ID @return the previous {@link GobblinMetrics} ...
[ "Associate", "a", "{", "@link", "GobblinMetrics", "}", "instance", "with", "a", "given", "ID", "if", "the", "ID", "is", "not", "already", "associated", "with", "a", "{", "@link", "GobblinMetrics", "}", "instance", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetricsRegistry.java#L64-L66
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java
Math.copySign
public static double copySign(double magnitude, double sign) { """ Returns the first floating-point argument with the sign of the second floating-point argument. Note that unlike the {@link StrictMath#copySign(double, double) StrictMath.copySign} method, this method does not require NaN {@code sign} arguments...
java
public static double copySign(double magnitude, double sign) { return Double.longBitsToDouble((Double.doubleToRawLongBits(sign) & (DoubleConsts.SIGN_BIT_MASK)) | (Double.doubleToRawLongBits(magnitude) & ...
[ "public", "static", "double", "copySign", "(", "double", "magnitude", ",", "double", "sign", ")", "{", "return", "Double", ".", "longBitsToDouble", "(", "(", "Double", ".", "doubleToRawLongBits", "(", "sign", ")", "&", "(", "DoubleConsts", ".", "SIGN_BIT_MASK"...
Returns the first floating-point argument with the sign of the second floating-point argument. Note that unlike the {@link StrictMath#copySign(double, double) StrictMath.copySign} method, this method does not require NaN {@code sign} arguments to be treated as positive values; implementations are permitted to treat so...
[ "Returns", "the", "first", "floating", "-", "point", "argument", "with", "the", "sign", "of", "the", "second", "floating", "-", "point", "argument", ".", "Note", "that", "unlike", "the", "{", "@link", "StrictMath#copySign", "(", "double", "double", ")", "Str...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java#L1770-L1776
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataManager.java
VariantMetadataManager.loadPedigree
public VariantMetadata loadPedigree(List<Pedigree> pedigrees, String studyId) { """ Load a list of pedrigree objects into a given study (from its study ID). @param pedigrees List of Pedigree objects to load @param studyId Study ID related to that pedigrees @return Variant metadata objec...
java
public VariantMetadata loadPedigree(List<Pedigree> pedigrees, String studyId) { VariantMetadata variantMetadata = null; for(Pedigree pedigree: pedigrees) { variantMetadata = loadPedigree(pedigree, studyId); } return variantMetadata; }
[ "public", "VariantMetadata", "loadPedigree", "(", "List", "<", "Pedigree", ">", "pedigrees", ",", "String", "studyId", ")", "{", "VariantMetadata", "variantMetadata", "=", "null", ";", "for", "(", "Pedigree", "pedigree", ":", "pedigrees", ")", "{", "variantMetad...
Load a list of pedrigree objects into a given study (from its study ID). @param pedigrees List of Pedigree objects to load @param studyId Study ID related to that pedigrees @return Variant metadata object
[ "Load", "a", "list", "of", "pedrigree", "objects", "into", "a", "given", "study", "(", "from", "its", "study", "ID", ")", "." ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/metadata/VariantMetadataManager.java#L525-L531
stephanrauh/AngularFaces
AngularFaces_2.0/incubator/AngularFaces-widgets/src/main/java/de/beyondjava/angularFaces/flavors/kendo/puiBody/PuiBody.java
PuiBody.getValueToRender
public static Object getValueToRender(FacesContext context, UIComponent component) { """ This method has been copied from the PrimeFaces 5 project. Algorithm works as follows; - If it's an input component, submitted value is checked first since it'd be the value to be used in case validation errors terminates ...
java
public static Object getValueToRender(FacesContext context, UIComponent component) { if (component instanceof ValueHolder) { if (component instanceof EditableValueHolder) { EditableValueHolder input = (EditableValueHolder) component; Object submittedValue = input.getSubmittedValue(); ConfigContainer c...
[ "public", "static", "Object", "getValueToRender", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "{", "if", "(", "component", "instanceof", "ValueHolder", ")", "{", "if", "(", "component", "instanceof", "EditableValueHolder", ")", "{", "Edit...
This method has been copied from the PrimeFaces 5 project. Algorithm works as follows; - If it's an input component, submitted value is checked first since it'd be the value to be used in case validation errors terminates jsf lifecycle - Finally the value of the component is retrieved from backing bean and if there's ...
[ "This", "method", "has", "been", "copied", "from", "the", "PrimeFaces", "5", "project", "." ]
train
https://github.com/stephanrauh/AngularFaces/blob/43d915f004645b1bbbf2625214294dab0858ba01/AngularFaces_2.0/incubator/AngularFaces-widgets/src/main/java/de/beyondjava/angularFaces/flavors/kendo/puiBody/PuiBody.java#L141-L163
wisdom-framework/wisdom
core/crypto/src/main/java/org/wisdom/crypto/CryptoServiceSingleton.java
CryptoServiceSingleton.decryptAESWithCBC
@Override public String decryptAESWithCBC(String value, String privateKey, String salt, String iv) { """ Decrypt a String with the AES encryption advanced using 'AES/CBC/PKCS5Padding'. Unlike the regular encode/decode AES method using ECB (Electronic Codebook), it uses Cipher-block chaining (CBC). The private...
java
@Override public String decryptAESWithCBC(String value, String privateKey, String salt, String iv) { SecretKey key = generateAESKey(privateKey, salt); byte[] decrypted = doFinal(Cipher.DECRYPT_MODE, key, iv, decodeBase64(value)); return new String(decrypted, UTF_8); }
[ "@", "Override", "public", "String", "decryptAESWithCBC", "(", "String", "value", ",", "String", "privateKey", ",", "String", "salt", ",", "String", "iv", ")", "{", "SecretKey", "key", "=", "generateAESKey", "(", "privateKey", ",", "salt", ")", ";", "byte", ...
Decrypt a String with the AES encryption advanced using 'AES/CBC/PKCS5Padding'. Unlike the regular encode/decode AES method using ECB (Electronic Codebook), it uses Cipher-block chaining (CBC). The private key must have a length of 16 bytes, the salt and initialization vector must be valid hexadecimal Strings. @param ...
[ "Decrypt", "a", "String", "with", "the", "AES", "encryption", "advanced", "using", "AES", "/", "CBC", "/", "PKCS5Padding", ".", "Unlike", "the", "regular", "encode", "/", "decode", "AES", "method", "using", "ECB", "(", "Electronic", "Codebook", ")", "it", ...
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/crypto/src/main/java/org/wisdom/crypto/CryptoServiceSingleton.java#L169-L174
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java
XsdAsmInterfaces.choiceMethod
private List<InterfaceInfo> choiceMethod(List<XsdGroup> groupElements, List<XsdElement> directElements, String className, int interfaceIndex, String apiName, String groupName) { """ Generates an interface based on a {@link XsdChoice} element. @param groupElements The contained groupElements. @param directElement...
java
private List<InterfaceInfo> choiceMethod(List<XsdGroup> groupElements, List<XsdElement> directElements, String className, int interfaceIndex, String apiName, String groupName){ List<InterfaceInfo> interfaceInfoList = new ArrayList<>(); String interfaceName; if (groupName != null){ i...
[ "private", "List", "<", "InterfaceInfo", ">", "choiceMethod", "(", "List", "<", "XsdGroup", ">", "groupElements", ",", "List", "<", "XsdElement", ">", "directElements", ",", "String", "className", ",", "int", "interfaceIndex", ",", "String", "apiName", ",", "S...
Generates an interface based on a {@link XsdChoice} element. @param groupElements The contained groupElements. @param directElements The direct elements of the {@link XsdChoice} element. @param className The name of the class that contains the {@link XsdChoice} element. @param interfaceIndex The current interface index...
[ "Generates", "an", "interface", "based", "on", "a", "{" ]
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java#L664-L680
wiselenium/wiselenium
wiselenium-factory/src/main/java/com/github/wiselenium/Wiselenium.java
Wiselenium.findElement
public static <E> E findElement(Class<E> clazz, By by, SearchContext searchContext) { """ Finds the first element within the search context using the given mechanism. <br/> Throws a NoSuchElementException if the element couldn't be found. <br/> @param clazz The class of the element. @param by The locating mec...
java
public static <E> E findElement(Class<E> clazz, By by, SearchContext searchContext) { WebElement webElement = searchContext.findElement(by); return decorateElement(clazz, webElement); }
[ "public", "static", "<", "E", ">", "E", "findElement", "(", "Class", "<", "E", ">", "clazz", ",", "By", "by", ",", "SearchContext", "searchContext", ")", "{", "WebElement", "webElement", "=", "searchContext", ".", "findElement", "(", "by", ")", ";", "ret...
Finds the first element within the search context using the given mechanism. <br/> Throws a NoSuchElementException if the element couldn't be found. <br/> @param clazz The class of the element. @param by The locating mechanism to use. @param searchContext The search context. @return The element. @since 0.3.0
[ "Finds", "the", "first", "element", "within", "the", "search", "context", "using", "the", "given", "mechanism", ".", "<br", "/", ">", "Throws", "a", "NoSuchElementException", "if", "the", "element", "couldn", "t", "be", "found", ".", "<br", "/", ">" ]
train
https://github.com/wiselenium/wiselenium/blob/15de6484d8f516b3d02391d3bd6a56a03e632706/wiselenium-factory/src/main/java/com/github/wiselenium/Wiselenium.java#L54-L57
b3dgs/lionengine
lionengine-core-awt/src/main/java/com/b3dgs/lionengine/awt/graphic/ToolsAwt.java
ToolsAwt.getRasterBuffer
public static BufferedImage getRasterBuffer(BufferedImage image, double fr, double fg, double fb) { """ Get raster buffer from data. @param image The image buffer. @param fr The factor red. @param fg The factor green. @param fb The factor blue. @return The rastered image. """ final BufferedImag...
java
public static BufferedImage getRasterBuffer(BufferedImage image, double fr, double fg, double fb) { final BufferedImage raster = createImage(image.getWidth(), image.getHeight(), image.getTransparency()); for (int i = 0; i < raster.getWidth(); i++) { for (int j = 0; j < raste...
[ "public", "static", "BufferedImage", "getRasterBuffer", "(", "BufferedImage", "image", ",", "double", "fr", ",", "double", "fg", ",", "double", "fb", ")", "{", "final", "BufferedImage", "raster", "=", "createImage", "(", "image", ".", "getWidth", "(", ")", "...
Get raster buffer from data. @param image The image buffer. @param fr The factor red. @param fg The factor green. @param fb The factor blue. @return The rastered image.
[ "Get", "raster", "buffer", "from", "data", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core-awt/src/main/java/com/b3dgs/lionengine/awt/graphic/ToolsAwt.java#L346-L357
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/preferences/ExtraLanguagePreferenceAccess.java
ExtraLanguagePreferenceAccess.getXtextKey
private static String getXtextKey(String preferenceContainerID, String preferenceName) { """ Create a preference key according to the Xtext option block standards. @param preferenceContainerID the identifier of the generator's preference container. @param preferenceName the name of the preference. @return the...
java
private static String getXtextKey(String preferenceContainerID, String preferenceName) { return GENERATOR_PREFERENCE_TAG + PreferenceConstants.SEPARATOR + preferenceContainerID + PreferenceConstants.SEPARATOR + preferenceName; }
[ "private", "static", "String", "getXtextKey", "(", "String", "preferenceContainerID", ",", "String", "preferenceName", ")", "{", "return", "GENERATOR_PREFERENCE_TAG", "+", "PreferenceConstants", ".", "SEPARATOR", "+", "preferenceContainerID", "+", "PreferenceConstants", "...
Create a preference key according to the Xtext option block standards. @param preferenceContainerID the identifier of the generator's preference container. @param preferenceName the name of the preference. @return the key.
[ "Create", "a", "preference", "key", "according", "to", "the", "Xtext", "option", "block", "standards", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/preferences/ExtraLanguagePreferenceAccess.java#L100-L103
zxing/zxing
core/src/main/java/com/google/zxing/pdf417/encoder/PDF417HighLevelEncoder.java
PDF417HighLevelEncoder.determineConsecutiveBinaryCount
private static int determineConsecutiveBinaryCount(String msg, int startpos, Charset encoding) throws WriterException { """ Determines the number of consecutive characters that are encodable using binary compaction. @param msg the message @param startpos the start position within the message @param...
java
private static int determineConsecutiveBinaryCount(String msg, int startpos, Charset encoding) throws WriterException { CharsetEncoder encoder = encoding.newEncoder(); int len = msg.length(); int idx = startpos; while (idx < len) { char ch = msg.charAt(idx); int numericCount = 0; ...
[ "private", "static", "int", "determineConsecutiveBinaryCount", "(", "String", "msg", ",", "int", "startpos", ",", "Charset", "encoding", ")", "throws", "WriterException", "{", "CharsetEncoder", "encoder", "=", "encoding", ".", "newEncoder", "(", ")", ";", "int", ...
Determines the number of consecutive characters that are encodable using binary compaction. @param msg the message @param startpos the start position within the message @param encoding the charset used to convert the message to a byte array @return the requested character count
[ "Determines", "the", "number", "of", "consecutive", "characters", "that", "are", "encodable", "using", "binary", "compaction", "." ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/pdf417/encoder/PDF417HighLevelEncoder.java#L537-L566
i-net-software/jlessc
src/com/inet/lib/less/LessParser.java
LessParser.buildExpression
@Nonnull private Expression buildExpression( String str ) { """ Create an expression from the given atomic string. @param str the expression like a number, color, variable, string, etc @return the expression """ switch( str.charAt( 0 ) ) { case '@': return new Variab...
java
@Nonnull private Expression buildExpression( String str ) { switch( str.charAt( 0 ) ) { case '@': return new VariableExpression( reader, str ); case '-': if( str.startsWith( "-@" ) ) { return new FunctionExpression( reader, "-", new...
[ "@", "Nonnull", "private", "Expression", "buildExpression", "(", "String", "str", ")", "{", "switch", "(", "str", ".", "charAt", "(", "0", ")", ")", "{", "case", "'", "'", ":", "return", "new", "VariableExpression", "(", "reader", ",", "str", ")", ";",...
Create an expression from the given atomic string. @param str the expression like a number, color, variable, string, etc @return the expression
[ "Create", "an", "expression", "from", "the", "given", "atomic", "string", "." ]
train
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/LessParser.java#L1154-L1167
cverges/expect4j
src/main/java/expect4j/ConsumerImpl.java
ConsumerImpl.notifyBufferChange
protected void notifyBufferChange(char[] newData, int numChars) { """ Notifies all registered BufferChangeLogger instances of a change. @param newData the buffer that contains the new data being added @param numChars the number of valid characters in the buffer """ synchronized(bufferChangeLoggers)...
java
protected void notifyBufferChange(char[] newData, int numChars) { synchronized(bufferChangeLoggers) { Iterator<BufferChangeLogger> iterator = bufferChangeLoggers.iterator(); while (iterator.hasNext()) { iterator.next().bufferChanged(newData, numChars); } ...
[ "protected", "void", "notifyBufferChange", "(", "char", "[", "]", "newData", ",", "int", "numChars", ")", "{", "synchronized", "(", "bufferChangeLoggers", ")", "{", "Iterator", "<", "BufferChangeLogger", ">", "iterator", "=", "bufferChangeLoggers", ".", "iterator"...
Notifies all registered BufferChangeLogger instances of a change. @param newData the buffer that contains the new data being added @param numChars the number of valid characters in the buffer
[ "Notifies", "all", "registered", "BufferChangeLogger", "instances", "of", "a", "change", "." ]
train
https://github.com/cverges/expect4j/blob/97b1da9b7bd231344cd7b7ce26d14caf8bb16cd6/src/main/java/expect4j/ConsumerImpl.java#L175-L182
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/AFPChainer.java
AFPChainer.getRmsd
private static double getRmsd(Atom[] catmp1, Atom[] catmp2) throws StructureException { """ Calculate the RMSD for two sets of atoms. Rotates the 2nd atom set so make sure this does not cause problems later @param catmp1 @return """ Matrix4d trans = SuperPositions.superpose(Calc.atomsToPoints(catmp1),...
java
private static double getRmsd(Atom[] catmp1, Atom[] catmp2) throws StructureException{ Matrix4d trans = SuperPositions.superpose(Calc.atomsToPoints(catmp1), Calc.atomsToPoints(catmp2)); Calc.transform(catmp2, trans); // if ( showAlig) { // StructureAlignmentJmol jmol = new StructureAlignmentJmol()...
[ "private", "static", "double", "getRmsd", "(", "Atom", "[", "]", "catmp1", ",", "Atom", "[", "]", "catmp2", ")", "throws", "StructureException", "{", "Matrix4d", "trans", "=", "SuperPositions", ".", "superpose", "(", "Calc", ".", "atomsToPoints", "(", "catmp...
Calculate the RMSD for two sets of atoms. Rotates the 2nd atom set so make sure this does not cause problems later @param catmp1 @return
[ "Calculate", "the", "RMSD", "for", "two", "sets", "of", "atoms", ".", "Rotates", "the", "2nd", "atom", "set", "so", "make", "sure", "this", "does", "not", "cause", "problems", "later" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/fatcat/calc/AFPChainer.java#L701-L744
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/h2internal/hpack/H2Headers.java
H2Headers.decodeFragment
private static String decodeFragment(WsByteBuffer buffer) throws CompressionException { """ Decode a Fragment of the Header. Fragment in this case refers to the bytes that represent the integer length and octets length of either the Name or Value of a Header. For instance, in the case of the Name, the fragment i...
java
private static String decodeFragment(WsByteBuffer buffer) throws CompressionException { String decodedResult = null; try { byte currentByte = buffer.get(); //Reset back position to decode the integer length of this segment. buffer.position(buffer.position() - 1); ...
[ "private", "static", "String", "decodeFragment", "(", "WsByteBuffer", "buffer", ")", "throws", "CompressionException", "{", "String", "decodedResult", "=", "null", ";", "try", "{", "byte", "currentByte", "=", "buffer", ".", "get", "(", ")", ";", "//Reset back po...
Decode a Fragment of the Header. Fragment in this case refers to the bytes that represent the integer length and octets length of either the Name or Value of a Header. For instance, in the case of the Name, the fragment is +---+---+-----------------------+ | H | Name Length (7+) | +---+---------------------------+ | N...
[ "Decode", "a", "Fragment", "of", "the", "Header", ".", "Fragment", "in", "this", "case", "refers", "to", "the", "bytes", "that", "represent", "the", "integer", "length", "and", "octets", "length", "of", "either", "the", "Name", "or", "Value", "of", "a", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/h2internal/hpack/H2Headers.java#L283-L317
kiegroup/drools
kie-ci/src/main/java/org/kie/api/builder/helper/KieModuleDeploymentHelperImpl.java
KieModuleDeploymentHelperImpl.getPomText
private static String getPomText(ReleaseId releaseId, ReleaseId... dependencies) { """ Create the pom that will be placed in the KJar. @param releaseId The release (deployment) id. @param dependencies The list of dependendencies to be added to the pom @return A string representation of the pom. """ ...
java
private static String getPomText(ReleaseId releaseId, ReleaseId... dependencies) { String pom = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" + " xsi:schema...
[ "private", "static", "String", "getPomText", "(", "ReleaseId", "releaseId", ",", "ReleaseId", "...", "dependencies", ")", "{", "String", "pom", "=", "\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\"", "+", "\"<project xmlns=\\\"http://maven.apache.org/POM/4.0.0\\\" xmlns...
Create the pom that will be placed in the KJar. @param releaseId The release (deployment) id. @param dependencies The list of dependendencies to be added to the pom @return A string representation of the pom.
[ "Create", "the", "pom", "that", "will", "be", "placed", "in", "the", "KJar", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-ci/src/main/java/org/kie/api/builder/helper/KieModuleDeploymentHelperImpl.java#L365-L390
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GSAConfiguration.java
GSAConfiguration.addBroadcastSetForSumFunction
public void addBroadcastSetForSumFunction(String name, DataSet<?> data) { """ Adds a data set as a broadcast set to the sum function. @param name The name under which the broadcast data is available in the sum function. @param data The data set to be broadcast. """ this.bcVarsSum.add(new Tuple2<>(name, d...
java
public void addBroadcastSetForSumFunction(String name, DataSet<?> data) { this.bcVarsSum.add(new Tuple2<>(name, data)); }
[ "public", "void", "addBroadcastSetForSumFunction", "(", "String", "name", ",", "DataSet", "<", "?", ">", "data", ")", "{", "this", ".", "bcVarsSum", ".", "add", "(", "new", "Tuple2", "<>", "(", "name", ",", "data", ")", ")", ";", "}" ]
Adds a data set as a broadcast set to the sum function. @param name The name under which the broadcast data is available in the sum function. @param data The data set to be broadcast.
[ "Adds", "a", "data", "set", "as", "a", "broadcast", "set", "to", "the", "sum", "function", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GSAConfiguration.java#L70-L72
jasminb/jsonapi-converter
src/main/java/com/github/jasminb/jsonapi/ConverterConfiguration.java
ConverterConfiguration.getRelationshipLinksField
public Field getRelationshipLinksField(Class<?> clazz, String relationshipName) { """ Returns relationship links field. @param clazz {@link Class} class holding relationship @param relationshipName {@link String} name of the relationship @return {@link Field} field """ return relationshipLinksFieldMap.get...
java
public Field getRelationshipLinksField(Class<?> clazz, String relationshipName) { return relationshipLinksFieldMap.get(clazz).get(relationshipName); }
[ "public", "Field", "getRelationshipLinksField", "(", "Class", "<", "?", ">", "clazz", ",", "String", "relationshipName", ")", "{", "return", "relationshipLinksFieldMap", ".", "get", "(", "clazz", ")", ".", "get", "(", "relationshipName", ")", ";", "}" ]
Returns relationship links field. @param clazz {@link Class} class holding relationship @param relationshipName {@link String} name of the relationship @return {@link Field} field
[ "Returns", "relationship", "links", "field", "." ]
train
https://github.com/jasminb/jsonapi-converter/blob/73b41c3b9274e70e62b3425071ca8afdc7bddaf6/src/main/java/com/github/jasminb/jsonapi/ConverterConfiguration.java#L354-L356
marklogic/marklogic-sesame
marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/MarkLogicRepositoryConnection.java
MarkLogicRepositoryConnection.prepareTupleQuery
@Override public MarkLogicTupleQuery prepareTupleQuery(String queryString) throws RepositoryException, MalformedQueryException { """ overload for prepareTupleQuery @param queryString @return MarkLogicTupleQuery @throws RepositoryException @throws MalformedQueryException """ return prepareTupl...
java
@Override public MarkLogicTupleQuery prepareTupleQuery(String queryString) throws RepositoryException, MalformedQueryException { return prepareTupleQuery(QueryLanguage.SPARQL, queryString); }
[ "@", "Override", "public", "MarkLogicTupleQuery", "prepareTupleQuery", "(", "String", "queryString", ")", "throws", "RepositoryException", ",", "MalformedQueryException", "{", "return", "prepareTupleQuery", "(", "QueryLanguage", ".", "SPARQL", ",", "queryString", ")", "...
overload for prepareTupleQuery @param queryString @return MarkLogicTupleQuery @throws RepositoryException @throws MalformedQueryException
[ "overload", "for", "prepareTupleQuery" ]
train
https://github.com/marklogic/marklogic-sesame/blob/d5b668ed2b3d5e90c9f1d5096012813c272062a2/marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/MarkLogicRepositoryConnection.java#L223-L226
pressgang-ccms/PressGangCCMSContentSpec
src/main/java/org/jboss/pressgang/ccms/contentspec/utils/ContentSpecUtilities.java
ContentSpecUtilities.fixFailedContentSpec
public static String fixFailedContentSpec(final ContentSpecWrapper contentSpec, final String validText, final boolean includeChecksum) { """ Fixes a failed Content Spec so that the ID and CHECKSUM are included. This is primarily an issue when creating new content specs and they are initially invalid. @param co...
java
public static String fixFailedContentSpec(final ContentSpecWrapper contentSpec, final String validText, final boolean includeChecksum) { return fixFailedContentSpec(contentSpec.getId(), contentSpec.getFailed(), validText, includeChecksum); }
[ "public", "static", "String", "fixFailedContentSpec", "(", "final", "ContentSpecWrapper", "contentSpec", ",", "final", "String", "validText", ",", "final", "boolean", "includeChecksum", ")", "{", "return", "fixFailedContentSpec", "(", "contentSpec", ".", "getId", "(",...
Fixes a failed Content Spec so that the ID and CHECKSUM are included. This is primarily an issue when creating new content specs and they are initially invalid. @param contentSpec The content spec to fix. @param validText The content specs latest valid text. @param includeChecksum If the checksum should be i...
[ "Fixes", "a", "failed", "Content", "Spec", "so", "that", "the", "ID", "and", "CHECKSUM", "are", "included", ".", "This", "is", "primarily", "an", "issue", "when", "creating", "new", "content", "specs", "and", "they", "are", "initially", "invalid", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/ContentSpecUtilities.java#L169-L171
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/context/AbstractBeanDefinition.java
AbstractBeanDefinition.getValueForMethodArgument
@SuppressWarnings( { """ Obtains a value for the given method argument. @param resolutionContext The resolution context @param context The bean context @param methodIndex The method index @param argIndex The argument index @return The value """"unused", "unchecked"}) @Intern...
java
@SuppressWarnings({"unused", "unchecked"}) @Internal protected final Object getValueForMethodArgument(BeanResolutionContext resolutionContext, BeanContext context, int methodIndex, int argIndex) { MethodInjectionPoint injectionPoint = methodInjectionPoints.get(methodIndex); Argument argument = i...
[ "@", "SuppressWarnings", "(", "{", "\"unused\"", ",", "\"unchecked\"", "}", ")", "@", "Internal", "protected", "final", "Object", "getValueForMethodArgument", "(", "BeanResolutionContext", "resolutionContext", ",", "BeanContext", "context", ",", "int", "methodIndex", ...
Obtains a value for the given method argument. @param resolutionContext The resolution context @param context The bean context @param methodIndex The method index @param argIndex The argument index @return The value
[ "Obtains", "a", "value", "for", "the", "given", "method", "argument", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/context/AbstractBeanDefinition.java#L740-L784
maxirosson/jdroid-android
jdroid-android-core/src/main/java/com/jdroid/android/images/BitmapUtils.java
BitmapUtils.toBitmap
public static Bitmap toBitmap(Uri uri, Integer maxWidth, Integer maxHeight) { """ Gets a {@link Bitmap} from a {@link Uri}. Resizes the image to a determined width and height. @param uri The {@link Uri} from which the image is obtained. @param maxWidth The maximum width of the image used to scale it. If null, ...
java
public static Bitmap toBitmap(Uri uri, Integer maxWidth, Integer maxHeight) { try { Context context = AbstractApplication.get(); // First decode with inJustDecodeBounds=true to check dimensions Options options = new Options(); options.inJustDecodeBounds = true; InputStream openInputStream = context.ge...
[ "public", "static", "Bitmap", "toBitmap", "(", "Uri", "uri", ",", "Integer", "maxWidth", ",", "Integer", "maxHeight", ")", "{", "try", "{", "Context", "context", "=", "AbstractApplication", ".", "get", "(", ")", ";", "// First decode with inJustDecodeBounds=true t...
Gets a {@link Bitmap} from a {@link Uri}. Resizes the image to a determined width and height. @param uri The {@link Uri} from which the image is obtained. @param maxWidth The maximum width of the image used to scale it. If null, the image won't be scaled @param maxHeight The maximum height of the image used to scale i...
[ "Gets", "a", "{", "@link", "Bitmap", "}", "from", "a", "{", "@link", "Uri", "}", ".", "Resizes", "the", "image", "to", "a", "determined", "width", "and", "height", "." ]
train
https://github.com/maxirosson/jdroid-android/blob/1ba9cae56a16fa36bdb2c9c04379853f0300707f/jdroid-android-core/src/main/java/com/jdroid/android/images/BitmapUtils.java#L54-L82
berkesa/datatree
src/main/java/io/datatree/Tree.java
Tree.putList
public Tree putList(String path, boolean putIfAbsent) { """ Associates the specified List (~= JSON array) container with the specified path. If the structure previously contained a mapping for the path, the old value is replaced. Sample code:<br> <br> Tree node = new Tree();<br> <br> Tree list1 = node.putLis...
java
public Tree putList(String path, boolean putIfAbsent) { return putObjectInternal(path, new LinkedList<Object>(), putIfAbsent); }
[ "public", "Tree", "putList", "(", "String", "path", ",", "boolean", "putIfAbsent", ")", "{", "return", "putObjectInternal", "(", "path", ",", "new", "LinkedList", "<", "Object", ">", "(", ")", ",", "putIfAbsent", ")", ";", "}" ]
Associates the specified List (~= JSON array) container with the specified path. If the structure previously contained a mapping for the path, the old value is replaced. Sample code:<br> <br> Tree node = new Tree();<br> <br> Tree list1 = node.putList("a.b.c");<br> list1.add(1).add(2).add(3);<br> <br> Tree list2 = node....
[ "Associates", "the", "specified", "List", "(", "~", "=", "JSON", "array", ")", "container", "with", "the", "specified", "path", ".", "If", "the", "structure", "previously", "contained", "a", "mapping", "for", "the", "path", "the", "old", "value", "is", "re...
train
https://github.com/berkesa/datatree/blob/79aea9b45c7b46ab28af0a09310bc01c421c6b3a/src/main/java/io/datatree/Tree.java#L2078-L2080
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuModuleLoadData
public static int cuModuleLoadData(CUmodule module, String string) { """ A wrapper function for {@link #cuModuleLoadData(CUmodule, byte[])} that converts the given string into a zero-terminated byte array. @param module The module @param string The data. May not be <code>null</code>. @return The return code ...
java
public static int cuModuleLoadData(CUmodule module, String string) { byte bytes[] = string.getBytes(); byte image[] = Arrays.copyOf(bytes, bytes.length+1); return cuModuleLoadData(module, image); }
[ "public", "static", "int", "cuModuleLoadData", "(", "CUmodule", "module", ",", "String", "string", ")", "{", "byte", "bytes", "[", "]", "=", "string", ".", "getBytes", "(", ")", ";", "byte", "image", "[", "]", "=", "Arrays", ".", "copyOf", "(", "bytes"...
A wrapper function for {@link #cuModuleLoadData(CUmodule, byte[])} that converts the given string into a zero-terminated byte array. @param module The module @param string The data. May not be <code>null</code>. @return The return code from <code>cuModuleLoadData</code> @see #cuModuleLoadData(CUmodule, byte[])
[ "A", "wrapper", "function", "for", "{", "@link", "#cuModuleLoadData", "(", "CUmodule", "byte", "[]", ")", "}", "that", "converts", "the", "given", "string", "into", "a", "zero", "-", "terminated", "byte", "array", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L434-L439
pwittchen/prefser
library/src/main/java/com/github/pwittchen/prefser/library/rx2/Prefser.java
Prefser.observe
public <T> Observable<T> observe(@NonNull String key, @NonNull Class<T> classOfT, T defaultValue) { """ Gets value from SharedPreferences with a given key and type as a RxJava Observable, which can be subscribed. If value is not found, we can return defaultValue. @param key key of the preference @param...
java
public <T> Observable<T> observe(@NonNull String key, @NonNull Class<T> classOfT, T defaultValue) { Preconditions.checkNotNull(key, KEY_IS_NULL); Preconditions.checkNotNull(classOfT, CLASS_OF_T_IS_NULL); return observe(key, TypeToken.fromClass(classOfT), defaultValue); }
[ "public", "<", "T", ">", "Observable", "<", "T", ">", "observe", "(", "@", "NonNull", "String", "key", ",", "@", "NonNull", "Class", "<", "T", ">", "classOfT", ",", "T", "defaultValue", ")", "{", "Preconditions", ".", "checkNotNull", "(", "key", ",", ...
Gets value from SharedPreferences with a given key and type as a RxJava Observable, which can be subscribed. If value is not found, we can return defaultValue. @param key key of the preference @param classOfT class of T (e.g. String.class) @param defaultValue default value of the preference (e.g. "" or "undefined") @p...
[ "Gets", "value", "from", "SharedPreferences", "with", "a", "given", "key", "and", "type", "as", "a", "RxJava", "Observable", "which", "can", "be", "subscribed", ".", "If", "value", "is", "not", "found", "we", "can", "return", "defaultValue", "." ]
train
https://github.com/pwittchen/prefser/blob/7dc7f980eeb71fd5617f8c749050c2400e4fbb2f/library/src/main/java/com/github/pwittchen/prefser/library/rx2/Prefser.java#L185-L191
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java
EscapedFunctions2.sqlspace
public static void sqlspace(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { """ space translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens """ singleArgumentFunctionCall(buf, "repeat(' ',", "space...
java
public static void sqlspace(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "repeat(' ',", "space", parsedArgs); }
[ "public", "static", "void", "sqlspace", "(", "StringBuilder", "buf", ",", "List", "<", "?", "extends", "CharSequence", ">", "parsedArgs", ")", "throws", "SQLException", "{", "singleArgumentFunctionCall", "(", "buf", ",", "\"repeat(' ',\"", ",", "\"space\"", ",", ...
space translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens
[ "space", "translation" ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java#L293-L295
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnGatewaysInner.java
P2sVpnGatewaysInner.beginCreateOrUpdateAsync
public Observable<P2SVpnGatewayInner> beginCreateOrUpdateAsync(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters) { """ Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. @param resourceGroupName The resource group name of the P2SV...
java
public Observable<P2SVpnGatewayInner> beginCreateOrUpdateAsync(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, p2SVpnGatewayParameters).map(new Func1<ServiceResponse<P2SVpnGatewayInner>...
[ "public", "Observable", "<", "P2SVpnGatewayInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "gatewayName", ",", "P2SVpnGatewayInner", "p2SVpnGatewayParameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", ...
Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. @param resourceGroupName The resource group name of the P2SVpnGateway. @param gatewayName The name of the gateway. @param p2SVpnGatewayParameters Parameters supplied to create or Update a virtual wan p2s vpn gateway. @throws I...
[ "Creates", "a", "virtual", "wan", "p2s", "vpn", "gateway", "if", "it", "doesn", "t", "exist", "else", "updates", "the", "existing", "gateway", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnGatewaysInner.java#L325-L332
hageldave/ImagingKit
ImagingKit_Fourier/src/main/java/hageldave/imagingkit/fourier/Fourier.java
Fourier.verticalInverseTransform
public static ColorImg verticalInverseTransform(ColorImg target, ComplexImg fourier, int channel) { """ Executes column wise inverse Fourier transforms of the specified {@link ComplexImg}. A 1-dimensional Fourier transform is done for each column of the ComplexImg. The resulting transforms will be stored in the ...
java
public static ColorImg verticalInverseTransform(ColorImg target, ComplexImg fourier, int channel) { Dimension dim = fourier.getDimension(); // if no target was specified create a new one if(target == null) { target = new ColorImg(dim, channel==ColorImg.channel_a); } // continue sanity checks sanityCheckI...
[ "public", "static", "ColorImg", "verticalInverseTransform", "(", "ColorImg", "target", ",", "ComplexImg", "fourier", ",", "int", "channel", ")", "{", "Dimension", "dim", "=", "fourier", ".", "getDimension", "(", ")", ";", "// if no target was specified create a new on...
Executes column wise inverse Fourier transforms of the specified {@link ComplexImg}. A 1-dimensional Fourier transform is done for each column of the ComplexImg. The resulting transforms will be stored in the specified channel of the specified target {@link ColorImg}. If target is null, a new ColorImg is created. @para...
[ "Executes", "column", "wise", "inverse", "Fourier", "transforms", "of", "the", "specified", "{", "@link", "ComplexImg", "}", ".", "A", "1", "-", "dimensional", "Fourier", "transform", "is", "done", "for", "each", "column", "of", "the", "ComplexImg", ".", "Th...
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Fourier/src/main/java/hageldave/imagingkit/fourier/Fourier.java#L394-L425
outbrain/ob1k
ob1k-core/src/main/java/com/outbrain/ob1k/server/netty/HttpStaticFileServerHandler.java
HttpStaticFileServerHandler.setContentTypeHeader
private void setContentTypeHeader(final HttpResponse response, final URLConnection connection) { """ Sets the content type header for the HTTP Response @param response HTTP response @param connection connection to extract content type """ response.headers().set(CONTENT_TYPE, mimeTypesMap.getContentType...
java
private void setContentTypeHeader(final HttpResponse response, final URLConnection connection) { response.headers().set(CONTENT_TYPE, mimeTypesMap.getContentType(connection.getURL().getPath())); }
[ "private", "void", "setContentTypeHeader", "(", "final", "HttpResponse", "response", ",", "final", "URLConnection", "connection", ")", "{", "response", ".", "headers", "(", ")", ".", "set", "(", "CONTENT_TYPE", ",", "mimeTypesMap", ".", "getContentType", "(", "c...
Sets the content type header for the HTTP Response @param response HTTP response @param connection connection to extract content type
[ "Sets", "the", "content", "type", "header", "for", "the", "HTTP", "Response" ]
train
https://github.com/outbrain/ob1k/blob/9e43ab39230c5787065053da0f766d822d0fe4e7/ob1k-core/src/main/java/com/outbrain/ob1k/server/netty/HttpStaticFileServerHandler.java#L247-L249
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EndpointUser.java
EndpointUser.withUserAttributes
public EndpointUser withUserAttributes(java.util.Map<String, java.util.List<String>> userAttributes) { """ Custom attributes that describe the user by associating a name with an array of values. For example, an attribute named "interests" might have the following values: ["science", "politics", "travel"]. You can...
java
public EndpointUser withUserAttributes(java.util.Map<String, java.util.List<String>> userAttributes) { setUserAttributes(userAttributes); return this; }
[ "public", "EndpointUser", "withUserAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "java", ".", "util", ".", "List", "<", "String", ">", ">", "userAttributes", ")", "{", "setUserAttributes", "(", "userAttributes", ")", ";", "return", ...
Custom attributes that describe the user by associating a name with an array of values. For example, an attribute named "interests" might have the following values: ["science", "politics", "travel"]. You can use these attributes as selection criteria when you create segments. The Amazon Pinpoint console can't display ...
[ "Custom", "attributes", "that", "describe", "the", "user", "by", "associating", "a", "name", "with", "an", "array", "of", "values", ".", "For", "example", "an", "attribute", "named", "interests", "might", "have", "the", "following", "values", ":", "[", "scie...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/EndpointUser.java#L107-L110
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_pendingChanges_GET
public ArrayList<OvhPendingChanges> serviceName_pendingChanges_GET(String serviceName) throws IOException { """ List the pending changes on your Load Balancer configuration, per zone REST: GET /ipLoadbalancing/{serviceName}/pendingChanges @param serviceName [required] The internal name of your IP load balancin...
java
public ArrayList<OvhPendingChanges> serviceName_pendingChanges_GET(String serviceName) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/pendingChanges"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t9); }
[ "public", "ArrayList", "<", "OvhPendingChanges", ">", "serviceName_pendingChanges_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalancing/{serviceName}/pendingChanges\"", ";", "StringBuilder", "sb", "=", "path", "...
List the pending changes on your Load Balancer configuration, per zone REST: GET /ipLoadbalancing/{serviceName}/pendingChanges @param serviceName [required] The internal name of your IP load balancing
[ "List", "the", "pending", "changes", "on", "your", "Load", "Balancer", "configuration", "per", "zone" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L1228-L1233
mgm-tp/jfunk
jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java
WebDriverTool.findElement
public WebElement findElement(final By by, final Predicate<WebElement> condition) { """ Finds the first element. Uses the internal {@link WebElementFinder}, which tries to apply the specified {@code condition} until it times out. @param by the {@link By} used to locate the element @param condition a conditi...
java
public WebElement findElement(final By by, final Predicate<WebElement> condition) { return wef.by(by).condition(condition).find(); }
[ "public", "WebElement", "findElement", "(", "final", "By", "by", ",", "final", "Predicate", "<", "WebElement", ">", "condition", ")", "{", "return", "wef", ".", "by", "(", "by", ")", ".", "condition", "(", "condition", ")", ".", "find", "(", ")", ";", ...
Finds the first element. Uses the internal {@link WebElementFinder}, which tries to apply the specified {@code condition} until it times out. @param by the {@link By} used to locate the element @param condition a condition the found element must meet @return the element
[ "Finds", "the", "first", "element", ".", "Uses", "the", "internal", "{", "@link", "WebElementFinder", "}", "which", "tries", "to", "apply", "the", "specified", "{", "@code", "condition", "}", "until", "it", "times", "out", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/WebDriverTool.java#L186-L188
grails/grails-core
grails-core/src/main/groovy/grails/plugins/DefaultGrailsPluginManager.java
DefaultGrailsPluginManager.isDependentOn
private boolean isDependentOn(GrailsPlugin plugin, GrailsPlugin dependency) { """ Checks whether the first plugin is dependant on the second plugin. @param plugin The plugin to check @param dependency The plugin which the first argument may be dependant on @return true if it is """ for (String...
java
private boolean isDependentOn(GrailsPlugin plugin, GrailsPlugin dependency) { for (String name : plugin.getDependencyNames()) { String requiredVersion = plugin.getDependentVersion(name); if (name.equals(dependency.getName()) && GrailsVersionUtils.isValidVersion(depen...
[ "private", "boolean", "isDependentOn", "(", "GrailsPlugin", "plugin", ",", "GrailsPlugin", "dependency", ")", "{", "for", "(", "String", "name", ":", "plugin", ".", "getDependencyNames", "(", ")", ")", "{", "String", "requiredVersion", "=", "plugin", ".", "get...
Checks whether the first plugin is dependant on the second plugin. @param plugin The plugin to check @param dependency The plugin which the first argument may be dependant on @return true if it is
[ "Checks", "whether", "the", "first", "plugin", "is", "dependant", "on", "the", "second", "plugin", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/plugins/DefaultGrailsPluginManager.java#L561-L570
cloudinary/cloudinary_java
cloudinary-core/src/main/java/com/cloudinary/Api.java
Api.updateResourcesAccessModeByTag
public ApiResponse updateResourcesAccessModeByTag(String accessMode, String tag, Map options) throws Exception { """ Update access mode of one or more resources by tag @param accessMode The new access mode, "public" or "authenticated" @param tag The tag by which to filter applicable resources @param o...
java
public ApiResponse updateResourcesAccessModeByTag(String accessMode, String tag, Map options) throws Exception { return updateResourcesAccessMode(accessMode, "tag", tag, options); }
[ "public", "ApiResponse", "updateResourcesAccessModeByTag", "(", "String", "accessMode", ",", "String", "tag", ",", "Map", "options", ")", "throws", "Exception", "{", "return", "updateResourcesAccessMode", "(", "accessMode", ",", "\"tag\"", ",", "tag", ",", "options"...
Update access mode of one or more resources by tag @param accessMode The new access mode, "public" or "authenticated" @param tag The tag by which to filter applicable resources @param options additional options <ul> <li>resource_type - (default "image") - the type of resources to modify</li> <li>max_results...
[ "Update", "access", "mode", "of", "one", "or", "more", "resources", "by", "tag" ]
train
https://github.com/cloudinary/cloudinary_java/blob/58ee1823180da2dea6a2eb7e5cf00d5a760f8aef/cloudinary-core/src/main/java/com/cloudinary/Api.java#L518-L520
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/Branch.java
Branch.initSession
public boolean initSession(BranchUniversalReferralInitListener callback, boolean isReferrable, Uri data) { """ <p>Initialises a session with the Branch API.</p> @param callback A {@link BranchUniversalReferralInitListener} instance that will be called following successful (or unsuccessful) initialisation o...
java
public boolean initSession(BranchUniversalReferralInitListener callback, boolean isReferrable, Uri data) { return initSession(callback, isReferrable, data, null); }
[ "public", "boolean", "initSession", "(", "BranchUniversalReferralInitListener", "callback", ",", "boolean", "isReferrable", ",", "Uri", "data", ")", "{", "return", "initSession", "(", "callback", ",", "isReferrable", ",", "data", ",", "null", ")", ";", "}" ]
<p>Initialises a session with the Branch API.</p> @param callback A {@link BranchUniversalReferralInitListener} instance that will be called following successful (or unsuccessful) initialisation of the session with the Branch API. @param isReferrable A {@link Boolean} value indicating whether this initialisation s...
[ "<p", ">", "Initialises", "a", "session", "with", "the", "Branch", "API", ".", "<", "/", "p", ">" ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/Branch.java#L1204-L1206
OSSIndex/heuristic-version
src/main/java/net/ossindex/version/VersionFactory.java
VersionFactory.getRange
public IVersionRange getRange(String[] versions) throws InvalidRangeException { """ Join this set of ranges together. This could result in a set, or in a logical range. """ if (versions == null) { return null; } IVersionRange results = null; for (String version : versions) { IVersi...
java
public IVersionRange getRange(String[] versions) throws InvalidRangeException { if (versions == null) { return null; } IVersionRange results = null; for (String version : versions) { IVersionRange range = getRange(version); if (results == null) { results = range; } ...
[ "public", "IVersionRange", "getRange", "(", "String", "[", "]", "versions", ")", "throws", "InvalidRangeException", "{", "if", "(", "versions", "==", "null", ")", "{", "return", "null", ";", "}", "IVersionRange", "results", "=", "null", ";", "for", "(", "S...
Join this set of ranges together. This could result in a set, or in a logical range.
[ "Join", "this", "set", "of", "ranges", "together", ".", "This", "could", "result", "in", "a", "set", "or", "in", "a", "logical", "range", "." ]
train
https://github.com/OSSIndex/heuristic-version/blob/9fe33a49d74acec54ddb91de9a3c3cd2f98fba40/src/main/java/net/ossindex/version/VersionFactory.java#L200-L216
paypal/SeLion
client/src/main/java/com/paypal/selion/platform/html/Table.java
Table.uncheckCheckboxInCell
public void uncheckCheckboxInCell(int row, int column) { """ Untick a checkbox in a cell of a table indicated by the input row and column indices. @param row int number of row for cell @param column int number of column for cell """ String checkboxLocator = getXPathBase() + "tr[" + row + "]/td[" ...
java
public void uncheckCheckboxInCell(int row, int column) { String checkboxLocator = getXPathBase() + "tr[" + row + "]/td[" + column + "]/input"; CheckBox cb = new CheckBox(checkboxLocator); cb.uncheck(); }
[ "public", "void", "uncheckCheckboxInCell", "(", "int", "row", ",", "int", "column", ")", "{", "String", "checkboxLocator", "=", "getXPathBase", "(", ")", "+", "\"tr[\"", "+", "row", "+", "\"]/td[\"", "+", "column", "+", "\"]/input\"", ";", "CheckBox", "cb", ...
Untick a checkbox in a cell of a table indicated by the input row and column indices. @param row int number of row for cell @param column int number of column for cell
[ "Untick", "a", "checkbox", "in", "a", "cell", "of", "a", "table", "indicated", "by", "the", "input", "row", "and", "column", "indices", "." ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/Table.java#L324-L328
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/DynamicRegistrationBean.java
DynamicRegistrationBean.setInitParameters
public void setInitParameters(Map<String, String> initParameters) { """ Set init-parameters for this registration. Calling this method will replace any existing init-parameters. @param initParameters the init parameters @see #getInitParameters @see #addInitParameter """ Assert.notNull(initParameters, "In...
java
public void setInitParameters(Map<String, String> initParameters) { Assert.notNull(initParameters, "InitParameters must not be null"); this.initParameters = new LinkedHashMap<>(initParameters); }
[ "public", "void", "setInitParameters", "(", "Map", "<", "String", ",", "String", ">", "initParameters", ")", "{", "Assert", ".", "notNull", "(", "initParameters", ",", "\"InitParameters must not be null\"", ")", ";", "this", ".", "initParameters", "=", "new", "L...
Set init-parameters for this registration. Calling this method will replace any existing init-parameters. @param initParameters the init parameters @see #getInitParameters @see #addInitParameter
[ "Set", "init", "-", "parameters", "for", "this", "registration", ".", "Calling", "this", "method", "will", "replace", "any", "existing", "init", "-", "parameters", "." ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/DynamicRegistrationBean.java#L84-L87
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/Util.java
Util.resetBitmapRangeAndCardinalityChange
@Deprecated public static int resetBitmapRangeAndCardinalityChange(long[] bitmap, int start, int end) { """ reset bits at start, start+1,..., end-1 and report the cardinality change @param bitmap array of words to be modified @param start first index to be modified (inclusive) @param end last index to be ...
java
@Deprecated public static int resetBitmapRangeAndCardinalityChange(long[] bitmap, int start, int end) { int cardbefore = cardinalityInBitmapWordRange(bitmap, start, end); resetBitmapRange(bitmap, start,end); int cardafter = cardinalityInBitmapWordRange(bitmap, start, end); return cardafter - cardbefor...
[ "@", "Deprecated", "public", "static", "int", "resetBitmapRangeAndCardinalityChange", "(", "long", "[", "]", "bitmap", ",", "int", "start", ",", "int", "end", ")", "{", "int", "cardbefore", "=", "cardinalityInBitmapWordRange", "(", "bitmap", ",", "start", ",", ...
reset bits at start, start+1,..., end-1 and report the cardinality change @param bitmap array of words to be modified @param start first index to be modified (inclusive) @param end last index to be modified (exclusive) @return cardinality change
[ "reset", "bits", "at", "start", "start", "+", "1", "...", "end", "-", "1", "and", "report", "the", "cardinality", "change" ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/Util.java#L563-L569
wildfly/wildfly-core
host-controller/src/main/java/org/jboss/as/host/controller/mgmt/DomainHostExcludeRegistry.java
DomainHostExcludeRegistry.getVersionIgnoreData
VersionExcludeData getVersionIgnoreData(int major, int minor, int micro) { """ Gets the host-ignore data for a slave host running the given version. @param major the kernel management API major version @param minor the kernel management API minor version @param micro the kernel management API micro version ...
java
VersionExcludeData getVersionIgnoreData(int major, int minor, int micro) { VersionExcludeData result = registry.get(new VersionKey(major, minor, micro)); if (result == null) { result = registry.get(new VersionKey(major, minor, null)); } return result; }
[ "VersionExcludeData", "getVersionIgnoreData", "(", "int", "major", ",", "int", "minor", ",", "int", "micro", ")", "{", "VersionExcludeData", "result", "=", "registry", ".", "get", "(", "new", "VersionKey", "(", "major", ",", "minor", ",", "micro", ")", ")", ...
Gets the host-ignore data for a slave host running the given version. @param major the kernel management API major version @param minor the kernel management API minor version @param micro the kernel management API micro version @return the host-ignore data, or {@code null} if there is no matching registration
[ "Gets", "the", "host", "-", "ignore", "data", "for", "a", "slave", "host", "running", "the", "given", "version", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/host/controller/mgmt/DomainHostExcludeRegistry.java#L144-L150
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/webhook/WebhookCluster.java
WebhookCluster.newBuilder
public WebhookClientBuilder newBuilder(long id, String token) { """ Creates a new {@link net.dv8tion.jda.webhook.WebhookClientBuilder WebhookClientBuilder} with the defined default settings of this cluster. @param id The webhook id @param token The webhook token @throws java.lang.IllegalArgumentExcepti...
java
public WebhookClientBuilder newBuilder(long id, String token) { WebhookClientBuilder builder = new WebhookClientBuilder(id, token); builder.setExecutorService(defaultPool) .setHttpClient(defaultHttpClient) .setThreadFactory(threadFactory) .setDaemon(isDae...
[ "public", "WebhookClientBuilder", "newBuilder", "(", "long", "id", ",", "String", "token", ")", "{", "WebhookClientBuilder", "builder", "=", "new", "WebhookClientBuilder", "(", "id", ",", "token", ")", ";", "builder", ".", "setExecutorService", "(", "defaultPool",...
Creates a new {@link net.dv8tion.jda.webhook.WebhookClientBuilder WebhookClientBuilder} with the defined default settings of this cluster. @param id The webhook id @param token The webhook token @throws java.lang.IllegalArgumentException If the token is {@code null}, empty or contains blanks @return The WebhookCli...
[ "Creates", "a", "new", "{", "@link", "net", ".", "dv8tion", ".", "jda", ".", "webhook", ".", "WebhookClientBuilder", "WebhookClientBuilder", "}", "with", "the", "defined", "default", "settings", "of", "this", "cluster", "." ]
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/webhook/WebhookCluster.java#L325-L335
googleads/googleads-java-lib
extensions/adwords_rate_limiter/src/main/java/com/google/api/ads/adwords/extension/ratelimiter/AdWordsSessionUtil.java
AdWordsSessionUtil.getClientCustomerId
public static long getClientCustomerId(AdWordsSession session) { """ Get client customer ID from the adwords session, and convert it to Long type. @param session the AdWords session @return the client customer ID in the AdWords session, or VIRTUAL_CID if absent """ String accountIdStr = session.getClie...
java
public static long getClientCustomerId(AdWordsSession session) { String accountIdStr = session.getClientCustomerId(); // clientCustomerId might be absent from AdWordsSession, e.g., for // ReportDefinitionService.getReportFields() and CustomerService.getCustomers(). // In this case, use ONE virtual acco...
[ "public", "static", "long", "getClientCustomerId", "(", "AdWordsSession", "session", ")", "{", "String", "accountIdStr", "=", "session", ".", "getClientCustomerId", "(", ")", ";", "// clientCustomerId might be absent from AdWordsSession, e.g., for", "// ReportDefinitionService....
Get client customer ID from the adwords session, and convert it to Long type. @param session the AdWords session @return the client customer ID in the AdWords session, or VIRTUAL_CID if absent
[ "Get", "client", "customer", "ID", "from", "the", "adwords", "session", "and", "convert", "it", "to", "Long", "type", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/extensions/adwords_rate_limiter/src/main/java/com/google/api/ads/adwords/extension/ratelimiter/AdWordsSessionUtil.java#L31-L46
lagom/lagom
service/javadsl/api/src/main/java/com/lightbend/lagom/javadsl/api/transport/TransportErrorCode.java
TransportErrorCode.fromHttp
public static TransportErrorCode fromHttp(int code) { """ Get a transport error code from the given HTTP error code. @param code The HTTP error code, must be between 400 and 599 inclusive. @return The transport error code. @throws IllegalArgumentException if the HTTP code was not between 400 and 599. """ ...
java
public static TransportErrorCode fromHttp(int code) { TransportErrorCode builtIn = HTTP_ERROR_CODE_MAP.get(code); if (builtIn == null) { if (code > 599 || code < 100) { throw new IllegalArgumentException("Invalid http status code: " + code); } else if (code < 400)...
[ "public", "static", "TransportErrorCode", "fromHttp", "(", "int", "code", ")", "{", "TransportErrorCode", "builtIn", "=", "HTTP_ERROR_CODE_MAP", ".", "get", "(", "code", ")", ";", "if", "(", "builtIn", "==", "null", ")", "{", "if", "(", "code", ">", "599",...
Get a transport error code from the given HTTP error code. @param code The HTTP error code, must be between 400 and 599 inclusive. @return The transport error code. @throws IllegalArgumentException if the HTTP code was not between 400 and 599.
[ "Get", "a", "transport", "error", "code", "from", "the", "given", "HTTP", "error", "code", "." ]
train
https://github.com/lagom/lagom/blob/3763055a9d1aace793a5d970f4e688aea61b1a5a/service/javadsl/api/src/main/java/com/lightbend/lagom/javadsl/api/transport/TransportErrorCode.java#L142-L155
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/junit/JUnitXMLPerPageListener.java
JUnitXMLPerPageListener.generateResultXml
protected String generateResultXml(String testName, Throwable exception, double executionTime) { """ Creates XML string describing test outcome. @param testName name of test. @param exception exception from test @param executionTime execution time in seconds @return XML description of test result """ ...
java
protected String generateResultXml(String testName, Throwable exception, double executionTime) { int errors = 0; int failures = 0; String failureXml = ""; if (exception != null) { failureXml = "<failure type=\"" + exception.getClass().getName() + "\" mess...
[ "protected", "String", "generateResultXml", "(", "String", "testName", ",", "Throwable", "exception", ",", "double", "executionTime", ")", "{", "int", "errors", "=", "0", ";", "int", "failures", "=", "0", ";", "String", "failureXml", "=", "\"\"", ";", "if", ...
Creates XML string describing test outcome. @param testName name of test. @param exception exception from test @param executionTime execution time in seconds @return XML description of test result
[ "Creates", "XML", "string", "describing", "test", "outcome", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/junit/JUnitXMLPerPageListener.java#L86-L106
haifengl/smile
graph/src/main/java/smile/graph/AdjacencyMatrix.java
AdjacencyMatrix.bfs
private void bfs(int v, int[] cc, int id) { """ Breadth-first search connected components of graph. @param v the start vertex. @param cc the array to store the connected component id of vertices. @param id the current component id. """ cc[v] = id; Queue<Integer> queue = new LinkedList<>(); ...
java
private void bfs(int v, int[] cc, int id) { cc[v] = id; Queue<Integer> queue = new LinkedList<>(); queue.offer(v); while (!queue.isEmpty()) { int t = queue.poll(); for (int i = 0; i < n; i++) { if (graph[t][i] != 0.0 && cc[i] == -1) { ...
[ "private", "void", "bfs", "(", "int", "v", ",", "int", "[", "]", "cc", ",", "int", "id", ")", "{", "cc", "[", "v", "]", "=", "id", ";", "Queue", "<", "Integer", ">", "queue", "=", "new", "LinkedList", "<>", "(", ")", ";", "queue", ".", "offer...
Breadth-first search connected components of graph. @param v the start vertex. @param cc the array to store the connected component id of vertices. @param id the current component id.
[ "Breadth", "-", "first", "search", "connected", "components", "of", "graph", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/graph/src/main/java/smile/graph/AdjacencyMatrix.java#L414-L427
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java
HttpUtil.setKeepAlive
public static void setKeepAlive(HttpHeaders h, HttpVersion httpVersion, boolean keepAlive) { """ Sets the value of the {@code "Connection"} header depending on the protocol version of the specified message. This getMethod sets or removes the {@code "Connection"} header depending on what the default keep alive m...
java
public static void setKeepAlive(HttpHeaders h, HttpVersion httpVersion, boolean keepAlive) { if (httpVersion.isKeepAliveDefault()) { if (keepAlive) { h.remove(HttpHeaderNames.CONNECTION); } else { h.set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE); ...
[ "public", "static", "void", "setKeepAlive", "(", "HttpHeaders", "h", ",", "HttpVersion", "httpVersion", ",", "boolean", "keepAlive", ")", "{", "if", "(", "httpVersion", ".", "isKeepAliveDefault", "(", ")", ")", "{", "if", "(", "keepAlive", ")", "{", "h", "...
Sets the value of the {@code "Connection"} header depending on the protocol version of the specified message. This getMethod sets or removes the {@code "Connection"} header depending on what the default keep alive mode of the message's protocol version is, as specified by {@link HttpVersion#isKeepAliveDefault()}. <ul> ...
[ "Sets", "the", "value", "of", "the", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java#L116-L130
box/box-java-sdk
src/main/java/com/box/sdk/BoxLegalHoldPolicy.java
BoxLegalHoldPolicy.getAll
public static Iterable<BoxLegalHoldPolicy.Info> getAll( final BoxAPIConnection api, String policyName, int limit, String ... fields) { """ Retrieves a list of Legal Hold Policies that belong to your Enterprise as an Iterable. @param api api the API connection to be used by the resource. @param policy...
java
public static Iterable<BoxLegalHoldPolicy.Info> getAll( final BoxAPIConnection api, String policyName, int limit, String ... fields) { QueryStringBuilder builder = new QueryStringBuilder(); if (policyName != null) { builder.appendParam("policy_name", policyName); } ...
[ "public", "static", "Iterable", "<", "BoxLegalHoldPolicy", ".", "Info", ">", "getAll", "(", "final", "BoxAPIConnection", "api", ",", "String", "policyName", ",", "int", "limit", ",", "String", "...", "fields", ")", "{", "QueryStringBuilder", "builder", "=", "n...
Retrieves a list of Legal Hold Policies that belong to your Enterprise as an Iterable. @param api api the API connection to be used by the resource. @param policyName case insensitive prefix-match filter on Policy name. @param limit the limit of retrieved entries per page. @param fields the optional fields to retrieve....
[ "Retrieves", "a", "list", "of", "Legal", "Hold", "Policies", "that", "belong", "to", "your", "Enterprise", "as", "an", "Iterable", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxLegalHoldPolicy.java#L173-L192
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/html/Table.java
Table.addHeading
public Table addHeading(Object o,String attributes) { """ /* Add a new heading Cell in the current row. Adds to the table after this call and before next call to newRow, newCell or newHeader are added to the cell. @return This table for call chaining """ addHeading(o); cell.attribute(attribu...
java
public Table addHeading(Object o,String attributes) { addHeading(o); cell.attribute(attributes); return this; }
[ "public", "Table", "addHeading", "(", "Object", "o", ",", "String", "attributes", ")", "{", "addHeading", "(", "o", ")", ";", "cell", ".", "attribute", "(", "attributes", ")", ";", "return", "this", ";", "}" ]
/* Add a new heading Cell in the current row. Adds to the table after this call and before next call to newRow, newCell or newHeader are added to the cell. @return This table for call chaining
[ "/", "*", "Add", "a", "new", "heading", "Cell", "in", "the", "current", "row", ".", "Adds", "to", "the", "table", "after", "this", "call", "and", "before", "next", "call", "to", "newRow", "newCell", "or", "newHeader", "are", "added", "to", "the", "cell...
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/Table.java#L214-L219
facebook/fresco
animated-base/src/main/java/com/facebook/imagepipeline/animated/factory/AnimatedImageFactoryImpl.java
AnimatedImageFactoryImpl.decodeGif
public CloseableImage decodeGif( final EncodedImage encodedImage, final ImageDecodeOptions options, final Bitmap.Config bitmapConfig) { """ Decodes a GIF into a CloseableImage. @param encodedImage encoded image (native byte array holding the encoded bytes and meta data) @param options the optio...
java
public CloseableImage decodeGif( final EncodedImage encodedImage, final ImageDecodeOptions options, final Bitmap.Config bitmapConfig) { if (sGifAnimatedImageDecoder == null) { throw new UnsupportedOperationException("To encode animated gif please add the dependency " + "to the anim...
[ "public", "CloseableImage", "decodeGif", "(", "final", "EncodedImage", "encodedImage", ",", "final", "ImageDecodeOptions", "options", ",", "final", "Bitmap", ".", "Config", "bitmapConfig", ")", "{", "if", "(", "sGifAnimatedImageDecoder", "==", "null", ")", "{", "t...
Decodes a GIF into a CloseableImage. @param encodedImage encoded image (native byte array holding the encoded bytes and meta data) @param options the options for the decode @param bitmapConfig the Bitmap.Config used to generate the output bitmaps @return a {@link CloseableImage} for the GIF image
[ "Decodes", "a", "GIF", "into", "a", "CloseableImage", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/animated-base/src/main/java/com/facebook/imagepipeline/animated/factory/AnimatedImageFactoryImpl.java#L72-L94
sniffy/sniffy
sniffy-core/src/main/java/io/sniffy/socket/SnifferSocketImplFactory.java
SnifferSocketImplFactory.uninstall
public static void uninstall() throws IOException { """ Restores previously saved {@link SocketImplFactory} and sets it as a default @see #install() @throws IOException if failed to install {@link SnifferSocketImplFactory} @since 3.1 """ try { Field factoryField = Socket.class.getDeclare...
java
public static void uninstall() throws IOException { try { Field factoryField = Socket.class.getDeclaredField("factory"); factoryField.setAccessible(true); factoryField.set(null, previousSocketImplFactory); } catch (IllegalAccessException e) { throw new IOE...
[ "public", "static", "void", "uninstall", "(", ")", "throws", "IOException", "{", "try", "{", "Field", "factoryField", "=", "Socket", ".", "class", ".", "getDeclaredField", "(", "\"factory\"", ")", ";", "factoryField", ".", "setAccessible", "(", "true", ")", ...
Restores previously saved {@link SocketImplFactory} and sets it as a default @see #install() @throws IOException if failed to install {@link SnifferSocketImplFactory} @since 3.1
[ "Restores", "previously", "saved", "{" ]
train
https://github.com/sniffy/sniffy/blob/7bdddb9593e6b6e9fe5c7c87519f864acbc3a5c0/sniffy-core/src/main/java/io/sniffy/socket/SnifferSocketImplFactory.java#L53-L63
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AlignedBox3f.java
AlignedBox3f.setFromCorners
@Override public void setFromCorners(Point3D p1, Point3D p2) { """ Change the frame of the box. @param p1 is the coordinate of the first corner. @param p2 is the coordinate of the second corner. """ setFromCorners( p1.getX(), p1.getY(), p1.getZ(), p2.getX(), p2.getY(), p2.getZ()); }
java
@Override public void setFromCorners(Point3D p1, Point3D p2) { setFromCorners( p1.getX(), p1.getY(), p1.getZ(), p2.getX(), p2.getY(), p2.getZ()); }
[ "@", "Override", "public", "void", "setFromCorners", "(", "Point3D", "p1", ",", "Point3D", "p2", ")", "{", "setFromCorners", "(", "p1", ".", "getX", "(", ")", ",", "p1", ".", "getY", "(", ")", ",", "p1", ".", "getZ", "(", ")", ",", "p2", ".", "ge...
Change the frame of the box. @param p1 is the coordinate of the first corner. @param p2 is the coordinate of the second corner.
[ "Change", "the", "frame", "of", "the", "box", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AlignedBox3f.java#L284-L289
frostwire/frostwire-jlibtorrent
src/main/java/com/frostwire/jlibtorrent/TorrentHandle.java
TorrentHandle.moveStorage
public void moveStorage(String savePath, MoveFlags flags) { """ Moves the file(s) that this torrent are currently seeding from or downloading to. If the given {@code savePath} is not located on the same drive as the original save path, the files will be copied to the new drive and removed from their original lo...
java
public void moveStorage(String savePath, MoveFlags flags) { th.move_storage(savePath, flags.swig()); }
[ "public", "void", "moveStorage", "(", "String", "savePath", ",", "MoveFlags", "flags", ")", "{", "th", ".", "move_storage", "(", "savePath", ",", "flags", ".", "swig", "(", ")", ")", ";", "}" ]
Moves the file(s) that this torrent are currently seeding from or downloading to. If the given {@code savePath} is not located on the same drive as the original save path, the files will be copied to the new drive and removed from their original location. This will block all other disk IO, and other torrents download a...
[ "Moves", "the", "file", "(", "s", ")", "that", "this", "torrent", "are", "currently", "seeding", "from", "or", "downloading", "to", ".", "If", "the", "given", "{", "@code", "savePath", "}", "is", "not", "located", "on", "the", "same", "drive", "as", "t...
train
https://github.com/frostwire/frostwire-jlibtorrent/blob/a29249a940d34aba8c4677d238b472ef01833506/src/main/java/com/frostwire/jlibtorrent/TorrentHandle.java#L1323-L1325
mikepenz/MaterialDrawer
library/src/main/java/com/mikepenz/materialdrawer/holder/ImageHolder.java
ImageHolder.decideIcon
public Drawable decideIcon(Context ctx, int iconColor, boolean tint, int paddingDp) { """ this only handles Drawables @param ctx @param iconColor @param tint @return """ Drawable icon = getIcon(); if (mIIcon != null) { icon = new IconicsDrawable(ctx, mIIcon).color(iconColor)....
java
public Drawable decideIcon(Context ctx, int iconColor, boolean tint, int paddingDp) { Drawable icon = getIcon(); if (mIIcon != null) { icon = new IconicsDrawable(ctx, mIIcon).color(iconColor).sizeDp(24).paddingDp(paddingDp); } else if (getIconRes() != -1) { icon = AppCom...
[ "public", "Drawable", "decideIcon", "(", "Context", "ctx", ",", "int", "iconColor", ",", "boolean", "tint", ",", "int", "paddingDp", ")", "{", "Drawable", "icon", "=", "getIcon", "(", ")", ";", "if", "(", "mIIcon", "!=", "null", ")", "{", "icon", "=", ...
this only handles Drawables @param ctx @param iconColor @param tint @return
[ "this", "only", "handles", "Drawables" ]
train
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/holder/ImageHolder.java#L97-L120
wisdom-framework/wisdom
framework/resource-controller/src/main/java/org/wisdom/resources/CacheUtils.java
CacheUtils.fromFile
public static Result fromFile(File file, Context context, ApplicationConfiguration configuration, Crypto crypto) { """ Computes the result to sent the given file. Cache headers are automatically set by this method. @param file the file to send to the client @param context the context @param con...
java
public static Result fromFile(File file, Context context, ApplicationConfiguration configuration, Crypto crypto) { long lastModified = file.lastModified(); String etag = computeEtag(lastModified, configuration, crypto); if (isNotModified(context, lastModified, etag)) { return new Res...
[ "public", "static", "Result", "fromFile", "(", "File", "file", ",", "Context", "context", ",", "ApplicationConfiguration", "configuration", ",", "Crypto", "crypto", ")", "{", "long", "lastModified", "=", "file", ".", "lastModified", "(", ")", ";", "String", "e...
Computes the result to sent the given file. Cache headers are automatically set by this method. @param file the file to send to the client @param context the context @param configuration the application configuration @param crypto the crypto service @return the result, it can be a NOT_MODIFIED if...
[ "Computes", "the", "result", "to", "sent", "the", "given", "file", ".", "Cache", "headers", "are", "automatically", "set", "by", "this", "method", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/framework/resource-controller/src/main/java/org/wisdom/resources/CacheUtils.java#L156-L167
overturetool/overture
ide/debug/src/main/java/org/overture/ide/debug/utils/CharOperation.java
CharOperation.lastIndexOf
public static final int lastIndexOf(char toBeFound, char[] array) { """ Answers the last index in the array for which the corresponding character is equal to toBeFound starting from the end of the array. Answers -1 if no occurrence of this character is found. <br> <br> For example: <ol> <li> <pre> toBeFou...
java
public static final int lastIndexOf(char toBeFound, char[] array) { for (int i = array.length; --i >= 0;) { if (toBeFound == array[i]) { return i; } } return -1; }
[ "public", "static", "final", "int", "lastIndexOf", "(", "char", "toBeFound", ",", "char", "[", "]", "array", ")", "{", "for", "(", "int", "i", "=", "array", ".", "length", ";", "--", "i", ">=", "0", ";", ")", "{", "if", "(", "toBeFound", "==", "a...
Answers the last index in the array for which the corresponding character is equal to toBeFound starting from the end of the array. Answers -1 if no occurrence of this character is found. <br> <br> For example: <ol> <li> <pre> toBeFound = 'c' array = { ' a', 'b', 'c', 'd' , 'c', 'e' } result =&gt; 4 </pre> </li> <li>...
[ "Answers", "the", "last", "index", "in", "the", "array", "for", "which", "the", "corresponding", "character", "is", "equal", "to", "toBeFound", "starting", "from", "the", "end", "of", "the", "array", ".", "Answers", "-", "1", "if", "no", "occurrence", "of"...
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/debug/src/main/java/org/overture/ide/debug/utils/CharOperation.java#L2419-L2429
mongodb/stitch-android-sdk
core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/UpdateDescription.java
UpdateDescription.toUpdateDocument
public BsonDocument toUpdateDocument() { """ Convert this update description to an update document. @return an update document with the appropriate $set and $unset documents. """ final List<BsonElement> unsets = new ArrayList<>(); for (final String removedField : this.removedFields) { unsets.a...
java
public BsonDocument toUpdateDocument() { final List<BsonElement> unsets = new ArrayList<>(); for (final String removedField : this.removedFields) { unsets.add(new BsonElement(removedField, new BsonBoolean(true))); } final BsonDocument updateDocument = new BsonDocument(); if (this.updatedField...
[ "public", "BsonDocument", "toUpdateDocument", "(", ")", "{", "final", "List", "<", "BsonElement", ">", "unsets", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "final", "String", "removedField", ":", "this", ".", "removedFields", ")", "{", "unse...
Convert this update description to an update document. @return an update document with the appropriate $set and $unset documents.
[ "Convert", "this", "update", "description", "to", "an", "update", "document", "." ]
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/UpdateDescription.java#L84-L100
bignerdranch/expandable-recycler-view
expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java
ExpandableRecyclerAdapter.notifyChildRangeChanged
@UiThread public void notifyChildRangeChanged(int parentPosition, int childPositionStart, int itemCount) { """ Notify any registered observers that the parent at {@code parentPosition} has {@code itemCount} children starting at {@code childPositionStart} that have changed. <p> This is an item change event, ...
java
@UiThread public void notifyChildRangeChanged(int parentPosition, int childPositionStart, int itemCount) { P parent = mParentList.get(parentPosition); int flatParentPosition = getFlatParentPosition(parentPosition); ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition)...
[ "@", "UiThread", "public", "void", "notifyChildRangeChanged", "(", "int", "parentPosition", ",", "int", "childPositionStart", ",", "int", "itemCount", ")", "{", "P", "parent", "=", "mParentList", ".", "get", "(", "parentPosition", ")", ";", "int", "flatParentPos...
Notify any registered observers that the parent at {@code parentPosition} has {@code itemCount} children starting at {@code childPositionStart} that have changed. <p> This is an item change event, not a structural change event. It indicates that any The parent at {@code childPositionStart} retains the same identity. re...
[ "Notify", "any", "registered", "observers", "that", "the", "parent", "at", "{", "@code", "parentPosition", "}", "has", "{", "@code", "itemCount", "}", "children", "starting", "at", "{", "@code", "childPositionStart", "}", "that", "have", "changed", ".", "<p", ...
train
https://github.com/bignerdranch/expandable-recycler-view/blob/930912510620894c531d236856fa79d646e2f1ed/expandablerecyclerview/src/main/java/com/bignerdranch/expandablerecyclerview/ExpandableRecyclerAdapter.java#L1268-L1283
dbracewell/hermes
hermes-wordnet/src/main/java/com/davidbracewell/hermes/wordnet/WordNet.java
WordNet.getSenses
public List<Sense> getSenses(String surfaceForm) { """ Gets senses. @param surfaceForm the surface form @return the senses """ return getSenses(surfaceForm, POS.ANY, Hermes.defaultLanguage()); }
java
public List<Sense> getSenses(String surfaceForm) { return getSenses(surfaceForm, POS.ANY, Hermes.defaultLanguage()); }
[ "public", "List", "<", "Sense", ">", "getSenses", "(", "String", "surfaceForm", ")", "{", "return", "getSenses", "(", "surfaceForm", ",", "POS", ".", "ANY", ",", "Hermes", ".", "defaultLanguage", "(", ")", ")", ";", "}" ]
Gets senses. @param surfaceForm the surface form @return the senses
[ "Gets", "senses", "." ]
train
https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-wordnet/src/main/java/com/davidbracewell/hermes/wordnet/WordNet.java#L481-L483
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/Scheduler.java
Scheduler.scheduleRecurring
public void scheduleRecurring(Runnable runnable, Date firstTime, long period) { """ Schedule runnable to run a given interval @param runnable the runnable to @param firstTime @param period """ timer.scheduleAtFixedRate(toTimerTask(runnable), firstTime, period); }
java
public void scheduleRecurring(Runnable runnable, Date firstTime, long period) { timer.scheduleAtFixedRate(toTimerTask(runnable), firstTime, period); }
[ "public", "void", "scheduleRecurring", "(", "Runnable", "runnable", ",", "Date", "firstTime", ",", "long", "period", ")", "{", "timer", ".", "scheduleAtFixedRate", "(", "toTimerTask", "(", "runnable", ")", ",", "firstTime", ",", "period", ")", ";", "}" ]
Schedule runnable to run a given interval @param runnable the runnable to @param firstTime @param period
[ "Schedule", "runnable", "to", "run", "a", "given", "interval" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/Scheduler.java#L188-L192
googleapis/google-cloud-java
google-cloud-clients/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java
ClusterManagerClient.getOperation
public final Operation getOperation(String projectId, String zone, String operationId) { """ Gets the specified operation. <p>Sample code: <pre><code> try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = ""; String zone = ""; String operationId = ""; Opera...
java
public final Operation getOperation(String projectId, String zone, String operationId) { GetOperationRequest request = GetOperationRequest.newBuilder() .setProjectId(projectId) .setZone(zone) .setOperationId(operationId) .build(); return getOperation(requ...
[ "public", "final", "Operation", "getOperation", "(", "String", "projectId", ",", "String", "zone", ",", "String", "operationId", ")", "{", "GetOperationRequest", "request", "=", "GetOperationRequest", ".", "newBuilder", "(", ")", ".", "setProjectId", "(", "project...
Gets the specified operation. <p>Sample code: <pre><code> try (ClusterManagerClient clusterManagerClient = ClusterManagerClient.create()) { String projectId = ""; String zone = ""; String operationId = ""; Operation response = clusterManagerClient.getOperation(projectId, zone, operationId); } </code></pre> @param pr...
[ "Gets", "the", "specified", "operation", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-container/src/main/java/com/google/cloud/container/v1/ClusterManagerClient.java#L1478-L1487
micronaut-projects/micronaut-core
discovery-client/src/main/java/io/micronaut/discovery/client/DiscoveryClientConfiguration.java
DiscoveryClientConfiguration.setZones
public void setZones(Map<String, List<URL>> zones) { """ Configures Discovery servers in other zones. @param zones The zones """ if (zones != null) { this.otherZones = zones.entrySet() .stream() .flatMap((Function<Map.Entry<String, List<URL>>, Stream<Servi...
java
public void setZones(Map<String, List<URL>> zones) { if (zones != null) { this.otherZones = zones.entrySet() .stream() .flatMap((Function<Map.Entry<String, List<URL>>, Stream<ServiceInstance>>) entry -> entry.getValue() .str...
[ "public", "void", "setZones", "(", "Map", "<", "String", ",", "List", "<", "URL", ">", ">", "zones", ")", "{", "if", "(", "zones", "!=", "null", ")", "{", "this", ".", "otherZones", "=", "zones", ".", "entrySet", "(", ")", ".", "stream", "(", ")"...
Configures Discovery servers in other zones. @param zones The zones
[ "Configures", "Discovery", "servers", "in", "other", "zones", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/discovery-client/src/main/java/io/micronaut/discovery/client/DiscoveryClientConfiguration.java#L155-L170
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/listener/logging/DefaultJsonQueryLogEntryCreator.java
DefaultJsonQueryLogEntryCreator.writeQuerySizeEntry
protected void writeQuerySizeEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { """ Write query size as json. <p>default: "querySize":1, @param sb StringBuilder to write @param execInfo execution info @param queryInfoList query info list """ sb.appe...
java
protected void writeQuerySizeEntry(StringBuilder sb, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { sb.append("\"querySize\":"); sb.append(queryInfoList.size()); sb.append(", "); }
[ "protected", "void", "writeQuerySizeEntry", "(", "StringBuilder", "sb", ",", "ExecutionInfo", "execInfo", ",", "List", "<", "QueryInfo", ">", "queryInfoList", ")", "{", "sb", ".", "append", "(", "\"\\\"querySize\\\":\"", ")", ";", "sb", ".", "append", "(", "qu...
Write query size as json. <p>default: "querySize":1, @param sb StringBuilder to write @param execInfo execution info @param queryInfoList query info list
[ "Write", "query", "size", "as", "json", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/listener/logging/DefaultJsonQueryLogEntryCreator.java#L167-L171
sdl/Testy
src/main/java/com/sdl/selenium/extjs6/form/DateField.java
DateField.setDate
private boolean setDate(String day, String month, String year) { """ example new DataField().setDate("19", "05", "2013") @param day String 'dd' @param month String 'MMM' @param year String 'yyyy' @return true if is selected date, false when DataField doesn't exist """ String fullDate = RetryUt...
java
private boolean setDate(String day, String month, String year) { String fullDate = RetryUtils.retry(4, () -> monthYearButton.getText()).trim(); if (!fullDate.contains(month) || !fullDate.contains(year)) { monthYearButton.click(); if (!yearAndMonth.ready()) { month...
[ "private", "boolean", "setDate", "(", "String", "day", ",", "String", "month", ",", "String", "year", ")", "{", "String", "fullDate", "=", "RetryUtils", ".", "retry", "(", "4", ",", "(", ")", "->", "monthYearButton", ".", "getText", "(", ")", ")", ".",...
example new DataField().setDate("19", "05", "2013") @param day String 'dd' @param month String 'MMM' @param year String 'yyyy' @return true if is selected date, false when DataField doesn't exist
[ "example", "new", "DataField", "()", ".", "setDate", "(", "19", "05", "2013", ")" ]
train
https://github.com/sdl/Testy/blob/b3ae061554016f926f04694a39ff00dab7576609/src/main/java/com/sdl/selenium/extjs6/form/DateField.java#L63-L78
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/MPXWriter.java
MPXWriter.writeCalendarHours
private void writeCalendarHours(ProjectCalendar parentCalendar, ProjectCalendarHours record) throws IOException { """ Write calendar hours. @param parentCalendar parent calendar instance @param record calendar hours instance @throws IOException """ m_buffer.setLength(0); int recordNumber; ...
java
private void writeCalendarHours(ProjectCalendar parentCalendar, ProjectCalendarHours record) throws IOException { m_buffer.setLength(0); int recordNumber; if (!parentCalendar.isDerived()) { recordNumber = MPXConstants.BASE_CALENDAR_HOURS_RECORD_NUMBER; } else { ...
[ "private", "void", "writeCalendarHours", "(", "ProjectCalendar", "parentCalendar", ",", "ProjectCalendarHours", "record", ")", "throws", "IOException", "{", "m_buffer", ".", "setLength", "(", "0", ")", ";", "int", "recordNumber", ";", "if", "(", "!", "parentCalend...
Write calendar hours. @param parentCalendar parent calendar instance @param record calendar hours instance @throws IOException
[ "Write", "calendar", "hours", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/MPXWriter.java#L394-L446
biojava/biojava
biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/aligpanel/AFPChainCoordManager.java
AFPChainCoordManager.getLegendPosition
public Point getLegendPosition(int lineNr, int chainNr) { """ provide the coordinates for where to draw the legend for line X and if it is chain 1 or 2 @param lineNr which line is this for @param chainNr is it chain 0 or 1 @return get the point where to draw the legend """ int x = DEFAULT_X_SPACE ; i...
java
public Point getLegendPosition(int lineNr, int chainNr) { int x = DEFAULT_X_SPACE ; int y = lineNr * DEFAULT_Y_STEP + DEFAULT_Y_SPACE; y += chainNr * DEFAULT_LINE_SEPARATION; Point p = new Point(x,y); return p; }
[ "public", "Point", "getLegendPosition", "(", "int", "lineNr", ",", "int", "chainNr", ")", "{", "int", "x", "=", "DEFAULT_X_SPACE", ";", "int", "y", "=", "lineNr", "*", "DEFAULT_Y_STEP", "+", "DEFAULT_Y_SPACE", ";", "y", "+=", "chainNr", "*", "DEFAULT_LINE_SE...
provide the coordinates for where to draw the legend for line X and if it is chain 1 or 2 @param lineNr which line is this for @param chainNr is it chain 0 or 1 @return get the point where to draw the legend
[ "provide", "the", "coordinates", "for", "where", "to", "draw", "the", "legend", "for", "line", "X", "and", "if", "it", "is", "chain", "1", "or", "2" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/aligpanel/AFPChainCoordManager.java#L192-L201
craftercms/commons
utilities/src/main/java/org/craftercms/commons/crypto/PGPUtils.java
PGPUtils.decryptData
protected static void decryptData(final PGPPrivateKey privateKey, final PGPPublicKeyEncryptedData data, final BcKeyFingerprintCalculator calculator, final OutputStream targetStream) throws PGPException, IOException { """ Performs the decryption of the given data. @par...
java
protected static void decryptData(final PGPPrivateKey privateKey, final PGPPublicKeyEncryptedData data, final BcKeyFingerprintCalculator calculator, final OutputStream targetStream) throws PGPException, IOException { PublicKeyDataDecryptorFactory decryptorFactory = ...
[ "protected", "static", "void", "decryptData", "(", "final", "PGPPrivateKey", "privateKey", ",", "final", "PGPPublicKeyEncryptedData", "data", ",", "final", "BcKeyFingerprintCalculator", "calculator", ",", "final", "OutputStream", "targetStream", ")", "throws", "PGPExcepti...
Performs the decryption of the given data. @param privateKey PGP Private Key to decrypt @param data encrypted data @param calculator instance of {@link BcKeyFingerprintCalculator} @param targetStream stream to receive the decrypted data @throws PGPException if the decryption process fails @throws IOException if the str...
[ "Performs", "the", "decryption", "of", "the", "given", "data", "." ]
train
https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/crypto/PGPUtils.java#L250-L282
banq/jdonframework
src/main/java/com/jdon/container/access/UserTargetMetaDefFactory.java
UserTargetMetaDefFactory.createTargetMetaRequest
public void createTargetMetaRequest(TargetMetaDef targetMetaDef, ContextHolder holder) { """ create a targetMetaRequest instance. @param containerWrapper @param targetMetaDef @param request @return """ ContainerWrapper containerWrapper = servletContainerFinder.findContainer(holder.getAppContextHolder(...
java
public void createTargetMetaRequest(TargetMetaDef targetMetaDef, ContextHolder holder) { ContainerWrapper containerWrapper = servletContainerFinder.findContainer(holder.getAppContextHolder()); // get HttpSessionVisitorFactoryImp VisitorFactory visitorFactory = (VisitorFactory) containerWrapper.lookup(Component...
[ "public", "void", "createTargetMetaRequest", "(", "TargetMetaDef", "targetMetaDef", ",", "ContextHolder", "holder", ")", "{", "ContainerWrapper", "containerWrapper", "=", "servletContainerFinder", ".", "findContainer", "(", "holder", ".", "getAppContextHolder", "(", ")", ...
create a targetMetaRequest instance. @param containerWrapper @param targetMetaDef @param request @return
[ "create", "a", "targetMetaRequest", "instance", "." ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/access/UserTargetMetaDefFactory.java#L60-L68
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/layout/LayoutService.java
LayoutService.saveLayout
@Override public void saveLayout(LayoutIdentifier layout, String content) { """ Saves a layout with the specified name and content. @param layout The layout identifier. @param content The layout content. """ propertyService.saveValue(getPropertyName(layout.shared), layout.name, layout.shared, c...
java
@Override public void saveLayout(LayoutIdentifier layout, String content) { propertyService.saveValue(getPropertyName(layout.shared), layout.name, layout.shared, content); }
[ "@", "Override", "public", "void", "saveLayout", "(", "LayoutIdentifier", "layout", ",", "String", "content", ")", "{", "propertyService", ".", "saveValue", "(", "getPropertyName", "(", "layout", ".", "shared", ")", ",", "layout", ".", "name", ",", "layout", ...
Saves a layout with the specified name and content. @param layout The layout identifier. @param content The layout content.
[ "Saves", "a", "layout", "with", "the", "specified", "name", "and", "content", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/layout/LayoutService.java#L79-L82
Chorus-bdd/Chorus
interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/properties/PropertyOperations.java
PropertyOperations.splitKeyAndGroup
public GroupedPropertyLoader splitKeyAndGroup(final String keyDelimiter) { """ Split the key into 2 and use the first token to group <pre> For keys in the form: Properties() group.key1=value1 group.key2=value2 group2.key2=value2 group2.key3=value3 create a GroupedPropertyLoader to load one Properties m...
java
public GroupedPropertyLoader splitKeyAndGroup(final String keyDelimiter) { return group(new BiFunction<String, String, Tuple3<String, String, String>>() { public Tuple3<String, String, String> apply(String key, String value) { String[] keyTokens = key.split(keyDelimiter, 2); ...
[ "public", "GroupedPropertyLoader", "splitKeyAndGroup", "(", "final", "String", "keyDelimiter", ")", "{", "return", "group", "(", "new", "BiFunction", "<", "String", ",", "String", ",", "Tuple3", "<", "String", ",", "String", ",", "String", ">", ">", "(", ")"...
Split the key into 2 and use the first token to group <pre> For keys in the form: Properties() group.key1=value1 group.key2=value2 group2.key2=value2 group2.key3=value3 create a GroupedPropertyLoader to load one Properties map for each of the groups, stripping the group name from property keys e.g. group1 = Properti...
[ "Split", "the", "key", "into", "2", "and", "use", "the", "first", "token", "to", "group" ]
train
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-util/src/main/java/org/chorusbdd/chorus/util/properties/PropertyOperations.java#L165-L175
datoin/http-requests
src/main/java/org/datoin/net/http/Request.java
Request.setContent
public Request setContent(InputStream stream, ContentType contentType) { """ set request content from input stream with given content type @param stream : teh input stream to be used as http content @param contentType : type of content set in header @return modified Request object with http content entity ...
java
public Request setContent(InputStream stream, ContentType contentType) { entity = new InputStreamEntity(stream, contentType); return this; }
[ "public", "Request", "setContent", "(", "InputStream", "stream", ",", "ContentType", "contentType", ")", "{", "entity", "=", "new", "InputStreamEntity", "(", "stream", ",", "contentType", ")", ";", "return", "this", ";", "}" ]
set request content from input stream with given content type @param stream : teh input stream to be used as http content @param contentType : type of content set in header @return modified Request object with http content entity set
[ "set", "request", "content", "from", "input", "stream", "with", "given", "content", "type" ]
train
https://github.com/datoin/http-requests/blob/660a4bc516c594f321019df94451fead4dea19b6/src/main/java/org/datoin/net/http/Request.java#L411-L414
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/CollectionExtensions.java
CollectionExtensions.removeAll
@SafeVarargs public static <T> boolean removeAll(Collection<? super T> collection, T... elements) { """ Removes all of the specified elements from the specified collection. @param collection the collection from which the {@code elements} are to be removed. May not be <code>null</code>. @param elements the e...
java
@SafeVarargs public static <T> boolean removeAll(Collection<? super T> collection, T... elements) { return collection.removeAll(Arrays.asList(elements)); }
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "boolean", "removeAll", "(", "Collection", "<", "?", "super", "T", ">", "collection", ",", "T", "...", "elements", ")", "{", "return", "collection", ".", "removeAll", "(", "Arrays", ".", "asList", "(...
Removes all of the specified elements from the specified collection. @param collection the collection from which the {@code elements} are to be removed. May not be <code>null</code>. @param elements the elements be remove from the {@code collection}. May not be <code>null</code> but may contain <code>null</code> entri...
[ "Removes", "all", "of", "the", "specified", "elements", "from", "the", "specified", "collection", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/CollectionExtensions.java#L284-L287
Azure/azure-sdk-for-java
containerinstance/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2018_02_01_preview/implementation/ContainerGroupsInner.java
ContainerGroupsInner.updateAsync
public Observable<ContainerGroupInner> updateAsync(String resourceGroupName, String containerGroupName, Resource resource) { """ Update container groups. Updates container group tags with specified values. @param resourceGroupName The name of the resource group. @param containerGroupName The name of the conta...
java
public Observable<ContainerGroupInner> updateAsync(String resourceGroupName, String containerGroupName, Resource resource) { return updateWithServiceResponseAsync(resourceGroupName, containerGroupName, resource).map(new Func1<ServiceResponse<ContainerGroupInner>, ContainerGroupInner>() { @Override ...
[ "public", "Observable", "<", "ContainerGroupInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "containerGroupName", ",", "Resource", "resource", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "containerGro...
Update container groups. Updates container group tags with specified values. @param resourceGroupName The name of the resource group. @param containerGroupName The name of the container group. @param resource The container group resource with just the tags to be updated. @throws IllegalArgumentException thrown if para...
[ "Update", "container", "groups", ".", "Updates", "container", "group", "tags", "with", "specified", "values", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerinstance/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2018_02_01_preview/implementation/ContainerGroupsInner.java#L650-L657
SonarOpenCommunity/sonar-cxx
cxx-sensors/src/main/java/org/sonar/cxx/sensors/utils/CxxIssuesReportSensor.java
CxxIssuesReportSensor.saveUniqueViolation
public void saveUniqueViolation(SensorContext sensorContext, CxxReportIssue issue) { """ Saves code violation only if it wasn't already saved @param sensorContext @param issue """ if (uniqueIssues.add(issue)) { saveViolation(sensorContext, issue); } }
java
public void saveUniqueViolation(SensorContext sensorContext, CxxReportIssue issue) { if (uniqueIssues.add(issue)) { saveViolation(sensorContext, issue); } }
[ "public", "void", "saveUniqueViolation", "(", "SensorContext", "sensorContext", ",", "CxxReportIssue", "issue", ")", "{", "if", "(", "uniqueIssues", ".", "add", "(", "issue", ")", ")", "{", "saveViolation", "(", "sensorContext", ",", "issue", ")", ";", "}", ...
Saves code violation only if it wasn't already saved @param sensorContext @param issue
[ "Saves", "code", "violation", "only", "if", "it", "wasn", "t", "already", "saved" ]
train
https://github.com/SonarOpenCommunity/sonar-cxx/blob/7e7a3a44d6d86382a0434652a798f8235503c9b8/cxx-sensors/src/main/java/org/sonar/cxx/sensors/utils/CxxIssuesReportSensor.java#L130-L134
adyliu/jafka
src/main/java/io/jafka/log/LogManager.java
LogManager.deleteSegments
private int deleteSegments(Log log, List<LogSegment> segments) { """ Attemps to delete all provided segments from a log and returns how many it was able to """ int total = 0; for (LogSegment segment : segments) { boolean deleted = false; try { try { ...
java
private int deleteSegments(Log log, List<LogSegment> segments) { int total = 0; for (LogSegment segment : segments) { boolean deleted = false; try { try { segment.getMessageSet().close(); } catch (IOException e) { ...
[ "private", "int", "deleteSegments", "(", "Log", "log", ",", "List", "<", "LogSegment", ">", "segments", ")", "{", "int", "total", "=", "0", ";", "for", "(", "LogSegment", "segment", ":", "segments", ")", "{", "boolean", "deleted", "=", "false", ";", "t...
Attemps to delete all provided segments from a log and returns how many it was able to
[ "Attemps", "to", "delete", "all", "provided", "segments", "from", "a", "log", "and", "returns", "how", "many", "it", "was", "able", "to" ]
train
https://github.com/adyliu/jafka/blob/cc14d2ed60c039b12d7b106bb5269ef21d0add7e/src/main/java/io/jafka/log/LogManager.java#L310-L331
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceGetter.java
V1InstanceGetter.secondaryWorkitems
public Collection<SecondaryWorkitem> secondaryWorkitems( SecondaryWorkitemFilter filter) { """ Get secondary workitems (tasks and tests) filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items returned. @return Collection of items...
java
public Collection<SecondaryWorkitem> secondaryWorkitems( SecondaryWorkitemFilter filter) { return get(SecondaryWorkitem.class, (filter != null) ? filter : new SecondaryWorkitemFilter()); }
[ "public", "Collection", "<", "SecondaryWorkitem", ">", "secondaryWorkitems", "(", "SecondaryWorkitemFilter", "filter", ")", "{", "return", "get", "(", "SecondaryWorkitem", ".", "class", ",", "(", "filter", "!=", "null", ")", "?", "filter", ":", "new", "Secondary...
Get secondary workitems (tasks and tests) filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items returned. @return Collection of items as specified in the filter.
[ "Get", "secondary", "workitems", "(", "tasks", "and", "tests", ")", "filtered", "by", "the", "criteria", "specified", "in", "the", "passed", "in", "filter", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceGetter.java#L169-L172
micronaut-projects/micronaut-core
runtime/src/main/java/io/micronaut/runtime/Micronaut.java
Micronaut.handleStartupException
protected void handleStartupException(Environment environment, Throwable exception) { """ Default handling of startup exceptions. @param environment The environment @param exception The exception @throws ApplicationStartupException If the server cannot be shutdown with an appropriate exist code """ ...
java
protected void handleStartupException(Environment environment, Throwable exception) { Function<Throwable, Integer> exitCodeMapper = exitHandlers.computeIfAbsent(exception.getClass(), exceptionType -> (throwable -> 1)); Integer code = exitCodeMapper.apply(exception); if (code > 0) { i...
[ "protected", "void", "handleStartupException", "(", "Environment", "environment", ",", "Throwable", "exception", ")", "{", "Function", "<", "Throwable", ",", "Integer", ">", "exitCodeMapper", "=", "exitHandlers", ".", "computeIfAbsent", "(", "exception", ".", "getCl...
Default handling of startup exceptions. @param environment The environment @param exception The exception @throws ApplicationStartupException If the server cannot be shutdown with an appropriate exist code
[ "Default", "handling", "of", "startup", "exceptions", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/runtime/src/main/java/io/micronaut/runtime/Micronaut.java#L298-L310
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/projection/GaussianAffinityMatrixBuilder.java
GaussianAffinityMatrixBuilder.computeH
protected static double computeH(final int i, double[] dist_i, double[] pij_i, double mbeta) { """ Compute H (observed perplexity) for row i, and the row pij_i. @param i Current point i (entry i will be ignored) @param dist_i Distance matrix row (input) @param pij_i Row pij[i] (output) @param mbeta {@code -1...
java
protected static double computeH(final int i, double[] dist_i, double[] pij_i, double mbeta) { double sumP = 0.; // Skip point "i", break loop in two: for(int j = 0; j < i; j++) { sumP += (pij_i[j] = FastMath.exp(dist_i[j] * mbeta)); } for(int j = i + 1; j < dist_i.length; j++) { sumP +=...
[ "protected", "static", "double", "computeH", "(", "final", "int", "i", ",", "double", "[", "]", "dist_i", ",", "double", "[", "]", "pij_i", ",", "double", "mbeta", ")", "{", "double", "sumP", "=", "0.", ";", "// Skip point \"i\", break loop in two:", "for", ...
Compute H (observed perplexity) for row i, and the row pij_i. @param i Current point i (entry i will be ignored) @param dist_i Distance matrix row (input) @param pij_i Row pij[i] (output) @param mbeta {@code -1. / (2 * sigma * sigma)} @return Observed perplexity
[ "Compute", "H", "(", "observed", "perplexity", ")", "for", "row", "i", "and", "the", "row", "pij_i", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/projection/GaussianAffinityMatrixBuilder.java#L197-L217
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2015_10_01/src/main/java/com/microsoft/azure/management/mediaservices/v2015_10_01/implementation/MediaServicesInner.java
MediaServicesInner.createAsync
public Observable<MediaServiceInner> createAsync(String resourceGroupName, String mediaServiceName, MediaServiceInner parameters) { """ Creates a Media Service. @param resourceGroupName Name of the resource group within the Azure subscription. @param mediaServiceName Name of the Media Service. @param paramete...
java
public Observable<MediaServiceInner> createAsync(String resourceGroupName, String mediaServiceName, MediaServiceInner parameters) { return createWithServiceResponseAsync(resourceGroupName, mediaServiceName, parameters).map(new Func1<ServiceResponse<MediaServiceInner>, MediaServiceInner>() { @Overrid...
[ "public", "Observable", "<", "MediaServiceInner", ">", "createAsync", "(", "String", "resourceGroupName", ",", "String", "mediaServiceName", ",", "MediaServiceInner", "parameters", ")", "{", "return", "createWithServiceResponseAsync", "(", "resourceGroupName", ",", "media...
Creates a Media Service. @param resourceGroupName Name of the resource group within the Azure subscription. @param mediaServiceName Name of the Media Service. @param parameters Media Service properties needed for creation. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable...
[ "Creates", "a", "Media", "Service", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2015_10_01/src/main/java/com/microsoft/azure/management/mediaservices/v2015_10_01/implementation/MediaServicesInner.java#L400-L407
salesforce/Argus
ArgusSDK/src/main/java/com/salesforce/dva/argus/sdk/ArgusService.java
ArgusService.getInstance
public static ArgusService getInstance(String endpoint, int maxConn, int connTimeout, int connRequestTimeout) throws IOException { """ Returns a new instance of the Argus service. @param endpoint The HTTP endpoint for Argus. @param maxConn The number of maximum connections. Must be g...
java
public static ArgusService getInstance(String endpoint, int maxConn, int connTimeout, int connRequestTimeout) throws IOException { ArgusHttpClient client = new ArgusHttpClient(endpoint, maxConn, connTimeout, connRequestTimeout); return new ArgusService(client); }
[ "public", "static", "ArgusService", "getInstance", "(", "String", "endpoint", ",", "int", "maxConn", ",", "int", "connTimeout", ",", "int", "connRequestTimeout", ")", "throws", "IOException", "{", "ArgusHttpClient", "client", "=", "new", "ArgusHttpClient", "(", "e...
Returns a new instance of the Argus service. @param endpoint The HTTP endpoint for Argus. @param maxConn The number of maximum connections. Must be greater than 0. @param connTimeout The connection timeout in milliseconds. Must be greater than 0. @param connRequestTimeout The co...
[ "Returns", "a", "new", "instance", "of", "the", "Argus", "service", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusSDK/src/main/java/com/salesforce/dva/argus/sdk/ArgusService.java#L103-L107