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
beanshell/beanshell
src/main/java/bsh/BSHMethodDeclaration.java
BSHMethodDeclaration.evalReturnType
Class evalReturnType( CallStack callstack, Interpreter interpreter ) throws EvalError { """ Evaluate the return type node. @return the type or null indicating loosely typed return """ insureNodesParsed(); if ( returnTypeNode != null ) return returnTypeNode.evalReturnType( c...
java
Class evalReturnType( CallStack callstack, Interpreter interpreter ) throws EvalError { insureNodesParsed(); if ( returnTypeNode != null ) return returnTypeNode.evalReturnType( callstack, interpreter ); else return null; }
[ "Class", "evalReturnType", "(", "CallStack", "callstack", ",", "Interpreter", "interpreter", ")", "throws", "EvalError", "{", "insureNodesParsed", "(", ")", ";", "if", "(", "returnTypeNode", "!=", "null", ")", "return", "returnTypeNode", ".", "evalReturnType", "("...
Evaluate the return type node. @return the type or null indicating loosely typed return
[ "Evaluate", "the", "return", "type", "node", "." ]
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/BSHMethodDeclaration.java#L85-L93
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PipelineApi.java
PipelineApi.createPipeline
public Pipeline createPipeline(Object projectIdOrPath, String ref, Map<String, String> variables) throws GitLabApiException { """ Create a pipelines in a project. <pre><code>GitLab Endpoint: POST /projects/:id/pipeline</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path...
java
public Pipeline createPipeline(Object projectIdOrPath, String ref, Map<String, String> variables) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("ref", ref, true) .withParam("variables", variables, false); Response response = post(Res...
[ "public", "Pipeline", "createPipeline", "(", "Object", "projectIdOrPath", ",", "String", "ref", ",", "Map", "<", "String", ",", "String", ">", "variables", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", "...
Create a pipelines in a project. <pre><code>GitLab Endpoint: POST /projects/:id/pipeline</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param ref reference to commit @param variables a Map containing the variables available in the pipeline @return a P...
[ "Create", "a", "pipelines", "in", "a", "project", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L243-L250
ziccardi/jnrpe
jnrpe-plugins/src/main/java/it/jnrpe/plugin/mysql/CheckMysql.java
CheckMysql.gatherMetrics
@Override public final Collection<Metric> gatherMetrics(final ICommandLine cl) throws MetricGatheringException { """ Execute and gather metrics. @param cl - The command line parameters @throws MetricGatheringException - If any error occurs during metric gathering process @return the gathered metrics ...
java
@Override public final Collection<Metric> gatherMetrics(final ICommandLine cl) throws MetricGatheringException { List<Metric> metrics = new ArrayList<Metric>(); Mysql mysql = new Mysql(cl); long start = System.currentTimeMillis(); long elapsed = 0L; Connection conn = null; ...
[ "@", "Override", "public", "final", "Collection", "<", "Metric", ">", "gatherMetrics", "(", "final", "ICommandLine", "cl", ")", "throws", "MetricGatheringException", "{", "List", "<", "Metric", ">", "metrics", "=", "new", "ArrayList", "<", "Metric", ">", "(", ...
Execute and gather metrics. @param cl - The command line parameters @throws MetricGatheringException - If any error occurs during metric gathering process @return the gathered metrics
[ "Execute", "and", "gather", "metrics", "." ]
train
https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-plugins/src/main/java/it/jnrpe/plugin/mysql/CheckMysql.java#L77-L102
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addChangeViewCommand
public void addChangeViewCommand(ViewAngle angle, ViewQuality quality) { """ Changes the view parameters of the player. The amount and detail returned by the visual sensor depends on the width of view and the quality. But note that the frequency of sending information also depends on these parameters. (eg. If y...
java
public void addChangeViewCommand(ViewAngle angle, ViewQuality quality) { StringBuilder buf = new StringBuilder(); buf.append("(change_view "); switch (angle) { case NARROW : switch (quality) { case HIGH : buf.append("narrow ...
[ "public", "void", "addChangeViewCommand", "(", "ViewAngle", "angle", ",", "ViewQuality", "quality", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(change_view \"", ")", ";", "switch", "(", "angle", ...
Changes the view parameters of the player. The amount and detail returned by the visual sensor depends on the width of view and the quality. But note that the frequency of sending information also depends on these parameters. (eg. If you change the quality from high to low, the frequency doubles, and the time between t...
[ "Changes", "the", "view", "parameters", "of", "the", "player", ".", "The", "amount", "and", "detail", "returned", "by", "the", "visual", "sensor", "depends", "on", "the", "width", "of", "view", "and", "the", "quality", ".", "But", "note", "that", "the", ...
train
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L144-L180
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/InstanceRegistry.java
InstanceRegistry.openForTraffic
@Override public void openForTraffic(ApplicationInfoManager applicationInfoManager, int count) { """ If {@link PeerAwareInstanceRegistryImpl#openForTraffic(ApplicationInfoManager, int)} is called with a zero argument, it means that leases are not automatically cancelled if the instance hasn't sent any renewals...
java
@Override public void openForTraffic(ApplicationInfoManager applicationInfoManager, int count) { super.openForTraffic(applicationInfoManager, count == 0 ? this.defaultOpenForTrafficCount : count); }
[ "@", "Override", "public", "void", "openForTraffic", "(", "ApplicationInfoManager", "applicationInfoManager", ",", "int", "count", ")", "{", "super", ".", "openForTraffic", "(", "applicationInfoManager", ",", "count", "==", "0", "?", "this", ".", "defaultOpenForTraf...
If {@link PeerAwareInstanceRegistryImpl#openForTraffic(ApplicationInfoManager, int)} is called with a zero argument, it means that leases are not automatically cancelled if the instance hasn't sent any renewals recently. This happens for a standalone server. It seems like a bad default, so we set it to the smallest non...
[ "If", "{" ]
train
https://github.com/spring-cloud/spring-cloud-netflix/blob/03b1e326ce5971c41239890dc71cae616366cff8/spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/InstanceRegistry.java#L77-L81
structr/structr
structr-core/src/main/java/org/structr/common/ValidationHelper.java
ValidationHelper.isValidPropertyNotNull
public static boolean isValidPropertyNotNull(final GraphObject node, final PropertyKey key, final ErrorBuffer errorBuffer) { """ Checks whether the value for the given property key of the given node is a non-empty string. @param node the node @param key the property key @param errorBuffer the error buffer ...
java
public static boolean isValidPropertyNotNull(final GraphObject node, final PropertyKey key, final ErrorBuffer errorBuffer) { final String type = node.getType(); if (key == null) { errorBuffer.add(new EmptyPropertyToken(type, UnknownType)); return false; } final Object value = node.getProperty(key); ...
[ "public", "static", "boolean", "isValidPropertyNotNull", "(", "final", "GraphObject", "node", ",", "final", "PropertyKey", "key", ",", "final", "ErrorBuffer", "errorBuffer", ")", "{", "final", "String", "type", "=", "node", ".", "getType", "(", ")", ";", "if",...
Checks whether the value for the given property key of the given node is a non-empty string. @param node the node @param key the property key @param errorBuffer the error buffer @return true if the condition is valid
[ "Checks", "whether", "the", "value", "for", "the", "given", "property", "key", "of", "the", "given", "node", "is", "a", "non", "-", "empty", "string", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-core/src/main/java/org/structr/common/ValidationHelper.java#L124-L153
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/CmsAreaSelectPanel.java
CmsAreaSelectPanel.getXForY
private int getXForY(int newX, int newY) { """ Calculates the matching X (left/width) value in case of a fixed height/width ratio.<p> @param newX the cursor X offset to the selection area @param newY the cursor Y offset to the selection area @return the matching X value """ int width = (int)Mat...
java
private int getXForY(int newX, int newY) { int width = (int)Math.floor((newY - m_firstY) / m_heightToWidth); int result = m_firstX + width; if (((m_firstX - newX) * (m_firstX - result)) < 0) { result = m_firstX - width; } return result; }
[ "private", "int", "getXForY", "(", "int", "newX", ",", "int", "newY", ")", "{", "int", "width", "=", "(", "int", ")", "Math", ".", "floor", "(", "(", "newY", "-", "m_firstY", ")", "/", "m_heightToWidth", ")", ";", "int", "result", "=", "m_firstX", ...
Calculates the matching X (left/width) value in case of a fixed height/width ratio.<p> @param newX the cursor X offset to the selection area @param newY the cursor Y offset to the selection area @return the matching X value
[ "Calculates", "the", "matching", "X", "(", "left", "/", "width", ")", "value", "in", "case", "of", "a", "fixed", "height", "/", "width", "ratio", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/CmsAreaSelectPanel.java#L655-L663
graphhopper/graphhopper
core/src/main/java/com/graphhopper/storage/index/QueryResult.java
QueryResult.calcSnappedPoint
public void calcSnappedPoint(DistanceCalc distCalc) { """ Calculates the closet point on the edge from the query point. """ if (closestEdge == null) throw new IllegalStateException("No closest edge?"); if (snappedPoint != null) throw new IllegalStateException("Calculate ...
java
public void calcSnappedPoint(DistanceCalc distCalc) { if (closestEdge == null) throw new IllegalStateException("No closest edge?"); if (snappedPoint != null) throw new IllegalStateException("Calculate snapped point only once"); PointList fullPL = getClosestEdge().fetchWa...
[ "public", "void", "calcSnappedPoint", "(", "DistanceCalc", "distCalc", ")", "{", "if", "(", "closestEdge", "==", "null", ")", "throw", "new", "IllegalStateException", "(", "\"No closest edge?\"", ")", ";", "if", "(", "snappedPoint", "!=", "null", ")", "throw", ...
Calculates the closet point on the edge from the query point.
[ "Calculates", "the", "closet", "point", "on", "the", "edge", "from", "the", "query", "point", "." ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/storage/index/QueryResult.java#L138-L162
HiddenStage/divide
Shared/src/main/java/io/divide/shared/util/DaoUtils.java
DaoUtils.getUserByEmail
public static Credentials getUserByEmail(DAO serverDao, String email) throws DAO.DAOException { """ Convience method to do a Credentials query against an email address @param serverDao dao object to query against. @param email email address used in query. @return Credentials object found or null. @throws io.di...
java
public static Credentials getUserByEmail(DAO serverDao, String email) throws DAO.DAOException { Query query = new QueryBuilder() .select() .from(Credentials.class) .where(Credentials.EMAIL_KEY, OPERAND.EQ,email) .build(); TransientObject t...
[ "public", "static", "Credentials", "getUserByEmail", "(", "DAO", "serverDao", ",", "String", "email", ")", "throws", "DAO", ".", "DAOException", "{", "Query", "query", "=", "new", "QueryBuilder", "(", ")", ".", "select", "(", ")", ".", "from", "(", "Creden...
Convience method to do a Credentials query against an email address @param serverDao dao object to query against. @param email email address used in query. @return Credentials object found or null. @throws io.divide.shared.server.DAO.DAOException
[ "Convience", "method", "to", "do", "a", "Credentials", "query", "against", "an", "email", "address" ]
train
https://github.com/HiddenStage/divide/blob/14e36598c50d92b4393e6649915e32b86141c598/Shared/src/main/java/io/divide/shared/util/DaoUtils.java#L38-L51
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/form/CmsForm.java
CmsForm.addField
public void addField(String fieldGroup, final I_CmsFormField formField) { """ Adds a form field to the form.<p> @param fieldGroup the form field group key @param formField the form field which should be added """ initializeFormFieldWidget(formField); m_fields.put(formField.getId(), formFie...
java
public void addField(String fieldGroup, final I_CmsFormField formField) { initializeFormFieldWidget(formField); m_fields.put(formField.getId(), formField); String modelId = formField.getModelId(); m_fieldsByModelId.put(modelId, formField); formField.getLayoutData().put("group", ...
[ "public", "void", "addField", "(", "String", "fieldGroup", ",", "final", "I_CmsFormField", "formField", ")", "{", "initializeFormFieldWidget", "(", "formField", ")", ";", "m_fields", ".", "put", "(", "formField", ".", "getId", "(", ")", ",", "formField", ")", ...
Adds a form field to the form.<p> @param fieldGroup the form field group key @param formField the form field which should be added
[ "Adds", "a", "form", "field", "to", "the", "form", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/form/CmsForm.java#L139-L149
infinispan/infinispan
counter/src/main/java/org/infinispan/counter/util/Utils.java
Utils.validateStrongCounterBounds
public static void validateStrongCounterBounds(long lowerBound, long initialValue, long upperBound) { """ Validates the lower and upper bound for a strong counter. <p> It throws a {@link CounterConfigurationException} is not valid. @param lowerBound The counter's lower bound value. @param initialValue The ...
java
public static void validateStrongCounterBounds(long lowerBound, long initialValue, long upperBound) { if (lowerBound > initialValue || initialValue > upperBound) { throw log.invalidInitialValueForBoundedCounter(lowerBound, upperBound, initialValue); } else if (lowerBound == upperBound) { t...
[ "public", "static", "void", "validateStrongCounterBounds", "(", "long", "lowerBound", ",", "long", "initialValue", ",", "long", "upperBound", ")", "{", "if", "(", "lowerBound", ">", "initialValue", "||", "initialValue", ">", "upperBound", ")", "{", "throw", "log...
Validates the lower and upper bound for a strong counter. <p> It throws a {@link CounterConfigurationException} is not valid. @param lowerBound The counter's lower bound value. @param initialValue The counter's initial value. @param upperBound The counter's upper bound value. @throws CounterConfigurationException ...
[ "Validates", "the", "lower", "and", "upper", "bound", "for", "a", "strong", "counter", ".", "<p", ">", "It", "throws", "a", "{", "@link", "CounterConfigurationException", "}", "is", "not", "valid", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/counter/src/main/java/org/infinispan/counter/util/Utils.java#L34-L40
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/GrammaticalRelation.java
GrammaticalRelation.valueOf
public static GrammaticalRelation valueOf(String s, Collection<GrammaticalRelation> values) { """ Returns the GrammaticalRelation having the given string representation (e.g. "nsubj"), or null if no such is found. @param s The short name of the GrammaticalRelation @param values The set of GrammaticalRelations...
java
public static GrammaticalRelation valueOf(String s, Collection<GrammaticalRelation> values) { for (GrammaticalRelation reln : values) { if (reln.toString().equals(s)) return reln; } return null; }
[ "public", "static", "GrammaticalRelation", "valueOf", "(", "String", "s", ",", "Collection", "<", "GrammaticalRelation", ">", "values", ")", "{", "for", "(", "GrammaticalRelation", "reln", ":", "values", ")", "{", "if", "(", "reln", ".", "toString", "(", ")"...
Returns the GrammaticalRelation having the given string representation (e.g. "nsubj"), or null if no such is found. @param s The short name of the GrammaticalRelation @param values The set of GrammaticalRelations to look for it among. @return The GrammaticalRelation with that name
[ "Returns", "the", "GrammaticalRelation", "having", "the", "given", "string", "representation", "(", "e", ".", "g", ".", "nsubj", ")", "or", "null", "if", "no", "such", "is", "found", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/GrammaticalRelation.java#L155-L161
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java
DatabaseAccountsInner.onlineRegion
public void onlineRegion(String resourceGroupName, String accountName, String region) { """ Online the specified region for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param region Cosmos DB regi...
java
public void onlineRegion(String resourceGroupName, String accountName, String region) { onlineRegionWithServiceResponseAsync(resourceGroupName, accountName, region).toBlocking().last().body(); }
[ "public", "void", "onlineRegion", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "region", ")", "{", "onlineRegionWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ",", "region", ")", ".", "toBlocking", "(", "...
Online the specified region for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @param region Cosmos DB region, with spaces between words and each word capitalized. @throws IllegalArgumentException thrown if p...
[ "Online", "the", "specified", "region", "for", "the", "specified", "Azure", "Cosmos", "DB", "database", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java#L1456-L1458
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java
SVGPath.relativeEllipticalArc
public SVGPath relativeEllipticalArc(double rx, double ry, double ar, double la, double sp, double x, double y) { """ Elliptical arc curve to the given relative coordinates. @param rx x radius @param ry y radius @param ar x-axis-rotation @param la large arc flag, if angle &gt;= 180 deg @param sp sweep flag,...
java
public SVGPath relativeEllipticalArc(double rx, double ry, double ar, double la, double sp, double x, double y) { return append(PATH_ARC_RELATIVE).append(rx).append(ry).append(ar).append(la).append(sp).append(x).append(y); }
[ "public", "SVGPath", "relativeEllipticalArc", "(", "double", "rx", ",", "double", "ry", ",", "double", "ar", ",", "double", "la", ",", "double", "sp", ",", "double", "x", ",", "double", "y", ")", "{", "return", "append", "(", "PATH_ARC_RELATIVE", ")", "....
Elliptical arc curve to the given relative coordinates. @param rx x radius @param ry y radius @param ar x-axis-rotation @param la large arc flag, if angle &gt;= 180 deg @param sp sweep flag, if arc will be drawn in positive-angle direction @param x new coordinates @param y new coordinates
[ "Elliptical", "arc", "curve", "to", "the", "given", "relative", "coordinates", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java#L591-L593
EdwardRaff/JSAT
JSAT/src/jsat/linear/Matrix.java
Matrix.multiplyTranspose
public Matrix multiplyTranspose(final Matrix B, ExecutorService threadPool) { """ Returns the new matrix <i>C</i> that is <i>C = A*B<sup>T</sup></i> @param B the matrix to multiply by the transpose of @param threadPool the source of threads to do computation in parallel @return the result C """ Matr...
java
public Matrix multiplyTranspose(final Matrix B, ExecutorService threadPool) { Matrix C = new DenseMatrix(this.rows(), B.rows()); multiplyTranspose(B, C, threadPool); return C; }
[ "public", "Matrix", "multiplyTranspose", "(", "final", "Matrix", "B", ",", "ExecutorService", "threadPool", ")", "{", "Matrix", "C", "=", "new", "DenseMatrix", "(", "this", ".", "rows", "(", ")", ",", "B", ".", "rows", "(", ")", ")", ";", "multiplyTransp...
Returns the new matrix <i>C</i> that is <i>C = A*B<sup>T</sup></i> @param B the matrix to multiply by the transpose of @param threadPool the source of threads to do computation in parallel @return the result C
[ "Returns", "the", "new", "matrix", "<i", ">", "C<", "/", "i", ">", "that", "is", "<i", ">", "C", "=", "A", "*", "B<sup", ">", "T<", "/", "sup", ">", "<", "/", "i", ">" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/Matrix.java#L366-L371
threerings/nenya
core/src/main/java/com/threerings/media/util/BobblePath.java
BobblePath.updatePositionTo
protected boolean updatePositionTo (Pathable pable, int x, int y) { """ Update the position of the pathable or return false if it's already there. """ if ((pable.getX() == x) && (pable.getY() == y)) { return false; } else { pable.setLocation(x, y); return tru...
java
protected boolean updatePositionTo (Pathable pable, int x, int y) { if ((pable.getX() == x) && (pable.getY() == y)) { return false; } else { pable.setLocation(x, y); return true; } }
[ "protected", "boolean", "updatePositionTo", "(", "Pathable", "pable", ",", "int", "x", ",", "int", "y", ")", "{", "if", "(", "(", "pable", ".", "getX", "(", ")", "==", "x", ")", "&&", "(", "pable", ".", "getY", "(", ")", "==", "y", ")", ")", "{...
Update the position of the pathable or return false if it's already there.
[ "Update", "the", "position", "of", "the", "pathable", "or", "return", "false", "if", "it", "s", "already", "there", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/util/BobblePath.java#L156-L164
kkopacz/agiso-core
bundles/agiso-core-lang/src/main/java/org/agiso/core/lang/util/ObjectUtils.java
ObjectUtils.equalsChecker
public static boolean equalsChecker(Object object1, Object object2) { """ Porównuje dwa obiekty wykorzystując standardową metodę <code>equals</code> obiektu przekazanego parametrem wywołania <code>object1</code>. Zwraca <code>true</code> jeśli oba przekazane do porównania obiekty nie są określone (mają wartość ...
java
public static boolean equalsChecker(Object object1, Object object2) { return null == object1? null == object2 : object1.equals(object2); }
[ "public", "static", "boolean", "equalsChecker", "(", "Object", "object1", ",", "Object", "object2", ")", "{", "return", "null", "==", "object1", "?", "null", "==", "object2", ":", "object1", ".", "equals", "(", "object2", ")", ";", "}" ]
Porównuje dwa obiekty wykorzystując standardową metodę <code>equals</code> obiektu przekazanego parametrem wywołania <code>object1</code>. Zwraca <code>true</code> jeśli oba przekazane do porównania obiekty nie są określone (mają wartość <code>null</code>).
[ "Porównuje", "dwa", "obiekty", "wykorzystując", "standardową", "metodę", "<code", ">", "equals<", "/", "code", ">", "obiektu", "przekazanego", "parametrem", "wywołania", "<code", ">", "object1<", "/", "code", ">", ".", "Zwraca", "<code", ">", "true<", "/", "co...
train
https://github.com/kkopacz/agiso-core/blob/b994ec0146be1fe3f10829d69cd719bdbdebe1c5/bundles/agiso-core-lang/src/main/java/org/agiso/core/lang/util/ObjectUtils.java#L239-L241
TrueNight/Utils
android-utils/src/main/java/xyz/truenight/utils/PermissionRequest.java
PermissionRequest.getPermission
public static void getPermission(@NonNull Activity context, String permissions, @NonNull Response response) { """ Request Android Permissions. @param context The Context of the Activity or the Fragment. @param permissions The Permission you are need. @param response Result callback. """ get...
java
public static void getPermission(@NonNull Activity context, String permissions, @NonNull Response response) { getPermission(context, new String[]{permissions}, response); }
[ "public", "static", "void", "getPermission", "(", "@", "NonNull", "Activity", "context", ",", "String", "permissions", ",", "@", "NonNull", "Response", "response", ")", "{", "getPermission", "(", "context", ",", "new", "String", "[", "]", "{", "permissions", ...
Request Android Permissions. @param context The Context of the Activity or the Fragment. @param permissions The Permission you are need. @param response Result callback.
[ "Request", "Android", "Permissions", "." ]
train
https://github.com/TrueNight/Utils/blob/78a11faa16258b09f08826797370310ab650530c/android-utils/src/main/java/xyz/truenight/utils/PermissionRequest.java#L75-L77
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/cache/GsonCache.java
GsonCache.save
public static void save(String key, Object object) throws Exception { """ Put an object into Reservoir with the given key. This a blocking IO operation. Previously stored object with the same key (if any) will be overwritten. @param key the key string. @param object the object to be stored. """ ...
java
public static void save(String key, Object object) throws Exception { String json = new Gson().toJson(object); cache.put(key, json); }
[ "public", "static", "void", "save", "(", "String", "key", ",", "Object", "object", ")", "throws", "Exception", "{", "String", "json", "=", "new", "Gson", "(", ")", ".", "toJson", "(", "object", ")", ";", "cache", ".", "put", "(", "key", ",", "json", ...
Put an object into Reservoir with the given key. This a blocking IO operation. Previously stored object with the same key (if any) will be overwritten. @param key the key string. @param object the object to be stored.
[ "Put", "an", "object", "into", "Reservoir", "with", "the", "given", "key", ".", "This", "a", "blocking", "IO", "operation", ".", "Previously", "stored", "object", "with", "the", "same", "key", "(", "if", "any", ")", "will", "be", "overwritten", "." ]
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/cache/GsonCache.java#L54-L57
weld/core
impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java
Reflections.invokeAndUnwrap
public static <T> T invokeAndUnwrap(final Object instance, final Method method, final Object... parameters) throws Throwable { """ Invokes the method on a given instance passing in given parameters. If the invocation yields {@link InvocationTargetException}, the exception is unwrapped. It is a responsibility o...
java
public static <T> T invokeAndUnwrap(final Object instance, final Method method, final Object... parameters) throws Throwable { try { return cast(method.invoke(instance, parameters)); } catch (IllegalArgumentException e) { throw ReflectionLogger.LOG.illegalArgumentExceptionOnRefle...
[ "public", "static", "<", "T", ">", "T", "invokeAndUnwrap", "(", "final", "Object", "instance", ",", "final", "Method", "method", ",", "final", "Object", "...", "parameters", ")", "throws", "Throwable", "{", "try", "{", "return", "cast", "(", "method", ".",...
Invokes the method on a given instance passing in given parameters. If the invocation yields {@link InvocationTargetException}, the exception is unwrapped. It is a responsibility of the caller to make sure that the method is accessible to the caller.
[ "Invokes", "the", "method", "on", "a", "given", "instance", "passing", "in", "given", "parameters", ".", "If", "the", "invocation", "yields", "{", "@link", "InvocationTargetException", "}", "the", "exception", "is", "unwrapped", "." ]
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java#L408-L418
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/IntegralImageOps.java
IntegralImageOps.block_zero
public static double block_zero(GrayF64 integral , int x0 , int y0 , int x1 , int y1 ) { """ <p> Computes the value of a block inside an integral image and treats pixels outside of the image as zero. The block is defined as follows: x0 &lt; x &le; x1 and y0 &lt; y &le; y1. </p> @param integral Integral imag...
java
public static double block_zero(GrayF64 integral , int x0 , int y0 , int x1 , int y1 ) { return ImplIntegralImageOps.block_zero(integral,x0,y0,x1,y1); }
[ "public", "static", "double", "block_zero", "(", "GrayF64", "integral", ",", "int", "x0", ",", "int", "y0", ",", "int", "x1", ",", "int", "y1", ")", "{", "return", "ImplIntegralImageOps", ".", "block_zero", "(", "integral", ",", "x0", ",", "y0", ",", "...
<p> Computes the value of a block inside an integral image and treats pixels outside of the image as zero. The block is defined as follows: x0 &lt; x &le; x1 and y0 &lt; y &le; y1. </p> @param integral Integral image. @param x0 Lower bound of the block. Exclusive. @param y0 Lower bound of the block. Exclusive. @par...
[ "<p", ">", "Computes", "the", "value", "of", "a", "block", "inside", "an", "integral", "image", "and", "treats", "pixels", "outside", "of", "the", "image", "as", "zero", ".", "The", "block", "is", "defined", "as", "follows", ":", "x0", "&lt", ";", "x",...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/IntegralImageOps.java#L462-L465
Samsung/GearVRf
GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptBehavior.java
GVRScriptBehavior.setScriptText
public void setScriptText(String scriptText, String language) { """ Loads the script from a text string. @param scriptText text string containing script to execute. @param language language ("js" or "lua") """ GVRScriptFile newScript = new GVRJavascriptScriptFile(getGVRContext(), scriptText); ...
java
public void setScriptText(String scriptText, String language) { GVRScriptFile newScript = new GVRJavascriptScriptFile(getGVRContext(), scriptText); mLanguage = GVRScriptManager.LANG_JAVASCRIPT; setScriptFile(newScript); }
[ "public", "void", "setScriptText", "(", "String", "scriptText", ",", "String", "language", ")", "{", "GVRScriptFile", "newScript", "=", "new", "GVRJavascriptScriptFile", "(", "getGVRContext", "(", ")", ",", "scriptText", ")", ";", "mLanguage", "=", "GVRScriptManag...
Loads the script from a text string. @param scriptText text string containing script to execute. @param language language ("js" or "lua")
[ "Loads", "the", "script", "from", "a", "text", "string", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/script/src/main/java/org/gearvrf/script/GVRScriptBehavior.java#L126-L131
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/ImageSet.java
ImageSet.validate
private void validate(File root, Collection<URI> dirs) throws IOException { """ For sanity checking that the given storage directory was configured. """ if (dirs == null) return; for (URI dir : dirs) { if (new File(dir.getPath()).getAbsolutePath().equals( root.getAbsolutePath())) ...
java
private void validate(File root, Collection<URI> dirs) throws IOException { if (dirs == null) return; for (URI dir : dirs) { if (new File(dir.getPath()).getAbsolutePath().equals( root.getAbsolutePath())) { // we found the corresponding entry return; } } throwI...
[ "private", "void", "validate", "(", "File", "root", ",", "Collection", "<", "URI", ">", "dirs", ")", "throws", "IOException", "{", "if", "(", "dirs", "==", "null", ")", "return", ";", "for", "(", "URI", "dir", ":", "dirs", ")", "{", "if", "(", "new...
For sanity checking that the given storage directory was configured.
[ "For", "sanity", "checking", "that", "the", "given", "storage", "directory", "was", "configured", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/ImageSet.java#L90-L102
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/PnPLepetitEPnP.java
PnPLepetitEPnP.adjustBetaSign
private double adjustBetaSign( double beta , List<Point3D_F64> nullPts ) { """ Use the positive depth constraint to determine the sign of beta """ if( beta == 0 ) return 0; int N = alphas.numRows; int positiveCount = 0; for( int i = 0; i < N; i++ ) { double z = 0; for( int j = 0; j < numCon...
java
private double adjustBetaSign( double beta , List<Point3D_F64> nullPts ) { if( beta == 0 ) return 0; int N = alphas.numRows; int positiveCount = 0; for( int i = 0; i < N; i++ ) { double z = 0; for( int j = 0; j < numControl; j++ ) { Point3D_F64 c = nullPts.get(j); z += alphas.get(i,j)*c.z; ...
[ "private", "double", "adjustBetaSign", "(", "double", "beta", ",", "List", "<", "Point3D_F64", ">", "nullPts", ")", "{", "if", "(", "beta", "==", "0", ")", "return", "0", ";", "int", "N", "=", "alphas", ".", "numRows", ";", "int", "positiveCount", "=",...
Use the positive depth constraint to determine the sign of beta
[ "Use", "the", "positive", "depth", "constraint", "to", "determine", "the", "sign", "of", "beta" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/PnPLepetitEPnP.java#L519-L542
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AOStream.java
AOStream.startOrIncludeInWriteRange
private final TickRange startOrIncludeInWriteRange( TickRange writeRange, long lowerBound, long upperBound, TickRange r) { """ Helper method. We are given a range, writeRange, which may be null. We are also given a range r (which is not null), that needs to be included in writeRange. The constrai...
java
private final TickRange startOrIncludeInWriteRange( TickRange writeRange, long lowerBound, long upperBound, TickRange r) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "startOrIncludeInWriteRange"); if (writeRange == null) { writeRange = new...
[ "private", "final", "TickRange", "startOrIncludeInWriteRange", "(", "TickRange", "writeRange", ",", "long", "lowerBound", ",", "long", "upperBound", ",", "TickRange", "r", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", "...
Helper method. We are given a range, writeRange, which may be null. We are also given a range r (which is not null), that needs to be included in writeRange. The constraint on the inclusion is the resulting writeRange should be in the interval [lowerBound, upperBound]. @param writeRange @param lowerBound @param upperBo...
[ "Helper", "method", ".", "We", "are", "given", "a", "range", "writeRange", "which", "may", "be", "null", ".", "We", "are", "also", "given", "a", "range", "r", "(", "which", "is", "not", "null", ")", "that", "needs", "to", "be", "included", "in", "wri...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/AOStream.java#L2683-L2707
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarOutputStream.java
JarOutputStream.set16
private static void set16(byte[] b, int off, int value) { """ /* Sets 16-bit value at specified offset. The bytes are assumed to be in Intel (little-endian) byte order. """ b[off+0] = (byte)value; b[off+1] = (byte)(value >> 8); }
java
private static void set16(byte[] b, int off, int value) { b[off+0] = (byte)value; b[off+1] = (byte)(value >> 8); }
[ "private", "static", "void", "set16", "(", "byte", "[", "]", "b", ",", "int", "off", ",", "int", "value", ")", "{", "b", "[", "off", "+", "0", "]", "=", "(", "byte", ")", "value", ";", "b", "[", "off", "+", "1", "]", "=", "(", "byte", ")", ...
/* Sets 16-bit value at specified offset. The bytes are assumed to be in Intel (little-endian) byte order.
[ "/", "*", "Sets", "16", "-", "bit", "value", "at", "specified", "offset", ".", "The", "bytes", "are", "assumed", "to", "be", "in", "Intel", "(", "little", "-", "endian", ")", "byte", "order", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarOutputStream.java#L145-L148
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/DiscussionCommentResourcesImpl.java
DiscussionCommentResourcesImpl.addComment
public Comment addComment(long sheetId, long discussionId, Comment comment) throws SmartsheetException { """ Add a comment to a discussion. It mirrors to the following Smartsheet REST API method: POST /discussion/{discussionId}/comments</p> @param sheetId the sheet id @param discussionId the discussion id ...
java
public Comment addComment(long sheetId, long discussionId, Comment comment) throws SmartsheetException{ return this.createResource("sheets/" + sheetId + "/discussions/" + discussionId + "/comments", Comment.class, comment); }
[ "public", "Comment", "addComment", "(", "long", "sheetId", ",", "long", "discussionId", ",", "Comment", "comment", ")", "throws", "SmartsheetException", "{", "return", "this", ".", "createResource", "(", "\"sheets/\"", "+", "sheetId", "+", "\"/discussions/\"", "+"...
Add a comment to a discussion. It mirrors to the following Smartsheet REST API method: POST /discussion/{discussionId}/comments</p> @param sheetId the sheet id @param discussionId the discussion id @param comment the comment to add @return the created comment @throws IllegalArgumentException if any argument is null o...
[ "Add", "a", "comment", "to", "a", "discussion", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/DiscussionCommentResourcesImpl.java#L63-L65
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/bolt/hdfs/HdfsPreProcessor.java
HdfsPreProcessor.execute
public static void execute(FileSystem hdfs, String baseUrl, String baseName, String tmpSuffix) { """ HDFSSink起動時の前処理を行う。<br> 末尾に一時ファイル名称パターンを持ち、かつリネーム先にファイルが存在しない場合リネームを行う。 @param hdfs ファイルシステム @param baseUrl ベースURL @param baseName ベース名称 @param tmpSuffix 一時ファイル名称パターン """ String baseRealUrl = ba...
java
public static void execute(FileSystem hdfs, String baseUrl, String baseName, String tmpSuffix) { String baseRealUrl = baseUrl; if (baseRealUrl.endsWith("/") == false) { baseRealUrl = baseRealUrl + "/"; } String targetPattern = baseRealUrl + baseName + "...
[ "public", "static", "void", "execute", "(", "FileSystem", "hdfs", ",", "String", "baseUrl", ",", "String", "baseName", ",", "String", "tmpSuffix", ")", "{", "String", "baseRealUrl", "=", "baseUrl", ";", "if", "(", "baseRealUrl", ".", "endsWith", "(", "\"/\""...
HDFSSink起動時の前処理を行う。<br> 末尾に一時ファイル名称パターンを持ち、かつリネーム先にファイルが存在しない場合リネームを行う。 @param hdfs ファイルシステム @param baseUrl ベースURL @param baseName ベース名称 @param tmpSuffix 一時ファイル名称パターン
[ "HDFSSink起動時の前処理を行う。<br", ">", "末尾に一時ファイル名称パターンを持ち、かつリネーム先にファイルが存在しない場合リネームを行う。" ]
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/bolt/hdfs/HdfsPreProcessor.java#L49-L91
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionRelPersistenceImpl.java
CPDefinitionOptionRelPersistenceImpl.fetchByUUID_G
@Override public CPDefinitionOptionRel fetchByUUID_G(String uuid, long groupId) { """ Returns the cp definition option rel where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching...
java
@Override public CPDefinitionOptionRel fetchByUUID_G(String uuid, long groupId) { return fetchByUUID_G(uuid, groupId, true); }
[ "@", "Override", "public", "CPDefinitionOptionRel", "fetchByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "{", "return", "fetchByUUID_G", "(", "uuid", ",", "groupId", ",", "true", ")", ";", "}" ]
Returns the cp definition option rel where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching cp definition option rel, or <code>null</code> if a matching cp definition option rel could not...
[ "Returns", "the", "cp", "definition", "option", "rel", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", "fi...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionRelPersistenceImpl.java#L706-L709
dwdyer/uncommons-maths
core/src/java/main/org/uncommons/maths/binary/BitString.java
BitString.swapSubstring
public void swapSubstring(BitString other, int start, int length) { """ An efficient method for exchanging data between two bit strings. Both bit strings must be long enough that they contain the full length of the specified substring. @param other The bitstring with which this bitstring should swap bits. @par...
java
public void swapSubstring(BitString other, int start, int length) { assertValidIndex(start); other.assertValidIndex(start); int word = start / WORD_LENGTH; int partialWordSize = (WORD_LENGTH - start) % WORD_LENGTH; if (partialWordSize > 0) { swap...
[ "public", "void", "swapSubstring", "(", "BitString", "other", ",", "int", "start", ",", "int", "length", ")", "{", "assertValidIndex", "(", "start", ")", ";", "other", ".", "assertValidIndex", "(", "start", ")", ";", "int", "word", "=", "start", "/", "WO...
An efficient method for exchanging data between two bit strings. Both bit strings must be long enough that they contain the full length of the specified substring. @param other The bitstring with which this bitstring should swap bits. @param start The start position for the substrings to be exchanged. All bit indices...
[ "An", "efficient", "method", "for", "exchanging", "data", "between", "two", "bit", "strings", ".", "Both", "bit", "strings", "must", "be", "long", "enough", "that", "they", "contain", "the", "full", "length", "of", "the", "specified", "substring", "." ]
train
https://github.com/dwdyer/uncommons-maths/blob/b7ba13aea70625bb7f37c856783a29e17e354964/core/src/java/main/org/uncommons/maths/binary/BitString.java#L237-L265
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.deleteGroupBadge
public void deleteGroupBadge(Integer groupId, Integer badgeId) throws IOException { """ Delete group badge @param groupId The id of the group for which the badge should be deleted @param badgeId The id of the badge that should be deleted @throws IOException on GitLab API call error """ String tail...
java
public void deleteGroupBadge(Integer groupId, Integer badgeId) throws IOException { String tailUrl = GitlabGroup.URL + "/" + groupId + GitlabBadge.URL + "/" + badgeId; retrieve().method(DELETE).to(tailUrl, Void.class); }
[ "public", "void", "deleteGroupBadge", "(", "Integer", "groupId", ",", "Integer", "badgeId", ")", "throws", "IOException", "{", "String", "tailUrl", "=", "GitlabGroup", ".", "URL", "+", "\"/\"", "+", "groupId", "+", "GitlabBadge", ".", "URL", "+", "\"/\"", "+...
Delete group badge @param groupId The id of the group for which the badge should be deleted @param badgeId The id of the badge that should be deleted @throws IOException on GitLab API call error
[ "Delete", "group", "badge" ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L2745-L2749
spring-projects/spring-data-solr
src/main/java/org/springframework/data/solr/core/query/DefaultValueFunction.java
DefaultValueFunction.defaultValue
public static DefaultValueFunction defaultValue(String fieldName, Object defaultValue) { """ Creates new {@link DefaultValueFunction} representing {@code def(fieldname, defaultValue))} @param fieldName must not be empty @param defaultValue must not be null @return """ Assert.hasText(fieldName, "Fieldna...
java
public static DefaultValueFunction defaultValue(String fieldName, Object defaultValue) { Assert.hasText(fieldName, "Fieldname must not be 'empty' for default value operation."); Assert.notNull(defaultValue, "DefaultValue must not be 'null'."); return defaultValue(new SimpleField(fieldName), defaultValue); }
[ "public", "static", "DefaultValueFunction", "defaultValue", "(", "String", "fieldName", ",", "Object", "defaultValue", ")", "{", "Assert", ".", "hasText", "(", "fieldName", ",", "\"Fieldname must not be 'empty' for default value operation.\"", ")", ";", "Assert", ".", "...
Creates new {@link DefaultValueFunction} representing {@code def(fieldname, defaultValue))} @param fieldName must not be empty @param defaultValue must not be null @return
[ "Creates", "new", "{", "@link", "DefaultValueFunction", "}", "representing", "{", "@code", "def", "(", "fieldname", "defaultValue", "))", "}" ]
train
https://github.com/spring-projects/spring-data-solr/blob/20be5cb82498b70134dfda6c1a91ad21f8e657e0/src/main/java/org/springframework/data/solr/core/query/DefaultValueFunction.java#L43-L49
amaembo/streamex
src/main/java/one/util/streamex/StreamEx.java
StreamEx.toSortedMap
public <K, V> SortedMap<K, V> toSortedMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valMapper, BinaryOperator<V> mergeFunction) { """ Returns a {@link SortedMap} whose keys and values are the result of applying the provided mapping functions to the input elements. ...
java
public <K, V> SortedMap<K, V> toSortedMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valMapper, BinaryOperator<V> mergeFunction) { return rawCollect(Collectors.toMap(keyMapper, valMapper, mergeFunction, TreeMap::new)); }
[ "public", "<", "K", ",", "V", ">", "SortedMap", "<", "K", ",", "V", ">", "toSortedMap", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "K", ">", "keyMapper", ",", "Function", "<", "?", "super", "T", ",", "?", "extends", "V", ">", ...
Returns a {@link SortedMap} whose keys and values are the result of applying the provided mapping functions to the input elements. <p> This is a <a href="package-summary.html#StreamOps">terminal</a> operation. <p> If the mapped keys contains duplicates (according to {@link Object#equals(Object)}), the value mapping f...
[ "Returns", "a", "{", "@link", "SortedMap", "}", "whose", "keys", "and", "values", "are", "the", "result", "of", "applying", "the", "provided", "mapping", "functions", "to", "the", "input", "elements", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/StreamEx.java#L1147-L1150
ysc/word
src/main/java/org/apdplat/word/vector/Word2Vector.java
Word2Vector.contextWord
private static void contextWord(String[] words, int index, int distance, String word, Map<String, List<ContextWord>> map) { """ 计算词的相关词 @param words 词数组 @param index 相关词索引 @param distance 词距 @param word 核心词 @param map """ String _word = null; if(index > -1 && index < words.length){ ...
java
private static void contextWord(String[] words, int index, int distance, String word, Map<String, List<ContextWord>> map){ String _word = null; if(index > -1 && index < words.length){ _word = words[index]; } if(_word != null && Utils.isChineseCharAndLength...
[ "private", "static", "void", "contextWord", "(", "String", "[", "]", "words", ",", "int", "index", ",", "int", "distance", ",", "String", "word", ",", "Map", "<", "String", ",", "List", "<", "ContextWord", ">", ">", "map", ")", "{", "String", "_word", ...
计算词的相关词 @param words 词数组 @param index 相关词索引 @param distance 词距 @param word 核心词 @param map
[ "计算词的相关词" ]
train
https://github.com/ysc/word/blob/5e45607f4e97207f55d1e3bc561abda6b34f7c54/src/main/java/org/apdplat/word/vector/Word2Vector.java#L164-L172
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/EntityUtils.java
EntityUtils.getRenderViewOffset
public static Point getRenderViewOffset(float partialTick) { """ Gets the render view offset for the current view entity. @param partialTick the partial tick @return the render view offset """ Entity entity = Minecraft.getMinecraft().getRenderViewEntity(); if (partialTick == 0) return new Point(enti...
java
public static Point getRenderViewOffset(float partialTick) { Entity entity = Minecraft.getMinecraft().getRenderViewEntity(); if (partialTick == 0) return new Point(entity.posX, entity.posY, entity.posZ); double x = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * partialTick; double y = entity.l...
[ "public", "static", "Point", "getRenderViewOffset", "(", "float", "partialTick", ")", "{", "Entity", "entity", "=", "Minecraft", ".", "getMinecraft", "(", ")", ".", "getRenderViewEntity", "(", ")", ";", "if", "(", "partialTick", "==", "0", ")", "return", "ne...
Gets the render view offset for the current view entity. @param partialTick the partial tick @return the render view offset
[ "Gets", "the", "render", "view", "offset", "for", "the", "current", "view", "entity", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/EntityUtils.java#L263-L273
ocpsoft/common
api/src/main/java/org/ocpsoft/common/util/Strings.java
Strings.areEqualTrimmed
public static boolean areEqualTrimmed(final String left, final String right) { """ Return true if the given {@link String} instances are equal when outer whitespace is removed, or if both {@link String} instances are null. (E.g.: " hello world " is equal to "hello world ") """ if ((left != null) && (...
java
public static boolean areEqualTrimmed(final String left, final String right) { if ((left != null) && (right != null)) { return left.trim().equals(right.trim()); } return areEqual(left, right); }
[ "public", "static", "boolean", "areEqualTrimmed", "(", "final", "String", "left", ",", "final", "String", "right", ")", "{", "if", "(", "(", "left", "!=", "null", ")", "&&", "(", "right", "!=", "null", ")", ")", "{", "return", "left", ".", "trim", "(...
Return true if the given {@link String} instances are equal when outer whitespace is removed, or if both {@link String} instances are null. (E.g.: " hello world " is equal to "hello world ")
[ "Return", "true", "if", "the", "given", "{" ]
train
https://github.com/ocpsoft/common/blob/ae926dfd6f9af278786520faee7ee3c2f1f52ca1/api/src/main/java/org/ocpsoft/common/util/Strings.java#L51-L58
podio/podio-java
src/main/java/com/podio/user/UserAPI.java
UserAPI.setProperty
public void setProperty(String key, boolean value) { """ Sets the value of the property for the active user with the given name. The property is specific to the auth client used. @param key The key of the property @param value The value of the property """ getResourceFactory() .getApiResource("/us...
java
public void setProperty(String key, boolean value) { getResourceFactory() .getApiResource("/user/property/" + key) .entity(new PropertyValue(value), MediaType.APPLICATION_JSON_TYPE).put(); }
[ "public", "void", "setProperty", "(", "String", "key", ",", "boolean", "value", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/user/property/\"", "+", "key", ")", ".", "entity", "(", "new", "PropertyValue", "(", "value", ")", ",", ...
Sets the value of the property for the active user with the given name. The property is specific to the auth client used. @param key The key of the property @param value The value of the property
[ "Sets", "the", "value", "of", "the", "property", "for", "the", "active", "user", "with", "the", "given", "name", ".", "The", "property", "is", "specific", "to", "the", "auth", "client", "used", "." ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/user/UserAPI.java#L186-L191
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRVertexBuffer.java
GVRVertexBuffer.setFloatVec
public void setFloatVec(String attributeName, FloatBuffer data) { """ Updates a vertex attribute from a float buffer. All of the entries of the input float buffer are copied into the storage for the named vertex attribute. Other vertex attributes are not affected. The attribute name must be one of the attribut...
java
public void setFloatVec(String attributeName, FloatBuffer data) { if (data.isDirect()) { if (!NativeVertexBuffer.setFloatVec(getNative(), attributeName, data, 0, 0)) { throw new IllegalArgumentException("Attribute name " + attributeName + " cannot be updated")...
[ "public", "void", "setFloatVec", "(", "String", "attributeName", ",", "FloatBuffer", "data", ")", "{", "if", "(", "data", ".", "isDirect", "(", ")", ")", "{", "if", "(", "!", "NativeVertexBuffer", ".", "setFloatVec", "(", "getNative", "(", ")", ",", "att...
Updates a vertex attribute from a float buffer. All of the entries of the input float buffer are copied into the storage for the named vertex attribute. Other vertex attributes are not affected. The attribute name must be one of the attributes named in the descriptor passed to the constructor. <p> All vertex attributes...
[ "Updates", "a", "vertex", "attribute", "from", "a", "float", "buffer", ".", "All", "of", "the", "entries", "of", "the", "input", "float", "buffer", "are", "copied", "into", "the", "storage", "for", "the", "named", "vertex", "attribute", ".", "Other", "vert...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRVertexBuffer.java#L374-L394
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/DwgUtil.java
DwgUtil.getRawChar
public static Vector getRawChar(int[] data, int offset) throws Exception { """ Read a char value from a group of unsigned bytes @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is foun...
java
public static Vector getRawChar(int[] data, int offset) throws Exception { int charr = ((Integer)getBits(data, 8, offset)).intValue(); Vector v = new Vector(); v.add(new Integer(offset+8)); v.add(new Integer(charr)); return v; }
[ "public", "static", "Vector", "getRawChar", "(", "int", "[", "]", "data", ",", "int", "offset", ")", "throws", "Exception", "{", "int", "charr", "=", "(", "(", "Integer", ")", "getBits", "(", "data", ",", "8", ",", "offset", ")", ")", ".", "intValue"...
Read a char value from a group of unsigned bytes @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is found in the DWG file. Occurs when we are looking for LwPolylines. @return Vector This vecto...
[ "Read", "a", "char", "value", "from", "a", "group", "of", "unsigned", "bytes" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/DwgUtil.java#L407-L413
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readRecurringData
private void readRecurringData(ProjectCalendarException bce, Project.Calendars.Calendar.Exceptions.Exception exception) { """ Read recurring data for a calendar exception. @param bce MPXJ calendar exception @param exception XML calendar exception """ RecurrenceType rt = getRecurrenceType(NumberHelper...
java
private void readRecurringData(ProjectCalendarException bce, Project.Calendars.Calendar.Exceptions.Exception exception) { RecurrenceType rt = getRecurrenceType(NumberHelper.getInt(exception.getType())); if (rt != null) { RecurringData rd = new RecurringData(); rd.setStartDate(bce....
[ "private", "void", "readRecurringData", "(", "ProjectCalendarException", "bce", ",", "Project", ".", "Calendars", ".", "Calendar", ".", "Exceptions", ".", "Exception", "exception", ")", "{", "RecurrenceType", "rt", "=", "getRecurrenceType", "(", "NumberHelper", ".",...
Read recurring data for a calendar exception. @param bce MPXJ calendar exception @param exception XML calendar exception
[ "Read", "recurring", "data", "for", "a", "calendar", "exception", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L646-L709
nutzam/nutzboot
nutzboot-demo/nutzboot-demo-simple/nutzboot-demo-simple-tio/src/main/java/io/nutz/demo/simple/tio/SimpleListener.java
SimpleListener.onBeforeClose
@Override public void onBeforeClose(ChannelContext channelContext, Throwable throwable, String remark, boolean isRemove) { """ 连接关闭前触发本方法 @param channelContext the channelcontext @param throwable the throwable 有可能为空 @param remark the remark 有可能为空 @param isRemove @author tanyaowu """ log.debu...
java
@Override public void onBeforeClose(ChannelContext channelContext, Throwable throwable, String remark, boolean isRemove) { log.debug("连接关闭前触发onBeforeClose"); }
[ "@", "Override", "public", "void", "onBeforeClose", "(", "ChannelContext", "channelContext", ",", "Throwable", "throwable", ",", "String", "remark", ",", "boolean", "isRemove", ")", "{", "log", ".", "debug", "(", "\"连接关闭前触发onBeforeClose\");", "", "", "}" ]
连接关闭前触发本方法 @param channelContext the channelcontext @param throwable the throwable 有可能为空 @param remark the remark 有可能为空 @param isRemove @author tanyaowu
[ "连接关闭前触发本方法" ]
train
https://github.com/nutzam/nutzboot/blob/fd33fd4fdce058eab594f28e4d3202f997e3c66a/nutzboot-demo/nutzboot-demo-simple/nutzboot-demo-simple-tio/src/main/java/io/nutz/demo/simple/tio/SimpleListener.java#L63-L66
segmentio/analytics-android
analytics/src/main/java/com/segment/analytics/Analytics.java
Analytics.onIntegrationReady
public <T> void onIntegrationReady(final String key, final Callback<T> callback) { """ Register to be notified when a bundled integration is ready. <p>In most cases, integrations would have already been initialized, and the callback will be invoked fairly quickly. However there may be a latency the first time ...
java
public <T> void onIntegrationReady(final String key, final Callback<T> callback) { if (isNullOrEmpty(key)) { throw new IllegalArgumentException("key cannot be null or empty."); } analyticsExecutor.submit( new Runnable() { @Override public void run() { HANDLER.p...
[ "public", "<", "T", ">", "void", "onIntegrationReady", "(", "final", "String", "key", ",", "final", "Callback", "<", "T", ">", "callback", ")", "{", "if", "(", "isNullOrEmpty", "(", "key", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "...
Register to be notified when a bundled integration is ready. <p>In most cases, integrations would have already been initialized, and the callback will be invoked fairly quickly. However there may be a latency the first time the app is launched, and we don't have settings for bundled integrations yet. This is compounde...
[ "Register", "to", "be", "notified", "when", "a", "bundled", "integration", "is", "ready", "." ]
train
https://github.com/segmentio/analytics-android/blob/93c7d5bb09b593440a2347a6089db3e9f74012da/analytics/src/main/java/com/segment/analytics/Analytics.java#L950-L968
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/user/UserTable.java
UserTable.missingCheck
protected void missingCheck(Integer index, String column) { """ Check for missing columns @param index column index @param column user column """ if (index == null) { throw new GeoPackageException("No " + column + " column was found for table '" + tableName + "'"); } }
java
protected void missingCheck(Integer index, String column) { if (index == null) { throw new GeoPackageException("No " + column + " column was found for table '" + tableName + "'"); } }
[ "protected", "void", "missingCheck", "(", "Integer", "index", ",", "String", "column", ")", "{", "if", "(", "index", "==", "null", ")", "{", "throw", "new", "GeoPackageException", "(", "\"No \"", "+", "column", "+", "\" column was found for table '\"", "+", "t...
Check for missing columns @param index column index @param column user column
[ "Check", "for", "missing", "columns" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserTable.java#L194-L199
GoogleCloudPlatform/bigdata-interop
gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageImpl.java
GoogleCloudStorageImpl.getBucket
private Bucket getBucket(String bucketName) throws IOException { """ Gets the bucket with the given name. @param bucketName name of the bucket to get @return the bucket with the given name or null if bucket not found @throws IOException if the bucket exists but cannot be accessed """ logger.atFi...
java
private Bucket getBucket(String bucketName) throws IOException { logger.atFine().log("getBucket(%s)", bucketName); checkArgument(!Strings.isNullOrEmpty(bucketName), "bucketName must not be null or empty"); Storage.Buckets.Get getBucket = configureRequest(gcs.buckets().get(bucketName), bucketName); ...
[ "private", "Bucket", "getBucket", "(", "String", "bucketName", ")", "throws", "IOException", "{", "logger", ".", "atFine", "(", ")", ".", "log", "(", "\"getBucket(%s)\"", ",", "bucketName", ")", ";", "checkArgument", "(", "!", "Strings", ".", "isNullOrEmpty", ...
Gets the bucket with the given name. @param bucketName name of the bucket to get @return the bucket with the given name or null if bucket not found @throws IOException if the bucket exists but cannot be accessed
[ "Gets", "the", "bucket", "with", "the", "given", "name", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageImpl.java#L1789-L1803
CleverTap/clevertap-android-sdk
clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java
CleverTapAPI.instanceWithConfig
@SuppressWarnings( { """ Returns an instance of the CleverTap SDK using CleverTapInstanceConfig. @param context The Android context @param config The {@link CleverTapInstanceConfig} object @return The {@link CleverTapAPI} object """"unused", "WeakerAccess"}) public static CleverTapAPI instanceWithConf...
java
@SuppressWarnings({"unused", "WeakerAccess"}) public static CleverTapAPI instanceWithConfig(Context context, @NonNull CleverTapInstanceConfig config){ //noinspection ConstantConditions if (config == null) { Logger.v("CleverTapInstanceConfig cannot be null"); return null; ...
[ "@", "SuppressWarnings", "(", "{", "\"unused\"", ",", "\"WeakerAccess\"", "}", ")", "public", "static", "CleverTapAPI", "instanceWithConfig", "(", "Context", "context", ",", "@", "NonNull", "CleverTapInstanceConfig", "config", ")", "{", "//noinspection ConstantCondition...
Returns an instance of the CleverTap SDK using CleverTapInstanceConfig. @param context The Android context @param config The {@link CleverTapInstanceConfig} object @return The {@link CleverTapAPI} object
[ "Returns", "an", "instance", "of", "the", "CleverTap", "SDK", "using", "CleverTapInstanceConfig", "." ]
train
https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L514-L530
walkmod/walkmod-core
src/main/java/org/walkmod/OptionsBuilder.java
OptionsBuilder.dynamicArgs
public OptionsBuilder dynamicArgs(Map<String, ?> dynamicArgs) { """ Seths the dynamic arguments @param dynamicArgs Map of dynamic arguments @return Options#DYNAMIC_ARGS """ final Map<String, Object> m = dynamicArgs != null ? Collections.unmodifiableMap(new HashMap<String, Object>(dynamicArgs)) : C...
java
public OptionsBuilder dynamicArgs(Map<String, ?> dynamicArgs){ final Map<String, Object> m = dynamicArgs != null ? Collections.unmodifiableMap(new HashMap<String, Object>(dynamicArgs)) : Collections.<String, Object>emptyMap(); options.put(Options.DYNAMIC_ARGS, m); return this; }
[ "public", "OptionsBuilder", "dynamicArgs", "(", "Map", "<", "String", ",", "?", ">", "dynamicArgs", ")", "{", "final", "Map", "<", "String", ",", "Object", ">", "m", "=", "dynamicArgs", "!=", "null", "?", "Collections", ".", "unmodifiableMap", "(", "new", ...
Seths the dynamic arguments @param dynamicArgs Map of dynamic arguments @return Options#DYNAMIC_ARGS
[ "Seths", "the", "dynamic", "arguments" ]
train
https://github.com/walkmod/walkmod-core/blob/fa79b836894fa00ca4b3e2bd26326a44b778f46f/src/main/java/org/walkmod/OptionsBuilder.java#L273-L279
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringParser.java
StringParser.parseBigInteger
@Nullable public static BigInteger parseBigInteger (@Nullable final String sStr, @Nonnegative final int nRadix) { """ Parse the given {@link String} as {@link BigInteger} with the specified radix. @param sStr The String to parse. May be <code>null</code>. @param nRadix The radix to use. Must be &ge; {@lin...
java
@Nullable public static BigInteger parseBigInteger (@Nullable final String sStr, @Nonnegative final int nRadix) { return parseBigInteger (sStr, nRadix, null); }
[ "@", "Nullable", "public", "static", "BigInteger", "parseBigInteger", "(", "@", "Nullable", "final", "String", "sStr", ",", "@", "Nonnegative", "final", "int", "nRadix", ")", "{", "return", "parseBigInteger", "(", "sStr", ",", "nRadix", ",", "null", ")", ";"...
Parse the given {@link String} as {@link BigInteger} with the specified radix. @param sStr The String to parse. May be <code>null</code>. @param nRadix The radix to use. Must be &ge; {@link Character#MIN_RADIX} and &le; {@link Character#MAX_RADIX}. @return <code>null</code> if the string does not represent a valid val...
[ "Parse", "the", "given", "{", "@link", "String", "}", "as", "{", "@link", "BigInteger", "}", "with", "the", "specified", "radix", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L1399-L1403
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.unlockResource
public void unlockResource(CmsRequestContext context, CmsResource resource) throws CmsException, CmsSecurityException { """ Unlocks a resource.<p> @param context the current request context @param resource the resource to unlock @throws CmsException if something goes wrong @throws CmsSecurityException ...
java
public void unlockResource(CmsRequestContext context, CmsResource resource) throws CmsException, CmsSecurityException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { checkOfflineProject(dbc); checkPermissions(dbc, resource, CmsPermissionSet.ACCESS_WRITE,...
[ "public", "void", "unlockResource", "(", "CmsRequestContext", "context", ",", "CmsResource", "resource", ")", "throws", "CmsException", ",", "CmsSecurityException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", ...
Unlocks a resource.<p> @param context the current request context @param resource the resource to unlock @throws CmsException if something goes wrong @throws CmsSecurityException if the user has insufficient permission for the given resource (write access permission is required) @see CmsObject#unlockResource(String)...
[ "Unlocks", "a", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L6300-L6320
lucee/Lucee
core/src/main/java/lucee/transformer/library/tag/TagLibFactory.java
TagLibFactory.loadFromSystem
private static TagLib[] loadFromSystem(Identification id) throws TagLibException { """ Laedt die Systeminterne TLD. @param saxParser Definition des Sax Parser mit dem die FunctionLib eingelsesen werden soll. @return FunctionLib @throws TagLibException """ if (systemTLDs[CFMLEngine.DIALECT_CFML] == null)...
java
private static TagLib[] loadFromSystem(Identification id) throws TagLibException { if (systemTLDs[CFMLEngine.DIALECT_CFML] == null) { TagLib cfml = new TagLibFactory(null, TLD_BASE, id).getLib(); TagLib lucee = cfml.duplicate(false); systemTLDs[CFMLEngine.DIALECT_CFML] = new TagLibFactory(cfml, TLD_CFM...
[ "private", "static", "TagLib", "[", "]", "loadFromSystem", "(", "Identification", "id", ")", "throws", "TagLibException", "{", "if", "(", "systemTLDs", "[", "CFMLEngine", ".", "DIALECT_CFML", "]", "==", "null", ")", "{", "TagLib", "cfml", "=", "new", "TagLib...
Laedt die Systeminterne TLD. @param saxParser Definition des Sax Parser mit dem die FunctionLib eingelsesen werden soll. @return FunctionLib @throws TagLibException
[ "Laedt", "die", "Systeminterne", "TLD", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/tag/TagLibFactory.java#L520-L529
prestodb/presto
presto-main/src/main/java/com/facebook/presto/util/DateTimeUtils.java
DateTimeUtils.parseTimeWithoutTimeZone
@Deprecated public static long parseTimeWithoutTimeZone(TimeZoneKey timeZoneKey, String value) { """ Parse a string (without a zone) as a value of TIME type, interpreted in {@code timeZoneKey} zone. @return stack representation of legacy TIME type """ return TIME_FORMATTER.withZone(getDateTimeZo...
java
@Deprecated public static long parseTimeWithoutTimeZone(TimeZoneKey timeZoneKey, String value) { return TIME_FORMATTER.withZone(getDateTimeZone(timeZoneKey)).parseMillis(value); }
[ "@", "Deprecated", "public", "static", "long", "parseTimeWithoutTimeZone", "(", "TimeZoneKey", "timeZoneKey", ",", "String", "value", ")", "{", "return", "TIME_FORMATTER", ".", "withZone", "(", "getDateTimeZone", "(", "timeZoneKey", ")", ")", ".", "parseMillis", "...
Parse a string (without a zone) as a value of TIME type, interpreted in {@code timeZoneKey} zone. @return stack representation of legacy TIME type
[ "Parse", "a", "string", "(", "without", "a", "zone", ")", "as", "a", "value", "of", "TIME", "type", "interpreted", "in", "{", "@code", "timeZoneKey", "}", "zone", "." ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/util/DateTimeUtils.java#L364-L368
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSInputStream.java
COSInputStream.readFully
@Override public void readFully(long position, byte[] buffer, int offset, int length) throws IOException { """ Subclass {@code readFully()} operation which only seeks at the start of the series of operations; seeking back at the end. This is significantly higher performance if multiple read attempts ar...
java
@Override public void readFully(long position, byte[] buffer, int offset, int length) throws IOException { checkNotClosed(); validatePositionedReadArgs(position, buffer, offset, length); if (length == 0) { return; } int nread = 0; synchronized (this) { long oldPos = getPos();...
[ "@", "Override", "public", "void", "readFully", "(", "long", "position", ",", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "checkNotClosed", "(", ")", ";", "validatePositionedReadArgs", "(", "posi...
Subclass {@code readFully()} operation which only seeks at the start of the series of operations; seeking back at the end. This is significantly higher performance if multiple read attempts are needed to fetch the data, as it does not break the HTTP connection. To maintain thread safety requirements, this operation i...
[ "Subclass", "{", "@code", "readFully", "()", "}", "operation", "which", "only", "seeks", "at", "the", "start", "of", "the", "series", "of", "operations", ";", "seeking", "back", "at", "the", "end", "." ]
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSInputStream.java#L550-L574
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/util/TreeUtil.java
TreeUtil.findNodeByLabel
public static Treenode findNodeByLabel(Treeview tree, String label, boolean caseSensitive) { """ Search the entire tree for a tree item matching the specified label. @param tree Tree containing the item of interest. @param label Label to match. @param caseSensitive If true, match is case-sensitive. @return T...
java
public static Treenode findNodeByLabel(Treeview tree, String label, boolean caseSensitive) { for (Treenode item : tree.getChildren(Treenode.class)) { if (caseSensitive ? label.equals(item.getLabel()) : label.equalsIgnoreCase(item.getLabel())) { return item; } } ...
[ "public", "static", "Treenode", "findNodeByLabel", "(", "Treeview", "tree", ",", "String", "label", ",", "boolean", "caseSensitive", ")", "{", "for", "(", "Treenode", "item", ":", "tree", ".", "getChildren", "(", "Treenode", ".", "class", ")", ")", "{", "i...
Search the entire tree for a tree item matching the specified label. @param tree Tree containing the item of interest. @param label Label to match. @param caseSensitive If true, match is case-sensitive. @return The matching tree item, or null if not found.
[ "Search", "the", "entire", "tree", "for", "a", "tree", "item", "matching", "the", "specified", "label", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/util/TreeUtil.java#L172-L180
TakahikoKawasaki/nv-websocket-client
src/main/java/com/neovisionaries/ws/client/WebSocketFactory.java
WebSocketFactory.createSocket
public WebSocket createSocket(URI uri, int timeout) throws IOException { """ Create a WebSocket. <p> A socket factory (= a {@link SocketFactory} instance) to create a raw socket (= a {@link Socket} instance) is determined as described below. </p> <ol> <li> If the scheme of the URI is either {@code wss} ...
java
public WebSocket createSocket(URI uri, int timeout) throws IOException { if (uri == null) { throw new IllegalArgumentException("The given URI is null."); } if (timeout < 0) { throw new IllegalArgumentException("The given timeout value is negative."); ...
[ "public", "WebSocket", "createSocket", "(", "URI", "uri", ",", "int", "timeout", ")", "throws", "IOException", "{", "if", "(", "uri", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The given URI is null.\"", ")", ";", "}", "if", ...
Create a WebSocket. <p> A socket factory (= a {@link SocketFactory} instance) to create a raw socket (= a {@link Socket} instance) is determined as described below. </p> <ol> <li> If the scheme of the URI is either {@code wss} or {@code https}, <ol type="i"> <li> If an {@link SSLContext} instance has been set by {@li...
[ "Create", "a", "WebSocket", "." ]
train
https://github.com/TakahikoKawasaki/nv-websocket-client/blob/efaec21181d740ad3808313acf679313179e0825/src/main/java/com/neovisionaries/ws/client/WebSocketFactory.java#L583-L604
looly/hutool
hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java
ThreadUtil.newExecutorByBlockingCoefficient
public static ThreadPoolExecutor newExecutorByBlockingCoefficient(float blockingCoefficient) { """ 获得一个新的线程池<br> 传入阻塞系数,线程池的大小计算公式为:CPU可用核心数 / (1 - 阻塞因子)<br> Blocking Coefficient(阻塞系数) = 阻塞时间/(阻塞时间+使用CPU的时间)<br> 计算密集型任务的阻塞系数为0,而IO密集型任务的阻塞系数则接近于1。 see: http://blog.csdn.net/partner4java/article/details/9417663...
java
public static ThreadPoolExecutor newExecutorByBlockingCoefficient(float blockingCoefficient) { if (blockingCoefficient >= 1 || blockingCoefficient < 0) { throw new IllegalArgumentException("[blockingCoefficient] must between 0 and 1, or equals 0."); } // 最佳的线程数 = CPU可用核心数 / (1 - 阻塞系数) int poolSize = (...
[ "public", "static", "ThreadPoolExecutor", "newExecutorByBlockingCoefficient", "(", "float", "blockingCoefficient", ")", "{", "if", "(", "blockingCoefficient", ">=", "1", "||", "blockingCoefficient", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ...
获得一个新的线程池<br> 传入阻塞系数,线程池的大小计算公式为:CPU可用核心数 / (1 - 阻塞因子)<br> Blocking Coefficient(阻塞系数) = 阻塞时间/(阻塞时间+使用CPU的时间)<br> 计算密集型任务的阻塞系数为0,而IO密集型任务的阻塞系数则接近于1。 see: http://blog.csdn.net/partner4java/article/details/9417663 @param blockingCoefficient 阻塞系数,阻塞因子介于0~1之间的数,阻塞因子越大,线程池中的线程数越多。 @return {@link ThreadPoolExecutor} @since ...
[ "获得一个新的线程池<br", ">", "传入阻塞系数,线程池的大小计算公式为:CPU可用核心数", "/", "(", "1", "-", "阻塞因子", ")", "<br", ">", "Blocking", "Coefficient", "(", "阻塞系数", ")", "=", "阻塞时间/(阻塞时间", "+", "使用CPU的时间)<br", ">", "计算密集型任务的阻塞系数为0,而IO密集型任务的阻塞系数则接近于1。" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/thread/ThreadUtil.java#L75-L83
darcy-framework/darcy-web
src/main/java/com/redhat/darcy/web/HtmlTable.java
HtmlTable.byRowColumn
protected Locator byRowColumn(int rowIndex, int colIndex) { """ Conveniently allows column implementations to lookup cells inside a column without duplicating the effort to come up with xpath for each column's cells. Simply use this method with that column's index. @return A locator that finds a cell based on...
java
protected Locator byRowColumn(int rowIndex, int colIndex) { if (rowIndex < 1) { throw new IllegalArgumentException("Row index must be greater than 0."); } if (colIndex < 1) { throw new IllegalArgumentException("Column index must be greater than 0."); } S...
[ "protected", "Locator", "byRowColumn", "(", "int", "rowIndex", ",", "int", "colIndex", ")", "{", "if", "(", "rowIndex", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Row index must be greater than 0.\"", ")", ";", "}", "if", "(", "col...
Conveniently allows column implementations to lookup cells inside a column without duplicating the effort to come up with xpath for each column's cells. Simply use this method with that column's index. @return A locator that finds a cell based on a row and column index. It does this by constructing an xpath. If a {@co...
[ "Conveniently", "allows", "column", "implementations", "to", "lookup", "cells", "inside", "a", "column", "without", "duplicating", "the", "effort", "to", "come", "up", "with", "xpath", "for", "each", "column", "s", "cells", ".", "Simply", "use", "this", "metho...
train
https://github.com/darcy-framework/darcy-web/blob/4e9b67c9f39d53fec5bf5ad40ddfdc828d9df472/src/main/java/com/redhat/darcy/web/HtmlTable.java#L193-L207
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/HttpURLConnection.java
HttpURLConnection.getPermission
public Permission getPermission() throws IOException { """ Returns a {@link SocketPermission} object representing the permission necessary to connect to the destination host and port. @exception IOException if an error occurs while computing the permission. @return a {@code SocketPermission} object represe...
java
public Permission getPermission() throws IOException { int port = url.getPort(); port = port < 0 ? 80 : port; String host = url.getHost() + ":" + port; Permission permission = new SocketPermission(host, "connect"); return permission; }
[ "public", "Permission", "getPermission", "(", ")", "throws", "IOException", "{", "int", "port", "=", "url", ".", "getPort", "(", ")", ";", "port", "=", "port", "<", "0", "?", "80", ":", "port", ";", "String", "host", "=", "url", ".", "getHost", "(", ...
Returns a {@link SocketPermission} object representing the permission necessary to connect to the destination host and port. @exception IOException if an error occurs while computing the permission. @return a {@code SocketPermission} object representing the permission necessary to connect to the destination host and ...
[ "Returns", "a", "{", "@link", "SocketPermission", "}", "object", "representing", "the", "permission", "necessary", "to", "connect", "to", "the", "destination", "host", "and", "port", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/HttpURLConnection.java#L796-L802
spacecowboy/NoNonsense-FilePicker
sample/src/main/java/com/nononsenseapps/filepicker/sample/multimedia/MultimediaPickerFragment.java
MultimediaPickerFragment.onCreateViewHolder
@NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { """ We override this method and provide some special views for images. This is necessary to work around a bug on older Android versions (4.0.3 for example) where setting a "tint" would just mak...
java
@NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { switch (viewType) { case VIEWTYPE_IMAGE_CHECKABLE: return new CheckableViewHolder(LayoutInflater.from(getActivity()) .inflate(R.layout.listi...
[ "@", "NonNull", "@", "Override", "public", "RecyclerView", ".", "ViewHolder", "onCreateViewHolder", "(", "@", "NonNull", "ViewGroup", "parent", ",", "int", "viewType", ")", "{", "switch", "(", "viewType", ")", "{", "case", "VIEWTYPE_IMAGE_CHECKABLE", ":", "retur...
We override this method and provide some special views for images. This is necessary to work around a bug on older Android versions (4.0.3 for example) where setting a "tint" would just make the entire image a square of solid color. <p/> So the special layouts used here are merely "untinted" copies from the library. @...
[ "We", "override", "this", "method", "and", "provide", "some", "special", "views", "for", "images", ".", "This", "is", "necessary", "to", "work", "around", "a", "bug", "on", "older", "Android", "versions", "(", "4", ".", "0", ".", "3", "for", "example", ...
train
https://github.com/spacecowboy/NoNonsense-FilePicker/blob/396ef7fa5e87791170791f9d94c78f6e42a7679a/sample/src/main/java/com/nononsenseapps/filepicker/sample/multimedia/MultimediaPickerFragment.java#L99-L112
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/RelationalJMapper.java
RelationalJMapper.oneToMany
public <D> D oneToMany(Class<D> destinationClass, final T source,final MappingType mtSource) { """ This method returns a new instance of Target Class with this setting: <table summary =""> <tr> <td><code>NullPointerControl</code></td><td><code>SOURCE</code></td> </tr><tr> <td><code>MappingType</code> of Desti...
java
public <D> D oneToMany(Class<D> destinationClass, final T source,final MappingType mtSource) { try{ return this.<D,T>getJMapper(relationalOneToManyMapper,destinationClass).getDestination(source,mtSource); } catch (Exception e) { return (D) this.destinationClassControl(e,destinationClass); } }
[ "public", "<", "D", ">", "D", "oneToMany", "(", "Class", "<", "D", ">", "destinationClass", ",", "final", "T", "source", ",", "final", "MappingType", "mtSource", ")", "{", "try", "{", "return", "this", ".", "<", "D", ",", "T", ">", "getJMapper", "(",...
This method returns a new instance of Target Class with this setting: <table summary =""> <tr> <td><code>NullPointerControl</code></td><td><code>SOURCE</code></td> </tr><tr> <td><code>MappingType</code> of Destination</td><td><code>ALL_FIELDS</code></td> </tr><tr> <td><code>MappingType</code> of Source</td><td>mtSource...
[ "This", "method", "returns", "a", "new", "instance", "of", "Target", "Class", "with", "this", "setting", ":", "<table", "summary", "=", ">", "<tr", ">", "<td", ">", "<code", ">", "NullPointerControl<", "/", "code", ">", "<", "/", "td", ">", "<td", ">",...
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/RelationalJMapper.java#L626-L629
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getImploded
@Nonnull @SafeVarargs public static <ELEMENTTYPE> String getImploded (@Nullable final ELEMENTTYPE... aElements) { """ Get a concatenated String from all elements of the passed array, without a separator. @param aElements The container to convert. May be <code>null</code> or empty. @return The concatenate...
java
@Nonnull @SafeVarargs public static <ELEMENTTYPE> String getImploded (@Nullable final ELEMENTTYPE... aElements) { return getImplodedMapped (aElements, String::valueOf); }
[ "@", "Nonnull", "@", "SafeVarargs", "public", "static", "<", "ELEMENTTYPE", ">", "String", "getImploded", "(", "@", "Nullable", "final", "ELEMENTTYPE", "...", "aElements", ")", "{", "return", "getImplodedMapped", "(", "aElements", ",", "String", "::", "valueOf",...
Get a concatenated String from all elements of the passed array, without a separator. @param aElements The container to convert. May be <code>null</code> or empty. @return The concatenated string. @param <ELEMENTTYPE> The type of elements to be imploded.
[ "Get", "a", "concatenated", "String", "from", "all", "elements", "of", "the", "passed", "array", "without", "a", "separator", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L1167-L1172
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java
ComputeNodesImpl.deleteUser
public void deleteUser(String poolId, String nodeId, String userName) { """ Deletes a user account from the specified compute node. You can delete a user account to a node only when it is in the idle or running state. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the...
java
public void deleteUser(String poolId, String nodeId, String userName) { deleteUserWithServiceResponseAsync(poolId, nodeId, userName).toBlocking().single().body(); }
[ "public", "void", "deleteUser", "(", "String", "poolId", ",", "String", "nodeId", ",", "String", "userName", ")", "{", "deleteUserWithServiceResponseAsync", "(", "poolId", ",", "nodeId", ",", "userName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ...
Deletes a user account from the specified compute node. You can delete a user account to a node only when it is in the idle or running state. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the machine on which you want to delete a user account. @param userName The name of the ...
[ "Deletes", "a", "user", "account", "from", "the", "specified", "compute", "node", ".", "You", "can", "delete", "a", "user", "account", "to", "a", "node", "only", "when", "it", "is", "in", "the", "idle", "or", "running", "state", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/ComputeNodesImpl.java#L401-L403
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java
XmlStringBuilder.optLongAttribute
public XmlStringBuilder optLongAttribute(String name, Long value) { """ Add the given attribute if value not null and {@code value => 0}. @param name @param value @return a reference to this object """ if (value != null && value >= 0) { attribute(name, Long.toString(value)); } ...
java
public XmlStringBuilder optLongAttribute(String name, Long value) { if (value != null && value >= 0) { attribute(name, Long.toString(value)); } return this; }
[ "public", "XmlStringBuilder", "optLongAttribute", "(", "String", "name", ",", "Long", "value", ")", "{", "if", "(", "value", "!=", "null", "&&", "value", ">=", "0", ")", "{", "attribute", "(", "name", ",", "Long", ".", "toString", "(", "value", ")", ")...
Add the given attribute if value not null and {@code value => 0}. @param name @param value @return a reference to this object
[ "Add", "the", "given", "attribute", "if", "value", "not", "null", "and", "{", "@code", "value", "=", ">", "0", "}", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java#L351-L356
EasyinnovaSL/Tiff-Library-4J
src/main/java/com/easyinnova/tiff/profiles/BaselineProfile.java
BaselineProfile.CheckCIELab
private void CheckCIELab(IfdTags metadata, int n) { """ Check CIELab. @param metadata the metadata @param n the IFD number """ // BitsPerSample if (!metadata.containsTagId(TiffTags.getTagId("BitsPerSample"))) { validation.addErrorLoc("Missing BitsPerSample", "IFD" + n); } else { for...
java
private void CheckCIELab(IfdTags metadata, int n) { // BitsPerSample if (!metadata.containsTagId(TiffTags.getTagId("BitsPerSample"))) { validation.addErrorLoc("Missing BitsPerSample", "IFD" + n); } else { for (abstractTiffType vi : metadata.get(TiffTags.getTagId("BitsPerSample")).getValue()) { ...
[ "private", "void", "CheckCIELab", "(", "IfdTags", "metadata", ",", "int", "n", ")", "{", "// BitsPerSample", "if", "(", "!", "metadata", ".", "containsTagId", "(", "TiffTags", ".", "getTagId", "(", "\"BitsPerSample\"", ")", ")", ")", "{", "validation", ".", ...
Check CIELab. @param metadata the metadata @param n the IFD number
[ "Check", "CIELab", "." ]
train
https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/profiles/BaselineProfile.java#L411-L423
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDValidation.java
SDValidation.validateInteger
protected static void validateInteger(String opName, SDVariable v) { """ Validate that the operation is being applied on an integer type SDVariable @param opName Operation name to print in the exception @param v Variable to validate datatype for (input to operation) """ if (v == null) ...
java
protected static void validateInteger(String opName, SDVariable v) { if (v == null) return; if (!v.dataType().isIntType()) throw new IllegalStateException("Cannot apply operation \"" + opName + "\" to variable \"" + v.getVarName() + "\" with non-integer data type " + v.dataType()...
[ "protected", "static", "void", "validateInteger", "(", "String", "opName", ",", "SDVariable", "v", ")", "{", "if", "(", "v", "==", "null", ")", "return", ";", "if", "(", "!", "v", ".", "dataType", "(", ")", ".", "isIntType", "(", ")", ")", "throw", ...
Validate that the operation is being applied on an integer type SDVariable @param opName Operation name to print in the exception @param v Variable to validate datatype for (input to operation)
[ "Validate", "that", "the", "operation", "is", "being", "applied", "on", "an", "integer", "type", "SDVariable" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDValidation.java#L62-L67
talenguyen/PrettySharedPreferences
prettysharedpreferences/src/main/java/com/tale/prettysharedpreferences/PrettySharedPreferences.java
PrettySharedPreferences.getFloatEditor
protected FloatEditor getFloatEditor(String key) { """ Call to get a {@link com.tale.prettysharedpreferences.FloatEditor} object for the specific key. <code>NOTE:</code> There is a unique {@link com.tale.prettysharedpreferences.TypeEditor} object for a unique key. @param key The name of the preference. @return...
java
protected FloatEditor getFloatEditor(String key) { TypeEditor typeEditor = TYPE_EDITOR_MAP.get(key); if (typeEditor == null) { typeEditor = new FloatEditor(this, sharedPreferences, key); TYPE_EDITOR_MAP.put(key, typeEditor); } else if (!(typeEditor instanceof FloatEditor)...
[ "protected", "FloatEditor", "getFloatEditor", "(", "String", "key", ")", "{", "TypeEditor", "typeEditor", "=", "TYPE_EDITOR_MAP", ".", "get", "(", "key", ")", ";", "if", "(", "typeEditor", "==", "null", ")", "{", "typeEditor", "=", "new", "FloatEditor", "(",...
Call to get a {@link com.tale.prettysharedpreferences.FloatEditor} object for the specific key. <code>NOTE:</code> There is a unique {@link com.tale.prettysharedpreferences.TypeEditor} object for a unique key. @param key The name of the preference. @return {@link com.tale.prettysharedpreferences.FloatEditor} object to ...
[ "Call", "to", "get", "a", "{" ]
train
https://github.com/talenguyen/PrettySharedPreferences/blob/b97edf86c8fa65be2165f2cd790545c78c971c22/prettysharedpreferences/src/main/java/com/tale/prettysharedpreferences/PrettySharedPreferences.java#L110-L119
Mthwate/DatLib
src/main/java/com/mthwate/datlib/HashUtils.java
HashUtils.sha1Hex
public static String sha1Hex(String data, Charset charset) throws NoSuchAlgorithmException { """ Hashes a string using the SHA-1 algorithm. Returns a hexadecimal result. @since 1.1 @param data the string to hash @param charset the charset of the string @return the hexadecimal SHA-1 hash of the string @throw...
java
public static String sha1Hex(String data, Charset charset) throws NoSuchAlgorithmException { return sha1Hex(data.getBytes(charset)); }
[ "public", "static", "String", "sha1Hex", "(", "String", "data", ",", "Charset", "charset", ")", "throws", "NoSuchAlgorithmException", "{", "return", "sha1Hex", "(", "data", ".", "getBytes", "(", "charset", ")", ")", ";", "}" ]
Hashes a string using the SHA-1 algorithm. Returns a hexadecimal result. @since 1.1 @param data the string to hash @param charset the charset of the string @return the hexadecimal SHA-1 hash of the string @throws NoSuchAlgorithmException the algorithm is not supported by existing providers
[ "Hashes", "a", "string", "using", "the", "SHA", "-", "1", "algorithm", ".", "Returns", "a", "hexadecimal", "result", "." ]
train
https://github.com/Mthwate/DatLib/blob/f0b3a9f9cf6fdc773d4f86234ebd95986c9b6077/src/main/java/com/mthwate/datlib/HashUtils.java#L286-L288
mangstadt/biweekly
src/main/java/biweekly/io/xml/XCalElement.java
XCalElement.firstValue
public XCalValue firstValue() { """ Finds the first child element that has the xCard namespace and returns its data type and value. If no such element is found, the parent {@link XCalElement}'s text content, along with a null data type, is returned. @return the value and data type """ for (Element child ...
java
public XCalValue firstValue() { for (Element child : children()) { String childNamespace = child.getNamespaceURI(); if (XCAL_NS.equals(childNamespace)) { ICalDataType dataType = toDataType(child.getLocalName()); String value = child.getTextContent(); return new XCalValue(dataType, value); } } ...
[ "public", "XCalValue", "firstValue", "(", ")", "{", "for", "(", "Element", "child", ":", "children", "(", ")", ")", "{", "String", "childNamespace", "=", "child", ".", "getNamespaceURI", "(", ")", ";", "if", "(", "XCAL_NS", ".", "equals", "(", "childName...
Finds the first child element that has the xCard namespace and returns its data type and value. If no such element is found, the parent {@link XCalElement}'s text content, along with a null data type, is returned. @return the value and data type
[ "Finds", "the", "first", "child", "element", "that", "has", "the", "xCard", "namespace", "and", "returns", "its", "data", "type", "and", "value", ".", "If", "no", "such", "element", "is", "found", "the", "parent", "{" ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/io/xml/XCalElement.java#L227-L238
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/transaction/internal/DefaultTransactionManager.java
DefaultTransactionManager.canRecover
private boolean canRecover(final TxConfig config, final Throwable e) { """ Returns True if rollback DID NOT HAPPEN (i.e. if commit should continue). @param config transaction configuration @param e The exception to test for rollback """ boolean commit = config.getRollbackOn().size() > 0; ...
java
private boolean canRecover(final TxConfig config, final Throwable e) { boolean commit = config.getRollbackOn().size() > 0; //check rollback clauses for (Class<? extends Exception> rollBackOn : config.getRollbackOn()) { //if one matched, try to perform a rollback if (rol...
[ "private", "boolean", "canRecover", "(", "final", "TxConfig", "config", ",", "final", "Throwable", "e", ")", "{", "boolean", "commit", "=", "config", ".", "getRollbackOn", "(", ")", ".", "size", "(", ")", ">", "0", ";", "//check rollback clauses", "for", "...
Returns True if rollback DID NOT HAPPEN (i.e. if commit should continue). @param config transaction configuration @param e The exception to test for rollback
[ "Returns", "True", "if", "rollback", "DID", "NOT", "HAPPEN", "(", "i", ".", "e", ".", "if", "commit", "should", "continue", ")", "." ]
train
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/transaction/internal/DefaultTransactionManager.java#L151-L174
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WPopupRenderer.java
WPopupRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WPopup. @param component the WPopup to paint. @param renderContext the RenderContext to paint to. """ WPopup popup = (WPopup) component; XmlStringBuilder xml = renderContext.getWr...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WPopup popup = (WPopup) component; XmlStringBuilder xml = renderContext.getWriter(); int width = popup.getWidth(); int height = popup.getHeight(); String targetWindow = popup.getTargetWindow(); xml.append...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WPopup", "popup", "=", "(", "WPopup", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderContext", ...
Paints the given WPopup. @param component the WPopup to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WPopup", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WPopupRenderer.java#L24-L41
lionsoul2014/jcseg
jcseg-core/src/main/java/org/lionsoul/jcseg/extractor/SummaryExtractor.java
SummaryExtractor.getSummaryFromFile
public String getSummaryFromFile(String file, int length) throws IOException { """ get document summary from a file @param file @param length @return String @throws IOException """ return getSummary(new FileReader(file), length); }
java
public String getSummaryFromFile(String file, int length) throws IOException { return getSummary(new FileReader(file), length); }
[ "public", "String", "getSummaryFromFile", "(", "String", "file", ",", "int", "length", ")", "throws", "IOException", "{", "return", "getSummary", "(", "new", "FileReader", "(", "file", ")", ",", "length", ")", ";", "}" ]
get document summary from a file @param file @param length @return String @throws IOException
[ "get", "document", "summary", "from", "a", "file" ]
train
https://github.com/lionsoul2014/jcseg/blob/7c8a912e3bbcaf4f8de701180b9c24e2e444a94b/jcseg-core/src/main/java/org/lionsoul/jcseg/extractor/SummaryExtractor.java#L97-L100
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/console/ConsoleMenu.java
ConsoleMenu.getBigDecimal
public static BigDecimal getBigDecimal(final String title, final BigDecimal defaultValue) { """ Gets an BigDecimal from the System.in @param title for the command line @return int as entered by the user of the console app """ BigDecimal opt; do { try { fin...
java
public static BigDecimal getBigDecimal(final String title, final BigDecimal defaultValue) { BigDecimal opt; do { try { final String val = ConsoleMenu.getString(title + DEFAULT_TITLE + defaultValue + ")"); if (val.length() == 0) { op...
[ "public", "static", "BigDecimal", "getBigDecimal", "(", "final", "String", "title", ",", "final", "BigDecimal", "defaultValue", ")", "{", "BigDecimal", "opt", ";", "do", "{", "try", "{", "final", "String", "val", "=", "ConsoleMenu", ".", "getString", "(", "t...
Gets an BigDecimal from the System.in @param title for the command line @return int as entered by the user of the console app
[ "Gets", "an", "BigDecimal", "from", "the", "System", ".", "in" ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/console/ConsoleMenu.java#L258-L275
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java
DateFunctions.strToZoneName
public static Expression strToZoneName(Expression expression, String zoneName) { """ Returned expression results in a conversion of the supported time stamp string to the named time zone. """ return x("STR_TO_ZONE_NAME(" + expression.toString() + ", \"" + zoneName + "\")"); }
java
public static Expression strToZoneName(Expression expression, String zoneName) { return x("STR_TO_ZONE_NAME(" + expression.toString() + ", \"" + zoneName + "\")"); }
[ "public", "static", "Expression", "strToZoneName", "(", "Expression", "expression", ",", "String", "zoneName", ")", "{", "return", "x", "(", "\"STR_TO_ZONE_NAME(\"", "+", "expression", ".", "toString", "(", ")", "+", "\", \\\"\"", "+", "zoneName", "+", "\"\\\")\...
Returned expression results in a conversion of the supported time stamp string to the named time zone.
[ "Returned", "expression", "results", "in", "a", "conversion", "of", "the", "supported", "time", "stamp", "string", "to", "the", "named", "time", "zone", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java#L318-L320
nutzam/nutzwx
src/main/java/org/nutz/weixin/impl/WxApi2Impl.java
WxApi2Impl.card_code_get
@Override public WxResp card_code_get(String code, String cardId, Boolean checkConsume) { """ 微信卡券:查询Code @author JinYi @param code 卡券Code码,一张卡券的唯一标识,必填 @param cardId 卡券ID代表一类卡券,null表示不填此参数。自定义code卡券必填 @param checkConsume 是否校验code核销状态,填入true和false时的code异常状态返回数据不同,null表示不填此参数 @return """ NutMap ...
java
@Override public WxResp card_code_get(String code, String cardId, Boolean checkConsume) { NutMap body = NutMap.NEW().addv("code", code); if (cardId != null) { body.addv("card_id", cardId); } if (checkConsume != null) { body.addv("check_consume", checkConsume); } // 由于查询Cod...
[ "@", "Override", "public", "WxResp", "card_code_get", "(", "String", "code", ",", "String", "cardId", ",", "Boolean", "checkConsume", ")", "{", "NutMap", "body", "=", "NutMap", ".", "NEW", "(", ")", ".", "addv", "(", "\"code\"", ",", "code", ")", ";", ...
微信卡券:查询Code @author JinYi @param code 卡券Code码,一张卡券的唯一标识,必填 @param cardId 卡券ID代表一类卡券,null表示不填此参数。自定义code卡券必填 @param checkConsume 是否校验code核销状态,填入true和false时的code异常状态返回数据不同,null表示不填此参数 @return
[ "微信卡券:查询Code" ]
train
https://github.com/nutzam/nutzwx/blob/e6c8831b75f8a96bcc060b0c5562b882eefcf5ee/src/main/java/org/nutz/weixin/impl/WxApi2Impl.java#L333-L345
igniterealtime/Smack
smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpManager.java
OpenPgpManager.createPubkeyElement
private PubkeyElement createPubkeyElement(BareJid owner, OpenPgpV4Fingerprint fingerprint, Date date) throws MissingOpenPgpKeyException, IOException, PGPException { """ Create a {@link PubkeyElement} which conta...
java
private PubkeyElement createPubkeyElement(BareJid owner, OpenPgpV4Fingerprint fingerprint, Date date) throws MissingOpenPgpKeyException, IOException, PGPException { PGPPublicKeyRing ring = provider.getStore()...
[ "private", "PubkeyElement", "createPubkeyElement", "(", "BareJid", "owner", ",", "OpenPgpV4Fingerprint", "fingerprint", ",", "Date", "date", ")", "throws", "MissingOpenPgpKeyException", ",", "IOException", ",", "PGPException", "{", "PGPPublicKeyRing", "ring", "=", "prov...
Create a {@link PubkeyElement} which contains the OpenPGP public key of {@code owner} which belongs to the {@link OpenPgpV4Fingerprint} {@code fingerprint}. @param owner owner of the public key @param fingerprint fingerprint of the key @param date date of creation of the element @return {@link PubkeyElement} containin...
[ "Create", "a", "{", "@link", "PubkeyElement", "}", "which", "contains", "the", "OpenPGP", "public", "key", "of", "{", "@code", "owner", "}", "which", "belongs", "to", "the", "{", "@link", "OpenPgpV4Fingerprint", "}", "{", "@code", "fingerprint", "}", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpManager.java#L618-L628
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/analyzer/RubyBundleAuditAnalyzer.java
RubyBundleAuditAnalyzer.createVulnerability
private Vulnerability createVulnerability(String parentName, Dependency dependency, String gem, String nextLine) throws CpeValidationException { """ Creates a vulnerability. @param parentName the parent name @param dependency the dependency @param gem the gem name @param nextLine the line to parse @return t...
java
private Vulnerability createVulnerability(String parentName, Dependency dependency, String gem, String nextLine) throws CpeValidationException { Vulnerability vulnerability = null; if (null != dependency) { final String version = nextLine.substring(VERSION.length()); dependency.a...
[ "private", "Vulnerability", "createVulnerability", "(", "String", "parentName", ",", "Dependency", "dependency", ",", "String", "gem", ",", "String", "nextLine", ")", "throws", "CpeValidationException", "{", "Vulnerability", "vulnerability", "=", "null", ";", "if", ...
Creates a vulnerability. @param parentName the parent name @param dependency the dependency @param gem the gem name @param nextLine the line to parse @return the vulnerability @throws CpeValidationException thrown if there is an error building the CPE vulnerability object
[ "Creates", "a", "vulnerability", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/RubyBundleAuditAnalyzer.java#L461-L495
igniterealtime/Smack
smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java
RosterEntry.toRosterItem
private static RosterPacket.Item toRosterItem(RosterEntry entry, String name, boolean includeAskAttribute) { """ Convert a roster entry with the given name to a roster item. As per RFC 6121 § 2.1.2.2., clients MUST NOT include the 'ask' attribute, thus set {@code includeAskAttribute} to {@code false}. @param e...
java
private static RosterPacket.Item toRosterItem(RosterEntry entry, String name, boolean includeAskAttribute) { RosterPacket.Item item = new RosterPacket.Item(entry.getJid(), name); item.setItemType(entry.getType()); if (includeAskAttribute) { item.setSubscriptionPending(entry.isSubscri...
[ "private", "static", "RosterPacket", ".", "Item", "toRosterItem", "(", "RosterEntry", "entry", ",", "String", "name", ",", "boolean", "includeAskAttribute", ")", "{", "RosterPacket", ".", "Item", "item", "=", "new", "RosterPacket", ".", "Item", "(", "entry", "...
Convert a roster entry with the given name to a roster item. As per RFC 6121 § 2.1.2.2., clients MUST NOT include the 'ask' attribute, thus set {@code includeAskAttribute} to {@code false}. @param entry the roster entry. @param name the name of the roster item. @param includeAskAttribute whether or not to include the ...
[ "Convert", "a", "roster", "entry", "with", "the", "given", "name", "to", "a", "roster", "item", ".", "As", "per", "RFC", "6121", "§", "2", ".", "1", ".", "2", ".", "2", ".", "clients", "MUST", "NOT", "include", "the", "ask", "attribute", "thus", "s...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-im/src/main/java/org/jivesoftware/smack/roster/RosterEntry.java#L319-L331
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectComplementOfImpl_CustomFieldSerializer.java
OWLObjectComplementOfImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectComplementOfImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.goog...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectComplementOfImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLObjectComplementOfImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectComplementOfImpl_CustomFieldSerializer.java#L89-L92
upwork/java-upwork
src/com/Upwork/api/Routers/Reports/Time.java
Time.getByFreelancerLimited
public JSONObject getByFreelancerLimited(String freelancerId, HashMap<String, String> params) throws JSONException { """ Generating Freelancer's Specific Reports (hide financial info) @param freelancerId Freelancer's ID @param params Parameters @throws JSONException If error occurred @return {@link JSONO...
java
public JSONObject getByFreelancerLimited(String freelancerId, HashMap<String, String> params) throws JSONException { return oClient.get("/timereports/v1/providers/" + freelancerId + "/hours", params); }
[ "public", "JSONObject", "getByFreelancerLimited", "(", "String", "freelancerId", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "oClient", ".", "get", "(", "\"/timereports/v1/providers/\"", "+", "freelance...
Generating Freelancer's Specific Reports (hide financial info) @param freelancerId Freelancer's ID @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Generating", "Freelancer", "s", "Specific", "Reports", "(", "hide", "financial", "info", ")" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Reports/Time.java#L130-L132
tractionsoftware/gwt-traction
src/main/java/com/tractionsoftware/gwt/user/client/ui/impl/UTCDateBoxImplHtml5.java
UTCDateBoxImplHtml5.long2string
private String long2string(Long value, DateTimeFormat fmt) { """ Formats the supplied value using the specified DateTimeFormat. @return "" if the value is null """ // for html5 inputs, use "" for no value if (value == null) return ""; Date date = UTCDateBox.utc2date(value); r...
java
private String long2string(Long value, DateTimeFormat fmt) { // for html5 inputs, use "" for no value if (value == null) return ""; Date date = UTCDateBox.utc2date(value); return date != null ? fmt.format(date) : null; }
[ "private", "String", "long2string", "(", "Long", "value", ",", "DateTimeFormat", "fmt", ")", "{", "// for html5 inputs, use \"\" for no value", "if", "(", "value", "==", "null", ")", "return", "\"\"", ";", "Date", "date", "=", "UTCDateBox", ".", "utc2date", "(",...
Formats the supplied value using the specified DateTimeFormat. @return "" if the value is null
[ "Formats", "the", "supplied", "value", "using", "the", "specified", "DateTimeFormat", "." ]
train
https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/ui/impl/UTCDateBoxImplHtml5.java#L152-L157
Whiley/WhileyCompiler
src/main/java/wyil/type/subtyping/SubtypeOperator.java
SubtypeOperator.isVoid
public boolean isVoid(SemanticType type, LifetimeRelation lifetimes) { """ <p> Check whether a type is equivalent to <code>void</code> or not. The complexities of Whiley's type system mean that this is not always obvious. For example, the type <code>int&(!int)</code> is equivalent to <code>void</code>. Likewis...
java
public boolean isVoid(SemanticType type, LifetimeRelation lifetimes) { return emptinessTest.isVoid(type, EmptinessTest.PositiveMax, type, EmptinessTest.PositiveMax, lifetimes); }
[ "public", "boolean", "isVoid", "(", "SemanticType", "type", ",", "LifetimeRelation", "lifetimes", ")", "{", "return", "emptinessTest", ".", "isVoid", "(", "type", ",", "EmptinessTest", ".", "PositiveMax", ",", "type", ",", "EmptinessTest", ".", "PositiveMax", ",...
<p> Check whether a type is equivalent to <code>void</code> or not. The complexities of Whiley's type system mean that this is not always obvious. For example, the type <code>int&(!int)</code> is equivalent to <code>void</code>. Likewise, is the type <code>!any</code>. Another interesting case is the following: </p> <...
[ "<p", ">", "Check", "whether", "a", "type", "is", "equivalent", "to", "<code", ">", "void<", "/", "code", ">", "or", "not", ".", "The", "complexities", "of", "Whiley", "s", "type", "system", "mean", "that", "this", "is", "not", "always", "obvious", "."...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/type/subtyping/SubtypeOperator.java#L142-L144
fuwjax/ev-oss
gild/src/main/java/org/fuwjax/oss/gild/Gild.java
Gild.with
public Gild with(final String serviceName, final ServiceProxy proxy) { """ Adds a service proxy to this harness. @param serviceName the name of the service @param proxy the service proxy @return this harness """ proxies.put(serviceName, proxy); return this; }
java
public Gild with(final String serviceName, final ServiceProxy proxy) { proxies.put(serviceName, proxy); return this; }
[ "public", "Gild", "with", "(", "final", "String", "serviceName", ",", "final", "ServiceProxy", "proxy", ")", "{", "proxies", ".", "put", "(", "serviceName", ",", "proxy", ")", ";", "return", "this", ";", "}" ]
Adds a service proxy to this harness. @param serviceName the name of the service @param proxy the service proxy @return this harness
[ "Adds", "a", "service", "proxy", "to", "this", "harness", "." ]
train
https://github.com/fuwjax/ev-oss/blob/cbd88592e9b2fa9547c3bdd41e52e790061a2253/gild/src/main/java/org/fuwjax/oss/gild/Gild.java#L162-L165
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java
FTPFileSystem.isFile
private boolean isFile(FTPClient client, Path file) { """ Convenience method, so that we don't open a new connection when using this method from within another method. Otherwise every API invocation incurs the overhead of opening/closing a TCP connection. """ try { return !getFileStatus(client, fil...
java
private boolean isFile(FTPClient client, Path file) { try { return !getFileStatus(client, file).isDir(); } catch (FileNotFoundException e) { return false; // file does not exist } catch (IOException ioe) { throw new FTPException("File check failed", ioe); } }
[ "private", "boolean", "isFile", "(", "FTPClient", "client", ",", "Path", "file", ")", "{", "try", "{", "return", "!", "getFileStatus", "(", "client", ",", "file", ")", ".", "isDir", "(", ")", ";", "}", "catch", "(", "FileNotFoundException", "e", ")", "...
Convenience method, so that we don't open a new connection when using this method from within another method. Otherwise every API invocation incurs the overhead of opening/closing a TCP connection.
[ "Convenience", "method", "so", "that", "we", "don", "t", "open", "a", "new", "connection", "when", "using", "this", "method", "from", "within", "another", "method", ".", "Otherwise", "every", "API", "invocation", "incurs", "the", "overhead", "of", "opening", ...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java#L494-L502
googleapis/google-cloud-java
google-cloud-clients/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceClient.java
ErrorStatsServiceClient.listEvents
public final ListEventsPagedResponse listEvents(String projectName, String groupId) { """ Lists the specified events. <p>Sample code: <pre><code> try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) { ProjectName projectName = ProjectName.of("[PROJECT]"); String groupId...
java
public final ListEventsPagedResponse listEvents(String projectName, String groupId) { ListEventsRequest request = ListEventsRequest.newBuilder().setProjectName(projectName).setGroupId(groupId).build(); return listEvents(request); }
[ "public", "final", "ListEventsPagedResponse", "listEvents", "(", "String", "projectName", ",", "String", "groupId", ")", "{", "ListEventsRequest", "request", "=", "ListEventsRequest", ".", "newBuilder", "(", ")", ".", "setProjectName", "(", "projectName", ")", ".", ...
Lists the specified events. <p>Sample code: <pre><code> try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) { ProjectName projectName = ProjectName.of("[PROJECT]"); String groupId = ""; for (ErrorEvent element : errorStatsServiceClient.listEvents(projectName.toString(), groupId).i...
[ "Lists", "the", "specified", "events", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceClient.java#L387-L391
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MessagesApi.java
MessagesApi.getMessageSnapshots
public SnapshotResponses getMessageSnapshots(String sdids, Boolean includeTimestamp) throws ApiException { """ Get Message Snapshots Get message snapshots. @param sdids Device IDs for which the snapshots are requested. Max 100 device ids per call. (required) @param includeTimestamp Indicates whether to return t...
java
public SnapshotResponses getMessageSnapshots(String sdids, Boolean includeTimestamp) throws ApiException { ApiResponse<SnapshotResponses> resp = getMessageSnapshotsWithHttpInfo(sdids, includeTimestamp); return resp.getData(); }
[ "public", "SnapshotResponses", "getMessageSnapshots", "(", "String", "sdids", ",", "Boolean", "includeTimestamp", ")", "throws", "ApiException", "{", "ApiResponse", "<", "SnapshotResponses", ">", "resp", "=", "getMessageSnapshotsWithHttpInfo", "(", "sdids", ",", "includ...
Get Message Snapshots Get message snapshots. @param sdids Device IDs for which the snapshots are requested. Max 100 device ids per call. (required) @param includeTimestamp Indicates whether to return timestamps of the last update for each field. (optional) @return SnapshotResponses @throws ApiException If fail to call ...
[ "Get", "Message", "Snapshots", "Get", "message", "snapshots", "." ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MessagesApi.java#L706-L709
stevespringett/Alpine
alpine/src/main/java/alpine/auth/LdapConnectionWrapper.java
LdapConnectionWrapper.getAttribute
public String getAttribute(final Attributes attributes, final String attributeName) throws NamingException { """ Retrieves an attribute by its name. @param attributes the list of attributes to query on @param attributeName the name of the attribute to return @return the value of the attribute, or null if not fo...
java
public String getAttribute(final Attributes attributes, final String attributeName) throws NamingException { if (attributes == null || attributes.size() == 0) { return null; } else { final Attribute attribute = attributes.get(attributeName); if (attribute != null) { ...
[ "public", "String", "getAttribute", "(", "final", "Attributes", "attributes", ",", "final", "String", "attributeName", ")", "throws", "NamingException", "{", "if", "(", "attributes", "==", "null", "||", "attributes", ".", "size", "(", ")", "==", "0", ")", "{...
Retrieves an attribute by its name. @param attributes the list of attributes to query on @param attributeName the name of the attribute to return @return the value of the attribute, or null if not found @throws NamingException if an exception is thrown @since 1.4.0
[ "Retrieves", "an", "attribute", "by", "its", "name", "." ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/auth/LdapConnectionWrapper.java#L250-L263
OpenLiberty/open-liberty
dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAExEntityManager.java
JPAExEntityManager.toStringPuIds
private static final String toStringPuIds(String desc, JPAPuId[] puids) { """ Helper method to convert the input puids to a String for tr.debug(). """ StringBuilder sbuf = new StringBuilder(desc); sbuf.append('\n'); for (JPAPuId puid : puids) { sbuf.append(" ") ...
java
private static final String toStringPuIds(String desc, JPAPuId[] puids) { StringBuilder sbuf = new StringBuilder(desc); sbuf.append('\n'); for (JPAPuId puid : puids) { sbuf.append(" ") .append(puid) .append('\n'); ...
[ "private", "static", "final", "String", "toStringPuIds", "(", "String", "desc", ",", "JPAPuId", "[", "]", "puids", ")", "{", "StringBuilder", "sbuf", "=", "new", "StringBuilder", "(", "desc", ")", ";", "sbuf", ".", "append", "(", "'", "'", ")", ";", "f...
Helper method to convert the input puids to a String for tr.debug().
[ "Helper", "method", "to", "convert", "the", "input", "puids", "to", "a", "String", "for", "tr", ".", "debug", "()", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAExEntityManager.java#L777-L788
VoltDB/voltdb
third_party/java/src/org/apache/commons_voltpatches/cli/DefaultParser.java
DefaultParser.handleLongOptionWithoutEqual
private void handleLongOptionWithoutEqual(String token) throws ParseException { """ Handles the following tokens: --L -L --l -l @param token the command line token to handle """ List<String> matchingOpts = options.getMatchingOptions(token); if (matchingOpts.isEmpty()) { ...
java
private void handleLongOptionWithoutEqual(String token) throws ParseException { List<String> matchingOpts = options.getMatchingOptions(token); if (matchingOpts.isEmpty()) { handleUnknownToken(currentToken); } else if (matchingOpts.size() > 1) { ...
[ "private", "void", "handleLongOptionWithoutEqual", "(", "String", "token", ")", "throws", "ParseException", "{", "List", "<", "String", ">", "matchingOpts", "=", "options", ".", "getMatchingOptions", "(", "token", ")", ";", "if", "(", "matchingOpts", ".", "isEmp...
Handles the following tokens: --L -L --l -l @param token the command line token to handle
[ "Handles", "the", "following", "tokens", ":" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/commons_voltpatches/cli/DefaultParser.java#L389-L404
Pi4J/pi4j
pi4j-core/src/main/java/com/pi4j/io/gpio/BpiPin.java
BpiPin.createDigitalPin
protected static Pin createDigitalPin(int address, String name) { """ this pin is permanently pulled up; pin pull settings do not work """ return createDigitalPin(BpiGpioProvider.NAME, address, name); }
java
protected static Pin createDigitalPin(int address, String name) { return createDigitalPin(BpiGpioProvider.NAME, address, name); }
[ "protected", "static", "Pin", "createDigitalPin", "(", "int", "address", ",", "String", "name", ")", "{", "return", "createDigitalPin", "(", "BpiGpioProvider", ".", "NAME", ",", "address", ",", "name", ")", ";", "}" ]
this pin is permanently pulled up; pin pull settings do not work
[ "this", "pin", "is", "permanently", "pulled", "up", ";", "pin", "pull", "settings", "do", "not", "work" ]
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-core/src/main/java/com/pi4j/io/gpio/BpiPin.java#L76-L78
stevespringett/Alpine
alpine/src/main/java/alpine/upgrade/UpgradeMetaProcessor.java
UpgradeMetaProcessor.installUpgrade
public void installUpgrade(final Class<? extends UpgradeItem> upgradeClass, final long startTime, final long endTime) throws SQLException { """ Documents a record in the database for the specified class indicating it has been executed. @param upgradeClass the name of the upgrade class @param startTime the time (...
java
public void installUpgrade(final Class<? extends UpgradeItem> upgradeClass, final long startTime, final long endTime) throws SQLException { PreparedStatement statement = null; try { statement = connection.prepareStatement("INSERT INTO \"INSTALLEDUPGRADES\" (\"UPGRADECLASS\", \"STARTTIME\", \...
[ "public", "void", "installUpgrade", "(", "final", "Class", "<", "?", "extends", "UpgradeItem", ">", "upgradeClass", ",", "final", "long", "startTime", ",", "final", "long", "endTime", ")", "throws", "SQLException", "{", "PreparedStatement", "statement", "=", "nu...
Documents a record in the database for the specified class indicating it has been executed. @param upgradeClass the name of the upgrade class @param startTime the time (in millis) of the execution @param endTime the time (in millis) the execution completed @throws SQLException a SQLException @since 1.2.0
[ "Documents", "a", "record", "in", "the", "database", "for", "the", "specified", "class", "indicating", "it", "has", "been", "executed", "." ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/upgrade/UpgradeMetaProcessor.java#L82-L97
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/websphere/exception/DistributedExceptionInfo.java
DistributedExceptionInfo.printText
private void printText(PrintWriter pw, String key, String defaultText) { """ Insert the method's description here. Creation date: (3/9/00 10:25:31 PM) @return java.lang.String @param key java.lang.String """ String text = null; if (key != null) { ResourceBundle bundle = null; ...
java
private void printText(PrintWriter pw, String key, String defaultText) { String text = null; if (key != null) { ResourceBundle bundle = null; // retrieve the resource bundle try { bundle = ResourceBundle.getBundle(DIST_EX_RESOURCE_BUNDLE_NAME); ...
[ "private", "void", "printText", "(", "PrintWriter", "pw", ",", "String", "key", ",", "String", "defaultText", ")", "{", "String", "text", "=", "null", ";", "if", "(", "key", "!=", "null", ")", "{", "ResourceBundle", "bundle", "=", "null", ";", "// retrie...
Insert the method's description here. Creation date: (3/9/00 10:25:31 PM) @return java.lang.String @param key java.lang.String
[ "Insert", "the", "method", "s", "description", "here", ".", "Creation", "date", ":", "(", "3", "/", "9", "/", "00", "10", ":", "25", ":", "31", "PM", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/websphere/exception/DistributedExceptionInfo.java#L580-L606
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/painter/GeometryPainter.java
GeometryPainter.deleteShape
public void deleteShape(Paintable paintable, Object group, MapContext context) { """ Delete a {@link Paintable} object from the given {@link MapContext}. It the object does not exist, nothing will be done. @param paintable The object to be painted. @param group The group where the object resides in (optiona...
java
public void deleteShape(Paintable paintable, Object group, MapContext context) { GfxGeometry gfxGeometry = (GfxGeometry) paintable; Geometry geom = gfxGeometry.getGeometry(); if (geom instanceof Point || geom instanceof MultiPoint) { context.getVectorContext().deleteElement(group, gfxGeometry.getId() + ".def")...
[ "public", "void", "deleteShape", "(", "Paintable", "paintable", ",", "Object", "group", ",", "MapContext", "context", ")", "{", "GfxGeometry", "gfxGeometry", "=", "(", "GfxGeometry", ")", "paintable", ";", "Geometry", "geom", "=", "gfxGeometry", ".", "getGeometr...
Delete a {@link Paintable} object from the given {@link MapContext}. It the object does not exist, nothing will be done. @param paintable The object to be painted. @param group The group where the object resides in (optional). @param context The context to paint on.
[ "Delete", "a", "{", "@link", "Paintable", "}", "object", "from", "the", "given", "{", "@link", "MapContext", "}", ".", "It", "the", "object", "does", "not", "exist", "nothing", "will", "be", "done", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/painter/GeometryPainter.java#L111-L126
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/lang/BitStrings.java
BitStrings.or
public static String or(final String first, final String second) { """ 比较两个等长字符串的每一位,相或<br> 适用于仅含有1和0的字符串. @param first a {@link java.lang.String} object. @param second a {@link java.lang.String} object. @return a {@link java.lang.String} object. """ final StringBuilder buffer = new StringBuilder(); ...
java
public static String or(final String first, final String second) { final StringBuilder buffer = new StringBuilder(); for (int i = 0; i < first.length(); i++) { if ('0' == first.charAt(i) && '0' == second.charAt(i)) { buffer.append('0'); } else { buffer.append('1'); } } ...
[ "public", "static", "String", "or", "(", "final", "String", "first", ",", "final", "String", "second", ")", "{", "final", "StringBuilder", "buffer", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "first", ...
比较两个等长字符串的每一位,相或<br> 适用于仅含有1和0的字符串. @param first a {@link java.lang.String} object. @param second a {@link java.lang.String} object. @return a {@link java.lang.String} object.
[ "比较两个等长字符串的每一位,相或<br", ">", "适用于仅含有1和0的字符串", "." ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/lang/BitStrings.java#L61-L71
kiegroup/jbpm
jbpm-human-task/jbpm-human-task-jpa/src/main/java/org/jbpm/services/task/impl/model/TaskDataImpl.java
TaskDataImpl.setDocument
public void setDocument(long documentID, ContentData documentConentData) { """ Sets the document content data for this task data. It will set the <field>documentContentId</field> from the specified documentID, <field>documentAccessType</field>, <field>documentType</field> from the specified documentConentData. ...
java
public void setDocument(long documentID, ContentData documentConentData) { setDocumentContentId(documentID); setDocumentAccessType(documentConentData.getAccessType()); setDocumentType(documentConentData.getType()); }
[ "public", "void", "setDocument", "(", "long", "documentID", ",", "ContentData", "documentConentData", ")", "{", "setDocumentContentId", "(", "documentID", ")", ";", "setDocumentAccessType", "(", "documentConentData", ".", "getAccessType", "(", ")", ")", ";", "setDoc...
Sets the document content data for this task data. It will set the <field>documentContentId</field> from the specified documentID, <field>documentAccessType</field>, <field>documentType</field> from the specified documentConentData. @param documentID id of document content @param documentConentData ContentData
[ "Sets", "the", "document", "content", "data", "for", "this", "task", "data", ".", "It", "will", "set", "the", "<field", ">", "documentContentId<", "/", "field", ">", "from", "the", "specified", "documentID", "<field", ">", "documentAccessType<", "/", "field", ...
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-human-task/jbpm-human-task-jpa/src/main/java/org/jbpm/services/task/impl/model/TaskDataImpl.java#L531-L535
m9aertner/PBKDF2
src/jboss/java/de/rtner/security/auth/spi/SaltedDatabaseServerLoginModule.java
SaltedDatabaseServerLoginModule.newInstance
@SuppressWarnings("unchecked") protected <T> T newInstance(final String name, final Class<T> clazz) { """ Generic helper: Use JBoss SecurityActions to load a class, then create a new instance. @param <T> generic return type @param name FQCN of the class to instantiate. @param clazz Expected type, used for Pi...
java
@SuppressWarnings("unchecked") protected <T> T newInstance(final String name, final Class<T> clazz) { T r = null; try { Class<?> loadedClass = getClass().getClassLoader().loadClass(name); r = (T) loadedClass.newInstance(); } catch(Exception e) { LoginException le = new LoginException(PicketBoxMes...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "<", "T", ">", "T", "newInstance", "(", "final", "String", "name", ",", "final", "Class", "<", "T", ">", "clazz", ")", "{", "T", "r", "=", "null", ";", "try", "{", "Class", "<", "?", ...
Generic helper: Use JBoss SecurityActions to load a class, then create a new instance. @param <T> generic return type @param name FQCN of the class to instantiate. @param clazz Expected type, used for PicketBox logging. @return Insance. On error/exception, this method registers the exception via {{@link #setValidateEr...
[ "Generic", "helper", ":", "Use", "JBoss", "SecurityActions", "to", "load", "a", "class", "then", "create", "a", "new", "instance", "." ]
train
https://github.com/m9aertner/PBKDF2/blob/b84511bb78848106c0f778136d9f01870c957722/src/jboss/java/de/rtner/security/auth/spi/SaltedDatabaseServerLoginModule.java#L253-L265
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/dataformats/json/jackson/AbstractJsonDeserializer.java
AbstractJsonDeserializer.getStringParam
protected String getStringParam(String paramName, String errorMessage, Map<String, Object> mapToUse) throws IOException { """ Convenience method for subclasses. @param paramName the name of the parameter @param errorMessage the errormessage to add to the exception if the param does not exist. @...
java
protected String getStringParam(String paramName, String errorMessage, Map<String, Object> mapToUse) throws IOException { return getTypedParam(paramName, errorMessage, String.class, mapToUse); }
[ "protected", "String", "getStringParam", "(", "String", "paramName", ",", "String", "errorMessage", ",", "Map", "<", "String", ",", "Object", ">", "mapToUse", ")", "throws", "IOException", "{", "return", "getTypedParam", "(", "paramName", ",", "errorMessage", ",...
Convenience method for subclasses. @param paramName the name of the parameter @param errorMessage the errormessage to add to the exception if the param does not exist. @param mapToUse the map to use as input parametersource @return a stringparameter with given name. If it does not exist and the errormessage is ...
[ "Convenience", "method", "for", "subclasses", "." ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/jackson/AbstractJsonDeserializer.java#L96-L99
pravega/pravega
common/src/main/java/io/pravega/common/util/btree/BTreeIndex.java
BTreeIndex.processSplitPage
private void processSplitPage(List<BTreePage> splitResult, PageModificationContext context) { """ Processes a Page Split result. The first split page will replace the existing page, while the remaining pages will need to be inserted as children into the parent. @param splitResult The result of the original BTr...
java
private void processSplitPage(List<BTreePage> splitResult, PageModificationContext context) { PageWrapper originalPage = context.getPageWrapper(); for (int i = 0; i < splitResult.size(); i++) { val page = splitResult.get(i); ByteArraySegment newPageKey; long newOffset...
[ "private", "void", "processSplitPage", "(", "List", "<", "BTreePage", ">", "splitResult", ",", "PageModificationContext", "context", ")", "{", "PageWrapper", "originalPage", "=", "context", ".", "getPageWrapper", "(", ")", ";", "for", "(", "int", "i", "=", "0"...
Processes a Page Split result. The first split page will replace the existing page, while the remaining pages will need to be inserted as children into the parent. @param splitResult The result of the original BTreePage's splitIfNecessary() call. @param context Processing context.
[ "Processes", "a", "Page", "Split", "result", ".", "The", "first", "split", "page", "will", "replace", "the", "existing", "page", "while", "the", "remaining", "pages", "will", "need", "to", "be", "inserted", "as", "children", "into", "the", "parent", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/util/btree/BTreeIndex.java#L469-L500
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/chatroom/ChatRoomClient.java
ChatRoomClient.updateUserSpeakStatus
public ResponseWrapper updateUserSpeakStatus(long roomId, String username, int flag) throws APIConnectionException, APIRequestException { """ Update user speak status @param roomId chat room id @param username user to be modified @param flag 0 means allow to speak, 1 means forbid to speak in...
java
public ResponseWrapper updateUserSpeakStatus(long roomId, String username, int flag) throws APIConnectionException, APIRequestException { Preconditions.checkArgument(roomId > 0, "room id is invalid"); StringUtils.checkUsername(username); Preconditions.checkArgument(flag == 0 || flag ...
[ "public", "ResponseWrapper", "updateUserSpeakStatus", "(", "long", "roomId", ",", "String", "username", ",", "int", "flag", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "Preconditions", ".", "checkArgument", "(", "roomId", ">", "0", ",",...
Update user speak status @param roomId chat room id @param username user to be modified @param flag 0 means allow to speak, 1 means forbid to speak in chat room @return No content @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Update", "user", "speak", "status" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/chatroom/ChatRoomClient.java#L154-L160
mabe02/lanterna
src/main/java/com/googlecode/lanterna/TextCharacter.java
TextCharacter.withModifiers
public TextCharacter withModifiers(Collection<SGR> modifiers) { """ Returns a copy of this TextCharacter with specified list of SGR modifiers. None of the currently active SGR codes will be carried over to the copy, only those in the passed in value. @param modifiers SGR modifiers the copy should have @return C...
java
public TextCharacter withModifiers(Collection<SGR> modifiers) { EnumSet<SGR> newSet = EnumSet.copyOf(modifiers); if(modifiers.equals(newSet)) { return this; } return new TextCharacter(character, foregroundColor, backgroundColor, newSet); }
[ "public", "TextCharacter", "withModifiers", "(", "Collection", "<", "SGR", ">", "modifiers", ")", "{", "EnumSet", "<", "SGR", ">", "newSet", "=", "EnumSet", ".", "copyOf", "(", "modifiers", ")", ";", "if", "(", "modifiers", ".", "equals", "(", "newSet", ...
Returns a copy of this TextCharacter with specified list of SGR modifiers. None of the currently active SGR codes will be carried over to the copy, only those in the passed in value. @param modifiers SGR modifiers the copy should have @return Copy of the TextCharacter with a different set of SGR modifiers
[ "Returns", "a", "copy", "of", "this", "TextCharacter", "with", "specified", "list", "of", "SGR", "modifiers", ".", "None", "of", "the", "currently", "active", "SGR", "codes", "will", "be", "carried", "over", "to", "the", "copy", "only", "those", "in", "the...
train
https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/TextCharacter.java#L250-L256
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/CertificatesImpl.java
CertificatesImpl.getAsync
public Observable<Certificate> getAsync(String thumbprintAlgorithm, String thumbprint) { """ Gets information about the specified certificate. @param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter. This must be sha1. @param thumbprint The thumbprint of the certificate to get. @throw...
java
public Observable<Certificate> getAsync(String thumbprintAlgorithm, String thumbprint) { return getWithServiceResponseAsync(thumbprintAlgorithm, thumbprint).map(new Func1<ServiceResponseWithHeaders<Certificate, CertificateGetHeaders>, Certificate>() { @Override public Certificate call(Se...
[ "public", "Observable", "<", "Certificate", ">", "getAsync", "(", "String", "thumbprintAlgorithm", ",", "String", "thumbprint", ")", "{", "return", "getWithServiceResponseAsync", "(", "thumbprintAlgorithm", ",", "thumbprint", ")", ".", "map", "(", "new", "Func1", ...
Gets information about the specified certificate. @param thumbprintAlgorithm The algorithm used to derive the thumbprint parameter. This must be sha1. @param thumbprint The thumbprint of the certificate to get. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the Cert...
[ "Gets", "information", "about", "the", "specified", "certificate", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/CertificatesImpl.java#L1021-L1028
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.removeResourceFromOrgUnit
public void removeResourceFromOrgUnit(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, CmsResource resource) throws CmsException { """ Removes a resource from the given organizational unit.<p> @param dbc the current db context @param orgUnit the organizational unit to remove the resource from @param resou...
java
public void removeResourceFromOrgUnit(CmsDbContext dbc, CmsOrganizationalUnit orgUnit, CmsResource resource) throws CmsException { m_monitor.flushCache(CmsMemoryMonitor.CacheType.HAS_ROLE, CmsMemoryMonitor.CacheType.ROLE_LIST); getUserDriver(dbc).removeResourceFromOrganizationalUnit(dbc, orgUnit, r...
[ "public", "void", "removeResourceFromOrgUnit", "(", "CmsDbContext", "dbc", ",", "CmsOrganizationalUnit", "orgUnit", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "m_monitor", ".", "flushCache", "(", "CmsMemoryMonitor", ".", "CacheType", ".", "HAS...
Removes a resource from the given organizational unit.<p> @param dbc the current db context @param orgUnit the organizational unit to remove the resource from @param resource the resource that is to be removed from the organizational unit @throws CmsException if something goes wrong @see org.opencms.security.CmsOrgU...
[ "Removes", "a", "resource", "from", "the", "given", "organizational", "unit", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L8200-L8205
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrame.java
ValueNumberFrame.addAvailableLoad
public void addAvailableLoad(AvailableLoad availableLoad, @Nonnull ValueNumber[] value) { """ Add an available load. @param availableLoad the AvailableLoad (reference and field) @param value the value(s) loaded """ Objects.requireNonNull(value); getUpdateableAvailableLoadMap().put(availab...
java
public void addAvailableLoad(AvailableLoad availableLoad, @Nonnull ValueNumber[] value) { Objects.requireNonNull(value); getUpdateableAvailableLoadMap().put(availableLoad, value); for (ValueNumber v : value) { getUpdateablePreviouslyKnownAs().put(v, availableLoad); if (R...
[ "public", "void", "addAvailableLoad", "(", "AvailableLoad", "availableLoad", ",", "@", "Nonnull", "ValueNumber", "[", "]", "value", ")", "{", "Objects", ".", "requireNonNull", "(", "value", ")", ";", "getUpdateableAvailableLoadMap", "(", ")", ".", "put", "(", ...
Add an available load. @param availableLoad the AvailableLoad (reference and field) @param value the value(s) loaded
[ "Add", "an", "available", "load", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/vna/ValueNumberFrame.java#L150-L161