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
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionSpecificationOptionValuePersistenceImpl.java
CPDefinitionSpecificationOptionValuePersistenceImpl.findAll
@Override public List<CPDefinitionSpecificationOptionValue> findAll() { """ Returns all the cp definition specification option values. @return the cp definition specification option values """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CPDefinitionSpecificationOptionValue> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CPDefinitionSpecificationOptionValue", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the cp definition specification option values. @return the cp definition specification option values
[ "Returns", "all", "the", "cp", "definition", "specification", "option", "values", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionSpecificationOptionValuePersistenceImpl.java#L5853-L5856
sarl/sarl
docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java
Utils.findFirst
public static <T extends ProgramElementDoc> T findFirst(T[] original, boolean ignoreHidden, Predicate<T> filter) { """ Find the first element into the given array. @param <T> the type of the elements to filter. @param original the original array. @param ignoreHidden indicates if the hidden elements should be ...
java
public static <T extends ProgramElementDoc> T findFirst(T[] original, boolean ignoreHidden, Predicate<T> filter) { for (final T element : original) { if (!ignoreHidden || !isHiddenMember(element.name())) { if (filter.test(element)) { return element; } } } return null; }
[ "public", "static", "<", "T", "extends", "ProgramElementDoc", ">", "T", "findFirst", "(", "T", "[", "]", "original", ",", "boolean", "ignoreHidden", ",", "Predicate", "<", "T", ">", "filter", ")", "{", "for", "(", "final", "T", "element", ":", "original"...
Find the first element into the given array. @param <T> the type of the elements to filter. @param original the original array. @param ignoreHidden indicates if the hidden elements should be ignored. @param filter the filtering action. @return the first element.
[ "Find", "the", "first", "element", "into", "the", "given", "array", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java#L170-L179
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDK.java
ActorSDK.startSettingActivity
public void startSettingActivity(Context context, Bundle extras) { """ Method is used internally for starting default activity or activity added in delegate @param context current context @param extras activity extras """ if (!startDelegateActivity(context, delegate.getSettingsIntent(), extras)) {...
java
public void startSettingActivity(Context context, Bundle extras) { if (!startDelegateActivity(context, delegate.getSettingsIntent(), extras)) { startActivity(context, extras, MyProfileActivity.class); } }
[ "public", "void", "startSettingActivity", "(", "Context", "context", ",", "Bundle", "extras", ")", "{", "if", "(", "!", "startDelegateActivity", "(", "context", ",", "delegate", ".", "getSettingsIntent", "(", ")", ",", "extras", ")", ")", "{", "startActivity",...
Method is used internally for starting default activity or activity added in delegate @param context current context @param extras activity extras
[ "Method", "is", "used", "internally", "for", "starting", "default", "activity", "or", "activity", "added", "in", "delegate" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/ActorSDK.java#L954-L958
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java
DocBookBuilder.buildBook
public HashMap<String, byte[]> buildBook(final ContentSpec contentSpec, final String requester, final DocBookBuildingOptions buildingOptions, final Map<String, byte[]> overrideFiles) throws BuilderCreationException, BuildProcessingException { """ Builds a DocBook Formatted Book using a Cont...
java
public HashMap<String, byte[]> buildBook(final ContentSpec contentSpec, final String requester, final DocBookBuildingOptions buildingOptions, final Map<String, byte[]> overrideFiles) throws BuilderCreationException, BuildProcessingException { return buildBook(contentSpec, requester, buil...
[ "public", "HashMap", "<", "String", ",", "byte", "[", "]", ">", "buildBook", "(", "final", "ContentSpec", "contentSpec", ",", "final", "String", "requester", ",", "final", "DocBookBuildingOptions", "buildingOptions", ",", "final", "Map", "<", "String", ",", "b...
Builds a DocBook Formatted Book using a Content Specification to define the structure and contents of the book. @param contentSpec The content specification to build from. @param requester The user who requested the build. @param buildingOptions The options to be used when building. @param overrideFiles @ret...
[ "Builds", "a", "DocBook", "Formatted", "Book", "using", "a", "Content", "Specification", "to", "define", "the", "structure", "and", "contents", "of", "the", "book", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/DocBookBuilder.java#L422-L426
albfernandez/itext2
src/main/java/com/lowagie/text/xml/simpleparser/SimpleXMLParser.java
SimpleXMLParser.escapeXML
public static String escapeXML(String s, boolean onlyASCII) { """ Escapes a string with the appropriated XML codes. @param s the string to be escaped @param onlyASCII codes above 127 will always be escaped with &amp;#nn; if <CODE>true</CODE> @return the escaped string """ char cc[] = s.toCharArray()...
java
public static String escapeXML(String s, boolean onlyASCII) { char cc[] = s.toCharArray(); int len = cc.length; StringBuffer sb = new StringBuffer(); for (int k = 0; k < len; ++k) { int c = cc[k]; switch (c) { case '<': sb.appen...
[ "public", "static", "String", "escapeXML", "(", "String", "s", ",", "boolean", "onlyASCII", ")", "{", "char", "cc", "[", "]", "=", "s", ".", "toCharArray", "(", ")", ";", "int", "len", "=", "cc", ".", "length", ";", "StringBuffer", "sb", "=", "new", ...
Escapes a string with the appropriated XML codes. @param s the string to be escaped @param onlyASCII codes above 127 will always be escaped with &amp;#nn; if <CODE>true</CODE> @return the escaped string
[ "Escapes", "a", "string", "with", "the", "appropriated", "XML", "codes", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/xml/simpleparser/SimpleXMLParser.java#L657-L692
groovy/groovy-core
subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
Sql.eachRow
public void eachRow(String sql, Closure metaClosure, Closure rowClosure) throws SQLException { """ Performs the given SQL query calling the given <code>rowClosure</code> with each row of the result set. The row will be a <code>GroovyResultSet</code> which is a <code>ResultSet</code> that supports accessing the ...
java
public void eachRow(String sql, Closure metaClosure, Closure rowClosure) throws SQLException { eachRow(sql, metaClosure, 0, 0, rowClosure); }
[ "public", "void", "eachRow", "(", "String", "sql", ",", "Closure", "metaClosure", ",", "Closure", "rowClosure", ")", "throws", "SQLException", "{", "eachRow", "(", "sql", ",", "metaClosure", ",", "0", ",", "0", ",", "rowClosure", ")", ";", "}" ]
Performs the given SQL query calling the given <code>rowClosure</code> with each row of the result set. The row will be a <code>GroovyResultSet</code> which is a <code>ResultSet</code> that supports accessing the fields using property style notation and ordinal index values. In addition, the <code>metaClosure</code> wi...
[ "Performs", "the", "given", "SQL", "query", "calling", "the", "given", "<code", ">", "rowClosure<", "/", "code", ">", "with", "each", "row", "of", "the", "result", "set", ".", "The", "row", "will", "be", "a", "<code", ">", "GroovyResultSet<", "/", "code"...
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L1150-L1152
amaembo/streamex
src/main/java/one/util/streamex/DoubleStreamEx.java
DoubleStreamEx.maxByInt
public OptionalDouble maxByInt(DoubleToIntFunction keyExtractor) { """ Returns the maximum element of this stream according to the provided key extractor function. <p> This is a terminal operation. @param keyExtractor a non-interfering, stateless function @return an {@code OptionalDouble} describing the f...
java
public OptionalDouble maxByInt(DoubleToIntFunction keyExtractor) { return collect(PrimitiveBox::new, (box, d) -> { int key = keyExtractor.applyAsInt(d); if (!box.b || box.i < key) { box.b = true; box.i = key; box.d = d; }...
[ "public", "OptionalDouble", "maxByInt", "(", "DoubleToIntFunction", "keyExtractor", ")", "{", "return", "collect", "(", "PrimitiveBox", "::", "new", ",", "(", "box", ",", "d", ")", "->", "{", "int", "key", "=", "keyExtractor", ".", "applyAsInt", "(", "d", ...
Returns the maximum element of this stream according to the provided key extractor function. <p> This is a terminal operation. @param keyExtractor a non-interfering, stateless function @return an {@code OptionalDouble} describing the first element of this stream for which the highest value was returned by key extract...
[ "Returns", "the", "maximum", "element", "of", "this", "stream", "according", "to", "the", "provided", "key", "extractor", "function", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/DoubleStreamEx.java#L1028-L1037
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/run/Closer.java
Closer.closeOne
public static void closeOne(String correlationId, Object component) throws ApplicationException { """ Closes specific component. To be closed components must implement ICloseable interface. If they don't the call to this method has no effect. @param correlationId (optional) transaction id to trace execution...
java
public static void closeOne(String correlationId, Object component) throws ApplicationException { if (component instanceof IClosable) ((IClosable) component).close(correlationId); }
[ "public", "static", "void", "closeOne", "(", "String", "correlationId", ",", "Object", "component", ")", "throws", "ApplicationException", "{", "if", "(", "component", "instanceof", "IClosable", ")", "(", "(", "IClosable", ")", "component", ")", ".", "close", ...
Closes specific component. To be closed components must implement ICloseable interface. If they don't the call to this method has no effect. @param correlationId (optional) transaction id to trace execution through call chain. @param component the component that is to be closed. @throws ApplicationException when ...
[ "Closes", "specific", "component", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/run/Closer.java#L24-L28
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/list/primitive/IntInterval.java
IntInterval.oneToBy
public static IntInterval oneToBy(int count, int step) { """ Returns an IntInterval starting from 1 to the specified count value with a step value of step. """ if (count < 1) { throw new IllegalArgumentException("Only positive ranges allowed using oneToBy"); } return...
java
public static IntInterval oneToBy(int count, int step) { if (count < 1) { throw new IllegalArgumentException("Only positive ranges allowed using oneToBy"); } return IntInterval.fromToBy(1, count, step); }
[ "public", "static", "IntInterval", "oneToBy", "(", "int", "count", ",", "int", "step", ")", "{", "if", "(", "count", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Only positive ranges allowed using oneToBy\"", ")", ";", "}", "return", ...
Returns an IntInterval starting from 1 to the specified count value with a step value of step.
[ "Returns", "an", "IntInterval", "starting", "from", "1", "to", "the", "specified", "count", "value", "with", "a", "step", "value", "of", "step", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/list/primitive/IntInterval.java#L137-L144
jqno/equalsverifier
src/main/java/nl/jqno/equalsverifier/EqualsVerifierApi.java
EqualsVerifierApi.withOnlyTheseFields
public EqualsVerifierApi<T> withOnlyTheseFields(String... fields) { """ Signals that all given fields, and <em>only</em> the given fields, are relevant for the {@code equals} contract. {@code EqualsVerifier} will fail if one of these fields does not affect the outcome of {@code equals}, and it will fail if a fi...
java
public EqualsVerifierApi<T> withOnlyTheseFields(String... fields) { return withFieldsAddedAndValidated(allIncludedFields, Arrays.asList(fields)); }
[ "public", "EqualsVerifierApi", "<", "T", ">", "withOnlyTheseFields", "(", "String", "...", "fields", ")", "{", "return", "withFieldsAddedAndValidated", "(", "allIncludedFields", ",", "Arrays", ".", "asList", "(", "fields", ")", ")", ";", "}" ]
Signals that all given fields, and <em>only</em> the given fields, are relevant for the {@code equals} contract. {@code EqualsVerifier} will fail if one of these fields does not affect the outcome of {@code equals}, and it will fail if a field that isn't listed here, does affect the outcome of {@code equals}. @param f...
[ "Signals", "that", "all", "given", "fields", "and", "<em", ">", "only<", "/", "em", ">", "the", "given", "fields", "are", "relevant", "for", "the", "{", "@code", "equals", "}", "contract", ".", "{", "@code", "EqualsVerifier", "}", "will", "fail", "if", ...
train
https://github.com/jqno/equalsverifier/blob/25d73c9cb801c8b20b257d1d1283ac6e0585ef1d/src/main/java/nl/jqno/equalsverifier/EqualsVerifierApi.java#L169-L171
sagiegurari/fax4j
src/main/java/org/fax4j/spi/mac/MacFaxClientSpi.java
MacFaxClientSpi.executeProcess
protected ProcessOutput executeProcess(String command,FaxActionType faxActionType) { """ This function executes the external command to send the fax. @param command The command to execute @param faxActionType The fax action type @return The process output """ //execute process Proce...
java
protected ProcessOutput executeProcess(String command,FaxActionType faxActionType) { //execute process ProcessOutput processOutput=ProcessExecutorHelper.executeProcess(this,command); //validate process output this.processOutputValidator.validateProcessOutput(this,processOutput,faxAc...
[ "protected", "ProcessOutput", "executeProcess", "(", "String", "command", ",", "FaxActionType", "faxActionType", ")", "{", "//execute process", "ProcessOutput", "processOutput", "=", "ProcessExecutorHelper", ".", "executeProcess", "(", "this", ",", "command", ")", ";", ...
This function executes the external command to send the fax. @param command The command to execute @param faxActionType The fax action type @return The process output
[ "This", "function", "executes", "the", "external", "command", "to", "send", "the", "fax", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/mac/MacFaxClientSpi.java#L304-L313
jeremybrooks/jinx
src/main/java/net/jeremybrooks/jinx/api/PeopleApi.java
PeopleApi.getPublicGroups
public Groups getPublicGroups(String userId, Boolean invitationOnly, boolean sign) throws JinxException { """ Returns the list of public groups a user is a member of. <br> This method does not require authentication. @param userId (Required) The userId of the user to fetch groups for. @param invitati...
java
public Groups getPublicGroups(String userId, Boolean invitationOnly, boolean sign) throws JinxException { JinxUtils.validateParams(userId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.people.getPublicGroups"); params.put("user_id", userId); if (invitationOnly != null) ...
[ "public", "Groups", "getPublicGroups", "(", "String", "userId", ",", "Boolean", "invitationOnly", ",", "boolean", "sign", ")", "throws", "JinxException", "{", "JinxUtils", ".", "validateParams", "(", "userId", ")", ";", "Map", "<", "String", ",", "String", ">"...
Returns the list of public groups a user is a member of. <br> This method does not require authentication. @param userId (Required) The userId of the user to fetch groups for. @param invitationOnly (Optional) Include public groups that require an invitation or administrator approval to join. @param sign ...
[ "Returns", "the", "list", "of", "public", "groups", "a", "user", "is", "a", "member", "of", ".", "<br", ">", "This", "method", "does", "not", "require", "authentication", "." ]
train
https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PeopleApi.java#L260-L269
aws/aws-sdk-java
aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/ListTagsResult.java
ListTagsResult.withTags
public ListTagsResult withTags(java.util.Map<String, String> tags) { """ <p> A set of key-value pairs that contain tag keys and tag values that are attached to a stack or layer. </p> @param tags A set of key-value pairs that contain tag keys and tag values that are attached to a stack or layer. @return Retu...
java
public ListTagsResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "ListTagsResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> A set of key-value pairs that contain tag keys and tag values that are attached to a stack or layer. </p> @param tags A set of key-value pairs that contain tag keys and tag values that are attached to a stack or layer. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "A", "set", "of", "key", "-", "value", "pairs", "that", "contain", "tag", "keys", "and", "tag", "values", "that", "are", "attached", "to", "a", "stack", "or", "layer", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/ListTagsResult.java#L82-L85
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Pixel.java
Pixel.getGrey
public static final int getGrey(final int color, final int redWeight, final int greenWeight, final int blueWeight) { """ Calculates a grey value from an RGB or ARGB value using specified weights for each R,G and B channel. <p> Weights are integer values so normalized weights need to be converted beforehand. E....
java
public static final int getGrey(final int color, final int redWeight, final int greenWeight, final int blueWeight){ return (r(color)*redWeight + g(color)*greenWeight + b(color)*blueWeight)/(redWeight+blueWeight+greenWeight); }
[ "public", "static", "final", "int", "getGrey", "(", "final", "int", "color", ",", "final", "int", "redWeight", ",", "final", "int", "greenWeight", ",", "final", "int", "blueWeight", ")", "{", "return", "(", "r", "(", "color", ")", "*", "redWeight", "+", ...
Calculates a grey value from an RGB or ARGB value using specified weights for each R,G and B channel. <p> Weights are integer values so normalized weights need to be converted beforehand. E.g. normalized weights (0.33, 0.62, 0.05) would be have to be converted to integer weights (33, 62, 5). <p> When using weights with...
[ "Calculates", "a", "grey", "value", "from", "an", "RGB", "or", "ARGB", "value", "using", "specified", "weights", "for", "each", "R", "G", "and", "B", "channel", ".", "<p", ">", "Weights", "are", "integer", "values", "so", "normalized", "weights", "need", ...
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Pixel.java#L596-L598
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/engine/QuerySources.java
QuerySources.sharedNodesFilter
protected NodeFilter sharedNodesFilter() { """ Creates a node filter which doesn't include any of the nodes from the shared set in the query result. This is per JSR-283/#14.16: if a query matches a descendant node of a shared set, it appears in query results only once. @return a new {@link org.modeshape.jcr.ca...
java
protected NodeFilter sharedNodesFilter() { return new NodeFilter() { private final Set<NodeKey> shareableNodeKeys = new HashSet<>(); @Override public boolean includeNode( CachedNode node, NodeCache cache ) { if (nodeTyp...
[ "protected", "NodeFilter", "sharedNodesFilter", "(", ")", "{", "return", "new", "NodeFilter", "(", ")", "{", "private", "final", "Set", "<", "NodeKey", ">", "shareableNodeKeys", "=", "new", "HashSet", "<>", "(", ")", ";", "@", "Override", "public", "boolean"...
Creates a node filter which doesn't include any of the nodes from the shared set in the query result. This is per JSR-283/#14.16: if a query matches a descendant node of a shared set, it appears in query results only once. @return a new {@link org.modeshape.jcr.cache.document.NodeCacheIterator.NodeFilter} instance
[ "Creates", "a", "node", "filter", "which", "doesn", "t", "include", "any", "of", "the", "nodes", "from", "the", "shared", "set", "in", "the", "query", "result", ".", "This", "is", "per", "JSR", "-", "283", "/", "#14", ".", "16", ":", "if", "a", "qu...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/engine/QuerySources.java#L478-L507
phax/ph-web
ph-web/src/main/java/com/helger/web/fileupload/parse/AbstractFileUploadBase.java
AbstractFileUploadBase._parseHeaderLine
private static void _parseHeaderLine (@Nonnull final FileItemHeaders aHeaders, @Nonnull final String sHeader) { """ Reads the next header line. @param aHeaders String with all headers. @param sHeader Map where to store the current header. """ final int nColonOffset = sHeader.indexOf (':'); if (nC...
java
private static void _parseHeaderLine (@Nonnull final FileItemHeaders aHeaders, @Nonnull final String sHeader) { final int nColonOffset = sHeader.indexOf (':'); if (nColonOffset == -1) { // This header line is malformed, skip it. if (LOGGER.isWarnEnabled ()) LOGGER.warn ("Found malforme...
[ "private", "static", "void", "_parseHeaderLine", "(", "@", "Nonnull", "final", "FileItemHeaders", "aHeaders", ",", "@", "Nonnull", "final", "String", "sHeader", ")", "{", "final", "int", "nColonOffset", "=", "sHeader", ".", "indexOf", "(", "'", "'", ")", ";"...
Reads the next header line. @param aHeaders String with all headers. @param sHeader Map where to store the current header.
[ "Reads", "the", "next", "header", "line", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/fileupload/parse/AbstractFileUploadBase.java#L548-L561
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.ip_reverse_ipReverse_GET
public OvhReverseIp ip_reverse_ipReverse_GET(String ip, String ipReverse) throws IOException { """ Get this object properties REST: GET /ip/{ip}/reverse/{ipReverse} @param ip [required] @param ipReverse [required] """ String qPath = "/ip/{ip}/reverse/{ipReverse}"; StringBuilder sb = path(qPath, ip, ip...
java
public OvhReverseIp ip_reverse_ipReverse_GET(String ip, String ipReverse) throws IOException { String qPath = "/ip/{ip}/reverse/{ipReverse}"; StringBuilder sb = path(qPath, ip, ipReverse); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhReverseIp.class); }
[ "public", "OvhReverseIp", "ip_reverse_ipReverse_GET", "(", "String", "ip", ",", "String", "ipReverse", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/{ip}/reverse/{ipReverse}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "ip", ...
Get this object properties REST: GET /ip/{ip}/reverse/{ipReverse} @param ip [required] @param ipReverse [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L432-L437
joniles/mpxj
src/main/java/net/sf/mpxj/json/JsonStreamWriter.java
JsonStreamWriter.writeNameValuePair
public void writeNameValuePair(String name, Date value) throws IOException { """ Write a Date attribute. @param name attribute name @param value attribute value """ internalWriteNameValuePair(name, m_format.format(value)); }
java
public void writeNameValuePair(String name, Date value) throws IOException { internalWriteNameValuePair(name, m_format.format(value)); }
[ "public", "void", "writeNameValuePair", "(", "String", "name", ",", "Date", "value", ")", "throws", "IOException", "{", "internalWriteNameValuePair", "(", "name", ",", "m_format", ".", "format", "(", "value", ")", ")", ";", "}" ]
Write a Date attribute. @param name attribute name @param value attribute value
[ "Write", "a", "Date", "attribute", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/json/JsonStreamWriter.java#L195-L198
apache/flink
flink-connectors/flink-connector-kafka-0.10/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer010.java
FlinkKafkaProducer010.writeToKafkaWithTimestamps
@Deprecated public static <T> FlinkKafkaProducer010Configuration<T> writeToKafkaWithTimestamps(DataStream<T> inStream, String topicId, KeyedSerializationSchema<T> serializationSchema, Properties producerConfig) { """ Creates a FlinkKafkaProducer for a...
java
@Deprecated public static <T> FlinkKafkaProducer010Configuration<T> writeToKafkaWithTimestamps(DataStream<T> inStream, String topicId, KeyedSerializationSchema<T> serializationSchema, Properties producerConfig) { return writeToKafkaWithTimestamps(inStrea...
[ "@", "Deprecated", "public", "static", "<", "T", ">", "FlinkKafkaProducer010Configuration", "<", "T", ">", "writeToKafkaWithTimestamps", "(", "DataStream", "<", "T", ">", "inStream", ",", "String", "topicId", ",", "KeyedSerializationSchema", "<", "T", ">", "serial...
Creates a FlinkKafkaProducer for a given topic. The sink produces a DataStream to the topic. <p>This constructor allows writing timestamps to Kafka, it follow approach (b) (see above) @param inStream The stream to write to Kafka @param topicId ID of the Kafka topic. @param serializationSchema User defined serializati...
[ "Creates", "a", "FlinkKafkaProducer", "for", "a", "given", "topic", ".", "The", "sink", "produces", "a", "DataStream", "to", "the", "topic", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kafka-0.10/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer010.java#L228-L234
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/threading/QualityOfServiceBlockingQueue.java
QualityOfServiceBlockingQueue.waitForRemove
private boolean waitForRemove(long waitStart, long maxWait) throws InterruptedException { """ This MUST be called while {@link #writeLock} is locked by the current thread """ if (this.size == this.capacity) { if (!waitOnCondition(this.notFull, maxWait, waitStart)) { return f...
java
private boolean waitForRemove(long waitStart, long maxWait) throws InterruptedException { if (this.size == this.capacity) { if (!waitOnCondition(this.notFull, maxWait, waitStart)) { return false; } } return true; }
[ "private", "boolean", "waitForRemove", "(", "long", "waitStart", ",", "long", "maxWait", ")", "throws", "InterruptedException", "{", "if", "(", "this", ".", "size", "==", "this", ".", "capacity", ")", "{", "if", "(", "!", "waitOnCondition", "(", "this", "....
This MUST be called while {@link #writeLock} is locked by the current thread
[ "This", "MUST", "be", "called", "while", "{" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/utils/threading/QualityOfServiceBlockingQueue.java#L645-L653
alkacon/opencms-core
src/org/opencms/loader/CmsJspLoader.java
CmsJspLoader.updateJsp
protected String updateJsp(String vfsName, CmsFlexController controller, Set<String> updatedFiles) { """ Updates a JSP page in the "real" file system in case the VFS resource has changed based on the resource name.<p> Generates a resource based on the provided name and calls {@link #updateJsp(CmsResource, CmsFl...
java
protected String updateJsp(String vfsName, CmsFlexController controller, Set<String> updatedFiles) { String jspVfsName = CmsLinkManager.getAbsoluteUri(vfsName, controller.getCurrentRequest().getElementRootPath()); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages...
[ "protected", "String", "updateJsp", "(", "String", "vfsName", ",", "CmsFlexController", "controller", ",", "Set", "<", "String", ">", "updatedFiles", ")", "{", "String", "jspVfsName", "=", "CmsLinkManager", ".", "getAbsoluteUri", "(", "vfsName", ",", "controller",...
Updates a JSP page in the "real" file system in case the VFS resource has changed based on the resource name.<p> Generates a resource based on the provided name and calls {@link #updateJsp(CmsResource, CmsFlexController, Set)}.<p> @param vfsName the name of the JSP file resource in the VFS @param controller the contr...
[ "Updates", "a", "JSP", "page", "in", "the", "real", "file", "system", "in", "case", "the", "VFS", "resource", "has", "changed", "based", "on", "the", "resource", "name", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/loader/CmsJspLoader.java#L1654-L1684
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/http/SimpleHTTPRequestParser.java
SimpleHTTPRequestParser.updateFaxJobFromInputDataImpl
@Override protected void updateFaxJobFromInputDataImpl(HTTPRequest inputData,FaxJob faxJob) { """ This function update the fax job from the request data.<br> This fax job will not have any file data. @param inputData The input data @param faxJob The fax job to update """ //get parameters...
java
@Override protected void updateFaxJobFromInputDataImpl(HTTPRequest inputData,FaxJob faxJob) { //get parameters text as map Map<String,String> queryStringMap=this.convertParametersTextToMap(inputData); //update fax job this.updateFaxJobFromRequestImpl(inputData,faxJob,queryString...
[ "@", "Override", "protected", "void", "updateFaxJobFromInputDataImpl", "(", "HTTPRequest", "inputData", ",", "FaxJob", "faxJob", ")", "{", "//get parameters text as map", "Map", "<", "String", ",", "String", ">", "queryStringMap", "=", "this", ".", "convertParametersT...
This function update the fax job from the request data.<br> This fax job will not have any file data. @param inputData The input data @param faxJob The fax job to update
[ "This", "function", "update", "the", "fax", "job", "from", "the", "request", "data", ".", "<br", ">", "This", "fax", "job", "will", "not", "have", "any", "file", "data", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/http/SimpleHTTPRequestParser.java#L88-L96
Samsung/GearVRf
GVRf/Extensions/3DCursor/3DCursorLibrary/src/main/java/org/gearvrf/io/cursor3d/CursorManager.java
CursorManager.makeSceneSelectable
public void makeSceneSelectable(GVRScene scene) { """ Use this call to make all the {@link GVRSceneObject}s in the provided GVRScene to be selectable. <p/> In order to have more control over objects that can be made selectable make use of the {@link #addSelectableObject(GVRSceneObject)} method. <p/> Note tha...
java
public void makeSceneSelectable(GVRScene scene) { if (this.scene == scene) { //do nothing return return; } //cleanup on the currently set scene if there is one if (this.scene != null) { //false to remove updateCursorsInScene(this.scene, fa...
[ "public", "void", "makeSceneSelectable", "(", "GVRScene", "scene", ")", "{", "if", "(", "this", ".", "scene", "==", "scene", ")", "{", "//do nothing return", "return", ";", "}", "//cleanup on the currently set scene if there is one", "if", "(", "this", ".", "scene...
Use this call to make all the {@link GVRSceneObject}s in the provided GVRScene to be selectable. <p/> In order to have more control over objects that can be made selectable make use of the {@link #addSelectableObject(GVRSceneObject)} method. <p/> Note that this call will set the current scene as the provided scene. If ...
[ "Use", "this", "call", "to", "make", "all", "the", "{", "@link", "GVRSceneObject", "}", "s", "in", "the", "provided", "GVRScene", "to", "be", "selectable", ".", "<p", "/", ">", "In", "order", "to", "have", "more", "control", "over", "objects", "that", ...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/3DCursor/3DCursorLibrary/src/main/java/org/gearvrf/io/cursor3d/CursorManager.java#L534-L557
kiswanij/jk-util
src/main/java/com/jk/util/config/JKConfig.java
JKConfig.getString
public String getString(String name, String defaultValue) { """ Gets the string. @param name the name @param defaultValue the default value @return the string """ return config.getString(name, defaultValue); }
java
public String getString(String name, String defaultValue) { return config.getString(name, defaultValue); }
[ "public", "String", "getString", "(", "String", "name", ",", "String", "defaultValue", ")", "{", "return", "config", ".", "getString", "(", "name", ",", "defaultValue", ")", ";", "}" ]
Gets the string. @param name the name @param defaultValue the default value @return the string
[ "Gets", "the", "string", "." ]
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/config/JKConfig.java#L145-L147
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java
ImageModerationsImpl.matchFileInputAsync
public Observable<MatchResponse> matchFileInputAsync(byte[] imageStream, MatchFileInputOptionalParameter matchFileInputOptionalParameter) { """ Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using &lt;a href="/docs/services/578ff44d2703741568569ab9/...
java
public Observable<MatchResponse> matchFileInputAsync(byte[] imageStream, MatchFileInputOptionalParameter matchFileInputOptionalParameter) { return matchFileInputWithServiceResponseAsync(imageStream, matchFileInputOptionalParameter).map(new Func1<ServiceResponse<MatchResponse>, MatchResponse>() { @Ov...
[ "public", "Observable", "<", "MatchResponse", ">", "matchFileInputAsync", "(", "byte", "[", "]", "imageStream", ",", "MatchFileInputOptionalParameter", "matchFileInputOptionalParameter", ")", "{", "return", "matchFileInputWithServiceResponseAsync", "(", "imageStream", ",", ...
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using &lt;a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe"&gt;this&lt;/a&gt; API. Returns ID and tags of matching image.&lt;br/&gt; &lt;br/&gt; Note: Refresh Index must be...
[ "Fuzzily", "match", "an", "image", "against", "one", "of", "your", "custom", "Image", "Lists", ".", "You", "can", "create", "and", "manage", "your", "custom", "image", "lists", "using", "&lt", ";", "a", "href", "=", "/", "docs", "/", "services", "/", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java#L1978-L1985
google/closure-templates
java/src/com/google/template/soy/pysrc/internal/LocalVariableStack.java
LocalVariableStack.addVariable
LocalVariableStack addVariable(String name, PyExpr varExpression) { """ Adds a variable to the current reference frame. @param name The name of the variable as used by calling expressions. @param varExpression The underlying expression used to access the variable. @return A reference to this object. """ ...
java
LocalVariableStack addVariable(String name, PyExpr varExpression) { Preconditions.checkState(!localVarExprs.isEmpty()); localVarExprs.peek().put(name, varExpression); return this; }
[ "LocalVariableStack", "addVariable", "(", "String", "name", ",", "PyExpr", "varExpression", ")", "{", "Preconditions", ".", "checkState", "(", "!", "localVarExprs", ".", "isEmpty", "(", ")", ")", ";", "localVarExprs", ".", "peek", "(", ")", ".", "put", "(", ...
Adds a variable to the current reference frame. @param name The name of the variable as used by calling expressions. @param varExpression The underlying expression used to access the variable. @return A reference to this object.
[ "Adds", "a", "variable", "to", "the", "current", "reference", "frame", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/pysrc/internal/LocalVariableStack.java#L56-L60
jcuda/jcusparse
JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java
JCusparse.cusparseScsru2csr_bufferSizeExt
public static int cusparseScsru2csr_bufferSizeExt( cusparseHandle handle, int m, int n, int nnz, Pointer csrVal, Pointer csrRowPtr, Pointer csrColInd, csru2csrInfo info, long[] pBufferSizeInBytes) { """ Description: Wrapper th...
java
public static int cusparseScsru2csr_bufferSizeExt( cusparseHandle handle, int m, int n, int nnz, Pointer csrVal, Pointer csrRowPtr, Pointer csrColInd, csru2csrInfo info, long[] pBufferSizeInBytes) { return checkResult...
[ "public", "static", "int", "cusparseScsru2csr_bufferSizeExt", "(", "cusparseHandle", "handle", ",", "int", "m", ",", "int", "n", ",", "int", "nnz", ",", "Pointer", "csrVal", ",", "Pointer", "csrRowPtr", ",", "Pointer", "csrColInd", ",", "csru2csrInfo", "info", ...
Description: Wrapper that sorts sparse matrix stored in CSR format (without exposing the permutation).
[ "Description", ":", "Wrapper", "that", "sorts", "sparse", "matrix", "stored", "in", "CSR", "format", "(", "without", "exposing", "the", "permutation", ")", "." ]
train
https://github.com/jcuda/jcusparse/blob/7687a62a4ef6b76cb91cf7da93d4cf5ade96a791/JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java#L14284-L14296
buschmais/extended-objects
impl/src/main/java/com/buschmais/xo/impl/AbstractInstanceManager.java
AbstractInstanceManager.newInstance
private <T> T newInstance(DatastoreId id, DatastoreType datastoreType, DynamicType<?> types, TransactionalCache.Mode cacheMode) { """ Create a proxy instance which corresponds to the given datastore type. @param datastoreType The datastore type. @param <T> The instance type. @return The instance. """ ...
java
private <T> T newInstance(DatastoreId id, DatastoreType datastoreType, DynamicType<?> types, TransactionalCache.Mode cacheMode) { validateType(types); InstanceInvocationHandler invocationHandler = new InstanceInvocationHandler(datastoreType, getProxyMethodService()); T instance = proxyFactory.cr...
[ "private", "<", "T", ">", "T", "newInstance", "(", "DatastoreId", "id", ",", "DatastoreType", "datastoreType", ",", "DynamicType", "<", "?", ">", "types", ",", "TransactionalCache", ".", "Mode", "cacheMode", ")", "{", "validateType", "(", "types", ")", ";", ...
Create a proxy instance which corresponds to the given datastore type. @param datastoreType The datastore type. @param <T> The instance type. @return The instance.
[ "Create", "a", "proxy", "instance", "which", "corresponds", "to", "the", "given", "datastore", "type", "." ]
train
https://github.com/buschmais/extended-objects/blob/186431e81f3d8d26c511cfe1143dee59b03c2e7a/impl/src/main/java/com/buschmais/xo/impl/AbstractInstanceManager.java#L111-L117
SvenEwald/xmlbeam
src/main/java/org/xmlbeam/util/intern/DOMHelper.java
DOMHelper.nodeListsAreEqual
private static boolean nodeListsAreEqual(final NodeList a, final NodeList b) { """ NodelLists are equal if and only if their size is equal and the containing nodes at the same indexes are equal. @param a @param b @return """ if (a == b) { return true; } if ((a == null)...
java
private static boolean nodeListsAreEqual(final NodeList a, final NodeList b) { if (a == b) { return true; } if ((a == null) || (b == null)) { return false; } if (a.getLength() != b.getLength()) { return false; } for (int i = 0; ...
[ "private", "static", "boolean", "nodeListsAreEqual", "(", "final", "NodeList", "a", ",", "final", "NodeList", "b", ")", "{", "if", "(", "a", "==", "b", ")", "{", "return", "true", ";", "}", "if", "(", "(", "a", "==", "null", ")", "||", "(", "b", ...
NodelLists are equal if and only if their size is equal and the containing nodes at the same indexes are equal. @param a @param b @return
[ "NodelLists", "are", "equal", "if", "and", "only", "if", "their", "size", "is", "equal", "and", "the", "containing", "nodes", "at", "the", "same", "indexes", "are", "equal", "." ]
train
https://github.com/SvenEwald/xmlbeam/blob/acaac1b8fa28d246f17187f5e3c6696458a0b447/src/main/java/org/xmlbeam/util/intern/DOMHelper.java#L229-L245
openengsb/openengsb
connector/userprojectsldap/src/main/java/org/openengsb/connector/userprojects/ldap/internal/ldap/EntryFactory.java
EntryFactory.addDescriptions
private static void addDescriptions(Entry entry, String... descriptions) { """ 3 possibilities:<br> 1) description is null -> emptyFlag = false, no description attribute <br> 2) description is empty -> emptyFlag = true, no description attribute <br> 3) description exists -> no emptyFlag, description attribute e...
java
private static void addDescriptions(Entry entry, String... descriptions) { try { entry.add(SchemaConstants.OBJECT_CLASS_ATTRIBUTE, SchemaConstants.DESCRIPTIVE_OBJECT_OC); if (descriptions == null) { // case 1 entry.add(SchemaConstants.EMPTY_FLAG_ATTRIBUTE,...
[ "private", "static", "void", "addDescriptions", "(", "Entry", "entry", ",", "String", "...", "descriptions", ")", "{", "try", "{", "entry", ".", "add", "(", "SchemaConstants", ".", "OBJECT_CLASS_ATTRIBUTE", ",", "SchemaConstants", ".", "DESCRIPTIVE_OBJECT_OC", ")"...
3 possibilities:<br> 1) description is null -> emptyFlag = false, no description attribute <br> 2) description is empty -> emptyFlag = true, no description attribute <br> 3) description exists -> no emptyFlag, description attribute exists and has a value
[ "3", "possibilities", ":", "<br", ">", "1", ")", "description", "is", "null", "-", ">", "emptyFlag", "=", "false", "no", "description", "attribute", "<br", ">", "2", ")", "description", "is", "empty", "-", ">", "emptyFlag", "=", "true", "no", "descriptio...
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/connector/userprojectsldap/src/main/java/org/openengsb/connector/userprojects/ldap/internal/ldap/EntryFactory.java#L234-L251
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java
TheMovieDbApi.getEpisodeInfo
public TVEpisodeInfo getEpisodeInfo(int tvID, int seasonNumber, int episodeNumber, String language, String... appendToResponse) throws MovieDbException { """ Get the primary information about a TV episode by combination of a season and episode number. @param tvID tvID @param seasonNumber seasonNumber @param ...
java
public TVEpisodeInfo getEpisodeInfo(int tvID, int seasonNumber, int episodeNumber, String language, String... appendToResponse) throws MovieDbException { return tmdbEpisodes.getEpisodeInfo(tvID, seasonNumber, episodeNumber, language, appendToResponse); }
[ "public", "TVEpisodeInfo", "getEpisodeInfo", "(", "int", "tvID", ",", "int", "seasonNumber", ",", "int", "episodeNumber", ",", "String", "language", ",", "String", "...", "appendToResponse", ")", "throws", "MovieDbException", "{", "return", "tmdbEpisodes", ".", "g...
Get the primary information about a TV episode by combination of a season and episode number. @param tvID tvID @param seasonNumber seasonNumber @param episodeNumber episodeNumber @param language language @param appendToResponse appendToResponse @return @throws MovieDbException exception
[ "Get", "the", "primary", "information", "about", "a", "TV", "episode", "by", "combination", "of", "a", "season", "and", "episode", "number", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/TheMovieDbApi.java#L1772-L1774
apollographql/apollo-android
apollo-rx-support/src/main/java/com/apollographql/apollo/rx/RxApollo.java
RxApollo.from
@NotNull public static <T> Observable<Response<T>> from(@NotNull final ApolloCall<T> call) { """ Converts an {@link ApolloCall} to a Observable with backpressure mode {@link rx.Emitter.BackpressureMode#BUFFER}. The number of emissions this Observable will have is based on the {@link ResponseFetcher} used with the...
java
@NotNull public static <T> Observable<Response<T>> from(@NotNull final ApolloCall<T> call) { return from(call, Emitter.BackpressureMode.BUFFER); }
[ "@", "NotNull", "public", "static", "<", "T", ">", "Observable", "<", "Response", "<", "T", ">", ">", "from", "(", "@", "NotNull", "final", "ApolloCall", "<", "T", ">", "call", ")", "{", "return", "from", "(", "call", ",", "Emitter", ".", "Backpressu...
Converts an {@link ApolloCall} to a Observable with backpressure mode {@link rx.Emitter.BackpressureMode#BUFFER}. The number of emissions this Observable will have is based on the {@link ResponseFetcher} used with the call. @param call the ApolloCall to convert @param <T> the value type @return the converted Observab...
[ "Converts", "an", "{", "@link", "ApolloCall", "}", "to", "a", "Observable", "with", "backpressure", "mode", "{", "@link", "rx", ".", "Emitter", ".", "BackpressureMode#BUFFER", "}", ".", "The", "number", "of", "emissions", "this", "Observable", "will", "have", ...
train
https://github.com/apollographql/apollo-android/blob/a78869a76e17f77e42c7a88f0099914fe7ffa5b6/apollo-rx-support/src/main/java/com/apollographql/apollo/rx/RxApollo.java#L218-L220
Erudika/para
para-server/src/main/java/com/erudika/para/rest/RestUtils.java
RestUtils.deleteLinksHandler
public static Response deleteLinksHandler(ParaObject pobj, String id2, String type2, boolean childrenOnly) { """ Handles requests to delete linked objects. @param pobj the object to operate on @param id2 the id of the second object (optional) @param type2 the type of the second object @param childrenOnly find ...
java
public static Response deleteLinksHandler(ParaObject pobj, String id2, String type2, boolean childrenOnly) { try (final Metrics.Context context = Metrics.time(null, RestUtils.class, "links", "delete")) { if (type2 == null && id2 == null) { pobj.unlinkAll(); } else if (type2 != null) { if (id2 != null) {...
[ "public", "static", "Response", "deleteLinksHandler", "(", "ParaObject", "pobj", ",", "String", "id2", ",", "String", "type2", ",", "boolean", "childrenOnly", ")", "{", "try", "(", "final", "Metrics", ".", "Context", "context", "=", "Metrics", ".", "time", "...
Handles requests to delete linked objects. @param pobj the object to operate on @param id2 the id of the second object (optional) @param type2 the type of the second object @param childrenOnly find only directly linked objects in 1-to-many relationship @return a Response
[ "Handles", "requests", "to", "delete", "linked", "objects", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/rest/RestUtils.java#L681-L694
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/BoardsApi.java
BoardsApi.getBoardList
public BoardList getBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException { """ Get a single issue board list. <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), St...
java
public BoardList getBoardList(Object projectIdOrPath, Integer boardId, Integer listId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "boards", boardId, "lists", listId); return (response.readEntity(BoardLis...
[ "public", "BoardList", "getBoardList", "(", "Object", "projectIdOrPath", ",", "Integer", "boardId", ",", "Integer", "listId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ...
Get a single issue board list. <pre><code>GitLab Endpoint: GET /projects/:id/boards/:board_id/lists/:list_id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param boardId the ID of the board @param listId the ID of the board lists to get @return a Boar...
[ "Get", "a", "single", "issue", "board", "list", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/BoardsApi.java#L255-L259
Azure/azure-sdk-for-java
cognitiveservices/data-plane/search/bingimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/implementation/BingImagesImpl.java
BingImagesImpl.searchAsync
public Observable<ImagesModel> searchAsync(String query, SearchOptionalParameter searchOptionalParameter) { """ The Image Search API lets you send a search query to Bing and get back a list of relevant images. This section provides technical details about the query parameters and headers that you use to request im...
java
public Observable<ImagesModel> searchAsync(String query, SearchOptionalParameter searchOptionalParameter) { return searchWithServiceResponseAsync(query, searchOptionalParameter).map(new Func1<ServiceResponse<ImagesModel>, ImagesModel>() { @Override public ImagesModel call(ServiceResponse...
[ "public", "Observable", "<", "ImagesModel", ">", "searchAsync", "(", "String", "query", ",", "SearchOptionalParameter", "searchOptionalParameter", ")", "{", "return", "searchWithServiceResponseAsync", "(", "query", ",", "searchOptionalParameter", ")", ".", "map", "(", ...
The Image Search API lets you send a search query to Bing and get back a list of relevant images. This section provides technical details about the query parameters and headers that you use to request images and the JSON response objects that contain them. For examples that show how to make requests, see [Searching the...
[ "The", "Image", "Search", "API", "lets", "you", "send", "a", "search", "query", "to", "Bing", "and", "get", "back", "a", "list", "of", "relevant", "images", ".", "This", "section", "provides", "technical", "details", "about", "the", "query", "parameters", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/search/bingimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/imagesearch/implementation/BingImagesImpl.java#L123-L130
sagiegurari/fax4j
src/main/java/org/fax4j/spi/phaxio/PhaxioFaxClientSpi.java
PhaxioFaxClientSpi.updateFaxJob2HTTPRequestConverterConfiguration
@Override protected void updateFaxJob2HTTPRequestConverterConfiguration(Map<String,String> configuration) { """ Hook for extending classes. @param configuration The converter configuration """ //get API key/secret String apiKey=this.getConfigurationValue(FaxClientSpiConfigurationConst...
java
@Override protected void updateFaxJob2HTTPRequestConverterConfiguration(Map<String,String> configuration) { //get API key/secret String apiKey=this.getConfigurationValue(FaxClientSpiConfigurationConstants.API_KEY_PROPERTY_KEY); String apiSecret=this.getConfigurationValue(FaxClientSpiConf...
[ "@", "Override", "protected", "void", "updateFaxJob2HTTPRequestConverterConfiguration", "(", "Map", "<", "String", ",", "String", ">", "configuration", ")", "{", "//get API key/secret", "String", "apiKey", "=", "this", ".", "getConfigurationValue", "(", "FaxClientSpiCon...
Hook for extending classes. @param configuration The converter configuration
[ "Hook", "for", "extending", "classes", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/phaxio/PhaxioFaxClientSpi.java#L172-L196
qiujiayu/AutoLoadCache
src/main/java/com/jarvis/cache/script/AbstractScriptParser.java
AbstractScriptParser.getDefinedCacheKey
public String getDefinedCacheKey(String keyEL, Object target, Object[] arguments, Object retVal, boolean hasRetVal) throws Exception { """ 根据请求参数和执行结果值,进行构造缓存Key @param keyEL 生成缓存Key的表达式 @param target AOP 拦截到的实例 @param arguments 参数 @param retVal 结果值 @param hasRetVal 是否有retVal @return...
java
public String getDefinedCacheKey(String keyEL, Object target, Object[] arguments, Object retVal, boolean hasRetVal) throws Exception { return this.getElValue(keyEL, target, arguments, retVal, hasRetVal, String.class); }
[ "public", "String", "getDefinedCacheKey", "(", "String", "keyEL", ",", "Object", "target", ",", "Object", "[", "]", "arguments", ",", "Object", "retVal", ",", "boolean", "hasRetVal", ")", "throws", "Exception", "{", "return", "this", ".", "getElValue", "(", ...
根据请求参数和执行结果值,进行构造缓存Key @param keyEL 生成缓存Key的表达式 @param target AOP 拦截到的实例 @param arguments 参数 @param retVal 结果值 @param hasRetVal 是否有retVal @return CacheKey 缓存Key @throws Exception 异常
[ "根据请求参数和执行结果值,进行构造缓存Key" ]
train
https://github.com/qiujiayu/AutoLoadCache/blob/8121c146f1a420fa6d6832e849acadb547c13622/src/main/java/com/jarvis/cache/script/AbstractScriptParser.java#L77-L80
openengsb/openengsb
components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/operation/InstantiateOperation.java
InstantiateOperation.initiateByConstructor
private Object initiateByConstructor(Class<?> targetClass, List<Object> objects) throws Exception { """ Tries to initiate an object of the target class through a constructor with the given object as parameter. """ Constructor<?> constr = targetClass.getConstructor(getClassList(objects)); return...
java
private Object initiateByConstructor(Class<?> targetClass, List<Object> objects) throws Exception { Constructor<?> constr = targetClass.getConstructor(getClassList(objects)); return constr.newInstance(objects.toArray()); }
[ "private", "Object", "initiateByConstructor", "(", "Class", "<", "?", ">", "targetClass", ",", "List", "<", "Object", ">", "objects", ")", "throws", "Exception", "{", "Constructor", "<", "?", ">", "constr", "=", "targetClass", ".", "getConstructor", "(", "ge...
Tries to initiate an object of the target class through a constructor with the given object as parameter.
[ "Tries", "to", "initiate", "an", "object", "of", "the", "target", "class", "through", "a", "constructor", "with", "the", "given", "object", "as", "parameter", "." ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/operation/InstantiateOperation.java#L116-L119
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/context/FlushManager.java
FlushManager.logEvent
private void logEvent(Node node, EventType eventType) { """ Log event. @param node the node @param eventType the event type """ // Node contains original as well as transactional copy. EventLog log = new EventLog(eventType, node); eventLogQueue.onEvent(log, eventType); }
java
private void logEvent(Node node, EventType eventType) { // Node contains original as well as transactional copy. EventLog log = new EventLog(eventType, node); eventLogQueue.onEvent(log, eventType); }
[ "private", "void", "logEvent", "(", "Node", "node", ",", "EventType", "eventType", ")", "{", "// Node contains original as well as transactional copy.", "EventLog", "log", "=", "new", "EventLog", "(", "eventType", ",", "node", ")", ";", "eventLogQueue", ".", "onEven...
Log event. @param node the node @param eventType the event type
[ "Log", "event", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/persistence/context/FlushManager.java#L539-L544
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDeclarationAxiomImpl_CustomFieldSerializer.java
OWLDeclarationAxiomImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDeclarationAxiomImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDeclarationAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLDeclarationAxiomImpl", "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/OWLDeclarationAxiomImpl_CustomFieldSerializer.java#L95-L98
amaembo/streamex
src/main/java/one/util/streamex/LongStreamEx.java
LongStreamEx.minByInt
public OptionalLong minByInt(LongToIntFunction keyExtractor) { """ Returns the minimum element of this stream according to the provided key extractor function. <p> This is a terminal operation. @param keyExtractor a non-interfering, stateless function @return an {@code OptionalLong} describing the first e...
java
public OptionalLong minByInt(LongToIntFunction keyExtractor) { return collect(PrimitiveBox::new, (box, l) -> { int key = keyExtractor.applyAsInt(l); if (!box.b || box.i > key) { box.b = true; box.i = key; box.l = l; } ...
[ "public", "OptionalLong", "minByInt", "(", "LongToIntFunction", "keyExtractor", ")", "{", "return", "collect", "(", "PrimitiveBox", "::", "new", ",", "(", "box", ",", "l", ")", "->", "{", "int", "key", "=", "keyExtractor", ".", "applyAsInt", "(", "l", ")",...
Returns the minimum element of this stream according to the provided key extractor function. <p> This is a terminal operation. @param keyExtractor a non-interfering, stateless function @return an {@code OptionalLong} describing the first element of this stream for which the lowest value was returned by key extractor,...
[ "Returns", "the", "minimum", "element", "of", "this", "stream", "according", "to", "the", "provided", "key", "extractor", "function", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/LongStreamEx.java#L938-L947
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/core/Parser.java
Parser.parseDeleteKeyword
public static boolean parseDeleteKeyword(final char[] query, int offset) { """ Parse string to check presence of DELETE keyword regardless of case. The initial character is assumed to have been matched. @param query char[] of the query statement @param offset position of query to start checking @return boole...
java
public static boolean parseDeleteKeyword(final char[] query, int offset) { if (query.length < (offset + 6)) { return false; } return (query[offset] | 32) == 'd' && (query[offset + 1] | 32) == 'e' && (query[offset + 2] | 32) == 'l' && (query[offset + 3] | 32) == 'e' && ...
[ "public", "static", "boolean", "parseDeleteKeyword", "(", "final", "char", "[", "]", "query", ",", "int", "offset", ")", "{", "if", "(", "query", ".", "length", "<", "(", "offset", "+", "6", ")", ")", "{", "return", "false", ";", "}", "return", "(", ...
Parse string to check presence of DELETE keyword regardless of case. The initial character is assumed to have been matched. @param query char[] of the query statement @param offset position of query to start checking @return boolean indicates presence of word
[ "Parse", "string", "to", "check", "presence", "of", "DELETE", "keyword", "regardless", "of", "case", ".", "The", "initial", "character", "is", "assumed", "to", "have", "been", "matched", "." ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/core/Parser.java#L562-L573
Azure/azure-sdk-for-java
applicationinsights/data-plane/src/main/java/com/microsoft/azure/applicationinsights/query/implementation/MetricsImpl.java
MetricsImpl.getAsync
public Observable<MetricsResult> getAsync(String appId, MetricId metricId) { """ Retrieve metric data. Gets metric values for a single metric. @param appId ID of the application. This is Application ID from the API Access settings blade in the Azure portal. @param metricId ID of the metric. This is either a s...
java
public Observable<MetricsResult> getAsync(String appId, MetricId metricId) { return getWithServiceResponseAsync(appId, metricId).map(new Func1<ServiceResponse<MetricsResult>, MetricsResult>() { @Override public MetricsResult call(ServiceResponse<MetricsResult> response) { ...
[ "public", "Observable", "<", "MetricsResult", ">", "getAsync", "(", "String", "appId", ",", "MetricId", "metricId", ")", "{", "return", "getWithServiceResponseAsync", "(", "appId", ",", "metricId", ")", ".", "map", "(", "new", "Func1", "<", "ServiceResponse", ...
Retrieve metric data. Gets metric values for a single metric. @param appId ID of the application. This is Application ID from the API Access settings blade in the Azure portal. @param metricId ID of the metric. This is either a standard AI metric, or an application-specific custom metric. Possible values include: 'req...
[ "Retrieve", "metric", "data", ".", "Gets", "metric", "values", "for", "a", "single", "metric", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/data-plane/src/main/java/com/microsoft/azure/applicationinsights/query/implementation/MetricsImpl.java#L119-L126
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/FileOperations.java
FileOperations.deleteFileFromComputeNode
public void deleteFileFromComputeNode(String poolId, String nodeId, String fileName) throws BatchErrorException, IOException { """ Deletes the specified file from the specified compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node. @param fileN...
java
public void deleteFileFromComputeNode(String poolId, String nodeId, String fileName) throws BatchErrorException, IOException { deleteFileFromComputeNode(poolId, nodeId, fileName, null, null); }
[ "public", "void", "deleteFileFromComputeNode", "(", "String", "poolId", ",", "String", "nodeId", ",", "String", "fileName", ")", "throws", "BatchErrorException", ",", "IOException", "{", "deleteFileFromComputeNode", "(", "poolId", ",", "nodeId", ",", "fileName", ","...
Deletes the specified file from the specified compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node. @param fileName The name of the file to delete. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. ...
[ "Deletes", "the", "specified", "file", "from", "the", "specified", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/FileOperations.java#L217-L219
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectClient.java
ProjectClient.moveDiskProject
@BetaApi public final Operation moveDiskProject(String project, DiskMoveRequest diskMoveRequestResource) { """ Moves a persistent disk from one zone to another. <p>Sample code: <pre><code> try (ProjectClient projectClient = ProjectClient.create()) { ProjectName project = ProjectName.of("[PROJECT]"); Dis...
java
@BetaApi public final Operation moveDiskProject(String project, DiskMoveRequest diskMoveRequestResource) { MoveDiskProjectHttpRequest request = MoveDiskProjectHttpRequest.newBuilder() .setProject(project) .setDiskMoveRequestResource(diskMoveRequestResource) .build(); ...
[ "@", "BetaApi", "public", "final", "Operation", "moveDiskProject", "(", "String", "project", ",", "DiskMoveRequest", "diskMoveRequestResource", ")", "{", "MoveDiskProjectHttpRequest", "request", "=", "MoveDiskProjectHttpRequest", ".", "newBuilder", "(", ")", ".", "setPr...
Moves a persistent disk from one zone to another. <p>Sample code: <pre><code> try (ProjectClient projectClient = ProjectClient.create()) { ProjectName project = ProjectName.of("[PROJECT]"); DiskMoveRequest diskMoveRequestResource = DiskMoveRequest.newBuilder().build(); Operation response = projectClient.moveDiskProje...
[ "Moves", "a", "persistent", "disk", "from", "one", "zone", "to", "another", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ProjectClient.java#L1114-L1123
google/j2objc
jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java
BigDecimal.valueOf
public static BigDecimal valueOf(long unscaledVal, int scale) { """ Translates a {@code long} unscaled value and an {@code int} scale into a {@code BigDecimal}. This {@literal "static factory method"} is provided in preference to a ({@code long}, {@code int}) constructor because it allows for reuse of frequen...
java
public static BigDecimal valueOf(long unscaledVal, int scale) { if (scale == 0) return valueOf(unscaledVal); else if (unscaledVal == 0) { return zeroValueOf(scale); } return new BigDecimal(unscaledVal == INFLATED ? INFLATED_BIGINT : n...
[ "public", "static", "BigDecimal", "valueOf", "(", "long", "unscaledVal", ",", "int", "scale", ")", "{", "if", "(", "scale", "==", "0", ")", "return", "valueOf", "(", "unscaledVal", ")", ";", "else", "if", "(", "unscaledVal", "==", "0", ")", "{", "retur...
Translates a {@code long} unscaled value and an {@code int} scale into a {@code BigDecimal}. This {@literal "static factory method"} is provided in preference to a ({@code long}, {@code int}) constructor because it allows for reuse of frequently used {@code BigDecimal} values.. @param unscaledVal unscaled value of th...
[ "Translates", "a", "{", "@code", "long", "}", "unscaled", "value", "and", "an", "{", "@code", "int", "}", "scale", "into", "a", "{", "@code", "BigDecimal", "}", ".", "This", "{", "@literal", "static", "factory", "method", "}", "is", "provided", "in", "...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L1198-L1207
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/LocaleUtils.java
LocaleUtils.toLocale
public static Locale toLocale(String localeString) { """ Converts a locale string to <code>Locale</code> class. Accepts both '_' and '-' as separators for locale components. @param localeString string representation of a locale @return Locale instance, compatible with the string representation """ ...
java
public static Locale toLocale(String localeString) { if ((localeString == null) || (localeString.length() == 0)) { Locale locale = Locale.getDefault(); if(log.isLoggable(Level.WARNING)) { log.warning("Locale name in faces-config.xml null or empty, ...
[ "public", "static", "Locale", "toLocale", "(", "String", "localeString", ")", "{", "if", "(", "(", "localeString", "==", "null", ")", "||", "(", "localeString", ".", "length", "(", ")", "==", "0", ")", ")", "{", "Locale", "locale", "=", "Locale", ".", ...
Converts a locale string to <code>Locale</code> class. Accepts both '_' and '-' as separators for locale components. @param localeString string representation of a locale @return Locale instance, compatible with the string representation
[ "Converts", "a", "locale", "string", "to", "<code", ">", "Locale<", "/", "code", ">", "class", ".", "Accepts", "both", "_", "and", "-", "as", "separators", "for", "locale", "components", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/LocaleUtils.java#L45-L97
zaproxy/zaproxy
src/org/zaproxy/zap/authentication/UsernamePasswordAuthenticationCredentials.java
UsernamePasswordAuthenticationCredentials.getSetCredentialsForUserApiAction
public static ApiDynamicActionImplementor getSetCredentialsForUserApiAction( final AuthenticationMethodType methodType) { """ Gets the api action for setting a {@link UsernamePasswordAuthenticationCredentials} for an User. @param methodType the method type for which this is called @return the sets the cred...
java
public static ApiDynamicActionImplementor getSetCredentialsForUserApiAction( final AuthenticationMethodType methodType) { return new ApiDynamicActionImplementor(ACTION_SET_CREDENTIALS, new String[] { PARAM_USERNAME, PARAM_PASSWORD }, null) { @Override public void handleAction(JSONObject params) throws A...
[ "public", "static", "ApiDynamicActionImplementor", "getSetCredentialsForUserApiAction", "(", "final", "AuthenticationMethodType", "methodType", ")", "{", "return", "new", "ApiDynamicActionImplementor", "(", "ACTION_SET_CREDENTIALS", ",", "new", "String", "[", "]", "{", "PAR...
Gets the api action for setting a {@link UsernamePasswordAuthenticationCredentials} for an User. @param methodType the method type for which this is called @return the sets the credentials for user api action
[ "Gets", "the", "api", "action", "for", "setting", "a", "{", "@link", "UsernamePasswordAuthenticationCredentials", "}", "for", "an", "User", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/authentication/UsernamePasswordAuthenticationCredentials.java#L204-L235
opsmatters/opsmatters-core
src/main/java/com/opsmatters/core/util/TextFile.java
TextFile.getContents
private String getContents(Reader reader, String terminator) throws IOException { """ Read the contents of the file using the given reader. @param reader The reader used to read the file stream @param terminator The line terminator of the YAML file @return The contents of the file as a string """ St...
java
private String getContents(Reader reader, String terminator) throws IOException { String line = null; StringBuffer buff = new StringBuffer(); BufferedReader in = new BufferedReader(reader); while((line = in.readLine()) != null) { buff.append(line); if(...
[ "private", "String", "getContents", "(", "Reader", "reader", ",", "String", "terminator", ")", "throws", "IOException", "{", "String", "line", "=", "null", ";", "StringBuffer", "buff", "=", "new", "StringBuffer", "(", ")", ";", "BufferedReader", "in", "=", "...
Read the contents of the file using the given reader. @param reader The reader used to read the file stream @param terminator The line terminator of the YAML file @return The contents of the file as a string
[ "Read", "the", "contents", "of", "the", "file", "using", "the", "given", "reader", "." ]
train
https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/util/TextFile.java#L158-L171
joniles/mpxj
src/main/java/net/sf/mpxj/asta/AbstractFileFormat.java
AbstractFileFormat.tableDefinitions
public Map<Integer, TableDefinition> tableDefinitions() { """ Retrieves the table structure for an Asta PP file. Subclasses determine the exact contents of the structure for a specific version of the Asta PP file. @return PP file table structure """ Map<Integer, TableDefinition> result = new HashMap<...
java
public Map<Integer, TableDefinition> tableDefinitions() { Map<Integer, TableDefinition> result = new HashMap<Integer, TableDefinition>(); result.put(Integer.valueOf(2), new TableDefinition("PROJECT_SUMMARY", columnDefinitions(PROJECT_SUMMARY_COLUMNS, projectSummaryColumnsOrder()))); result.put(Int...
[ "public", "Map", "<", "Integer", ",", "TableDefinition", ">", "tableDefinitions", "(", ")", "{", "Map", "<", "Integer", ",", "TableDefinition", ">", "result", "=", "new", "HashMap", "<", "Integer", ",", "TableDefinition", ">", "(", ")", ";", "result", ".",...
Retrieves the table structure for an Asta PP file. Subclasses determine the exact contents of the structure for a specific version of the Asta PP file. @return PP file table structure
[ "Retrieves", "the", "table", "structure", "for", "an", "Asta", "PP", "file", ".", "Subclasses", "determine", "the", "exact", "contents", "of", "the", "structure", "for", "a", "specific", "version", "of", "the", "Asta", "PP", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/asta/AbstractFileFormat.java#L41-L64
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/util/SortedArrayList.java
SortedArrayList.findInsertionPoint
private int findInsertionPoint(Object o, int startIndex, int endIndex) { """ Conducts a binary search to find the index where Object o should be inserted. @param o The Object that is to be inserted. @param startIndex The starting point for the search. @param endIndex The end boundary for this search. @return ...
java
private int findInsertionPoint(Object o, int startIndex, int endIndex) { int halfPt = ((endIndex - startIndex)/2) + startIndex; int delta = compare(get(halfPt), o); if(delta < 0) { endIndex = halfPt; } else if(delta > 0) { startIndex = halfPt; ...
[ "private", "int", "findInsertionPoint", "(", "Object", "o", ",", "int", "startIndex", ",", "int", "endIndex", ")", "{", "int", "halfPt", "=", "(", "(", "endIndex", "-", "startIndex", ")", "/", "2", ")", "+", "startIndex", ";", "int", "delta", "=", "com...
Conducts a binary search to find the index where Object o should be inserted. @param o The Object that is to be inserted. @param startIndex The starting point for the search. @param endIndex The end boundary for this search. @return The index where Object o should be inserted.
[ "Conducts", "a", "binary", "search", "to", "find", "the", "index", "where", "Object", "o", "should", "be", "inserted", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/SortedArrayList.java#L176-L199
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java
IntegrationAccountsInner.updateAsync
public Observable<IntegrationAccountInner> updateAsync(String resourceGroupName, String integrationAccountName, IntegrationAccountInner integrationAccount) { """ Updates an integration account. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param...
java
public Observable<IntegrationAccountInner> updateAsync(String resourceGroupName, String integrationAccountName, IntegrationAccountInner integrationAccount) { return updateWithServiceResponseAsync(resourceGroupName, integrationAccountName, integrationAccount).map(new Func1<ServiceResponse<IntegrationAccountInner...
[ "public", "Observable", "<", "IntegrationAccountInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "IntegrationAccountInner", "integrationAccount", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceG...
Updates an integration account. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param integrationAccount The integration account. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the IntegrationAccountInne...
[ "Updates", "an", "integration", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java#L785-L792
reinert/requestor
requestor/core/requestor-api/src/main/java/io/reinert/requestor/SerdesManagerImpl.java
SerdesManagerImpl.getSerializer
@SuppressWarnings("unchecked") public <T> Serializer<T> getSerializer(Class<T> type, String mediaType) throws SerializationException { """ Retrieve Serializer from manager. @param type The type class of the serializer. @param <T> The type of the serializer. @return The serializer of the specified type. ...
java
@SuppressWarnings("unchecked") public <T> Serializer<T> getSerializer(Class<T> type, String mediaType) throws SerializationException { checkNotNull(type, "Type (Class<T>) cannot be null."); checkNotNull(mediaType, "Media-Type cannot be null."); final String typeName = getClassName(type); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "Serializer", "<", "T", ">", "getSerializer", "(", "Class", "<", "T", ">", "type", ",", "String", "mediaType", ")", "throws", "SerializationException", "{", "checkNotNull", "(", "ty...
Retrieve Serializer from manager. @param type The type class of the serializer. @param <T> The type of the serializer. @return The serializer of the specified type. @throws SerializationException if no serializer was registered for the class.
[ "Retrieve", "Serializer", "from", "manager", "." ]
train
https://github.com/reinert/requestor/blob/40163a75cd17815d5089935d0dd97b8d652ad6d4/requestor/core/requestor-api/src/main/java/io/reinert/requestor/SerdesManagerImpl.java#L190-L218
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPAttachmentFileEntryPersistenceImpl.java
CPAttachmentFileEntryPersistenceImpl.findByUUID_G
@Override public CPAttachmentFileEntry findByUUID_G(String uuid, long groupId) throws NoSuchCPAttachmentFileEntryException { """ Returns the cp attachment file entry where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchCPAttachmentFileEntryException} if it could not be found. @param uuid the uuid ...
java
@Override public CPAttachmentFileEntry findByUUID_G(String uuid, long groupId) throws NoSuchCPAttachmentFileEntryException { CPAttachmentFileEntry cpAttachmentFileEntry = fetchByUUID_G(uuid, groupId); if (cpAttachmentFileEntry == null) { StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_E...
[ "@", "Override", "public", "CPAttachmentFileEntry", "findByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchCPAttachmentFileEntryException", "{", "CPAttachmentFileEntry", "cpAttachmentFileEntry", "=", "fetchByUUID_G", "(", "uuid", ",", "groupI...
Returns the cp attachment file entry where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchCPAttachmentFileEntryException} if it could not be found. @param uuid the uuid @param groupId the group ID @return the matching cp attachment file entry @throws NoSuchCPAttachmentFileEntryException if a matching cp att...
[ "Returns", "the", "cp", "attachment", "file", "entry", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchCPAttachmentFileEntryException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPAttachmentFileEntryPersistenceImpl.java#L673-L700
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/TaskContext.java
TaskContext.getTaskLevelPolicyChecker
public TaskLevelPolicyChecker getTaskLevelPolicyChecker(TaskState taskState, int index) throws Exception { """ Get a post-fork {@link TaskLevelPolicyChecker} for executing task-level {@link org.apache.gobblin.qualitychecker.task.TaskLevelPolicy} in the given branch. @param taskState {@link TaskState} of a {@li...
java
public TaskLevelPolicyChecker getTaskLevelPolicyChecker(TaskState taskState, int index) throws Exception { return TaskLevelPolicyCheckerBuilderFactory.newPolicyCheckerBuilder(taskState, index).build(); }
[ "public", "TaskLevelPolicyChecker", "getTaskLevelPolicyChecker", "(", "TaskState", "taskState", ",", "int", "index", ")", "throws", "Exception", "{", "return", "TaskLevelPolicyCheckerBuilderFactory", ".", "newPolicyCheckerBuilder", "(", "taskState", ",", "index", ")", "."...
Get a post-fork {@link TaskLevelPolicyChecker} for executing task-level {@link org.apache.gobblin.qualitychecker.task.TaskLevelPolicy} in the given branch. @param taskState {@link TaskState} of a {@link Task} @param index branch index @return a {@link TaskLevelPolicyChecker} @throws Exception
[ "Get", "a", "post", "-", "fork", "{", "@link", "TaskLevelPolicyChecker", "}", "for", "executing", "task", "-", "level", "{", "@link", "org", ".", "apache", ".", "gobblin", ".", "qualitychecker", ".", "task", ".", "TaskLevelPolicy", "}", "in", "the", "given...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/TaskContext.java#L342-L344
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/Sets.java
Sets.intersects
public static <E> boolean intersects(Set<E> s1, Set<E> s2) { """ Returns true if there is at least element that is in both s1 and s2. Faster than calling intersection(Set,Set) if you don't need the contents of the intersection. """ // loop over whichever set is smaller if (s1.size() < s2.size()) { ...
java
public static <E> boolean intersects(Set<E> s1, Set<E> s2) { // loop over whichever set is smaller if (s1.size() < s2.size()) { for (E element1 : s1) { if (s2.contains(element1)) { return true; } } } else { for (E element2 : s2) { if (s1.contains...
[ "public", "static", "<", "E", ">", "boolean", "intersects", "(", "Set", "<", "E", ">", "s1", ",", "Set", "<", "E", ">", "s2", ")", "{", "// loop over whichever set is smaller\r", "if", "(", "s1", ".", "size", "(", ")", "<", "s2", ".", "size", "(", ...
Returns true if there is at least element that is in both s1 and s2. Faster than calling intersection(Set,Set) if you don't need the contents of the intersection.
[ "Returns", "true", "if", "there", "is", "at", "least", "element", "that", "is", "in", "both", "s1", "and", "s2", ".", "Faster", "than", "calling", "intersection", "(", "Set", "Set", ")", "if", "you", "don", "t", "need", "the", "contents", "of", "the", ...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/Sets.java#L88-L105
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/linalg/util/ND4JFileUtils.java
ND4JFileUtils.createTempFile
public static File createTempFile(String prefix, String suffix) { """ Create a temporary file in the location specified by {@link ND4JSystemProperties#ND4J_TEMP_DIR_PROPERTY} if set, or the default temporary directory (usually specified by java.io.tmpdir system property) @param prefix Prefix for generating file'...
java
public static File createTempFile(String prefix, String suffix) { String p = System.getProperty(ND4JSystemProperties.ND4J_TEMP_DIR_PROPERTY); try { if (p == null || p.isEmpty()) { return File.createTempFile(prefix, suffix); } else { return File.cre...
[ "public", "static", "File", "createTempFile", "(", "String", "prefix", ",", "String", "suffix", ")", "{", "String", "p", "=", "System", ".", "getProperty", "(", "ND4JSystemProperties", ".", "ND4J_TEMP_DIR_PROPERTY", ")", ";", "try", "{", "if", "(", "p", "=="...
Create a temporary file in the location specified by {@link ND4JSystemProperties#ND4J_TEMP_DIR_PROPERTY} if set, or the default temporary directory (usually specified by java.io.tmpdir system property) @param prefix Prefix for generating file's name; must be at least 3 characeters @param suffix Suffix for generating fi...
[ "Create", "a", "temporary", "file", "in", "the", "location", "specified", "by", "{" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/linalg/util/ND4JFileUtils.java#L40-L51
DJCordhose/jmte
src/com/floreysoft/jmte/util/Util.java
Util.stringToFile
public static void stringToFile(String string, File file, String charsetName) { """ Writes a string into a file. @param string the string @param file the file @param charsetName encoding of the file """ FileOutputStream fos = null; Writer writer = null; try { try { fos = new FileOutpu...
java
public static void stringToFile(String string, File file, String charsetName) { FileOutputStream fos = null; Writer writer = null; try { try { fos = new FileOutputStream(file); writer = new OutputStreamWriter(fos, charsetName); writer.write(string); } finally { if (writer != null) {...
[ "public", "static", "void", "stringToFile", "(", "String", "string", ",", "File", "file", ",", "String", "charsetName", ")", "{", "FileOutputStream", "fos", "=", "null", ";", "Writer", "writer", "=", "null", ";", "try", "{", "try", "{", "fos", "=", "new"...
Writes a string into a file. @param string the string @param file the file @param charsetName encoding of the file
[ "Writes", "a", "string", "into", "a", "file", "." ]
train
https://github.com/DJCordhose/jmte/blob/7334e6d111cc2198c5cf69ee336584ab9e192fe5/src/com/floreysoft/jmte/util/Util.java#L56-L74
UrielCh/ovh-java-sdk
ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java
ApiOvhDbaaslogs.serviceName_input_inputId_configuration_logstash_PUT
public OvhOperation serviceName_input_inputId_configuration_logstash_PUT(String serviceName, String inputId, String filterSection, String inputSection, String patternSection) throws IOException { """ Update the logstash configuration REST: PUT /dbaas/logs/{serviceName}/input/{inputId}/configuration/logstash @p...
java
public OvhOperation serviceName_input_inputId_configuration_logstash_PUT(String serviceName, String inputId, String filterSection, String inputSection, String patternSection) throws IOException { String qPath = "/dbaas/logs/{serviceName}/input/{inputId}/configuration/logstash"; StringBuilder sb = path(qPath, servic...
[ "public", "OvhOperation", "serviceName_input_inputId_configuration_logstash_PUT", "(", "String", "serviceName", ",", "String", "inputId", ",", "String", "filterSection", ",", "String", "inputSection", ",", "String", "patternSection", ")", "throws", "IOException", "{", "St...
Update the logstash configuration REST: PUT /dbaas/logs/{serviceName}/input/{inputId}/configuration/logstash @param serviceName [required] Service name @param inputId [required] Input ID @param patternSection [required] Pattern section @param inputSection [required] Input section @param filterSection [required] Filter...
[ "Update", "the", "logstash", "configuration" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L275-L284
cache2k/cache2k
cache2k-core/src/main/java/org/cache2k/core/TimingHandler.java
TimingHandler.limitExpiryToMaxLinger
static long limitExpiryToMaxLinger(long now, long _maxLinger, long _requestedExpiryTime, boolean _sharpExpiryEnabled) { """ Ignore the value of the expiry policy if later then the maximum expiry time. If max linger takes over, we do not request sharp expiry. <p>The situation becomes messy if the point in time ...
java
static long limitExpiryToMaxLinger(long now, long _maxLinger, long _requestedExpiryTime, boolean _sharpExpiryEnabled) { if (_sharpExpiryEnabled && _requestedExpiryTime > ExpiryPolicy.REFRESH && _requestedExpiryTime < ExpiryPolicy.ETERNAL) { _requestedExpiryTime = -_requestedExpiryTime; } return Expiry...
[ "static", "long", "limitExpiryToMaxLinger", "(", "long", "now", ",", "long", "_maxLinger", ",", "long", "_requestedExpiryTime", ",", "boolean", "_sharpExpiryEnabled", ")", "{", "if", "(", "_sharpExpiryEnabled", "&&", "_requestedExpiryTime", ">", "ExpiryPolicy", ".", ...
Ignore the value of the expiry policy if later then the maximum expiry time. If max linger takes over, we do not request sharp expiry. <p>The situation becomes messy if the point in time for the maximum expiry is close to the requested expiry time and sharp expiry is requested. The expiry or a reload (with refresh ahe...
[ "Ignore", "the", "value", "of", "the", "expiry", "policy", "if", "later", "then", "the", "maximum", "expiry", "time", ".", "If", "max", "linger", "takes", "over", "we", "do", "not", "request", "sharp", "expiry", "." ]
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-core/src/main/java/org/cache2k/core/TimingHandler.java#L619-L624
powermock/powermock
powermock-api/powermock-api-mockito2/src/main/java/org/powermock/api/mockito/PowerMockito.java
PowerMockito.verifyPrivate
public static PrivateMethodVerification verifyPrivate(Object object, VerificationMode verificationMode) { """ Verify a private method invocation with a given verification mode. @see Mockito#verify(Object) """ Mockito.verify(object, verificationMode); return new DefaultPrivateMethodVerificati...
java
public static PrivateMethodVerification verifyPrivate(Object object, VerificationMode verificationMode) { Mockito.verify(object, verificationMode); return new DefaultPrivateMethodVerification(object); }
[ "public", "static", "PrivateMethodVerification", "verifyPrivate", "(", "Object", "object", ",", "VerificationMode", "verificationMode", ")", "{", "Mockito", ".", "verify", "(", "object", ",", "verificationMode", ")", ";", "return", "new", "DefaultPrivateMethodVerificati...
Verify a private method invocation with a given verification mode. @see Mockito#verify(Object)
[ "Verify", "a", "private", "method", "invocation", "with", "a", "given", "verification", "mode", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-mockito2/src/main/java/org/powermock/api/mockito/PowerMockito.java#L280-L283
jhy/jsoup
src/main/java/org/jsoup/nodes/Document.java
Document.findFirstElementByTagName
private Element findFirstElementByTagName(String tag, Node node) { """ fast method to get first by tag name, used for html, head, body finders """ if (node.nodeName().equals(tag)) return (Element) node; else { int size = node.childNodeSize(); for (int i = 0; ...
java
private Element findFirstElementByTagName(String tag, Node node) { if (node.nodeName().equals(tag)) return (Element) node; else { int size = node.childNodeSize(); for (int i = 0; i < size; i++) { Element found = findFirstElementByTagName(tag, node.chil...
[ "private", "Element", "findFirstElementByTagName", "(", "String", "tag", ",", "Node", "node", ")", "{", "if", "(", "node", ".", "nodeName", "(", ")", ".", "equals", "(", "tag", ")", ")", "return", "(", "Element", ")", "node", ";", "else", "{", "int", ...
fast method to get first by tag name, used for html, head, body finders
[ "fast", "method", "to", "get", "first", "by", "tag", "name", "used", "for", "html", "head", "body", "finders" ]
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/nodes/Document.java#L182-L194
wildfly/wildfly-core
cli/src/main/java/org/jboss/as/cli/parsing/StateParser.java
StateParser.parseLine
public static SubstitutedLine parseLine(String str, ParsingStateCallbackHandler callbackHandler, ParsingState initialState) throws CommandFormatException { """ Returns the string which was actually parsed with all the substitutions performed. NB: No CommandContext being provided, variables can't be resolved. var...
java
public static SubstitutedLine parseLine(String str, ParsingStateCallbackHandler callbackHandler, ParsingState initialState) throws CommandFormatException { return parseLine(str, callbackHandler, initialState, true); }
[ "public", "static", "SubstitutedLine", "parseLine", "(", "String", "str", ",", "ParsingStateCallbackHandler", "callbackHandler", ",", "ParsingState", "initialState", ")", "throws", "CommandFormatException", "{", "return", "parseLine", "(", "str", ",", "callbackHandler", ...
Returns the string which was actually parsed with all the substitutions performed. NB: No CommandContext being provided, variables can't be resolved. variables should be already resolved when calling this parse method.
[ "Returns", "the", "string", "which", "was", "actually", "parsed", "with", "all", "the", "substitutions", "performed", ".", "NB", ":", "No", "CommandContext", "being", "provided", "variables", "can", "t", "be", "resolved", ".", "variables", "should", "be", "alr...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/parsing/StateParser.java#L74-L76
futuresimple/android-db-commons
library/src/main/java/com/getbase/android/db/cursors/FluentCursor.java
FluentCursor.toOnlyElement
public <T> T toOnlyElement(Function<? super Cursor, T> singleRowTransform, T defaultValue) { """ Returns the only row of this cursor transformed using the given function, or the supplied default value if cursor is empty. WARNING: This method closes cursor. Do not use this from onLoadFinished() @param singleRo...
java
public <T> T toOnlyElement(Function<? super Cursor, T> singleRowTransform, T defaultValue) { if (moveToFirst()) { return toOnlyElement(singleRowTransform); } else { close(); return defaultValue; } }
[ "public", "<", "T", ">", "T", "toOnlyElement", "(", "Function", "<", "?", "super", "Cursor", ",", "T", ">", "singleRowTransform", ",", "T", "defaultValue", ")", "{", "if", "(", "moveToFirst", "(", ")", ")", "{", "return", "toOnlyElement", "(", "singleRow...
Returns the only row of this cursor transformed using the given function, or the supplied default value if cursor is empty. WARNING: This method closes cursor. Do not use this from onLoadFinished() @param singleRowTransform Function to apply on the only row of this cursor @param <T> Type of returned element @return Tr...
[ "Returns", "the", "only", "row", "of", "this", "cursor", "transformed", "using", "the", "given", "function", "or", "the", "supplied", "default", "value", "if", "cursor", "is", "empty", ".", "WARNING", ":", "This", "method", "closes", "cursor", ".", "Do", "...
train
https://github.com/futuresimple/android-db-commons/blob/a3c37df806f61b1bfab6927ba3710cbb0fa9229a/library/src/main/java/com/getbase/android/db/cursors/FluentCursor.java#L156-L163
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/pascal/PascalTemplate.java
PascalTemplate.writeToFieldValueCounter
public void writeToFieldValueCounter(Counter<String>[] fieldValueCounter, double score) { """ Should be passed a <code>Counter[]</code>, each entry of which keeps scores for possibilities in that template slot. The counter for each template value is incremented by the corresponding score of this PascalTemplate...
java
public void writeToFieldValueCounter(Counter<String>[] fieldValueCounter, double score) { for (int i = 0; i < fields.length; i++) { if ((values[i] != null) && !values[i].equals("NULL")) { fieldValueCounter[i].incrementCount(values[i], score); } } }
[ "public", "void", "writeToFieldValueCounter", "(", "Counter", "<", "String", ">", "[", "]", "fieldValueCounter", ",", "double", "score", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "fields", ".", "length", ";", "i", "++", ")", "{", "if...
Should be passed a <code>Counter[]</code>, each entry of which keeps scores for possibilities in that template slot. The counter for each template value is incremented by the corresponding score of this PascalTemplate. @param fieldValueCounter an array of counters, each of which holds label possibilities for one fiel...
[ "Should", "be", "passed", "a", "<code", ">", "Counter", "[]", "<", "/", "code", ">", "each", "entry", "of", "which", "keeps", "scores", "for", "possibilities", "in", "that", "template", "slot", ".", "The", "counter", "for", "each", "template", "value", "...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/pascal/PascalTemplate.java#L238-L244
osglworks/java-tool
src/main/java/org/osgl/util/E.java
E.unsupportedIf
public static void unsupportedIf(boolean tester, String msg, Object ... args) { """ Throws out an {@link UnsupportedException} with error message specified if `tester` is `true`. @param tester when `true` then throw out the exception. @param msg the error message format pattern. @param args the error mess...
java
public static void unsupportedIf(boolean tester, String msg, Object ... args) { if (tester) { throw unsupport(msg, args); } }
[ "public", "static", "void", "unsupportedIf", "(", "boolean", "tester", ",", "String", "msg", ",", "Object", "...", "args", ")", "{", "if", "(", "tester", ")", "{", "throw", "unsupport", "(", "msg", ",", "args", ")", ";", "}", "}" ]
Throws out an {@link UnsupportedException} with error message specified if `tester` is `true`. @param tester when `true` then throw out the exception. @param msg the error message format pattern. @param args the error message format arguments.
[ "Throws", "out", "an", "{", "@link", "UnsupportedException", "}", "with", "error", "message", "specified", "if", "tester", "is", "true", "." ]
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/E.java#L611-L615
ehcache/ehcache3
impl/src/main/java/org/ehcache/config/builders/PooledExecutionServiceConfigurationBuilder.java
PooledExecutionServiceConfigurationBuilder.defaultPool
public PooledExecutionServiceConfigurationBuilder defaultPool(String alias, int minSize, int maxSize) { """ Adds a default pool configuration to the returned builder. @param alias the pool alias @param minSize the minimum number of threads in the pool @param maxSize the maximum number of threads in the pool ...
java
public PooledExecutionServiceConfigurationBuilder defaultPool(String alias, int minSize, int maxSize) { PooledExecutionServiceConfigurationBuilder other = new PooledExecutionServiceConfigurationBuilder(this); other.defaultPool = new Pool(alias, minSize, maxSize); return other; }
[ "public", "PooledExecutionServiceConfigurationBuilder", "defaultPool", "(", "String", "alias", ",", "int", "minSize", ",", "int", "maxSize", ")", "{", "PooledExecutionServiceConfigurationBuilder", "other", "=", "new", "PooledExecutionServiceConfigurationBuilder", "(", "this",...
Adds a default pool configuration to the returned builder. @param alias the pool alias @param minSize the minimum number of threads in the pool @param maxSize the maximum number of threads in the pool @return a new builder with the added default pool
[ "Adds", "a", "default", "pool", "configuration", "to", "the", "returned", "builder", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/config/builders/PooledExecutionServiceConfigurationBuilder.java#L63-L67
lonnyj/liquibase-spatial
src/main/java/liquibase/ext/spatial/sqlgenerator/OracleSpatialUtils.java
OracleSpatialUtils.getOracleSrid
public static String getOracleSrid(final String srid, final Database database) { """ Converts the given EPSG SRID to the corresponding Oracle SRID. @param srid the EPSG SRID. @param database the database instance. @return the corresponding Oracle SRID. """ final String oracleSrid; if (Stri...
java
public static String getOracleSrid(final String srid, final Database database) { final String oracleSrid; if (StringUtils.trimToNull(srid) == null) { oracleSrid = null; } else if (EPSG_TO_ORACLE_MAP.containsKey(srid)) { oracleSrid = EPSG_TO_ORACLE_MAP.get(srid); } else { ...
[ "public", "static", "String", "getOracleSrid", "(", "final", "String", "srid", ",", "final", "Database", "database", ")", "{", "final", "String", "oracleSrid", ";", "if", "(", "StringUtils", ".", "trimToNull", "(", "srid", ")", "==", "null", ")", "{", "ora...
Converts the given EPSG SRID to the corresponding Oracle SRID. @param srid the EPSG SRID. @param database the database instance. @return the corresponding Oracle SRID.
[ "Converts", "the", "given", "EPSG", "SRID", "to", "the", "corresponding", "Oracle", "SRID", "." ]
train
https://github.com/lonnyj/liquibase-spatial/blob/36ae41b0d3d08bb00a22c856e51ffeed08891c0e/src/main/java/liquibase/ext/spatial/sqlgenerator/OracleSpatialUtils.java#L82-L93
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-classloader/xwiki-commons-classloader-api/src/main/java/org/xwiki/classloader/URIClassLoader.java
URIClassLoader.findClass
@Override protected Class<?> findClass(final String name) throws ClassNotFoundException { """ Finds and loads the class with the specified name. @param name the name of the class @return the resulting class @exception ClassNotFoundException if the class could not be found """ try { ...
java
@Override protected Class<?> findClass(final String name) throws ClassNotFoundException { try { return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>() { @Override public Class<?> run() throws ClassNotFoundException ...
[ "@", "Override", "protected", "Class", "<", "?", ">", "findClass", "(", "final", "String", "name", ")", "throws", "ClassNotFoundException", "{", "try", "{", "return", "AccessController", ".", "doPrivileged", "(", "new", "PrivilegedExceptionAction", "<", "Class", ...
Finds and loads the class with the specified name. @param name the name of the class @return the resulting class @exception ClassNotFoundException if the class could not be found
[ "Finds", "and", "loads", "the", "class", "with", "the", "specified", "name", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-classloader/xwiki-commons-classloader-api/src/main/java/org/xwiki/classloader/URIClassLoader.java#L175-L200
buschmais/jqa-java-plugin
src/main/java/com/buschmais/jqassistant/plugin/java/impl/scanner/visitor/ClassVisitor.java
ClassVisitor.getJavaType
private Class<? extends ClassFileDescriptor> getJavaType(int flags) { """ Determine the types label to be applied to a class node. @param flags The access flags. @return The types label. """ if (hasFlag(flags, Opcodes.ACC_ANNOTATION)) { return AnnotationTypeDescriptor.class; } ...
java
private Class<? extends ClassFileDescriptor> getJavaType(int flags) { if (hasFlag(flags, Opcodes.ACC_ANNOTATION)) { return AnnotationTypeDescriptor.class; } else if (hasFlag(flags, Opcodes.ACC_ENUM)) { return EnumTypeDescriptor.class; } else if (hasFlag(flags, Opcodes.ACC...
[ "private", "Class", "<", "?", "extends", "ClassFileDescriptor", ">", "getJavaType", "(", "int", "flags", ")", "{", "if", "(", "hasFlag", "(", "flags", ",", "Opcodes", ".", "ACC_ANNOTATION", ")", ")", "{", "return", "AnnotationTypeDescriptor", ".", "class", "...
Determine the types label to be applied to a class node. @param flags The access flags. @return The types label.
[ "Determine", "the", "types", "label", "to", "be", "applied", "to", "a", "class", "node", "." ]
train
https://github.com/buschmais/jqa-java-plugin/blob/4c050943e9c28cf1c4a08aa962d5b5bf03c4fe54/src/main/java/com/buschmais/jqassistant/plugin/java/impl/scanner/visitor/ClassVisitor.java#L262-L271
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgGraphicsContext.java
SvgGraphicsContext.drawSymbol
public void drawSymbol(Object parent, String name, Coordinate position, ShapeStyle style, String shapeTypeId) { """ Draw a symbol, using some predefined ShapeType. @param parent parent group object @param name The symbol's name. @param position The symbol's (X,Y) location on the graphics. @param style Th...
java
public void drawSymbol(Object parent, String name, Coordinate position, ShapeStyle style, String shapeTypeId) { if (isAttached()) { Element useElement = helper.createOrUpdateElement(parent, name, "use", style); Dom.setElementAttributeNS(Dom.NS_XLINK, useElement, "xlink:href", "#" + shapeTypeId); if (position...
[ "public", "void", "drawSymbol", "(", "Object", "parent", ",", "String", "name", ",", "Coordinate", "position", ",", "ShapeStyle", "style", ",", "String", "shapeTypeId", ")", "{", "if", "(", "isAttached", "(", ")", ")", "{", "Element", "useElement", "=", "h...
Draw a symbol, using some predefined ShapeType. @param parent parent group object @param name The symbol's name. @param position The symbol's (X,Y) location on the graphics. @param style The style to apply on the symbol. @param shapeTypeId The name of the predefined ShapeType. This symbol will create a reference to th...
[ "Draw", "a", "symbol", "using", "some", "predefined", "ShapeType", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgGraphicsContext.java#L468-L477
opengeospatial/teamengine
teamengine-core/src/main/java/com/occamlab/te/parsers/SchematronValidatingParser.java
SchematronValidatingParser.createSchematronDriver
ValidationDriver createSchematronDriver(String phase) { """ Sets up the schematron reader with all the necessary parameters. Calls initSchematronReader() to do further setup of the validation driver. @param phase The string phase name (contained in schematron file) @return The ValidationDriver to use in vali...
java
ValidationDriver createSchematronDriver(String phase) { SchemaReaderLoader loader = new SchemaReaderLoader(); SchemaReader schReader = loader.createSchemaReader(SCHEMATRON_NS_URI); this.configPropBuilder = new PropertyMapBuilder(); SchematronProperty.DIAGNOSE.add(this.configPropBuild...
[ "ValidationDriver", "createSchematronDriver", "(", "String", "phase", ")", "{", "SchemaReaderLoader", "loader", "=", "new", "SchemaReaderLoader", "(", ")", ";", "SchemaReader", "schReader", "=", "loader", ".", "createSchemaReader", "(", "SCHEMATRON_NS_URI", ")", ";", ...
Sets up the schematron reader with all the necessary parameters. Calls initSchematronReader() to do further setup of the validation driver. @param phase The string phase name (contained in schematron file) @return The ValidationDriver to use in validating the XML document
[ "Sets", "up", "the", "schematron", "reader", "with", "all", "the", "necessary", "parameters", ".", "Calls", "initSchematronReader", "()", "to", "do", "further", "setup", "of", "the", "validation", "driver", "." ]
train
https://github.com/opengeospatial/teamengine/blob/b6b890214b6784bbe19460bf753bdf28a9514bee/teamengine-core/src/main/java/com/occamlab/te/parsers/SchematronValidatingParser.java#L257-L274
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java
StandardAtomGenerator.isMajorIsotope
private boolean isMajorIsotope(int number, int mass) { """ Utility to determine if the specified mass is the major isotope for the given atomic number. @param number atomic number @param mass atomic mass @return the mass is the major mass for the atomic number """ try { IIsotope isot...
java
private boolean isMajorIsotope(int number, int mass) { try { IIsotope isotope = Isotopes.getInstance().getMajorIsotope(number); return isotope != null && isotope.getMassNumber().equals(mass); } catch (IOException e) { return false; } }
[ "private", "boolean", "isMajorIsotope", "(", "int", "number", ",", "int", "mass", ")", "{", "try", "{", "IIsotope", "isotope", "=", "Isotopes", ".", "getInstance", "(", ")", ".", "getMajorIsotope", "(", "number", ")", ";", "return", "isotope", "!=", "null"...
Utility to determine if the specified mass is the major isotope for the given atomic number. @param number atomic number @param mass atomic mass @return the mass is the major mass for the atomic number
[ "Utility", "to", "determine", "if", "the", "specified", "mass", "is", "the", "major", "isotope", "for", "the", "given", "atomic", "number", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L547-L554
digitalheir/java-xml-to-json
src/main/java/org/leibnizcenter/xml/helpers/XmlNodeToJsonElement.java
XmlNodeToJsonElement.documentType
public static Object documentType(DocumentType dtd, String[][] entities, String[][] notations) { """ Each Document has a doctype attribute whose value is either null or a DocumentType object. The DocumentType interface in the DOM Core provides an interface to the list of entities that are defined for the documen...
java
public static Object documentType(DocumentType dtd, String[][] entities, String[][] notations) { return new Object[]{ dtd.getNodeType(),// short dtd.getName(),// String entities,// NamedNodeMap notations,// NamedNodeMap dtd.getPubli...
[ "public", "static", "Object", "documentType", "(", "DocumentType", "dtd", ",", "String", "[", "]", "[", "]", "entities", ",", "String", "[", "]", "[", "]", "notations", ")", "{", "return", "new", "Object", "[", "]", "{", "dtd", ".", "getNodeType", "(",...
Each Document has a doctype attribute whose value is either null or a DocumentType object. The DocumentType interface in the DOM Core provides an interface to the list of entities that are defined for the document, and little else because the effect of namespaces and the various XML schema efforts on DTD representation...
[ "Each", "Document", "has", "a", "doctype", "attribute", "whose", "value", "is", "either", "null", "or", "a", "DocumentType", "object", ".", "The", "DocumentType", "interface", "in", "the", "DOM", "Core", "provides", "an", "interface", "to", "the", "list", "o...
train
https://github.com/digitalheir/java-xml-to-json/blob/94b4cef671bea9b79fb6daa685cd5bf78c222179/src/main/java/org/leibnizcenter/xml/helpers/XmlNodeToJsonElement.java#L37-L47
drallgood/jpasskit
jpasskit/src/main/java/de/brendamour/jpasskit/signing/PKSigningInformationUtil.java
PKSigningInformationUtil.loadPKCS12File
@Deprecated public KeyStore loadPKCS12File(InputStream inputStreamOfP12, String password) throws CertificateException, IOException { """ Load the keystore from an already opened input stream. The caller is responsible for closing the stream after this method returns successfully or fails. @param inputStr...
java
@Deprecated public KeyStore loadPKCS12File(InputStream inputStreamOfP12, String password) throws CertificateException, IOException { try { return CertUtils.toKeyStore(inputStreamOfP12, password.toCharArray()); } catch (IllegalStateException ex) { throw new IOException("Key fr...
[ "@", "Deprecated", "public", "KeyStore", "loadPKCS12File", "(", "InputStream", "inputStreamOfP12", ",", "String", "password", ")", "throws", "CertificateException", ",", "IOException", "{", "try", "{", "return", "CertUtils", ".", "toKeyStore", "(", "inputStreamOfP12",...
Load the keystore from an already opened input stream. The caller is responsible for closing the stream after this method returns successfully or fails. @param inputStreamOfP12 <code>InputStream</code> containing the signing key store. @param password Password to access the key store @return Key store loaded from <co...
[ "Load", "the", "keystore", "from", "an", "already", "opened", "input", "stream", "." ]
train
https://github.com/drallgood/jpasskit/blob/63bfa8abbdb85c2d7596c60eed41ed8e374cbd01/jpasskit/src/main/java/de/brendamour/jpasskit/signing/PKSigningInformationUtil.java#L147-L154
vikingbrain/thedavidbox-client4j
src/main/java/com/vikingbrain/nmt/controller/impl/RemoteHttpServiceImpl.java
RemoteHttpServiceImpl.buildEncodedParameters
private StringBuffer buildEncodedParameters(LinkedHashMap<String, String> params) { """ It uses the parameters to build the http arguments with name and value. @param params all the parameters with name and value @return the stringbuffer with the http arguments ready to be added to a http request """ Strin...
java
private StringBuffer buildEncodedParameters(LinkedHashMap<String, String> params) { StringBuffer parametersUrlGet = new StringBuffer(""); if (null != params) { for (String key : params.keySet()) { String value = params.get(key); String encodedParameter = encodeHttpParameter(value); // It builds so...
[ "private", "StringBuffer", "buildEncodedParameters", "(", "LinkedHashMap", "<", "String", ",", "String", ">", "params", ")", "{", "StringBuffer", "parametersUrlGet", "=", "new", "StringBuffer", "(", "\"\"", ")", ";", "if", "(", "null", "!=", "params", ")", "{"...
It uses the parameters to build the http arguments with name and value. @param params all the parameters with name and value @return the stringbuffer with the http arguments ready to be added to a http request
[ "It", "uses", "the", "parameters", "to", "build", "the", "http", "arguments", "with", "name", "and", "value", "." ]
train
https://github.com/vikingbrain/thedavidbox-client4j/blob/b2375a59b30fc3bd5dae34316bda68e01d006535/src/main/java/com/vikingbrain/nmt/controller/impl/RemoteHttpServiceImpl.java#L87-L102
graphhopper/graphhopper
api/src/main/java/com/graphhopper/GHRequest.java
GHRequest.addPoint
public GHRequest addPoint(GHPoint point, double favoredHeading) { """ Add stopover point to routing request. <p> @param point geographical position (see GHPoint) @param favoredHeading north based azimuth (clockwise) in (0, 360) or NaN for equal preference """ if (point == null) ...
java
public GHRequest addPoint(GHPoint point, double favoredHeading) { if (point == null) throw new IllegalArgumentException("point cannot be null"); if (!possibleToAdd) throw new IllegalStateException("Please call empty constructor if you intent to use " + "more ...
[ "public", "GHRequest", "addPoint", "(", "GHPoint", "point", ",", "double", "favoredHeading", ")", "{", "if", "(", "point", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"point cannot be null\"", ")", ";", "if", "(", "!", "possibleToAdd", ...
Add stopover point to routing request. <p> @param point geographical position (see GHPoint) @param favoredHeading north based azimuth (clockwise) in (0, 360) or NaN for equal preference
[ "Add", "stopover", "point", "to", "routing", "request", ".", "<p", ">" ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/api/src/main/java/com/graphhopper/GHRequest.java#L137-L149
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/io/Source.java
Source.createReader
public Reader createReader(byte[] cachedBytes) throws IOException { """ If cachedBytes are not null, returns a Reader created from the cachedBytes. Otherwise, returns a Reader from the underlying source. """ if (cachedBytes != null) { return new InputStreamReader(new ByteArrayInputStream(cachedBytes)); ...
java
public Reader createReader(byte[] cachedBytes) throws IOException { if (cachedBytes != null) { return new InputStreamReader(new ByteArrayInputStream(cachedBytes)); } if (inputStream != null) { return new InputStreamReader(inputStream, charset); } if (reader != null) { ...
[ "public", "Reader", "createReader", "(", "byte", "[", "]", "cachedBytes", ")", "throws", "IOException", "{", "if", "(", "cachedBytes", "!=", "null", ")", "{", "return", "new", "InputStreamReader", "(", "new", "ByteArrayInputStream", "(", "cachedBytes", ")", ")...
If cachedBytes are not null, returns a Reader created from the cachedBytes. Otherwise, returns a Reader from the underlying source.
[ "If", "cachedBytes", "are", "not", "null", "returns", "a", "Reader", "created", "from", "the", "cachedBytes", ".", "Otherwise", "returns", "a", "Reader", "from", "the", "underlying", "source", "." ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/io/Source.java#L82-L93
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_device_GET
public ArrayList<String> organizationName_service_exchangeService_device_GET(String organizationName, String exchangeService, String IMEI, OvhDeviceActiveSyncStateEnum deviceState, String identity) throws IOException { """ List of your ActiveSync devices registered on this Exchange service REST: GET /email/exch...
java
public ArrayList<String> organizationName_service_exchangeService_device_GET(String organizationName, String exchangeService, String IMEI, OvhDeviceActiveSyncStateEnum deviceState, String identity) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/device"; StringBuild...
[ "public", "ArrayList", "<", "String", ">", "organizationName_service_exchangeService_device_GET", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "String", "IMEI", ",", "OvhDeviceActiveSyncStateEnum", "deviceState", ",", "String", "identity", ")", ...
List of your ActiveSync devices registered on this Exchange service REST: GET /email/exchange/{organizationName}/service/{exchangeService}/device @param IMEI [required] Filter the value of IMEI property (like) @param deviceState [required] Filter the value of deviceState property (=) @param identity [required] Filter ...
[ "List", "of", "your", "ActiveSync", "devices", "registered", "on", "this", "Exchange", "service" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L2265-L2273
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java
OrderItemUrl.updateOrderItemDiscountUrl
public static MozuUrl updateOrderItemDiscountUrl(Integer discountId, String orderId, String orderItemId, String responseFields, String updateMode, String version) { """ Get Resource Url for UpdateOrderItemDiscount @param discountId discountId parameter description DOCUMENT_HERE @param orderId Unique identifier o...
java
public static MozuUrl updateOrderItemDiscountUrl(Integer discountId, String orderId, String orderItemId, String responseFields, String updateMode, String version) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/items/{orderItemId}/discounts/{discountId}?updatemode={updateMode}&version={...
[ "public", "static", "MozuUrl", "updateOrderItemDiscountUrl", "(", "Integer", "discountId", ",", "String", "orderId", ",", "String", "orderItemId", ",", "String", "responseFields", ",", "String", "updateMode", ",", "String", "version", ")", "{", "UrlFormatter", "form...
Get Resource Url for UpdateOrderItemDiscount @param discountId discountId parameter description DOCUMENT_HERE @param orderId Unique identifier of the order. @param orderItemId Unique identifier of the item to remove from the order. @param responseFields Filtering syntax appended to an API call to increase or decrease t...
[ "Get", "Resource", "Url", "for", "UpdateOrderItemDiscount" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderItemUrl.java#L98-L108
carrotsearch/hppc
hppc/src/main/templates/com/carrotsearch/hppc/KTypeVTypeHashMap.java
KTypeVTypeHashMap.putAll
@Override public int putAll(Iterable<? extends KTypeVTypeCursor<? extends KType, ? extends VType>> iterable) { """ Puts all key/value pairs from a given iterable into this map. """ final int count = size(); for (KTypeVTypeCursor<? extends KType, ? extends VType> c : iterable) { put(c.key, c.val...
java
@Override public int putAll(Iterable<? extends KTypeVTypeCursor<? extends KType, ? extends VType>> iterable){ final int count = size(); for (KTypeVTypeCursor<? extends KType, ? extends VType> c : iterable) { put(c.key, c.value); } return size() - count; }
[ "@", "Override", "public", "int", "putAll", "(", "Iterable", "<", "?", "extends", "KTypeVTypeCursor", "<", "?", "extends", "KType", ",", "?", "extends", "VType", ">", ">", "iterable", ")", "{", "final", "int", "count", "=", "size", "(", ")", ";", "for"...
Puts all key/value pairs from a given iterable into this map.
[ "Puts", "all", "key", "/", "value", "pairs", "from", "a", "given", "iterable", "into", "this", "map", "." ]
train
https://github.com/carrotsearch/hppc/blob/e359e9da358e846fcbffc64a765611df954ba3f6/hppc/src/main/templates/com/carrotsearch/hppc/KTypeVTypeHashMap.java#L206-L213
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfWriter.java
PdfCrossReference.toPdf
public void toPdf(int midSize, OutputStream os) throws IOException { """ Writes PDF syntax to the OutputStream @param midSize @param os @throws IOException """ os.write((byte)type); while (--midSize >= 0) os.write((byte)((offset >>> (8 * midSize)) & 0xff))...
java
public void toPdf(int midSize, OutputStream os) throws IOException { os.write((byte)type); while (--midSize >= 0) os.write((byte)((offset >>> (8 * midSize)) & 0xff)); os.write((byte)((generation >>> 8) & 0xff)); os.write((byte)(generati...
[ "public", "void", "toPdf", "(", "int", "midSize", ",", "OutputStream", "os", ")", "throws", "IOException", "{", "os", ".", "write", "(", "(", "byte", ")", "type", ")", ";", "while", "(", "--", "midSize", ">=", "0", ")", "os", ".", "write", "(", "("...
Writes PDF syntax to the OutputStream @param midSize @param os @throws IOException
[ "Writes", "PDF", "syntax", "to", "the", "OutputStream" ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfWriter.java#L211-L217
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/lang/ClassHelper.java
ClassHelper.getResource
@Nullable public static URL getResource (@Nonnull final Class <?> aClass, @Nonnull @Nonempty final String sPath) { """ Get the URL of the passed resource using the class loader of the specified class only. This is a sanity wrapper around <code>class.getResource (sPath)</code>. @param aClass The class to be...
java
@Nullable public static URL getResource (@Nonnull final Class <?> aClass, @Nonnull @Nonempty final String sPath) { ValueEnforcer.notNull (aClass, "Class"); ValueEnforcer.notEmpty (sPath, "Path"); // Ensure the path does start with a "/" final String sPathWithSlash = _getPathWithLeadingSlash (sPath)...
[ "@", "Nullable", "public", "static", "URL", "getResource", "(", "@", "Nonnull", "final", "Class", "<", "?", ">", "aClass", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", "sPath", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aClass", ",", "\...
Get the URL of the passed resource using the class loader of the specified class only. This is a sanity wrapper around <code>class.getResource (sPath)</code>. @param aClass The class to be used. May not be <code>null</code>. @param sPath The path to be resolved. May neither be <code>null</code> nor empty. Internally i...
[ "Get", "the", "URL", "of", "the", "passed", "resource", "using", "the", "class", "loader", "of", "the", "specified", "class", "only", ".", "This", "is", "a", "sanity", "wrapper", "around", "<code", ">", "class", ".", "getResource", "(", "sPath", ")", "<"...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/lang/ClassHelper.java#L558-L569
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/CmsAttributeHandler.java
CmsAttributeHandler.setWarningMessage
public void setWarningMessage(int valueIndex, String message, CmsTabbedPanel<?> tabbedPanel) { """ Sets the warning message for the given value index.<p> @param valueIndex the value index @param message the warning message @param tabbedPanel the forms tabbed panel if available """ if (!m_attrib...
java
public void setWarningMessage(int valueIndex, String message, CmsTabbedPanel<?> tabbedPanel) { if (!m_attributeValueViews.isEmpty()) { FlowPanel parent = (FlowPanel)m_attributeValueViews.get(0).getParent(); CmsAttributeValueView valueView = (CmsAttributeValueView)parent.getWidget(va...
[ "public", "void", "setWarningMessage", "(", "int", "valueIndex", ",", "String", "message", ",", "CmsTabbedPanel", "<", "?", ">", "tabbedPanel", ")", "{", "if", "(", "!", "m_attributeValueViews", ".", "isEmpty", "(", ")", ")", "{", "FlowPanel", "parent", "=",...
Sets the warning message for the given value index.<p> @param valueIndex the value index @param message the warning message @param tabbedPanel the forms tabbed panel if available
[ "Sets", "the", "warning", "message", "for", "the", "given", "value", "index", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/CmsAttributeHandler.java#L1023-L1039
networknt/light-4j
utility/src/main/java/com/networknt/utility/CharUtils.java
CharUtils.toIntValue
public static int toIntValue(final Character ch, final int defaultValue) { """ <p>Converts the character to the Integer it represents, throwing an exception if the character is not numeric.</p> <p>This method converts the char '1' to the int 1 and so on.</p> <pre> CharUtils.toIntValue(null, -1) = -1 CharU...
java
public static int toIntValue(final Character ch, final int defaultValue) { if (ch == null) { return defaultValue; } return toIntValue(ch.charValue(), defaultValue); }
[ "public", "static", "int", "toIntValue", "(", "final", "Character", "ch", ",", "final", "int", "defaultValue", ")", "{", "if", "(", "ch", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "return", "toIntValue", "(", "ch", ".", "charValue", "("...
<p>Converts the character to the Integer it represents, throwing an exception if the character is not numeric.</p> <p>This method converts the char '1' to the int 1 and so on.</p> <pre> CharUtils.toIntValue(null, -1) = -1 CharUtils.toIntValue('3', -1) = 3 CharUtils.toIntValue('A', -1) = -1 </pre> @param ch the ch...
[ "<p", ">", "Converts", "the", "character", "to", "the", "Integer", "it", "represents", "throwing", "an", "exception", "if", "the", "character", "is", "not", "numeric", ".", "<", "/", "p", ">" ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/CharUtils.java#L227-L232
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/Robotstxt.java
Robotstxt.getDirectivesFor
public RobotsDirectives getDirectivesFor(String ua, boolean useFallbacks) { """ Return the RobotsDirectives, if any, appropriate for the given User-Agent string. If useFallbacks is true, a wildcard ('*') directives or the default of NO_DIRECTIVES will be returned, as appropriate, if there is no better match. If...
java
public RobotsDirectives getDirectivesFor(String ua, boolean useFallbacks) { // find matching ua for(String uaListed : namedUserAgents) { if(ua.indexOf(uaListed)>-1) { return agentsToDirectives.get(uaListed); } } if(useFallbacks==false) { ...
[ "public", "RobotsDirectives", "getDirectivesFor", "(", "String", "ua", ",", "boolean", "useFallbacks", ")", "{", "// find matching ua", "for", "(", "String", "uaListed", ":", "namedUserAgents", ")", "{", "if", "(", "ua", ".", "indexOf", "(", "uaListed", ")", "...
Return the RobotsDirectives, if any, appropriate for the given User-Agent string. If useFallbacks is true, a wildcard ('*') directives or the default of NO_DIRECTIVES will be returned, as appropriate, if there is no better match. If useFallbacks is false, a null will be returned if no declared directives targeted the g...
[ "Return", "the", "RobotsDirectives", "if", "any", "appropriate", "for", "the", "given", "User", "-", "Agent", "string", ".", "If", "useFallbacks", "is", "true", "a", "wildcard", "(", "*", ")", "directives", "or", "the", "default", "of", "NO_DIRECTIVES", "wil...
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/Robotstxt.java#L207-L222
jtmelton/appsensor
execution-modes/appsensor-kafka-server/src/main/java/org/owasp/appsensor/kafka/KafkaRequestHandler.java
KafkaRequestHandler.onAdd
@Override public void onAdd(Response response) { """ This implementation of onAdd watches for responses, and immediately sends them out to the appropriate exchange/queue for routing to the necessary client application(s) """ ensureInitialized(); KeyValuePair keyValuePair = new KeyValuePair(KafkaConstant...
java
@Override public void onAdd(Response response) { ensureInitialized(); KeyValuePair keyValuePair = new KeyValuePair(KafkaConstants.RESPONSE_TYPE, gson.toJson(response)); String message = gson.toJson(keyValuePair); try { kafkaSender.send(buildTopicNames(response), message); } catch (InterruptedException...
[ "@", "Override", "public", "void", "onAdd", "(", "Response", "response", ")", "{", "ensureInitialized", "(", ")", ";", "KeyValuePair", "keyValuePair", "=", "new", "KeyValuePair", "(", "KafkaConstants", ".", "RESPONSE_TYPE", ",", "gson", ".", "toJson", "(", "re...
This implementation of onAdd watches for responses, and immediately sends them out to the appropriate exchange/queue for routing to the necessary client application(s)
[ "This", "implementation", "of", "onAdd", "watches", "for", "responses", "and", "immediately", "sends", "them", "out", "to", "the", "appropriate", "exchange", "/", "queue", "for", "routing", "to", "the", "necessary", "client", "application", "(", "s", ")" ]
train
https://github.com/jtmelton/appsensor/blob/c3b4e9ada50fdee974e0d618ec4bdfabc2163798/execution-modes/appsensor-kafka-server/src/main/java/org/owasp/appsensor/kafka/KafkaRequestHandler.java#L136-L148
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/commons/ChunkFrequencyManager.java
ChunkFrequencyManager.getChunkId
private int getChunkId(String chromosome, int chunk64k) { """ Get the chunk ID from the map of chunks. @param chromosome Chromosome of the chunk target @param chunk64k Number of 64k chunk @return Chunk ID in the database """ int chunkId, pos = chunk64k * chunkSize64k + 1; ...
java
private int getChunkId(String chromosome, int chunk64k) { int chunkId, pos = chunk64k * chunkSize64k + 1; String key = buildChunkMapKey(chromosome, pos); if (chunkIdMap.containsKey(key)) { chunkId = chunkIdMap.get(key); } else { throw new InternalError("Coverage c...
[ "private", "int", "getChunkId", "(", "String", "chromosome", ",", "int", "chunk64k", ")", "{", "int", "chunkId", ",", "pos", "=", "chunk64k", "*", "chunkSize64k", "+", "1", ";", "String", "key", "=", "buildChunkMapKey", "(", "chromosome", ",", "pos", ")", ...
Get the chunk ID from the map of chunks. @param chromosome Chromosome of the chunk target @param chunk64k Number of 64k chunk @return Chunk ID in the database
[ "Get", "the", "chunk", "ID", "from", "the", "map", "of", "chunks", "." ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/commons/ChunkFrequencyManager.java#L651-L661
aicer/hibiscus-http-client
src/main/java/org/aicer/hibiscus/util/StringUtils.java
StringUtils.implodeParams
public static final String implodeParams(final Object[] params, final String glue) { """ Converts and array of objects into a concatenated string @param params @param glue @return """ String returnValue = ""; if (params.length == 1) { return params[0].toString(); } ...
java
public static final String implodeParams(final Object[] params, final String glue) { String returnValue = ""; if (params.length == 1) { return params[0].toString(); } returnValue += params[0]; for (int i =1; i < params.length; i++) { returnValue += glue + par...
[ "public", "static", "final", "String", "implodeParams", "(", "final", "Object", "[", "]", "params", ",", "final", "String", "glue", ")", "{", "String", "returnValue", "=", "\"\"", ";", "if", "(", "params", ".", "length", "==", "1", ")", "{", "return", ...
Converts and array of objects into a concatenated string @param params @param glue @return
[ "Converts", "and", "array", "of", "objects", "into", "a", "concatenated", "string" ]
train
https://github.com/aicer/hibiscus-http-client/blob/a037e3cf8d4bb862d38a55a090778736a48d67cc/src/main/java/org/aicer/hibiscus/util/StringUtils.java#L41-L56
dmak/jaxb-xew-plugin
src/main/java/com/sun/tools/xjc/addon/xew/CommonUtils.java
CommonUtils.getAnnotation
public static JAnnotationUse getAnnotation(JAnnotatable annotatable, JClass annotationClass) { """ Returns the annotation for the given field. This method has side effect as it initailizes the lazy list of annotations on the given {@code annotatable}. """ for (JAnnotationUse annotation : annotatable.annotat...
java
public static JAnnotationUse getAnnotation(JAnnotatable annotatable, JClass annotationClass) { for (JAnnotationUse annotation : annotatable.annotations()) { if (annotation.getAnnotationClass().equals(annotationClass)) { return annotation; } } return null; }
[ "public", "static", "JAnnotationUse", "getAnnotation", "(", "JAnnotatable", "annotatable", ",", "JClass", "annotationClass", ")", "{", "for", "(", "JAnnotationUse", "annotation", ":", "annotatable", ".", "annotations", "(", ")", ")", "{", "if", "(", "annotation", ...
Returns the annotation for the given field. This method has side effect as it initailizes the lazy list of annotations on the given {@code annotatable}.
[ "Returns", "the", "annotation", "for", "the", "given", "field", ".", "This", "method", "has", "side", "effect", "as", "it", "initailizes", "the", "lazy", "list", "of", "annotations", "on", "the", "given", "{" ]
train
https://github.com/dmak/jaxb-xew-plugin/blob/d564d6bf8e50c46b056cdb4b46d1d4bee4adfbe3/src/main/java/com/sun/tools/xjc/addon/xew/CommonUtils.java#L61-L69
alkacon/opencms-core
src/org/opencms/search/CmsSearchIndex.java
CmsSearchIndex.getTermQueryFilter
protected Query getTermQueryFilter(String field, String term) { """ Returns a cached Lucene term query filter for the given field and term.<p> @param field the field to use @param term the term to use @return a cached Lucene term query filter for the given field and term """ return getMultiTerm...
java
protected Query getTermQueryFilter(String field, String term) { return getMultiTermQueryFilter(field, term, Collections.singletonList(term)); }
[ "protected", "Query", "getTermQueryFilter", "(", "String", "field", ",", "String", "term", ")", "{", "return", "getMultiTermQueryFilter", "(", "field", ",", "term", ",", "Collections", ".", "singletonList", "(", "term", ")", ")", ";", "}" ]
Returns a cached Lucene term query filter for the given field and term.<p> @param field the field to use @param term the term to use @return a cached Lucene term query filter for the given field and term
[ "Returns", "a", "cached", "Lucene", "term", "query", "filter", "for", "the", "given", "field", "and", "term", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/CmsSearchIndex.java#L1745-L1748
GoogleCloudPlatform/appengine-mapreduce
java/src/main/java/com/google/appengine/tools/mapreduce/impl/BigQuerySchemaMarshallerByType.java
BigQuerySchemaMarshallerByType.validateType
private void validateType(Class<?> type, Map<Field, BigqueryFieldMarshaller> marshallers) { """ Validates that the type can be marshalled by using using the provided marshallers and the internal marshallers to determine whether {@link TableSchema} can be generated for the given type. @param type to validate. ...
java
private void validateType(Class<?> type, Map<Field, BigqueryFieldMarshaller> marshallers) { if (typeToField.containsKey(type)) { throw new IllegalArgumentException(this.type + " contains cyclic reference for the field with type " + type + ". Hence cannot be resolved into bigquery schema.")...
[ "private", "void", "validateType", "(", "Class", "<", "?", ">", "type", ",", "Map", "<", "Field", ",", "BigqueryFieldMarshaller", ">", "marshallers", ")", "{", "if", "(", "typeToField", ".", "containsKey", "(", "type", ")", ")", "{", "throw", "new", "Ill...
Validates that the type can be marshalled by using using the provided marshallers and the internal marshallers to determine whether {@link TableSchema} can be generated for the given type. @param type to validate. @param marshallers map of field to {@link BigqueryFieldMarshaller} for unsupported fields.
[ "Validates", "that", "the", "type", "can", "be", "marshalled", "by", "using", "using", "the", "provided", "marshallers", "and", "the", "internal", "marshallers", "to", "determine", "whether", "{", "@link", "TableSchema", "}", "can", "be", "generated", "for", "...
train
https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/2045eb3605b6ecb40c83d11dd5442a89fe5c5dd6/java/src/main/java/com/google/appengine/tools/mapreduce/impl/BigQuerySchemaMarshallerByType.java#L131-L150
hal/core
gui/src/main/java/org/jboss/as/console/client/core/CircuitPresenter.java
CircuitPresenter.onError
protected void onError(Action action, Throwable t) { """ When this method is called it's guaranteed that the presenter is visible. """ Console.error(Console.CONSTANTS.lastActionError(), t.getMessage()); }
java
protected void onError(Action action, Throwable t) { Console.error(Console.CONSTANTS.lastActionError(), t.getMessage()); }
[ "protected", "void", "onError", "(", "Action", "action", ",", "Throwable", "t", ")", "{", "Console", ".", "error", "(", "Console", ".", "CONSTANTS", ".", "lastActionError", "(", ")", ",", "t", ".", "getMessage", "(", ")", ")", ";", "}" ]
When this method is called it's guaranteed that the presenter is visible.
[ "When", "this", "method", "is", "called", "it", "s", "guaranteed", "that", "the", "presenter", "is", "visible", "." ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/core/CircuitPresenter.java#L116-L118
hawkular/hawkular-apm
client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java
RuleHelper.removeAfter
public String removeAfter(String original, String marker) { """ This method removes the end part of a string beginning at a specified marker. @param original The original string @param marker The marker identifying the point to remove from @return The modified string """ int index = original.inde...
java
public String removeAfter(String original, String marker) { int index = original.indexOf(marker); if (index != -1) { return original.substring(0, index); } return original; }
[ "public", "String", "removeAfter", "(", "String", "original", ",", "String", "marker", ")", "{", "int", "index", "=", "original", ".", "indexOf", "(", "marker", ")", ";", "if", "(", "index", "!=", "-", "1", ")", "{", "return", "original", ".", "substri...
This method removes the end part of a string beginning at a specified marker. @param original The original string @param marker The marker identifying the point to remove from @return The modified string
[ "This", "method", "removes", "the", "end", "part", "of", "a", "string", "beginning", "at", "a", "specified", "marker", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/instrumenter/src/main/java/org/hawkular/apm/instrumenter/RuleHelper.java#L285-L291
infinispan/infinispan
query-dsl/src/main/java/org/infinispan/query/dsl/impl/QueryStringCreator.java
QueryStringCreator.parentIsNotOfClass
private boolean parentIsNotOfClass(BaseCondition condition, Class<? extends BooleanCondition> expectedParentClass) { """ We check if the parent if of the expected class, hoping that if it is then we can avoid wrapping this condition in parentheses and still maintain the same logic. @return {@code true} if wrap...
java
private boolean parentIsNotOfClass(BaseCondition condition, Class<? extends BooleanCondition> expectedParentClass) { BaseCondition parent = condition.getParent(); return parent != null && parent.getClass() != expectedParentClass; }
[ "private", "boolean", "parentIsNotOfClass", "(", "BaseCondition", "condition", ",", "Class", "<", "?", "extends", "BooleanCondition", ">", "expectedParentClass", ")", "{", "BaseCondition", "parent", "=", "condition", ".", "getParent", "(", ")", ";", "return", "par...
We check if the parent if of the expected class, hoping that if it is then we can avoid wrapping this condition in parentheses and still maintain the same logic. @return {@code true} if wrapping is needed, {@code false} otherwise
[ "We", "check", "if", "the", "parent", "if", "of", "the", "expected", "class", "hoping", "that", "if", "it", "is", "then", "we", "can", "avoid", "wrapping", "this", "condition", "in", "parentheses", "and", "still", "maintain", "the", "same", "logic", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query-dsl/src/main/java/org/infinispan/query/dsl/impl/QueryStringCreator.java#L264-L267
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/AttributeQuery.java
AttributeQuery.executeOneCompleteStmt
protected boolean executeOneCompleteStmt(final String _complStmt) throws EFapsException { """ Execute the actual statement against the database. @param _complStmt Statment to be executed @return true if executed with success @throws EFapsException on error """ final boolean ret = fals...
java
protected boolean executeOneCompleteStmt(final String _complStmt) throws EFapsException { final boolean ret = false; ConnectionResource con = null; try { con = Context.getThreadContext().getConnectionResource(); if (AbstractObjectQuery.LOG.isDebugEnabled()) { ...
[ "protected", "boolean", "executeOneCompleteStmt", "(", "final", "String", "_complStmt", ")", "throws", "EFapsException", "{", "final", "boolean", "ret", "=", "false", ";", "ConnectionResource", "con", "=", "null", ";", "try", "{", "con", "=", "Context", ".", "...
Execute the actual statement against the database. @param _complStmt Statment to be executed @return true if executed with success @throws EFapsException on error
[ "Execute", "the", "actual", "statement", "against", "the", "database", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AttributeQuery.java#L202-L226
ThreeTen/threetenbp
src/main/java/org/threeten/bp/jdk8/Jdk8Methods.java
Jdk8Methods.requireNonNull
public static <T> T requireNonNull(T value, String parameterName) { """ Ensures that the argument is non-null. @param <T> the value type @param value the value to check @param parameterName the name of the parameter @return the checked non-null value @throws NullPointerException if the value is null ...
java
public static <T> T requireNonNull(T value, String parameterName) { if (value == null) { throw new NullPointerException(parameterName + " must not be null"); } return value; }
[ "public", "static", "<", "T", ">", "T", "requireNonNull", "(", "T", "value", ",", "String", "parameterName", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "parameterName", "+", "\" must not be null\"", ")"...
Ensures that the argument is non-null. @param <T> the value type @param value the value to check @param parameterName the name of the parameter @return the checked non-null value @throws NullPointerException if the value is null
[ "Ensures", "that", "the", "argument", "is", "non", "-", "null", "." ]
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/jdk8/Jdk8Methods.java#L77-L82
alkacon/opencms-core
src/org/opencms/widgets/CmsLocalizationWidget.java
CmsLocalizationWidget.getValue
private String getValue(CmsObject cms, I_CmsWidgetParameter param) { """ Determine value to show in editor.<p> @param cms an initialized instance of a CmsObject @param param the widget parameter to generate the widget for @return value to show in editor """ String value = m_messages.key(m_bundleK...
java
private String getValue(CmsObject cms, I_CmsWidgetParameter param) { String value = m_messages.key(m_bundleKey); if ((CmsStringUtil.isNotEmptyOrWhitespaceOnly(param.getStringValue(cms)) && !value.equals(param.getStringValue(cms))) || value.startsWith(CmsMessages.UNKNOWN_KEY_EXTENSION)) { ...
[ "private", "String", "getValue", "(", "CmsObject", "cms", ",", "I_CmsWidgetParameter", "param", ")", "{", "String", "value", "=", "m_messages", ".", "key", "(", "m_bundleKey", ")", ";", "if", "(", "(", "CmsStringUtil", ".", "isNotEmptyOrWhitespaceOnly", "(", "...
Determine value to show in editor.<p> @param cms an initialized instance of a CmsObject @param param the widget parameter to generate the widget for @return value to show in editor
[ "Determine", "value", "to", "show", "in", "editor", ".", "<p", ">", "@param", "cms", "an", "initialized", "instance", "of", "a", "CmsObject", "@param", "param", "the", "widget", "parameter", "to", "generate", "the", "widget", "for" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/CmsLocalizationWidget.java#L344-L363
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/db/user/UserManager.java
UserManager.executeWithTxUser
public <T> T executeWithTxUser(final String user, final SpecificUserAction<T> userAction) { """ Changes current connection user. See {@link #executeWithTxUser( com.orientechnologies.orient.core.metadata.security.OSecurityUser, SpecificUserAction)}. <p> LIMITATION: current user must have read right on users tabl...
java
public <T> T executeWithTxUser(final String user, final SpecificUserAction<T> userAction) { final boolean userChanged = checkSpecificUserConditions(user); final ODatabaseDocument db = connectionProvider.get(); final T res; if (userChanged) { // this may cause security excepti...
[ "public", "<", "T", ">", "T", "executeWithTxUser", "(", "final", "String", "user", ",", "final", "SpecificUserAction", "<", "T", ">", "userAction", ")", "{", "final", "boolean", "userChanged", "=", "checkSpecificUserConditions", "(", "user", ")", ";", "final",...
Changes current connection user. See {@link #executeWithTxUser( com.orientechnologies.orient.core.metadata.security.OSecurityUser, SpecificUserAction)}. <p> LIMITATION: current user must have read right on users table. @param user user login @param userAction logic to execute with specific user @param <T> ...
[ "Changes", "current", "connection", "user", ".", "See", "{", "@link", "#executeWithTxUser", "(", "com", ".", "orientechnologies", ".", "orient", ".", "core", ".", "metadata", ".", "security", ".", "OSecurityUser", "SpecificUserAction", ")", "}", ".", "<p", ">"...
train
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/db/user/UserManager.java#L130-L143
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java
PrimaveraPMFileReader.readUDFTypes
private void readUDFTypes(FieldContainer mpxj, List<UDFAssignmentType> udfs) { """ Process UDFs for a specific object. @param mpxj field container @param udfs UDF values """ for (UDFAssignmentType udf : udfs) { FieldType fieldType = m_fieldTypeMap.get(Integer.valueOf(udf.getTypeObjectI...
java
private void readUDFTypes(FieldContainer mpxj, List<UDFAssignmentType> udfs) { for (UDFAssignmentType udf : udfs) { FieldType fieldType = m_fieldTypeMap.get(Integer.valueOf(udf.getTypeObjectId())); if (fieldType != null) { mpxj.set(fieldType, getUdfValue(udf)); ...
[ "private", "void", "readUDFTypes", "(", "FieldContainer", "mpxj", ",", "List", "<", "UDFAssignmentType", ">", "udfs", ")", "{", "for", "(", "UDFAssignmentType", "udf", ":", "udfs", ")", "{", "FieldType", "fieldType", "=", "m_fieldTypeMap", ".", "get", "(", "...
Process UDFs for a specific object. @param mpxj field container @param udfs UDF values
[ "Process", "UDFs", "for", "a", "specific", "object", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraPMFileReader.java#L1052-L1062