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
google/error-prone
check_api/src/main/java/com/google/errorprone/dataflow/DataFlow.java
DataFlow.expressionDataflow
@Nullable public static <A extends AbstractValue<A>, S extends Store<S>, T extends TransferFunction<A, S>> A expressionDataflow(TreePath exprPath, Context context, T transfer) { """ Runs the {@code transfer} dataflow analysis to compute the abstract value of the expression which is the leaf of {@code expr...
java
@Nullable public static <A extends AbstractValue<A>, S extends Store<S>, T extends TransferFunction<A, S>> A expressionDataflow(TreePath exprPath, Context context, T transfer) { final Tree leaf = exprPath.getLeaf(); Preconditions.checkArgument( leaf instanceof ExpressionTree, "Leaf of ex...
[ "@", "Nullable", "public", "static", "<", "A", "extends", "AbstractValue", "<", "A", ">", ",", "S", "extends", "Store", "<", "S", ">", ",", "T", "extends", "TransferFunction", "<", "A", ",", "S", ">", ">", "A", "expressionDataflow", "(", "TreePath", "e...
Runs the {@code transfer} dataflow analysis to compute the abstract value of the expression which is the leaf of {@code exprPath}. <p>The expression must be part of a method, lambda, or initializer (inline field initializer or initializer block). Example of an expression outside of such constructs is the identifier in...
[ "Runs", "the", "{", "@code", "transfer", "}", "dataflow", "analysis", "to", "compute", "the", "abstract", "value", "of", "the", "expression", "which", "is", "the", "leaf", "of", "{", "@code", "exprPath", "}", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/dataflow/DataFlow.java#L203-L228
apache/incubator-gobblin
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/CompactionJobConfigurator.java
CompactionJobConfigurator.configureInputAndOutputPaths
protected boolean configureInputAndOutputPaths(Job job, FileSystemDataset dataset) throws IOException { """ Refer to MRCompactorAvroKeyDedupJobRunner#configureInputAndOutputPaths(Job). @return false if no valid input paths present for MR job to process, where a path is valid if it is a directory containing one ...
java
protected boolean configureInputAndOutputPaths(Job job, FileSystemDataset dataset) throws IOException { boolean emptyDirectoryFlag = false; String mrOutputBase = this.state.getProp(MRCompactor.COMPACTION_JOB_DIR); CompactionPathParser parser = new CompactionPathParser(this.state); CompactionPathParser....
[ "protected", "boolean", "configureInputAndOutputPaths", "(", "Job", "job", ",", "FileSystemDataset", "dataset", ")", "throws", "IOException", "{", "boolean", "emptyDirectoryFlag", "=", "false", ";", "String", "mrOutputBase", "=", "this", ".", "state", ".", "getProp"...
Refer to MRCompactorAvroKeyDedupJobRunner#configureInputAndOutputPaths(Job). @return false if no valid input paths present for MR job to process, where a path is valid if it is a directory containing one or more files.
[ "Refer", "to", "MRCompactorAvroKeyDedupJobRunner#configureInputAndOutputPaths", "(", "Job", ")", ".", "@return", "false", "if", "no", "valid", "input", "paths", "present", "for", "MR", "job", "to", "process", "where", "a", "path", "is", "valid", "if", "it", "is"...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/CompactionJobConfigurator.java#L233-L256
cojen/Cojen
src/main/java/org/cojen/classfile/ConstantPool.java
ConstantPool.addConstantNameAndType
public ConstantNameAndTypeInfo addConstantNameAndType(ConstantUTFInfo nameConstant, ConstantUTFInfo descConstant) { """ Get or create a constant name and type structure from the constant pool. """ return (ConstantNameAndTypeInfo)addConstant ...
java
public ConstantNameAndTypeInfo addConstantNameAndType(ConstantUTFInfo nameConstant, ConstantUTFInfo descConstant) { return (ConstantNameAndTypeInfo)addConstant (new ConstantNameAndTypeInfo(nameConstant, descConstant)); }
[ "public", "ConstantNameAndTypeInfo", "addConstantNameAndType", "(", "ConstantUTFInfo", "nameConstant", ",", "ConstantUTFInfo", "descConstant", ")", "{", "return", "(", "ConstantNameAndTypeInfo", ")", "addConstant", "(", "new", "ConstantNameAndTypeInfo", "(", "nameConstant", ...
Get or create a constant name and type structure from the constant pool.
[ "Get", "or", "create", "a", "constant", "name", "and", "type", "structure", "from", "the", "constant", "pool", "." ]
train
https://github.com/cojen/Cojen/blob/ddee9a0fde83870b97e0ed04c58270aa665f3a62/src/main/java/org/cojen/classfile/ConstantPool.java#L243-L247
google/closure-templates
java/src/com/google/template/soy/jbcsrc/ProtoUtils.java
ProtoUtils.accessField
static SoyExpression accessField( SoyProtoType protoType, SoyExpression baseExpr, FieldAccessNode node) { """ Returns a {@link SoyExpression} for accessing a field of a proto. @param protoType The type of the proto being accessed @param baseExpr The proto being accessed @param node The field access oper...
java
static SoyExpression accessField( SoyProtoType protoType, SoyExpression baseExpr, FieldAccessNode node) { return new AccessorGenerator(protoType, baseExpr, node).generate(); }
[ "static", "SoyExpression", "accessField", "(", "SoyProtoType", "protoType", ",", "SoyExpression", "baseExpr", ",", "FieldAccessNode", "node", ")", "{", "return", "new", "AccessorGenerator", "(", "protoType", ",", "baseExpr", ",", "node", ")", ".", "generate", "(",...
Returns a {@link SoyExpression} for accessing a field of a proto. @param protoType The type of the proto being accessed @param baseExpr The proto being accessed @param node The field access operation
[ "Returns", "a", "{", "@link", "SoyExpression", "}", "for", "accessing", "a", "field", "of", "a", "proto", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/ProtoUtils.java#L200-L203
google/closure-compiler
src/com/google/javascript/jscomp/AstFactory.java
AstFactory.createThisAliasReferenceForFunction
Node createThisAliasReferenceForFunction(String aliasName, Node functionNode) { """ Creates a NAME node having the type of "this" appropriate for the given function node. """ final Node result = IR.name(aliasName); if (isAddingTypes()) { result.setJSType(getTypeOfThisForFunctionNode(functionNode)...
java
Node createThisAliasReferenceForFunction(String aliasName, Node functionNode) { final Node result = IR.name(aliasName); if (isAddingTypes()) { result.setJSType(getTypeOfThisForFunctionNode(functionNode)); } return result; }
[ "Node", "createThisAliasReferenceForFunction", "(", "String", "aliasName", ",", "Node", "functionNode", ")", "{", "final", "Node", "result", "=", "IR", ".", "name", "(", "aliasName", ")", ";", "if", "(", "isAddingTypes", "(", ")", ")", "{", "result", ".", ...
Creates a NAME node having the type of "this" appropriate for the given function node.
[ "Creates", "a", "NAME", "node", "having", "the", "type", "of", "this", "appropriate", "for", "the", "given", "function", "node", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/AstFactory.java#L309-L315
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java
MapComposedElement.insertPointAt
public final int insertPointAt(Point2D<?, ?> point, int indexGroup, int indexInGroup) { """ Insert the specified point at the given index in the specified group. @param point is the point to insert @param indexGroup is the index of the group @param indexInGroup is the index of the ponit in the group (0 for th...
java
public final int insertPointAt(Point2D<?, ?> point, int indexGroup, int indexInGroup) { return insertPointAt(point.getX(), point.getY(), indexGroup, indexInGroup); }
[ "public", "final", "int", "insertPointAt", "(", "Point2D", "<", "?", ",", "?", ">", "point", ",", "int", "indexGroup", ",", "int", "indexInGroup", ")", "{", "return", "insertPointAt", "(", "point", ".", "getX", "(", ")", ",", "point", ".", "getY", "(",...
Insert the specified point at the given index in the specified group. @param point is the point to insert @param indexGroup is the index of the group @param indexInGroup is the index of the ponit in the group (0 for the first point of the group...). @return the index of the new point in the element. @throws IndexOutOf...
[ "Insert", "the", "specified", "point", "at", "the", "given", "index", "in", "the", "specified", "group", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L783-L785
Stratio/stratio-connector-commons
connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java
TableMetadataBuilder.addIndex
@TimerJ public TableMetadataBuilder addIndex(IndexType indType, String indexName, String... fields) throws ExecutionException { """ Add an index. Must be called after including columns because columnMetadata is recovered from the tableMetadata. Options in indexMetadata will be null. @param indType the in...
java
@TimerJ public TableMetadataBuilder addIndex(IndexType indType, String indexName, String... fields) throws ExecutionException { IndexName indName = new IndexName(tableName.getName(), tableName.getName(), indexName); Map<ColumnName, ColumnMetadata> columnsMetadata = new HashMap<ColumnName, ColumnMe...
[ "@", "TimerJ", "public", "TableMetadataBuilder", "addIndex", "(", "IndexType", "indType", ",", "String", "indexName", ",", "String", "...", "fields", ")", "throws", "ExecutionException", "{", "IndexName", "indName", "=", "new", "IndexName", "(", "tableName", ".", ...
Add an index. Must be called after including columns because columnMetadata is recovered from the tableMetadata. Options in indexMetadata will be null. @param indType the index type. @param indexName the index name. @param fields the columns which define the index. @return the table metadata builder. @throws if a...
[ "Add", "an", "index", ".", "Must", "be", "called", "after", "including", "columns", "because", "columnMetadata", "is", "recovered", "from", "the", "tableMetadata", ".", "Options", "in", "indexMetadata", "will", "be", "null", "." ]
train
https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/metadata/TableMetadataBuilder.java#L155-L172
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Agg.java
Agg.medianBy
public static <T, U> Collector<T, ?, Optional<T>> medianBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) { """ Get a {@link Collector} that calculates the derived <code>MEDIAN()</code> function given a specific ordering. """ return percentileBy(0.5, function, comparator);...
java
public static <T, U> Collector<T, ?, Optional<T>> medianBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) { return percentileBy(0.5, function, comparator); }
[ "public", "static", "<", "T", ",", "U", ">", "Collector", "<", "T", ",", "?", ",", "Optional", "<", "T", ">", ">", "medianBy", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "U", ">", "function", ",", "Comparator", "<", "?", "super...
Get a {@link Collector} that calculates the derived <code>MEDIAN()</code> function given a specific ordering.
[ "Get", "a", "{" ]
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Agg.java#L815-L817
finmath/finmath-lib
src/main/java/net/finmath/marketdata2/model/curves/ForwardCurveInterpolation.java
ForwardCurveInterpolation.createForwardCurveFromForwards
public static ForwardCurveInterpolation createForwardCurveFromForwards(String name, double[] times, RandomVariable[] givenForwards, double paymentOffset) { """ Create a forward curve from given times and given forwards. @param name The name of this curve. @param times A vector of given time points. @param giv...
java
public static ForwardCurveInterpolation createForwardCurveFromForwards(String name, double[] times, RandomVariable[] givenForwards, double paymentOffset) { ForwardCurveInterpolation forwardCurveInterpolation = new ForwardCurveInterpolation(name, paymentOffset, InterpolationEntityForward.FORWARD, null); for(int tim...
[ "public", "static", "ForwardCurveInterpolation", "createForwardCurveFromForwards", "(", "String", "name", ",", "double", "[", "]", "times", ",", "RandomVariable", "[", "]", "givenForwards", ",", "double", "paymentOffset", ")", "{", "ForwardCurveInterpolation", "forwardC...
Create a forward curve from given times and given forwards. @param name The name of this curve. @param times A vector of given time points. @param givenForwards A vector of given forwards (corresponding to the given time points). @param paymentOffset The maturity of the underlying index modeled by this curve. @return ...
[ "Create", "a", "forward", "curve", "from", "given", "times", "and", "given", "forwards", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata2/model/curves/ForwardCurveInterpolation.java#L234-L244
aol/cyclops
cyclops/src/main/java/cyclops/companion/Functions.java
Functions.skipLongs
public static Function<? super ReactiveSeq<Long>, ? extends ReactiveSeq<Long>> skipLongs(long skip) { """ /* Fluent limit operation using primitive types e.g. <pre> {@code import static cyclops.ReactiveSeq.skipLongs; ReactiveSeq.ofLongs(1,2,3) .to(limitLongs(1)); //[1l] } </pre> """ retu...
java
public static Function<? super ReactiveSeq<Long>, ? extends ReactiveSeq<Long>> skipLongs(long skip){ return a->a.longs(i->i,s->s.skip(skip)); }
[ "public", "static", "Function", "<", "?", "super", "ReactiveSeq", "<", "Long", ">", ",", "?", "extends", "ReactiveSeq", "<", "Long", ">", ">", "skipLongs", "(", "long", "skip", ")", "{", "return", "a", "->", "a", ".", "longs", "(", "i", "->", "i", ...
/* Fluent limit operation using primitive types e.g. <pre> {@code import static cyclops.ReactiveSeq.skipLongs; ReactiveSeq.ofLongs(1,2,3) .to(limitLongs(1)); //[1l] } </pre>
[ "/", "*", "Fluent", "limit", "operation", "using", "primitive", "types", "e", ".", "g", ".", "<pre", ">", "{", "@code", "import", "static", "cyclops", ".", "ReactiveSeq", ".", "skipLongs", ";" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/cyclops/companion/Functions.java#L357-L360
ggrandes/kvstore
src/main/java/org/javastack/kvstore/structures/btree/BplusTree.java
BplusTree.findOptimalNodeOrder
private int findOptimalNodeOrder(final Node<K, V> node) { """ Find b-order for a blockSize of this tree @param node of type Leaf or Integernal @return integer with b-order """ int low = MIN_B_ORDER; // minimal b-order int high = (blockSize / node.getStructEstimateSize(1)) << 2; // estimate high b-order...
java
private int findOptimalNodeOrder(final Node<K, V> node) { int low = MIN_B_ORDER; // minimal b-order int high = (blockSize / node.getStructEstimateSize(1)) << 2; // estimate high b-order while (low <= high) { int mid = ((low + high) >>> 1); mid += (1 - (mid % 2)); int nodeSize = node.getStructEstimateSiz...
[ "private", "int", "findOptimalNodeOrder", "(", "final", "Node", "<", "K", ",", "V", ">", "node", ")", "{", "int", "low", "=", "MIN_B_ORDER", ";", "// minimal b-order", "int", "high", "=", "(", "blockSize", "/", "node", ".", "getStructEstimateSize", "(", "1...
Find b-order for a blockSize of this tree @param node of type Leaf or Integernal @return integer with b-order
[ "Find", "b", "-", "order", "for", "a", "blockSize", "of", "this", "tree" ]
train
https://github.com/ggrandes/kvstore/blob/c79277f79f4604e0fec8349a98519838e3de38f0/src/main/java/org/javastack/kvstore/structures/btree/BplusTree.java#L340-L364
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.getHierarchicalEntityChildAsync
public Observable<HierarchicalChildEntity> getHierarchicalEntityChildAsync(UUID appId, String versionId, UUID hEntityId, UUID hChildId) { """ Gets information about the hierarchical entity child model. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity e...
java
public Observable<HierarchicalChildEntity> getHierarchicalEntityChildAsync(UUID appId, String versionId, UUID hEntityId, UUID hChildId) { return getHierarchicalEntityChildWithServiceResponseAsync(appId, versionId, hEntityId, hChildId).map(new Func1<ServiceResponse<HierarchicalChildEntity>, HierarchicalChildEnti...
[ "public", "Observable", "<", "HierarchicalChildEntity", ">", "getHierarchicalEntityChildAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "hEntityId", ",", "UUID", "hChildId", ")", "{", "return", "getHierarchicalEntityChildWithServiceResponseAsync", "...
Gets information about the hierarchical entity child model. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @param hChildId The hierarchical entity extractor child ID. @throws IllegalArgumentException thrown if parameters fail the validation @ret...
[ "Gets", "information", "about", "the", "hierarchical", "entity", "child", "model", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L6270-L6277
Javen205/IJPay
src/main/java/com/jpay/weixin/api/hb/RedHbApi.java
RedHbApi.sendGroupRedPack
public static String sendGroupRedPack(Map<String, String> params, String certPath, String certPassword) { """ 发送裂变红包 @param params 请求参数 @param certPath 证书文件目录 @param certPassword 证书密码 @return {String} """ return HttpUtils.postSSL(sendGroupRedPackUrl, PaymentKit.toXml(params), certPath, certPassword); }
java
public static String sendGroupRedPack(Map<String, String> params, String certPath, String certPassword) { return HttpUtils.postSSL(sendGroupRedPackUrl, PaymentKit.toXml(params), certPath, certPassword); }
[ "public", "static", "String", "sendGroupRedPack", "(", "Map", "<", "String", ",", "String", ">", "params", ",", "String", "certPath", ",", "String", "certPassword", ")", "{", "return", "HttpUtils", ".", "postSSL", "(", "sendGroupRedPackUrl", ",", "PaymentKit", ...
发送裂变红包 @param params 请求参数 @param certPath 证书文件目录 @param certPassword 证书密码 @return {String}
[ "发送裂变红包" ]
train
https://github.com/Javen205/IJPay/blob/78da6be4b70675abc6a41df74817532fa257ef29/src/main/java/com/jpay/weixin/api/hb/RedHbApi.java#L56-L58
alkacon/opencms-core
src/org/opencms/search/CmsSearchCategoryCollector.java
CmsSearchCategoryCollector.formatCategoryMap
public static final String formatCategoryMap(Map<String, Integer> categories) { """ Convenience method to format a map of categories in a nice 2 column list, for example for display of debugging output.<p> @param categories the map to format @return the formatted category map """ StringBuffer res...
java
public static final String formatCategoryMap(Map<String, Integer> categories) { StringBuffer result = new StringBuffer(256); result.append("Total categories: "); result.append(categories.size()); result.append('\n'); Iterator<Map.Entry<String, Integer>> i = categories.entrySet()...
[ "public", "static", "final", "String", "formatCategoryMap", "(", "Map", "<", "String", ",", "Integer", ">", "categories", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "256", ")", ";", "result", ".", "append", "(", "\"Total categories: \...
Convenience method to format a map of categories in a nice 2 column list, for example for display of debugging output.<p> @param categories the map to format @return the formatted category map
[ "Convenience", "method", "to", "format", "a", "map", "of", "categories", "in", "a", "nice", "2", "column", "list", "for", "example", "for", "display", "of", "debugging", "output", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/CmsSearchCategoryCollector.java#L130-L144
phax/ph-web
ph-httpclient/src/main/java/com/helger/httpclient/response/ExtendedHttpResponseException.java
ExtendedHttpResponseException.getResponseBodyAsString
@Nullable public String getResponseBodyAsString (@Nonnull final Charset aCharset) { """ Get the response body as a string in the provided charset. @param aCharset The charset to use. May not be <code>null</code>. @return <code>null</code> if no response body is present. """ return m_aResponseBody ==...
java
@Nullable public String getResponseBodyAsString (@Nonnull final Charset aCharset) { return m_aResponseBody == null ? null : new String (m_aResponseBody, aCharset); }
[ "@", "Nullable", "public", "String", "getResponseBodyAsString", "(", "@", "Nonnull", "final", "Charset", "aCharset", ")", "{", "return", "m_aResponseBody", "==", "null", "?", "null", ":", "new", "String", "(", "m_aResponseBody", ",", "aCharset", ")", ";", "}" ...
Get the response body as a string in the provided charset. @param aCharset The charset to use. May not be <code>null</code>. @return <code>null</code> if no response body is present.
[ "Get", "the", "response", "body", "as", "a", "string", "in", "the", "provided", "charset", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-httpclient/src/main/java/com/helger/httpclient/response/ExtendedHttpResponseException.java#L148-L152
mozilla/rhino
src/org/mozilla/classfile/ClassFileWriter.java
ClassFileWriter.addVariableDescriptor
public void addVariableDescriptor(String name, String type, int startPC, int register) { """ Add Information about java variable to use when generating the local variable table. @param name variable name. @param type variable type as bytecode descriptor string. @param startPC the starting bytecode PC where th...
java
public void addVariableDescriptor(String name, String type, int startPC, int register) { int nameIndex = itsConstantPool.addUtf8(name); int descriptorIndex = itsConstantPool.addUtf8(type); int[] chunk = {nameIndex, descriptorIndex, startPC, register}; if (itsVarDescriptors == null) { ...
[ "public", "void", "addVariableDescriptor", "(", "String", "name", ",", "String", "type", ",", "int", "startPC", ",", "int", "register", ")", "{", "int", "nameIndex", "=", "itsConstantPool", ".", "addUtf8", "(", "name", ")", ";", "int", "descriptorIndex", "="...
Add Information about java variable to use when generating the local variable table. @param name variable name. @param type variable type as bytecode descriptor string. @param startPC the starting bytecode PC where this variable is live, or -1 if it does not have a Java register. @param register the Java register numb...
[ "Add", "Information", "about", "java", "variable", "to", "use", "when", "generating", "the", "local", "variable", "table", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/classfile/ClassFileWriter.java#L214-L222
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPoliciesInner.java
ExtendedDatabaseBlobAuditingPoliciesInner.getAsync
public Observable<ExtendedDatabaseBlobAuditingPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { """ Gets an extended database's blob auditing policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azu...
java
public Observable<ExtendedDatabaseBlobAuditingPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<ExtendedDatabaseBlobAuditingPolicyInner>, ExtendedDatabaseBlobAudi...
[ "public", "Observable", "<", "ExtendedDatabaseBlobAuditingPolicyInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serv...
Gets an extended database's blob auditing policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @throws IllegalArgum...
[ "Gets", "an", "extended", "database", "s", "blob", "auditing", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPoliciesInner.java#L105-L112
evernote/evernote-sdk-android
library/src/main/java/com/evernote/client/android/EvernoteUtil.java
EvernoteUtil.createAuthorizationIntent
public static Intent createAuthorizationIntent(Context context, String authorizationUrl, boolean forceThirdPartyApp) { """ Creates an {@link Intent} to authorize this app by the main Evernote app. @param context The {@link Context} starting the {@link Intent}. @param authorizationUrl The OAuth authorization UR...
java
public static Intent createAuthorizationIntent(Context context, String authorizationUrl, boolean forceThirdPartyApp) { Intent intent; if (!forceThirdPartyApp && EvernoteInstallStatus.INSTALLED.equals(getEvernoteInstallStatus(context, ACTION_AUTHORIZE))) { intent = new Intent(ACTION_AUTHORIZ...
[ "public", "static", "Intent", "createAuthorizationIntent", "(", "Context", "context", ",", "String", "authorizationUrl", ",", "boolean", "forceThirdPartyApp", ")", "{", "Intent", "intent", ";", "if", "(", "!", "forceThirdPartyApp", "&&", "EvernoteInstallStatus", ".", ...
Creates an {@link Intent} to authorize this app by the main Evernote app. @param context The {@link Context} starting the {@link Intent}. @param authorizationUrl The OAuth authorization URL. @param forceThirdPartyApp If {@code true}, never use Evernote app to authenticate user. @return The {@link Intent}.
[ "Creates", "an", "{", "@link", "Intent", "}", "to", "authorize", "this", "app", "by", "the", "main", "Evernote", "app", "." ]
train
https://github.com/evernote/evernote-sdk-android/blob/fc59be643e85c4f59d562d1bfe76563997aa73cf/library/src/main/java/com/evernote/client/android/EvernoteUtil.java#L314-L326
infinispan/infinispan
jcache/commons/src/main/java/org/infinispan/jcache/Expiration.java
Expiration.getExpiry
public static Duration getExpiry(ExpiryPolicy policy, Operation op) { """ Return expiry for a given cache operation. It returns null when the expiry time cannot be determined, in which case clients should not update expiry settings for the cached entry. """ if (policy == null) { return getDefa...
java
public static Duration getExpiry(ExpiryPolicy policy, Operation op) { if (policy == null) { return getDefaultDuration(); } switch (op) { case CREATION: try { return policy.getExpiryForCreation(); } catch (Throwable t) { log.getExp...
[ "public", "static", "Duration", "getExpiry", "(", "ExpiryPolicy", "policy", ",", "Operation", "op", ")", "{", "if", "(", "policy", "==", "null", ")", "{", "return", "getDefaultDuration", "(", ")", ";", "}", "switch", "(", "op", ")", "{", "case", "CREATIO...
Return expiry for a given cache operation. It returns null when the expiry time cannot be determined, in which case clients should not update expiry settings for the cached entry.
[ "Return", "expiry", "for", "a", "given", "cache", "operation", ".", "It", "returns", "null", "when", "the", "expiry", "time", "cannot", "be", "determined", "in", "which", "case", "clients", "should", "not", "update", "expiry", "settings", "for", "the", "cach...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/jcache/commons/src/main/java/org/infinispan/jcache/Expiration.java#L29-L60
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/StringUtils.java
StringUtils.substringByCodepoints
public static String substringByCodepoints(String s, OffsetRange<CharOffset> substringBounds) { """ Returns the substring of {@code s} indicated by {@code substringBounds}, where the character offsets are interpreted as Unicode code point offsets. You should typically use this instead of {@link String#substring...
java
public static String substringByCodepoints(String s, OffsetRange<CharOffset> substringBounds) { return substringByCodepoints(s, substringBounds.startInclusive().asInt(), // +1 because called method takes exclusive end offset like String#substring substringBounds.endInclusive().asInt() + 1 ); }
[ "public", "static", "String", "substringByCodepoints", "(", "String", "s", ",", "OffsetRange", "<", "CharOffset", ">", "substringBounds", ")", "{", "return", "substringByCodepoints", "(", "s", ",", "substringBounds", ".", "startInclusive", "(", ")", ".", "asInt", ...
Returns the substring of {@code s} indicated by {@code substringBounds}, where the character offsets are interpreted as Unicode code point offsets. You should typically use this instead of {@link String#substring(int)} because the latter will fail badly in the presence of non-BMP characters. Beware this takes linear ...
[ "Returns", "the", "substring", "of", "{", "@code", "s", "}", "indicated", "by", "{", "@code", "substringBounds", "}", "where", "the", "character", "offsets", "are", "interpreted", "as", "Unicode", "code", "point", "offsets", ".", "You", "should", "typically", ...
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/StringUtils.java#L517-L521
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/stats/StatsInterface.java
StatsInterface.getPhotostreamStats
public Stats getPhotostreamStats(Date date) throws FlickrException { """ Get the number of views, comments and favorites on a photostream for a given date. @param date (Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will aut...
java
public Stats getPhotostreamStats(Date date) throws FlickrException { return getStats(METHOD_GET_PHOTOSTREAM_STATS, null, null, date); }
[ "public", "Stats", "getPhotostreamStats", "(", "Date", "date", ")", "throws", "FlickrException", "{", "return", "getStats", "(", "METHOD_GET_PHOTOSTREAM_STATS", ",", "null", ",", "null", ",", "date", ")", ";", "}" ]
Get the number of views, comments and favorites on a photostream for a given date. @param date (Required) Stats will be returned for this date. A day according to Flickr Stats starts at midnight GMT for all users, and timestamps will automatically be rounded down to the start of the day. @see "http://www.flickr.com/se...
[ "Get", "the", "number", "of", "views", "comments", "and", "favorites", "on", "a", "photostream", "for", "a", "given", "date", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/stats/StatsInterface.java#L301-L303
teatrove/teatrove
build-tools/toolbox/src/main/java/org/teatrove/toolbox/beandoc/teadoc/ClassDoc.java
ClassDoc.getMatchingMethod
public MethodDoc getMatchingMethod(MethodDoc method, MethodFinder mf) { """ Get a MethodDoc in this ClassDoc with a name and signature matching that of the specified MethodDoc and accepted by the specified MethodFinder """ MethodDoc md = getMatchingMethod(method); if (md != null) { ...
java
public MethodDoc getMatchingMethod(MethodDoc method, MethodFinder mf) { MethodDoc md = getMatchingMethod(method); if (md != null) { if (mf.checkMethod(md)) { return md; } } return null; }
[ "public", "MethodDoc", "getMatchingMethod", "(", "MethodDoc", "method", ",", "MethodFinder", "mf", ")", "{", "MethodDoc", "md", "=", "getMatchingMethod", "(", "method", ")", ";", "if", "(", "md", "!=", "null", ")", "{", "if", "(", "mf", ".", "checkMethod",...
Get a MethodDoc in this ClassDoc with a name and signature matching that of the specified MethodDoc and accepted by the specified MethodFinder
[ "Get", "a", "MethodDoc", "in", "this", "ClassDoc", "with", "a", "name", "and", "signature", "matching", "that", "of", "the", "specified", "MethodDoc", "and", "accepted", "by", "the", "specified", "MethodFinder" ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/build-tools/toolbox/src/main/java/org/teatrove/toolbox/beandoc/teadoc/ClassDoc.java#L258-L268
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/ws/kernel/service/util/SecureAction.java
SecureAction.getURL
public URL getURL(final String protocol, final String host, final int port, final String file, final URLStreamHandler handler) throws MalformedURLException { """ Gets a URL. Same a calling {@link URL#URL(java.lang.String, java.lang.String, int, java.lang.String, java.net.URLStreamHandler)} @param protocol the ...
java
public URL getURL(final String protocol, final String host, final int port, final String file, final URLStreamHandler handler) throws MalformedURLException { if (System.getSecurityManager() == null) return new URL(protocol, host, port, file, handler); try { return AccessControlle...
[ "public", "URL", "getURL", "(", "final", "String", "protocol", ",", "final", "String", "host", ",", "final", "int", "port", ",", "final", "String", "file", ",", "final", "URLStreamHandler", "handler", ")", "throws", "MalformedURLException", "{", "if", "(", "...
Gets a URL. Same a calling {@link URL#URL(java.lang.String, java.lang.String, int, java.lang.String, java.net.URLStreamHandler)} @param protocol the protocol @param host the host @param port the port @param file the file @param handler the URLStreamHandler @return a URL @throws MalformedURLException
[ "Gets", "a", "URL", ".", "Same", "a", "calling", "{", "@link", "URL#URL", "(", "java", ".", "lang", ".", "String", "java", ".", "lang", ".", "String", "int", "java", ".", "lang", ".", "String", "java", ".", "net", ".", "URLStreamHandler", ")", "}" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/ws/kernel/service/util/SecureAction.java#L401-L416
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/JobConf.java
JobConf.setProfileTaskRange
public void setProfileTaskRange(boolean isMap, String newValue) { """ Set the ranges of maps or reduces to profile. setProfileEnabled(true) must also be called. @param newValue a set of integer ranges of the map ids """ // parse the value to make sure it is legal new Configuration.IntegerRanges(newVa...
java
public void setProfileTaskRange(boolean isMap, String newValue) { // parse the value to make sure it is legal new Configuration.IntegerRanges(newValue); set((isMap ? "mapred.task.profile.maps" : "mapred.task.profile.reduces"), newValue); }
[ "public", "void", "setProfileTaskRange", "(", "boolean", "isMap", ",", "String", "newValue", ")", "{", "// parse the value to make sure it is legal", "new", "Configuration", ".", "IntegerRanges", "(", "newValue", ")", ";", "set", "(", "(", "isMap", "?", "\"mapred.ta...
Set the ranges of maps or reduces to profile. setProfileEnabled(true) must also be called. @param newValue a set of integer ranges of the map ids
[ "Set", "the", "ranges", "of", "maps", "or", "reduces", "to", "profile", ".", "setProfileEnabled", "(", "true", ")", "must", "also", "be", "called", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/JobConf.java#L1724-L1729
UrielCh/ovh-java-sdk
ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java
ApiOvhVps.serviceName_veeam_restorePoints_id_restore_POST
public OvhTask serviceName_veeam_restorePoints_id_restore_POST(String serviceName, Long id, Boolean changePassword, OvhExportTypeEnum export, Boolean full) throws IOException { """ Creates a VPS.Task that will restore the given restorePoint REST: POST /vps/{serviceName}/veeam/restorePoints/{id}/restore @param ...
java
public OvhTask serviceName_veeam_restorePoints_id_restore_POST(String serviceName, Long id, Boolean changePassword, OvhExportTypeEnum export, Boolean full) throws IOException { String qPath = "/vps/{serviceName}/veeam/restorePoints/{id}/restore"; StringBuilder sb = path(qPath, serviceName, id); HashMap<String, Ob...
[ "public", "OvhTask", "serviceName_veeam_restorePoints_id_restore_POST", "(", "String", "serviceName", ",", "Long", "id", ",", "Boolean", "changePassword", ",", "OvhExportTypeEnum", "export", ",", "Boolean", "full", ")", "throws", "IOException", "{", "String", "qPath", ...
Creates a VPS.Task that will restore the given restorePoint REST: POST /vps/{serviceName}/veeam/restorePoints/{id}/restore @param full [required] Replace your current VPS by the restorePoint @param changePassword [required] (Full only) Change the restored VPS root password when done @param export [required] (Except fu...
[ "Creates", "a", "VPS", ".", "Task", "that", "will", "restore", "the", "given", "restorePoint" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java#L699-L708
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/util/LruCache.java
LruCache.putAll
public synchronized void putAll(Map<Key, Value> m) { """ Puts all the values from the given map into the cache. @param m The map containing entries to put into the cache """ for (Map.Entry<Key, Value> entry : m.entrySet()) { this.put(entry.getKey(), entry.getValue()); } }
java
public synchronized void putAll(Map<Key, Value> m) { for (Map.Entry<Key, Value> entry : m.entrySet()) { this.put(entry.getKey(), entry.getValue()); } }
[ "public", "synchronized", "void", "putAll", "(", "Map", "<", "Key", ",", "Value", ">", "m", ")", "{", "for", "(", "Map", ".", "Entry", "<", "Key", ",", "Value", ">", "entry", ":", "m", ".", "entrySet", "(", ")", ")", "{", "this", ".", "put", "(...
Puts all the values from the given map into the cache. @param m The map containing entries to put into the cache
[ "Puts", "all", "the", "values", "from", "the", "given", "map", "into", "the", "cache", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/util/LruCache.java#L152-L156
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/config/AbstractInterfaceConfig.java
AbstractInterfaceConfig.getMethodConfigValue
public Object getMethodConfigValue(String methodName, String configKey) { """ 得到方法级配置,找不到则返回null @param methodName 方法名 @param configKey 配置key,例如参数 @return 配置值 method config value """ if (configValueCache == null) { return null; } String key = buildmkey(methodName, conf...
java
public Object getMethodConfigValue(String methodName, String configKey) { if (configValueCache == null) { return null; } String key = buildmkey(methodName, configKey); return configValueCache.get(key); }
[ "public", "Object", "getMethodConfigValue", "(", "String", "methodName", ",", "String", "configKey", ")", "{", "if", "(", "configValueCache", "==", "null", ")", "{", "return", "null", ";", "}", "String", "key", "=", "buildmkey", "(", "methodName", ",", "conf...
得到方法级配置,找不到则返回null @param methodName 方法名 @param configKey 配置key,例如参数 @return 配置值 method config value
[ "得到方法级配置,找不到则返回null" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/config/AbstractInterfaceConfig.java#L958-L964
datacleaner/DataCleaner
desktop/api/src/main/java/org/datacleaner/widgets/result/AbstractCrosstabResultSwingRenderer.java
AbstractCrosstabResultSwingRenderer.renderInternal
protected CrosstabPanel renderInternal(final R result) { """ Alternative render method, provided to have a more precise return type (while still allowing this class to be extended and only have a {@link JComponent} return type. @param result @return """ _drillToDetailsCallback = new DrillToDetail...
java
protected CrosstabPanel renderInternal(final R result) { _drillToDetailsCallback = new DrillToDetailsCallbackImpl(_windowContext, getRendererFactory()); final DCTable table = renderTable(result.getCrosstab()); final CrosstabPanel crosstabPanel = new CrosstabPanel(table); decorate(resu...
[ "protected", "CrosstabPanel", "renderInternal", "(", "final", "R", "result", ")", "{", "_drillToDetailsCallback", "=", "new", "DrillToDetailsCallbackImpl", "(", "_windowContext", ",", "getRendererFactory", "(", ")", ")", ";", "final", "DCTable", "table", "=", "rende...
Alternative render method, provided to have a more precise return type (while still allowing this class to be extended and only have a {@link JComponent} return type. @param result @return
[ "Alternative", "render", "method", "provided", "to", "have", "a", "more", "precise", "return", "type", "(", "while", "still", "allowing", "this", "class", "to", "be", "extended", "and", "only", "have", "a", "{", "@link", "JComponent", "}", "return", "type", ...
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/desktop/api/src/main/java/org/datacleaner/widgets/result/AbstractCrosstabResultSwingRenderer.java#L241-L254
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/sequence/GeneSequence.java
GeneSequence.addIntron
public IntronSequence addIntron(AccessionID accession, int begin, int end) throws Exception { """ Add an Intron Currently used to mark an IntronSequence as a feature @param accession @param begin @param end @return intron sequence """ if (intronSequenceHashMap.containsKey(accession.getID())) { throw n...
java
public IntronSequence addIntron(AccessionID accession, int begin, int end) throws Exception { if (intronSequenceHashMap.containsKey(accession.getID())) { throw new Exception("Duplicate accesion id " + accession.getID()); } intronAdded = true; IntronSequence intronSequence = new IntronSequence(this, begin, en...
[ "public", "IntronSequence", "addIntron", "(", "AccessionID", "accession", ",", "int", "begin", ",", "int", "end", ")", "throws", "Exception", "{", "if", "(", "intronSequenceHashMap", ".", "containsKey", "(", "accession", ".", "getID", "(", ")", ")", ")", "{"...
Add an Intron Currently used to mark an IntronSequence as a feature @param accession @param begin @param end @return intron sequence
[ "Add", "an", "Intron", "Currently", "used", "to", "mark", "an", "IntronSequence", "as", "a", "feature" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/sequence/GeneSequence.java#L217-L227
upwork/java-upwork
src/com/Upwork/api/Routers/Metadata.java
Metadata.getReasons
public JSONObject getReasons(HashMap<String, String> params) throws JSONException { """ Get reasons @param params Parameters @throws JSONException If error occurred @return {@link JSONObject} """ return oClient.get("/profiles/v1/metadata/reasons", params); }
java
public JSONObject getReasons(HashMap<String, String> params) throws JSONException { return oClient.get("/profiles/v1/metadata/reasons", params); }
[ "public", "JSONObject", "getReasons", "(", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "oClient", ".", "get", "(", "\"/profiles/v1/metadata/reasons\"", ",", "params", ")", ";", "}" ]
Get reasons @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Get", "reasons" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Metadata.java#L103-L105
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SDVariable.java
SDVariable.normmax
public SDVariable normmax(String name, boolean keepDims, int... dimensions) { """ Max norm (infinity norm) reduction operation: The output contains the max norm for each tensor/subset along the specified dimensions:<br> {@code out = max(abs(x[i]))}<br> Note that if keepDims = true, the output variable has the s...
java
public SDVariable normmax(String name, boolean keepDims, int... dimensions){ return sameDiff.normmax(name, this, keepDims, dimensions); }
[ "public", "SDVariable", "normmax", "(", "String", "name", ",", "boolean", "keepDims", ",", "int", "...", "dimensions", ")", "{", "return", "sameDiff", ".", "normmax", "(", "name", ",", "this", ",", "keepDims", ",", "dimensions", ")", ";", "}" ]
Max norm (infinity norm) reduction operation: The output contains the max norm for each tensor/subset along the specified dimensions:<br> {@code out = max(abs(x[i]))}<br> Note that if keepDims = true, the output variable has the same rank as the input variable, with the reduced dimensions having size 1. This can be use...
[ "Max", "norm", "(", "infinity", "norm", ")", "reduction", "operation", ":", "The", "output", "contains", "the", "max", "norm", "for", "each", "tensor", "/", "subset", "along", "the", "specified", "dimensions", ":", "<br", ">", "{", "@code", "out", "=", "...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SDVariable.java#L1630-L1632
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDisjointObjectPropertiesAxiomImpl_CustomFieldSerializer.java
OWLDisjointObjectPropertiesAxiomImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDisjointObjectPropertiesAxiomImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@li...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDisjointObjectPropertiesAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLDisjointObjectPropertiesAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", ...
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDisjointObjectPropertiesAxiomImpl_CustomFieldSerializer.java#L95-L98
javers/javers
javers-core/src/main/java/org/javers/core/JaversBuilder.java
JaversBuilder.registerValueGsonTypeAdapter
public JaversBuilder registerValueGsonTypeAdapter(Class valueType, TypeAdapter nativeAdapter) { """ Registers {@link ValueType} and its custom native <a href="http://code.google.com/p/google-gson/">Gson</a> adapter. <br/><br/> Useful when you already have Gson {@link TypeAdapter}s implemented. @see TypeAda...
java
public JaversBuilder registerValueGsonTypeAdapter(Class valueType, TypeAdapter nativeAdapter) { registerValue(valueType); jsonConverterBuilder().registerNativeTypeAdapter(valueType, nativeAdapter); return this; }
[ "public", "JaversBuilder", "registerValueGsonTypeAdapter", "(", "Class", "valueType", ",", "TypeAdapter", "nativeAdapter", ")", "{", "registerValue", "(", "valueType", ")", ";", "jsonConverterBuilder", "(", ")", ".", "registerNativeTypeAdapter", "(", "valueType", ",", ...
Registers {@link ValueType} and its custom native <a href="http://code.google.com/p/google-gson/">Gson</a> adapter. <br/><br/> Useful when you already have Gson {@link TypeAdapter}s implemented. @see TypeAdapter
[ "Registers", "{", "@link", "ValueType", "}", "and", "its", "custom", "native", "<a", "href", "=", "http", ":", "//", "code", ".", "google", ".", "com", "/", "p", "/", "google", "-", "gson", "/", ">", "Gson<", "/", "a", ">", "adapter", ".", "<br", ...
train
https://github.com/javers/javers/blob/a51511be7d8bcee3e1812db8b7e69a45330b4e14/javers-core/src/main/java/org/javers/core/JaversBuilder.java#L508-L512
meertensinstituut/mtas
src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java
MtasSolrCollectionResult.setImport
public void setImport(long now, SimpleOrderedMap<Object> status) throws IOException { """ Sets the import. @param now the now @param status the status @throws IOException Signals that an I/O exception has occurred. """ if (action.equals(ComponentCollection.ACTION_IMPORT)) { this.now = now;...
java
public void setImport(long now, SimpleOrderedMap<Object> status) throws IOException { if (action.equals(ComponentCollection.ACTION_IMPORT)) { this.now = now; this.status = status; } else { throw new IOException("not allowed with action '" + action + "'"); } }
[ "public", "void", "setImport", "(", "long", "now", ",", "SimpleOrderedMap", "<", "Object", ">", "status", ")", "throws", "IOException", "{", "if", "(", "action", ".", "equals", "(", "ComponentCollection", ".", "ACTION_IMPORT", ")", ")", "{", "this", ".", "...
Sets the import. @param now the now @param status the status @throws IOException Signals that an I/O exception has occurred.
[ "Sets", "the", "import", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/solr/handler/component/util/MtasSolrCollectionResult.java#L164-L172
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java
SpoofChecker.getResolvedScriptSetWithout
private void getResolvedScriptSetWithout(CharSequence input, int script, ScriptSet result) { """ Computes the resolved script set for a string, omitting characters having the specified script. If UScript.CODE_LIMIT is passed as the second argument, all characters are included. """ result.setAll(); ...
java
private void getResolvedScriptSetWithout(CharSequence input, int script, ScriptSet result) { result.setAll(); ScriptSet temp = new ScriptSet(); for (int utf16Offset = 0; utf16Offset < input.length();) { int codePoint = Character.codePointAt(input, utf16Offset); utf16Offs...
[ "private", "void", "getResolvedScriptSetWithout", "(", "CharSequence", "input", ",", "int", "script", ",", "ScriptSet", "result", ")", "{", "result", ".", "setAll", "(", ")", ";", "ScriptSet", "temp", "=", "new", "ScriptSet", "(", ")", ";", "for", "(", "in...
Computes the resolved script set for a string, omitting characters having the specified script. If UScript.CODE_LIMIT is passed as the second argument, all characters are included.
[ "Computes", "the", "resolved", "script", "set", "for", "a", "string", "omitting", "characters", "having", "the", "specified", "script", ".", "If", "UScript", ".", "CODE_LIMIT", "is", "passed", "as", "the", "second", "argument", "all", "characters", "are", "inc...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1527-L1544
alkacon/opencms-core
src/org/opencms/xml/types/CmsXmlVfsImageValue.java
CmsXmlVfsImageValue.setDescription
public void setDescription(CmsObject cms, String description) { """ Sets the description of the image.<p> @param cms the current users context @param description the description of the image """ if (CmsStringUtil.isEmptyOrWhitespaceOnly(description)) { m_description = ""; i...
java
public void setDescription(CmsObject cms, String description) { if (CmsStringUtil.isEmptyOrWhitespaceOnly(description)) { m_description = ""; if (m_element.element(PARAM_DESCRIPTION) != null) { m_element.remove(m_element.element(PARAM_DESCRIPTION)); } ...
[ "public", "void", "setDescription", "(", "CmsObject", "cms", ",", "String", "description", ")", "{", "if", "(", "CmsStringUtil", ".", "isEmptyOrWhitespaceOnly", "(", "description", ")", ")", "{", "m_description", "=", "\"\"", ";", "if", "(", "m_element", ".", ...
Sets the description of the image.<p> @param cms the current users context @param description the description of the image
[ "Sets", "the", "description", "of", "the", "image", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/types/CmsXmlVfsImageValue.java#L228-L240
aws/aws-sdk-java
aws-java-sdk-resourcegroups/src/main/java/com/amazonaws/services/resourcegroups/model/TagResult.java
TagResult.withTags
public TagResult withTags(java.util.Map<String, String> tags) { """ <p> The tags that have been added to the specified resource. </p> @param tags The tags that have been added to the specified resource. @return Returns a reference to this object so that method calls can be chained together. """ ...
java
public TagResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "TagResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The tags that have been added to the specified resource. </p> @param tags The tags that have been added to the specified resource. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "tags", "that", "have", "been", "added", "to", "the", "specified", "resource", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-resourcegroups/src/main/java/com/amazonaws/services/resourcegroups/model/TagResult.java#L114-L117
landawn/AbacusUtil
src/com/landawn/abacus/util/stream/Collectors.java
Collectors.maxAll
public static <T> Collector<T, ?, List<T>> maxAll(Comparator<? super T> comparator) { """ It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified. <br /> Returns a {@code Collector} which finds all the elements which are equal to each other and bigger than an...
java
public static <T> Collector<T, ?, List<T>> maxAll(Comparator<? super T> comparator) { return maxAll(comparator, Integer.MAX_VALUE); }
[ "public", "static", "<", "T", ">", "Collector", "<", "T", ",", "?", ",", "List", "<", "T", ">", ">", "maxAll", "(", "Comparator", "<", "?", "super", "T", ">", "comparator", ")", "{", "return", "maxAll", "(", "comparator", ",", "Integer", ".", "MAX_...
It's copied from StreamEx: https://github.com/amaembo/streamex under Apache License v2 and may be modified. <br /> Returns a {@code Collector} which finds all the elements which are equal to each other and bigger than any other element according to the specified {@link Comparator}. The found elements are collected to ...
[ "It", "s", "copied", "from", "StreamEx", ":", "https", ":", "//", "github", ".", "com", "/", "amaembo", "/", "streamex", "under", "Apache", "License", "v2", "and", "may", "be", "modified", ".", "<br", "/", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/stream/Collectors.java#L2082-L2084
baasbox/Android-SDK
library/src/main/java/com/baasbox/android/BaasDocument.java
BaasDocument.deleteSync
public BaasResult<Void> deleteSync() { """ Syncrhonously deletes this document on the server. @return the result of the request """ if (id == null) throw new IllegalStateException("this document is not bound to any remote entity"); BaasBox box = BaasBox.getDefaultChecked(); ...
java
public BaasResult<Void> deleteSync() { if (id == null) throw new IllegalStateException("this document is not bound to any remote entity"); BaasBox box = BaasBox.getDefaultChecked(); Delete delete = new Delete(box, this, RequestOptions.DEFAULT, null); return box.submitSync(del...
[ "public", "BaasResult", "<", "Void", ">", "deleteSync", "(", ")", "{", "if", "(", "id", "==", "null", ")", "throw", "new", "IllegalStateException", "(", "\"this document is not bound to any remote entity\"", ")", ";", "BaasBox", "box", "=", "BaasBox", ".", "getD...
Syncrhonously deletes this document on the server. @return the result of the request
[ "Syncrhonously", "deletes", "this", "document", "on", "the", "server", "." ]
train
https://github.com/baasbox/Android-SDK/blob/6bb2203246b885b2ad63a7bfaf37c83caf15e0d8/library/src/main/java/com/baasbox/android/BaasDocument.java#L559-L565
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRange.java
KeyGroupRange.getIntersection
public KeyGroupRange getIntersection(KeyGroupRange other) { """ Create a range that represent the intersection between this range and the given range. @param other A KeyGroupRange to intersect. @return Key-group range that is the intersection between this and the given key-group range. """ int start = Ma...
java
public KeyGroupRange getIntersection(KeyGroupRange other) { int start = Math.max(startKeyGroup, other.startKeyGroup); int end = Math.min(endKeyGroup, other.endKeyGroup); return start <= end ? new KeyGroupRange(start, end) : EMPTY_KEY_GROUP_RANGE; }
[ "public", "KeyGroupRange", "getIntersection", "(", "KeyGroupRange", "other", ")", "{", "int", "start", "=", "Math", ".", "max", "(", "startKeyGroup", ",", "other", ".", "startKeyGroup", ")", ";", "int", "end", "=", "Math", ".", "min", "(", "endKeyGroup", "...
Create a range that represent the intersection between this range and the given range. @param other A KeyGroupRange to intersect. @return Key-group range that is the intersection between this and the given key-group range.
[ "Create", "a", "range", "that", "represent", "the", "intersection", "between", "this", "range", "and", "the", "given", "range", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRange.java#L80-L84
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/JMessageClient.java
JMessageClient.removeChatRoomMembers
public ResponseWrapper removeChatRoomMembers(long roomId, Members members) throws APIConnectionException, APIRequestException { """ remove members from chat room @param roomId chat room id @param members {@link Members} @return No content @throws APIConnectionException connect exception @throws...
java
public ResponseWrapper removeChatRoomMembers(long roomId, Members members) throws APIConnectionException, APIRequestException { return _chatRoomClient.removeChatRoomMembers(roomId, members); }
[ "public", "ResponseWrapper", "removeChatRoomMembers", "(", "long", "roomId", ",", "Members", "members", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "return", "_chatRoomClient", ".", "removeChatRoomMembers", "(", "roomId", ",", "members", ")...
remove members from chat room @param roomId chat room id @param members {@link Members} @return No content @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "remove", "members", "from", "chat", "room" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/JMessageClient.java#L932-L935
dnsjava/dnsjava
org/xbill/DNS/Record.java
Record.newRecord
public static Record newRecord(Name name, int type, int dclass) { """ Creates a new empty record, with the given parameters. This method is designed to create records that will be added to the QUERY section of a message. @param name The owner name of the record. @param type The record's type. @param dclass T...
java
public static Record newRecord(Name name, int type, int dclass) { return newRecord(name, type, dclass, 0); }
[ "public", "static", "Record", "newRecord", "(", "Name", "name", ",", "int", "type", ",", "int", "dclass", ")", "{", "return", "newRecord", "(", "name", ",", "type", ",", "dclass", ",", "0", ")", ";", "}" ]
Creates a new empty record, with the given parameters. This method is designed to create records that will be added to the QUERY section of a message. @param name The owner name of the record. @param type The record's type. @param dclass The record's class. @return An object of a subclass of Record
[ "Creates", "a", "new", "empty", "record", "with", "the", "given", "parameters", ".", "This", "method", "is", "designed", "to", "create", "records", "that", "will", "be", "added", "to", "the", "QUERY", "section", "of", "a", "message", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/Record.java#L170-L173
BigBadaboom/androidsvg
androidsvg/src/main/java/com/caverock/androidsvg/RenderOptions.java
RenderOptions.viewBox
public RenderOptions viewBox(float minX, float minY, float width, float height) { """ Specifies alternative values to use for the root element {@code viewBox}. Any existing {@code viewBox} attribute value will be ignored. Note: will be overridden if a {@link #view(String)} is set. @param minX The left X co...
java
public RenderOptions viewBox(float minX, float minY, float width, float height) { this.viewBox = new SVG.Box(minX, minY, width, height); return this; }
[ "public", "RenderOptions", "viewBox", "(", "float", "minX", ",", "float", "minY", ",", "float", "width", ",", "float", "height", ")", "{", "this", ".", "viewBox", "=", "new", "SVG", ".", "Box", "(", "minX", ",", "minY", ",", "width", ",", "height", "...
Specifies alternative values to use for the root element {@code viewBox}. Any existing {@code viewBox} attribute value will be ignored. Note: will be overridden if a {@link #view(String)} is set. @param minX The left X coordinate of the viewBox @param minY The top Y coordinate of the viewBox @param width The width of...
[ "Specifies", "alternative", "values", "to", "use", "for", "the", "root", "element", "{", "@code", "viewBox", "}", ".", "Any", "existing", "{", "@code", "viewBox", "}", "attribute", "value", "will", "be", "ignored", "." ]
train
https://github.com/BigBadaboom/androidsvg/blob/0d1614dd1a4da10ea4afe3b0cea1361a4ac6b45a/androidsvg/src/main/java/com/caverock/androidsvg/RenderOptions.java#L173-L177
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java
MessageRetriever.notice
public void notice(SourcePosition pos, String key, Object... args) { """ Print a message. @param pos the position of the source @param key selects message from resource @param args arguments to be replaced in the message. """ printNotice(pos, getText(key, args)); }
java
public void notice(SourcePosition pos, String key, Object... args) { printNotice(pos, getText(key, args)); }
[ "public", "void", "notice", "(", "SourcePosition", "pos", ",", "String", "key", ",", "Object", "...", "args", ")", "{", "printNotice", "(", "pos", ",", "getText", "(", "key", ",", "args", ")", ")", ";", "}" ]
Print a message. @param pos the position of the source @param key selects message from resource @param args arguments to be replaced in the message.
[ "Print", "a", "message", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java#L236-L238
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.checkInvariants
public void checkInvariants(CallStack frame, Tuple<Expr> invariants) { """ Evaluate zero or more conditional expressions, and check whether any is false. If so, raise an exception indicating a runtime fault. @param frame @param context @param invariants """ for (int i = 0; i != invariants.size(); ++i) ...
java
public void checkInvariants(CallStack frame, Tuple<Expr> invariants) { for (int i = 0; i != invariants.size(); ++i) { RValue.Bool b = executeExpression(BOOL_T, invariants.get(i), frame); if (b == RValue.False) { // FIXME: need to do more here throw new AssertionError(); } } }
[ "public", "void", "checkInvariants", "(", "CallStack", "frame", ",", "Tuple", "<", "Expr", ">", "invariants", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "!=", "invariants", ".", "size", "(", ")", ";", "++", "i", ")", "{", "RValue", ".", ...
Evaluate zero or more conditional expressions, and check whether any is false. If so, raise an exception indicating a runtime fault. @param frame @param context @param invariants
[ "Evaluate", "zero", "or", "more", "conditional", "expressions", "and", "check", "whether", "any", "is", "false", ".", "If", "so", "raise", "an", "exception", "indicating", "a", "runtime", "fault", "." ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L1240-L1248
elki-project/elki
elki-data-generator/src/main/java/de/lmu/ifi/dbs/elki/datasource/GeneratorXMLDatabaseConnection.java
GeneratorXMLDatabaseConnection.processElementUniform
private void processElementUniform(GeneratorSingleCluster cluster, Node cur) { """ Process a 'uniform' Element in the XML stream. @param cluster @param cur Current document nod """ double min = 0.0; double max = 1.0; String minstr = ((Element) cur).getAttribute(ATTR_MIN); if(minstr != null...
java
private void processElementUniform(GeneratorSingleCluster cluster, Node cur) { double min = 0.0; double max = 1.0; String minstr = ((Element) cur).getAttribute(ATTR_MIN); if(minstr != null && minstr.length() > 0) { min = ParseUtil.parseDouble(minstr); } String maxstr = ((Element) cur).get...
[ "private", "void", "processElementUniform", "(", "GeneratorSingleCluster", "cluster", ",", "Node", "cur", ")", "{", "double", "min", "=", "0.0", ";", "double", "max", "=", "1.0", ";", "String", "minstr", "=", "(", "(", "Element", ")", "cur", ")", ".", "g...
Process a 'uniform' Element in the XML stream. @param cluster @param cur Current document nod
[ "Process", "a", "uniform", "Element", "in", "the", "XML", "stream", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-data-generator/src/main/java/de/lmu/ifi/dbs/elki/datasource/GeneratorXMLDatabaseConnection.java#L392-L418
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/internal/ConsumerUtil.java
ConsumerUtil.getPublicKey
Key getPublicKey(String trustedAlias, String trustStoreRef, String signatureAlgorithm) throws KeyStoreServiceException, KeyException { """ Creates a Key object from the certificate stored in the trust store and alias provided. """ Key signingKey = getPublicKeyFromKeystore(trustedAlias, trustStoreRef, sig...
java
Key getPublicKey(String trustedAlias, String trustStoreRef, String signatureAlgorithm) throws KeyStoreServiceException, KeyException { Key signingKey = getPublicKeyFromKeystore(trustedAlias, trustStoreRef, signatureAlgorithm); if (tc.isDebugEnabled()) { Tr.debug(tc, "Trusted alias: " + trustedAlias + ", Trust...
[ "Key", "getPublicKey", "(", "String", "trustedAlias", ",", "String", "trustStoreRef", ",", "String", "signatureAlgorithm", ")", "throws", "KeyStoreServiceException", ",", "KeyException", "{", "Key", "signingKey", "=", "getPublicKeyFromKeystore", "(", "trustedAlias", ","...
Creates a Key object from the certificate stored in the trust store and alias provided.
[ "Creates", "a", "Key", "object", "from", "the", "certificate", "stored", "in", "the", "trust", "store", "and", "alias", "provided", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/internal/ConsumerUtil.java#L290-L301
VoltDB/voltdb
src/frontend/org/voltdb/ElasticHashinator.java
ElasticHashinator.toCookedBytes
private byte[] toCookedBytes() { """ Returns compressed config bytes. @return config bytes @throws IOException """ // Allocate for a int pair per token/partition ID entry, plus a size. ByteBuffer buf = ByteBuffer.allocate(4 + (m_tokenCount * 8)); buf.putInt(m_tokenCount); // ...
java
private byte[] toCookedBytes() { // Allocate for a int pair per token/partition ID entry, plus a size. ByteBuffer buf = ByteBuffer.allocate(4 + (m_tokenCount * 8)); buf.putInt(m_tokenCount); // Keep tokens and partition ids separate to aid compression. for (int zz = 3; zz >=...
[ "private", "byte", "[", "]", "toCookedBytes", "(", ")", "{", "// Allocate for a int pair per token/partition ID entry, plus a size.", "ByteBuffer", "buf", "=", "ByteBuffer", ".", "allocate", "(", "4", "+", "(", "m_tokenCount", "*", "8", ")", ")", ";", "buf", ".", ...
Returns compressed config bytes. @return config bytes @throws IOException
[ "Returns", "compressed", "config", "bytes", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ElasticHashinator.java#L540-L567
eBay/parallec
src/main/java/io/parallec/core/bean/StrStrMap.java
StrStrMap.addPair
public StrStrMap addPair(String key, String value) { """ Adds the pair. @param key the key @param value the value @return the str str map """ if (key == null || value == null) { logger.error("invalid key value as null. ignore pair"); } else { this.map.put(key, v...
java
public StrStrMap addPair(String key, String value) { if (key == null || value == null) { logger.error("invalid key value as null. ignore pair"); } else { this.map.put(key, value); } return this; }
[ "public", "StrStrMap", "addPair", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "key", "==", "null", "||", "value", "==", "null", ")", "{", "logger", ".", "error", "(", "\"invalid key value as null. ignore pair\"", ")", ";", "}", "else...
Adds the pair. @param key the key @param value the value @return the str str map
[ "Adds", "the", "pair", "." ]
train
https://github.com/eBay/parallec/blob/1b4f1628f34fedfb06b24c33a5372d64d3df0952/src/main/java/io/parallec/core/bean/StrStrMap.java#L70-L80
aws/aws-sdk-java
aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ThingDocument.java
ThingDocument.withAttributes
public ThingDocument withAttributes(java.util.Map<String, String> attributes) { """ <p> The attributes. </p> @param attributes The attributes. @return Returns a reference to this object so that method calls can be chained together. """ setAttributes(attributes); return this; }
java
public ThingDocument withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
[ "public", "ThingDocument", "withAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "attributes", ")", "{", "setAttributes", "(", "attributes", ")", ";", "return", "this", ";", "}" ]
<p> The attributes. </p> @param attributes The attributes. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "attributes", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ThingDocument.java#L296-L299
kuali/ojb-1.0.4
src/java/org/apache/ojb/odmg/locking/InMemoryLockMapImpl.java
InMemoryLockMapImpl.getWriter
public LockEntry getWriter(Object obj) { """ returns the LockEntry for the Writer of object obj. If now writer exists, null is returned. """ PersistenceBroker broker = getBroker(); Identity oid = new Identity(obj, broker); return getWriter(oid); }
java
public LockEntry getWriter(Object obj) { PersistenceBroker broker = getBroker(); Identity oid = new Identity(obj, broker); return getWriter(oid); }
[ "public", "LockEntry", "getWriter", "(", "Object", "obj", ")", "{", "PersistenceBroker", "broker", "=", "getBroker", "(", ")", ";", "Identity", "oid", "=", "new", "Identity", "(", "obj", ",", "broker", ")", ";", "return", "getWriter", "(", "oid", ")", ";...
returns the LockEntry for the Writer of object obj. If now writer exists, null is returned.
[ "returns", "the", "LockEntry", "for", "the", "Writer", "of", "object", "obj", ".", "If", "now", "writer", "exists", "null", "is", "returned", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/odmg/locking/InMemoryLockMapImpl.java#L62-L67
mgm-tp/jfunk
jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/FormInputHandler.java
FormInputHandler.dataKeyWithIndex
public FormInputHandler dataKeyWithIndex(final String theDataKey, final Integer theDataIndex) { """ Creates a new {@link FormInputHandler} based on this {@link FormInputHandler} using the specified data key and the specified index for retrieving the value from the {@link DataSet} associated with this {@link FormI...
java
public FormInputHandler dataKeyWithIndex(final String theDataKey, final Integer theDataIndex) { checkState(dataSet != null, "Cannot specify a data key. Please specify a DataSet first."); Fields fields = new Fields(this); fields.dataKey = theDataKey; fields.dataIndex = theDataIndex; return new FormInput...
[ "public", "FormInputHandler", "dataKeyWithIndex", "(", "final", "String", "theDataKey", ",", "final", "Integer", "theDataIndex", ")", "{", "checkState", "(", "dataSet", "!=", "null", ",", "\"Cannot specify a data key. Please specify a DataSet first.\"", ")", ";", "Fields"...
Creates a new {@link FormInputHandler} based on this {@link FormInputHandler} using the specified data key and the specified index for retrieving the value from the {@link DataSet} associated with this {@link FormInputHandler}. @param theDataKey the data set key used to retrieve the value from the specified data set @...
[ "Creates", "a", "new", "{", "@link", "FormInputHandler", "}", "based", "on", "this", "{", "@link", "FormInputHandler", "}", "using", "the", "specified", "data", "key", "and", "the", "specified", "index", "for", "retrieving", "the", "value", "from", "the", "{...
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-web/src/main/java/com/mgmtp/jfunk/web/util/FormInputHandler.java#L292-L299
bingoohuang/excel2javabeans
src/main/java/com/github/bingoohuang/excel2beans/PoiUtil.java
PoiUtil.searchColCell
public static Cell searchColCell(Sheet sheet, short colIndex, String searchKey) { """ 查找单元格。 @param sheet 表单 @param colIndex 列索引 @param searchKey 单元格中包含的关键字 @return 单元格,没有找到时返回null """ if (StringUtils.isEmpty(searchKey)) return null; for (int i = sheet.getFirstRowNum(), ii = sheet.g...
java
public static Cell searchColCell(Sheet sheet, short colIndex, String searchKey) { if (StringUtils.isEmpty(searchKey)) return null; for (int i = sheet.getFirstRowNum(), ii = sheet.getLastRowNum(); i < ii; ++i) { val row = sheet.getRow(i); if (row == null) continue; v...
[ "public", "static", "Cell", "searchColCell", "(", "Sheet", "sheet", ",", "short", "colIndex", ",", "String", "searchKey", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "searchKey", ")", ")", "return", "null", ";", "for", "(", "int", "i", "=", ...
查找单元格。 @param sheet 表单 @param colIndex 列索引 @param searchKey 单元格中包含的关键字 @return 单元格,没有找到时返回null
[ "查找单元格。" ]
train
https://github.com/bingoohuang/excel2javabeans/blob/db136d460b93b649814366c0d84a982698b96dc3/src/main/java/com/github/bingoohuang/excel2beans/PoiUtil.java#L326-L338
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/RedwoodConfiguration.java
RedwoodConfiguration.splice
public RedwoodConfiguration splice(final LogRecordHandler parent, final LogRecordHandler toAdd, final LogRecordHandler grandchild) { """ Add a handler to as a child of an existing parent @param parent The handler to extend @param toAdd The new handler to add @param grandchild The subtree to attach to the new ha...
java
public RedwoodConfiguration splice(final LogRecordHandler parent, final LogRecordHandler toAdd, final LogRecordHandler grandchild){ tasks.add(new Runnable() { public void run() { Redwood.spliceHandler(parent, toAdd, grandchild);} }); return this; }
[ "public", "RedwoodConfiguration", "splice", "(", "final", "LogRecordHandler", "parent", ",", "final", "LogRecordHandler", "toAdd", ",", "final", "LogRecordHandler", "grandchild", ")", "{", "tasks", ".", "add", "(", "new", "Runnable", "(", ")", "{", "public", "vo...
Add a handler to as a child of an existing parent @param parent The handler to extend @param toAdd The new handler to add @param grandchild The subtree to attach to the new handler @return this
[ "Add", "a", "handler", "to", "as", "a", "child", "of", "an", "existing", "parent" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/RedwoodConfiguration.java#L139-L142
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java
FormatUtil.endsWith
public static boolean endsWith(CharSequence buf, CharSequence end) { """ Similar to {@link String#endsWith(String)} but for buffers. @param buf Buffer @param end End @return {@code true} if the buffer ends with the given sequence """ int len = end.length(), start = buf.length() - len; if(start < 0...
java
public static boolean endsWith(CharSequence buf, CharSequence end) { int len = end.length(), start = buf.length() - len; if(start < 0) { return false; } for(int i = 0; i < len; i++, start++) { if(buf.charAt(start) != end.charAt(i)) { return false; } } return true; }
[ "public", "static", "boolean", "endsWith", "(", "CharSequence", "buf", ",", "CharSequence", "end", ")", "{", "int", "len", "=", "end", ".", "length", "(", ")", ",", "start", "=", "buf", ".", "length", "(", ")", "-", "len", ";", "if", "(", "start", ...
Similar to {@link String#endsWith(String)} but for buffers. @param buf Buffer @param end End @return {@code true} if the buffer ends with the given sequence
[ "Similar", "to", "{", "@link", "String#endsWith", "(", "String", ")", "}", "but", "for", "buffers", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/io/FormatUtil.java#L1057-L1068
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/S3ObjectId.java
S3ObjectId.instructionFileId
public InstructionFileId instructionFileId(String suffix) { """ Returns the instruction file id of an instruction file with the given suffix. """ String ifileKey = key + DOT; ifileKey += (suffix == null || suffix.trim().length() == 0) ? DEFAULT_INSTRUCTION_FILE_SUFFIX ...
java
public InstructionFileId instructionFileId(String suffix) { String ifileKey = key + DOT; ifileKey += (suffix == null || suffix.trim().length() == 0) ? DEFAULT_INSTRUCTION_FILE_SUFFIX : suffix ; return new InstructionFileId(bucket, ifileKey, ...
[ "public", "InstructionFileId", "instructionFileId", "(", "String", "suffix", ")", "{", "String", "ifileKey", "=", "key", "+", "DOT", ";", "ifileKey", "+=", "(", "suffix", "==", "null", "||", "suffix", ".", "trim", "(", ")", ".", "length", "(", ")", "==",...
Returns the instruction file id of an instruction file with the given suffix.
[ "Returns", "the", "instruction", "file", "id", "of", "an", "instruction", "file", "with", "the", "given", "suffix", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/S3ObjectId.java#L95-L102
unbescape/unbescape
src/main/java/org/unbescape/json/JsonEscape.java
JsonEscape.unescapeJson
public static void unescapeJson(final String text, final Writer writer) throws IOException { """ <p> Perform a JSON <strong>unescape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> No additional configuration arguments are required. Unescape operations...
java
public static void unescapeJson(final String text, final Writer writer) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } if (text == null) { return; } if (text.indexOf('\\') <...
[ "public", "static", "void", "unescapeJson", "(", "final", "String", "text", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Argument 'writer' ca...
<p> Perform a JSON <strong>unescape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> No additional configuration arguments are required. Unescape operations will always perform <em>complete</em> JSON unescape of SECs and u-based escapes. </p> <p> This method is <strong>threa...
[ "<p", ">", "Perform", "a", "JSON", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">", "Writer<", "/", "tt", ">", ".", "<", "/", "p", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/json/JsonEscape.java#L917-L934
lucee/Lucee
core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java
ResourceUtil.getRealSize
public static long getRealSize(Resource res, ResourceFilter filter) { """ return the size of the Resource, other than method length of Resource this method return the size of all files in a directory @param collectionDir @return """ if (res.isFile()) { return res.length(); } else if (res.isDirecto...
java
public static long getRealSize(Resource res, ResourceFilter filter) { if (res.isFile()) { return res.length(); } else if (res.isDirectory()) { long size = 0; Resource[] children = filter == null ? res.listResources() : res.listResources(filter); for (int i = 0; i < children.length; i++) { size ...
[ "public", "static", "long", "getRealSize", "(", "Resource", "res", ",", "ResourceFilter", "filter", ")", "{", "if", "(", "res", ".", "isFile", "(", ")", ")", "{", "return", "res", ".", "length", "(", ")", ";", "}", "else", "if", "(", "res", ".", "i...
return the size of the Resource, other than method length of Resource this method return the size of all files in a directory @param collectionDir @return
[ "return", "the", "size", "of", "the", "Resource", "other", "than", "method", "length", "of", "Resource", "this", "method", "return", "the", "size", "of", "all", "files", "in", "a", "directory" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java#L1136-L1150
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_scheduler_serviceName_events_GET
public ArrayList<String> billingAccount_scheduler_serviceName_events_GET(String billingAccount, String serviceName, OvhSchedulerCategoryEnum categories, Date dateEnd_from, Date dateEnd_to, Date dateStart_from, Date dateStart_to) throws IOException { """ Custom events scheduled REST: GET /telephony/{billingAccou...
java
public ArrayList<String> billingAccount_scheduler_serviceName_events_GET(String billingAccount, String serviceName, OvhSchedulerCategoryEnum categories, Date dateEnd_from, Date dateEnd_to, Date dateStart_from, Date dateStart_to) throws IOException { String qPath = "/telephony/{billingAccount}/scheduler/{serviceName}/...
[ "public", "ArrayList", "<", "String", ">", "billingAccount_scheduler_serviceName_events_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "OvhSchedulerCategoryEnum", "categories", ",", "Date", "dateEnd_from", ",", "Date", "dateEnd_to", ",", "Date",...
Custom events scheduled REST: GET /telephony/{billingAccount}/scheduler/{serviceName}/events @param dateStart_to [required] Filter the value of dateStart property (<=) @param dateEnd_to [required] Filter the value of dateEnd property (<=) @param categories [required] Filter the value of categories property (=) @param ...
[ "Custom", "events", "scheduled" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L581-L591
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.readLines
public static <T extends Collection<String>> T readLines(URL url, String charsetName, T collection) throws IORuntimeException { """ 从文件中读取每一行数据 @param <T> 集合类型 @param url 文件的URL @param charsetName 字符集 @param collection 集合 @return 文件中的每行内容的集合 @throws IORuntimeException IO异常 """ return readLines(url, ...
java
public static <T extends Collection<String>> T readLines(URL url, String charsetName, T collection) throws IORuntimeException { return readLines(url, CharsetUtil.charset(charsetName), collection); }
[ "public", "static", "<", "T", "extends", "Collection", "<", "String", ">", ">", "T", "readLines", "(", "URL", "url", ",", "String", "charsetName", ",", "T", "collection", ")", "throws", "IORuntimeException", "{", "return", "readLines", "(", "url", ",", "Ch...
从文件中读取每一行数据 @param <T> 集合类型 @param url 文件的URL @param charsetName 字符集 @param collection 集合 @return 文件中的每行内容的集合 @throws IORuntimeException IO异常
[ "从文件中读取每一行数据" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2261-L2263
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/WriterUtils.java
WriterUtils.getDataPublisherFinalDir
public static Path getDataPublisherFinalDir(State state, int numBranches, int branchId) { """ Get the {@link Path} corresponding the to the directory a given {@link org.apache.gobblin.publisher.BaseDataPublisher} should commits its output data. The final output data directory is determined by combining the {@lin...
java
public static Path getDataPublisherFinalDir(State state, int numBranches, int branchId) { String dataPublisherFinalDirKey = ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.DATA_PUBLISHER_FINAL_DIR, numBranches, branchId); Preconditions.checkArgument(state.contains(dataPublisherFinalDirKey),...
[ "public", "static", "Path", "getDataPublisherFinalDir", "(", "State", "state", ",", "int", "numBranches", ",", "int", "branchId", ")", "{", "String", "dataPublisherFinalDirKey", "=", "ForkOperatorUtils", ".", "getPropertyNameForBranch", "(", "ConfigurationKeys", ".", ...
Get the {@link Path} corresponding the to the directory a given {@link org.apache.gobblin.publisher.BaseDataPublisher} should commits its output data. The final output data directory is determined by combining the {@link ConfigurationKeys#DATA_PUBLISHER_FINAL_DIR} and the {@link ConfigurationKeys#WRITER_FILE_PATH}. @pa...
[ "Get", "the", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/WriterUtils.java#L128-L143
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/MithraManager.java
MithraManager.executeTransactionalCommand
public <R> R executeTransactionalCommand(final TransactionalCommand<R> command, final int retryCount) throws MithraBusinessException { """ executes the given transactional command with the custom number of retries @param command @param retryCount number of times to retry if the exception is retriabl...
java
public <R> R executeTransactionalCommand(final TransactionalCommand<R> command, final int retryCount) throws MithraBusinessException { return this.executeTransactionalCommand(command, new TransactionStyle(this.transactionTimeout, retryCount)); }
[ "public", "<", "R", ">", "R", "executeTransactionalCommand", "(", "final", "TransactionalCommand", "<", "R", ">", "command", ",", "final", "int", "retryCount", ")", "throws", "MithraBusinessException", "{", "return", "this", ".", "executeTransactionalCommand", "(", ...
executes the given transactional command with the custom number of retries @param command @param retryCount number of times to retry if the exception is retriable (e.g. deadlock) @throws MithraBusinessException
[ "executes", "the", "given", "transactional", "command", "with", "the", "custom", "number", "of", "retries" ]
train
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/MithraManager.java#L512-L516
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/ImportHelpers.java
ImportHelpers.findImportByExportingInstance
public static Import findImportByExportingInstance( Collection<Import> imports, String exportingInstancePath ) { """ Finds a specific import from the path of the instance that exports it. @param imports a collection of imports (that can be null) @param exportingInstancePath the path of the exporting instance @r...
java
public static Import findImportByExportingInstance( Collection<Import> imports, String exportingInstancePath ) { Import result = null; if( imports != null && exportingInstancePath != null ) { for( Import imp : imports ) { if( exportingInstancePath.equals( imp.getInstancePath())) { result = imp; br...
[ "public", "static", "Import", "findImportByExportingInstance", "(", "Collection", "<", "Import", ">", "imports", ",", "String", "exportingInstancePath", ")", "{", "Import", "result", "=", "null", ";", "if", "(", "imports", "!=", "null", "&&", "exportingInstancePat...
Finds a specific import from the path of the instance that exports it. @param imports a collection of imports (that can be null) @param exportingInstancePath the path of the exporting instance @return an import, or null if none was found
[ "Finds", "a", "specific", "import", "from", "the", "path", "of", "the", "instance", "that", "exports", "it", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/ImportHelpers.java#L175-L188
dita-ot/dita-ot
src/main/java/org/dita/dost/writer/ValidationFilter.java
ValidationFilter.validateScope
private AttributesImpl validateScope(final Attributes atts, final AttributesImpl modified) { """ Fix implicit {@code scope} attribute. @return modified attributes, {@code null} if there have been no changes """ AttributesImpl res = modified; final String scope = atts.getValue(ATTRIBUTE_NAME_...
java
private AttributesImpl validateScope(final Attributes atts, final AttributesImpl modified) { AttributesImpl res = modified; final String scope = atts.getValue(ATTRIBUTE_NAME_SCOPE); final URI href = toURI(atts.getValue(ATTRIBUTE_NAME_HREF)); if (scope == null && href != null && href.isAb...
[ "private", "AttributesImpl", "validateScope", "(", "final", "Attributes", "atts", ",", "final", "AttributesImpl", "modified", ")", "{", "AttributesImpl", "res", "=", "modified", ";", "final", "String", "scope", "=", "atts", ".", "getValue", "(", "ATTRIBUTE_NAME_SC...
Fix implicit {@code scope} attribute. @return modified attributes, {@code null} if there have been no changes
[ "Fix", "implicit", "{", "@code", "scope", "}", "attribute", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/ValidationFilter.java#L219-L242
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/weightfunctions/GaussStddevWeight.java
GaussStddevWeight.getWeight
@Override public double getWeight(double distance, double max, double stddev) { """ Get Gaussian Weight using standard deviation for scaling. max is ignored. """ if(stddev <= 0) { return 1; } double normdistance = distance / stddev; return scaling * FastMath.exp(-.5 * normdistance * nor...
java
@Override public double getWeight(double distance, double max, double stddev) { if(stddev <= 0) { return 1; } double normdistance = distance / stddev; return scaling * FastMath.exp(-.5 * normdistance * normdistance) / stddev; }
[ "@", "Override", "public", "double", "getWeight", "(", "double", "distance", ",", "double", "max", ",", "double", "stddev", ")", "{", "if", "(", "stddev", "<=", "0", ")", "{", "return", "1", ";", "}", "double", "normdistance", "=", "distance", "/", "st...
Get Gaussian Weight using standard deviation for scaling. max is ignored.
[ "Get", "Gaussian", "Weight", "using", "standard", "deviation", "for", "scaling", ".", "max", "is", "ignored", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/weightfunctions/GaussStddevWeight.java#L44-L51
elki-project/elki
elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/deliclu/DeLiCluTree.java
DeLiCluTree.setExpanded
public void setExpanded(SpatialEntry entry1, SpatialEntry entry2) { """ Marks the nodes with the specified ids as expanded. @param entry1 the first node @param entry2 the second node """ IntSet exp1 = expanded.get(getPageID(entry1)); if(exp1 == null) { exp1 = new IntOpenHashSet(); expan...
java
public void setExpanded(SpatialEntry entry1, SpatialEntry entry2) { IntSet exp1 = expanded.get(getPageID(entry1)); if(exp1 == null) { exp1 = new IntOpenHashSet(); expanded.put(getPageID(entry1), exp1); } exp1.add(getPageID(entry2)); }
[ "public", "void", "setExpanded", "(", "SpatialEntry", "entry1", ",", "SpatialEntry", "entry2", ")", "{", "IntSet", "exp1", "=", "expanded", ".", "get", "(", "getPageID", "(", "entry1", ")", ")", ";", "if", "(", "exp1", "==", "null", ")", "{", "exp1", "...
Marks the nodes with the specified ids as expanded. @param entry1 the first node @param entry2 the second node
[ "Marks", "the", "nodes", "with", "the", "specified", "ids", "as", "expanded", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-rtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/deliclu/DeLiCluTree.java#L72-L79
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.getLearnedRoutesAsync
public Observable<GatewayRouteListResultInner> getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName) { """ This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. @param resourceGroupName The name of the resource gro...
java
public Observable<GatewayRouteListResultInner> getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName) { return getLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1<ServiceResponse<GatewayRouteListResultInner>, GatewayRouteListResultInner...
[ "public", "Observable", "<", "GatewayRouteListResultInner", ">", "getLearnedRoutesAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ")", "{", "return", "getLearnedRoutesWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualNetwo...
This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @throws IllegalArgumentException thrown if parameters fail the v...
[ "This", "operation", "retrieves", "a", "list", "of", "routes", "the", "virtual", "network", "gateway", "has", "learned", "including", "routes", "learned", "from", "BGP", "peers", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L2365-L2372
phax/ph-pdf-layout
src/main/java/com/helger/pdflayout4/element/table/PLTable.java
PLTable.addAndReturnRow
@Nonnull public PLTableRow addAndReturnRow (@Nonnull final Iterable <? extends PLTableCell> aCells) { """ Add a new table row with auto height. All contained elements are added with the specified width in the constructor. <code>null</code> elements are represented as empty cells. @param aCells The cells to...
java
@Nonnull public PLTableRow addAndReturnRow (@Nonnull final Iterable <? extends PLTableCell> aCells) { return addAndReturnRow (aCells, m_aRows.getDefaultHeight ()); }
[ "@", "Nonnull", "public", "PLTableRow", "addAndReturnRow", "(", "@", "Nonnull", "final", "Iterable", "<", "?", "extends", "PLTableCell", ">", "aCells", ")", "{", "return", "addAndReturnRow", "(", "aCells", ",", "m_aRows", ".", "getDefaultHeight", "(", ")", ")"...
Add a new table row with auto height. All contained elements are added with the specified width in the constructor. <code>null</code> elements are represented as empty cells. @param aCells The cells to add. May not be <code>null</code>. @return the added table row and never <code>null</code>.
[ "Add", "a", "new", "table", "row", "with", "auto", "height", ".", "All", "contained", "elements", "are", "added", "with", "the", "specified", "width", "in", "the", "constructor", ".", "<code", ">", "null<", "/", "code", ">", "elements", "are", "represented...
train
https://github.com/phax/ph-pdf-layout/blob/777d9f3a131cbe8f592c0de1cf554084e541bb54/src/main/java/com/helger/pdflayout4/element/table/PLTable.java#L201-L205
katharsis-project/katharsis-framework
katharsis-examples/dropwizard-mongo-example/src/main/java/io/katharsis/example/dropwizard/domain/repository/TaskToProjectRepository.java
TaskToProjectRepository.addRelations
@Override public void addRelations(Task task, Iterable<ObjectId> projectIds, String fieldName) { """ A simple implementation of the addRelations method which presents the general concept of the method. It SHOULD NOT be used in production because of possible race condition - production ready code should perfor...
java
@Override public void addRelations(Task task, Iterable<ObjectId> projectIds, String fieldName) { List<Project> newProjectList = new LinkedList<>(); Iterable<Project> projectsToAdd = projectRepository.findAll(projectIds, null); for (Project project: projectsToAdd) { newProjectList...
[ "@", "Override", "public", "void", "addRelations", "(", "Task", "task", ",", "Iterable", "<", "ObjectId", ">", "projectIds", ",", "String", "fieldName", ")", "{", "List", "<", "Project", ">", "newProjectList", "=", "new", "LinkedList", "<>", "(", ")", ";",...
A simple implementation of the addRelations method which presents the general concept of the method. It SHOULD NOT be used in production because of possible race condition - production ready code should perform an atomic operation. @param task @param projectIds @param fieldName
[ "A", "simple", "implementation", "of", "the", "addRelations", "method", "which", "presents", "the", "general", "concept", "of", "the", "method", ".", "It", "SHOULD", "NOT", "be", "used", "in", "production", "because", "of", "possible", "race", "condition", "-"...
train
https://github.com/katharsis-project/katharsis-framework/blob/73d1a8763c49c5cf4643d43e2dbfedb647630c46/katharsis-examples/dropwizard-mongo-example/src/main/java/io/katharsis/example/dropwizard/domain/repository/TaskToProjectRepository.java#L59-L82
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.copyResourceToProject
public void copyResourceToProject(CmsRequestContext context, CmsResource resource) throws CmsException, CmsRoleViolationException { """ Copies a resource to the current project of the user.<p> @param context the current request context @param resource the resource to apply this operation to @throws CmsE...
java
public void copyResourceToProject(CmsRequestContext context, CmsResource resource) throws CmsException, CmsRoleViolationException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { checkOfflineProject(dbc); checkManagerOfProjectRole(dbc, context.getCurrentP...
[ "public", "void", "copyResourceToProject", "(", "CmsRequestContext", "context", ",", "CmsResource", "resource", ")", "throws", "CmsException", ",", "CmsRoleViolationException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", "...
Copies a resource to the current project of the user.<p> @param context the current request context @param resource the resource to apply this operation to @throws CmsException if something goes wrong @throws CmsRoleViolationException if the current user does not have management access to the project @see org.opencm...
[ "Copies", "a", "resource", "to", "the", "current", "project", "of", "the", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L822-L842
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.setDefaultColorspace
public void setDefaultColorspace(PdfName name, PdfObject obj) { """ Sets the default colorspace. @param name the name of the colorspace. It can be <CODE>PdfName.DEFAULTGRAY</CODE>, <CODE>PdfName.DEFAULTRGB</CODE> or <CODE>PdfName.DEFAULTCMYK</CODE> @param obj the colorspace. A <CODE>null</CODE> or <CODE>PdfNull...
java
public void setDefaultColorspace(PdfName name, PdfObject obj) { PageResources prs = getPageResources(); prs.addDefaultColor(name, obj); }
[ "public", "void", "setDefaultColorspace", "(", "PdfName", "name", ",", "PdfObject", "obj", ")", "{", "PageResources", "prs", "=", "getPageResources", "(", ")", ";", "prs", ".", "addDefaultColor", "(", "name", ",", "obj", ")", ";", "}" ]
Sets the default colorspace. @param name the name of the colorspace. It can be <CODE>PdfName.DEFAULTGRAY</CODE>, <CODE>PdfName.DEFAULTRGB</CODE> or <CODE>PdfName.DEFAULTCMYK</CODE> @param obj the colorspace. A <CODE>null</CODE> or <CODE>PdfNull</CODE> removes any colorspace with the same name
[ "Sets", "the", "default", "colorspace", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L3014-L3017
VoltDB/voltdb
src/frontend/org/voltdb/importclient/kafka10/KafkaStreamImporter.java
KafkaStreamImporter.createConsumerRunner
private KafkaInternalConsumerRunner createConsumerRunner(Properties properties) throws Exception { """ Create a Kafka consumer and runner. @param properties Kafka consumer properties @throws Exception on error """ ClassLoader previous = Thread.currentThread().getContextClassLoader(); Threa...
java
private KafkaInternalConsumerRunner createConsumerRunner(Properties properties) throws Exception { ClassLoader previous = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); try { Consumer<ByteBuffer, ByteBuffer...
[ "private", "KafkaInternalConsumerRunner", "createConsumerRunner", "(", "Properties", "properties", ")", "throws", "Exception", "{", "ClassLoader", "previous", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ";", "Thread", ".", ...
Create a Kafka consumer and runner. @param properties Kafka consumer properties @throws Exception on error
[ "Create", "a", "Kafka", "consumer", "and", "runner", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importclient/kafka10/KafkaStreamImporter.java#L72-L83
protostuff/protostuff
protostuff-core/src/main/java/io/protostuff/ProtobufIOUtil.java
ProtobufIOUtil.writeTo
public static <T> int writeTo(LinkedBuffer buffer, T message, Schema<T> schema) { """ Writes the {@code message} into the {@link LinkedBuffer} using the given schema. @return the size of the message """ if (buffer.start != buffer.offset) throw new IllegalArgumentException("Buffer previ...
java
public static <T> int writeTo(LinkedBuffer buffer, T message, Schema<T> schema) { if (buffer.start != buffer.offset) throw new IllegalArgumentException("Buffer previously used and had not been reset."); final ProtobufOutput output = new ProtobufOutput(buffer); try ...
[ "public", "static", "<", "T", ">", "int", "writeTo", "(", "LinkedBuffer", "buffer", ",", "T", "message", ",", "Schema", "<", "T", ">", "schema", ")", "{", "if", "(", "buffer", ".", "start", "!=", "buffer", ".", "offset", ")", "throw", "new", "Illegal...
Writes the {@code message} into the {@link LinkedBuffer} using the given schema. @return the size of the message
[ "Writes", "the", "{", "@code", "message", "}", "into", "the", "{", "@link", "LinkedBuffer", "}", "using", "the", "given", "schema", "." ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-core/src/main/java/io/protostuff/ProtobufIOUtil.java#L201-L218
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/compiler/Scope.java
Scope.getDeclaredVariable
public Variable getDeclaredVariable(String name, boolean publicOnly) { """ Returns a declared variable by name. Search begins in this scope and moves up into parent scopes. If not found, null is returned. A public- only variable can be requested. @return Null if no declared variable found with the given name ...
java
public Variable getDeclaredVariable(String name, boolean publicOnly) { //private Set mPrivateVars; Variable var = mDeclared.get(name); if (var != null) { // If its okay to be private or its public then... if (!publicOnly || mPrivateVars == null || !mPriva...
[ "public", "Variable", "getDeclaredVariable", "(", "String", "name", ",", "boolean", "publicOnly", ")", "{", "//private Set mPrivateVars;", "Variable", "var", "=", "mDeclared", ".", "get", "(", "name", ")", ";", "if", "(", "var", "!=", "null", ")", "{", "// I...
Returns a declared variable by name. Search begins in this scope and moves up into parent scopes. If not found, null is returned. A public- only variable can be requested. @return Null if no declared variable found with the given name
[ "Returns", "a", "declared", "variable", "by", "name", ".", "Search", "begins", "in", "this", "scope", "and", "moves", "up", "into", "parent", "scopes", ".", "If", "not", "found", "null", "is", "returned", ".", "A", "public", "-", "only", "variable", "can...
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/compiler/Scope.java#L161-L178
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java
ResourceManager.registerTaskExecutorInternal
private RegistrationResponse registerTaskExecutorInternal( TaskExecutorGateway taskExecutorGateway, String taskExecutorAddress, ResourceID taskExecutorResourceId, int dataPort, HardwareDescription hardwareDescription) { """ Registers a new TaskExecutor. @param taskExecutorGateway to communicate w...
java
private RegistrationResponse registerTaskExecutorInternal( TaskExecutorGateway taskExecutorGateway, String taskExecutorAddress, ResourceID taskExecutorResourceId, int dataPort, HardwareDescription hardwareDescription) { WorkerRegistration<WorkerType> oldRegistration = taskExecutors.remove(taskExecutorR...
[ "private", "RegistrationResponse", "registerTaskExecutorInternal", "(", "TaskExecutorGateway", "taskExecutorGateway", ",", "String", "taskExecutorAddress", ",", "ResourceID", "taskExecutorResourceId", ",", "int", "dataPort", ",", "HardwareDescription", "hardwareDescription", ")",...
Registers a new TaskExecutor. @param taskExecutorGateway to communicate with the registering TaskExecutor @param taskExecutorAddress address of the TaskExecutor @param taskExecutorResourceId ResourceID of the TaskExecutor @param dataPort port used for data transfer @param hardwareDescription of the registering TaskExe...
[ "Registers", "a", "new", "TaskExecutor", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManager.java#L683-L729
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.getSAMLAssertion
public SAMLEndpointResponse getSAMLAssertion(String usernameOrEmail, String password, String appId, String subdomain) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Generates a SAML Assertion. @param usernameOrEmail username or email of the OneLogin user accessing the app @param ...
java
public SAMLEndpointResponse getSAMLAssertion(String usernameOrEmail, String password, String appId, String subdomain) throws OAuthSystemException, OAuthProblemException, URISyntaxException { return getSAMLAssertion(usernameOrEmail, password, appId, subdomain, null); }
[ "public", "SAMLEndpointResponse", "getSAMLAssertion", "(", "String", "usernameOrEmail", ",", "String", "password", ",", "String", "appId", ",", "String", "subdomain", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "r...
Generates a SAML Assertion. @param usernameOrEmail username or email of the OneLogin user accessing the app @param password Password of the OneLogin user accessing the app @param appId App ID of the app for which you want to generate a SAML token @param subdomain subdomain of the OneLogin user accessing the app @retu...
[ "Generates", "a", "SAML", "Assertion", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L2453-L2455
vanilladb/vanillacore
src/main/java/org/vanilladb/core/remote/jdbc/RemoteConnectionImpl.java
RemoteConnectionImpl.setReadOnly
@Override public void setReadOnly(boolean readOnly) throws RemoteException { """ Sets this connection's auto-commit mode to the given state. The default setting of auto-commit mode is true. This method may commit current transaction and start a new transaction. """ if (this.readOnly != readOnly) { t...
java
@Override public void setReadOnly(boolean readOnly) throws RemoteException { if (this.readOnly != readOnly) { tx.commit(); this.readOnly = readOnly; try { tx = VanillaDb.txMgr().newTransaction(isolationLevel, readOnly); } catch (Exception e) { throw new RemoteException("error creating tra...
[ "@", "Override", "public", "void", "setReadOnly", "(", "boolean", "readOnly", ")", "throws", "RemoteException", "{", "if", "(", "this", ".", "readOnly", "!=", "readOnly", ")", "{", "tx", ".", "commit", "(", ")", ";", "this", ".", "readOnly", "=", "readOn...
Sets this connection's auto-commit mode to the given state. The default setting of auto-commit mode is true. This method may commit current transaction and start a new transaction.
[ "Sets", "this", "connection", "s", "auto", "-", "commit", "mode", "to", "the", "given", "state", ".", "The", "default", "setting", "of", "auto", "-", "commit", "mode", "is", "true", ".", "This", "method", "may", "commit", "current", "transaction", "and", ...
train
https://github.com/vanilladb/vanillacore/blob/d9a34e876b1b83226036d1fa982a614bbef59bd1/src/main/java/org/vanilladb/core/remote/jdbc/RemoteConnectionImpl.java#L91-L102
m-m-m/util
xml/src/main/java/net/sf/mmm/util/xml/base/jaxb/IdResolverContext.java
IdResolverContext.get
public Callable<?> get(String id, Class<?> type) { """ This method {@link com.sun.xml.bind.IDResolver#resolve(String, Class) resolves} the value with the given {@code id} . @param id is the {@link javax.xml.bind.annotation.XmlIDREF} of the requested object. This object should be {@link #put(String, Object) bo...
java
public Callable<?> get(String id, Class<?> type) { Resolver callable = this.id2callableMap.get(id); if (callable == null) { callable = new Resolver(id, type); this.id2callableMap.put(id, callable); } return callable; }
[ "public", "Callable", "<", "?", ">", "get", "(", "String", "id", ",", "Class", "<", "?", ">", "type", ")", "{", "Resolver", "callable", "=", "this", ".", "id2callableMap", ".", "get", "(", "id", ")", ";", "if", "(", "callable", "==", "null", ")", ...
This method {@link com.sun.xml.bind.IDResolver#resolve(String, Class) resolves} the value with the given {@code id} . @param id is the {@link javax.xml.bind.annotation.XmlIDREF} of the requested object. This object should be {@link #put(String, Object) bound}. This may also happen after it has been requested. @param t...
[ "This", "method", "{", "@link", "com", ".", "sun", ".", "xml", ".", "bind", ".", "IDResolver#resolve", "(", "String", "Class", ")", "resolves", "}", "the", "value", "with", "the", "given", "{", "@code", "id", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/xml/src/main/java/net/sf/mmm/util/xml/base/jaxb/IdResolverContext.java#L78-L86
joniles/mpxj
src/main/java/net/sf/mpxj/common/DateHelper.java
DateHelper.setTime
public static Date setTime(Date date, Date canonicalTime) { """ Given a date represented by a Date instance, set the time component of the date based on the hours and minutes of the time supplied by the Date instance. @param date Date instance representing the date @param canonicalTime Date instance represen...
java
public static Date setTime(Date date, Date canonicalTime) { Date result; if (canonicalTime == null) { result = date; } else { // // The original naive implementation of this method generated // the "start of day" date (midnight) for the required...
[ "public", "static", "Date", "setTime", "(", "Date", "date", ",", "Date", "canonicalTime", ")", "{", "Date", "result", ";", "if", "(", "canonicalTime", "==", "null", ")", "{", "result", "=", "date", ";", "}", "else", "{", "//", "// The original naive implem...
Given a date represented by a Date instance, set the time component of the date based on the hours and minutes of the time supplied by the Date instance. @param date Date instance representing the date @param canonicalTime Date instance representing the time of day @return new Date instance with the required time set
[ "Given", "a", "date", "represented", "by", "a", "Date", "instance", "set", "the", "time", "component", "of", "the", "date", "based", "on", "the", "hours", "and", "minutes", "of", "the", "time", "supplied", "by", "the", "Date", "instance", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/DateHelper.java#L358-L402
katharsis-project/katharsis-framework
katharsis-core/src/main/java/io/katharsis/core/internal/jackson/JsonApiModuleBuilder.java
JsonApiModuleBuilder.build
public SimpleModule build(ResourceRegistry resourceRegistry, boolean isClient) { """ Creates Katharsis Jackson module with all required serializers @param resourceRegistry initialized registry with all of the required resources @param isClient is katharsis client @return {@link com.fasterxml.jackson.d...
java
public SimpleModule build(ResourceRegistry resourceRegistry, boolean isClient) { SimpleModule simpleModule = new SimpleModule(JSON_API_MODULE_NAME, new Version(1, 0, 0, null, null, null)); simpleModule.addSerializer(new ErrorDataSerializer()); simpleModule.addDeserializer(ErrorD...
[ "public", "SimpleModule", "build", "(", "ResourceRegistry", "resourceRegistry", ",", "boolean", "isClient", ")", "{", "SimpleModule", "simpleModule", "=", "new", "SimpleModule", "(", "JSON_API_MODULE_NAME", ",", "new", "Version", "(", "1", ",", "0", ",", "0", ",...
Creates Katharsis Jackson module with all required serializers @param resourceRegistry initialized registry with all of the required resources @param isClient is katharsis client @return {@link com.fasterxml.jackson.databind.Module} with custom serializers
[ "Creates", "Katharsis", "Jackson", "module", "with", "all", "required", "serializers" ]
train
https://github.com/katharsis-project/katharsis-framework/blob/73d1a8763c49c5cf4643d43e2dbfedb647630c46/katharsis-core/src/main/java/io/katharsis/core/internal/jackson/JsonApiModuleBuilder.java#L23-L31
Cornutum/tcases
tcases-lib/src/main/java/org/cornutum/tcases/VarSetBuilder.java
VarSetBuilder.hasIf
public VarSetBuilder hasIf( String name, Object value) { """ Adds a variable set annotation if the given value is non-null """ return value != null ? has( name, value) : this; }
java
public VarSetBuilder hasIf( String name, Object value) { return value != null ? has( name, value) : this; }
[ "public", "VarSetBuilder", "hasIf", "(", "String", "name", ",", "Object", "value", ")", "{", "return", "value", "!=", "null", "?", "has", "(", "name", ",", "value", ")", ":", "this", ";", "}" ]
Adds a variable set annotation if the given value is non-null
[ "Adds", "a", "variable", "set", "annotation", "if", "the", "given", "value", "is", "non", "-", "null" ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-lib/src/main/java/org/cornutum/tcases/VarSetBuilder.java#L125-L131
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.escapeXml11Minimal
public static void escapeXml11Minimal(final Reader reader, final Writer writer) throws IOException { """ <p> Perform an XML 1.1 level 1 (only markup-significant chars) <strong>escape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 1</em> mean...
java
public static void escapeXml11Minimal(final Reader reader, final Writer writer) throws IOException { escapeXml(reader, writer, XmlEscapeSymbols.XML11_SYMBOLS, XmlEscapeType.CHARACTER_ENTITY_REFERENCES_DEFAULT_TO_HEXA, XmlEscapeLevel.LEVEL_1_ONLY_MARKUP_SIGNIFICANT); ...
[ "public", "static", "void", "escapeXml11Minimal", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeXml", "(", "reader", ",", "writer", ",", "XmlEscapeSymbols", ".", "XML11_SYMBOLS", ",", "XmlEscapeType",...
<p> Perform an XML 1.1 level 1 (only markup-significant chars) <strong>escape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 1</em> means this method will only escape the five markup-significant characters which are <em>predefined</em> as Character Entity Referen...
[ "<p", ">", "Perform", "an", "XML", "1", ".", "1", "level", "1", "(", "only", "markup", "-", "significant", "chars", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "writing",...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L1268-L1273
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/web/JwtEndpointServices.java
JwtEndpointServices.processJWKRequest
private void processJWKRequest(HttpServletResponse response, JwtConfig jwtConfig) throws IOException { """ Obtains the JWK string that is active in the specified config and prints it in JSON format in the response. If a JWK is not found, the response will be empty. @param response @param jwtConfig @throws I...
java
private void processJWKRequest(HttpServletResponse response, JwtConfig jwtConfig) throws IOException { /* * if (!jwtConfig.isJwkEnabled()) { String errorMsg = * Tr.formatMessage(tc, "JWK_ENDPOINT_JWK_NOT_ENABLED", new Object[] { * jwtConfig.getId() }); Tr.error(tc, errorMsg); * response.sendError(HttpSer...
[ "private", "void", "processJWKRequest", "(", "HttpServletResponse", "response", ",", "JwtConfig", "jwtConfig", ")", "throws", "IOException", "{", "/*\n\t\t * if (!jwtConfig.isJwkEnabled()) { String errorMsg =\n\t\t * Tr.formatMessage(tc, \"JWK_ENDPOINT_JWK_NOT_ENABLED\", new Object[] {\n\t...
Obtains the JWK string that is active in the specified config and prints it in JSON format in the response. If a JWK is not found, the response will be empty. @param response @param jwtConfig @throws IOException
[ "Obtains", "the", "JWK", "string", "that", "is", "active", "in", "the", "specified", "config", "and", "prints", "it", "in", "JSON", "format", "in", "the", "response", ".", "If", "a", "JWK", "is", "not", "found", "the", "response", "will", "be", "empty", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/web/JwtEndpointServices.java#L255-L293
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/dbserver/ConnectionManager.java
ConnectionManager.invokeWithClientSession
public <T> T invokeWithClientSession(int targetPlayer, ClientTask<T> task, String description) throws Exception { """ Obtain a dbserver client session that can be used to perform some task, call that task with the client, then release the client. @param targetPlayer the player number whose dbserver...
java
public <T> T invokeWithClientSession(int targetPlayer, ClientTask<T> task, String description) throws Exception { if (!isRunning()) { throw new IllegalStateException("ConnectionManager is not running, aborting " + description); } final Client client = allocateClient(targ...
[ "public", "<", "T", ">", "T", "invokeWithClientSession", "(", "int", "targetPlayer", ",", "ClientTask", "<", "T", ">", "task", ",", "String", "description", ")", "throws", "Exception", "{", "if", "(", "!", "isRunning", "(", ")", ")", "{", "throw", "new",...
Obtain a dbserver client session that can be used to perform some task, call that task with the client, then release the client. @param targetPlayer the player number whose dbserver we wish to communicate with @param task the activity that will be performed with exclusive access to a dbserver connection @param descrip...
[ "Obtain", "a", "dbserver", "client", "session", "that", "can", "be", "used", "to", "perform", "some", "task", "call", "that", "task", "with", "the", "client", "then", "release", "the", "client", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/dbserver/ConnectionManager.java#L186-L198
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/util/XMLUtilities.java
XMLUtilities.getChild
public static Element getChild(Element element, String name) { """ Get the first child element with the given name. @param element The parent element @param name The child element name @return The child element or null """ return (Element) element.getElementsByTagName(name).item(0); }
java
public static Element getChild(Element element, String name) { return (Element) element.getElementsByTagName(name).item(0); }
[ "public", "static", "Element", "getChild", "(", "Element", "element", ",", "String", "name", ")", "{", "return", "(", "Element", ")", "element", ".", "getElementsByTagName", "(", "name", ")", ".", "item", "(", "0", ")", ";", "}" ]
Get the first child element with the given name. @param element The parent element @param name The child element name @return The child element or null
[ "Get", "the", "first", "child", "element", "with", "the", "given", "name", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/util/XMLUtilities.java#L60-L62
pietermartin/sqlg
sqlg-core/src/main/java/org/umlg/sqlg/structure/topology/Partition.java
Partition.createRangePartition
static Partition createRangePartition(SqlgGraph sqlgGraph, AbstractLabel abstractLabel, String name, String from, String to) { """ Create a range partition on an {@link AbstractLabel} @param sqlgGraph @param abstractLabel @param name @param from @param to @return """ Preconditions.checkArgument...
java
static Partition createRangePartition(SqlgGraph sqlgGraph, AbstractLabel abstractLabel, String name, String from, String to) { Preconditions.checkArgument(!abstractLabel.getSchema().isSqlgSchema(), "createRangePartition may not be called for \"%s\"", Topology.SQLG_SCHEMA); Partition partition = new Part...
[ "static", "Partition", "createRangePartition", "(", "SqlgGraph", "sqlgGraph", ",", "AbstractLabel", "abstractLabel", ",", "String", "name", ",", "String", "from", ",", "String", "to", ")", "{", "Preconditions", ".", "checkArgument", "(", "!", "abstractLabel", ".",...
Create a range partition on an {@link AbstractLabel} @param sqlgGraph @param abstractLabel @param name @param from @param to @return
[ "Create", "a", "range", "partition", "on", "an", "{", "@link", "AbstractLabel", "}" ]
train
https://github.com/pietermartin/sqlg/blob/c1845a1b31328a5ffda646873b0369ee72af56a7/sqlg-core/src/main/java/org/umlg/sqlg/structure/topology/Partition.java#L194-L213
cache2k/cache2k
cache2k-core/src/main/java/org/cache2k/core/HeapCache.java
HeapCache.resiliencePolicyException
private void resiliencePolicyException(final Entry<K, V> e, final long t0, final long t, Throwable _exception) { """ Exception from the resilience policy. We have two exceptions now. One from the loader or the expiry policy, one from the resilience policy. We propagate the more severe one from the resilience poli...
java
private void resiliencePolicyException(final Entry<K, V> e, final long t0, final long t, Throwable _exception) { ExceptionWrapper<K> _value = new ExceptionWrapper(extractKeyObj(e), _exception, t0, e); insert(e, (V) _value, t0, t, t0, INSERT_STAT_LOAD, 0); }
[ "private", "void", "resiliencePolicyException", "(", "final", "Entry", "<", "K", ",", "V", ">", "e", ",", "final", "long", "t0", ",", "final", "long", "t", ",", "Throwable", "_exception", ")", "{", "ExceptionWrapper", "<", "K", ">", "_value", "=", "new",...
Exception from the resilience policy. We have two exceptions now. One from the loader or the expiry policy, one from the resilience policy. We propagate the more severe one from the resilience policy.
[ "Exception", "from", "the", "resilience", "policy", ".", "We", "have", "two", "exceptions", "now", ".", "One", "from", "the", "loader", "or", "the", "expiry", "policy", "one", "from", "the", "resilience", "policy", ".", "We", "propagate", "the", "more", "s...
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-core/src/main/java/org/cache2k/core/HeapCache.java#L1445-L1448
vipshop/vjtools
vjkit/src/main/java/com/vip/vjtools/vjkit/base/ExceptionUtil.java
ExceptionUtil.setStackTrace
public static <T extends Throwable> T setStackTrace(@NotNull T throwable, Class<?> throwClass, String throwClazz) { """ copy from Netty, 为静态异常设置StackTrace. 对某些已知且经常抛出的异常, 不需要每次创建异常类并很消耗性能的并生成完整的StackTrace. 此时可使用静态声明的异常. 如果异常可能在多个地方抛出,使用本函数设置抛出的类名和方法名. <pre> private static RuntimeException TIMEOUT_EXCEPTI...
java
public static <T extends Throwable> T setStackTrace(@NotNull T throwable, Class<?> throwClass, String throwClazz) { throwable.setStackTrace( new StackTraceElement[] { new StackTraceElement(throwClass.getName(), throwClazz, null, -1) }); return throwable; }
[ "public", "static", "<", "T", "extends", "Throwable", ">", "T", "setStackTrace", "(", "@", "NotNull", "T", "throwable", ",", "Class", "<", "?", ">", "throwClass", ",", "String", "throwClazz", ")", "{", "throwable", ".", "setStackTrace", "(", "new", "StackT...
copy from Netty, 为静态异常设置StackTrace. 对某些已知且经常抛出的异常, 不需要每次创建异常类并很消耗性能的并生成完整的StackTrace. 此时可使用静态声明的异常. 如果异常可能在多个地方抛出,使用本函数设置抛出的类名和方法名. <pre> private static RuntimeException TIMEOUT_EXCEPTION = ExceptionUtil.setStackTrace(new RuntimeException("Timeout"), MyClass.class, "mymethod"); </pre>
[ "copy", "from", "Netty", "为静态异常设置StackTrace", "." ]
train
https://github.com/vipshop/vjtools/blob/60c743da35913d72f37f2d79afa90ad2bf73cb89/vjkit/src/main/java/com/vip/vjtools/vjkit/base/ExceptionUtil.java#L191-L195
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/Table.java
Table.setCellMerge
@Deprecated public void setCellMerge(final String pos, final int rowMerge, final int columnMerge) throws FastOdsException, IOException { """ Set the merging of multiple cells to one cell. @param pos The cell position e.g. 'A1' @param rowMerge the number of rows to merge @param col...
java
@Deprecated public void setCellMerge(final String pos, final int rowMerge, final int columnMerge) throws FastOdsException, IOException { this.builder.setCellMerge(this, this.appender, pos, rowMerge, columnMerge); }
[ "@", "Deprecated", "public", "void", "setCellMerge", "(", "final", "String", "pos", ",", "final", "int", "rowMerge", ",", "final", "int", "columnMerge", ")", "throws", "FastOdsException", ",", "IOException", "{", "this", ".", "builder", ".", "setCellMerge", "(...
Set the merging of multiple cells to one cell. @param pos The cell position e.g. 'A1' @param rowMerge the number of rows to merge @param columnMerge the number of cells to merge @throws FastOdsException if the row index or the col index is negative @throws IOException if the cells can't be merged
[ "Set", "the", "merging", "of", "multiple", "cells", "to", "one", "cell", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Table.java#L266-L270
google/closure-templates
java/src/com/google/template/soy/internal/proto/JavaQualifiedNames.java
JavaQualifiedNames.hasConflictingClassName
private static boolean hasConflictingClassName(DescriptorProto messageDesc, String name) { """ Used by the other overload, descends recursively into messages. """ if (name.equals(messageDesc.getName())) { return true; } for (EnumDescriptorProto enumDesc : messageDesc.getEnumTypeList()) { ...
java
private static boolean hasConflictingClassName(DescriptorProto messageDesc, String name) { if (name.equals(messageDesc.getName())) { return true; } for (EnumDescriptorProto enumDesc : messageDesc.getEnumTypeList()) { if (name.equals(enumDesc.getName())) { return true; } } f...
[ "private", "static", "boolean", "hasConflictingClassName", "(", "DescriptorProto", "messageDesc", ",", "String", "name", ")", "{", "if", "(", "name", ".", "equals", "(", "messageDesc", ".", "getName", "(", ")", ")", ")", "{", "return", "true", ";", "}", "f...
Used by the other overload, descends recursively into messages.
[ "Used", "by", "the", "other", "overload", "descends", "recursively", "into", "messages", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/internal/proto/JavaQualifiedNames.java#L298-L313
fommil/matrix-toolkits-java
src/main/java/no/uib/cipr/matrix/KR.java
KR.checkKhatriRaoArguments
private static void checkKhatriRaoArguments(Matrix A, Matrix B) { """ Tests if the matrices have an equal number of columns. @param A @param B """ if (A.numColumns() != B.numColumns()) throw new IndexOutOfBoundsException( "A.numColumns != B.numColumns (" + A.numColum...
java
private static void checkKhatriRaoArguments(Matrix A, Matrix B) { if (A.numColumns() != B.numColumns()) throw new IndexOutOfBoundsException( "A.numColumns != B.numColumns (" + A.numColumns() + " != " + B.numColumns() + ")"); }
[ "private", "static", "void", "checkKhatriRaoArguments", "(", "Matrix", "A", ",", "Matrix", "B", ")", "{", "if", "(", "A", ".", "numColumns", "(", ")", "!=", "B", ".", "numColumns", "(", ")", ")", "throw", "new", "IndexOutOfBoundsException", "(", "\"A.numCo...
Tests if the matrices have an equal number of columns. @param A @param B
[ "Tests", "if", "the", "matrices", "have", "an", "equal", "number", "of", "columns", "." ]
train
https://github.com/fommil/matrix-toolkits-java/blob/6157618bc86bcda3749af2a60bf869d8f3292960/src/main/java/no/uib/cipr/matrix/KR.java#L41-L46
netty/netty
handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java
AbstractTrafficShapingHandler.configure
public void configure(long newWriteLimit, long newReadLimit) { """ Change the underlying limitations. <p>Note the change will be taken as best effort, meaning that all already scheduled traffics will not be changed, but only applied to new traffics.</p> <p>So the expected usage of this method is to be used not...
java
public void configure(long newWriteLimit, long newReadLimit) { writeLimit = newWriteLimit; readLimit = newReadLimit; if (trafficCounter != null) { trafficCounter.resetAccounting(TrafficCounter.milliSecondFromNano()); } }
[ "public", "void", "configure", "(", "long", "newWriteLimit", ",", "long", "newReadLimit", ")", "{", "writeLimit", "=", "newWriteLimit", ";", "readLimit", "=", "newReadLimit", ";", "if", "(", "trafficCounter", "!=", "null", ")", "{", "trafficCounter", ".", "res...
Change the underlying limitations. <p>Note the change will be taken as best effort, meaning that all already scheduled traffics will not be changed, but only applied to new traffics.</p> <p>So the expected usage of this method is to be used not too often, accordingly to the traffic shaping configuration.</p> @param ne...
[ "Change", "the", "underlying", "limitations", ".", "<p", ">", "Note", "the", "change", "will", "be", "taken", "as", "best", "effort", "meaning", "that", "all", "already", "scheduled", "traffics", "will", "not", "be", "changed", "but", "only", "applied", "to"...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java#L253-L259
jayantk/jklol
src/com/jayantkrish/jklol/preprocessing/FeatureStandardizer.java
FeatureStandardizer.centerFeatures
public static DiscreteFactor centerFeatures(DiscreteFactor featureFactor, int featureVariableNum) { """ Computes the empirical mean of the features in {@code featureFactor}, then subtracts that mean from each feature. @param featureFactor @param featureVariableNum @return """ return featureFactor.add...
java
public static DiscreteFactor centerFeatures(DiscreteFactor featureFactor, int featureVariableNum) { return featureFactor.add(getMeans(featureFactor, featureVariableNum).product(-1.0)).coerceToDiscrete(); }
[ "public", "static", "DiscreteFactor", "centerFeatures", "(", "DiscreteFactor", "featureFactor", ",", "int", "featureVariableNum", ")", "{", "return", "featureFactor", ".", "add", "(", "getMeans", "(", "featureFactor", ",", "featureVariableNum", ")", ".", "product", ...
Computes the empirical mean of the features in {@code featureFactor}, then subtracts that mean from each feature. @param featureFactor @param featureVariableNum @return
[ "Computes", "the", "empirical", "mean", "of", "the", "features", "in", "{", "@code", "featureFactor", "}", "then", "subtracts", "that", "mean", "from", "each", "feature", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/preprocessing/FeatureStandardizer.java#L214-L216
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonServiceDocumentWriter.java
JsonServiceDocumentWriter.writeKind
private void writeKind(JsonGenerator jsonGenerator, Object entity) throws IOException { """ Writes the kind of the entity. @param jsonGenerator jsonGenerator @param entity entity from the container """ jsonGenerator.writeFieldName(KIND); if (entity instanceof EntitySet) { ...
java
private void writeKind(JsonGenerator jsonGenerator, Object entity) throws IOException { jsonGenerator.writeFieldName(KIND); if (entity instanceof EntitySet) { jsonGenerator.writeObject(ENTITY_SET); } else { jsonGenerator.writeObject(SINGLETON); } }
[ "private", "void", "writeKind", "(", "JsonGenerator", "jsonGenerator", ",", "Object", "entity", ")", "throws", "IOException", "{", "jsonGenerator", ".", "writeFieldName", "(", "KIND", ")", ";", "if", "(", "entity", "instanceof", "EntitySet", ")", "{", "jsonGener...
Writes the kind of the entity. @param jsonGenerator jsonGenerator @param entity entity from the container
[ "Writes", "the", "kind", "of", "the", "entity", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonServiceDocumentWriter.java#L138-L145
reactor/reactor-netty
src/main/java/reactor/netty/ByteBufFlux.java
ByteBufFlux.asByteArray
public final Flux<byte[]> asByteArray() { """ Convert to a {@literal byte[]} inbound {@link Flux} @return a {@literal byte[]} inbound {@link Flux} """ return handle((bb, sink) -> { try { byte[] bytes = new byte[bb.readableBytes()]; bb.readBytes(bytes); sink.next(bytes); } catch (Illeg...
java
public final Flux<byte[]> asByteArray() { return handle((bb, sink) -> { try { byte[] bytes = new byte[bb.readableBytes()]; bb.readBytes(bytes); sink.next(bytes); } catch (IllegalReferenceCountException e) { sink.complete(); } }); }
[ "public", "final", "Flux", "<", "byte", "[", "]", ">", "asByteArray", "(", ")", "{", "return", "handle", "(", "(", "bb", ",", "sink", ")", "->", "{", "try", "{", "byte", "[", "]", "bytes", "=", "new", "byte", "[", "bb", ".", "readableBytes", "(",...
Convert to a {@literal byte[]} inbound {@link Flux} @return a {@literal byte[]} inbound {@link Flux}
[ "Convert", "to", "a", "{", "@literal", "byte", "[]", "}", "inbound", "{", "@link", "Flux", "}" ]
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/ByteBufFlux.java#L196-L207
banq/jdonframework
JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/handler/XmlModelHandler.java
XmlModelHandler.initModelIF
public Object initModelIF(EventModel em, ModelForm form, ServletContext scontext) throws Exception { """ if your application need initialize the ModelForm, this method is a option. extends thie method. """ Object result = null; try { HandlerMetaDef hm = this.modelMapping.getHandlerMetaDef(); Str...
java
public Object initModelIF(EventModel em, ModelForm form, ServletContext scontext) throws Exception { Object result = null; try { HandlerMetaDef hm = this.modelMapping.getHandlerMetaDef(); String serviceName = hm.getServiceRef(); Debug.logVerbose("[JdonFramework] construct the CRUD method for the servi...
[ "public", "Object", "initModelIF", "(", "EventModel", "em", ",", "ModelForm", "form", ",", "ServletContext", "scontext", ")", "throws", "Exception", "{", "Object", "result", "=", "null", ";", "try", "{", "HandlerMetaDef", "hm", "=", "this", ".", "modelMapping"...
if your application need initialize the ModelForm, this method is a option. extends thie method.
[ "if", "your", "application", "need", "initialize", "the", "ModelForm", "this", "method", "is", "a", "option", ".", "extends", "thie", "method", "." ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/handler/XmlModelHandler.java#L142-L158
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java
DocTreeScanner.visitUses
@Override public R visitUses(UsesTree node, P p) { """ {@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning """ R r = scan(node.getServiceType(), p); r = scanAndReduce(node.getDesc...
java
@Override public R visitUses(UsesTree node, P p) { R r = scan(node.getServiceType(), p); r = scanAndReduce(node.getDescription(), p, r); return r; }
[ "@", "Override", "public", "R", "visitUses", "(", "UsesTree", "node", ",", "P", "p", ")", "{", "R", "r", "=", "scan", "(", "node", ".", "getServiceType", "(", ")", ",", "p", ")", ";", "r", "=", "scanAndReduce", "(", "node", ".", "getDescription", "...
{@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning
[ "{", "@inheritDoc", "}", "This", "implementation", "scans", "the", "children", "in", "left", "to", "right", "order", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java#L497-L502
git-commit-id/maven-git-commit-id-plugin
src/main/java/pl/project13/maven/git/GitDataProvider.java
GitDataProvider.determineBranchName
protected String determineBranchName(@Nonnull Map<String, String> env) throws GitCommitIdExecutionException { """ If running within Jenkins/Hudson, honor the branch name passed via GIT_BRANCH env var. This is necessary because Jenkins/Hudson always invoke build in a detached head state. @param env environment ...
java
protected String determineBranchName(@Nonnull Map<String, String> env) throws GitCommitIdExecutionException { BuildServerDataProvider buildServerDataProvider = BuildServerDataProvider.getBuildServerProvider(env,log); if (useBranchNameFromBuildEnvironment && !(buildServerDataProvider instanceof UnknownBuildServe...
[ "protected", "String", "determineBranchName", "(", "@", "Nonnull", "Map", "<", "String", ",", "String", ">", "env", ")", "throws", "GitCommitIdExecutionException", "{", "BuildServerDataProvider", "buildServerDataProvider", "=", "BuildServerDataProvider", ".", "getBuildSer...
If running within Jenkins/Hudson, honor the branch name passed via GIT_BRANCH env var. This is necessary because Jenkins/Hudson always invoke build in a detached head state. @param env environment settings @return results of getBranchName() or, if in Jenkins/Hudson, value of GIT_BRANCH
[ "If", "running", "within", "Jenkins", "/", "Hudson", "honor", "the", "branch", "name", "passed", "via", "GIT_BRANCH", "env", "var", ".", "This", "is", "necessary", "because", "Jenkins", "/", "Hudson", "always", "invoke", "build", "in", "a", "detached", "head...
train
https://github.com/git-commit-id/maven-git-commit-id-plugin/blob/a276551fb043d1b7fc4c890603f6ea0c79dc729a/src/main/java/pl/project13/maven/git/GitDataProvider.java#L205-L217
mfornos/humanize
humanize-icu/src/main/java/humanize/ICUHumanize.java
ICUHumanize.smartDateFormat
public static String smartDateFormat(final Date value, final String skeleton, final Locale locale) { """ <p> Same as {@link #smartDateFormat(Date) smartDateFormat} for the specified locale. </p> @param value The date to be formatted @param skeleton A pattern containing only the variable fields. For exampl...
java
public static String smartDateFormat(final Date value, final String skeleton, final Locale locale) { return withinLocale(new Callable<String>() { public String call() throws Exception { return smartDateFormat(value, skeleton); } }, locale);...
[ "public", "static", "String", "smartDateFormat", "(", "final", "Date", "value", ",", "final", "String", "skeleton", ",", "final", "Locale", "locale", ")", "{", "return", "withinLocale", "(", "new", "Callable", "<", "String", ">", "(", ")", "{", "public", "...
<p> Same as {@link #smartDateFormat(Date) smartDateFormat} for the specified locale. </p> @param value The date to be formatted @param skeleton A pattern containing only the variable fields. For example, "MMMdd" and "mmhh" are skeletons. @param locale Target locale @return A string with a text representation of the da...
[ "<p", ">", "Same", "as", "{", "@link", "#smartDateFormat", "(", "Date", ")", "smartDateFormat", "}", "for", "the", "specified", "locale", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-icu/src/main/java/humanize/ICUHumanize.java#L1604-L1613
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.setTranslation
public Matrix4f setTranslation(float x, float y, float z) { """ Set only the translation components <code>(m30, m31, m32)</code> of this matrix to the given values <code>(x, y, z)</code>. <p> Note that this will only work properly for orthogonal matrices (without any perspective). <p> To build a translation ma...
java
public Matrix4f setTranslation(float x, float y, float z) { this._m30(x); this._m31(y); this._m32(z); properties &= ~(PROPERTY_PERSPECTIVE | PROPERTY_IDENTITY); return this; }
[ "public", "Matrix4f", "setTranslation", "(", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "this", ".", "_m30", "(", "x", ")", ";", "this", ".", "_m31", "(", "y", ")", ";", "this", ".", "_m32", "(", "z", ")", ";", "properties", ...
Set only the translation components <code>(m30, m31, m32)</code> of this matrix to the given values <code>(x, y, z)</code>. <p> Note that this will only work properly for orthogonal matrices (without any perspective). <p> To build a translation matrix instead, use {@link #translation(float, float, float)}. To apply a t...
[ "Set", "only", "the", "translation", "components", "<code", ">", "(", "m30", "m31", "m32", ")", "<", "/", "code", ">", "of", "this", "matrix", "to", "the", "given", "values", "<code", ">", "(", "x", "y", "z", ")", "<", "/", "code", ">", ".", "<p"...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L2929-L2935