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
carewebframework/carewebframework-vista
org.carewebframework.vista.security-parent/org.carewebframework.vista.security.base/src/main/java/org/carewebframework/vista/security/base/BaseSecurityService.java
BaseSecurityService.changePassword
@Override public String changePassword(final String oldPassword, final String newPassword) { """ Changes the user's password. @param oldPassword Current password. @param newPassword New password. @return Null or empty if succeeded. Otherwise, displayable reason why change failed. """ return Se...
java
@Override public String changePassword(final String oldPassword, final String newPassword) { return Security.changePassword(brokerSession, oldPassword, newPassword); }
[ "@", "Override", "public", "String", "changePassword", "(", "final", "String", "oldPassword", ",", "final", "String", "newPassword", ")", "{", "return", "Security", ".", "changePassword", "(", "brokerSession", ",", "oldPassword", ",", "newPassword", ")", ";", "}...
Changes the user's password. @param oldPassword Current password. @param newPassword New password. @return Null or empty if succeeded. Otherwise, displayable reason why change failed.
[ "Changes", "the", "user", "s", "password", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.security-parent/org.carewebframework.vista.security.base/src/main/java/org/carewebframework/vista/security/base/BaseSecurityService.java#L59-L62
FXMisc/Flowless
src/main/java/org/fxmisc/flowless/VirtualFlow.java
VirtualFlow.createHorizontal
public static <T, C extends Cell<T, ?>> VirtualFlow<T, C> createHorizontal( ObservableList<T> items, Function<? super T, ? extends C> cellFactory) { """ Creates a viewport that lays out content horizontally from left to right """ return createHorizontal(items, cellFactory, Gravi...
java
public static <T, C extends Cell<T, ?>> VirtualFlow<T, C> createHorizontal( ObservableList<T> items, Function<? super T, ? extends C> cellFactory) { return createHorizontal(items, cellFactory, Gravity.FRONT); }
[ "public", "static", "<", "T", ",", "C", "extends", "Cell", "<", "T", ",", "?", ">", ">", "VirtualFlow", "<", "T", ",", "C", ">", "createHorizontal", "(", "ObservableList", "<", "T", ">", "items", ",", "Function", "<", "?", "super", "T", ",", "?", ...
Creates a viewport that lays out content horizontally from left to right
[ "Creates", "a", "viewport", "that", "lays", "out", "content", "horizontally", "from", "left", "to", "right" ]
train
https://github.com/FXMisc/Flowless/blob/dce2269ebafed8f79203d00085af41f06f3083bc/src/main/java/org/fxmisc/flowless/VirtualFlow.java#L84-L88
sebastiangraf/jSCSI
bundles/target/src/main/java/org/jscsi/target/settings/TextParameter.java
TextParameter.toKeyValuePair
public static String toKeyValuePair (final String key, final String value) { """ Joins a <i>key</i> and a <i>value</i> {@link String} to a <i>key=value</i> pair as required by iSCSI text parameter negotiation and returns the result. @param key the <i>key</i> part @param value the <i>value</i> part @return th...
java
public static String toKeyValuePair (final String key, final String value) { return key + TextKeyword.EQUALS + value; }
[ "public", "static", "String", "toKeyValuePair", "(", "final", "String", "key", ",", "final", "String", "value", ")", "{", "return", "key", "+", "TextKeyword", ".", "EQUALS", "+", "value", ";", "}" ]
Joins a <i>key</i> and a <i>value</i> {@link String} to a <i>key=value</i> pair as required by iSCSI text parameter negotiation and returns the result. @param key the <i>key</i> part @param value the <i>value</i> part @return the concatenated <i>key=value</i> pair
[ "Joins", "a", "<i", ">", "key<", "/", "i", ">", "and", "a", "<i", ">", "value<", "/", "i", ">", "{", "@link", "String", "}", "to", "a", "<i", ">", "key", "=", "value<", "/", "i", ">", "pair", "as", "required", "by", "iSCSI", "text", "parameter"...
train
https://github.com/sebastiangraf/jSCSI/blob/6169bfe73f0b15de7d6485453555389e782ae888/bundles/target/src/main/java/org/jscsi/target/settings/TextParameter.java#L175-L177
Red5/red5-server-common
src/main/java/org/red5/server/so/ClientSharedObject.java
ClientSharedObject.notifyUpdate
protected void notifyUpdate(String key, Map<String, Object> value) { """ Notify listeners on map attribute update @param key Updated attribute key @param value Updated attribute value """ if (value.size() == 1) { Map.Entry<String, Object> entry = value.entrySet().iterator().next(); ...
java
protected void notifyUpdate(String key, Map<String, Object> value) { if (value.size() == 1) { Map.Entry<String, Object> entry = value.entrySet().iterator().next(); notifyUpdate(entry.getKey(), entry.getValue()); return; } for (ISharedObjectListener liste...
[ "protected", "void", "notifyUpdate", "(", "String", "key", ",", "Map", "<", "String", ",", "Object", ">", "value", ")", "{", "if", "(", "value", ".", "size", "(", ")", "==", "1", ")", "{", "Map", ".", "Entry", "<", "String", ",", "Object", ">", "...
Notify listeners on map attribute update @param key Updated attribute key @param value Updated attribute value
[ "Notify", "listeners", "on", "map", "attribute", "update" ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/ClientSharedObject.java#L225-L234
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/scheduler/PathAlterationListenerAdaptorForMonitor.java
PathAlterationListenerAdaptorForMonitor.checkCommonPropExistance
private boolean checkCommonPropExistance(Path rootPath, String noExtFileName) throws IOException { """ Given the target rootPath, check if there's common properties existed. Return false if so. @param rootPath @return """ Configuration conf = new Configuration(); FileStatus[] children = rootPat...
java
private boolean checkCommonPropExistance(Path rootPath, String noExtFileName) throws IOException { Configuration conf = new Configuration(); FileStatus[] children = rootPath.getFileSystem(conf).listStatus(rootPath); for (FileStatus aChild : children) { if (aChild.getPath().getName().contains(no...
[ "private", "boolean", "checkCommonPropExistance", "(", "Path", "rootPath", ",", "String", "noExtFileName", ")", "throws", "IOException", "{", "Configuration", "conf", "=", "new", "Configuration", "(", ")", ";", "FileStatus", "[", "]", "children", "=", "rootPath", ...
Given the target rootPath, check if there's common properties existed. Return false if so. @param rootPath @return
[ "Given", "the", "target", "rootPath", "check", "if", "there", "s", "common", "properties", "existed", ".", "Return", "false", "if", "so", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/scheduler/PathAlterationListenerAdaptorForMonitor.java#L246-L257
Graylog2/graylog2-server
graylog2-server/src/main/java/org/graylog2/plugin/inputs/transports/NettyTransport.java
NettyTransport.getChannelHandlers
protected LinkedHashMap<String, Callable<? extends ChannelHandler>> getChannelHandlers(final MessageInput input) { """ Subclasses can override this to add additional {@link ChannelHandler channel handlers} to the Netty {@link ChannelPipeline} to support additional features. Some common use cases are to add con...
java
protected LinkedHashMap<String, Callable<? extends ChannelHandler>> getChannelHandlers(final MessageInput input) { LinkedHashMap<String, Callable<? extends ChannelHandler>> handlerList = new LinkedHashMap<>(); handlerList.put("exception-logger", () -> new ExceptionLoggingChannelHandler(input, log)); ...
[ "protected", "LinkedHashMap", "<", "String", ",", "Callable", "<", "?", "extends", "ChannelHandler", ">", ">", "getChannelHandlers", "(", "final", "MessageInput", "input", ")", "{", "LinkedHashMap", "<", "String", ",", "Callable", "<", "?", "extends", "ChannelHa...
Subclasses can override this to add additional {@link ChannelHandler channel handlers} to the Netty {@link ChannelPipeline} to support additional features. Some common use cases are to add connection counters or traffic shapers. @param input The {@link MessageInput} for which these channel handlers are being added @r...
[ "Subclasses", "can", "override", "this", "to", "add", "additional", "{", "@link", "ChannelHandler", "channel", "handlers", "}", "to", "the", "Netty", "{", "@link", "ChannelPipeline", "}", "to", "support", "additional", "features", "." ]
train
https://github.com/Graylog2/graylog2-server/blob/50b565dcead6e0a372236d5c2f8530dc5726fa9b/graylog2-server/src/main/java/org/graylog2/plugin/inputs/transports/NettyTransport.java#L143-L151
landawn/AbacusUtil
src/com/landawn/abacus/util/JdbcUtil.java
JdbcUtil.dropTableIfExists
public static boolean dropTableIfExists(final Connection conn, final String tableName) { """ Returns {@code true} if succeed to drop table, otherwise {@code false} is returned. @param conn @param tableName @return """ try { if (doesTableExist(conn, tableName)) { exec...
java
public static boolean dropTableIfExists(final Connection conn, final String tableName) { try { if (doesTableExist(conn, tableName)) { execute(conn, "DROP TABLE " + tableName); return true; } } catch (SQLException e) { // ignore...
[ "public", "static", "boolean", "dropTableIfExists", "(", "final", "Connection", "conn", ",", "final", "String", "tableName", ")", "{", "try", "{", "if", "(", "doesTableExist", "(", "conn", ",", "tableName", ")", ")", "{", "execute", "(", "conn", ",", "\"DR...
Returns {@code true} if succeed to drop table, otherwise {@code false} is returned. @param conn @param tableName @return
[ "Returns", "{", "@code", "true", "}", "if", "succeed", "to", "drop", "table", "otherwise", "{", "@code", "false", "}", "is", "returned", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/JdbcUtil.java#L1687-L1699
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/rldispatcher/ConversationReceiveListenerDataReceivedInvocation.java
ConversationReceiveListenerDataReceivedInvocation.getThreadContext
protected synchronized Dispatchable getThreadContext() { """ This method will ask the receive listener for the thread context. @return Returns any thread context that the receive listener has for this data. """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "get...
java
protected synchronized Dispatchable getThreadContext() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getThreadContext"); // Start D202625 // Save the position of the data int currentPos = data.position(); int currentLimit = data.limit(); ...
[ "protected", "synchronized", "Dispatchable", "getThreadContext", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "this", ",", "tc", ",", "\"getThr...
This method will ask the receive listener for the thread context. @return Returns any thread context that the receive listener has for this data.
[ "This", "method", "will", "ask", "the", "receive", "listener", "for", "the", "thread", "context", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/jfapchannel/impl/rldispatcher/ConversationReceiveListenerDataReceivedInvocation.java#L94-L134
alkacon/opencms-core
src/org/opencms/cmis/CmsCmisRepository.java
CmsCmisRepository.solrSearch
CmsSolrResultList solrSearch(CmsObject cms, CmsSolrIndex index, String query, int start, int rows) throws CmsSearchException { """ Helper method for executing a query.<p> @param cms the CMS context to use @param index the index to use for the query @param query the query to perform @param start the star...
java
CmsSolrResultList solrSearch(CmsObject cms, CmsSolrIndex index, String query, int start, int rows) throws CmsSearchException { CmsSolrQuery q = new CmsSolrQuery(null, CmsRequestUtil.createParameterMap(query)); q.setStart(new Integer(start)); q.setRows(new Integer(rows)); CmsSo...
[ "CmsSolrResultList", "solrSearch", "(", "CmsObject", "cms", ",", "CmsSolrIndex", "index", ",", "String", "query", ",", "int", "start", ",", "int", "rows", ")", "throws", "CmsSearchException", "{", "CmsSolrQuery", "q", "=", "new", "CmsSolrQuery", "(", "null", "...
Helper method for executing a query.<p> @param cms the CMS context to use @param index the index to use for the query @param query the query to perform @param start the start offset @param rows the number of results to return @return the list of search results @throws CmsSearchException if something goes wrong
[ "Helper", "method", "for", "executing", "a", "query", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/cmis/CmsCmisRepository.java#L1569-L1577
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java
SessionDataManager.reindexSameNameSiblings
protected List<ItemState> reindexSameNameSiblings(NodeData cause, ItemDataConsumer dataManager) throws RepositoryException { """ Reindex same-name siblings of the node Reindex is actual for remove, move only. If node is added then its index always is a last in list of childs. @param cause a node caused ...
java
protected List<ItemState> reindexSameNameSiblings(NodeData cause, ItemDataConsumer dataManager) throws RepositoryException { List<ItemState> changes = new ArrayList<ItemState>(); NodeData parentNodeData = (NodeData)dataManager.getItemData(cause.getParentIdentifier()); NodeData nextSibling =...
[ "protected", "List", "<", "ItemState", ">", "reindexSameNameSiblings", "(", "NodeData", "cause", ",", "ItemDataConsumer", "dataManager", ")", "throws", "RepositoryException", "{", "List", "<", "ItemState", ">", "changes", "=", "new", "ArrayList", "<", "ItemState", ...
Reindex same-name siblings of the node Reindex is actual for remove, move only. If node is added then its index always is a last in list of childs. @param cause a node caused reindexing, i.e. deleted or moved node.
[ "Reindex", "same", "-", "name", "siblings", "of", "the", "node", "Reindex", "is", "actual", "for", "remove", "move", "only", ".", "If", "node", "is", "added", "then", "its", "index", "always", "is", "a", "last", "in", "list", "of", "childs", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionDataManager.java#L1452-L1499
uber/rides-java-sdk
samples/servlet-sample/src/main/java/com/uber/sdk/rides/samples/servlet/SampleServlet.java
SampleServlet.service
@Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { """ Before each request, fetch an OAuth2 credential for the user or redirect them to the OAuth2 login page instead. """ SessionConfiguration config = Server.createSessionConfig...
java
@Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { SessionConfiguration config = Server.createSessionConfiguration(); if (oAuth2Credentials == null) { oAuth2Credentials = Server.createOAuth2Credentials(config); ...
[ "@", "Override", "protected", "void", "service", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "resp", ")", "throws", "IOException", ",", "ServletException", "{", "SessionConfiguration", "config", "=", "Server", ".", "createSessionConfiguration", "(", ...
Before each request, fetch an OAuth2 credential for the user or redirect them to the OAuth2 login page instead.
[ "Before", "each", "request", "fetch", "an", "OAuth2", "credential", "for", "the", "user", "or", "redirect", "them", "to", "the", "OAuth2", "login", "page", "instead", "." ]
train
https://github.com/uber/rides-java-sdk/blob/6c75570ab7884f8ecafaad312ef471dd33f64c42/samples/servlet-sample/src/main/java/com/uber/sdk/rides/samples/servlet/SampleServlet.java#L66-L95
google/closure-compiler
src/com/google/javascript/jscomp/AstFactory.java
AstFactory.createIf
Node createIf(Node cond, Node then) { """ Returns a new IF node. <p>Blocks have no type information, so this is functionally the same as calling {@code IR.ifNode(cond, then)}. It exists so that a pass can be consistent about always using {@code AstFactory} to create new nodes. """ return IR.ifNode(con...
java
Node createIf(Node cond, Node then) { return IR.ifNode(cond, then); }
[ "Node", "createIf", "(", "Node", "cond", ",", "Node", "then", ")", "{", "return", "IR", ".", "ifNode", "(", "cond", ",", "then", ")", ";", "}" ]
Returns a new IF node. <p>Blocks have no type information, so this is functionally the same as calling {@code IR.ifNode(cond, then)}. It exists so that a pass can be consistent about always using {@code AstFactory} to create new nodes.
[ "Returns", "a", "new", "IF", "node", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/AstFactory.java#L132-L134
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/file/FileHelper.java
FileHelper.getOutputStream
@Nullable public static FileOutputStream getOutputStream (@Nonnull final File aFile, @Nonnull final EAppend eAppend) { """ Get an output stream for writing to a file. @param aFile The file to write to. May not be <code>null</code>. @param eAppend Appending mode. May not be <code>null</code>. @return <code...
java
@Nullable public static FileOutputStream getOutputStream (@Nonnull final File aFile, @Nonnull final EAppend eAppend) { ValueEnforcer.notNull (aFile, "File"); ValueEnforcer.notNull (eAppend, "Append"); if (internalCheckParentDirectoryExistanceAndAccess (aFile).isInvalid ()) return null; // OK...
[ "@", "Nullable", "public", "static", "FileOutputStream", "getOutputStream", "(", "@", "Nonnull", "final", "File", "aFile", ",", "@", "Nonnull", "final", "EAppend", "eAppend", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aFile", ",", "\"File\"", ")", ";", ...
Get an output stream for writing to a file. @param aFile The file to write to. May not be <code>null</code>. @param eAppend Appending mode. May not be <code>null</code>. @return <code>null</code> if the file could not be opened
[ "Get", "an", "output", "stream", "for", "writing", "to", "a", "file", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/file/FileHelper.java#L363-L390
cdk/cdk
descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/LigancyFourChirality.java
LigancyFourChirality.project
public LigancyFourChirality project(ILigand[] newOrder) { """ Recalculates the {@link LigancyFourChirality} based on the new, given atom ordering. @param newOrder new order of atoms @return the chirality following the new atom order """ ITetrahedralChirality.Stereo newStereo = this.stereo; ...
java
public LigancyFourChirality project(ILigand[] newOrder) { ITetrahedralChirality.Stereo newStereo = this.stereo; // copy the current ordering, and work with that ILigand[] newAtoms = new ILigand[4]; System.arraycopy(this.ligands, 0, newAtoms, 0, 4); // now move atoms around to ma...
[ "public", "LigancyFourChirality", "project", "(", "ILigand", "[", "]", "newOrder", ")", "{", "ITetrahedralChirality", ".", "Stereo", "newStereo", "=", "this", ".", "stereo", ";", "// copy the current ordering, and work with that", "ILigand", "[", "]", "newAtoms", "=",...
Recalculates the {@link LigancyFourChirality} based on the new, given atom ordering. @param newOrder new order of atoms @return the chirality following the new atom order
[ "Recalculates", "the", "{", "@link", "LigancyFourChirality", "}", "based", "on", "the", "new", "given", "atom", "ordering", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/descriptor/cip/src/main/java/org/openscience/cdk/geometry/cip/LigancyFourChirality.java#L123-L149
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/scatterplot/index/TreeSphereVisualization.java
TreeSphereVisualization.getLPNormP
public static double getLPNormP(AbstractMTree<?, ?, ?, ?> tree) { """ Get the "p" value of an Lp norm. @param tree Tree to visualize @return p value """ // Note: we deliberately lose generics here, so the compilers complain // less on the next typecheck and cast! DistanceFunction<?> distanceFun...
java
public static double getLPNormP(AbstractMTree<?, ?, ?, ?> tree) { // Note: we deliberately lose generics here, so the compilers complain // less on the next typecheck and cast! DistanceFunction<?> distanceFunction = tree.getDistanceFunction(); if(LPNormDistanceFunction.class.isInstance(distanceFunction)...
[ "public", "static", "double", "getLPNormP", "(", "AbstractMTree", "<", "?", ",", "?", ",", "?", ",", "?", ">", "tree", ")", "{", "// Note: we deliberately lose generics here, so the compilers complain", "// less on the next typecheck and cast!", "DistanceFunction", "<", "...
Get the "p" value of an Lp norm. @param tree Tree to visualize @return p value
[ "Get", "the", "p", "value", "of", "an", "Lp", "norm", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/visualizers/scatterplot/index/TreeSphereVisualization.java#L129-L137
aseovic/coherence-tools
loader/src/main/java/com/seovic/loader/target/JpaTarget.java
JpaTarget.mergeInTransaction
private void mergeInTransaction(EntityManager em, Collection objects) { """ Persist collection of objects. @param em entity manager used to persist objects @param objects objects to persist """ EntityTransaction tx = null; try { tx = em.getTransaction(); tx....
java
private void mergeInTransaction(EntityManager em, Collection objects) { EntityTransaction tx = null; try { tx = em.getTransaction(); tx.begin(); for (Object o : objects) { em.merge(o); } tx.commit(); } ...
[ "private", "void", "mergeInTransaction", "(", "EntityManager", "em", ",", "Collection", "objects", ")", "{", "EntityTransaction", "tx", "=", "null", ";", "try", "{", "tx", "=", "em", ".", "getTransaction", "(", ")", ";", "tx", ".", "begin", "(", ")", ";"...
Persist collection of objects. @param em entity manager used to persist objects @param objects objects to persist
[ "Persist", "collection", "of", "objects", "." ]
train
https://github.com/aseovic/coherence-tools/blob/561a1d7e572ad98657fcd26beb1164891b0cd6fe/loader/src/main/java/com/seovic/loader/target/JpaTarget.java#L98-L114
tvesalainen/util
util/src/main/java/org/vesalainen/navi/Chain.java
Chain.horizontalScope
public double horizontalScope(double T, double d, double s) { """ Horizontal scope (length in plan view from fairlead to touchdown point) @param T Fairlead tension @param d Depth @param s Chain length @return """ double Fw = T / w; return (Fw - d) * Math.log((s + Fw) / (Fw - d)); }
java
public double horizontalScope(double T, double d, double s) { double Fw = T / w; return (Fw - d) * Math.log((s + Fw) / (Fw - d)); }
[ "public", "double", "horizontalScope", "(", "double", "T", ",", "double", "d", ",", "double", "s", ")", "{", "double", "Fw", "=", "T", "/", "w", ";", "return", "(", "Fw", "-", "d", ")", "*", "Math", ".", "log", "(", "(", "s", "+", "Fw", ")", ...
Horizontal scope (length in plan view from fairlead to touchdown point) @param T Fairlead tension @param d Depth @param s Chain length @return
[ "Horizontal", "scope", "(", "length", "in", "plan", "view", "from", "fairlead", "to", "touchdown", "point", ")" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/navi/Chain.java#L71-L75
libgdx/gdx-ai
gdx-ai/src/com/badlogic/gdx/ai/utils/ArithmeticUtils.java
ArithmeticUtils.mulAndCheck
public static int mulAndCheck (int x, int y) throws ArithmeticException { """ Multiply two integers, checking for overflow. @param x first factor @param y second factor @return the product {@code x * y}. @throws ArithmeticException if the result can not be represented as an {@code int}. """ long m = ((...
java
public static int mulAndCheck (int x, int y) throws ArithmeticException { long m = ((long)x) * ((long)y); if (m < Integer.MIN_VALUE || m > Integer.MAX_VALUE) { throw new ArithmeticException(); } return (int)m; }
[ "public", "static", "int", "mulAndCheck", "(", "int", "x", ",", "int", "y", ")", "throws", "ArithmeticException", "{", "long", "m", "=", "(", "(", "long", ")", "x", ")", "*", "(", "(", "long", ")", "y", ")", ";", "if", "(", "m", "<", "Integer", ...
Multiply two integers, checking for overflow. @param x first factor @param y second factor @return the product {@code x * y}. @throws ArithmeticException if the result can not be represented as an {@code int}.
[ "Multiply", "two", "integers", "checking", "for", "overflow", "." ]
train
https://github.com/libgdx/gdx-ai/blob/2d1523a97193a45e18e11a4837c6800d08f177c5/gdx-ai/src/com/badlogic/gdx/ai/utils/ArithmeticUtils.java#L149-L155
aws/aws-sdk-java
aws-java-sdk-resourcegroupstaggingapi/src/main/java/com/amazonaws/services/resourcegroupstaggingapi/model/TagResourcesRequest.java
TagResourcesRequest.withTags
public TagResourcesRequest withTags(java.util.Map<String, String> tags) { """ <p> The tags that you want to add to the specified resources. A tag consists of a key and a value that you define. </p> @param tags The tags that you want to add to the specified resources. A tag consists of a key and a value that ...
java
public TagResourcesRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "TagResourcesRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The tags that you want to add to the specified resources. A tag consists of a key and a value that you define. </p> @param tags The tags that you want to add to the specified resources. A tag consists of a key and a value that you define. @return Returns a reference to this object so that method calls can be chain...
[ "<p", ">", "The", "tags", "that", "you", "want", "to", "add", "to", "the", "specified", "resources", ".", "A", "tag", "consists", "of", "a", "key", "and", "a", "value", "that", "you", "define", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-resourcegroupstaggingapi/src/main/java/com/amazonaws/services/resourcegroupstaggingapi/model/TagResourcesRequest.java#L180-L183
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildsInner.java
BuildsInner.beginUpdateAsync
public Observable<BuildInner> beginUpdateAsync(String resourceGroupName, String registryName, String buildId) { """ Patch the build properties. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param buildI...
java
public Observable<BuildInner> beginUpdateAsync(String resourceGroupName, String registryName, String buildId) { return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, buildId).map(new Func1<ServiceResponse<BuildInner>, BuildInner>() { @Override public BuildInner call...
[ "public", "Observable", "<", "BuildInner", ">", "beginUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "String", "buildId", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "registryName", ","...
Patch the build properties. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param buildId The build ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the Build...
[ "Patch", "the", "build", "properties", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerregistry/v2018_02_01_preview/implementation/BuildsInner.java#L636-L643
haraldk/TwelveMonkeys
servlet/src/main/java/com/twelvemonkeys/servlet/cache/CachedResponseImpl.java
CachedResponseImpl.writeContentsTo
public void writeContentsTo(final OutputStream pStream) throws IOException { """ Writes the cached content to the response @param pStream the response stream @throws java.io.IOException """ if (content == null) { throw new IOException("Cache is null, no content to write."); }...
java
public void writeContentsTo(final OutputStream pStream) throws IOException { if (content == null) { throw new IOException("Cache is null, no content to write."); } content.writeTo(pStream); }
[ "public", "void", "writeContentsTo", "(", "final", "OutputStream", "pStream", ")", "throws", "IOException", "{", "if", "(", "content", "==", "null", ")", "{", "throw", "new", "IOException", "(", "\"Cache is null, no content to write.\"", ")", ";", "}", "content", ...
Writes the cached content to the response @param pStream the response stream @throws java.io.IOException
[ "Writes", "the", "cached", "content", "to", "the", "response" ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/servlet/src/main/java/com/twelvemonkeys/servlet/cache/CachedResponseImpl.java#L106-L112
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/LocalTime.java
LocalTime.withMinute
public LocalTime withMinute(int minute) { """ Returns a copy of this {@code LocalTime} with the minute-of-hour altered. <p> This instance is immutable and unaffected by this method call. @param minute the minute-of-hour to set in the result, from 0 to 59 @return a {@code LocalTime} based on this time with t...
java
public LocalTime withMinute(int minute) { if (this.minute == minute) { return this; } MINUTE_OF_HOUR.checkValidValue(minute); return create(hour, minute, second, nano); }
[ "public", "LocalTime", "withMinute", "(", "int", "minute", ")", "{", "if", "(", "this", ".", "minute", "==", "minute", ")", "{", "return", "this", ";", "}", "MINUTE_OF_HOUR", ".", "checkValidValue", "(", "minute", ")", ";", "return", "create", "(", "hour...
Returns a copy of this {@code LocalTime} with the minute-of-hour altered. <p> This instance is immutable and unaffected by this method call. @param minute the minute-of-hour to set in the result, from 0 to 59 @return a {@code LocalTime} based on this time with the requested minute, not null @throws DateTimeException ...
[ "Returns", "a", "copy", "of", "this", "{", "@code", "LocalTime", "}", "with", "the", "minute", "-", "of", "-", "hour", "altered", ".", "<p", ">", "This", "instance", "is", "immutable", "and", "unaffected", "by", "this", "method", "call", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/LocalTime.java#L880-L886
reactor/reactor-netty
src/main/java/reactor/netty/http/client/HttpClient.java
HttpClient.doOnError
public final HttpClient doOnError(BiConsumer<? super HttpClientRequest, ? super Throwable> doOnRequest, BiConsumer<? super HttpClientResponse, ? super Throwable> doOnResponse) { """ Setup a callback called when {@link HttpClientRequest} has not been sent and when {@link HttpClientResponse} has not been fully r...
java
public final HttpClient doOnError(BiConsumer<? super HttpClientRequest, ? super Throwable> doOnRequest, BiConsumer<? super HttpClientResponse, ? super Throwable> doOnResponse) { Objects.requireNonNull(doOnRequest, "doOnRequest"); Objects.requireNonNull(doOnResponse, "doOnResponse"); return new HttpClientDoOnEr...
[ "public", "final", "HttpClient", "doOnError", "(", "BiConsumer", "<", "?", "super", "HttpClientRequest", ",", "?", "super", "Throwable", ">", "doOnRequest", ",", "BiConsumer", "<", "?", "super", "HttpClientResponse", ",", "?", "super", "Throwable", ">", "doOnRes...
Setup a callback called when {@link HttpClientRequest} has not been sent and when {@link HttpClientResponse} has not been fully received. <p> Note that some mutation of {@link HttpClientRequest} performed late in lifecycle {@link #doOnRequest(BiConsumer)} or {@link RequestSender#send(BiFunction)} might not be visible i...
[ "Setup", "a", "callback", "called", "when", "{", "@link", "HttpClientRequest", "}", "has", "not", "been", "sent", "and", "when", "{", "@link", "HttpClientResponse", "}", "has", "not", "been", "fully", "received", ".", "<p", ">", "Note", "that", "some", "mu...
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/http/client/HttpClient.java#L501-L506
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/JcrQueryManager.java
JcrQueryManager.createQuery
public Query createQuery( QueryCommand command ) throws InvalidQueryException, RepositoryException { """ Creates a new JCR {@link Query} by specifying the query expression itself, the language in which the query is stated, the {@link QueryCommand} representation. This method is more efficient than {@link #createQ...
java
public Query createQuery( QueryCommand command ) throws InvalidQueryException, RepositoryException { session.checkLive(); if (command == null) { // The query is not well-formed and cannot be parsed ... throw new InvalidQueryException(JcrI18n.queryInLanguageIsNotValid.text(QueryLa...
[ "public", "Query", "createQuery", "(", "QueryCommand", "command", ")", "throws", "InvalidQueryException", ",", "RepositoryException", "{", "session", ".", "checkLive", "(", ")", ";", "if", "(", "command", "==", "null", ")", "{", "// The query is not well-formed and ...
Creates a new JCR {@link Query} by specifying the query expression itself, the language in which the query is stated, the {@link QueryCommand} representation. This method is more efficient than {@link #createQuery(String, String, Path, Locale)} if the QueryCommand is created directly. @param command the query command;...
[ "Creates", "a", "new", "JCR", "{", "@link", "Query", "}", "by", "specifying", "the", "query", "expression", "itself", "the", "language", "in", "which", "the", "query", "is", "stated", "the", "{", "@link", "QueryCommand", "}", "representation", ".", "This", ...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/JcrQueryManager.java#L175-L195
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java
JBBPDslBuilder.Int
public JBBPDslBuilder Int(final String name) { """ Add named integer field. @param name name of the field, can be null for anonymous @return the builder instance, must not be null """ final Item item = new Item(BinType.INT, name, this.byteOrder); this.addItem(item); return this; }
java
public JBBPDslBuilder Int(final String name) { final Item item = new Item(BinType.INT, name, this.byteOrder); this.addItem(item); return this; }
[ "public", "JBBPDslBuilder", "Int", "(", "final", "String", "name", ")", "{", "final", "Item", "item", "=", "new", "Item", "(", "BinType", ".", "INT", ",", "name", ",", "this", ".", "byteOrder", ")", ";", "this", ".", "addItem", "(", "item", ")", ";",...
Add named integer field. @param name name of the field, can be null for anonymous @return the builder instance, must not be null
[ "Add", "named", "integer", "field", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java#L1091-L1095
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.setSecretAsync
public ServiceFuture<SecretBundle> setSecretAsync(String vaultBaseUrl, String secretName, String value, final ServiceCallback<SecretBundle> serviceCallback) { """ Sets a secret in a specified key vault. The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault cre...
java
public ServiceFuture<SecretBundle> setSecretAsync(String vaultBaseUrl, String secretName, String value, final ServiceCallback<SecretBundle> serviceCallback) { return ServiceFuture.fromResponse(setSecretWithServiceResponseAsync(vaultBaseUrl, secretName, value), serviceCallback); }
[ "public", "ServiceFuture", "<", "SecretBundle", ">", "setSecretAsync", "(", "String", "vaultBaseUrl", ",", "String", "secretName", ",", "String", "value", ",", "final", "ServiceCallback", "<", "SecretBundle", ">", "serviceCallback", ")", "{", "return", "ServiceFutur...
Sets a secret in a specified key vault. The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret. This operation requires the secrets/set permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. ...
[ "Sets", "a", "secret", "in", "a", "specified", "key", "vault", ".", "The", "SET", "operation", "adds", "a", "secret", "to", "the", "Azure", "Key", "Vault", ".", "If", "the", "named", "secret", "already", "exists", "Azure", "Key", "Vault", "creates", "a",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L3337-L3339
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java
ServiceDiscoveryManager.findServicesDiscoverInfo
public List<DiscoverInfo> findServicesDiscoverInfo(String feature, boolean stopOnFirst, boolean useCache, Map<? super Jid, Exception> encounteredExceptions) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Find all services under the users servic...
java
public List<DiscoverInfo> findServicesDiscoverInfo(String feature, boolean stopOnFirst, boolean useCache, Map<? super Jid, Exception> encounteredExceptions) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { DomainBareJid serviceName = connection()....
[ "public", "List", "<", "DiscoverInfo", ">", "findServicesDiscoverInfo", "(", "String", "feature", ",", "boolean", "stopOnFirst", ",", "boolean", "useCache", ",", "Map", "<", "?", "super", "Jid", ",", "Exception", ">", "encounteredExceptions", ")", "throws", "NoR...
Find all services under the users service that provide a given feature. @param feature the feature to search for @param stopOnFirst if true, stop searching after the first service was found @param useCache if true, query a cache first to avoid network I/O @param encounteredExceptions an optional map which will be fill...
[ "Find", "all", "services", "under", "the", "users", "service", "that", "provide", "a", "given", "feature", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java#L703-L707
agmip/ace-lookup
src/main/java/org/agmip/ace/util/AcePathfinderUtil.java
AcePathfinderUtil.traverseToPoint
public static HashMap traverseToPoint(HashMap m, String p) { """ A helper method to help traverse to a certain point in the map. @param m Map to traverse @param p Path to traverse to @return A reference to the point in the map. """ HashMap pointer = m; String[] base = p.split("[@]"); ...
java
public static HashMap traverseToPoint(HashMap m, String p) { HashMap pointer = m; String[] base = p.split("[@]"); String[] b = base[0].split("[:]"); int bl = b.length; for(int i=0; i < bl; i++) { pointer = (HashMap) pointer.get(b[i]); } return pointer;...
[ "public", "static", "HashMap", "traverseToPoint", "(", "HashMap", "m", ",", "String", "p", ")", "{", "HashMap", "pointer", "=", "m", ";", "String", "[", "]", "base", "=", "p", ".", "split", "(", "\"[@]\"", ")", ";", "String", "[", "]", "b", "=", "b...
A helper method to help traverse to a certain point in the map. @param m Map to traverse @param p Path to traverse to @return A reference to the point in the map.
[ "A", "helper", "method", "to", "help", "traverse", "to", "a", "certain", "point", "in", "the", "map", "." ]
train
https://github.com/agmip/ace-lookup/blob/d8224a231cb8c01729e63010916a2a85517ce4c1/src/main/java/org/agmip/ace/util/AcePathfinderUtil.java#L282-L291
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/msg/MsgChecker.java
MsgChecker.checkRequest
public void checkRequest(BasicCheckInfo basicCheckInfo, Object bodyObj) { """ Check request. @param basicCheckInfo the basic check info @param bodyObj the body obj """ String key = basicCheckInfo.getUniqueKey(); List<ValidationData> checkData = this.validationStore.getValidationData...
java
public void checkRequest(BasicCheckInfo basicCheckInfo, Object bodyObj) { String key = basicCheckInfo.getUniqueKey(); List<ValidationData> checkData = this.validationStore.getValidationDatas(basicCheckInfo.getParamType(), key); if (checkData == null || checkData.isEmpty()) { return...
[ "public", "void", "checkRequest", "(", "BasicCheckInfo", "basicCheckInfo", ",", "Object", "bodyObj", ")", "{", "String", "key", "=", "basicCheckInfo", ".", "getUniqueKey", "(", ")", ";", "List", "<", "ValidationData", ">", "checkData", "=", "this", ".", "valid...
Check request. @param basicCheckInfo the basic check info @param bodyObj the body obj
[ "Check", "request", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/msg/MsgChecker.java#L121-L132
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Project.java
Project.createSubProject
public Project createSubProject(String name, DateTime beginDate, Schedule schedule) { """ Create a sub project under this project with a name, begin date, and optional schedule. @param name Name of the new project. @param beginDate Date the schedule will begin. @param schedule The new schedule. If null...
java
public Project createSubProject(String name, DateTime beginDate, Schedule schedule) { return getInstance().create().project(name, this, beginDate, schedule); }
[ "public", "Project", "createSubProject", "(", "String", "name", ",", "DateTime", "beginDate", ",", "Schedule", "schedule", ")", "{", "return", "getInstance", "(", ")", ".", "create", "(", ")", ".", "project", "(", "name", ",", "this", ",", "beginDate", ","...
Create a sub project under this project with a name, begin date, and optional schedule. @param name Name of the new project. @param beginDate Date the schedule will begin. @param schedule The new schedule. If null, the project will inherit the parent project's schedule. @return The newly created project.
[ "Create", "a", "sub", "project", "under", "this", "project", "with", "a", "name", "begin", "date", "and", "optional", "schedule", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Project.java#L157-L159
sonatype/sisu-guice
core/src/com/google/inject/internal/InternalInjectorCreator.java
InternalInjectorCreator.loadEagerSingletons
void loadEagerSingletons(InjectorImpl injector, Stage stage, final Errors errors) { """ Loads eager singletons, or all singletons if we're in Stage.PRODUCTION. Bindings discovered while we're binding these singletons are not be eager. """ List<BindingImpl<?>> candidateBindings = new ArrayList<>(); @Su...
java
void loadEagerSingletons(InjectorImpl injector, Stage stage, final Errors errors) { List<BindingImpl<?>> candidateBindings = new ArrayList<>(); @SuppressWarnings("unchecked") // casting Collection<Binding> to Collection<BindingImpl> is safe Collection<BindingImpl<?>> bindingsAtThisLevel = (Collectio...
[ "void", "loadEagerSingletons", "(", "InjectorImpl", "injector", ",", "Stage", "stage", ",", "final", "Errors", "errors", ")", "{", "List", "<", "BindingImpl", "<", "?", ">", ">", "candidateBindings", "=", "new", "ArrayList", "<>", "(", ")", ";", "@", "Supp...
Loads eager singletons, or all singletons if we're in Stage.PRODUCTION. Bindings discovered while we're binding these singletons are not be eager.
[ "Loads", "eager", "singletons", "or", "all", "singletons", "if", "we", "re", "in", "Stage", ".", "PRODUCTION", ".", "Bindings", "discovered", "while", "we", "re", "binding", "these", "singletons", "are", "not", "be", "eager", "." ]
train
https://github.com/sonatype/sisu-guice/blob/45f5c89834c189c5338640bf55e6e6181b9b5611/core/src/com/google/inject/internal/InternalInjectorCreator.java#L194-L223
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsyncThrowing
public static <T1, T2, T3, T4, R> Func4<T1, T2, T3, T4, Observable<R>> toAsyncThrowing(final ThrowingFunc4<? super T1, ? super T2, ? super T3, ? super T4, ? extends R> func, final Scheduler scheduler) { """ Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img wid...
java
public static <T1, T2, T3, T4, R> Func4<T1, T2, T3, T4, Observable<R>> toAsyncThrowing(final ThrowingFunc4<? super T1, ? super T2, ? super T3, ? super T4, ? extends R> func, final Scheduler scheduler) { return new Func4<T1, T2, T3, T4, Observable<R>>() { @Override public Observable<R> ca...
[ "public", "static", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "R", ">", "Func4", "<", "T1", ",", "T2", ",", "T3", ",", "T4", ",", "Observable", "<", "R", ">", ">", "toAsyncThrowing", "(", "final", "ThrowingFunc4", "<", "?", "super", "T1", ...
Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.s.png" alt=""> @param <T1> the first parameter type @param <T2> the second parameter type @param <T3> the third parameter type...
[ "Convert", "a", "synchronous", "function", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L1130-L1137
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsVfsSitemapService.java
CmsVfsSitemapService.isInSubsite
private boolean isInSubsite(List<String> subSitePaths, String path) { """ Returns if the given path is located below one of the given sub site paths.<p> @param subSitePaths the sub site root paths @param path the root path to check @return <code>true</code> if the given path is located below one of the give...
java
private boolean isInSubsite(List<String> subSitePaths, String path) { boolean result = false; for (String subSite : subSitePaths) { if (path.startsWith(subSite)) { result = true; break; } } return result; }
[ "private", "boolean", "isInSubsite", "(", "List", "<", "String", ">", "subSitePaths", ",", "String", "path", ")", "{", "boolean", "result", "=", "false", ";", "for", "(", "String", "subSite", ":", "subSitePaths", ")", "{", "if", "(", "path", ".", "starts...
Returns if the given path is located below one of the given sub site paths.<p> @param subSitePaths the sub site root paths @param path the root path to check @return <code>true</code> if the given path is located below one of the given sub site paths
[ "Returns", "if", "the", "given", "path", "is", "located", "below", "one", "of", "the", "given", "sub", "site", "paths", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsVfsSitemapService.java#L2764-L2774
Azure/azure-sdk-for-java
network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualHubsInner.java
VirtualHubsInner.updateTags
public VirtualHubInner updateTags(String resourceGroupName, String virtualHubName, Map<String, String> tags) { """ Updates VirtualHub tags. @param resourceGroupName The resource group name of the VirtualHub. @param virtualHubName The name of the VirtualHub. @param tags Resource tags. @throws IllegalArgumentE...
java
public VirtualHubInner updateTags(String resourceGroupName, String virtualHubName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, virtualHubName, tags).toBlocking().last().body(); }
[ "public", "VirtualHubInner", "updateTags", "(", "String", "resourceGroupName", ",", "String", "virtualHubName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "updateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualHubN...
Updates VirtualHub tags. @param resourceGroupName The resource group name of the VirtualHub. @param virtualHubName The name of the VirtualHub. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorException thrown if the request is rejected by server @throws ...
[ "Updates", "VirtualHub", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualHubsInner.java#L448-L450
facebookarchive/hadoop-20
src/core/org/apache/hadoop/record/compiler/JFile.java
JFile.genCode
public int genCode(String language, String destDir, ArrayList<String> options) throws IOException { """ Generate record code in given language. Language should be all lowercase. """ CodeGenerator gen = CodeGenerator.get(language); if (gen != null) { gen.genCode(mName, mInclFiles, mRecords, d...
java
public int genCode(String language, String destDir, ArrayList<String> options) throws IOException { CodeGenerator gen = CodeGenerator.get(language); if (gen != null) { gen.genCode(mName, mInclFiles, mRecords, destDir, options); } else { System.err.println("Cannnot recognize language:"+langua...
[ "public", "int", "genCode", "(", "String", "language", ",", "String", "destDir", ",", "ArrayList", "<", "String", ">", "options", ")", "throws", "IOException", "{", "CodeGenerator", "gen", "=", "CodeGenerator", ".", "get", "(", "language", ")", ";", "if", ...
Generate record code in given language. Language should be all lowercase.
[ "Generate", "record", "code", "in", "given", "language", ".", "Language", "should", "be", "all", "lowercase", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/record/compiler/JFile.java#L59-L69
alkacon/opencms-core
src/org/opencms/xml/templatemapper/CmsTemplateMapper.java
CmsTemplateMapper.transformDetailElement
public CmsContainerElementBean transformDetailElement( CmsObject cms, CmsContainerElementBean input, String rootPath) { """ Transforms a container element bean used for detail elements.<p> @param cms the current CMS context @param input the bean to be transformed @param rootPath the ro...
java
public CmsContainerElementBean transformDetailElement( CmsObject cms, CmsContainerElementBean input, String rootPath) { CmsTemplateMapperConfiguration config = getConfiguration(cms); if ((config == null) || !config.isEnabledForPath(rootPath)) { return input; ...
[ "public", "CmsContainerElementBean", "transformDetailElement", "(", "CmsObject", "cms", ",", "CmsContainerElementBean", "input", ",", "String", "rootPath", ")", "{", "CmsTemplateMapperConfiguration", "config", "=", "getConfiguration", "(", "cms", ")", ";", "if", "(", ...
Transforms a container element bean used for detail elements.<p> @param cms the current CMS context @param input the bean to be transformed @param rootPath the root path of the page @return the transformed bean
[ "Transforms", "a", "container", "element", "bean", "used", "for", "detail", "elements", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/templatemapper/CmsTemplateMapper.java#L205-L216
EMCECS/nfs-client-java
src/main/java/com/emc/ecs/nfsclient/network/RecordMarkingUtil.java
RecordMarkingUtil.putRecordMarkingAndSend
static void putRecordMarkingAndSend(Channel channel, Xdr rpcRequest) { """ Insert record marking into rpcRequest and then send to tcp stream. @param channel The Channel to use for sending. @param rpcRequest The request to send. """ // XDR header buffer List<ByteBuffer> buffers = new LinkedL...
java
static void putRecordMarkingAndSend(Channel channel, Xdr rpcRequest) { // XDR header buffer List<ByteBuffer> buffers = new LinkedList<>(); buffers.add(ByteBuffer.wrap(rpcRequest.getBuffer(), 0, rpcRequest.getOffset())); // payload buffer if (rpcRequest.getPayloads() != null) { ...
[ "static", "void", "putRecordMarkingAndSend", "(", "Channel", "channel", ",", "Xdr", "rpcRequest", ")", "{", "// XDR header buffer", "List", "<", "ByteBuffer", ">", "buffers", "=", "new", "LinkedList", "<>", "(", ")", ";", "buffers", ".", "add", "(", "ByteBuffe...
Insert record marking into rpcRequest and then send to tcp stream. @param channel The Channel to use for sending. @param rpcRequest The request to send.
[ "Insert", "record", "marking", "into", "rpcRequest", "and", "then", "send", "to", "tcp", "stream", "." ]
train
https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/network/RecordMarkingUtil.java#L75-L117
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync
public Observable<ServiceResponse<Page<ResourceMetricDefinitionInner>>> listMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(final String resourceGroupName, final String name, final String instance) { """ Get metric definitions for a specific instance of a multi-role pool of an App Service Environmen...
java
public Observable<ServiceResponse<Page<ResourceMetricDefinitionInner>>> listMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(final String resourceGroupName, final String name, final String instance) { return listMultiRolePoolInstanceMetricDefinitionsSinglePageAsync(resourceGroupName, name, instanc...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "ResourceMetricDefinitionInner", ">", ">", ">", "listMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final",...
Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service En...
[ "Get", "metric", "definitions", "for", "a", "specific", "instance", "of", "a", "multi", "-", "role", "pool", "of", "an", "App", "Service", "Environment", ".", "Get", "metric", "definitions", "for", "a", "specific", "instance", "of", "a", "multi", "-", "rol...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L2621-L2633
drewnoakes/metadata-extractor
Source/com/drew/metadata/Directory.java
Directory.setStringValue
@java.lang.SuppressWarnings( { """ Sets a <code>StringValue</code> value for the specified tag. @param tagType the tag's value as an int @param value the value for the specified tag as a StringValue """ "ConstantConditions" }) public void setStringValue(int tagType, @NotNull StringValue value) { ...
java
@java.lang.SuppressWarnings({ "ConstantConditions" }) public void setStringValue(int tagType, @NotNull StringValue value) { if (value == null) throw new NullPointerException("cannot set a null StringValue"); setObject(tagType, value); }
[ "@", "java", ".", "lang", ".", "SuppressWarnings", "(", "{", "\"ConstantConditions\"", "}", ")", "public", "void", "setStringValue", "(", "int", "tagType", ",", "@", "NotNull", "StringValue", "value", ")", "{", "if", "(", "value", "==", "null", ")", "throw...
Sets a <code>StringValue</code> value for the specified tag. @param tagType the tag's value as an int @param value the value for the specified tag as a StringValue
[ "Sets", "a", "<code", ">", "StringValue<", "/", "code", ">", "value", "for", "the", "specified", "tag", "." ]
train
https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/Directory.java#L269-L275
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java
DynamicReportBuilder.setWhenNoData
public DynamicReportBuilder setWhenNoData(String text, Style style) { """ Defines the text to show when the data source is empty.<br> By default the title and column headers are shown @param text @param style : the style of the text @return """ this.report.setWhenNoDataStyle(style); this....
java
public DynamicReportBuilder setWhenNoData(String text, Style style) { this.report.setWhenNoDataStyle(style); this.report.setWhenNoDataText(text); this.report.setWhenNoDataType(DJConstants.WHEN_NO_DATA_TYPE_NO_DATA_SECTION); return this; }
[ "public", "DynamicReportBuilder", "setWhenNoData", "(", "String", "text", ",", "Style", "style", ")", "{", "this", ".", "report", ".", "setWhenNoDataStyle", "(", "style", ")", ";", "this", ".", "report", ".", "setWhenNoDataText", "(", "text", ")", ";", "this...
Defines the text to show when the data source is empty.<br> By default the title and column headers are shown @param text @param style : the style of the text @return
[ "Defines", "the", "text", "to", "show", "when", "the", "data", "source", "is", "empty", ".", "<br", ">", "By", "default", "the", "title", "and", "column", "headers", "are", "shown" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/builders/DynamicReportBuilder.java#L1526-L1531
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/GridScreen.java
GridScreen.getNextLocation
public ScreenLocation getNextLocation(short position, short setNewAnchor) { """ Code this position and Anchor to add it to the LayoutManager. @param position The location constant (see ScreenConstants). @param setNewAnchor The anchor constant. @return The new screen location object. """ if (position...
java
public ScreenLocation getNextLocation(short position, short setNewAnchor) { if (position == ScreenConstants.NEXT_LOGICAL) position = ScreenConstants.RIGHT_OF_LAST; if (position == ScreenConstants.FIRST_LOCATION) position = ScreenConstants.FIRST_DISPLAY_LOCATION; if (p...
[ "public", "ScreenLocation", "getNextLocation", "(", "short", "position", ",", "short", "setNewAnchor", ")", "{", "if", "(", "position", "==", "ScreenConstants", ".", "NEXT_LOGICAL", ")", "position", "=", "ScreenConstants", ".", "RIGHT_OF_LAST", ";", "if", "(", "...
Code this position and Anchor to add it to the LayoutManager. @param position The location constant (see ScreenConstants). @param setNewAnchor The anchor constant. @return The new screen location object.
[ "Code", "this", "position", "and", "Anchor", "to", "add", "it", "to", "the", "LayoutManager", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/GridScreen.java#L100-L109
auth0/Lock.Android
lib/src/main/java/com/auth0/android/lock/PasswordlessLock.java
PasswordlessLock.newBuilder
@SuppressWarnings("unused") public static Builder newBuilder(@NonNull Auth0 account, @NonNull LockCallback callback) { """ Creates a new Lock.Builder instance with the given account and callback. Use of Passwordless connections requires your Application to have the <b>Resource Owner</b> Legacy Grant Type enab...
java
@SuppressWarnings("unused") public static Builder newBuilder(@NonNull Auth0 account, @NonNull LockCallback callback) { return new PasswordlessLock.Builder(account, callback); }
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "static", "Builder", "newBuilder", "(", "@", "NonNull", "Auth0", "account", ",", "@", "NonNull", "LockCallback", "callback", ")", "{", "return", "new", "PasswordlessLock", ".", "Builder", "(", "account",...
Creates a new Lock.Builder instance with the given account and callback. Use of Passwordless connections requires your Application to have the <b>Resource Owner</b> Legacy Grant Type enabled. See <a href="https://auth0.com/docs/clients/client-grant-types">Client Grant Types</a> to learn how to enable it. @param accoun...
[ "Creates", "a", "new", "Lock", ".", "Builder", "instance", "with", "the", "given", "account", "and", "callback", ".", "Use", "of", "Passwordless", "connections", "requires", "your", "Application", "to", "have", "the", "<b", ">", "Resource", "Owner<", "/", "b...
train
https://github.com/auth0/Lock.Android/blob/8eb2a979048d2eb6cf0ec631e82e6c3fe6e7d220/lib/src/main/java/com/auth0/android/lock/PasswordlessLock.java#L92-L95
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/filter/Filter.java
Filter.invoke
public void invoke(Node root, Action result) throws IOException { """ Main methods of this class. @throws IOException as thrown by the specified FileTask """ doInvoke(0, root, root.isLink(), new ArrayList<>(includes), new ArrayList<>(excludes), result); }
java
public void invoke(Node root, Action result) throws IOException { doInvoke(0, root, root.isLink(), new ArrayList<>(includes), new ArrayList<>(excludes), result); }
[ "public", "void", "invoke", "(", "Node", "root", ",", "Action", "result", ")", "throws", "IOException", "{", "doInvoke", "(", "0", ",", "root", ",", "root", ".", "isLink", "(", ")", ",", "new", "ArrayList", "<>", "(", "includes", ")", ",", "new", "Ar...
Main methods of this class. @throws IOException as thrown by the specified FileTask
[ "Main", "methods", "of", "this", "class", "." ]
train
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/filter/Filter.java#L274-L276
google/closure-compiler
src/com/google/javascript/jscomp/InlineSimpleMethods.java
InlineSimpleMethods.replaceThis
private static void replaceThis(Node expectedGetprop, Node replacement) { """ Finds the occurrence of "this" in the provided property tree and replaces it with replacement """ Node leftChild = expectedGetprop.getFirstChild(); if (leftChild.isThis()) { expectedGetprop.replaceChild(leftChild, repl...
java
private static void replaceThis(Node expectedGetprop, Node replacement) { Node leftChild = expectedGetprop.getFirstChild(); if (leftChild.isThis()) { expectedGetprop.replaceChild(leftChild, replacement); } else { replaceThis(leftChild, replacement); } }
[ "private", "static", "void", "replaceThis", "(", "Node", "expectedGetprop", ",", "Node", "replacement", ")", "{", "Node", "leftChild", "=", "expectedGetprop", ".", "getFirstChild", "(", ")", ";", "if", "(", "leftChild", ".", "isThis", "(", ")", ")", "{", "...
Finds the occurrence of "this" in the provided property tree and replaces it with replacement
[ "Finds", "the", "occurrence", "of", "this", "in", "the", "provided", "property", "tree", "and", "replaces", "it", "with", "replacement" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/InlineSimpleMethods.java#L156-L163
craftercms/core
src/main/java/org/craftercms/core/util/UrlUtils.java
UrlUtils.getShortName
public static String getShortName(String longName, String containsShortNameRegex, int shortNameRegexGroup) { """ Returns the short name representation of a long name. @param longName @param containsShortNameRegex the regex that identifies whether the long name contains a short name. This regex should also con...
java
public static String getShortName(String longName, String containsShortNameRegex, int shortNameRegexGroup) { Pattern pattern = Pattern.compile(containsShortNameRegex); Matcher matcher = pattern.matcher(longName); if (matcher.matches()) { return matcher.group(shortNameRegexGroup); ...
[ "public", "static", "String", "getShortName", "(", "String", "longName", ",", "String", "containsShortNameRegex", ",", "int", "shortNameRegexGroup", ")", "{", "Pattern", "pattern", "=", "Pattern", ".", "compile", "(", "containsShortNameRegex", ")", ";", "Matcher", ...
Returns the short name representation of a long name. @param longName @param containsShortNameRegex the regex that identifies whether the long name contains a short name. This regex should also contain a group expression that can be use to capture for the short name (see the Pattern class javadoc). @param shortNameReg...
[ "Returns", "the", "short", "name", "representation", "of", "a", "long", "name", "." ]
train
https://github.com/craftercms/core/blob/d3ec74d669d3f8cfcf995177615d5f126edfa237/src/main/java/org/craftercms/core/util/UrlUtils.java#L48-L57
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.cart_cartId_item_itemId_requiredConfiguration_GET
public ArrayList<OvhConfigurationRequirements> cart_cartId_item_itemId_requiredConfiguration_GET(String cartId, Long itemId) throws IOException { """ Retrieve all required configuration item of the cart item REST: GET /order/cart/{cartId}/item/{itemId}/requiredConfiguration @param cartId [required] Cart identi...
java
public ArrayList<OvhConfigurationRequirements> cart_cartId_item_itemId_requiredConfiguration_GET(String cartId, Long itemId) throws IOException { String qPath = "/order/cart/{cartId}/item/{itemId}/requiredConfiguration"; StringBuilder sb = path(qPath, cartId, itemId); String resp = execN(qPath, "GET", sb.toString...
[ "public", "ArrayList", "<", "OvhConfigurationRequirements", ">", "cart_cartId_item_itemId_requiredConfiguration_GET", "(", "String", "cartId", ",", "Long", "itemId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/cart/{cartId}/item/{itemId}/requiredConfigu...
Retrieve all required configuration item of the cart item REST: GET /order/cart/{cartId}/item/{itemId}/requiredConfiguration @param cartId [required] Cart identifier @param itemId [required] Product item identifier
[ "Retrieve", "all", "required", "configuration", "item", "of", "the", "cart", "item" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L8116-L8121
OpenHFT/Chronicle-Map
src/main/java/net/openhft/chronicle/hash/impl/util/math/PoissonDistribution.java
PoissonDistribution.checkedCumulativeProbability
private static double checkedCumulativeProbability(double mean, long argument) { """ Computes the cumulative probability function and checks for {@code NaN} values returned. Throws {@code MathInternalError} if the value is {@code NaN}. Rethrows any exception encountered evaluating the cumulative probability fun...
java
private static double checkedCumulativeProbability(double mean, long argument) { double result = cumulativeProbability(mean, argument); if (Double.isNaN(result)) { throw new AssertionError("Discrete cumulative probability function returned NaN " + "for argument " + argume...
[ "private", "static", "double", "checkedCumulativeProbability", "(", "double", "mean", ",", "long", "argument", ")", "{", "double", "result", "=", "cumulativeProbability", "(", "mean", ",", "argument", ")", ";", "if", "(", "Double", ".", "isNaN", "(", "result",...
Computes the cumulative probability function and checks for {@code NaN} values returned. Throws {@code MathInternalError} if the value is {@code NaN}. Rethrows any exception encountered evaluating the cumulative probability function. Throws {@code MathInternalError} if the cumulative probability function returns {@code...
[ "Computes", "the", "cumulative", "probability", "function", "and", "checks", "for", "{", "@code", "NaN", "}", "values", "returned", ".", "Throws", "{", "@code", "MathInternalError", "}", "if", "the", "value", "is", "{", "@code", "NaN", "}", ".", "Rethrows", ...
train
https://github.com/OpenHFT/Chronicle-Map/blob/0b09733cc96302f96be4394a261699eeb021fe37/src/main/java/net/openhft/chronicle/hash/impl/util/math/PoissonDistribution.java#L153-L160
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/hc/HCHelper.java
HCHelper.iterateTreeNoCopy
public static void iterateTreeNoCopy (@Nonnull final IHCNode aNode, @Nonnull final IHCIteratorCallback aCallback) { """ Recursively iterate the node and all child nodes of the passed node. The difference to {@link #iterateChildrenNoCopy(IHCNode, IHCIteratorCallback)} is, that the callback is also invoked on the ...
java
public static void iterateTreeNoCopy (@Nonnull final IHCNode aNode, @Nonnull final IHCIteratorCallback aCallback) { ValueEnforcer.notNull (aNode, "node"); ValueEnforcer.notNull (aCallback, "callback"); // call callback on start node if (aCallback.call (null, aNode).isContinue ()) _recursiveIter...
[ "public", "static", "void", "iterateTreeNoCopy", "(", "@", "Nonnull", "final", "IHCNode", "aNode", ",", "@", "Nonnull", "final", "IHCIteratorCallback", "aCallback", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aNode", ",", "\"node\"", ")", ";", "ValueEnforce...
Recursively iterate the node and all child nodes of the passed node. The difference to {@link #iterateChildrenNoCopy(IHCNode, IHCIteratorCallback)} is, that the callback is also invoked on the passed node. @param aNode The node to be iterated. @param aCallback The callback to be invoked on every child
[ "Recursively", "iterate", "the", "node", "and", "all", "child", "nodes", "of", "the", "passed", "node", ".", "The", "difference", "to", "{", "@link", "#iterateChildrenNoCopy", "(", "IHCNode", "IHCIteratorCallback", ")", "}", "is", "that", "the", "callback", "i...
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/hc/HCHelper.java#L120-L128
ykrasik/jaci
jaci-libgdx-cli/src/main/java/com/github/ykrasik/jaci/cli/libgdx/output/LibGdxCliOutputBuffer.java
LibGdxCliOutputBuffer.println
public void println(String text, Color color) { """ Add a single line to this buffer. The line may contain a '\n' character, and it will be honored, but this is discouraged. @param text Line text. @param color Line color. """ final Label label = new Label(text, skin, "outputEntry"); label....
java
public void println(String text, Color color) { final Label label = new Label(text, skin, "outputEntry"); label.setColor(color); label.setWrap(true); addLabel(label); }
[ "public", "void", "println", "(", "String", "text", ",", "Color", "color", ")", "{", "final", "Label", "label", "=", "new", "Label", "(", "text", ",", "skin", ",", "\"outputEntry\"", ")", ";", "label", ".", "setColor", "(", "color", ")", ";", "label", ...
Add a single line to this buffer. The line may contain a '\n' character, and it will be honored, but this is discouraged. @param text Line text. @param color Line color.
[ "Add", "a", "single", "line", "to", "this", "buffer", ".", "The", "line", "may", "contain", "a", "\\", "n", "character", "and", "it", "will", "be", "honored", "but", "this", "is", "discouraged", "." ]
train
https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-libgdx-cli/src/main/java/com/github/ykrasik/jaci/cli/libgdx/output/LibGdxCliOutputBuffer.java#L81-L86
molgenis/molgenis
molgenis-data/src/main/java/org/molgenis/data/QueryUtils.java
QueryUtils.getQueryRuleAttribute
public static Attribute getQueryRuleAttribute(QueryRule queryRule, EntityType entityType) { """ Returns the attribute for a query rule field. @param queryRule query rule @param entityType entity type @return an attribute or {@code null} if the query rule field is {@code null} @throws UnknownAttributeExceptio...
java
public static Attribute getQueryRuleAttribute(QueryRule queryRule, EntityType entityType) { String queryRuleField = queryRule.getField(); if (queryRuleField == null) { return null; } Attribute attr = null; String[] queryRuleFieldTokens = StringUtils.split(queryRuleField, NESTED_ATTRIBUTE_SEPA...
[ "public", "static", "Attribute", "getQueryRuleAttribute", "(", "QueryRule", "queryRule", ",", "EntityType", "entityType", ")", "{", "String", "queryRuleField", "=", "queryRule", ".", "getField", "(", ")", ";", "if", "(", "queryRuleField", "==", "null", ")", "{",...
Returns the attribute for a query rule field. @param queryRule query rule @param entityType entity type @return an attribute or {@code null} if the query rule field is {@code null} @throws UnknownAttributeException if the query rule field does not refer to an attribute
[ "Returns", "the", "attribute", "for", "a", "query", "rule", "field", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data/src/main/java/org/molgenis/data/QueryUtils.java#L102-L122
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/types/Timecode.java
Timecode.getInstance
@Deprecated public static final Timecode getInstance(SampleCount samples, boolean dropFrame, boolean supportDays) { """ @param samples @param dropFrame @param supportDays @return @deprecated use method without supportDays (supportDays is now implicitly true) or dropFrame (drop frame timecode is not corre...
java
@Deprecated public static final Timecode getInstance(SampleCount samples, boolean dropFrame, boolean supportDays) { final Timecode timecode = getInstance(samples, dropFrame); if (!supportDays && timecode.getDaysPart() != 0) { throw new IllegalArgumentException("supportDays disabled but resulting timecode ha...
[ "@", "Deprecated", "public", "static", "final", "Timecode", "getInstance", "(", "SampleCount", "samples", ",", "boolean", "dropFrame", ",", "boolean", "supportDays", ")", "{", "final", "Timecode", "timecode", "=", "getInstance", "(", "samples", ",", "dropFrame", ...
@param samples @param dropFrame @param supportDays @return @deprecated use method without supportDays (supportDays is now implicitly true) or dropFrame (drop frame timecode is not correctly supported currently)
[ "@param", "samples", "@param", "dropFrame", "@param", "supportDays" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/types/Timecode.java#L769-L783
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.waitReplicas
@Override public Long waitReplicas(final int replicas, final long timeout) { """ Syncrhonous replication of Redis as described here: http://antirez.com/news/66 Since Java Object class has implemented "wait" method, we cannot use it, so I had to change the name of the method. Sorry :S """ checkIsInMulti...
java
@Override public Long waitReplicas(final int replicas, final long timeout) { checkIsInMultiOrPipeline(); client.waitReplicas(replicas, timeout); return client.getIntegerReply(); }
[ "@", "Override", "public", "Long", "waitReplicas", "(", "final", "int", "replicas", ",", "final", "long", "timeout", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "waitReplicas", "(", "replicas", ",", "timeout", ")", ";", "return", "cli...
Syncrhonous replication of Redis as described here: http://antirez.com/news/66 Since Java Object class has implemented "wait" method, we cannot use it, so I had to change the name of the method. Sorry :S
[ "Syncrhonous", "replication", "of", "Redis", "as", "described", "here", ":", "http", ":", "//", "antirez", ".", "com", "/", "news", "/", "66", "Since", "Java", "Object", "class", "has", "implemented", "wait", "method", "we", "cannot", "use", "it", "so", ...
train
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L3607-L3612
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmsessionpolicy.java
tmsessionpolicy.get
public static tmsessionpolicy get(nitro_service service, String name) throws Exception { """ Use this API to fetch tmsessionpolicy resource of given name . """ tmsessionpolicy obj = new tmsessionpolicy(); obj.set_name(name); tmsessionpolicy response = (tmsessionpolicy) obj.get_resource(service); return...
java
public static tmsessionpolicy get(nitro_service service, String name) throws Exception{ tmsessionpolicy obj = new tmsessionpolicy(); obj.set_name(name); tmsessionpolicy response = (tmsessionpolicy) obj.get_resource(service); return response; }
[ "public", "static", "tmsessionpolicy", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "tmsessionpolicy", "obj", "=", "new", "tmsessionpolicy", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "tms...
Use this API to fetch tmsessionpolicy resource of given name .
[ "Use", "this", "API", "to", "fetch", "tmsessionpolicy", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmsessionpolicy.java#L330-L335
apache/incubator-gobblin
gobblin-core-base/src/main/java/org/apache/gobblin/crypto/EncryptionFactory.java
EncryptionFactory.buildStreamCryptoProvider
@Synchronized public static StreamCodec buildStreamCryptoProvider(String algorithm, Map<String, Object> parameters) { """ Return a StreamEncryptor for the given algorithm and with appropriate parameters. @param algorithm Algorithm to build @param parameters Parameters for algorithm @return A StreamCodec for t...
java
@Synchronized public static StreamCodec buildStreamCryptoProvider(String algorithm, Map<String, Object> parameters) { for (EncryptionProvider provider : encryptionProviderLoader) { log.debug("Looking for algorithm {} in provider {}", algorithm, provider.getClass().getName()); StreamCodec codec = provi...
[ "@", "Synchronized", "public", "static", "StreamCodec", "buildStreamCryptoProvider", "(", "String", "algorithm", ",", "Map", "<", "String", ",", "Object", ">", "parameters", ")", "{", "for", "(", "EncryptionProvider", "provider", ":", "encryptionProviderLoader", ")"...
Return a StreamEncryptor for the given algorithm and with appropriate parameters. @param algorithm Algorithm to build @param parameters Parameters for algorithm @return A StreamCodec for that algorithm @throws IllegalArgumentException If the given algorithm/parameter pair cannot be built
[ "Return", "a", "StreamEncryptor", "for", "the", "given", "algorithm", "and", "with", "appropriate", "parameters", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core-base/src/main/java/org/apache/gobblin/crypto/EncryptionFactory.java#L61-L73
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/distort/brown/AddBrownNtoN_F64.java
AddBrownNtoN_F64.setDistortion
public AddBrownNtoN_F64 setDistortion( /**/double[] radial, /**/double t1, /**/double t2) { """ Specify intrinsic camera parameters @param radial Radial distortion parameters """ params = new RadialTangential_F64(radial,t1,t2); return this; }
java
public AddBrownNtoN_F64 setDistortion( /**/double[] radial, /**/double t1, /**/double t2) { params = new RadialTangential_F64(radial,t1,t2); return this; }
[ "public", "AddBrownNtoN_F64", "setDistortion", "(", "/**/", "double", "[", "]", "radial", ",", "/**/", "double", "t1", ",", "/**/", "double", "t2", ")", "{", "params", "=", "new", "RadialTangential_F64", "(", "radial", ",", "t1", ",", "t2", ")", ";", "re...
Specify intrinsic camera parameters @param radial Radial distortion parameters
[ "Specify", "intrinsic", "camera", "parameters" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/distort/brown/AddBrownNtoN_F64.java#L41-L44
grpc/grpc-java
stub/src/main/java/io/grpc/stub/ClientCalls.java
ClientCalls.cancelThrow
private static RuntimeException cancelThrow(ClientCall<?, ?> call, Throwable t) { """ Cancels a call, and throws the exception. @param t must be a RuntimeException or Error """ try { call.cancel(null, t); } catch (Throwable e) { assert e instanceof RuntimeException || e instanceof Error;...
java
private static RuntimeException cancelThrow(ClientCall<?, ?> call, Throwable t) { try { call.cancel(null, t); } catch (Throwable e) { assert e instanceof RuntimeException || e instanceof Error; logger.log(Level.SEVERE, "RuntimeException encountered while closing call", e); } if (t inst...
[ "private", "static", "RuntimeException", "cancelThrow", "(", "ClientCall", "<", "?", ",", "?", ">", "call", ",", "Throwable", "t", ")", "{", "try", "{", "call", ".", "cancel", "(", "null", ",", "t", ")", ";", "}", "catch", "(", "Throwable", "e", ")",...
Cancels a call, and throws the exception. @param t must be a RuntimeException or Error
[ "Cancels", "a", "call", "and", "throws", "the", "exception", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/stub/src/main/java/io/grpc/stub/ClientCalls.java#L247-L261
mgm-tp/jfunk
jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java
ConstraintFactory.putToCache
private void putToCache(final Element element, final Constraint object) { """ If the element has an attribute with name id this attribute's value will be used as key to store the just generated object in a map. The object can in this case also be retrieved using this id. @see #getModel(String) """ Stri...
java
private void putToCache(final Element element, final Constraint object) { String id = element.getAttributeValue(XMLTags.ID); if (id != null && id.length() > 0) { Constraint old = putToCache(id, object); if (old != null) { LOG.warn("The id=" + id + " for object of type=" + old.getClass().getName() ...
[ "private", "void", "putToCache", "(", "final", "Element", "element", ",", "final", "Constraint", "object", ")", "{", "String", "id", "=", "element", ".", "getAttributeValue", "(", "XMLTags", ".", "ID", ")", ";", "if", "(", "id", "!=", "null", "&&", "id",...
If the element has an attribute with name id this attribute's value will be used as key to store the just generated object in a map. The object can in this case also be retrieved using this id. @see #getModel(String)
[ "If", "the", "element", "has", "an", "attribute", "with", "name", "id", "this", "attribute", "s", "value", "will", "be", "used", "as", "key", "to", "store", "the", "just", "generated", "object", "in", "a", "map", ".", "The", "object", "can", "in", "thi...
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-data-generator/src/main/java/com/mgmtp/jfunk/data/generator/constraint/ConstraintFactory.java#L166-L175
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/BaseField.java
BaseField.handleFieldChanged
public int handleFieldChanged(boolean bDisplayOption, int iMoveMode) { """ A field changed, call the listener(s). Also, for screen moves, notify the record that this field changed it (FIELD_CHANGED_TYPE). @param bDisplayOption Display changed fields if true. @param iMoveMode The move mode. @return An error cod...
java
public int handleFieldChanged(boolean bDisplayOption, int iMoveMode) { int iErrorCode = DBConstants.NORMAL_RETURN; FieldListener nextListener = (FieldListener)this.getNextValidListener(iMoveMode); while (nextListener != null) { boolean bOldState = nextListener.setEnabledL...
[ "public", "int", "handleFieldChanged", "(", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "int", "iErrorCode", "=", "DBConstants", ".", "NORMAL_RETURN", ";", "FieldListener", "nextListener", "=", "(", "FieldListener", ")", "this", ".", "getNextVa...
A field changed, call the listener(s). Also, for screen moves, notify the record that this field changed it (FIELD_CHANGED_TYPE). @param bDisplayOption Display changed fields if true. @param iMoveMode The move mode. @return An error code (NORMAL if successful).
[ "A", "field", "changed", "call", "the", "listener", "(", "s", ")", ".", "Also", "for", "screen", "moves", "notify", "the", "record", "that", "this", "field", "changed", "it", "(", "FIELD_CHANGED_TYPE", ")", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BaseField.java#L906-L924
voldemort/voldemort
src/java/voldemort/client/rebalance/task/RebalanceTask.java
RebalanceTask.taskStart
protected void taskStart(int taskId, int rebalanceAsyncId) { """ Helper method to pretty print progress and timing info. @param rebalanceAsyncId ID of the async rebalancing task """ taskCompletionTimeMs = System.currentTimeMillis(); taskLog("[TaskId : " + taskId + " ] Starting rebalance of "...
java
protected void taskStart(int taskId, int rebalanceAsyncId) { taskCompletionTimeMs = System.currentTimeMillis(); taskLog("[TaskId : " + taskId + " ] Starting rebalance of " + partitionStoreCount + " partition-stores for async operation id " + rebalanceAsyncId + "."); progressBar.b...
[ "protected", "void", "taskStart", "(", "int", "taskId", ",", "int", "rebalanceAsyncId", ")", "{", "taskCompletionTimeMs", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "taskLog", "(", "\"[TaskId : \"", "+", "taskId", "+", "\" ] Starting rebalance of \"", ...
Helper method to pretty print progress and timing info. @param rebalanceAsyncId ID of the async rebalancing task
[ "Helper", "method", "to", "pretty", "print", "progress", "and", "timing", "info", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/client/rebalance/task/RebalanceTask.java#L146-L151
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/utils/BtcFormat.java
BtcFormat.getMicroInstance
public static BtcFormat getMicroInstance(int scale, int... groups) { """ Return a new microcoin-denominated formatter with the specified fractional decimal placing. The returned object will format and parse values according to the default locale, and will format the fractional part of numbers with the given min...
java
public static BtcFormat getMicroInstance(int scale, int... groups) { return getInstance(MICROCOIN_SCALE, defaultLocale(), scale, boxAsList(groups)); }
[ "public", "static", "BtcFormat", "getMicroInstance", "(", "int", "scale", ",", "int", "...", "groups", ")", "{", "return", "getInstance", "(", "MICROCOIN_SCALE", ",", "defaultLocale", "(", ")", ",", "scale", ",", "boxAsList", "(", "groups", ")", ")", ";", ...
Return a new microcoin-denominated formatter with the specified fractional decimal placing. The returned object will format and parse values according to the default locale, and will format the fractional part of numbers with the given minimum number of fractional decimal places. Optionally, repeating integer argumen...
[ "Return", "a", "new", "microcoin", "-", "denominated", "formatter", "with", "the", "specified", "fractional", "decimal", "placing", ".", "The", "returned", "object", "will", "format", "and", "parse", "values", "according", "to", "the", "default", "locale", "and"...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/utils/BtcFormat.java#L1036-L1038
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/container/impl/deployment/scanning/ProcessApplicationScanningUtil.java
ProcessApplicationScanningUtil.checkDiagram
protected static boolean checkDiagram(String fileName, String modelFileName, String[] diagramSuffixes, String[] modelSuffixes) { """ Checks, whether a filename is a diagram for the given modelFileName. @param fileName filename to check. @param modelFileName model file name. @param diagramSuffixes suffixes of ...
java
protected static boolean checkDiagram(String fileName, String modelFileName, String[] diagramSuffixes, String[] modelSuffixes) { for (String modelSuffix : modelSuffixes) { if (modelFileName.endsWith(modelSuffix)) { String caseFilePrefix = modelFileName.substring(0, modelFileName.length() - modelSuffix...
[ "protected", "static", "boolean", "checkDiagram", "(", "String", "fileName", ",", "String", "modelFileName", ",", "String", "[", "]", "diagramSuffixes", ",", "String", "[", "]", "modelSuffixes", ")", "{", "for", "(", "String", "modelSuffix", ":", "modelSuffixes"...
Checks, whether a filename is a diagram for the given modelFileName. @param fileName filename to check. @param modelFileName model file name. @param diagramSuffixes suffixes of the diagram files. @param modelSuffixes suffixes of model files. @return true, if a file is a diagram for the model.
[ "Checks", "whether", "a", "filename", "is", "a", "diagram", "for", "the", "given", "modelFileName", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/container/impl/deployment/scanning/ProcessApplicationScanningUtil.java#L115-L129
google/closure-compiler
src/com/google/javascript/jscomp/TypeValidator.java
TypeValidator.expectAnyObject
void expectAnyObject(Node n, JSType type, String msg) { """ Expect the type to contain an object sometimes. If the expectation is not met, issue a warning at the provided node's source code position. """ JSType anyObjectType = getNativeType(NO_OBJECT_TYPE); if (!anyObjectType.isSubtypeOf(type) && !typ...
java
void expectAnyObject(Node n, JSType type, String msg) { JSType anyObjectType = getNativeType(NO_OBJECT_TYPE); if (!anyObjectType.isSubtypeOf(type) && !type.isEmptyType()) { mismatch(n, msg, type, anyObjectType); } }
[ "void", "expectAnyObject", "(", "Node", "n", ",", "JSType", "type", ",", "String", "msg", ")", "{", "JSType", "anyObjectType", "=", "getNativeType", "(", "NO_OBJECT_TYPE", ")", ";", "if", "(", "!", "anyObjectType", ".", "isSubtypeOf", "(", "type", ")", "&&...
Expect the type to contain an object sometimes. If the expectation is not met, issue a warning at the provided node's source code position.
[ "Expect", "the", "type", "to", "contain", "an", "object", "sometimes", ".", "If", "the", "expectation", "is", "not", "met", "issue", "a", "warning", "at", "the", "provided", "node", "s", "source", "code", "position", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeValidator.java#L271-L276
apereo/cas
support/cas-server-support-saml-mdui-core/src/main/java/org/apereo/cas/support/saml/mdui/SamlMetadataUIInfo.java
SamlMetadataUIInfo.getLocalizedValues
private static String getLocalizedValues(final String locale, final List<?> items) { """ Gets localized values. @param locale browser preferred language @param items the items @return the string value """ val foundLocale = findLocale(StringUtils.defaultString(locale, "en"), items); if (fo...
java
private static String getLocalizedValues(final String locale, final List<?> items) { val foundLocale = findLocale(StringUtils.defaultString(locale, "en"), items); if (foundLocale.isPresent()) { return foundLocale.get(); } if (!items.isEmpty()) { val item = items....
[ "private", "static", "String", "getLocalizedValues", "(", "final", "String", "locale", ",", "final", "List", "<", "?", ">", "items", ")", "{", "val", "foundLocale", "=", "findLocale", "(", "StringUtils", ".", "defaultString", "(", "locale", ",", "\"en\"", ")...
Gets localized values. @param locale browser preferred language @param items the items @return the string value
[ "Gets", "localized", "values", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-mdui-core/src/main/java/org/apereo/cas/support/saml/mdui/SamlMetadataUIInfo.java#L211-L233
oaqa/uima-ecd
src/main/java/edu/cmu/lti/oaqa/ecd/phase/ProcessingStepUtils.java
ProcessingStepUtils.getExecutionIdHash
public static String getExecutionIdHash(String experimentId, Trace trace, String sequenceId) { """ Execution hash is computed from JCas currentExperimentId, trace and sequenceId @return MD5 hash corresponding to the above mentioned elements """ HashFunction hf = Hashing.md5(); Hasher hasher = hf.newHa...
java
public static String getExecutionIdHash(String experimentId, Trace trace, String sequenceId) { HashFunction hf = Hashing.md5(); Hasher hasher = hf.newHasher(); hasher.putString(experimentId,StandardCharsets.UTF_8); hasher.putString(trace.getTrace(),StandardCharsets.UTF_8); hasher.putString(String.va...
[ "public", "static", "String", "getExecutionIdHash", "(", "String", "experimentId", ",", "Trace", "trace", ",", "String", "sequenceId", ")", "{", "HashFunction", "hf", "=", "Hashing", ".", "md5", "(", ")", ";", "Hasher", "hasher", "=", "hf", ".", "newHasher",...
Execution hash is computed from JCas currentExperimentId, trace and sequenceId @return MD5 hash corresponding to the above mentioned elements
[ "Execution", "hash", "is", "computed", "from", "JCas", "currentExperimentId", "trace", "and", "sequenceId" ]
train
https://github.com/oaqa/uima-ecd/blob/09a0ae26647490b43affc36ab3a01100702b989f/src/main/java/edu/cmu/lti/oaqa/ecd/phase/ProcessingStepUtils.java#L120-L129
wdullaer/SwipeActionAdapter
library/src/main/java/com/wdullaer/swipeactionadapter/SwipeActionAdapter.java
SwipeActionAdapter.onPreAction
@Override public boolean onPreAction(ListView listView, int position, SwipeDirection direction) { """ SwipeActionTouchListener.ActionCallbacks callback We just link it through to our own interface @param listView The originating {@link ListView}. @param position The position to perform the action on, sort...
java
@Override public boolean onPreAction(ListView listView, int position, SwipeDirection direction){ return mSwipeActionListener != null && mSwipeActionListener.shouldDismiss(position, direction); }
[ "@", "Override", "public", "boolean", "onPreAction", "(", "ListView", "listView", ",", "int", "position", ",", "SwipeDirection", "direction", ")", "{", "return", "mSwipeActionListener", "!=", "null", "&&", "mSwipeActionListener", ".", "shouldDismiss", "(", "position...
SwipeActionTouchListener.ActionCallbacks callback We just link it through to our own interface @param listView The originating {@link ListView}. @param position The position to perform the action on, sorted in descending order for convenience. @param direction The type of swipe that triggered the action @return boole...
[ "SwipeActionTouchListener", ".", "ActionCallbacks", "callback", "We", "just", "link", "it", "through", "to", "our", "own", "interface" ]
train
https://github.com/wdullaer/SwipeActionAdapter/blob/24a7e2ed953ac11ea0d8875d375bba571ffeba55/library/src/main/java/com/wdullaer/swipeactionadapter/SwipeActionAdapter.java#L91-L94
foundation-runtime/monitoring
monitoring-jmx-lib/src/main/java/com/cisco/oss/foundation/monitoring/RMIRegistryManager.java
RMIRegistryManager.startRMIRegistry
public static boolean startRMIRegistry(Configuration configuration, int port) { """ Starts rmiregistry on the specified port. If property "service.monitor.inProcess" is set to true in configSchema.xml, then an in-process rmiregistry is started. Otherwise rmiregistry will be started in a seperate process. @pa...
java
public static boolean startRMIRegistry(Configuration configuration, int port) { if (isRMIRegistryRunning(configuration, port)) return true; if (configuration.getBoolean(FoundationMonitoringConstants.IN_PROC_RMI)) { return startInProcRMIRegistry(port); } else { ...
[ "public", "static", "boolean", "startRMIRegistry", "(", "Configuration", "configuration", ",", "int", "port", ")", "{", "if", "(", "isRMIRegistryRunning", "(", "configuration", ",", "port", ")", ")", "return", "true", ";", "if", "(", "configuration", ".", "get...
Starts rmiregistry on the specified port. If property "service.monitor.inProcess" is set to true in configSchema.xml, then an in-process rmiregistry is started. Otherwise rmiregistry will be started in a seperate process. @param port on which the rmiregistry needs to be started @return true if successful or it is alre...
[ "Starts", "rmiregistry", "on", "the", "specified", "port", ".", "If", "property", "service", ".", "monitor", ".", "inProcess", "is", "set", "to", "true", "in", "configSchema", ".", "xml", "then", "an", "in", "-", "process", "rmiregistry", "is", "started", ...
train
https://github.com/foundation-runtime/monitoring/blob/a85ec72dc5558f787704fb13d9125a5803403ee5/monitoring-jmx-lib/src/main/java/com/cisco/oss/foundation/monitoring/RMIRegistryManager.java#L94-L103
apereo/cas
support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/handler/support/X509CredentialsAuthenticationHandler.java
X509CredentialsAuthenticationHandler.isCritical
private static boolean isCritical(final X509Certificate certificate, final String extensionOid) { """ Checks if critical extension oids contain the extension oid. @param certificate the certificate @param extensionOid the extension oid @return true, if critical """ val criticalOids = certificate...
java
private static boolean isCritical(final X509Certificate certificate, final String extensionOid) { val criticalOids = certificate.getCriticalExtensionOIDs(); if (criticalOids == null || criticalOids.isEmpty()) { return false; } return criticalOids.contains(extensionOid); }
[ "private", "static", "boolean", "isCritical", "(", "final", "X509Certificate", "certificate", ",", "final", "String", "extensionOid", ")", "{", "val", "criticalOids", "=", "certificate", ".", "getCriticalExtensionOIDs", "(", ")", ";", "if", "(", "criticalOids", "=...
Checks if critical extension oids contain the extension oid. @param certificate the certificate @param extensionOid the extension oid @return true, if critical
[ "Checks", "if", "critical", "extension", "oids", "contain", "the", "extension", "oid", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/authentication/handler/support/X509CredentialsAuthenticationHandler.java#L148-L154
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java
SVGPath.quadTo
public SVGPath quadTo(double c1x, double c1y, double x, double y) { """ Quadratic Bezier line to the given coordinates. @param c1x first control point x @param c1y first control point y @param x new coordinates @param y new coordinates @return path object, for compact syntax. """ return append(PATH_...
java
public SVGPath quadTo(double c1x, double c1y, double x, double y) { return append(PATH_QUAD_TO).append(c1x).append(c1y).append(x).append(y); }
[ "public", "SVGPath", "quadTo", "(", "double", "c1x", ",", "double", "c1y", ",", "double", "x", ",", "double", "y", ")", "{", "return", "append", "(", "PATH_QUAD_TO", ")", ".", "append", "(", "c1x", ")", ".", "append", "(", "c1y", ")", ".", "append", ...
Quadratic Bezier line to the given coordinates. @param c1x first control point x @param c1y first control point y @param x new coordinates @param y new coordinates @return path object, for compact syntax.
[ "Quadratic", "Bezier", "line", "to", "the", "given", "coordinates", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java#L457-L459
HiddenStage/divide
Client/java-client/src/main/java/io/divide/client/auth/AuthManager.java
AuthManager.signUp
public SignUpResponse signUp(SignUpCredentials loginCreds) { """ Syncronously attempt to create user account @param loginCreds Credentials used to create account. @return Response of the operation """ logger.debug("signUp(" + loginCreds + ")"); try { setLoginState(LOGGING_IN); ...
java
public SignUpResponse signUp(SignUpCredentials loginCreds){ logger.debug("signUp(" + loginCreds + ")"); try { setLoginState(LOGGING_IN); PublicKey key = Crypto.pubKeyFromBytes(getWebService().getPublicKey()); loginCreds.encryptPassword(key); logger.debug...
[ "public", "SignUpResponse", "signUp", "(", "SignUpCredentials", "loginCreds", ")", "{", "logger", ".", "debug", "(", "\"signUp(\"", "+", "loginCreds", "+", "\")\"", ")", ";", "try", "{", "setLoginState", "(", "LOGGING_IN", ")", ";", "PublicKey", "key", "=", ...
Syncronously attempt to create user account @param loginCreds Credentials used to create account. @return Response of the operation
[ "Syncronously", "attempt", "to", "create", "user", "account" ]
train
https://github.com/HiddenStage/divide/blob/14e36598c50d92b4393e6649915e32b86141c598/Client/java-client/src/main/java/io/divide/client/auth/AuthManager.java#L237-L261
davetcc/tcMenu
tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/generator/arduino/ArduinoLibraryInstaller.java
ArduinoLibraryInstaller.copyLibraryRecursive
private void copyLibraryRecursive(Path input, Path output) throws IOException { """ Recursive copier for the above copy method. It calls recursively for subdirectories to ensure a full copy @param input the directory to copy from @param output the directory to copy to @throws IOException if the copy could not c...
java
private void copyLibraryRecursive(Path input, Path output) throws IOException { for (Path dirItem : Files.list(input).collect(Collectors.toList())) { Path outputName = output.resolve(dirItem.getFileName()); if (Files.isDirectory(dirItem)) { if(!Files.exists(outputName)) F...
[ "private", "void", "copyLibraryRecursive", "(", "Path", "input", ",", "Path", "output", ")", "throws", "IOException", "{", "for", "(", "Path", "dirItem", ":", "Files", ".", "list", "(", "input", ")", ".", "collect", "(", "Collectors", ".", "toList", "(", ...
Recursive copier for the above copy method. It calls recursively for subdirectories to ensure a full copy @param input the directory to copy from @param output the directory to copy to @throws IOException if the copy could not complete.
[ "Recursive", "copier", "for", "the", "above", "copy", "method", ".", "It", "calls", "recursively", "for", "subdirectories", "to", "ensure", "a", "full", "copy" ]
train
https://github.com/davetcc/tcMenu/blob/61546e4b982b25ceaff384073fe9ec1fff55e64a/tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/generator/arduino/ArduinoLibraryInstaller.java#L256-L266
WASdev/tool.accelerate.core
liberty-starter-application/src/main/java/com/ibm/liberty/starter/GitHubConnector.java
GitHubConnector.createGitRepository
public File createGitRepository(String repositoryName) throws IOException { """ Creates a repository on GitHub and in a local temporary directory. This is a one time operation as once it is created on GitHub and locally it cannot be recreated. """ RepositoryService service = new RepositoryService(); ...
java
public File createGitRepository(String repositoryName) throws IOException { RepositoryService service = new RepositoryService(); service.getClient().setOAuth2Token(oAuthToken); Repository repository = new Repository(); repository.setName(repositoryName); repository = service.crea...
[ "public", "File", "createGitRepository", "(", "String", "repositoryName", ")", "throws", "IOException", "{", "RepositoryService", "service", "=", "new", "RepositoryService", "(", ")", ";", "service", ".", "getClient", "(", ")", ".", "setOAuth2Token", "(", "oAuthTo...
Creates a repository on GitHub and in a local temporary directory. This is a one time operation as once it is created on GitHub and locally it cannot be recreated.
[ "Creates", "a", "repository", "on", "GitHub", "and", "in", "a", "local", "temporary", "directory", ".", "This", "is", "a", "one", "time", "operation", "as", "once", "it", "is", "created", "on", "GitHub", "and", "locally", "it", "cannot", "be", "recreated",...
train
https://github.com/WASdev/tool.accelerate.core/blob/6511da654a69a25a76573eb76eefff349d9c4d80/liberty-starter-application/src/main/java/com/ibm/liberty/starter/GitHubConnector.java#L52-L70
imsweb/naaccr-xml
src/main/java/com/imsweb/naaccrxml/runtime/NaaccrStreamConfiguration.java
NaaccrStreamConfiguration.registerAttribute
public void registerAttribute(String namespacePrefix, String attributeName, Class<?> clazz, String fieldName, Class<?> fieldClass) { """ Registers an attribute corresponding to a specific field of a specific class, in a given namespace. @param namespacePrefix namespace prefix, required @param attributeName attri...
java
public void registerAttribute(String namespacePrefix, String attributeName, Class<?> clazz, String fieldName, Class<?> fieldClass) { if (!_namespaces.containsKey(namespacePrefix)) throw new RuntimeException("Namespace prefix '" + namespacePrefix + "' has not been registered yet"); _xstream.a...
[ "public", "void", "registerAttribute", "(", "String", "namespacePrefix", ",", "String", "attributeName", ",", "Class", "<", "?", ">", "clazz", ",", "String", "fieldName", ",", "Class", "<", "?", ">", "fieldClass", ")", "{", "if", "(", "!", "_namespaces", "...
Registers an attribute corresponding to a specific field of a specific class, in a given namespace. @param namespacePrefix namespace prefix, required @param attributeName attribute name, required @param clazz class containing the field, required @param fieldName field name, required @param fieldClass field type, requir...
[ "Registers", "an", "attribute", "corresponding", "to", "a", "specific", "field", "of", "a", "specific", "class", "in", "a", "given", "namespace", "." ]
train
https://github.com/imsweb/naaccr-xml/blob/a3a501faa2a0c3411dd5248b2c1379f279131696/src/main/java/com/imsweb/naaccrxml/runtime/NaaccrStreamConfiguration.java#L288-L293
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-pkix/src/main/java/org/xwiki/crypto/pkix/internal/extension/AbstractBcX509ExtensionBuilder.java
AbstractBcX509ExtensionBuilder.addExtension
public X509ExtensionBuilder addExtension(ASN1ObjectIdentifier oid, boolean critical, ASN1Encodable value) { """ Add an extension. @param oid the extension oid. @param critical true if the extension is critical. @param value the value of the extension. @return this extensions builder to allow chaining. ""...
java
public X509ExtensionBuilder addExtension(ASN1ObjectIdentifier oid, boolean critical, ASN1Encodable value) { try { this.extensions.addExtension(oid, critical, value.toASN1Primitive().getEncoded(ASN1Encoding.DER)); } catch (IOException e) { // Very unlikely throw ne...
[ "public", "X509ExtensionBuilder", "addExtension", "(", "ASN1ObjectIdentifier", "oid", ",", "boolean", "critical", ",", "ASN1Encodable", "value", ")", "{", "try", "{", "this", ".", "extensions", ".", "addExtension", "(", "oid", ",", "critical", ",", "value", ".",...
Add an extension. @param oid the extension oid. @param critical true if the extension is critical. @param value the value of the extension. @return this extensions builder to allow chaining.
[ "Add", "an", "extension", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-pkix/src/main/java/org/xwiki/crypto/pkix/internal/extension/AbstractBcX509ExtensionBuilder.java#L86-L95
buschmais/jqa-rdbms-plugin
src/main/java/com/buschmais/jqassistant/plugin/rdbms/impl/scanner/AbstractSchemaScannerPlugin.java
AbstractSchemaScannerPlugin.createSequences
private void createSequences(Collection<Sequence> sequences, SchemaDescriptor schemaDescriptor, Store store) { """ Add the sequences of a schema to the schema descriptor. @param sequences The sequences. @param schemaDescriptor The schema descriptor. @param store The store. """ fo...
java
private void createSequences(Collection<Sequence> sequences, SchemaDescriptor schemaDescriptor, Store store) { for (Sequence sequence : sequences) { SequenceDesriptor sequenceDesriptor = store.create(SequenceDesriptor.class); sequenceDesriptor.setName(sequence.getName()); seq...
[ "private", "void", "createSequences", "(", "Collection", "<", "Sequence", ">", "sequences", ",", "SchemaDescriptor", "schemaDescriptor", ",", "Store", "store", ")", "{", "for", "(", "Sequence", "sequence", ":", "sequences", ")", "{", "SequenceDesriptor", "sequence...
Add the sequences of a schema to the schema descriptor. @param sequences The sequences. @param schemaDescriptor The schema descriptor. @param store The store.
[ "Add", "the", "sequences", "of", "a", "schema", "to", "the", "schema", "descriptor", "." ]
train
https://github.com/buschmais/jqa-rdbms-plugin/blob/96c3919907deee00175cf5ab005867d76e01ba62/src/main/java/com/buschmais/jqassistant/plugin/rdbms/impl/scanner/AbstractSchemaScannerPlugin.java#L317-L327
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WListExample.java
WListExample.preparePaintComponent
@Override public void preparePaintComponent(final Request request) { """ Override preparePaintComponent to perform initialisation the first time through. @param request the request being responded to. """ if (!isInitialised()) { List<SimpleTableBean> items = new ArrayList<>(); items.add(new SimpleT...
java
@Override public void preparePaintComponent(final Request request) { if (!isInitialised()) { List<SimpleTableBean> items = new ArrayList<>(); items.add(new SimpleTableBean("A", "none", "thing")); items.add(new SimpleTableBean("B", "some", "thing2")); items.add(new SimpleTableBean("C", "little", "thing3")...
[ "@", "Override", "public", "void", "preparePaintComponent", "(", "final", "Request", "request", ")", "{", "if", "(", "!", "isInitialised", "(", ")", ")", "{", "List", "<", "SimpleTableBean", ">", "items", "=", "new", "ArrayList", "<>", "(", ")", ";", "it...
Override preparePaintComponent to perform initialisation the first time through. @param request the request being responded to.
[ "Override", "preparePaintComponent", "to", "perform", "initialisation", "the", "first", "time", "through", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WListExample.java#L107-L122
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ProcedureExtensions.java
ProcedureExtensions.curry
@Pure public static <P1> Procedure0 curry(final Procedure1<? super P1> procedure, final P1 argument) { """ Curries a procedure that takes one argument. @param procedure the original procedure. May not be <code>null</code>. @param argument the fixed argument. @return a procedure that takes no arguments. Nev...
java
@Pure public static <P1> Procedure0 curry(final Procedure1<? super P1> procedure, final P1 argument) { if (procedure == null) throw new NullPointerException("procedure"); return new Procedure0() { @Override public void apply() { procedure.apply(argument); } }; }
[ "@", "Pure", "public", "static", "<", "P1", ">", "Procedure0", "curry", "(", "final", "Procedure1", "<", "?", "super", "P1", ">", "procedure", ",", "final", "P1", "argument", ")", "{", "if", "(", "procedure", "==", "null", ")", "throw", "new", "NullPoi...
Curries a procedure that takes one argument. @param procedure the original procedure. May not be <code>null</code>. @param argument the fixed argument. @return a procedure that takes no arguments. Never <code>null</code>.
[ "Curries", "a", "procedure", "that", "takes", "one", "argument", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/ProcedureExtensions.java#L37-L47
alkacon/opencms-core
src/org/opencms/ade/containerpage/CmsDetailOnlyContainerUtil.java
CmsDetailOnlyContainerUtil.getDetailOnlyPageNameWithoutLocaleCheck
static String getDetailOnlyPageNameWithoutLocaleCheck(String detailContentSitePath, String contentLocale) { """ Returns the site path to the detail only container page.<p> This does not perform any further checks regarding the locale and assumes that all these checks have been done before. @param detailConte...
java
static String getDetailOnlyPageNameWithoutLocaleCheck(String detailContentSitePath, String contentLocale) { String result = CmsResource.getFolderPath(detailContentSitePath); if (contentLocale != null) { result = CmsStringUtil.joinPaths( result, DETAIL_CONTAIN...
[ "static", "String", "getDetailOnlyPageNameWithoutLocaleCheck", "(", "String", "detailContentSitePath", ",", "String", "contentLocale", ")", "{", "String", "result", "=", "CmsResource", ".", "getFolderPath", "(", "detailContentSitePath", ")", ";", "if", "(", "contentLoca...
Returns the site path to the detail only container page.<p> This does not perform any further checks regarding the locale and assumes that all these checks have been done before. @param detailContentSitePath the detail content site path @param contentLocale the content locale @return the site path to the detail only...
[ "Returns", "the", "site", "path", "to", "the", "detail", "only", "container", "page", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/CmsDetailOnlyContainerUtil.java#L466-L482
hawkular/hawkular-agent
hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/CoreJBossASClient.java
CoreJBossASClient.setSystemProperty
public void setSystemProperty(String name, String value) throws Exception { """ Set a runtime system property in the JVM that is managed by JBossAS. @param name system property name to set @param value the new value of the system property @throws Exception any error """ final ModelNode request = c...
java
public void setSystemProperty(String name, String value) throws Exception { final ModelNode request = createRequest(ADD, Address.root().add(SYSTEM_PROPERTY, name)); request.get(VALUE).set(value); final ModelNode response = execute(request); if (!isSuccess(response)) { throw n...
[ "public", "void", "setSystemProperty", "(", "String", "name", ",", "String", "value", ")", "throws", "Exception", "{", "final", "ModelNode", "request", "=", "createRequest", "(", "ADD", ",", "Address", ".", "root", "(", ")", ".", "add", "(", "SYSTEM_PROPERTY...
Set a runtime system property in the JVM that is managed by JBossAS. @param name system property name to set @param value the new value of the system property @throws Exception any error
[ "Set", "a", "runtime", "system", "property", "in", "the", "JVM", "that", "is", "managed", "by", "JBossAS", "." ]
train
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/CoreJBossASClient.java#L276-L283
sporniket/core
sporniket-core-lang/src/main/java/com/sporniket/libre/lang/CollectionTools.java
CollectionTools.getObject
public static Object getObject(final Map<String, Object> source, final String key, final Object defaultValue) { """ Return an object from a Map. @param source Map from which extract the value @param key The key to retrieve the value @param defaultValue When the wanted value doesn't exist, return this one ...
java
public static Object getObject(final Map<String, Object> source, final String key, final Object defaultValue) { try { return source.get(key); } catch (Exception _exception) { return defaultValue; } }
[ "public", "static", "Object", "getObject", "(", "final", "Map", "<", "String", ",", "Object", ">", "source", ",", "final", "String", "key", ",", "final", "Object", "defaultValue", ")", "{", "try", "{", "return", "source", ".", "get", "(", "key", ")", "...
Return an object from a Map. @param source Map from which extract the value @param key The key to retrieve the value @param defaultValue When the wanted value doesn't exist, return this one @return The wanted object or defaulValue
[ "Return", "an", "object", "from", "a", "Map", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-lang/src/main/java/com/sporniket/libre/lang/CollectionTools.java#L77-L87
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/UiLifecycleHelper.java
UiLifecycleHelper.onActivityResult
public void onActivityResult(int requestCode, int resultCode, Intent data) { """ To be called from an Activity or Fragment's onActivityResult method. @param requestCode the request code @param resultCode the result code @param data the result data """ onActivityResult(requestCode, resultCode, data...
java
public void onActivityResult(int requestCode, int resultCode, Intent data) { onActivityResult(requestCode, resultCode, data, null); }
[ "public", "void", "onActivityResult", "(", "int", "requestCode", ",", "int", "resultCode", ",", "Intent", "data", ")", "{", "onActivityResult", "(", "requestCode", ",", "resultCode", ",", "data", ",", "null", ")", ";", "}" ]
To be called from an Activity or Fragment's onActivityResult method. @param requestCode the request code @param resultCode the result code @param data the result data
[ "To", "be", "called", "from", "an", "Activity", "or", "Fragment", "s", "onActivityResult", "method", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/UiLifecycleHelper.java#L132-L134
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/spi/impl/eventservice/impl/EventServiceImpl.java
EventServiceImpl.accept
@Override public void accept(Packet packet) { """ {@inheritDoc} Handles an asynchronous remote event with a {@link RemoteEventProcessor}. The processor may determine the thread which will handle the event. If the execution is rejected, the rejection count is increased and a failure is logged. The event proc...
java
@Override public void accept(Packet packet) { try { eventExecutor.execute(new RemoteEventProcessor(this, packet)); } catch (RejectedExecutionException e) { rejectedCount.inc(); if (eventExecutor.isLive()) { Connection conn = packet.getConn(); ...
[ "@", "Override", "public", "void", "accept", "(", "Packet", "packet", ")", "{", "try", "{", "eventExecutor", ".", "execute", "(", "new", "RemoteEventProcessor", "(", "this", ",", "packet", ")", ")", ";", "}", "catch", "(", "RejectedExecutionException", "e", ...
{@inheritDoc} Handles an asynchronous remote event with a {@link RemoteEventProcessor}. The processor may determine the thread which will handle the event. If the execution is rejected, the rejection count is increased and a failure is logged. The event processing is not retried. @param packet the response packet to h...
[ "{", "@inheritDoc", "}", "Handles", "an", "asynchronous", "remote", "event", "with", "a", "{", "@link", "RemoteEventProcessor", "}", ".", "The", "processor", "may", "determine", "the", "thread", "which", "will", "handle", "the", "event", ".", "If", "the", "e...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/eventservice/impl/EventServiceImpl.java#L592-L605
MenoData/Time4J
base/src/main/java/net/time4j/range/IsoInterval.java
IsoInterval.get
public final <R> R get(ChronoFunction<ChronoInterval<T>, R> function) { """ /*[deutsch] <p>L&auml;&szlig;t die angegebene Abfrage dieses Intervall auswerten. </p> @param <R> generic type of result of query @param function interval query @return result of query or {@code null} if undefined @throws n...
java
public final <R> R get(ChronoFunction<ChronoInterval<T>, R> function) { return function.apply(this); }
[ "public", "final", "<", "R", ">", "R", "get", "(", "ChronoFunction", "<", "ChronoInterval", "<", "T", ">", ",", "R", ">", "function", ")", "{", "return", "function", ".", "apply", "(", "this", ")", ";", "}" ]
/*[deutsch] <p>L&auml;&szlig;t die angegebene Abfrage dieses Intervall auswerten. </p> @param <R> generic type of result of query @param function interval query @return result of query or {@code null} if undefined @throws net.time4j.engine.ChronoException if the given query is not executable @see HolidayM...
[ "/", "*", "[", "deutsch", "]", "<p", ">", "L&auml", ";", "&szlig", ";", "t", "die", "angegebene", "Abfrage", "dieses", "Intervall", "auswerten", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/IsoInterval.java#L155-L159
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.withCloseable
@Deprecated public static <T> T withCloseable(Closeable self, @ClosureParams(value = SimpleType.class, options = "java.io.Closeable") Closure<T> action) throws IOException { """ #deprecated use the variant in IOGroovyMethods @see org.codehaus.groovy.runtime.IOGroovyMethods#withCloseable(java.io.Closeable, g...
java
@Deprecated public static <T> T withCloseable(Closeable self, @ClosureParams(value = SimpleType.class, options = "java.io.Closeable") Closure<T> action) throws IOException { return IOGroovyMethods.withCloseable(self, action); }
[ "@", "Deprecated", "public", "static", "<", "T", ">", "T", "withCloseable", "(", "Closeable", "self", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.io.Closeable\"", ")", "Closure", "<", "T", ">", "ac...
#deprecated use the variant in IOGroovyMethods @see org.codehaus.groovy.runtime.IOGroovyMethods#withCloseable(java.io.Closeable, groovy.lang.Closure) @since 2.3.0
[ "#deprecated", "use", "the", "variant", "in", "IOGroovyMethods" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L1919-L1922
google/error-prone-javac
src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java
AbstractElementVisitor6.visitUnknown
@Override public R visitUnknown(Element e, P p) { """ {@inheritDoc} @implSpec The default implementation of this method in {@code AbstractElementVisitor6} will always throw {@code new UnknownElementException(e, p)}. This behavior is not required of a subclass. @param e {@inheritDoc} @param p {@inheri...
java
@Override public R visitUnknown(Element e, P p) { throw new UnknownElementException(e, p); }
[ "@", "Override", "public", "R", "visitUnknown", "(", "Element", "e", ",", "P", "p", ")", "{", "throw", "new", "UnknownElementException", "(", "e", ",", "p", ")", ";", "}" ]
{@inheritDoc} @implSpec The default implementation of this method in {@code AbstractElementVisitor6} will always throw {@code new UnknownElementException(e, p)}. This behavior is not required of a subclass. @param e {@inheritDoc} @param p {@inheritDoc} @return a visitor-specified result @throws UnknownElementExceptio...
[ "{", "@inheritDoc", "}" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java#L123-L126
strator-dev/greenpepper
greenpepper-open/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/macros/AbstractGreenPepperMacro.java
AbstractGreenPepperMacro.getPage
protected Page getPage(Map<String,String> parameters, RenderContext renderContext, String spaceKey) throws GreenPepperServerException { """ <p>getPage.</p> @param parameters a {@link java.util.Map} object. @param renderContext a {@link com.atlassian.renderer.RenderContext} object. @param spaceKey a {@link jav...
java
protected Page getPage(Map<String,String> parameters, RenderContext renderContext, String spaceKey) throws GreenPepperServerException { String pageTitle = parameters.get("pageTitle"); if(StringUtil.isEmpty(pageTitle)) { ContentEntityObject owner = ((PageContext)renderContext).get...
[ "protected", "Page", "getPage", "(", "Map", "<", "String", ",", "String", ">", "parameters", ",", "RenderContext", "renderContext", ",", "String", "spaceKey", ")", "throws", "GreenPepperServerException", "{", "String", "pageTitle", "=", "parameters", ".", "get", ...
<p>getPage.</p> @param parameters a {@link java.util.Map} object. @param renderContext a {@link com.atlassian.renderer.RenderContext} object. @param spaceKey a {@link java.lang.String} object. @return a {@link com.atlassian.confluence.pages.Page} object. @throws com.greenpepper.server.GreenPepperServerException if any...
[ "<p", ">", "getPage", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper-open/confluence/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/macros/AbstractGreenPepperMacro.java#L192-L206
alkacon/opencms-core
src/org/opencms/search/galleries/CmsGallerySearch.java
CmsGallerySearch.searchByPath
public static CmsGallerySearchResult searchByPath(CmsObject cms, String rootPath, Locale locale) throws CmsException { """ Searches by structure id.<p> @param cms the OpenCms context to use for the search @param rootPath the resource root path @param locale the locale for which the search result should be...
java
public static CmsGallerySearchResult searchByPath(CmsObject cms, String rootPath, Locale locale) throws CmsException { CmsGallerySearch gallerySearch = new CmsGallerySearch(); gallerySearch.init(cms); gallerySearch.setIndexForProject(cms); return gallerySearch.searchByPath(rootPath,...
[ "public", "static", "CmsGallerySearchResult", "searchByPath", "(", "CmsObject", "cms", ",", "String", "rootPath", ",", "Locale", "locale", ")", "throws", "CmsException", "{", "CmsGallerySearch", "gallerySearch", "=", "new", "CmsGallerySearch", "(", ")", ";", "galler...
Searches by structure id.<p> @param cms the OpenCms context to use for the search @param rootPath the resource root path @param locale the locale for which the search result should be returned @return the search result @throws CmsException if something goes wrong
[ "Searches", "by", "structure", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/galleries/CmsGallerySearch.java#L92-L99
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Mail.java
Mail.setBcc
public void setBcc(Object bcc) throws ApplicationException { """ set the value bcc Indicates addresses to copy the e-mail message to, without listing them in the message header. "bcc" stands for "blind carbon copy." @param strBcc value to set @throws ApplicationException """ if (StringUtil.isEmpty(bcc)) ...
java
public void setBcc(Object bcc) throws ApplicationException { if (StringUtil.isEmpty(bcc)) return; try { smtp.addBCC(bcc); } catch (Exception e) { throw new ApplicationException("attribute [bcc] of the tag [mail] is invalid", e.getMessage()); } }
[ "public", "void", "setBcc", "(", "Object", "bcc", ")", "throws", "ApplicationException", "{", "if", "(", "StringUtil", ".", "isEmpty", "(", "bcc", ")", ")", "return", ";", "try", "{", "smtp", ".", "addBCC", "(", "bcc", ")", ";", "}", "catch", "(", "E...
set the value bcc Indicates addresses to copy the e-mail message to, without listing them in the message header. "bcc" stands for "blind carbon copy." @param strBcc value to set @throws ApplicationException
[ "set", "the", "value", "bcc", "Indicates", "addresses", "to", "copy", "the", "e", "-", "mail", "message", "to", "without", "listing", "them", "in", "the", "message", "header", ".", "bcc", "stands", "for", "blind", "carbon", "copy", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Mail.java#L235-L243
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteProgram.java
SQLiteProgram.bindString
public void bindString(int index, String value) { """ Bind a String value to this statement. The value remains bound until {@link #clearBindings} is called. @param index The 1-based index to the parameter to bind @param value The value to bind, must not be null """ if (value == null) { ...
java
public void bindString(int index, String value) { if (value == null) { throw new IllegalArgumentException("the bind value at index " + index + " is null"); } bind(index, value); }
[ "public", "void", "bindString", "(", "int", "index", ",", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"the bind value at index \"", "+", "index", "+", "\" is null\"", ")", ";", "...
Bind a String value to this statement. The value remains bound until {@link #clearBindings} is called. @param index The 1-based index to the parameter to bind @param value The value to bind, must not be null
[ "Bind", "a", "String", "value", "to", "this", "statement", ".", "The", "value", "remains", "bound", "until", "{", "@link", "#clearBindings", "}", "is", "called", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteProgram.java#L166-L171
softindex/datakernel
core-serializer/src/main/java/io/datakernel/serializer/SerializerBuilder.java
SerializerBuilder.buildBufferSerializer
private <T> BinarySerializer<T> buildBufferSerializer(SerializerGen serializerGen) { """ Constructs buffer serializer for type, described by the given {@code SerializerGen}. @param serializerGen {@code SerializerGen} that describes the type that is to serialize @return buffer serializer for the given {@code Se...
java
private <T> BinarySerializer<T> buildBufferSerializer(SerializerGen serializerGen) { return buildBufferSerializer(serializerGen, Integer.MAX_VALUE); }
[ "private", "<", "T", ">", "BinarySerializer", "<", "T", ">", "buildBufferSerializer", "(", "SerializerGen", "serializerGen", ")", "{", "return", "buildBufferSerializer", "(", "serializerGen", ",", "Integer", ".", "MAX_VALUE", ")", ";", "}" ]
Constructs buffer serializer for type, described by the given {@code SerializerGen}. @param serializerGen {@code SerializerGen} that describes the type that is to serialize @return buffer serializer for the given {@code SerializerGen}
[ "Constructs", "buffer", "serializer", "for", "type", "described", "by", "the", "given", "{", "@code", "SerializerGen", "}", "." ]
train
https://github.com/softindex/datakernel/blob/090ca1116416c14d463d49d275cb1daaafa69c56/core-serializer/src/main/java/io/datakernel/serializer/SerializerBuilder.java#L755-L757
neoremind/navi
navi/src/main/java/com/baidu/beidou/navi/util/SystemPropertiesUtils.java
SystemPropertiesUtils.getSystemProperty
public static String getSystemProperty(String dKey, String shellKey, String defautValue) { """ Get system property @param dKey -D parameter @param shellKey shell defined system environment property @param defautValue @return system property """ String value = System.getProperty(dKey); ...
java
public static String getSystemProperty(String dKey, String shellKey, String defautValue) { String value = System.getProperty(dKey); if (value == null || value.length() == 0) { value = System.getenv(shellKey); if (value == null || value.length() == 0) { value ...
[ "public", "static", "String", "getSystemProperty", "(", "String", "dKey", ",", "String", "shellKey", ",", "String", "defautValue", ")", "{", "String", "value", "=", "System", ".", "getProperty", "(", "dKey", ")", ";", "if", "(", "value", "==", "null", "||"...
Get system property @param dKey -D parameter @param shellKey shell defined system environment property @param defautValue @return system property
[ "Get", "system", "property" ]
train
https://github.com/neoremind/navi/blob/d37e4b46ef07d124be2740ad3d85d87e939acc84/navi/src/main/java/com/baidu/beidou/navi/util/SystemPropertiesUtils.java#L32-L41
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/TileEntityUtils.java
TileEntityUtils.linkTileEntityToGui
@SideOnly(Side.CLIENT) public static void linkTileEntityToGui(TileEntity te, MalisisGui gui) { """ Links the {@link TileEntity} to the {@link MalisisGui}.<br> Allows the TileEntity to notify the MalisisGui of updates. @param te the TileEntity @param gui the MalisisGui """ currentTileEntity = te; curr...
java
@SideOnly(Side.CLIENT) public static void linkTileEntityToGui(TileEntity te, MalisisGui gui) { currentTileEntity = te; currenGui = gui; currenGui.updateGui(); }
[ "@", "SideOnly", "(", "Side", ".", "CLIENT", ")", "public", "static", "void", "linkTileEntityToGui", "(", "TileEntity", "te", ",", "MalisisGui", "gui", ")", "{", "currentTileEntity", "=", "te", ";", "currenGui", "=", "gui", ";", "currenGui", ".", "updateGui"...
Links the {@link TileEntity} to the {@link MalisisGui}.<br> Allows the TileEntity to notify the MalisisGui of updates. @param te the TileEntity @param gui the MalisisGui
[ "Links", "the", "{", "@link", "TileEntity", "}", "to", "the", "{", "@link", "MalisisGui", "}", ".", "<br", ">", "Allows", "the", "TileEntity", "to", "notify", "the", "MalisisGui", "of", "updates", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/TileEntityUtils.java#L77-L83
blinkfox/zealot
src/main/java/com/blinkfox/zealot/core/ZealotKhala.java
ZealotKhala.andIn
public ZealotKhala andIn(String field, Collection<?> values) { """ 生成带" AND "前缀的in范围查询的SQL片段. @param field 数据库字段 @param values 集合的值 @return ZealotKhala实例 """ return this.doIn(ZealotConst.AND_PREFIX, field, values, true, true); }
java
public ZealotKhala andIn(String field, Collection<?> values) { return this.doIn(ZealotConst.AND_PREFIX, field, values, true, true); }
[ "public", "ZealotKhala", "andIn", "(", "String", "field", ",", "Collection", "<", "?", ">", "values", ")", "{", "return", "this", ".", "doIn", "(", "ZealotConst", ".", "AND_PREFIX", ",", "field", ",", "values", ",", "true", ",", "true", ")", ";", "}" ]
生成带" AND "前缀的in范围查询的SQL片段. @param field 数据库字段 @param values 集合的值 @return ZealotKhala实例
[ "生成带", "AND", "前缀的in范围查询的SQL片段", "." ]
train
https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/core/ZealotKhala.java#L1326-L1328
geomajas/geomajas-project-server
plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/impl/PrintComponentImpl.java
PrintComponentImpl.calculateSize
public void calculateSize(PdfContext context) { """ Calculates the size based constraint width and height if present, otherwise from children sizes. """ float width = 0; float height = 0; for (PrintComponent<?> child : children) { child.calculateSize(context); float cw = child.getBounds().getWidth(...
java
public void calculateSize(PdfContext context) { float width = 0; float height = 0; for (PrintComponent<?> child : children) { child.calculateSize(context); float cw = child.getBounds().getWidth() + 2 * child.getConstraint().getMarginX(); float ch = child.getBounds().getHeight() + 2 * child.getConstraint(...
[ "public", "void", "calculateSize", "(", "PdfContext", "context", ")", "{", "float", "width", "=", "0", ";", "float", "height", "=", "0", ";", "for", "(", "PrintComponent", "<", "?", ">", "child", ":", "children", ")", "{", "child", ".", "calculateSize", ...
Calculates the size based constraint width and height if present, otherwise from children sizes.
[ "Calculates", "the", "size", "based", "constraint", "width", "and", "height", "if", "present", "otherwise", "from", "children", "sizes", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/print/print/src/main/java/org/geomajas/plugin/printing/component/impl/PrintComponentImpl.java#L139-L170
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/Widgets.java
Widgets.newTextArea
public static LimitedTextArea newTextArea (String text, int width, int height, int maxLength) { """ Creates a limited text area with all of the configuration that you're bound to want to do. @param width the width of the text area or -1 to use the default (or CSS styled) width. """ LimitedTextArea a...
java
public static LimitedTextArea newTextArea (String text, int width, int height, int maxLength) { LimitedTextArea area = new LimitedTextArea(maxLength, width, height); if (text != null) { area.setText(text); } return area; }
[ "public", "static", "LimitedTextArea", "newTextArea", "(", "String", "text", ",", "int", "width", ",", "int", "height", ",", "int", "maxLength", ")", "{", "LimitedTextArea", "area", "=", "new", "LimitedTextArea", "(", "maxLength", ",", "width", ",", "height", ...
Creates a limited text area with all of the configuration that you're bound to want to do. @param width the width of the text area or -1 to use the default (or CSS styled) width.
[ "Creates", "a", "limited", "text", "area", "with", "all", "of", "the", "configuration", "that", "you", "re", "bound", "to", "want", "to", "do", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/Widgets.java#L393-L400
auth0/Auth0.Android
auth0/src/main/java/com/auth0/android/authentication/request/ProfileRequest.java
ProfileRequest.execute
@Override public Authentication execute() throws Auth0Exception { """ Logs in the user with Auth0 and fetches it's profile. @return authentication object containing the user's tokens and profile @throws Auth0Exception when either authentication or profile fetch fails """ Credentials credentials...
java
@Override public Authentication execute() throws Auth0Exception { Credentials credentials = credentialsRequest.execute(); UserProfile profile = userInfoRequest .addHeader(HEADER_AUTHORIZATION, "Bearer " + credentials.getAccessToken()) .execute(); return new Au...
[ "@", "Override", "public", "Authentication", "execute", "(", ")", "throws", "Auth0Exception", "{", "Credentials", "credentials", "=", "credentialsRequest", ".", "execute", "(", ")", ";", "UserProfile", "profile", "=", "userInfoRequest", ".", "addHeader", "(", "HEA...
Logs in the user with Auth0 and fetches it's profile. @return authentication object containing the user's tokens and profile @throws Auth0Exception when either authentication or profile fetch fails
[ "Logs", "in", "the", "user", "with", "Auth0", "and", "fetches", "it", "s", "profile", "." ]
train
https://github.com/auth0/Auth0.Android/blob/ee37b7f94d989c1fbab2cb1378c87fdcaf7a8156/auth0/src/main/java/com/auth0/android/authentication/request/ProfileRequest.java#L125-L132
Netflix/Hystrix
hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixTimer.java
HystrixTimer.addTimerListener
public Reference<TimerListener> addTimerListener(final TimerListener listener) { """ Add a {@link TimerListener} that will be executed until it is garbage collected or removed by clearing the returned {@link Reference}. <p> NOTE: It is the responsibility of code that adds a listener via this method to clear this...
java
public Reference<TimerListener> addTimerListener(final TimerListener listener) { startThreadIfNeeded(); // add the listener Runnable r = new Runnable() { @Override public void run() { try { listener.tick(); } catch (Ex...
[ "public", "Reference", "<", "TimerListener", ">", "addTimerListener", "(", "final", "TimerListener", "listener", ")", "{", "startThreadIfNeeded", "(", ")", ";", "// add the listener", "Runnable", "r", "=", "new", "Runnable", "(", ")", "{", "@", "Override", "publ...
Add a {@link TimerListener} that will be executed until it is garbage collected or removed by clearing the returned {@link Reference}. <p> NOTE: It is the responsibility of code that adds a listener via this method to clear this listener when completed. <p> <blockquote> <pre> {@code // add a TimerListener Reference<Ti...
[ "Add", "a", "{", "@link", "TimerListener", "}", "that", "will", "be", "executed", "until", "it", "is", "garbage", "collected", "or", "removed", "by", "clearing", "the", "returned", "{", "@link", "Reference", "}", ".", "<p", ">", "NOTE", ":", "It", "is", ...
train
https://github.com/Netflix/Hystrix/blob/3cb21589895e9f8f87cfcdbc9d96d9f63d48b848/hystrix-core/src/main/java/com/netflix/hystrix/util/HystrixTimer.java#L90-L108
jaliss/securesocial
samples/java/demo/app/controllers/Application.java
Application.index
@SecuredAction public Result index() { """ This action only gets called if the user is logged in. @return """ if(logger.isDebugEnabled()){ logger.debug("access granted to index"); } DemoUser user = (DemoUser) ctx().args.get(SecureSocial.USER_KEY); return ok(in...
java
@SecuredAction public Result index() { if(logger.isDebugEnabled()){ logger.debug("access granted to index"); } DemoUser user = (DemoUser) ctx().args.get(SecureSocial.USER_KEY); return ok(index.render(user, SecureSocial.env())); }
[ "@", "SecuredAction", "public", "Result", "index", "(", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"access granted to index\"", ")", ";", "}", "DemoUser", "user", "=", "(", "DemoUser", ")", "c...
This action only gets called if the user is logged in. @return
[ "This", "action", "only", "gets", "called", "if", "the", "user", "is", "logged", "in", "." ]
train
https://github.com/jaliss/securesocial/blob/0f9710325724da34a46c5ecefb439121fce837b7/samples/java/demo/app/controllers/Application.java#L60-L67
google/j2objc
jre_emul/android/frameworks/base/core/java/android/util/Log.java
Log.wtfStack
public static int wtfStack(String tag, String msg) { """ Like {@link #wtf(String, String)}, but also writes to the log the full call stack. @hide """ return wtf(LOG_ID_MAIN, tag, msg, null, true); }
java
public static int wtfStack(String tag, String msg) { return wtf(LOG_ID_MAIN, tag, msg, null, true); }
[ "public", "static", "int", "wtfStack", "(", "String", "tag", ",", "String", "msg", ")", "{", "return", "wtf", "(", "LOG_ID_MAIN", ",", "tag", ",", "msg", ",", "null", ",", "true", ")", ";", "}" ]
Like {@link #wtf(String, String)}, but also writes to the log the full call stack. @hide
[ "Like", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/util/Log.java#L312-L314
JOML-CI/JOML
src/org/joml/Vector3d.java
Vector3d.set
public Vector3d set(int index, DoubleBuffer buffer) { """ Read this vector from the supplied {@link DoubleBuffer} starting at the specified absolute buffer position/index. <p> This method will not increment the position of the given DoubleBuffer. @param index the absolute position into the DoubleBuffer @pa...
java
public Vector3d set(int index, DoubleBuffer buffer) { MemUtil.INSTANCE.get(this, index, buffer); return this; }
[ "public", "Vector3d", "set", "(", "int", "index", ",", "DoubleBuffer", "buffer", ")", "{", "MemUtil", ".", "INSTANCE", ".", "get", "(", "this", ",", "index", ",", "buffer", ")", ";", "return", "this", ";", "}" ]
Read this vector from the supplied {@link DoubleBuffer} starting at the specified absolute buffer position/index. <p> This method will not increment the position of the given DoubleBuffer. @param index the absolute position into the DoubleBuffer @param buffer values will be read in <code>x, y, z</code> order @return t...
[ "Read", "this", "vector", "from", "the", "supplied", "{", "@link", "DoubleBuffer", "}", "starting", "at", "the", "specified", "absolute", "buffer", "position", "/", "index", ".", "<p", ">", "This", "method", "will", "not", "increment", "the", "position", "of...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector3d.java#L426-L429
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java
SARLOperationHelper._hasSideEffects
protected Boolean _hasSideEffects(XBinaryOperation expression, ISideEffectContext context) { """ Test if the given expression has side effects. @param expression the expression. @param context the list of context expressions. @return {@code true} if the expression has side effects. """ if (isReassignmen...
java
protected Boolean _hasSideEffects(XBinaryOperation expression, ISideEffectContext context) { if (isReassignmentOperator(expression)) { if (!isLocalExpression(expression.getLeftOperand(), context, false)) { return true; } } else { if (expression.isTypeLiteral() || expression.isPackageFragment()) { r...
[ "protected", "Boolean", "_hasSideEffects", "(", "XBinaryOperation", "expression", ",", "ISideEffectContext", "context", ")", "{", "if", "(", "isReassignmentOperator", "(", "expression", ")", ")", "{", "if", "(", "!", "isLocalExpression", "(", "expression", ".", "g...
Test if the given expression has side effects. @param expression the expression. @param context the list of context expressions. @return {@code true} if the expression has side effects.
[ "Test", "if", "the", "given", "expression", "has", "side", "effects", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java#L496-L513