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
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java
XPathUtils.evaluateAsNodeList
public static NodeList evaluateAsNodeList(Node node, String xPathExpression, NamespaceContext nsContext) { """ Evaluate XPath expression with result type NodeList. @param node @param xPathExpression @param nsContext @return """ NodeList result = (NodeList) evaluateExpression(node, xPathExpression, ...
java
public static NodeList evaluateAsNodeList(Node node, String xPathExpression, NamespaceContext nsContext) { NodeList result = (NodeList) evaluateExpression(node, xPathExpression, nsContext, XPathConstants.NODESET); if (result == null) { throw new CitrusRuntimeException("No result for XPath e...
[ "public", "static", "NodeList", "evaluateAsNodeList", "(", "Node", "node", ",", "String", "xPathExpression", ",", "NamespaceContext", "nsContext", ")", "{", "NodeList", "result", "=", "(", "NodeList", ")", "evaluateExpression", "(", "node", ",", "xPathExpression", ...
Evaluate XPath expression with result type NodeList. @param node @param xPathExpression @param nsContext @return
[ "Evaluate", "XPath", "expression", "with", "result", "type", "NodeList", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/xml/xpath/XPathUtils.java#L198-L206
stephanenicolas/toothpick
toothpick-runtime/src/main/java/toothpick/configuration/RuntimeCheckOnConfiguration.java
RuntimeCheckOnConfiguration.checkIllegalBinding
@Override public void checkIllegalBinding(Binding binding, Scope scope) { """ check that a binding's target annotation scope, if present, is supported by the scope {@code scope}. @param binding the binding being installed. @param scope the scope where the binding is installed. """ Class<?> clazz; ...
java
@Override public void checkIllegalBinding(Binding binding, Scope scope) { Class<?> clazz; switch (binding.getMode()) { case SIMPLE: clazz = binding.getKey(); break; case CLASS: clazz = binding.getImplementationClass(); break; case PROVIDER_CLASS: clazz...
[ "@", "Override", "public", "void", "checkIllegalBinding", "(", "Binding", "binding", ",", "Scope", "scope", ")", "{", "Class", "<", "?", ">", "clazz", ";", "switch", "(", "binding", ".", "getMode", "(", ")", ")", "{", "case", "SIMPLE", ":", "clazz", "=...
check that a binding's target annotation scope, if present, is supported by the scope {@code scope}. @param binding the binding being installed. @param scope the scope where the binding is installed.
[ "check", "that", "a", "binding", "s", "target", "annotation", "scope", "if", "present", "is", "supported", "by", "the", "scope", "{" ]
train
https://github.com/stephanenicolas/toothpick/blob/54476ca9a5fa48809c15a46e43e38db9ed7e1a75/toothpick-runtime/src/main/java/toothpick/configuration/RuntimeCheckOnConfiguration.java#L29-L56
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/content/documentlists/DocumentUrl.java
DocumentUrl.transformDocumentContentUrl
public static MozuUrl transformDocumentContentUrl(String crop, String documentId, String documentListName, Integer height, Integer max, Integer maxHeight, Integer maxWidth, Integer quality, Integer width) { """ Get Resource Url for TransformDocumentContent @param crop Crops the image based on the specified coordi...
java
public static MozuUrl transformDocumentContentUrl(String crop, String documentId, String documentListName, Integer height, Integer max, Integer maxHeight, Integer maxWidth, Integer quality, Integer width) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}/documents/{document...
[ "public", "static", "MozuUrl", "transformDocumentContentUrl", "(", "String", "crop", ",", "String", "documentId", ",", "String", "documentListName", ",", "Integer", "height", ",", "Integer", "max", ",", "Integer", "maxHeight", ",", "Integer", "maxWidth", ",", "Int...
Get Resource Url for TransformDocumentContent @param crop Crops the image based on the specified coordinates. The reference point for positive coordinates is the top-left corner of the image, and the reference point for negative coordinates is the bottom-right corner of the image.Usage: Example: removes 10 pixels from...
[ "Get", "Resource", "Url", "for", "TransformDocumentContent" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/content/documentlists/DocumentUrl.java#L43-L56
nohana/Amalgam
amalgam/src/main/java/com/amalgam/app/ActivityManagerUtils.java
ActivityManagerUtils.getPackageNameFromPid
public static String getPackageNameFromPid(Context context, int pid) { """ Get package name of the process id. @param context the context. @param pid the process id. @return the package name for the process id. {@code null} if no process found. """ ActivityManager am = (ActivityManager) context.getS...
java
public static String getPackageNameFromPid(Context context, int pid) { ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); List<RunningAppProcessInfo> processes = am.getRunningAppProcesses(); for (RunningAppProcessInfo info : processes) { if (in...
[ "public", "static", "String", "getPackageNameFromPid", "(", "Context", "context", ",", "int", "pid", ")", "{", "ActivityManager", "am", "=", "(", "ActivityManager", ")", "context", ".", "getSystemService", "(", "Context", ".", "ACTIVITY_SERVICE", ")", ";", "List...
Get package name of the process id. @param context the context. @param pid the process id. @return the package name for the process id. {@code null} if no process found.
[ "Get", "package", "name", "of", "the", "process", "id", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/app/ActivityManagerUtils.java#L105-L118
googleapis/cloud-bigtable-client
bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java
AbstractBigtableAdmin.snapshotTable
protected Operation snapshotTable(String snapshotName, TableName tableName) throws IOException { """ Creates a snapshot from an existing table. NOTE: Cloud Bigtable has a cleanup policy @param snapshotName a {@link String} object. @param tableName a {@link TableName} object. @return a {@link Operation}...
java
protected Operation snapshotTable(String snapshotName, TableName tableName) throws IOException { SnapshotTableRequest.Builder requestBuilder = SnapshotTableRequest.newBuilder() .setCluster(getSnapshotClusterName().toString()) .setSnapshotId(snapshotName) .setName(options.getInstanceNa...
[ "protected", "Operation", "snapshotTable", "(", "String", "snapshotName", ",", "TableName", "tableName", ")", "throws", "IOException", "{", "SnapshotTableRequest", ".", "Builder", "requestBuilder", "=", "SnapshotTableRequest", ".", "newBuilder", "(", ")", ".", "setClu...
Creates a snapshot from an existing table. NOTE: Cloud Bigtable has a cleanup policy @param snapshotName a {@link String} object. @param tableName a {@link TableName} object. @return a {@link Operation} object. @throws IOException if any.
[ "Creates", "a", "snapshot", "from", "an", "existing", "table", ".", "NOTE", ":", "Cloud", "Bigtable", "has", "a", "cleanup", "policy" ]
train
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-client-core-parent/bigtable-hbase/src/main/java/org/apache/hadoop/hbase/client/AbstractBigtableAdmin.java#L838-L857
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getVariable
public Variable getVariable(Object projectIdOrPath, String key) throws GitLabApiException { """ Get the details of a project variable. <pre><code>GitLab Endpoint: GET /projects/:id/variables/:key</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or P...
java
public Variable getVariable(Object projectIdOrPath, String key) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "variables", key); return (response.readEntity(Variable.class)); }
[ "public", "Variable", "getVariable", "(", "Object", "projectIdOrPath", ",", "String", "key", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ",", "getPro...
Get the details of a project variable. <pre><code>GitLab Endpoint: GET /projects/:id/variables/:key</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param key the key of an existing variable, required @return the Variable insta...
[ "Get", "the", "details", "of", "a", "project", "variable", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2466-L2469
jayantk/jklol
src/com/jayantkrish/jklol/models/TableFactorBuilder.java
TableFactorBuilder.maxWeight
public void maxWeight(Assignment assignment, double weight) { """ Sets the weight of {@code assignment} to {@code Math.max(getWeight(assignment), weight)}. @param assignment @param weight """ setWeight(assignment, Math.max(getWeight(assignment), weight)); }
java
public void maxWeight(Assignment assignment, double weight) { setWeight(assignment, Math.max(getWeight(assignment), weight)); }
[ "public", "void", "maxWeight", "(", "Assignment", "assignment", ",", "double", "weight", ")", "{", "setWeight", "(", "assignment", ",", "Math", ".", "max", "(", "getWeight", "(", "assignment", ")", ",", "weight", ")", ")", ";", "}" ]
Sets the weight of {@code assignment} to {@code Math.max(getWeight(assignment), weight)}. @param assignment @param weight
[ "Sets", "the", "weight", "of", "{", "@code", "assignment", "}", "to", "{", "@code", "Math", ".", "max", "(", "getWeight", "(", "assignment", ")", "weight", ")", "}", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/models/TableFactorBuilder.java#L217-L219
zaproxy/zaproxy
src/org/zaproxy/zap/spider/Spider.java
Spider.notifyListenersFoundURI
protected synchronized void notifyListenersFoundURI(String uri, String method, FetchStatus status) { """ Notifies the listeners regarding a found uri. @param uri the uri @param method the method used for fetching the resource @param status the {@link FetchStatus} stating if this uri will be processed, and, if...
java
protected synchronized void notifyListenersFoundURI(String uri, String method, FetchStatus status) { for (SpiderListener l : listeners) { l.foundURI(uri, method, status); } }
[ "protected", "synchronized", "void", "notifyListenersFoundURI", "(", "String", "uri", ",", "String", "method", ",", "FetchStatus", "status", ")", "{", "for", "(", "SpiderListener", "l", ":", "listeners", ")", "{", "l", ".", "foundURI", "(", "uri", ",", "meth...
Notifies the listeners regarding a found uri. @param uri the uri @param method the method used for fetching the resource @param status the {@link FetchStatus} stating if this uri will be processed, and, if not, stating the reason of the filtering
[ "Notifies", "the", "listeners", "regarding", "a", "found", "uri", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/spider/Spider.java#L792-L796
CodeNarc/CodeNarc
src/main/java/org/codenarc/util/AstUtil.java
AstUtil.getMethodArguments
public static List<? extends Expression> getMethodArguments(ASTNode methodCall) { """ Return the List of Arguments for the specified MethodCallExpression or a ConstructorCallExpression. The returned List contains either ConstantExpression or MapEntryExpression objects. @param methodCall - the AST MethodCallExpre...
java
public static List<? extends Expression> getMethodArguments(ASTNode methodCall) { if (methodCall instanceof ConstructorCallExpression) { return extractExpressions(((ConstructorCallExpression) methodCall).getArguments()); } else if (methodCall instanceof MethodCallExpression) { ...
[ "public", "static", "List", "<", "?", "extends", "Expression", ">", "getMethodArguments", "(", "ASTNode", "methodCall", ")", "{", "if", "(", "methodCall", "instanceof", "ConstructorCallExpression", ")", "{", "return", "extractExpressions", "(", "(", "(", "Construc...
Return the List of Arguments for the specified MethodCallExpression or a ConstructorCallExpression. The returned List contains either ConstantExpression or MapEntryExpression objects. @param methodCall - the AST MethodCallExpression or ConstructorCalLExpression @return the List of argument objects
[ "Return", "the", "List", "of", "Arguments", "for", "the", "specified", "MethodCallExpression", "or", "a", "ConstructorCallExpression", ".", "The", "returned", "List", "contains", "either", "ConstantExpression", "or", "MapEntryExpression", "objects", "." ]
train
https://github.com/CodeNarc/CodeNarc/blob/9a7cec02cb8cbaf845030f2434309e8968f5d7a7/src/main/java/org/codenarc/util/AstUtil.java#L226-L237
Netflix/Hystrix
hystrix-core/src/main/java/com/netflix/hystrix/strategy/executionhook/HystrixCommandExecutionHook.java
HystrixCommandExecutionHook.onFallbackSuccess
@Deprecated public <T> T onFallbackSuccess(HystrixCommand<T> commandInstance, T fallbackResponse) { """ DEPRECATED: Change usages of this to {@link #onFallbackEmit} if you want to write a hook that handles each emitted fallback value or to {@link #onFallbackSuccess} if you want to write a hook that handles su...
java
@Deprecated public <T> T onFallbackSuccess(HystrixCommand<T> commandInstance, T fallbackResponse) { // pass-thru by default return fallbackResponse; }
[ "@", "Deprecated", "public", "<", "T", ">", "T", "onFallbackSuccess", "(", "HystrixCommand", "<", "T", ">", "commandInstance", ",", "T", "fallbackResponse", ")", "{", "// pass-thru by default", "return", "fallbackResponse", ";", "}" ]
DEPRECATED: Change usages of this to {@link #onFallbackEmit} if you want to write a hook that handles each emitted fallback value or to {@link #onFallbackSuccess} if you want to write a hook that handles success of the fallback method Invoked after successful execution of {@link HystrixCommand#getFallback()} with resp...
[ "DEPRECATED", ":", "Change", "usages", "of", "this", "to", "{", "@link", "#onFallbackEmit", "}", "if", "you", "want", "to", "write", "a", "hook", "that", "handles", "each", "emitted", "fallback", "value", "or", "to", "{", "@link", "#onFallbackSuccess", "}", ...
train
https://github.com/Netflix/Hystrix/blob/3cb21589895e9f8f87cfcdbc9d96d9f63d48b848/hystrix-core/src/main/java/com/netflix/hystrix/strategy/executionhook/HystrixCommandExecutionHook.java#L371-L375
jayantk/jklol
src/com/jayantkrish/jklol/tensor/DenseTensorBuilder.java
DenseTensorBuilder.simpleIncrement
private void simpleIncrement(TensorBase other, double multiplier) { """ Increment algorithm for the case where both tensors have the same set of dimensions. @param other @param multiplier """ Preconditions.checkArgument(Arrays.equals(other.getDimensionNumbers(), getDimensionNumbers())); if (other ...
java
private void simpleIncrement(TensorBase other, double multiplier) { Preconditions.checkArgument(Arrays.equals(other.getDimensionNumbers(), getDimensionNumbers())); if (other instanceof DenseTensorBase) { double[] otherTensorValues = ((DenseTensorBase) other).values; Preconditions.checkArgument(other...
[ "private", "void", "simpleIncrement", "(", "TensorBase", "other", ",", "double", "multiplier", ")", "{", "Preconditions", ".", "checkArgument", "(", "Arrays", ".", "equals", "(", "other", ".", "getDimensionNumbers", "(", ")", ",", "getDimensionNumbers", "(", ")"...
Increment algorithm for the case where both tensors have the same set of dimensions. @param other @param multiplier
[ "Increment", "algorithm", "for", "the", "case", "where", "both", "tensors", "have", "the", "same", "set", "of", "dimensions", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/tensor/DenseTensorBuilder.java#L197-L214
pressgang-ccms/PressGangCCMSContentSpecProcessor
src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java
ContentSpecValidator.checkForConflictingCondition
protected void checkForConflictingCondition(final IOptionsNode node, final ContentSpec contentSpec) { """ Check if the condition on a node will conflict with a condition in the defined publican.cfg file. @param node The node to be checked. @param contentSpec The content spec the node belongs to. """...
java
protected void checkForConflictingCondition(final IOptionsNode node, final ContentSpec contentSpec) { if (!isNullOrEmpty(node.getConditionStatement())) { final String publicanCfg; if (!contentSpec.getDefaultPublicanCfg().equals(CommonConstants.CS_PUBLICAN_CFG_TITLE)) { fi...
[ "protected", "void", "checkForConflictingCondition", "(", "final", "IOptionsNode", "node", ",", "final", "ContentSpec", "contentSpec", ")", "{", "if", "(", "!", "isNullOrEmpty", "(", "node", ".", "getConditionStatement", "(", ")", ")", ")", "{", "final", "String...
Check if the condition on a node will conflict with a condition in the defined publican.cfg file. @param node The node to be checked. @param contentSpec The content spec the node belongs to.
[ "Check", "if", "the", "condition", "on", "a", "node", "will", "conflict", "with", "a", "condition", "in", "the", "defined", "publican", ".", "cfg", "file", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecValidator.java#L487-L506
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/RandomMatrices_DDRM.java
RandomMatrices_DDRM.symmetricPosDef
public static DMatrixRMaj symmetricPosDef(int width, Random rand) { """ Creates a random symmetric positive definite matrix. @param width The width of the square matrix it returns. @param rand Random number generator used to make the matrix. @return The random symmetric positive definite matrix. """ ...
java
public static DMatrixRMaj symmetricPosDef(int width, Random rand) { // This is not formally proven to work. It just seems to work. DMatrixRMaj a = new DMatrixRMaj(width,1); DMatrixRMaj b = new DMatrixRMaj(width,width); for( int i = 0; i < width; i++ ) { a.set(i,0,rand.nextD...
[ "public", "static", "DMatrixRMaj", "symmetricPosDef", "(", "int", "width", ",", "Random", "rand", ")", "{", "// This is not formally proven to work. It just seems to work.", "DMatrixRMaj", "a", "=", "new", "DMatrixRMaj", "(", "width", ",", "1", ")", ";", "DMatrixRMaj...
Creates a random symmetric positive definite matrix. @param width The width of the square matrix it returns. @param rand Random number generator used to make the matrix. @return The random symmetric positive definite matrix.
[ "Creates", "a", "random", "symmetric", "positive", "definite", "matrix", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/RandomMatrices_DDRM.java#L439-L455
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDValidation.java
SDValidation.validateNumerical
protected static void validateNumerical(String opName, SDVariable v) { """ Validate that the operation is being applied on a numerical SDVariable (not boolean or utf8). Some operations (such as sum, norm2, add(Number) etc don't make sense when applied to boolean/utf8 arrays @param opName Operation name to prin...
java
protected static void validateNumerical(String opName, SDVariable v) { if (v == null) return; if (v.dataType() == DataType.BOOL || v.dataType() == DataType.UTF8) throw new IllegalStateException("Cannot apply operation \"" + opName + "\" to variable \"" + v.getVarName() + "\" with...
[ "protected", "static", "void", "validateNumerical", "(", "String", "opName", ",", "SDVariable", "v", ")", "{", "if", "(", "v", "==", "null", ")", "return", ";", "if", "(", "v", ".", "dataType", "(", ")", "==", "DataType", ".", "BOOL", "||", "v", ".",...
Validate that the operation is being applied on a numerical SDVariable (not boolean or utf8). Some operations (such as sum, norm2, add(Number) etc don't make sense when applied to boolean/utf8 arrays @param opName Operation name to print in the exception @param v Variable to perform operation on
[ "Validate", "that", "the", "operation", "is", "being", "applied", "on", "a", "numerical", "SDVariable", "(", "not", "boolean", "or", "utf8", ")", ".", "Some", "operations", "(", "such", "as", "sum", "norm2", "add", "(", "Number", ")", "etc", "don", "t", ...
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#L20-L25
i-net-software/jlessc
src/com/inet/lib/less/LessException.java
LessException.addPosition
void addPosition( String filename, int line, int column ) { """ Add a position to the less file stacktrace @param filename the less file, can be null if a string was parsed @param line the line number in the less file @param column the column in the less file """ LessFilePosition pos = new LessFileP...
java
void addPosition( String filename, int line, int column ) { LessFilePosition pos = new LessFilePosition( filename, line, column ); if( !positions.contains( pos ) ) { this.positions.add( pos ); } }
[ "void", "addPosition", "(", "String", "filename", ",", "int", "line", ",", "int", "column", ")", "{", "LessFilePosition", "pos", "=", "new", "LessFilePosition", "(", "filename", ",", "line", ",", "column", ")", ";", "if", "(", "!", "positions", ".", "con...
Add a position to the less file stacktrace @param filename the less file, can be null if a string was parsed @param line the line number in the less file @param column the column in the less file
[ "Add", "a", "position", "to", "the", "less", "file", "stacktrace" ]
train
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/LessException.java#L77-L82
openengsb/openengsb
api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java
TransformationDescription.splitField
public void splitField(String sourceField, String targetField, String splitString, String index) { """ Adds a split transformation step to the transformation description. The value of the source field is split based on the split string into parts. Based on the given index, the result will be set to the target fie...
java
public void splitField(String sourceField, String targetField, String splitString, String index) { TransformationStep step = new TransformationStep(); step.setTargetField(targetField); step.setSourceFields(sourceField); step.setOperationParameter(TransformationConstants.SPLIT_PARAM, spli...
[ "public", "void", "splitField", "(", "String", "sourceField", ",", "String", "targetField", ",", "String", "splitString", ",", "String", "index", ")", "{", "TransformationStep", "step", "=", "new", "TransformationStep", "(", ")", ";", "step", ".", "setTargetFiel...
Adds a split transformation step to the transformation description. The value of the source field is split based on the split string into parts. Based on the given index, the result will be set to the target field. The index needs to be an integer value. All fields need to be of the type String.
[ "Adds", "a", "split", "transformation", "step", "to", "the", "transformation", "description", ".", "The", "value", "of", "the", "source", "field", "is", "split", "based", "on", "the", "split", "string", "into", "parts", ".", "Based", "on", "the", "given", ...
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L95-L103
baasbox/Android-SDK
library/src/main/java/com/baasbox/android/BaasDocument.java
BaasDocument.fetchAll
public static RequestToken fetchAll(String collection, BaasQuery.Criteria filter, BaasHandler<List<BaasDocument>> handler) { """ Asynchronously retrieves the list of documents readable to the user that match <code>filter</code> in <code>collection</code> @param collection the collection to retrieve not <code>n...
java
public static RequestToken fetchAll(String collection, BaasQuery.Criteria filter, BaasHandler<List<BaasDocument>> handler) { return fetchAll(collection, filter, RequestOptions.DEFAULT, handler); }
[ "public", "static", "RequestToken", "fetchAll", "(", "String", "collection", ",", "BaasQuery", ".", "Criteria", "filter", ",", "BaasHandler", "<", "List", "<", "BaasDocument", ">", ">", "handler", ")", "{", "return", "fetchAll", "(", "collection", ",", "filter...
Asynchronously retrieves the list of documents readable to the user that match <code>filter</code> in <code>collection</code> @param collection the collection to retrieve not <code>null</code> @param filter a filter to apply to the request @param handler a callback to be invoked with the result of the request @...
[ "Asynchronously", "retrieves", "the", "list", "of", "documents", "readable", "to", "the", "user", "that", "match", "<code", ">", "filter<", "/", "code", ">", "in", "<code", ">", "collection<", "/", "code", ">" ]
train
https://github.com/baasbox/Android-SDK/blob/6bb2203246b885b2ad63a7bfaf37c83caf15e0d8/library/src/main/java/com/baasbox/android/BaasDocument.java#L245-L247
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataPropertyAssertionAxiomImpl_CustomFieldSerializer.java
OWLDataPropertyAssertionAxiomImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDataPropertyAssertionAxiomImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com....
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDataPropertyAssertionAxiomImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLDataPropertyAssertionAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataPropertyAssertionAxiomImpl_CustomFieldSerializer.java#L75-L78
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java
ZipUtil.getZipOutputStream
private static ZipOutputStream getZipOutputStream(OutputStream out, Charset charset) { """ 获得 {@link ZipOutputStream} @param zipFile 压缩文件 @param charset 编码 @return {@link ZipOutputStream} """ charset = (null == charset) ? DEFAULT_CHARSET : charset; return new ZipOutputStream(out, charset); }
java
private static ZipOutputStream getZipOutputStream(OutputStream out, Charset charset) { charset = (null == charset) ? DEFAULT_CHARSET : charset; return new ZipOutputStream(out, charset); }
[ "private", "static", "ZipOutputStream", "getZipOutputStream", "(", "OutputStream", "out", ",", "Charset", "charset", ")", "{", "charset", "=", "(", "null", "==", "charset", ")", "?", "DEFAULT_CHARSET", ":", "charset", ";", "return", "new", "ZipOutputStream", "("...
获得 {@link ZipOutputStream} @param zipFile 压缩文件 @param charset 编码 @return {@link ZipOutputStream}
[ "获得", "{", "@link", "ZipOutputStream", "}" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java#L757-L760
jmxtrans/embedded-jmxtrans
src/main/java/org/jmxtrans/embedded/util/pool/SocketOutputStreamPoolFactory.java
SocketOutputStreamPoolFactory.validateObject
@Override public boolean validateObject(HostAndPort hostAndPort, PooledObject<SocketOutputStream> socketOutputStreamRef) { """ Defensive approach: we test all the "<code>Socket.isXXX()</code>" flags. """ Socket socket = socketOutputStreamRef.getObject().getSocket(); return socket.isConnecte...
java
@Override public boolean validateObject(HostAndPort hostAndPort, PooledObject<SocketOutputStream> socketOutputStreamRef) { Socket socket = socketOutputStreamRef.getObject().getSocket(); return socket.isConnected() && socket.isBound() && !socket.isClosed() ...
[ "@", "Override", "public", "boolean", "validateObject", "(", "HostAndPort", "hostAndPort", ",", "PooledObject", "<", "SocketOutputStream", ">", "socketOutputStreamRef", ")", "{", "Socket", "socket", "=", "socketOutputStreamRef", ".", "getObject", "(", ")", ".", "get...
Defensive approach: we test all the "<code>Socket.isXXX()</code>" flags.
[ "Defensive", "approach", ":", "we", "test", "all", "the", "<code", ">", "Socket", ".", "isXXX", "()", "<", "/", "code", ">", "flags", "." ]
train
https://github.com/jmxtrans/embedded-jmxtrans/blob/17224389e7d8323284cabc2a5167fc03bed6d223/src/main/java/org/jmxtrans/embedded/util/pool/SocketOutputStreamPoolFactory.java#L73-L81
jhy/jsoup
src/main/java/org/jsoup/safety/Whitelist.java
Whitelist.removeProtocols
public Whitelist removeProtocols(String tag, String attribute, String... removeProtocols) { """ Remove allowed URL protocols for an element's URL attribute. If you remove all protocols for an attribute, that attribute will allow any protocol. <p> E.g.: <code>removeProtocols("a", "href", "ftp")</code> </p> @...
java
public Whitelist removeProtocols(String tag, String attribute, String... removeProtocols) { Validate.notEmpty(tag); Validate.notEmpty(attribute); Validate.notNull(removeProtocols); TagName tagName = TagName.valueOf(tag); AttributeKey attr = AttributeKey.valueOf(attribute); ...
[ "public", "Whitelist", "removeProtocols", "(", "String", "tag", ",", "String", "attribute", ",", "String", "...", "removeProtocols", ")", "{", "Validate", ".", "notEmpty", "(", "tag", ")", ";", "Validate", ".", "notEmpty", "(", "attribute", ")", ";", "Valida...
Remove allowed URL protocols for an element's URL attribute. If you remove all protocols for an attribute, that attribute will allow any protocol. <p> E.g.: <code>removeProtocols("a", "href", "ftp")</code> </p> @param tag Tag the URL protocol is for @param attribute Attribute name @param removeProtocols List of invali...
[ "Remove", "allowed", "URL", "protocols", "for", "an", "element", "s", "URL", "attribute", ".", "If", "you", "remove", "all", "protocols", "for", "an", "attribute", "that", "attribute", "will", "allow", "any", "protocol", ".", "<p", ">", "E", ".", "g", "....
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/safety/Whitelist.java#L452-L478
landawn/AbacusUtil
src/com/landawn/abacus/util/LongList.java
LongList.anyMatch
public <E extends Exception> boolean anyMatch(Try.LongPredicate<E> filter) throws E { """ Returns whether any elements of this List match the provided predicate. @param filter @return """ return anyMatch(0, size(), filter); }
java
public <E extends Exception> boolean anyMatch(Try.LongPredicate<E> filter) throws E { return anyMatch(0, size(), filter); }
[ "public", "<", "E", "extends", "Exception", ">", "boolean", "anyMatch", "(", "Try", ".", "LongPredicate", "<", "E", ">", "filter", ")", "throws", "E", "{", "return", "anyMatch", "(", "0", ",", "size", "(", ")", ",", "filter", ")", ";", "}" ]
Returns whether any elements of this List match the provided predicate. @param filter @return
[ "Returns", "whether", "any", "elements", "of", "this", "List", "match", "the", "provided", "predicate", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/LongList.java#L944-L946
arxanchain/java-common
src/main/java/com/arxanfintech/common/crypto/core/ECKey.java
ECKey.fromPrivateAndPrecalculatedPublic
public static ECKey fromPrivateAndPrecalculatedPublic(byte[] priv, byte[] pub) { """ Creates an ECKey that simply trusts the caller to ensure that point is really the result of multiplying the generator point by the private key. This is used to speed things up when you know you have the right values already. The...
java
public static ECKey fromPrivateAndPrecalculatedPublic(byte[] priv, byte[] pub) { check(priv != null, "Private key must not be null"); check(pub != null, "Public key must not be null"); return new ECKey(new BigInteger(1, priv), CURVE.getCurve().decodePoint(pub)); }
[ "public", "static", "ECKey", "fromPrivateAndPrecalculatedPublic", "(", "byte", "[", "]", "priv", ",", "byte", "[", "]", "pub", ")", "{", "check", "(", "priv", "!=", "null", ",", "\"Private key must not be null\"", ")", ";", "check", "(", "pub", "!=", "null",...
Creates an ECKey that simply trusts the caller to ensure that point is really the result of multiplying the generator point by the private key. This is used to speed things up when you know you have the right values already. The compression state of the point will be preserved. @param priv - @param pub - @return -
[ "Creates", "an", "ECKey", "that", "simply", "trusts", "the", "caller", "to", "ensure", "that", "point", "is", "really", "the", "result", "of", "multiplying", "the", "generator", "point", "by", "the", "private", "key", ".", "This", "is", "used", "to", "spee...
train
https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/core/ECKey.java#L357-L361
weld/core
impl/src/main/java/org/jboss/weld/interceptor/proxy/AbstractInvocationContext.java
AbstractInvocationContext.isWideningPrimitive
private static boolean isWideningPrimitive(Class<?> argumentClass, Class<?> targetClass) { """ Checks that the targetClass is widening the argument class @param argumentClass @param targetClass @return """ return WIDENING_TABLE.containsKey(argumentClass) && WIDENING_TABLE.get(argumentClass).contai...
java
private static boolean isWideningPrimitive(Class<?> argumentClass, Class<?> targetClass) { return WIDENING_TABLE.containsKey(argumentClass) && WIDENING_TABLE.get(argumentClass).contains(targetClass); }
[ "private", "static", "boolean", "isWideningPrimitive", "(", "Class", "<", "?", ">", "argumentClass", ",", "Class", "<", "?", ">", "targetClass", ")", "{", "return", "WIDENING_TABLE", ".", "containsKey", "(", "argumentClass", ")", "&&", "WIDENING_TABLE", ".", "...
Checks that the targetClass is widening the argument class @param argumentClass @param targetClass @return
[ "Checks", "that", "the", "targetClass", "is", "widening", "the", "argument", "class" ]
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/interceptor/proxy/AbstractInvocationContext.java#L114-L116
JOML-CI/JOML
src/org/joml/Intersectiond.java
Intersectiond.intersectRayPlane
public static double intersectRayPlane(Rayd ray, Planed plane, double epsilon) { """ Test whether the given ray intersects the given plane, and return the value of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> of the intersection point. <p> This method returns <code>-1.0</code> if th...
java
public static double intersectRayPlane(Rayd ray, Planed plane, double epsilon) { return intersectRayPlane(ray.oX, ray.oY, ray.oZ, ray.dX, ray.dY, ray.dZ, plane.a, plane.b, plane.c, plane.d, epsilon); }
[ "public", "static", "double", "intersectRayPlane", "(", "Rayd", "ray", ",", "Planed", "plane", ",", "double", "epsilon", ")", "{", "return", "intersectRayPlane", "(", "ray", ".", "oX", ",", "ray", ".", "oY", ",", "ray", ".", "oZ", ",", "ray", ".", "dX"...
Test whether the given ray intersects the given plane, and return the value of the parameter <i>t</i> in the ray equation <i>p(t) = origin + t * dir</i> of the intersection point. <p> This method returns <code>-1.0</code> if the ray does not intersect the plane, because it is either parallel to the plane or its directi...
[ "Test", "whether", "the", "given", "ray", "intersects", "the", "given", "plane", "and", "return", "the", "value", "of", "the", "parameter", "<i", ">", "t<", "/", "i", ">", "in", "the", "ray", "equation", "<i", ">", "p", "(", "t", ")", "=", "origin", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectiond.java#L1106-L1108
JOML-CI/JOML
src/org/joml/Matrix3f.java
Matrix3f.obliqueZ
public Matrix3f obliqueZ(float a, float b, Matrix3f dest) { """ Apply an oblique projection transformation to this matrix with the given values for <code>a</code> and <code>b</code> and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>O</code> the oblique transf...
java
public Matrix3f obliqueZ(float a, float b, Matrix3f dest) { dest.m00 = m00; dest.m01 = m01; dest.m02 = m02; dest.m10 = m10; dest.m11 = m11; dest.m12 = m12; dest.m20 = m00 * a + m10 * b + m20; dest.m21 = m01 * a + m11 * b + m21; dest.m22 = m02 * a +...
[ "public", "Matrix3f", "obliqueZ", "(", "float", "a", ",", "float", "b", ",", "Matrix3f", "dest", ")", "{", "dest", ".", "m00", "=", "m00", ";", "dest", ".", "m01", "=", "m01", ";", "dest", ".", "m02", "=", "m02", ";", "dest", ".", "m10", "=", "...
Apply an oblique projection transformation to this matrix with the given values for <code>a</code> and <code>b</code> and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>O</code> the oblique transformation matrix, then the new matrix will be <code>M * O</code>. So when...
[ "Apply", "an", "oblique", "projection", "transformation", "to", "this", "matrix", "with", "the", "given", "values", "for", "<code", ">", "a<", "/", "code", ">", "and", "<code", ">", "b<", "/", "code", ">", "and", "store", "the", "result", "in", "<code", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3f.java#L4180-L4191
nats-io/java-nats
src/main/java/io/nats/client/NKey.java
NKey.getKeyPair
public KeyPair getKeyPair() throws GeneralSecurityException, IOException { """ @return A Java security keypair that represents this NKey in Java security form. @throws GeneralSecurityException if there is an encryption problem @throws IOException if there is a problem encoding or decoding """...
java
public KeyPair getKeyPair() throws GeneralSecurityException, IOException { if (privateKeyAsSeed == null) { throw new IllegalStateException("Public-only NKey"); } DecodedSeed decoded = decodeSeed(privateKeyAsSeed); byte[] seedBytes = new byte[ED25519_SEED_SIZE]; byte[...
[ "public", "KeyPair", "getKeyPair", "(", ")", "throws", "GeneralSecurityException", ",", "IOException", "{", "if", "(", "privateKeyAsSeed", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Public-only NKey\"", ")", ";", "}", "DecodedSeed", "...
@return A Java security keypair that represents this NKey in Java security form. @throws GeneralSecurityException if there is an encryption problem @throws IOException if there is a problem encoding or decoding
[ "@return", "A", "Java", "security", "keypair", "that", "represents", "this", "NKey", "in", "Java", "security", "form", "." ]
train
https://github.com/nats-io/java-nats/blob/5f291048fd30192ba39b3fe2925ecd60aaad6b48/src/main/java/io/nats/client/NKey.java#L732-L750
alkacon/opencms-core
src/org/opencms/flex/CmsFlexResponse.java
CmsFlexResponse.setCmsCacheKey
CmsFlexCacheKey setCmsCacheKey(String resourcename, String cacheDirectives, boolean online) throws CmsFlexCacheException { """ Sets the cache key for this response, which is calculated from the provided parameters.<p> @param resourcename the target resource for which to create the cache key @param cacheDi...
java
CmsFlexCacheKey setCmsCacheKey(String resourcename, String cacheDirectives, boolean online) throws CmsFlexCacheException { m_key = new CmsFlexCacheKey(resourcename, cacheDirectives, online); if (m_key.hadParseError()) { // We throw the exception here to make sure this response has a val...
[ "CmsFlexCacheKey", "setCmsCacheKey", "(", "String", "resourcename", ",", "String", "cacheDirectives", ",", "boolean", "online", ")", "throws", "CmsFlexCacheException", "{", "m_key", "=", "new", "CmsFlexCacheKey", "(", "resourcename", ",", "cacheDirectives", ",", "onli...
Sets the cache key for this response, which is calculated from the provided parameters.<p> @param resourcename the target resource for which to create the cache key @param cacheDirectives the cache directives of the resource (value of the property "cache") @param online indicates if this resource is online or offline ...
[ "Sets", "the", "cache", "key", "for", "this", "response", "which", "is", "calculated", "from", "the", "provided", "parameters", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/flex/CmsFlexResponse.java#L968-L981
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br/br_configurebandwidth6x.java
br_configurebandwidth6x.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ br_configurebandwidth6x_responses result = (br_configurebandwidth6x_res...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { br_configurebandwidth6x_responses result = (br_configurebandwidth6x_responses) service.get_payload_formatter().string_to_resource(br_configurebandwidth6x_responses.class, response); if(result.errorcode !...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "br_configurebandwidth6x_responses", "result", "=", "(", "br_configurebandwidth6x_responses", ")", "service", "....
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br/br_configurebandwidth6x.java#L178-L195
canoo/open-dolphin
subprojects/server/src/main/groovy/org/opendolphin/server/adapter/DolphinServlet.java
DolphinServlet.encodeOutput
protected String encodeOutput(Codec codec, List<Command> results) { """ Encodes the given output. @param codec - the {@code Codec} used to endecode {@code output} @param results - the outgoing collection of commands to be encoded. @return a literal representation of the encoded commands """ re...
java
protected String encodeOutput(Codec codec, List<Command> results) { return codec.encode(results); }
[ "protected", "String", "encodeOutput", "(", "Codec", "codec", ",", "List", "<", "Command", ">", "results", ")", "{", "return", "codec", ".", "encode", "(", "results", ")", ";", "}" ]
Encodes the given output. @param codec - the {@code Codec} used to endecode {@code output} @param results - the outgoing collection of commands to be encoded. @return a literal representation of the encoded commands
[ "Encodes", "the", "given", "output", "." ]
train
https://github.com/canoo/open-dolphin/blob/50166defc3ef2de473d7a7246c32dc04304d80ef/subprojects/server/src/main/groovy/org/opendolphin/server/adapter/DolphinServlet.java#L224-L226
redbox-mint/redbox
plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/FormDataParser.java
FormDataParser.getObject
private static JsonObject getObject(JSONArray array, int index) throws IOException { """ Get a child JSON Object from an incoming JSON array. If the child does not exist it will be created, along with any smaller index values. The index is expected to be 1 based (like form data). It is only valid ...
java
private static JsonObject getObject(JSONArray array, int index) throws IOException { // We can't just jam an entry into the array without // checking that earlier indexes exist. Also we need // to account for 0 versus 1 based indexing. // Index changed to 0 based i...
[ "private", "static", "JsonObject", "getObject", "(", "JSONArray", "array", ",", "int", "index", ")", "throws", "IOException", "{", "// We can't just jam an entry into the array without", "// checking that earlier indexes exist. Also we need", "// to account for 0 versus 1 based ind...
Get a child JSON Object from an incoming JSON array. If the child does not exist it will be created, along with any smaller index values. The index is expected to be 1 based (like form data). It is only valid for form arrays to hold JSON Objects. @param array The incoming array we are to look inside @param index The ...
[ "Get", "a", "child", "JSON", "Object", "from", "an", "incoming", "JSON", "array", ".", "If", "the", "child", "does", "not", "exist", "it", "will", "be", "created", "along", "with", "any", "smaller", "index", "values", ".", "The", "index", "is", "expected...
train
https://github.com/redbox-mint/redbox/blob/1db230f218031b85c48c8603cbb04fce7ac6de0c/plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/FormDataParser.java#L231-L260
eFaps/eFaps-Kernel
src/main/java/org/efaps/beans/ValueList.java
ValueList.addExpression
public void addExpression(final String _expression) { """ Add an Expression to this ValueList. @param _expression String with the expression """ this.tokens.add(new Token(ValueList.TokenType.EXPRESSION, _expression)); getExpressions().add(_expression); }
java
public void addExpression(final String _expression) { this.tokens.add(new Token(ValueList.TokenType.EXPRESSION, _expression)); getExpressions().add(_expression); }
[ "public", "void", "addExpression", "(", "final", "String", "_expression", ")", "{", "this", ".", "tokens", ".", "add", "(", "new", "Token", "(", "ValueList", ".", "TokenType", ".", "EXPRESSION", ",", "_expression", ")", ")", ";", "getExpressions", "(", ")"...
Add an Expression to this ValueList. @param _expression String with the expression
[ "Add", "an", "Expression", "to", "this", "ValueList", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/beans/ValueList.java#L110-L114
threerings/nenya
core/src/main/java/com/threerings/miso/client/SceneBlock.java
SceneBlock.updateFringe
public void updateFringe (int tx, int ty) { """ Instructs this block to recompute its fringe at the specified location. """ int tidx = index(tx, ty); if (_base[tidx] != null) { _fringe[tidx] = computeFringeTile(tx, ty); } }
java
public void updateFringe (int tx, int ty) { int tidx = index(tx, ty); if (_base[tidx] != null) { _fringe[tidx] = computeFringeTile(tx, ty); } }
[ "public", "void", "updateFringe", "(", "int", "tx", ",", "int", "ty", ")", "{", "int", "tidx", "=", "index", "(", "tx", ",", "ty", ")", ";", "if", "(", "_base", "[", "tidx", "]", "!=", "null", ")", "{", "_fringe", "[", "tidx", "]", "=", "comput...
Instructs this block to recompute its fringe at the specified location.
[ "Instructs", "this", "block", "to", "recompute", "its", "fringe", "at", "the", "specified", "location", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/miso/client/SceneBlock.java#L346-L352
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java
ConfigUtils.getDouble
public static double getDouble(Config config, String path, double def) { """ Return double value at <code>path</code> if <code>config</code> has path. If not return <code>def</code> @param config in which the path may be present @param path key to look for in the config object @return double value at <code>pa...
java
public static double getDouble(Config config, String path, double def) { if (config.hasPath(path)) { return config.getDouble(path); } return def; }
[ "public", "static", "double", "getDouble", "(", "Config", "config", ",", "String", "path", ",", "double", "def", ")", "{", "if", "(", "config", ".", "hasPath", "(", "path", ")", ")", "{", "return", "config", ".", "getDouble", "(", "path", ")", ";", "...
Return double value at <code>path</code> if <code>config</code> has path. If not return <code>def</code> @param config in which the path may be present @param path key to look for in the config object @return double value at <code>path</code> if <code>config</code> has path. If not return <code>def</code>
[ "Return", "double", "value", "at", "<code", ">", "path<", "/", "code", ">", "if", "<code", ">", "config<", "/", "code", ">", "has", "path", ".", "If", "not", "return", "<code", ">", "def<", "/", "code", ">" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ConfigUtils.java#L378-L383
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/asynchronous/GVRAsynchronousResourceLoader.java
GVRAsynchronousResourceLoader.decodeStream
public static Bitmap decodeStream(InputStream stream, boolean closeStream) { """ An internal method, public only so that GVRContext can make cross-package calls. A synchronous (blocking) wrapper around {@link android.graphics.BitmapFactory#decodeStream(InputStream) BitmapFactory.decodeStream} that uses an {...
java
public static Bitmap decodeStream(InputStream stream, boolean closeStream) { return AsyncBitmapTexture.decodeStream(stream, AsyncBitmapTexture.glMaxTextureSize, AsyncBitmapTexture.glMaxTextureSize, true, null, closeStream); }
[ "public", "static", "Bitmap", "decodeStream", "(", "InputStream", "stream", ",", "boolean", "closeStream", ")", "{", "return", "AsyncBitmapTexture", ".", "decodeStream", "(", "stream", ",", "AsyncBitmapTexture", ".", "glMaxTextureSize", ",", "AsyncBitmapTexture", ".",...
An internal method, public only so that GVRContext can make cross-package calls. A synchronous (blocking) wrapper around {@link android.graphics.BitmapFactory#decodeStream(InputStream) BitmapFactory.decodeStream} that uses an {@link android.graphics.BitmapFactory.Options} <code>inTempStorage</code> decode buffer. On l...
[ "An", "internal", "method", "public", "only", "so", "that", "GVRContext", "can", "make", "cross", "-", "package", "calls", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/asynchronous/GVRAsynchronousResourceLoader.java#L668-L672
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/core/DynamicJasperHelper.java
DynamicJasperHelper.visitSubreports
@SuppressWarnings("unchecked") protected static void visitSubreports(DynamicReport dr, Map _parameters) { """ Performs any needed operation on subreports after they are built like ensuring proper subreport with if "fitToParentPrintableArea" flag is set to true @param dr @param _parameters @throws JRExcep...
java
@SuppressWarnings("unchecked") protected static void visitSubreports(DynamicReport dr, Map _parameters) { for (DJGroup group : dr.getColumnsGroups()) { //Header Subreports for (Subreport subreport : group.getHeaderSubreports()) { if (subreport.getDynamicReport() != nu...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "static", "void", "visitSubreports", "(", "DynamicReport", "dr", ",", "Map", "_parameters", ")", "{", "for", "(", "DJGroup", "group", ":", "dr", ".", "getColumnsGroups", "(", ")", ")", "{", "//...
Performs any needed operation on subreports after they are built like ensuring proper subreport with if "fitToParentPrintableArea" flag is set to true @param dr @param _parameters @throws JRException
[ "Performs", "any", "needed", "operation", "on", "subreports", "after", "they", "are", "built", "like", "ensuring", "proper", "subreport", "with", "if", "fitToParentPrintableArea", "flag", "is", "set", "to", "true" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/DynamicJasperHelper.java#L553-L573
jamesdbloom/mockserver
mockserver-core/src/main/java/org/mockserver/socket/tls/KeyAndCertificateFactory.java
KeyAndCertificateFactory.createCACert
private X509Certificate createCACert(PublicKey publicKey, PrivateKey privateKey) throws Exception { """ Create a certificate to use by a Certificate Authority, signed by a self signed certificate. """ // signers name X500Name issuerName = new X500Name("CN=www.mockserver.com, O=MockServer, L=Lo...
java
private X509Certificate createCACert(PublicKey publicKey, PrivateKey privateKey) throws Exception { // signers name X500Name issuerName = new X500Name("CN=www.mockserver.com, O=MockServer, L=London, ST=England, C=UK"); // subjects name - the same as we are self signed. X500Name subject...
[ "private", "X509Certificate", "createCACert", "(", "PublicKey", "publicKey", ",", "PrivateKey", "privateKey", ")", "throws", "Exception", "{", "// signers name", "X500Name", "issuerName", "=", "new", "X500Name", "(", "\"CN=www.mockserver.com, O=MockServer, L=London, ST=Englan...
Create a certificate to use by a Certificate Authority, signed by a self signed certificate.
[ "Create", "a", "certificate", "to", "use", "by", "a", "Certificate", "Authority", "signed", "by", "a", "self", "signed", "certificate", "." ]
train
https://github.com/jamesdbloom/mockserver/blob/8b84fdd877e57b4eb780c9f8c8b1d65bcb448025/mockserver-core/src/main/java/org/mockserver/socket/tls/KeyAndCertificateFactory.java#L138-L168
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SightResourcesImpl.java
SightResourcesImpl.getSight
public Sight getSight(long sightId, Integer level) throws SmartsheetException { """ Get a specified Sight. It mirrors to the following Smartsheet REST API method: GET /sights/{sightId} @param sightId the Id of the Sight @param level compatibility level @return the Sight resource. @throws IllegalArgumentEx...
java
public Sight getSight(long sightId, Integer level) throws SmartsheetException { String path = "sights/" + sightId; HashMap<String, Object> parameters = new HashMap<String, Object>(); if (level != null) { parameters.put("level", level); } path += QueryUtil.generateUrl...
[ "public", "Sight", "getSight", "(", "long", "sightId", ",", "Integer", "level", ")", "throws", "SmartsheetException", "{", "String", "path", "=", "\"sights/\"", "+", "sightId", ";", "HashMap", "<", "String", ",", "Object", ">", "parameters", "=", "new", "Has...
Get a specified Sight. It mirrors to the following Smartsheet REST API method: GET /sights/{sightId} @param sightId the Id of the Sight @param level compatibility level @return the Sight resource. @throws IllegalArgumentException if any argument is null or empty string @throws InvalidRequestException if there is any ...
[ "Get", "a", "specified", "Sight", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SightResourcesImpl.java#L120-L130
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/subdoc/AsyncLookupInBuilder.java
AsyncLookupInBuilder.getCountIn
private Observable<DocumentFragment<Lookup>> getCountIn(final String id, final LookupSpec spec, final long timeout, final TimeUnit timeUnit) { """ Helper method to actually perform the subdoc get count operation. """ return Observable.defer(new Func0<Observable<DocumentFragment<Lookup>>>() { ...
java
private Observable<DocumentFragment<Lookup>> getCountIn(final String id, final LookupSpec spec, final long timeout, final TimeUnit timeUnit) { return Observable.defer(new Func0<Observable<DocumentFragment<Lookup>>>() { @Override public Observable<DocumentFragment<Lookup>> call() ...
[ "private", "Observable", "<", "DocumentFragment", "<", "Lookup", ">", ">", "getCountIn", "(", "final", "String", "id", ",", "final", "LookupSpec", "spec", ",", "final", "long", "timeout", ",", "final", "TimeUnit", "timeUnit", ")", "{", "return", "Observable", ...
Helper method to actually perform the subdoc get count operation.
[ "Helper", "method", "to", "actually", "perform", "the", "subdoc", "get", "count", "operation", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/subdoc/AsyncLookupInBuilder.java#L721-L776
jglobus/JGlobus
gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSContextImpl.java
GlobusGSSContextImpl.initSecContext
public int initSecContext(InputStream in, OutputStream out) throws GSSException { """ It works just like {@link #initSecContext(byte[], int, int) initSecContext} method. It reads one SSL token from input stream, calls {@link #initSecContext(byte[], int, int) initSecContext} method and writes the output ...
java
public int initSecContext(InputStream in, OutputStream out) throws GSSException { byte [] inToken = null; try { if (!this.conn) { inToken = new byte[0]; } else { inToken = SSLUtil.readSslMessage(in); } byte [] outTok...
[ "public", "int", "initSecContext", "(", "InputStream", "in", ",", "OutputStream", "out", ")", "throws", "GSSException", "{", "byte", "[", "]", "inToken", "=", "null", ";", "try", "{", "if", "(", "!", "this", ".", "conn", ")", "{", "inToken", "=", "new"...
It works just like {@link #initSecContext(byte[], int, int) initSecContext} method. It reads one SSL token from input stream, calls {@link #initSecContext(byte[], int, int) initSecContext} method and writes the output token to the output stream (if any) SSL token is not read on the initial call.
[ "It", "works", "just", "like", "{" ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/gss/src/main/java/org/globus/gsi/gssapi/GlobusGSSContextImpl.java#L1928-L1947
netty/netty
buffer/src/main/java/io/netty/buffer/ByteBufUtil.java
ByteBufUtil.readBytes
public static ByteBuf readBytes(ByteBufAllocator alloc, ByteBuf buffer, int length) { """ Read the given amount of bytes into a new {@link ByteBuf} that is allocated from the {@link ByteBufAllocator}. """ boolean release = true; ByteBuf dst = alloc.buffer(length); try { buff...
java
public static ByteBuf readBytes(ByteBufAllocator alloc, ByteBuf buffer, int length) { boolean release = true; ByteBuf dst = alloc.buffer(length); try { buffer.readBytes(dst); release = false; return dst; } finally { if (release) { ...
[ "public", "static", "ByteBuf", "readBytes", "(", "ByteBufAllocator", "alloc", ",", "ByteBuf", "buffer", ",", "int", "length", ")", "{", "boolean", "release", "=", "true", ";", "ByteBuf", "dst", "=", "alloc", ".", "buffer", "(", "length", ")", ";", "try", ...
Read the given amount of bytes into a new {@link ByteBuf} that is allocated from the {@link ByteBufAllocator}.
[ "Read", "the", "given", "amount", "of", "bytes", "into", "a", "new", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java#L442-L454
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCamera.java
GVRCamera.setBackgroundColor
public void setBackgroundColor(float r, float g, float b, float a) { """ Sets the background color of the scene rendered by this camera. If you don't set the background color, the default is an opaque black. Meaningful parameter values are from 0 to 1, inclusive: values {@literal < 0} are clamped to 0; values...
java
public void setBackgroundColor(float r, float g, float b, float a) { setBackgroundColorR(r); setBackgroundColorG(g); setBackgroundColorB(b); setBackgroundColorA(a); }
[ "public", "void", "setBackgroundColor", "(", "float", "r", ",", "float", "g", ",", "float", "b", ",", "float", "a", ")", "{", "setBackgroundColorR", "(", "r", ")", ";", "setBackgroundColorG", "(", "g", ")", ";", "setBackgroundColorB", "(", "b", ")", ";",...
Sets the background color of the scene rendered by this camera. If you don't set the background color, the default is an opaque black. Meaningful parameter values are from 0 to 1, inclusive: values {@literal < 0} are clamped to 0; values {@literal > 1} are clamped to 1.
[ "Sets", "the", "background", "color", "of", "the", "scene", "rendered", "by", "this", "camera", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCamera.java#L97-L102
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/processor/ExtendedSwidProcessor.java
ExtendedSwidProcessor.setSerialNumber
public ExtendedSwidProcessor setSerialNumber(final String serialNumber) { """ Defines product serialNumber (tag: serial_number). @param serialNumber product serialNumber @return a reference to this object. """ swidTag.setSerialNumber(new Token(serialNumber, idGenerator.nextId())); return t...
java
public ExtendedSwidProcessor setSerialNumber(final String serialNumber) { swidTag.setSerialNumber(new Token(serialNumber, idGenerator.nextId())); return this; }
[ "public", "ExtendedSwidProcessor", "setSerialNumber", "(", "final", "String", "serialNumber", ")", "{", "swidTag", ".", "setSerialNumber", "(", "new", "Token", "(", "serialNumber", ",", "idGenerator", ".", "nextId", "(", ")", ")", ")", ";", "return", "this", "...
Defines product serialNumber (tag: serial_number). @param serialNumber product serialNumber @return a reference to this object.
[ "Defines", "product", "serialNumber", "(", "tag", ":", "serial_number", ")", "." ]
train
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/processor/ExtendedSwidProcessor.java#L188-L191
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/android/AuthActivity.java
AuthActivity.makeIntent
public static Intent makeIntent(Context context, String appKey, String desiredUid, String[] alreadyAuthedUids, String sessionId, String webHost, String apiType) { """ Create an intent which can be sent to this activity to start OAuth 2 authentication. @param context the sourc...
java
public static Intent makeIntent(Context context, String appKey, String desiredUid, String[] alreadyAuthedUids, String sessionId, String webHost, String apiType) { if (appKey == null) throw new IllegalArgumentException("'appKey' can't be null"); setAuthParams(appKey, d...
[ "public", "static", "Intent", "makeIntent", "(", "Context", "context", ",", "String", "appKey", ",", "String", "desiredUid", ",", "String", "[", "]", "alreadyAuthedUids", ",", "String", "sessionId", ",", "String", "webHost", ",", "String", "apiType", ")", "{",...
Create an intent which can be sent to this activity to start OAuth 2 authentication. @param context the source context @param appKey the consumer key for the app @param desiredUid Encourage user to authenticate account defined by this uid. (note that user still can authenticate other accounts). May be null if no ui...
[ "Create", "an", "intent", "which", "can", "be", "sent", "to", "this", "activity", "to", "start", "OAuth", "2", "authentication", "." ]
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/android/AuthActivity.java#L255-L260
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/AbstractStoreResource.java
AbstractStoreResource.getGeneralID
private void getGeneralID(final String _complStmt) throws EFapsException { """ Get the generalID etc. from the eFasp DataBase. @param _complStmt Statement to be executed @throws EFapsException on error """ ConnectionResource con = null; try { con = Context.getThreadContext...
java
private void getGeneralID(final String _complStmt) throws EFapsException { ConnectionResource con = null; try { con = Context.getThreadContext().getConnectionResource(); final Statement stmt = con.createStatement(); final ResultSet rs = stmt.executeQuery...
[ "private", "void", "getGeneralID", "(", "final", "String", "_complStmt", ")", "throws", "EFapsException", "{", "ConnectionResource", "con", "=", "null", ";", "try", "{", "con", "=", "Context", ".", "getThreadContext", "(", ")", ".", "getConnectionResource", "(",...
Get the generalID etc. from the eFasp DataBase. @param _complStmt Statement to be executed @throws EFapsException on error
[ "Get", "the", "generalID", "etc", ".", "from", "the", "eFasp", "DataBase", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/AbstractStoreResource.java#L305-L333
carewebframework/carewebframework-vista
org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/NotificationService.java
NotificationService.getUsers
public void getUsers(String startFrom, boolean forward, Collection<Recipient> result) { """ Returns a bolus of users. @param startFrom Starting entry. @param forward Direction of traversal. @param result Result of lookup. """ List<String> lst = broker.callRPCList("RGCWFUSR LOOKUP", null, startFrom...
java
public void getUsers(String startFrom, boolean forward, Collection<Recipient> result) { List<String> lst = broker.callRPCList("RGCWFUSR LOOKUP", null, startFrom, forward ? 1 : -1, null, null, "A"); toRecipients(lst, false, startFrom, result); }
[ "public", "void", "getUsers", "(", "String", "startFrom", ",", "boolean", "forward", ",", "Collection", "<", "Recipient", ">", "result", ")", "{", "List", "<", "String", ">", "lst", "=", "broker", ".", "callRPCList", "(", "\"RGCWFUSR LOOKUP\"", ",", "null", ...
Returns a bolus of users. @param startFrom Starting entry. @param forward Direction of traversal. @param result Result of lookup.
[ "Returns", "a", "bolus", "of", "users", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/NotificationService.java#L74-L77
nemerosa/ontrack
ontrack-service/src/main/java/net/nemerosa/ontrack/service/security/FileConfidentialStore.java
FileConfidentialStore.load
@Override public byte[] load(String key) throws IOException { """ Reverse operation of {@link #store(String, byte[])} @return null the data has not been previously persisted. """ try { File f = getFileFor(key); if (!f.exists()) return null; Cipher sym = Ciphe...
java
@Override public byte[] load(String key) throws IOException { try { File f = getFileFor(key); if (!f.exists()) return null; Cipher sym = Cipher.getInstance("AES"); sym.init(Cipher.DECRYPT_MODE, masterKey); try ( FileInputStream...
[ "@", "Override", "public", "byte", "[", "]", "load", "(", "String", "key", ")", "throws", "IOException", "{", "try", "{", "File", "f", "=", "getFileFor", "(", "key", ")", ";", "if", "(", "!", "f", ".", "exists", "(", ")", ")", "return", "null", "...
Reverse operation of {@link #store(String, byte[])} @return null the data has not been previously persisted.
[ "Reverse", "operation", "of", "{", "@link", "#store", "(", "String", "byte", "[]", ")", "}" ]
train
https://github.com/nemerosa/ontrack/blob/37b0874cbf387b58aba95cd3c1bc3b15e11bc913/ontrack-service/src/main/java/net/nemerosa/ontrack/service/security/FileConfidentialStore.java#L93-L111
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/CmsRootHandler.java
CmsRootHandler.getHandlerById
public CmsAttributeHandler getHandlerById(String entityId, String attributeName) { """ Returns the handler for the given id.<p> @param entityId the entity id @param attributeName the attribute name @return the handler """ return m_handlerById.get(entityId + "/" + attributeName); }
java
public CmsAttributeHandler getHandlerById(String entityId, String attributeName) { return m_handlerById.get(entityId + "/" + attributeName); }
[ "public", "CmsAttributeHandler", "getHandlerById", "(", "String", "entityId", ",", "String", "attributeName", ")", "{", "return", "m_handlerById", ".", "get", "(", "entityId", "+", "\"/\"", "+", "attributeName", ")", ";", "}" ]
Returns the handler for the given id.<p> @param entityId the entity id @param attributeName the attribute name @return the handler
[ "Returns", "the", "handler", "for", "the", "given", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/CmsRootHandler.java#L159-L162
apache/flink
flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/spargel/ScatterGatherIteration.java
ScatterGatherIteration.createResult
@Override public DataSet<Vertex<K, VV>> createResult() { """ Creates the operator that represents this scatter-gather graph computation. @return The operator that represents this scatter-gather graph computation. """ if (this.initialVertices == null) { throw new IllegalStateException("The input data s...
java
@Override public DataSet<Vertex<K, VV>> createResult() { if (this.initialVertices == null) { throw new IllegalStateException("The input data set has not been set."); } // prepare some type information TypeInformation<K> keyType = ((TupleTypeInfo<?>) initialVertices.getType()).getTypeAt(0); TypeInformatio...
[ "@", "Override", "public", "DataSet", "<", "Vertex", "<", "K", ",", "VV", ">", ">", "createResult", "(", ")", "{", "if", "(", "this", ".", "initialVertices", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"The input data set has not ...
Creates the operator that represents this scatter-gather graph computation. @return The operator that represents this scatter-gather graph computation.
[ "Creates", "the", "operator", "that", "represents", "this", "scatter", "-", "gather", "graph", "computation", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/spargel/ScatterGatherIteration.java#L137-L179
davidmoten/rxjava-jdbc
src/main/java/com/github/davidmoten/rx/jdbc/QuerySelectOnSubscribe.java
QuerySelectOnSubscribe.closeQuietly
private static void closeQuietly(State state) { """ Closes connection resources (connection, prepared statement and result set). @param state """ // ensure only closed once and avoid race conditions if (state.closed.compareAndSet(false, true)) { // set the state fields to null a...
java
private static void closeQuietly(State state) { // ensure only closed once and avoid race conditions if (state.closed.compareAndSet(false, true)) { // set the state fields to null after closing for garbage // collection purposes log.debug("closing rs"); Ut...
[ "private", "static", "void", "closeQuietly", "(", "State", "state", ")", "{", "// ensure only closed once and avoid race conditions", "if", "(", "state", ".", "closed", ".", "compareAndSet", "(", "false", ",", "true", ")", ")", "{", "// set the state fields to null af...
Closes connection resources (connection, prepared statement and result set). @param state
[ "Closes", "connection", "resources", "(", "connection", "prepared", "statement", "and", "result", "set", ")", "." ]
train
https://github.com/davidmoten/rxjava-jdbc/blob/81e157d7071a825086bde81107b8694684cdff14/src/main/java/com/github/davidmoten/rx/jdbc/QuerySelectOnSubscribe.java#L156-L169
hankcs/HanLP
src/main/java/com/hankcs/hanlp/HanLP.java
HanLP.extractWords
public static List<WordInfo> extractWords(BufferedReader reader, int size) throws IOException { """ 提取词语 @param reader 从reader获取文本 @param size 需要提取词语的数量 @return 一个词语列表 """ return extractWords(reader, size, false); }
java
public static List<WordInfo> extractWords(BufferedReader reader, int size) throws IOException { return extractWords(reader, size, false); }
[ "public", "static", "List", "<", "WordInfo", ">", "extractWords", "(", "BufferedReader", "reader", ",", "int", "size", ")", "throws", "IOException", "{", "return", "extractWords", "(", "reader", ",", "size", ",", "false", ")", ";", "}" ]
提取词语 @param reader 从reader获取文本 @param size 需要提取词语的数量 @return 一个词语列表
[ "提取词语" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/HanLP.java#L744-L747
sai-pullabhotla/catatumbo
src/main/java/com/jmethods/catatumbo/impl/DatastoreUtils.java
DatastoreUtils.incrementVersion
static Entity incrementVersion(Entity nativeEntity, PropertyMetadata versionMetadata) { """ Increments the version property of the given entity by one. @param nativeEntity the target entity @param versionMetadata the metadata of the version property @return a new entity (copy of the given), but with the inc...
java
static Entity incrementVersion(Entity nativeEntity, PropertyMetadata versionMetadata) { String versionPropertyName = versionMetadata.getMappedName(); long version = nativeEntity.getLong(versionPropertyName); return Entity.newBuilder(nativeEntity).set(versionPropertyName, ++version).build(); }
[ "static", "Entity", "incrementVersion", "(", "Entity", "nativeEntity", ",", "PropertyMetadata", "versionMetadata", ")", "{", "String", "versionPropertyName", "=", "versionMetadata", ".", "getMappedName", "(", ")", ";", "long", "version", "=", "nativeEntity", ".", "g...
Increments the version property of the given entity by one. @param nativeEntity the target entity @param versionMetadata the metadata of the version property @return a new entity (copy of the given), but with the incremented version.
[ "Increments", "the", "version", "property", "of", "the", "given", "entity", "by", "one", "." ]
train
https://github.com/sai-pullabhotla/catatumbo/blob/96d4c6dce3a5009624f7112a398406914dd19165/src/main/java/com/jmethods/catatumbo/impl/DatastoreUtils.java#L151-L155
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehousePersistenceImpl.java
CommerceWarehousePersistenceImpl.findByG_C_P
@Override public List<CommerceWarehouse> findByG_C_P(long groupId, long commerceCountryId, boolean primary, int start, int end) { """ Returns a range of all the commerce warehouses where groupId = &#63; and commerceCountryId = &#63; and primary = &#63;. <p> Useful when paginating results. Returns a maximum ...
java
@Override public List<CommerceWarehouse> findByG_C_P(long groupId, long commerceCountryId, boolean primary, int start, int end) { return findByG_C_P(groupId, commerceCountryId, primary, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceWarehouse", ">", "findByG_C_P", "(", "long", "groupId", ",", "long", "commerceCountryId", ",", "boolean", "primary", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_C_P", "(", "groupId", "...
Returns a range of all the commerce warehouses where groupId = &#63; and commerceCountryId = &#63; and primary = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <c...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "warehouses", "where", "groupId", "=", "&#63", ";", "and", "commerceCountryId", "=", "&#63", ";", "and", "primary", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehousePersistenceImpl.java#L3490-L3494
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/GridBagLayoutBuilder.java
GridBagLayoutBuilder.appendLabeledField
public GridBagLayoutBuilder appendLabeledField(String propertyName, final JComponent field, LabelOrientation labelOrientation) { """ Appends a label and field to the end of the current line. <p /> The label will be to the left of the field, and be right-justified. <br /> The field will "grow" hor...
java
public GridBagLayoutBuilder appendLabeledField(String propertyName, final JComponent field, LabelOrientation labelOrientation) { return appendLabeledField(propertyName, field, labelOrientation, 1); }
[ "public", "GridBagLayoutBuilder", "appendLabeledField", "(", "String", "propertyName", ",", "final", "JComponent", "field", ",", "LabelOrientation", "labelOrientation", ")", "{", "return", "appendLabeledField", "(", "propertyName", ",", "field", ",", "labelOrientation", ...
Appends a label and field to the end of the current line. <p /> The label will be to the left of the field, and be right-justified. <br /> The field will "grow" horizontally as space allows. <p /> @param propertyName the name of the property to create the controls for @return "this" to make it easier to string toget...
[ "Appends", "a", "label", "and", "field", "to", "the", "end", "of", "the", "current", "line", ".", "<p", "/", ">" ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/GridBagLayoutBuilder.java#L267-L270
jamesagnew/hapi-fhir
hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java
ClientUtils.unmarshalReference
@SuppressWarnings("unchecked") protected <T extends Resource> T unmarshalReference(HttpResponse response, String format) { """ Unmarshals a resource from the response stream. @param response @return """ T resource = null; OperationOutcome error = null; byte[] cnt = log(response); if ...
java
@SuppressWarnings("unchecked") protected <T extends Resource> T unmarshalReference(HttpResponse response, String format) { T resource = null; OperationOutcome error = null; byte[] cnt = log(response); if (cnt != null) { try { resource = (T)getParser(format).parse(cnt); if...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "<", "T", "extends", "Resource", ">", "T", "unmarshalReference", "(", "HttpResponse", "response", ",", "String", "format", ")", "{", "T", "resource", "=", "null", ";", "OperationOutcome", "error", ...
Unmarshals a resource from the response stream. @param response @return
[ "Unmarshals", "a", "resource", "from", "the", "response", "stream", "." ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/utils/client/ClientUtils.java#L324-L345
reinert/requestor
requestor/core/requestor-api/src/main/java/io/reinert/requestor/uri/UriBuilderImpl.java
UriBuilderImpl.assertNotNull
private void assertNotNull(Object value, String message) throws IllegalArgumentException { """ Assert that the value is not null. @param value the value @param message the message to include with any exceptions @throws IllegalArgumentException if value is null """ if (value == null) { ...
java
private void assertNotNull(Object value, String message) throws IllegalArgumentException { if (value == null) { throw new IllegalArgumentException(message); } }
[ "private", "void", "assertNotNull", "(", "Object", "value", ",", "String", "message", ")", "throws", "IllegalArgumentException", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}", "}" ]
Assert that the value is not null. @param value the value @param message the message to include with any exceptions @throws IllegalArgumentException if value is null
[ "Assert", "that", "the", "value", "is", "not", "null", "." ]
train
https://github.com/reinert/requestor/blob/40163a75cd17815d5089935d0dd97b8d652ad6d4/requestor/core/requestor-api/src/main/java/io/reinert/requestor/uri/UriBuilderImpl.java#L317-L321
hageldave/ImagingKit
ImagingKit_Fourier/src/main/java/hageldave/imagingkit/fourier/Fourier.java
Fourier.verticalTransform
public static ComplexImg verticalTransform(ColorImg img, int channel) { """ Executes column wise Fourier transforms of the specified channel of the specified {@link ColorImg}. A 1-dimensional Fourier transform is done for each column of the image's channel. @param img of which one channel is to be transformed @...
java
public static ComplexImg verticalTransform(ColorImg img, int channel) { sanityCheckForward(img, channel); // make transforms ComplexImg transformed = new ComplexImg(img.getDimension()); try( NativeRealArray col = new NativeRealArray(img.getHeight()); NativeRealArray fft_r = new NativeRealArray(col.lengt...
[ "public", "static", "ComplexImg", "verticalTransform", "(", "ColorImg", "img", ",", "int", "channel", ")", "{", "sanityCheckForward", "(", "img", ",", "channel", ")", ";", "// make transforms", "ComplexImg", "transformed", "=", "new", "ComplexImg", "(", "img", "...
Executes column wise Fourier transforms of the specified channel of the specified {@link ColorImg}. A 1-dimensional Fourier transform is done for each column of the image's channel. @param img of which one channel is to be transformed @param channel the channel which will be transformed @return transform as ComplexImg ...
[ "Executes", "column", "wise", "Fourier", "transforms", "of", "the", "specified", "channel", "of", "the", "specified", "{", "@link", "ColorImg", "}", ".", "A", "1", "-", "dimensional", "Fourier", "transform", "is", "done", "for", "each", "column", "of", "the"...
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Fourier/src/main/java/hageldave/imagingkit/fourier/Fourier.java#L300-L324
JodaOrg/joda-time
src/main/java/org/joda/time/convert/ReadableDurationConverter.java
ReadableDurationConverter.setInto
public void setInto(ReadWritablePeriod writablePeriod, Object object, Chronology chrono) { """ Extracts duration values from an object of this converter's type, and sets them into the given ReadWritableDuration. @param writablePeriod period to get modified @param object the object to convert, must not be nu...
java
public void setInto(ReadWritablePeriod writablePeriod, Object object, Chronology chrono) { ReadableDuration dur = (ReadableDuration) object; chrono = DateTimeUtils.getChronology(chrono); long duration = dur.getMillis(); int[] values = chrono.get(writablePeriod, duration); for (in...
[ "public", "void", "setInto", "(", "ReadWritablePeriod", "writablePeriod", ",", "Object", "object", ",", "Chronology", "chrono", ")", "{", "ReadableDuration", "dur", "=", "(", "ReadableDuration", ")", "object", ";", "chrono", "=", "DateTimeUtils", ".", "getChronolo...
Extracts duration values from an object of this converter's type, and sets them into the given ReadWritableDuration. @param writablePeriod period to get modified @param object the object to convert, must not be null @param chrono the chronology to use, must not be null @throws NullPointerException if the duration o...
[ "Extracts", "duration", "values", "from", "an", "object", "of", "this", "converter", "s", "type", "and", "sets", "them", "into", "the", "given", "ReadWritableDuration", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/convert/ReadableDurationConverter.java#L71-L79
josueeduardo/snappy
snappy/src/main/java/io/joshworks/snappy/SnappyServer.java
SnappyServer.afterAll
public static synchronized void afterAll(String url, Consumer<Exchange> consumer) { """ Adds an interceptor that executed after all other handlers are executed, changes to {@link Exchange} has no effect. @param url The URL pattern the interceptor will execute, only exact matches and wildcard (*) is allowed...
java
public static synchronized void afterAll(String url, Consumer<Exchange> consumer) { checkStarted(); instance().rootInterceptors.add(new Interceptor(Interceptor.Type.AFTER, HandlerUtil.parseUrl(url), consumer)); }
[ "public", "static", "synchronized", "void", "afterAll", "(", "String", "url", ",", "Consumer", "<", "Exchange", ">", "consumer", ")", "{", "checkStarted", "(", ")", ";", "instance", "(", ")", ".", "rootInterceptors", ".", "add", "(", "new", "Interceptor", ...
Adds an interceptor that executed after all other handlers are executed, changes to {@link Exchange} has no effect. @param url The URL pattern the interceptor will execute, only exact matches and wildcard (*) is allowed @param consumer The code to be executed when a URL matches the provided pattern
[ "Adds", "an", "interceptor", "that", "executed", "after", "all", "other", "handlers", "are", "executed", "changes", "to", "{", "@link", "Exchange", "}", "has", "no", "effect", "." ]
train
https://github.com/josueeduardo/snappy/blob/d95a9e811eda3c24a5e53086369208819884fa49/snappy/src/main/java/io/joshworks/snappy/SnappyServer.java#L286-L289
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/theta/UnionImpl.java
UnionImpl.wrapInstance
static UnionImpl wrapInstance(final Memory srcMem, final long seed) { """ Wrap a Union object around a Union Memory object containing data. Called by SetOperation. @param srcMem The source Memory object. <a href="{@docRoot}/resources/dictionary.html#mem">See Memory</a> @param seed <a href="{@docRoot}/resources...
java
static UnionImpl wrapInstance(final Memory srcMem, final long seed) { Family.UNION.checkFamilyID(extractFamilyID(srcMem)); final UpdateSketch gadget = DirectQuickSelectSketchR.readOnlyWrap(srcMem, seed); final UnionImpl unionImpl = new UnionImpl(gadget, seed); unionImpl.unionThetaLong_ = extractUnionThe...
[ "static", "UnionImpl", "wrapInstance", "(", "final", "Memory", "srcMem", ",", "final", "long", "seed", ")", "{", "Family", ".", "UNION", ".", "checkFamilyID", "(", "extractFamilyID", "(", "srcMem", ")", ")", ";", "final", "UpdateSketch", "gadget", "=", "Dire...
Wrap a Union object around a Union Memory object containing data. Called by SetOperation. @param srcMem The source Memory object. <a href="{@docRoot}/resources/dictionary.html#mem">See Memory</a> @param seed <a href="{@docRoot}/resources/dictionary.html#seed">See seed</a> @return this class
[ "Wrap", "a", "Union", "object", "around", "a", "Union", "Memory", "object", "containing", "data", ".", "Called", "by", "SetOperation", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/theta/UnionImpl.java#L170-L177
influxdata/influxdb-java
src/main/java/org/influxdb/impl/Preconditions.java
Preconditions.checkDuration
public static void checkDuration(final String duration, final String name) throws IllegalArgumentException { """ Enforces that the duration is a valid influxDB duration. @param duration the duration to test @param name variable name for reporting @throws IllegalArgumentException if the given duration is not val...
java
public static void checkDuration(final String duration, final String name) throws IllegalArgumentException { if (!duration.matches("(\\d+[wdmhs])+|inf")) { throw new IllegalArgumentException("Invalid InfluxDB duration: " + duration + " for " + name); } }
[ "public", "static", "void", "checkDuration", "(", "final", "String", "duration", ",", "final", "String", "name", ")", "throws", "IllegalArgumentException", "{", "if", "(", "!", "duration", ".", "matches", "(", "\"(\\\\d+[wdmhs])+|inf\"", ")", ")", "{", "throw", ...
Enforces that the duration is a valid influxDB duration. @param duration the duration to test @param name variable name for reporting @throws IllegalArgumentException if the given duration is not valid.
[ "Enforces", "that", "the", "duration", "is", "a", "valid", "influxDB", "duration", "." ]
train
https://github.com/influxdata/influxdb-java/blob/8ae777f34aa2e598f609208cf4fa12d4642f83f5/src/main/java/org/influxdb/impl/Preconditions.java#L56-L61
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/fmt/BundleSupport.java
BundleSupport.findMatch
private static ResourceBundle findMatch(String basename, Locale pref) { """ /* Gets the resource bundle with the given base name and preferred locale. This method calls java.util.ResourceBundle.getBundle(), but ignores its return value unless its locale represents an exact or language match with the given pr...
java
private static ResourceBundle findMatch(String basename, Locale pref) { ResourceBundle match = null; try { ClassLoader cl = getClassLoaderCheckingPrivilege(); ResourceBundle bundle = ResourceBundle.getBundle(basename, pref, cl); Locale avail = bundle.getLocale(); ...
[ "private", "static", "ResourceBundle", "findMatch", "(", "String", "basename", ",", "Locale", "pref", ")", "{", "ResourceBundle", "match", "=", "null", ";", "try", "{", "ClassLoader", "cl", "=", "getClassLoaderCheckingPrivilege", "(", ")", ";", "ResourceBundle", ...
/* Gets the resource bundle with the given base name and preferred locale. This method calls java.util.ResourceBundle.getBundle(), but ignores its return value unless its locale represents an exact or language match with the given preferred locale. @param basename the resource bundle base name @param pref the preferr...
[ "/", "*", "Gets", "the", "resource", "bundle", "with", "the", "given", "base", "name", "and", "preferred", "locale", "." ]
train
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/fmt/BundleSupport.java#L266-L315
google/closure-compiler
src/com/google/javascript/jscomp/Es6RewriteDestructuring.java
Es6RewriteDestructuring.wrapAssignmentInCallToArrow
private void wrapAssignmentInCallToArrow(NodeTraversal t, Node assignment) { """ Convert the assignment '[x, y] = rhs' that is used as an expression and not an expr result to: (() => let temp0 = rhs; var temp1 = $jscomp.makeIterator(temp0); var x = temp0.next().value; var y = temp0.next().value; return temp0; })...
java
private void wrapAssignmentInCallToArrow(NodeTraversal t, Node assignment) { String tempVarName = getTempVariableName(); Node tempVarModel = astFactory.createName(tempVarName, assignment.getJSType()); Node rhs = assignment.getLastChild().detach(); // let temp0 = rhs; Node newAssignment = IR.let(temp...
[ "private", "void", "wrapAssignmentInCallToArrow", "(", "NodeTraversal", "t", ",", "Node", "assignment", ")", "{", "String", "tempVarName", "=", "getTempVariableName", "(", ")", ";", "Node", "tempVarModel", "=", "astFactory", ".", "createName", "(", "tempVarName", ...
Convert the assignment '[x, y] = rhs' that is used as an expression and not an expr result to: (() => let temp0 = rhs; var temp1 = $jscomp.makeIterator(temp0); var x = temp0.next().value; var y = temp0.next().value; return temp0; }) And the assignment '{x: a, y: b} = rhs' used as an expression and not an expr result to...
[ "Convert", "the", "assignment", "[", "x", "y", "]", "=", "rhs", "that", "is", "used", "as", "an", "expression", "and", "not", "an", "expr", "result", "to", ":", "((", ")", "=", ">", "let", "temp0", "=", "rhs", ";", "var", "temp1", "=", "$jscomp", ...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Es6RewriteDestructuring.java#L681-L713
alkacon/opencms-core
src/org/opencms/jsp/CmsJspActionElement.java
CmsJspActionElement.getContent
public String getContent(String target, String element, Locale locale) { """ Returns the processed output of an element within an OpenCms resource.<p> @param target the target to process @param element name of the element @param locale locale of the element @return the processed output """ I_Cms...
java
public String getContent(String target, String element, Locale locale) { I_CmsResourceLoader loader; CmsFile file; target = toAbsolute(target); try { file = getCmsObject().readFile(target); loader = OpenCms.getResourceManager().getLoader(file); } catch (...
[ "public", "String", "getContent", "(", "String", "target", ",", "String", "element", ",", "Locale", "locale", ")", "{", "I_CmsResourceLoader", "loader", ";", "CmsFile", "file", ";", "target", "=", "toAbsolute", "(", "target", ")", ";", "try", "{", "file", ...
Returns the processed output of an element within an OpenCms resource.<p> @param target the target to process @param element name of the element @param locale locale of the element @return the processed output
[ "Returns", "the", "processed", "output", "of", "an", "element", "within", "an", "OpenCms", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspActionElement.java#L230-L262
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/util/IoUtils.java
IoUtils.copy
public static long copy(InputStream input, OutputStream output) throws IOException { """ Copies all data from an InputStream to an OutputStream. @return the number of bytes copied @throws IOException if an I/O error occurs """ byte[] buffer = new byte[2 * 1024]; long total = 0; int ...
java
public static long copy(InputStream input, OutputStream output) throws IOException { byte[] buffer = new byte[2 * 1024]; long total = 0; int count; while ((count = input.read(buffer)) != -1) { output.write(buffer, 0, count); total += count; } retu...
[ "public", "static", "long", "copy", "(", "InputStream", "input", ",", "OutputStream", "output", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "2", "*", "1024", "]", ";", "long", "total", "=", "0", ";", "int", ...
Copies all data from an InputStream to an OutputStream. @return the number of bytes copied @throws IOException if an I/O error occurs
[ "Copies", "all", "data", "from", "an", "InputStream", "to", "an", "OutputStream", "." ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/util/IoUtils.java#L46-L56
netty/netty
resolver/src/main/java/io/netty/resolver/AddressResolverGroup.java
AddressResolverGroup.getResolver
public AddressResolver<T> getResolver(final EventExecutor executor) { """ Returns the {@link AddressResolver} associated with the specified {@link EventExecutor}. If there's no associated resolved found, this method creates and returns a new resolver instance created by {@link #newResolver(EventExecutor)} so tha...
java
public AddressResolver<T> getResolver(final EventExecutor executor) { if (executor == null) { throw new NullPointerException("executor"); } if (executor.isShuttingDown()) { throw new IllegalStateException("executor not accepting a task"); } AddressResolv...
[ "public", "AddressResolver", "<", "T", ">", "getResolver", "(", "final", "EventExecutor", "executor", ")", "{", "if", "(", "executor", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"executor\"", ")", ";", "}", "if", "(", "executor", ...
Returns the {@link AddressResolver} associated with the specified {@link EventExecutor}. If there's no associated resolved found, this method creates and returns a new resolver instance created by {@link #newResolver(EventExecutor)} so that the new resolver is reused on another {@link #getResolver(EventExecutor)} call ...
[ "Returns", "the", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/resolver/src/main/java/io/netty/resolver/AddressResolverGroup.java#L54-L90
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF2.java
CommonOps_DDF2.fill
public static void fill( DMatrix2x2 a , double v ) { """ <p> Sets every element in the matrix to the specified value.<br> <br> a<sub>ij</sub> = value <p> @param a A matrix whose elements are about to be set. Modified. @param v The value each element will have. """ a.a11 = v; a.a12 = v; ...
java
public static void fill( DMatrix2x2 a , double v ) { a.a11 = v; a.a12 = v; a.a21 = v; a.a22 = v; }
[ "public", "static", "void", "fill", "(", "DMatrix2x2", "a", ",", "double", "v", ")", "{", "a", ".", "a11", "=", "v", ";", "a", ".", "a12", "=", "v", ";", "a", ".", "a21", "=", "v", ";", "a", ".", "a22", "=", "v", ";", "}" ]
<p> Sets every element in the matrix to the specified value.<br> <br> a<sub>ij</sub> = value <p> @param a A matrix whose elements are about to be set. Modified. @param v The value each element will have.
[ "<p", ">", "Sets", "every", "element", "in", "the", "matrix", "to", "the", "specified", "value", ".", "<br", ">", "<br", ">", "a<sub", ">", "ij<", "/", "sub", ">", "=", "value", "<p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/fixed/CommonOps_DDF2.java#L1130-L1133
spring-projects/spring-boot
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/InfoPropertiesInfoContributor.java
InfoPropertiesInfoContributor.replaceValue
protected void replaceValue(Map<String, Object> content, String key, Object value) { """ Replace the {@code value} for the specified key if the value is not {@code null}. @param content the content to expose @param key the property to replace @param value the new value """ if (content.containsKey(key) && ...
java
protected void replaceValue(Map<String, Object> content, String key, Object value) { if (content.containsKey(key) && value != null) { content.put(key, value); } }
[ "protected", "void", "replaceValue", "(", "Map", "<", "String", ",", "Object", ">", "content", ",", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "content", ".", "containsKey", "(", "key", ")", "&&", "value", "!=", "null", ")", "{", "...
Replace the {@code value} for the specified key if the value is not {@code null}. @param content the content to expose @param key the property to replace @param value the new value
[ "Replace", "the", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/InfoPropertiesInfoContributor.java#L136-L140
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Dict.java
Dict.toBean
public <T> T toBean(T bean, boolean isToCamelCase) { """ 转换为Bean对象 @param <T> Bean类型 @param bean Bean @param isToCamelCase 是否转换为驼峰模式 @return Bean """ BeanUtil.fillBeanWithMap(this, bean, isToCamelCase, false); return bean; }
java
public <T> T toBean(T bean, boolean isToCamelCase) { BeanUtil.fillBeanWithMap(this, bean, isToCamelCase, false); return bean; }
[ "public", "<", "T", ">", "T", "toBean", "(", "T", "bean", ",", "boolean", "isToCamelCase", ")", "{", "BeanUtil", ".", "fillBeanWithMap", "(", "this", ",", "bean", ",", "isToCamelCase", ",", "false", ")", ";", "return", "bean", ";", "}" ]
转换为Bean对象 @param <T> Bean类型 @param bean Bean @param isToCamelCase 是否转换为驼峰模式 @return Bean
[ "转换为Bean对象" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Dict.java#L118-L121
ebean-orm/ebean-querybean
src/main/java/io/ebean/typequery/TQRootBean.java
TQRootBean.multiMatch
public R multiMatch(String query, MultiMatch multiMatch) { """ Add a Text Multi-match expression (document store only). <p> This automatically makes the query a document store query. </p> """ peekExprList().multiMatch(query, multiMatch); return root; }
java
public R multiMatch(String query, MultiMatch multiMatch) { peekExprList().multiMatch(query, multiMatch); return root; }
[ "public", "R", "multiMatch", "(", "String", "query", ",", "MultiMatch", "multiMatch", ")", "{", "peekExprList", "(", ")", ".", "multiMatch", "(", "query", ",", "multiMatch", ")", ";", "return", "root", ";", "}" ]
Add a Text Multi-match expression (document store only). <p> This automatically makes the query a document store query. </p>
[ "Add", "a", "Text", "Multi", "-", "match", "expression", "(", "document", "store", "only", ")", ".", "<p", ">", "This", "automatically", "makes", "the", "query", "a", "document", "store", "query", ".", "<", "/", "p", ">" ]
train
https://github.com/ebean-orm/ebean-querybean/blob/821650cb817c9c0fdcc97f93408dc79170b12423/src/main/java/io/ebean/typequery/TQRootBean.java#L1377-L1380
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Waiter.java
Waiter.waitForFragment
public boolean waitForFragment(String tag, int id, int timeout) { """ Waits for a Fragment with a given tag or id to appear. @param tag the name of the tag or null if no tag @param id the id of the tag @param timeout the amount of time in milliseconds to wait @return true if fragment appears and false if it ...
java
public boolean waitForFragment(String tag, int id, int timeout){ long endTime = SystemClock.uptimeMillis() + timeout; while (SystemClock.uptimeMillis() <= endTime) { if(getSupportFragment(tag, id) != null) return true; if(getFragment(tag, id) != null) return true; } return false; }
[ "public", "boolean", "waitForFragment", "(", "String", "tag", ",", "int", "id", ",", "int", "timeout", ")", "{", "long", "endTime", "=", "SystemClock", ".", "uptimeMillis", "(", ")", "+", "timeout", ";", "while", "(", "SystemClock", ".", "uptimeMillis", "(...
Waits for a Fragment with a given tag or id to appear. @param tag the name of the tag or null if no tag @param id the id of the tag @param timeout the amount of time in milliseconds to wait @return true if fragment appears and false if it does not appear before the timeout
[ "Waits", "for", "a", "Fragment", "with", "a", "given", "tag", "or", "id", "to", "appear", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Waiter.java#L682-L693
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbTV.java
TmdbTV.getTVInfo
public TVInfo getTVInfo(int tvID, String language, String... appendToResponse) throws MovieDbException { """ Get the primary information about a TV series by id. @param tvID @param language @param appendToResponse @return @throws com.omertron.themoviedbapi.MovieDbException """ TmdbParameters par...
java
public TVInfo getTVInfo(int tvID, String language, String... appendToResponse) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, tvID); parameters.add(Param.LANGUAGE, language); parameters.add(Param.APPEND, appendToResponse); UR...
[ "public", "TVInfo", "getTVInfo", "(", "int", "tvID", ",", "String", "language", ",", "String", "...", "appendToResponse", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", ";", "parameters", ".", "add...
Get the primary information about a TV series by id. @param tvID @param language @param appendToResponse @return @throws com.omertron.themoviedbapi.MovieDbException
[ "Get", "the", "primary", "information", "about", "a", "TV", "series", "by", "id", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbTV.java#L81-L95
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java
HawkbitCommonUtil.createDSLazyQueryContainer
public static LazyQueryContainer createDSLazyQueryContainer( final BeanQueryFactory<? extends AbstractBeanQuery<?>> queryFactory) { """ Create lazy query container for DS type. @param queryFactory @return LazyQueryContainer """ queryFactory.setQueryConfiguration(Collections.emptyMap());...
java
public static LazyQueryContainer createDSLazyQueryContainer( final BeanQueryFactory<? extends AbstractBeanQuery<?>> queryFactory) { queryFactory.setQueryConfiguration(Collections.emptyMap()); return new LazyQueryContainer(new LazyQueryDefinition(true, 20, "tagIdName"), queryFactory); }
[ "public", "static", "LazyQueryContainer", "createDSLazyQueryContainer", "(", "final", "BeanQueryFactory", "<", "?", "extends", "AbstractBeanQuery", "<", "?", ">", ">", "queryFactory", ")", "{", "queryFactory", ".", "setQueryConfiguration", "(", "Collections", ".", "em...
Create lazy query container for DS type. @param queryFactory @return LazyQueryContainer
[ "Create", "lazy", "query", "container", "for", "DS", "type", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L343-L347
jbundle/jbundle
base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBaseButton.java
HBaseButton.printInputControl
public void printInputControl(PrintWriter out, String strFieldDesc, String strFieldName, String strSize, String strMaxSize, String strValue, String strControlType, int iHtmlAttributes) { """ display this field in html input format. @param out The html out stream. @param strFieldDesc The field description. @para...
java
public void printInputControl(PrintWriter out, String strFieldDesc, String strFieldName, String strSize, String strMaxSize, String strValue, String strControlType, int iHtmlAttributes) { strControlType = "checkbox"; String strDefault = ""; if (strValue.length() > 0) if (strValue.charAt(0) ==...
[ "public", "void", "printInputControl", "(", "PrintWriter", "out", ",", "String", "strFieldDesc", ",", "String", "strFieldName", ",", "String", "strSize", ",", "String", "strMaxSize", ",", "String", "strValue", ",", "String", "strControlType", ",", "int", "iHtmlAtt...
display this field in html input format. @param out The html out stream. @param strFieldDesc The field description. @param strFieldName The field name. @param strSize The control size. @param strMaxSize The string max size. @param strValue The default value. @param strControlType The control type. @param iHtmlAttribure...
[ "display", "this", "field", "in", "html", "input", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBaseButton.java#L68-L75
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/plugins/util/DescriptionBuilder.java
DescriptionBuilder.frameworkMapping
public DescriptionBuilder frameworkMapping(final String key, final String name) { """ Add a property mapping for framework properties @param key property key @param name a property name mapping @return this builder """ fwkmapping.put(key, name); return this; }
java
public DescriptionBuilder frameworkMapping(final String key, final String name) { fwkmapping.put(key, name); return this; }
[ "public", "DescriptionBuilder", "frameworkMapping", "(", "final", "String", "key", ",", "final", "String", "name", ")", "{", "fwkmapping", ".", "put", "(", "key", ",", "name", ")", ";", "return", "this", ";", "}" ]
Add a property mapping for framework properties @param key property key @param name a property name mapping @return this builder
[ "Add", "a", "property", "mapping", "for", "framework", "properties", "@param", "key", "property", "key", "@param", "name", "a", "property", "name", "mapping" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/plugins/util/DescriptionBuilder.java#L140-L143
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/schema/SchemaService.java
SchemaService.getApplication
public ApplicationDefinition getApplication(Tenant tenant, String appName) { """ Return the {@link ApplicationDefinition} for the application in the given tenant. Null is returned if no application is found with the given name and tenant. @return The {@link ApplicationDefinition} for the given application or n...
java
public ApplicationDefinition getApplication(Tenant tenant, String appName) { checkServiceState(); return getApplicationDefinition(tenant, appName); }
[ "public", "ApplicationDefinition", "getApplication", "(", "Tenant", "tenant", ",", "String", "appName", ")", "{", "checkServiceState", "(", ")", ";", "return", "getApplicationDefinition", "(", "tenant", ",", "appName", ")", ";", "}" ]
Return the {@link ApplicationDefinition} for the application in the given tenant. Null is returned if no application is found with the given name and tenant. @return The {@link ApplicationDefinition} for the given application or null if no no such application is defined in the default tenant.
[ "Return", "the", "{", "@link", "ApplicationDefinition", "}", "for", "the", "application", "in", "the", "given", "tenant", ".", "Null", "is", "returned", "if", "no", "application", "is", "found", "with", "the", "given", "name", "and", "tenant", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/schema/SchemaService.java#L178-L181
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/utils/CommonExpectations.java
CommonExpectations.getJwtPrincipalExpectations
public static Expectations getJwtPrincipalExpectations(String testAction, String user, String issuer) { """ Sets expectations that will check various claims within the subject JWT. """ Expectations expectations = new Expectations(); expectations.addExpectation(new JwtExpectation(testAction, "to...
java
public static Expectations getJwtPrincipalExpectations(String testAction, String user, String issuer) { Expectations expectations = new Expectations(); expectations.addExpectation(new JwtExpectation(testAction, "token_type", JwtFatConstants.TOKEN_TYPE_BEARER)); expectations.addExpectation(new Jw...
[ "public", "static", "Expectations", "getJwtPrincipalExpectations", "(", "String", "testAction", ",", "String", "user", ",", "String", "issuer", ")", "{", "Expectations", "expectations", "=", "new", "Expectations", "(", ")", ";", "expectations", ".", "addExpectation"...
Sets expectations that will check various claims within the subject JWT.
[ "Sets", "expectations", "that", "will", "check", "various", "claims", "within", "the", "subject", "JWT", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwtsso_fat/fat/src/com/ibm/ws/security/jwtsso/fat/utils/CommonExpectations.java#L196-L203
Impetus/Kundera
src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/HBaseDataWrapper.java
HBaseDataWrapper.putColumn
private void putColumn(byte[] family, byte[] qualifier, byte[] qualifierValue) { """ Put column. @param family the family @param qualifier the qualifier @param qualifierValue the qualifier value """ this.columns.put(Bytes.toString(family) + ":" + Bytes.toString(qualifier), qualifierValue); ...
java
private void putColumn(byte[] family, byte[] qualifier, byte[] qualifierValue) { this.columns.put(Bytes.toString(family) + ":" + Bytes.toString(qualifier), qualifierValue); }
[ "private", "void", "putColumn", "(", "byte", "[", "]", "family", ",", "byte", "[", "]", "qualifier", ",", "byte", "[", "]", "qualifierValue", ")", "{", "this", ".", "columns", ".", "put", "(", "Bytes", ".", "toString", "(", "family", ")", "+", "\":\"...
Put column. @param family the family @param qualifier the qualifier @param qualifierValue the qualifier value
[ "Put", "column", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/HBaseDataWrapper.java#L138-L141
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/util/EventManger.java
EventManger.signalEvent
public boolean signalEvent(K eventKey, R eventResult) { """ Signal an event and the event result. <p> This method will return <code>false</code> if the event was not created with {@link #performActionAndWaitForEvent(Object, long, Callback)}. </p> @param eventKey the event key, must not be null. @param even...
java
public boolean signalEvent(K eventKey, R eventResult) { final Reference<R> reference = events.get(eventKey); if (reference == null) { return false; } reference.eventResult = eventResult; synchronized (reference) { reference.notifyAll(); } r...
[ "public", "boolean", "signalEvent", "(", "K", "eventKey", ",", "R", "eventResult", ")", "{", "final", "Reference", "<", "R", ">", "reference", "=", "events", ".", "get", "(", "eventKey", ")", ";", "if", "(", "reference", "==", "null", ")", "{", "return...
Signal an event and the event result. <p> This method will return <code>false</code> if the event was not created with {@link #performActionAndWaitForEvent(Object, long, Callback)}. </p> @param eventKey the event key, must not be null. @param eventResult the event result, may be null. @return true if the event was fou...
[ "Signal", "an", "event", "and", "the", "event", "result", ".", "<p", ">", "This", "method", "will", "return", "<code", ">", "false<", "/", "code", ">", "if", "the", "event", "was", "not", "created", "with", "{", "@link", "#performActionAndWaitForEvent", "(...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/util/EventManger.java#L78-L88
xfcjscn/sudoor-server-lib
src/main/java/net/gplatform/sudoor/server/security/model/auth/SSAuth.java
SSAuth.signin
public void signin(String username, String password) { """ WARNING: Normally this is used by non-web interface. For web interface, pls use Spring Security config to auto authenticate Here there is no authenticate @param username @param password """ logger.debug("signin:" + username); Authentication ...
java
public void signin(String username, String password) { logger.debug("signin:" + username); Authentication request = new UsernamePasswordAuthenticationToken(username, password, null); SecurityContextHolder.getContext().setAuthentication(request); }
[ "public", "void", "signin", "(", "String", "username", ",", "String", "password", ")", "{", "logger", ".", "debug", "(", "\"signin:\"", "+", "username", ")", ";", "Authentication", "request", "=", "new", "UsernamePasswordAuthenticationToken", "(", "username", ",...
WARNING: Normally this is used by non-web interface. For web interface, pls use Spring Security config to auto authenticate Here there is no authenticate @param username @param password
[ "WARNING", ":", "Normally", "this", "is", "used", "by", "non", "-", "web", "interface", ".", "For", "web", "interface", "pls", "use", "Spring", "Security", "config", "to", "auto", "authenticate", "Here", "there", "is", "no", "authenticate" ]
train
https://github.com/xfcjscn/sudoor-server-lib/blob/37dc1996eaa9cad25c82abd1de315ba565e32097/src/main/java/net/gplatform/sudoor/server/security/model/auth/SSAuth.java#L127-L132
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/util/NameUtil.java
NameUtil.getHomeBeanClassName
public static String getHomeBeanClassName(EnterpriseBean enterpriseBean, boolean isPost11DD) // d114199 { """ Return the name of the deployed home bean class. Assumption here is the package name of the local and remote interfaces are the same. This method uses the last package name found in either the remote or ...
java
public static String getHomeBeanClassName(EnterpriseBean enterpriseBean, boolean isPost11DD) // d114199 { String packageName = null; String homeInterfaceName = getHomeInterfaceName(enterpriseBean); // LIDB2281.24.2 made several changes to code below, to accommodate case // where ne...
[ "public", "static", "String", "getHomeBeanClassName", "(", "EnterpriseBean", "enterpriseBean", ",", "boolean", "isPost11DD", ")", "// d114199", "{", "String", "packageName", "=", "null", ";", "String", "homeInterfaceName", "=", "getHomeInterfaceName", "(", "enterpriseBe...
Return the name of the deployed home bean class. Assumption here is the package name of the local and remote interfaces are the same. This method uses the last package name found in either the remote or local interface, if one or the other exist. If neither is found, null is returned. @param enterpriseBean WCCM object...
[ "Return", "the", "name", "of", "the", "deployed", "home", "bean", "class", ".", "Assumption", "here", "is", "the", "package", "name", "of", "the", "local", "and", "remote", "interfaces", "are", "the", "same", ".", "This", "method", "uses", "the", "last", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/util/NameUtil.java#L367-L399
qmetric/halreader
src/main/java/com/qmetric/hal/reader/HalResource.java
HalResource.getResourcesByRel
public List<HalResource> getResourcesByRel(final String rel) { """ Get embedded resources by relation @param rel Relation name @return Embedded resources """ final List<? extends ReadableRepresentation> resources = representation.getResourcesByRel(rel); return resources.stream() ...
java
public List<HalResource> getResourcesByRel(final String rel) { final List<? extends ReadableRepresentation> resources = representation.getResourcesByRel(rel); return resources.stream() .map(representation -> new HalResource(objectMapper, representation)) .collect(Col...
[ "public", "List", "<", "HalResource", ">", "getResourcesByRel", "(", "final", "String", "rel", ")", "{", "final", "List", "<", "?", "extends", "ReadableRepresentation", ">", "resources", "=", "representation", ".", "getResourcesByRel", "(", "rel", ")", ";", "r...
Get embedded resources by relation @param rel Relation name @return Embedded resources
[ "Get", "embedded", "resources", "by", "relation" ]
train
https://github.com/qmetric/halreader/blob/584167b25ac7ae0559c6e3cdd300b8a02e59b00b/src/main/java/com/qmetric/hal/reader/HalResource.java#L71-L78
spring-projects/spring-android
spring-android-rest-template/src/main/java/org/springframework/web/util/UriUtils.java
UriUtils.encodeAuthority
public static String encodeAuthority(String authority, String encoding) throws UnsupportedEncodingException { """ Encodes the given URI authority with the given encoding. @param authority the authority to be encoded @param encoding the character encoding to encode to @return the encoded authority @throws Unsup...
java
public static String encodeAuthority(String authority, String encoding) throws UnsupportedEncodingException { return HierarchicalUriComponents.encodeUriComponent(authority, encoding, HierarchicalUriComponents.Type.AUTHORITY); }
[ "public", "static", "String", "encodeAuthority", "(", "String", "authority", ",", "String", "encoding", ")", "throws", "UnsupportedEncodingException", "{", "return", "HierarchicalUriComponents", ".", "encodeUriComponent", "(", "authority", ",", "encoding", ",", "Hierarc...
Encodes the given URI authority with the given encoding. @param authority the authority to be encoded @param encoding the character encoding to encode to @return the encoded authority @throws UnsupportedEncodingException when the given encoding parameter is not supported
[ "Encodes", "the", "given", "URI", "authority", "with", "the", "given", "encoding", "." ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-rest-template/src/main/java/org/springframework/web/util/UriUtils.java#L230-L232
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java
X509CRLEntryImpl.getRevocationReason
public static CRLReason getRevocationReason(X509CRLEntry crlEntry) { """ This static method is the default implementation of the getRevocationReason method in X509CRLEntry. """ try { byte[] ext = crlEntry.getExtensionValue("2.5.29.21"); if (ext == null) { return...
java
public static CRLReason getRevocationReason(X509CRLEntry crlEntry) { try { byte[] ext = crlEntry.getExtensionValue("2.5.29.21"); if (ext == null) { return null; } DerValue val = new DerValue(ext); byte[] data = val.getOctetString(); ...
[ "public", "static", "CRLReason", "getRevocationReason", "(", "X509CRLEntry", "crlEntry", ")", "{", "try", "{", "byte", "[", "]", "ext", "=", "crlEntry", ".", "getExtensionValue", "(", "\"2.5.29.21\"", ")", ";", "if", "(", "ext", "==", "null", ")", "{", "re...
This static method is the default implementation of the getRevocationReason method in X509CRLEntry.
[ "This", "static", "method", "is", "the", "default", "implementation", "of", "the", "getRevocationReason", "method", "in", "X509CRLEntry", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java#L254-L269
mozilla/rhino
src/org/mozilla/javascript/ScriptableObject.java
ScriptableObject.sameValue
protected boolean sameValue(Object newValue, Object currentValue) { """ Implements SameValue as described in ES5 9.12, additionally checking if new value is defined. @param newValue the new value @param currentValue the current value @return true if values are the same as defined by ES5 9.12 """ if...
java
protected boolean sameValue(Object newValue, Object currentValue) { if (newValue == NOT_FOUND) { return true; } if (currentValue == NOT_FOUND) { currentValue = Undefined.instance; } // Special rules for numbers: NaN is considered the same value, //...
[ "protected", "boolean", "sameValue", "(", "Object", "newValue", ",", "Object", "currentValue", ")", "{", "if", "(", "newValue", "==", "NOT_FOUND", ")", "{", "return", "true", ";", "}", "if", "(", "currentValue", "==", "NOT_FOUND", ")", "{", "currentValue", ...
Implements SameValue as described in ES5 9.12, additionally checking if new value is defined. @param newValue the new value @param currentValue the current value @return true if values are the same as defined by ES5 9.12
[ "Implements", "SameValue", "as", "described", "in", "ES5", "9", ".", "12", "additionally", "checking", "if", "new", "value", "is", "defined", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptableObject.java#L2044-L2064
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.addMediaEntry
public String addMediaEntry(final Entry entry, final String slug, final InputStream is) throws Exception { """ Add media entry to collection. Accepts a media file to be added to collection. The file will be saved to disk in a directory under the collection's directory and the path will follow the pattern <code>[...
java
public String addMediaEntry(final Entry entry, final String slug, final InputStream is) throws Exception { synchronized (FileStore.getFileStore()) { // Save media file temp file final Content content = entry.getContents().get(0); if (entry.getTitle() == null) { ...
[ "public", "String", "addMediaEntry", "(", "final", "Entry", "entry", ",", "final", "String", "slug", ",", "final", "InputStream", "is", ")", "throws", "Exception", "{", "synchronized", "(", "FileStore", ".", "getFileStore", "(", ")", ")", "{", "// Save media f...
Add media entry to collection. Accepts a media file to be added to collection. The file will be saved to disk in a directory under the collection's directory and the path will follow the pattern <code>[collection-plural]/[entryid]/media/[entryid]</code>. An Atom entry will be created to store metadata for the entry and...
[ "Add", "media", "entry", "to", "collection", ".", "Accepts", "a", "media", "file", "to", "be", "added", "to", "collection", ".", "The", "file", "will", "be", "saved", "to", "disk", "in", "a", "directory", "under", "the", "collection", "s", "directory", "...
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L226-L264
iipc/webarchive-commons
src/main/java/org/archive/util/zip/GzipHeader.java
GzipHeader.readByte
protected int readByte(InputStream in, CRC32 crc) throws IOException { """ Read a byte. We do not expect to get a -1 reading. If we do, we throw exception. Update the crc as we go. @param in InputStream to read. @param crc CRC to update. @return Byte read. @throws IOException """ int b = i...
java
protected int readByte(InputStream in, CRC32 crc) throws IOException { int b = in.read(); if (b == -1) { throw new EOFException(); } if (crc != null) { crc.update(b); } return b & 0xff; }
[ "protected", "int", "readByte", "(", "InputStream", "in", ",", "CRC32", "crc", ")", "throws", "IOException", "{", "int", "b", "=", "in", ".", "read", "(", ")", ";", "if", "(", "b", "==", "-", "1", ")", "{", "throw", "new", "EOFException", "(", ")",...
Read a byte. We do not expect to get a -1 reading. If we do, we throw exception. Update the crc as we go. @param in InputStream to read. @param crc CRC to update. @return Byte read. @throws IOException
[ "Read", "a", "byte", "." ]
train
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/util/zip/GzipHeader.java#L262-L271
devnewton/jnuit
pngdecoder/src/main/java/de/matthiasmann/twl/utils/PNGDecoder.java
PNGDecoder.decodeFlipped
public void decodeFlipped(ByteBuffer buffer, int stride, Format fmt) throws IOException { """ Decodes the image into the specified buffer. The last line is placed at the current position. After decode the buffer position is at the end of the first line. @param buffer the buffer @param stride the stride in by...
java
public void decodeFlipped(ByteBuffer buffer, int stride, Format fmt) throws IOException { if(stride <= 0) { throw new IllegalArgumentException("stride"); } int pos = buffer.position(); int posDelta = (height-1) * stride; buffer.position(pos + posDelta); decode...
[ "public", "void", "decodeFlipped", "(", "ByteBuffer", "buffer", ",", "int", "stride", ",", "Format", "fmt", ")", "throws", "IOException", "{", "if", "(", "stride", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"stride\"", ")", ";", ...
Decodes the image into the specified buffer. The last line is placed at the current position. After decode the buffer position is at the end of the first line. @param buffer the buffer @param stride the stride in bytes from start of a line to start of the next line, must be positive. @param fmt the target format into ...
[ "Decodes", "the", "image", "into", "the", "specified", "buffer", ".", "The", "last", "line", "is", "placed", "at", "the", "current", "position", ".", "After", "decode", "the", "buffer", "position", "is", "at", "the", "end", "of", "the", "first", "line", ...
train
https://github.com/devnewton/jnuit/blob/191f19b55a17451d0f277c151c7e9b4427a12415/pngdecoder/src/main/java/de/matthiasmann/twl/utils/PNGDecoder.java#L352-L361
baratine/baratine
framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java
InHamp.readQueryResult
private void readQueryResult(InH3 hIn, HeadersAmp headers) throws IOException { """ query reply parsing <pre><code> ["reply", {headers}, "from", qid, value] </code></pre> @param hIn the hessian input stream @param headers the message's headers """ ServiceRefAmp serviceRef = readToAddress(hIn...
java
private void readQueryResult(InH3 hIn, HeadersAmp headers) throws IOException { ServiceRefAmp serviceRef = readToAddress(hIn); long id = hIn.readLong(); QueryRefAmp queryRef = serviceRef.removeQueryRef(id); if (queryRef != null) { ClassLoader loader = queryRef.getClassLoader(); ...
[ "private", "void", "readQueryResult", "(", "InH3", "hIn", ",", "HeadersAmp", "headers", ")", "throws", "IOException", "{", "ServiceRefAmp", "serviceRef", "=", "readToAddress", "(", "hIn", ")", ";", "long", "id", "=", "hIn", ".", "readLong", "(", ")", ";", ...
query reply parsing <pre><code> ["reply", {headers}, "from", qid, value] </code></pre> @param hIn the hessian input stream @param headers the message's headers
[ "query", "reply", "parsing" ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/ramp/hamp/InHamp.java#L538-L572
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyMessage.java
NettyMessage.allocateBuffer
private static ByteBuf allocateBuffer(ByteBufAllocator allocator, byte id, int contentLength) { """ Allocates a new (header and contents) buffer and adds some header information for the frame decoder. <p>If the <tt>contentLength</tt> is unknown, you must write the actual length after adding the contents as an...
java
private static ByteBuf allocateBuffer(ByteBufAllocator allocator, byte id, int contentLength) { return allocateBuffer(allocator, id, 0, contentLength, true); }
[ "private", "static", "ByteBuf", "allocateBuffer", "(", "ByteBufAllocator", "allocator", ",", "byte", "id", ",", "int", "contentLength", ")", "{", "return", "allocateBuffer", "(", "allocator", ",", "id", ",", "0", ",", "contentLength", ",", "true", ")", ";", ...
Allocates a new (header and contents) buffer and adds some header information for the frame decoder. <p>If the <tt>contentLength</tt> is unknown, you must write the actual length after adding the contents as an integer to position <tt>0</tt>! @param allocator byte buffer allocator to use @param id {@link NettyMessage...
[ "Allocates", "a", "new", "(", "header", "and", "contents", ")", "buffer", "and", "adds", "some", "header", "information", "for", "the", "frame", "decoder", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyMessage.java#L110-L112
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java
ExcelUtil.read07BySax
public static Excel07SaxReader read07BySax(InputStream in, int sheetIndex, RowHandler rowHandler) { """ Sax方式读取Excel07 @param in 输入流 @param sheetIndex Sheet索引,-1表示全部Sheet, 0表示第一个Sheet @param rowHandler 行处理器 @return {@link Excel07SaxReader} @since 3.2.0 """ try { return new Excel07SaxReader(rowHan...
java
public static Excel07SaxReader read07BySax(InputStream in, int sheetIndex, RowHandler rowHandler) { try { return new Excel07SaxReader(rowHandler).read(in, sheetIndex); } catch (NoClassDefFoundError e) { throw new DependencyException(ObjectUtil.defaultIfNull(e.getCause(), e), PoiChecker.NO_POI_ERROR_MSG); ...
[ "public", "static", "Excel07SaxReader", "read07BySax", "(", "InputStream", "in", ",", "int", "sheetIndex", ",", "RowHandler", "rowHandler", ")", "{", "try", "{", "return", "new", "Excel07SaxReader", "(", "rowHandler", ")", ".", "read", "(", "in", ",", "sheetIn...
Sax方式读取Excel07 @param in 输入流 @param sheetIndex Sheet索引,-1表示全部Sheet, 0表示第一个Sheet @param rowHandler 行处理器 @return {@link Excel07SaxReader} @since 3.2.0
[ "Sax方式读取Excel07" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java#L89-L95
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/preview/CmsFocalPointController.java
CmsFocalPointController.transformRegionBack
private static CmsRectangle transformRegionBack(I_CmsTransform transform, CmsRectangle region) { """ Transforms a rectangle with the inverse of a coordinate transform.<p> @param transform the coordinate transform @param region the rectangle to transform @return the transformed rectangle """ CmsPo...
java
private static CmsRectangle transformRegionBack(I_CmsTransform transform, CmsRectangle region) { CmsPoint topLeft = region.getTopLeft(); CmsPoint bottomRight = region.getBottomRight(); return CmsRectangle.fromPoints(transform.transformBack(topLeft), transform.transformBack(bottomRight)); }
[ "private", "static", "CmsRectangle", "transformRegionBack", "(", "I_CmsTransform", "transform", ",", "CmsRectangle", "region", ")", "{", "CmsPoint", "topLeft", "=", "region", ".", "getTopLeft", "(", ")", ";", "CmsPoint", "bottomRight", "=", "region", ".", "getBott...
Transforms a rectangle with the inverse of a coordinate transform.<p> @param transform the coordinate transform @param region the rectangle to transform @return the transformed rectangle
[ "Transforms", "a", "rectangle", "with", "the", "inverse", "of", "a", "coordinate", "transform", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/preview/CmsFocalPointController.java#L160-L165
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java
Watch.affectsTarget
private boolean affectsTarget(List<Integer> targetIds, int currentId) { """ Checks if the current target id is included in the list of target ids. Returns true if no targetIds are provided. """ return targetIds == null || targetIds.isEmpty() || targetIds.contains(currentId); }
java
private boolean affectsTarget(List<Integer> targetIds, int currentId) { return targetIds == null || targetIds.isEmpty() || targetIds.contains(currentId); }
[ "private", "boolean", "affectsTarget", "(", "List", "<", "Integer", ">", "targetIds", ",", "int", "currentId", ")", "{", "return", "targetIds", "==", "null", "||", "targetIds", ".", "isEmpty", "(", ")", "||", "targetIds", ".", "contains", "(", "currentId", ...
Checks if the current target id is included in the list of target ids. Returns true if no targetIds are provided.
[ "Checks", "if", "the", "current", "target", "id", "is", "included", "in", "the", "list", "of", "target", "ids", ".", "Returns", "true", "if", "no", "targetIds", "are", "provided", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L432-L434
apache/groovy
src/main/groovy/groovy/lang/GString.java
GString.invokeMethod
@Override public Object invokeMethod(String name, Object args) { """ Overloaded to implement duck typing for Strings so that any method that can't be evaluated on this object will be forwarded to the toString() object instead. """ try { return super.invokeMethod(name, args); }...
java
@Override public Object invokeMethod(String name, Object args) { try { return super.invokeMethod(name, args); } catch (MissingMethodException e) { // lets try invoke the method on the real String return InvokerHelper.invokeMethod(toString(), name, args); }...
[ "@", "Override", "public", "Object", "invokeMethod", "(", "String", "name", ",", "Object", "args", ")", "{", "try", "{", "return", "super", ".", "invokeMethod", "(", "name", ",", "args", ")", ";", "}", "catch", "(", "MissingMethodException", "e", ")", "{...
Overloaded to implement duck typing for Strings so that any method that can't be evaluated on this object will be forwarded to the toString() object instead.
[ "Overloaded", "to", "implement", "duck", "typing", "for", "Strings", "so", "that", "any", "method", "that", "can", "t", "be", "evaluated", "on", "this", "object", "will", "be", "forwarded", "to", "the", "toString", "()", "object", "instead", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/lang/GString.java#L83-L91
ACRA/acra
acra-http/src/main/java/org/acra/security/KeyStoreHelper.java
KeyStoreHelper.getKeyStore
@Nullable public static KeyStore getKeyStore(@NonNull Context context, @NonNull CoreConfiguration config) { """ try to get the keystore @param context a context @param config the configuration @return the keystore, or null if none provided / failure """ final HttpSenderConfiguration senderConfig...
java
@Nullable public static KeyStore getKeyStore(@NonNull Context context, @NonNull CoreConfiguration config) { final HttpSenderConfiguration senderConfiguration = ConfigUtils.getPluginConfiguration(config, HttpSenderConfiguration.class); final InstanceCreator instanceCreator = new InstanceCreator(); ...
[ "@", "Nullable", "public", "static", "KeyStore", "getKeyStore", "(", "@", "NonNull", "Context", "context", ",", "@", "NonNull", "CoreConfiguration", "config", ")", "{", "final", "HttpSenderConfiguration", "senderConfiguration", "=", "ConfigUtils", ".", "getPluginConfi...
try to get the keystore @param context a context @param config the configuration @return the keystore, or null if none provided / failure
[ "try", "to", "get", "the", "keystore" ]
train
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-http/src/main/java/org/acra/security/KeyStoreHelper.java#L48-L69
GerdHolz/TOVAL
src/de/invation/code/toval/os/LinuxUtils.java
LinuxUtils.registerFileExtension
@Override public boolean registerFileExtension(String mimeTypeName, String fileTypeExtension, String application) throws OSException { """ Registers a new file extension. @param mimeTypeName MIME type of the file extension. Must be atomic, e.g. <code>foocorp.fooapp.v1</code>. @param fileTypeExtension File...
java
@Override public boolean registerFileExtension(String mimeTypeName, String fileTypeExtension, String application) throws OSException { // TODO create mime-info in /usr/share/mime/packages // TODO add MIME type to .desktop file // not possible due to missing permissions? throw new Uns...
[ "@", "Override", "public", "boolean", "registerFileExtension", "(", "String", "mimeTypeName", ",", "String", "fileTypeExtension", ",", "String", "application", ")", "throws", "OSException", "{", "// TODO create mime-info in /usr/share/mime/packages", "// TODO add MIME type to ....
Registers a new file extension. @param mimeTypeName MIME type of the file extension. Must be atomic, e.g. <code>foocorp.fooapp.v1</code>. @param fileTypeExtension File extension with leading dot, e.g. <code>.bar</code>. @param application Path to the application, which should open the new file extension. @return <code...
[ "Registers", "a", "new", "file", "extension", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/LinuxUtils.java#L141-L147
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/cache/DefaultCacheManagerService.java
DefaultCacheManagerService.logExceptionSimple
private void logExceptionSimple(String location, Exception e) { """ Reports an {@link Exception} as an error to the {@link Reportable}. The error output logged will use the <tt>location</tt> and the exception's message if it is not null. @param location {@link String}, the resource location behind the except...
java
private void logExceptionSimple(String location, Exception e) { StringBuilder bldr = new StringBuilder(); bldr.append("ERROR UPDATING CACHE"); if (location != null) { bldr.append(" for "); bldr.append(location); } bldr.append("\n\treason: "); fina...
[ "private", "void", "logExceptionSimple", "(", "String", "location", ",", "Exception", "e", ")", "{", "StringBuilder", "bldr", "=", "new", "StringBuilder", "(", ")", ";", "bldr", ".", "append", "(", "\"ERROR UPDATING CACHE\"", ")", ";", "if", "(", "location", ...
Reports an {@link Exception} as an error to the {@link Reportable}. The error output logged will use the <tt>location</tt> and the exception's message if it is not null. @param location {@link String}, the resource location behind the exception @param e {@link Exception}, the exception to output message from
[ "Reports", "an", "{", "@link", "Exception", "}", "as", "an", "error", "to", "the", "{", "@link", "Reportable", "}", ".", "The", "error", "output", "logged", "will", "use", "the", "<tt", ">", "location<", "/", "tt", ">", "and", "the", "exception", "s", ...
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/cache/DefaultCacheManagerService.java#L234-L252
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java
SnowflakeFileTransferAgent.compressStreamWithGZIP
private static InputStreamWithMetadata compressStreamWithGZIP( InputStream inputStream) throws SnowflakeSQLException { """ Compress an input stream with GZIP and return the result size, digest and compressed stream. @param inputStream data input @return result size, digest and compressed stream @throws...
java
private static InputStreamWithMetadata compressStreamWithGZIP( InputStream inputStream) throws SnowflakeSQLException { FileBackedOutputStream tempStream = new FileBackedOutputStream(MAX_BUFFER_SIZE, true); try { DigestOutputStream digestStream = new DigestOutputStream(tempStream, ...
[ "private", "static", "InputStreamWithMetadata", "compressStreamWithGZIP", "(", "InputStream", "inputStream", ")", "throws", "SnowflakeSQLException", "{", "FileBackedOutputStream", "tempStream", "=", "new", "FileBackedOutputStream", "(", "MAX_BUFFER_SIZE", ",", "true", ")", ...
Compress an input stream with GZIP and return the result size, digest and compressed stream. @param inputStream data input @return result size, digest and compressed stream @throws SnowflakeSQLException if encountered exception when compressing
[ "Compress", "an", "input", "stream", "with", "GZIP", "and", "return", "the", "result", "size", "digest", "and", "compressed", "stream", "." ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/jdbc/SnowflakeFileTransferAgent.java#L494-L537
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/chatstates/ChatStateManager.java
ChatStateManager.setCurrentState
public void setCurrentState(ChatState newState, Chat chat) throws NotConnectedException, InterruptedException { """ Sets the current state of the provided chat. This method will send an empty bodied Message stanza with the state attached as a {@link org.jivesoftware.smack.packet.ExtensionElement}, if and only if...
java
public void setCurrentState(ChatState newState, Chat chat) throws NotConnectedException, InterruptedException { if (chat == null || newState == null) { throw new IllegalArgumentException("Arguments cannot be null."); } if (!updateChatState(chat, newState)) { return; ...
[ "public", "void", "setCurrentState", "(", "ChatState", "newState", ",", "Chat", "chat", ")", "throws", "NotConnectedException", ",", "InterruptedException", "{", "if", "(", "chat", "==", "null", "||", "newState", "==", "null", ")", "{", "throw", "new", "Illega...
Sets the current state of the provided chat. This method will send an empty bodied Message stanza with the state attached as a {@link org.jivesoftware.smack.packet.ExtensionElement}, if and only if the new chat state is different than the last state. @param newState the new state of the chat @param chat the chat. @thr...
[ "Sets", "the", "current", "state", "of", "the", "provided", "chat", ".", "This", "method", "will", "send", "an", "empty", "bodied", "Message", "stanza", "with", "the", "state", "attached", "as", "a", "{", "@link", "org", ".", "jivesoftware", ".", "smack", ...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/chatstates/ChatStateManager.java#L213-L225
twilliamson/mogwee-logging
src/main/java/com/mogwee/logging/Logger.java
Logger.errorf
public final void errorf(String message, Object... args) { """ Logs a formatted message if ERROR logging is enabled. @param message a <a href="http://download.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax">format string</a> @param args arguments referenced by the format specifiers in the form...
java
public final void errorf(String message, Object... args) { logf(Level.ERROR, null, message, args); }
[ "public", "final", "void", "errorf", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "logf", "(", "Level", ".", "ERROR", ",", "null", ",", "message", ",", "args", ")", ";", "}" ]
Logs a formatted message if ERROR logging is enabled. @param message a <a href="http://download.oracle.com/javase/6/docs/api/java/util/Formatter.html#syntax">format string</a> @param args arguments referenced by the format specifiers in the format string.
[ "Logs", "a", "formatted", "message", "if", "ERROR", "logging", "is", "enabled", "." ]
train
https://github.com/twilliamson/mogwee-logging/blob/30b99c2649de455432d956a8f6a74316de4cd62c/src/main/java/com/mogwee/logging/Logger.java#L278-L281