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
landawn/AbacusUtil
src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java
PoolablePreparedStatement.setAsciiStream
@Override public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { """ Method setAsciiStream. @param parameterIndex @param x @param length @throws SQLException @see java.sql.PreparedStatement#setAsciiStream(int, InputStream, int) """ internalStmt.setA...
java
@Override public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException { internalStmt.setAsciiStream(parameterIndex, x, length); }
[ "@", "Override", "public", "void", "setAsciiStream", "(", "int", "parameterIndex", ",", "InputStream", "x", ",", "int", "length", ")", "throws", "SQLException", "{", "internalStmt", ".", "setAsciiStream", "(", "parameterIndex", ",", "x", ",", "length", ")", ";...
Method setAsciiStream. @param parameterIndex @param x @param length @throws SQLException @see java.sql.PreparedStatement#setAsciiStream(int, InputStream, int)
[ "Method", "setAsciiStream", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/dataSource/PoolablePreparedStatement.java#L470-L473
axibase/atsd-api-java
src/main/java/com/axibase/tsd/model/data/series/Sample.java
Sample.ofIsoDoubleText
public static Sample ofIsoDoubleText(String isoDate, double numericValue, String textValue) { """ Creates a new {@link Sample} with date in ISO 8061 format, double and text value specified @param isoDate date in ISO 8061 format according to <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> @par...
java
public static Sample ofIsoDoubleText(String isoDate, double numericValue, String textValue) { return new Sample(null, isoDate, null, textValue) .setNumericValueFromDouble(numericValue); }
[ "public", "static", "Sample", "ofIsoDoubleText", "(", "String", "isoDate", ",", "double", "numericValue", ",", "String", "textValue", ")", "{", "return", "new", "Sample", "(", "null", ",", "isoDate", ",", "null", ",", "textValue", ")", ".", "setNumericValueFro...
Creates a new {@link Sample} with date in ISO 8061 format, double and text value specified @param isoDate date in ISO 8061 format according to <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> @param numericValue the numeric value of the sample @param textValue the text value of the sample @return ...
[ "Creates", "a", "new", "{", "@link", "Sample", "}", "with", "date", "in", "ISO", "8061", "format", "double", "and", "text", "value", "specified" ]
train
https://github.com/axibase/atsd-api-java/blob/63a0767d08b202dad2ebef4372ff947d6fba0246/src/main/java/com/axibase/tsd/model/data/series/Sample.java#L106-L109
duracloud/duracloud
s3storageprovider/src/main/java/org/duracloud/s3task/streaming/EnableStreamingTaskRunner.java
EnableStreamingTaskRunner.setBucketAccessPolicy
private void setBucketAccessPolicy(String bucketName, String oaIdentityId) { """ /* Updates the bucket policy to allow GET access to the cloudfront origin access identity. This allows Cloudfront to access content in S3 @return results of the ACL setting activity """ CloudFrontOriginAccessIdentity ...
java
private void setBucketAccessPolicy(String bucketName, String oaIdentityId) { CloudFrontOriginAccessIdentity cfOAIdentity = cfClient.getCloudFrontOriginAccessIdentity( new GetCloudFrontOriginAccessIdentityRequest(oaIdentityId)) .getCloudFrontOriginAccessIdentity();...
[ "private", "void", "setBucketAccessPolicy", "(", "String", "bucketName", ",", "String", "oaIdentityId", ")", "{", "CloudFrontOriginAccessIdentity", "cfOAIdentity", "=", "cfClient", ".", "getCloudFrontOriginAccessIdentity", "(", "new", "GetCloudFrontOriginAccessIdentityRequest",...
/* Updates the bucket policy to allow GET access to the cloudfront origin access identity. This allows Cloudfront to access content in S3 @return results of the ACL setting activity
[ "/", "*", "Updates", "the", "bucket", "policy", "to", "allow", "GET", "access", "to", "the", "cloudfront", "origin", "access", "identity", ".", "This", "allows", "Cloudfront", "to", "access", "content", "in", "S3" ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/s3storageprovider/src/main/java/org/duracloud/s3task/streaming/EnableStreamingTaskRunner.java#L192-L210
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/VoiceApi.java
VoiceApi.initiateConference
public ApiSuccessResponse initiateConference(String id, InitiateConferenceData initiateConferenceData) throws ApiException { """ Initiate a conference Initiate a two-step conference to the specified destination. This places the existing call on hold and creates a new call in the dialing state (step 1). After init...
java
public ApiSuccessResponse initiateConference(String id, InitiateConferenceData initiateConferenceData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = initiateConferenceWithHttpInfo(id, initiateConferenceData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "initiateConference", "(", "String", "id", ",", "InitiateConferenceData", "initiateConferenceData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "initiateConferenceWithHttpInfo", "(", "id", ...
Initiate a conference Initiate a two-step conference to the specified destination. This places the existing call on hold and creates a new call in the dialing state (step 1). After initiating the conference you can use [/voice/calls/{id}/complete-conference](/reference/workspace/Voice/index.html#completeConference) to ...
[ "Initiate", "a", "conference", "Initiate", "a", "two", "-", "step", "conference", "to", "the", "specified", "destination", ".", "This", "places", "the", "existing", "call", "on", "hold", "and", "creates", "a", "new", "call", "in", "the", "dialing", "state", ...
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/VoiceApi.java#L1837-L1840
Red5/red5-server-common
src/main/java/org/red5/server/so/SharedObjectScope.java
SharedObjectScope.isSendAllowed
protected boolean isSendAllowed(String message, List<?> arguments) { """ Call handlers and check if sending a message to the clients connected to the SO is allowed. @param message message @param arguments arguments @return is send allowed """ // check internal handlers first for (IShar...
java
protected boolean isSendAllowed(String message, List<?> arguments) { // check internal handlers first for (ISharedObjectSecurity handler : securityHandlers) { if (!handler.isSendAllowed(this, message, arguments)) { return false; } } // check...
[ "protected", "boolean", "isSendAllowed", "(", "String", "message", ",", "List", "<", "?", ">", "arguments", ")", "{", "// check internal handlers first\r", "for", "(", "ISharedObjectSecurity", "handler", ":", "securityHandlers", ")", "{", "if", "(", "!", "handler"...
Call handlers and check if sending a message to the clients connected to the SO is allowed. @param message message @param arguments arguments @return is send allowed
[ "Call", "handlers", "and", "check", "if", "sending", "a", "message", "to", "the", "clients", "connected", "to", "the", "SO", "is", "allowed", "." ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/so/SharedObjectScope.java#L585-L603
jayantk/jklol
src/com/jayantkrish/jklol/cfg/CfgParser.java
CfgParser.calculateOutside
private void calculateOutside(int spanStart, int spanEnd, CfgParseChart chart, double[] newValues) { """ /* Calculate a single outside probability entry (and its corresponding marginal). """ Factor parentOutside = chart.getOutsideEntries(spanStart, spanEnd); Tensor parentWeights = parentOutside.coerc...
java
private void calculateOutside(int spanStart, int spanEnd, CfgParseChart chart, double[] newValues) { Factor parentOutside = chart.getOutsideEntries(spanStart, spanEnd); Tensor parentWeights = parentOutside.coerceToDiscrete().getWeights(); Tensor binaryDistributionWeights = binaryDistribution.coerceToDiscre...
[ "private", "void", "calculateOutside", "(", "int", "spanStart", ",", "int", "spanEnd", ",", "CfgParseChart", "chart", ",", "double", "[", "]", "newValues", ")", "{", "Factor", "parentOutside", "=", "chart", ".", "getOutsideEntries", "(", "spanStart", ",", "spa...
/* Calculate a single outside probability entry (and its corresponding marginal).
[ "/", "*", "Calculate", "a", "single", "outside", "probability", "entry", "(", "and", "its", "corresponding", "marginal", ")", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/cfg/CfgParser.java#L485-L518
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java
SARLQuickfixProvider.fixReturnTypeRecommended
@Fix(io.sarl.lang.validation.IssueCodes.RETURN_TYPE_SPECIFICATION_IS_RECOMMENDED) public void fixReturnTypeRecommended(final Issue issue, IssueResolutionAcceptor acceptor) { """ Quick fix for "Return type is recommended". @param issue the issue. @param acceptor the quick fix acceptor. """ ReturnTypeAddM...
java
@Fix(io.sarl.lang.validation.IssueCodes.RETURN_TYPE_SPECIFICATION_IS_RECOMMENDED) public void fixReturnTypeRecommended(final Issue issue, IssueResolutionAcceptor acceptor) { ReturnTypeAddModification.accept(this, issue, acceptor); }
[ "@", "Fix", "(", "io", ".", "sarl", ".", "lang", ".", "validation", ".", "IssueCodes", ".", "RETURN_TYPE_SPECIFICATION_IS_RECOMMENDED", ")", "public", "void", "fixReturnTypeRecommended", "(", "final", "Issue", "issue", ",", "IssueResolutionAcceptor", "acceptor", ")"...
Quick fix for "Return type is recommended". @param issue the issue. @param acceptor the quick fix acceptor.
[ "Quick", "fix", "for", "Return", "type", "is", "recommended", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java#L876-L879
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractGeneratorConfigurationBlock.java
AbstractGeneratorConfigurationBlock.createExperimentalWarningMessage
protected void createExperimentalWarningMessage(Composite composite) { """ Create the "experimental" warning message. @param composite the parent. """ final Label dangerIcon = new Label(composite, SWT.WRAP); dangerIcon.setImage(getImage(IMAGE)); final GridData labelLayoutData = new GridData(); label...
java
protected void createExperimentalWarningMessage(Composite composite) { final Label dangerIcon = new Label(composite, SWT.WRAP); dangerIcon.setImage(getImage(IMAGE)); final GridData labelLayoutData = new GridData(); labelLayoutData.horizontalIndent = 0; dangerIcon.setLayoutData(labelLayoutData); }
[ "protected", "void", "createExperimentalWarningMessage", "(", "Composite", "composite", ")", "{", "final", "Label", "dangerIcon", "=", "new", "Label", "(", "composite", ",", "SWT", ".", "WRAP", ")", ";", "dangerIcon", ".", "setImage", "(", "getImage", "(", "IM...
Create the "experimental" warning message. @param composite the parent.
[ "Create", "the", "experimental", "warning", "message", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractGeneratorConfigurationBlock.java#L369-L375
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java
BDBRepository.txn_begin
Txn txn_begin(Txn parent, IsolationLevel level, int timeout, TimeUnit unit) throws Exception { """ Subclass should override this method to actually apply the timeout """ return txn_begin(parent, level); }
java
Txn txn_begin(Txn parent, IsolationLevel level, int timeout, TimeUnit unit) throws Exception { return txn_begin(parent, level); }
[ "Txn", "txn_begin", "(", "Txn", "parent", ",", "IsolationLevel", "level", ",", "int", "timeout", ",", "TimeUnit", "unit", ")", "throws", "Exception", "{", "return", "txn_begin", "(", "parent", ",", "level", ")", ";", "}" ]
Subclass should override this method to actually apply the timeout
[ "Subclass", "should", "override", "this", "method", "to", "actually", "apply", "the", "timeout" ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java#L655-L657
EdwardRaff/JSAT
JSAT/src/jsat/linear/Matrix.java
Matrix.getRow
public Vec getRow(int r) { """ Creates a vector that has a copy of the values in row <i>i</i> of this matrix. Altering it will not effect the values in <i>this</i> matrix. @param r the row to copy @return a clone of the row as a {@link Vec} """ if(r < 0 || r >= rows()) throw new Arithmet...
java
public Vec getRow(int r) { if(r < 0 || r >= rows()) throw new ArithmeticException("Row was not a valid value " + r + " not in [0," + (rows()-1) + "]"); DenseVector c = new DenseVector(cols()); for(int j =0; j < cols(); j++) c.set(j, get(r, j)); return c; }
[ "public", "Vec", "getRow", "(", "int", "r", ")", "{", "if", "(", "r", "<", "0", "||", "r", ">=", "rows", "(", ")", ")", "throw", "new", "ArithmeticException", "(", "\"Row was not a valid value \"", "+", "r", "+", "\" not in [0,\"", "+", "(", "rows", "(...
Creates a vector that has a copy of the values in row <i>i</i> of this matrix. Altering it will not effect the values in <i>this</i> matrix. @param r the row to copy @return a clone of the row as a {@link Vec}
[ "Creates", "a", "vector", "that", "has", "a", "copy", "of", "the", "values", "in", "row", "<i", ">", "i<", "/", "i", ">", "of", "this", "matrix", ".", "Altering", "it", "will", "not", "effect", "the", "values", "in", "<i", ">", "this<", "/", "i", ...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/Matrix.java#L682-L690
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.addRelationToResource
public void addRelationToResource( CmsDbContext dbc, CmsResource resource, CmsResource target, CmsRelationType type, boolean importCase) throws CmsException { """ Adds a new relation to the given resource.<p> @param dbc the database context @param resource the resour...
java
public void addRelationToResource( CmsDbContext dbc, CmsResource resource, CmsResource target, CmsRelationType type, boolean importCase) throws CmsException { if (type.isDefinedInContent()) { throw new CmsIllegalArgumentException( Messages...
[ "public", "void", "addRelationToResource", "(", "CmsDbContext", "dbc", ",", "CmsResource", "resource", ",", "CmsResource", "target", ",", "CmsRelationType", "type", ",", "boolean", "importCase", ")", "throws", "CmsException", "{", "if", "(", "type", ".", "isDefine...
Adds a new relation to the given resource.<p> @param dbc the database context @param resource the resource to add the relation to @param target the target of the relation @param type the type of the relation @param importCase if importing relations @throws CmsException if something goes wrong
[ "Adds", "a", "new", "relation", "to", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L576-L607
usc/wechat-mp-sdk
wechat-mp-sdk/src/main/java/org/usc/wechat/mp/sdk/util/ReplyUtil.java
ReplyUtil.getDummyTextReplyDetailWarpper
public static ReplyDetailWarpper getDummyTextReplyDetailWarpper() { """ dummy reply. please according to your own situation to build ReplyDetailWarpper, and remove those code in production. """ ReplyDetail replyDetail = new ReplyDetail(); replyDetail.setDescription("欢迎订阅javatech,这是微信公众平台开发模式的一个...
java
public static ReplyDetailWarpper getDummyTextReplyDetailWarpper() { ReplyDetail replyDetail = new ReplyDetail(); replyDetail.setDescription("欢迎订阅javatech,这是微信公众平台开发模式的一个尝试,更多详情请见 https://github.com/usc/wechat-mp-sdk \n" + "Welcome subscribe javatech, this is an attempt to development mod...
[ "public", "static", "ReplyDetailWarpper", "getDummyTextReplyDetailWarpper", "(", ")", "{", "ReplyDetail", "replyDetail", "=", "new", "ReplyDetail", "(", ")", ";", "replyDetail", ".", "setDescription", "(", "\"欢迎订阅javatech,这是微信公众平台开发模式的一个尝试,更多详情请见 https://github.com/usc/wechat-m...
dummy reply. please according to your own situation to build ReplyDetailWarpper, and remove those code in production.
[ "dummy", "reply", ".", "please", "according", "to", "your", "own", "situation", "to", "build", "ReplyDetailWarpper", "and", "remove", "those", "code", "in", "production", "." ]
train
https://github.com/usc/wechat-mp-sdk/blob/39d9574a8e3ffa3b61f88b4bef534d93645a825f/wechat-mp-sdk/src/main/java/org/usc/wechat/mp/sdk/util/ReplyUtil.java#L65-L71
graknlabs/grakn
server/src/server/kb/concept/ConceptUtils.java
ConceptUtils.mergeAnswers
public static ConceptMap mergeAnswers(ConceptMap answerA, ConceptMap answerB) { """ perform an answer merge with optional explanation NB:assumes answers are compatible (concept corresponding to join vars if any are the same) @return merged answer """ if (answerB.isEmpty()) return answerA; i...
java
public static ConceptMap mergeAnswers(ConceptMap answerA, ConceptMap answerB) { if (answerB.isEmpty()) return answerA; if (answerA.isEmpty()) return answerB; Sets.SetView<Variable> varUnion = Sets.union(answerA.vars(), answerB.vars()); Set<Variable> varIntersection = Sets.intersection(a...
[ "public", "static", "ConceptMap", "mergeAnswers", "(", "ConceptMap", "answerA", ",", "ConceptMap", "answerB", ")", "{", "if", "(", "answerB", ".", "isEmpty", "(", ")", ")", "return", "answerA", ";", "if", "(", "answerA", ".", "isEmpty", "(", ")", ")", "r...
perform an answer merge with optional explanation NB:assumes answers are compatible (concept corresponding to join vars if any are the same) @return merged answer
[ "perform", "an", "answer", "merge", "with", "optional", "explanation", "NB", ":", "assumes", "answers", "are", "compatible", "(", "concept", "corresponding", "to", "join", "vars", "if", "any", "are", "the", "same", ")" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/server/kb/concept/ConceptUtils.java#L118-L154
kaichunlin/android-transition
core/src/main/java/com/kaichunlin/transition/AbstractTransitionBuilder.java
AbstractTransitionBuilder.delayAlpha
public T delayAlpha(@FloatRange(from = 0.0, to = 1.0) float end) { """ Similar to alpha(float), but wait until the transition is about to start to perform the evaluation. @param end @return self """ getDelayedProcessor().addProcess(ALPHA, end); return self(); }
java
public T delayAlpha(@FloatRange(from = 0.0, to = 1.0) float end) { getDelayedProcessor().addProcess(ALPHA, end); return self(); }
[ "public", "T", "delayAlpha", "(", "@", "FloatRange", "(", "from", "=", "0.0", ",", "to", "=", "1.0", ")", "float", "end", ")", "{", "getDelayedProcessor", "(", ")", ".", "addProcess", "(", "ALPHA", ",", "end", ")", ";", "return", "self", "(", ")", ...
Similar to alpha(float), but wait until the transition is about to start to perform the evaluation. @param end @return self
[ "Similar", "to", "alpha", "(", "float", ")", "but", "wait", "until", "the", "transition", "is", "about", "to", "start", "to", "perform", "the", "evaluation", "." ]
train
https://github.com/kaichunlin/android-transition/blob/7b53074206622f5cf5d82091d891a7ed8b9f06cd/core/src/main/java/com/kaichunlin/transition/AbstractTransitionBuilder.java#L195-L198
eyp/serfj
src/main/java/net/sf/serfj/RestController.java
RestController.putParam
protected void putParam(String name, Object object) { """ Adds an object to the request. If a page will be renderer and it needs some objects to work, with this method a developer can add objects to the request, so the page can obtain them. @param name Parameter name @param object Object to put in the request ...
java
protected void putParam(String name, Object object) { this.response.getRequest().setAttribute(name, object); }
[ "protected", "void", "putParam", "(", "String", "name", ",", "Object", "object", ")", "{", "this", ".", "response", ".", "getRequest", "(", ")", ".", "setAttribute", "(", "name", ",", "object", ")", ";", "}" ]
Adds an object to the request. If a page will be renderer and it needs some objects to work, with this method a developer can add objects to the request, so the page can obtain them. @param name Parameter name @param object Object to put in the request
[ "Adds", "an", "object", "to", "the", "request", ".", "If", "a", "page", "will", "be", "renderer", "and", "it", "needs", "some", "objects", "to", "work", "with", "this", "method", "a", "developer", "can", "add", "objects", "to", "the", "request", "so", ...
train
https://github.com/eyp/serfj/blob/e617592af6f24e59ea58443f2785c44aa2312189/src/main/java/net/sf/serfj/RestController.java#L85-L87
phax/ph-pdf-layout
src/main/java/com/helger/pdflayout4/pdfbox/PDPageContentStreamExt.java
PDPageContentStreamExt.setNonStrokingColor
public void setNonStrokingColor (final double c, final double m, final double y, final double k) throws IOException { """ Set the non-stroking color in the DeviceRGB color space. Range is 0..1. @param c The cyan value. @param m The magenta value. @param y The yellow value. @param k The black value. @thr...
java
public void setNonStrokingColor (final double c, final double m, final double y, final double k) throws IOException { if (_isOutsideOneInterval (c) || _isOutsideOneInterval (m) || _isOutsideOneInterval (y) || _isOutsideOneInterval (k)) { throw new IllegalArgumentException ("Param...
[ "public", "void", "setNonStrokingColor", "(", "final", "double", "c", ",", "final", "double", "m", ",", "final", "double", "y", ",", "final", "double", "k", ")", "throws", "IOException", "{", "if", "(", "_isOutsideOneInterval", "(", "c", ")", "||", "_isOut...
Set the non-stroking color in the DeviceRGB color space. Range is 0..1. @param c The cyan value. @param m The magenta value. @param y The yellow value. @param k The black value. @throws IOException If an IO error occurs while writing to the stream.
[ "Set", "the", "non", "-", "stroking", "color", "in", "the", "DeviceRGB", "color", "space", ".", "Range", "is", "0", "..", "1", "." ]
train
https://github.com/phax/ph-pdf-layout/blob/777d9f3a131cbe8f592c0de1cf554084e541bb54/src/main/java/com/helger/pdflayout4/pdfbox/PDPageContentStreamExt.java#L1014-L1036
trellis-ldp/trellis
components/file/src/main/java/org/trellisldp/file/FileUtils.java
FileUtils.getResourceDirectory
public static File getResourceDirectory(final File baseDirectory, final IRI identifier) { """ Get a directory for a given resource identifier. @param baseDirectory the base directory @param identifier a resource identifier @return a directory """ requireNonNull(baseDirectory, "The baseDirectory may ...
java
public static File getResourceDirectory(final File baseDirectory, final IRI identifier) { requireNonNull(baseDirectory, "The baseDirectory may not be null!"); requireNonNull(identifier, "The identifier may not be null!"); final String id = identifier.getIRIString(); final StringJoiner jo...
[ "public", "static", "File", "getResourceDirectory", "(", "final", "File", "baseDirectory", ",", "final", "IRI", "identifier", ")", "{", "requireNonNull", "(", "baseDirectory", ",", "\"The baseDirectory may not be null!\"", ")", ";", "requireNonNull", "(", "identifier", ...
Get a directory for a given resource identifier. @param baseDirectory the base directory @param identifier a resource identifier @return a directory
[ "Get", "a", "directory", "for", "a", "given", "resource", "identifier", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/components/file/src/main/java/org/trellisldp/file/FileUtils.java#L86-L100
alkacon/opencms-core
src-gwt/org/opencms/ugc/client/export/CmsXmlContentUgcApi.java
CmsXmlContentUgcApi.initFormForSession
public void initFormForSession( final String sessionId, final Element formElement, final I_CmsClientCmsUgcSessionCallback onSuccess, final I_CmsErrorCallback onError) { """ Loads a pre-created session.<p> @param sessionId the session id @param formElement the form element @para...
java
public void initFormForSession( final String sessionId, final Element formElement, final I_CmsClientCmsUgcSessionCallback onSuccess, final I_CmsErrorCallback onError) { getRpcHelper().executeRpc(SERVICE.getContent(new CmsUUID(sessionId), new AsyncCallback<CmsUgcContent>() { ...
[ "public", "void", "initFormForSession", "(", "final", "String", "sessionId", ",", "final", "Element", "formElement", ",", "final", "I_CmsClientCmsUgcSessionCallback", "onSuccess", ",", "final", "I_CmsErrorCallback", "onError", ")", "{", "getRpcHelper", "(", ")", ".", ...
Loads a pre-created session.<p> @param sessionId the session id @param formElement the form element @param onSuccess the callback to call in case of success @param onError the callback to call in case of an error
[ "Loads", "a", "pre", "-", "created", "session", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ugc/client/export/CmsXmlContentUgcApi.java#L155-L175
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
Resolve.lookupMethod
Symbol lookupMethod(Env<AttrContext> env, DiagnosticPosition pos, Symbol location, MethodCheck methodCheck, LookupHelper lookupHelper) { """ Main overload resolution routine. On each overload resolution step, a lookup helper class is used to perform the method/constructor lookup; at the end of the lookup, the he...
java
Symbol lookupMethod(Env<AttrContext> env, DiagnosticPosition pos, Symbol location, MethodCheck methodCheck, LookupHelper lookupHelper) { MethodResolutionContext resolveContext = new MethodResolutionContext(); resolveContext.methodCheck = methodCheck; return lookupMethod(env, pos, location, resol...
[ "Symbol", "lookupMethod", "(", "Env", "<", "AttrContext", ">", "env", ",", "DiagnosticPosition", "pos", ",", "Symbol", "location", ",", "MethodCheck", "methodCheck", ",", "LookupHelper", "lookupHelper", ")", "{", "MethodResolutionContext", "resolveContext", "=", "ne...
Main overload resolution routine. On each overload resolution step, a lookup helper class is used to perform the method/constructor lookup; at the end of the lookup, the helper is used to validate the results (this last step might trigger overload resolution diagnostics).
[ "Main", "overload", "resolution", "routine", ".", "On", "each", "overload", "resolution", "step", "a", "lookup", "helper", "class", "is", "used", "to", "perform", "the", "method", "/", "constructor", "lookup", ";", "at", "the", "end", "of", "the", "lookup", ...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java#L3473-L3477
Azure/azure-sdk-for-java
network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkSecurityGroupsInner.java
NetworkSecurityGroupsInner.beginCreateOrUpdateAsync
public Observable<NetworkSecurityGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) { """ Creates or updates a network security group in the specified resource group. @param resourceGroupName The name of the resource group. @par...
java
public Observable<NetworkSecurityGroupInner> beginCreateOrUpdateAsync(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, parameters).map(new Func1<ServiceResponse<Netwo...
[ "public", "Observable", "<", "NetworkSecurityGroupInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "networkSecurityGroupName", ",", "NetworkSecurityGroupInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsy...
Creates or updates a network security group in the specified resource group. @param resourceGroupName The name of the resource group. @param networkSecurityGroupName The name of the network security group. @param parameters Parameters supplied to the create or update network security group operation. @throws IllegalAr...
[ "Creates", "or", "updates", "a", "network", "security", "group", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkSecurityGroupsInner.java#L546-L553
lessthanoptimal/ejml
main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java
CommonOps_ZDRM.columnsToVector
public static ZMatrixRMaj[] columnsToVector(ZMatrixRMaj A, ZMatrixRMaj[] v) { """ Converts the columns in a matrix into a set of vectors. @param A Matrix. Not modified. @param v Optional storage for columns. @return An array of vectors. """ ZMatrixRMaj[]ret; if( v == null || v.length < A....
java
public static ZMatrixRMaj[] columnsToVector(ZMatrixRMaj A, ZMatrixRMaj[] v) { ZMatrixRMaj[]ret; if( v == null || v.length < A.numCols ) { ret = new ZMatrixRMaj[ A.numCols ]; } else { ret = v; } for( int i = 0; i < ret.length; i++ ) { if( r...
[ "public", "static", "ZMatrixRMaj", "[", "]", "columnsToVector", "(", "ZMatrixRMaj", "A", ",", "ZMatrixRMaj", "[", "]", "v", ")", "{", "ZMatrixRMaj", "[", "]", "ret", ";", "if", "(", "v", "==", "null", "||", "v", ".", "length", "<", "A", ".", "numCols...
Converts the columns in a matrix into a set of vectors. @param A Matrix. Not modified. @param v Optional storage for columns. @return An array of vectors.
[ "Converts", "the", "columns", "in", "a", "matrix", "into", "a", "set", "of", "vectors", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-zdense/src/org/ejml/dense/row/CommonOps_ZDRM.java#L1232-L1259
beangle/beangle3
commons/core/src/main/java/org/beangle/commons/collection/MapConverter.java
MapConverter.getDateTime
public Date getDateTime(Map<String, Object> data, String name) { """ <p> getDateTime. </p> @param data a {@link java.util.Map} object. @param name a {@link java.lang.String} object. @return a {@link java.util.Date} object. """ return get(data, name, Date.class); }
java
public Date getDateTime(Map<String, Object> data, String name) { return get(data, name, Date.class); }
[ "public", "Date", "getDateTime", "(", "Map", "<", "String", ",", "Object", ">", "data", ",", "String", "name", ")", "{", "return", "get", "(", "data", ",", "name", ",", "Date", ".", "class", ")", ";", "}" ]
<p> getDateTime. </p> @param data a {@link java.util.Map} object. @param name a {@link java.lang.String} object. @return a {@link java.util.Date} object.
[ "<p", ">", "getDateTime", ".", "<", "/", "p", ">" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/core/src/main/java/org/beangle/commons/collection/MapConverter.java#L231-L233
Azure/azure-sdk-for-java
compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java
DisksInner.beginRevokeAccessAsync
public Observable<Void> beginRevokeAccessAsync(String resourceGroupName, String diskName) { """ Revokes access to a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported c...
java
public Observable<Void> beginRevokeAccessAsync(String resourceGroupName, String diskName) { return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { ...
[ "public", "Observable", "<", "Void", ">", "beginRevokeAccessAsync", "(", "String", "resourceGroupName", ",", "String", "diskName", ")", "{", "return", "beginRevokeAccessWithServiceResponseAsync", "(", "resourceGroupName", ",", "diskName", ")", ".", "map", "(", "new", ...
Revokes access to a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. @throws Illega...
[ "Revokes", "access", "to", "a", "disk", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java#L1214-L1221
OpenLiberty/open-liberty
dev/com.ibm.ws.crypto.passwordutil/src/com/ibm/ws/crypto/util/custom/CustomManifest.java
CustomManifest.getLocalizedString
protected String getLocalizedString(File featureManifest, String value) { """ returns the localized string of specified value. the localization file supposes to be located the l10n directory of the location where the feature manifest file exists, and the name of the resource file is feature symbolic name + _ + ...
java
protected String getLocalizedString(File featureManifest, String value) { if (value != null && value.startsWith("%")) { ResourceBundle res = CustomUtils.getResourceBundle(new File(featureManifest.getParentFile(), "l10n"), featureSymbolicName, Locale.getDefault()); if (res != null) { ...
[ "protected", "String", "getLocalizedString", "(", "File", "featureManifest", ",", "String", "value", ")", "{", "if", "(", "value", "!=", "null", "&&", "value", ".", "startsWith", "(", "\"%\"", ")", ")", "{", "ResourceBundle", "res", "=", "CustomUtils", ".", ...
returns the localized string of specified value. the localization file supposes to be located the l10n directory of the location where the feature manifest file exists, and the name of the resource file is feature symbolic name + _ + locale + .properties. prior to call this method, featureSymbolicName field needs to be...
[ "returns", "the", "localized", "string", "of", "specified", "value", ".", "the", "localization", "file", "supposes", "to", "be", "located", "the", "l10n", "directory", "of", "the", "location", "where", "the", "feature", "manifest", "file", "exists", "and", "th...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.crypto.passwordutil/src/com/ibm/ws/crypto/util/custom/CustomManifest.java#L385-L396
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WDecoratedLabelRenderer.java
WDecoratedLabelRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WDecoratedLabel. @param component the WDecoratedLabel to paint. @param renderContext the RenderContext to paint to. """ WDecoratedLabel label = (WDecoratedLabel) component; XmlStr...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WDecoratedLabel label = (WDecoratedLabel) component; XmlStringBuilder xml = renderContext.getWriter(); WComponent head = label.getHead(); WComponent body = label.getBody(); WComponent tail = label.getTail();...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WDecoratedLabel", "label", "=", "(", "WDecoratedLabel", ")", "component", ";", "XmlStringBuilder", "xml", "=", ...
Paints the given WDecoratedLabel. @param component the WDecoratedLabel to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WDecoratedLabel", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WDecoratedLabelRenderer.java#L23-L61
googleads/googleads-java-lib
examples/admanager_axis/src/main/java/admanager/axis/v201902/customtargetingservice/GetAllCustomTargetingKeysAndValues.java
GetAllCustomTargetingKeysAndValues.runExample
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { """ Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws ...
java
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { // Get the CustomTargetingService. CustomTargetingServiceInterface customTargetingService = adManagerServices.get(session, CustomTargetingServiceInterface.class); // Get all c...
[ "public", "static", "void", "runExample", "(", "AdManagerServices", "adManagerServices", ",", "AdManagerSession", "session", ")", "throws", "RemoteException", "{", "// Get the CustomTargetingService.", "CustomTargetingServiceInterface", "customTargetingService", "=", "adManagerSe...
Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors.
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201902/customtargetingservice/GetAllCustomTargetingKeysAndValues.java#L56-L108
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Operation.java
Operation.operate
public XObject operate(XObject left, XObject right) throws javax.xml.transform.TransformerException { """ Apply the operation to two operands, and return the result. @param left non-null reference to the evaluated left operand. @param right non-null reference to the evaluated right operand. @ret...
java
public XObject operate(XObject left, XObject right) throws javax.xml.transform.TransformerException { return null; // no-op }
[ "public", "XObject", "operate", "(", "XObject", "left", ",", "XObject", "right", ")", "throws", "javax", ".", "xml", ".", "transform", ".", "TransformerException", "{", "return", "null", ";", "// no-op", "}" ]
Apply the operation to two operands, and return the result. @param left non-null reference to the evaluated left operand. @param right non-null reference to the evaluated right operand. @return non-null reference to the XObject that represents the result of the operation. @throws javax.xml.transform.TransformerExce...
[ "Apply", "the", "operation", "to", "two", "operands", "and", "return", "the", "result", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Operation.java#L129-L133
OpenTSDB/opentsdb
src/meta/TSMeta.java
TSMeta.storeIfNecessary
public static Deferred<Boolean> storeIfNecessary(final TSDB tsdb, final byte[] tsuid) { """ Attempts to fetch the meta column and if null, attempts to write a new column using {@link #storeNew}. @param tsdb The TSDB instance to use for access. @param tsuid The TSUID of the time series. @return A deferre...
java
public static Deferred<Boolean> storeIfNecessary(final TSDB tsdb, final byte[] tsuid) { final GetRequest get = new GetRequest(tsdb.metaTable(), tsuid); get.family(FAMILY); get.qualifier(META_QUALIFIER); final class CreateNewCB implements Callback<Deferred<Boolean>, Object> { @Override ...
[ "public", "static", "Deferred", "<", "Boolean", ">", "storeIfNecessary", "(", "final", "TSDB", "tsdb", ",", "final", "byte", "[", "]", "tsuid", ")", "{", "final", "GetRequest", "get", "=", "new", "GetRequest", "(", "tsdb", ".", "metaTable", "(", ")", ","...
Attempts to fetch the meta column and if null, attempts to write a new column using {@link #storeNew}. @param tsdb The TSDB instance to use for access. @param tsuid The TSUID of the time series. @return A deferred with a true if the meta exists or was created, false if the meta did not exist and writing failed.
[ "Attempts", "to", "fetch", "the", "meta", "column", "and", "if", "null", "attempts", "to", "write", "a", "new", "column", "using", "{" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/meta/TSMeta.java#L624-L682
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java
HtmlSerialFieldWriter.addMemberDescription
public void addMemberDescription(FieldDoc field, Content contentTree) { """ Add the description text for this member. @param field the field to document. @param contentTree the tree to which the deprecated info will be added """ if (field.inlineTags().length > 0) { writer.addInlineComme...
java
public void addMemberDescription(FieldDoc field, Content contentTree) { if (field.inlineTags().length > 0) { writer.addInlineComment(field, contentTree); } Tag[] tags = field.tags("serial"); if (tags.length > 0) { writer.addInlineComment(field, tags[0], contentTre...
[ "public", "void", "addMemberDescription", "(", "FieldDoc", "field", ",", "Content", "contentTree", ")", "{", "if", "(", "field", ".", "inlineTags", "(", ")", ".", "length", ">", "0", ")", "{", "writer", ".", "addInlineComment", "(", "field", ",", "contentT...
Add the description text for this member. @param field the field to document. @param contentTree the tree to which the deprecated info will be added
[ "Add", "the", "description", "text", "for", "this", "member", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java#L152-L160
janus-project/guava.janusproject.io
guava/src/com/google/common/collect/ImmutableSet.java
ImmutableSet.copyOf
public static <E> ImmutableSet<E> copyOf(Collection<? extends E> elements) { """ Returns an immutable set containing the given elements, in order. Repeated occurrences of an element (according to {@link Object#equals}) after the first are ignored. This method iterates over {@code elements} at most once. <p>N...
java
public static <E> ImmutableSet<E> copyOf(Collection<? extends E> elements) { /* * TODO(user): consider checking for ImmutableAsList here * TODO(user): consider checking for Multiset here */ if (elements instanceof ImmutableSet && !(elements instanceof ImmutableSortedSet)) { @Suppres...
[ "public", "static", "<", "E", ">", "ImmutableSet", "<", "E", ">", "copyOf", "(", "Collection", "<", "?", "extends", "E", ">", "elements", ")", "{", "/*\n * TODO(user): consider checking for ImmutableAsList here\n * TODO(user): consider checking for Multiset here\n ...
Returns an immutable set containing the given elements, in order. Repeated occurrences of an element (according to {@link Object#equals}) after the first are ignored. This method iterates over {@code elements} at most once. <p>Note that if {@code s} is a {@code Set<String>}, then {@code ImmutableSet.copyOf(s)} returns...
[ "Returns", "an", "immutable", "set", "containing", "the", "given", "elements", "in", "order", ".", "Repeated", "occurrences", "of", "an", "element", "(", "according", "to", "{", "@link", "Object#equals", "}", ")", "after", "the", "first", "are", "ignored", "...
train
https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava/src/com/google/common/collect/ImmutableSet.java#L359-L376
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/File.java
File.setExecutable
public boolean setExecutable(boolean executable, boolean ownerOnly) { """ Manipulates the execute permissions for the abstract path designated by this file. <p>Note that this method does <i>not</i> throw {@code IOException} on failure. Callers must check the return value. @param executable To allow execut...
java
public boolean setExecutable(boolean executable, boolean ownerOnly) { return doChmod(ownerOnly ? S_IXUSR : (S_IXUSR | S_IXGRP | S_IXOTH), executable); }
[ "public", "boolean", "setExecutable", "(", "boolean", "executable", ",", "boolean", "ownerOnly", ")", "{", "return", "doChmod", "(", "ownerOnly", "?", "S_IXUSR", ":", "(", "S_IXUSR", "|", "S_IXGRP", "|", "S_IXOTH", ")", ",", "executable", ")", ";", "}" ]
Manipulates the execute permissions for the abstract path designated by this file. <p>Note that this method does <i>not</i> throw {@code IOException} on failure. Callers must check the return value. @param executable To allow execute permission if true, otherwise disallow @param ownerOnly To manipulate execute permis...
[ "Manipulates", "the", "execute", "permissions", "for", "the", "abstract", "path", "designated", "by", "this", "file", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/File.java#L695-L697
zxing/zxing
core/src/main/java/com/google/zxing/pdf417/encoder/PDF417.java
PDF417.getNumberOfPadCodewords
private static int getNumberOfPadCodewords(int m, int k, int c, int r) { """ Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). @param m the number of source codewords prior to the additional of the Symbol Length Descriptor and any pad codewords @param k the number of error...
java
private static int getNumberOfPadCodewords(int m, int k, int c, int r) { int n = c * r - k; return n > m + 1 ? n - m - 1 : 0; }
[ "private", "static", "int", "getNumberOfPadCodewords", "(", "int", "m", ",", "int", "k", ",", "int", "c", ",", "int", "r", ")", "{", "int", "n", "=", "c", "*", "r", "-", "k", ";", "return", "n", ">", "m", "+", "1", "?", "n", "-", "m", "-", ...
Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). @param m the number of source codewords prior to the additional of the Symbol Length Descriptor and any pad codewords @param k the number of error correction codewords @param c the number of columns in the symbol in the data region ...
[ "Calculates", "the", "number", "of", "pad", "codewords", "as", "described", "in", "4", ".", "9", ".", "2", "of", "ISO", "/", "IEC", "15438", ":", "2001", "(", "E", ")", "." ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/pdf417/encoder/PDF417.java#L571-L574
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteCrossConnectionPeeringsInner.java
ExpressRouteCrossConnectionPeeringsInner.createOrUpdateAsync
public Observable<ExpressRouteCrossConnectionPeeringInner> createOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { """ Creates or updates a peering in the specified ExpressRouteCrossConnection. @param resourceGrou...
java
public Observable<ExpressRouteCrossConnectionPeeringInner> createOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName,...
[ "public", "Observable", "<", "ExpressRouteCrossConnectionPeeringInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "crossConnectionName", ",", "String", "peeringName", ",", "ExpressRouteCrossConnectionPeeringInner", "peeringParameters", ")", ...
Creates or updates a peering in the specified ExpressRouteCrossConnection. @param resourceGroupName The name of the resource group. @param crossConnectionName The name of the ExpressRouteCrossConnection. @param peeringName The name of the peering. @param peeringParameters Parameters supplied to the create or update Ex...
[ "Creates", "or", "updates", "a", "peering", "in", "the", "specified", "ExpressRouteCrossConnection", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteCrossConnectionPeeringsInner.java#L512-L519
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/filter/FilterChain.java
FilterChain.buildProviderChain
public static FilterChain buildProviderChain(ProviderConfig<?> providerConfig, FilterInvoker lastFilter) { """ 构造服务端的执行链 @param providerConfig provider配置 @param lastFilter 最后一个filter @return filter执行链 """ return new FilterChain(selectActualFilters(providerConfig, PROVIDER_AUTO_ACTIVES), lastFi...
java
public static FilterChain buildProviderChain(ProviderConfig<?> providerConfig, FilterInvoker lastFilter) { return new FilterChain(selectActualFilters(providerConfig, PROVIDER_AUTO_ACTIVES), lastFilter, providerConfig); }
[ "public", "static", "FilterChain", "buildProviderChain", "(", "ProviderConfig", "<", "?", ">", "providerConfig", ",", "FilterInvoker", "lastFilter", ")", "{", "return", "new", "FilterChain", "(", "selectActualFilters", "(", "providerConfig", ",", "PROVIDER_AUTO_ACTIVES"...
构造服务端的执行链 @param providerConfig provider配置 @param lastFilter 最后一个filter @return filter执行链
[ "构造服务端的执行链" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/filter/FilterChain.java#L145-L147
sdl/Testy
src/main/java/com/sdl/selenium/web/WebLocator.java
WebLocator.waitTextToRender
public String waitTextToRender(int seconds, String excludeText) { """ Waits for the text to be loaded by looking at the content and not take in consideration the excludeText text or what ever text is given as parameter @param seconds time in seconds @param excludeText exclude text @return string """ ...
java
public String waitTextToRender(int seconds, String excludeText) { String text = null; if (seconds == 0 && ((text = getText(true)) != null && text.length() > 0 && !text.equals(excludeText))) { return text; } for (int i = 0, count = 5 * seconds; i < count; i++) { te...
[ "public", "String", "waitTextToRender", "(", "int", "seconds", ",", "String", "excludeText", ")", "{", "String", "text", "=", "null", ";", "if", "(", "seconds", "==", "0", "&&", "(", "(", "text", "=", "getText", "(", "true", ")", ")", "!=", "null", "...
Waits for the text to be loaded by looking at the content and not take in consideration the excludeText text or what ever text is given as parameter @param seconds time in seconds @param excludeText exclude text @return string
[ "Waits", "for", "the", "text", "to", "be", "loaded", "by", "looking", "at", "the", "content", "and", "not", "take", "in", "consideration", "the", "excludeText", "text", "or", "what", "ever", "text", "is", "given", "as", "parameter" ]
train
https://github.com/sdl/Testy/blob/b3ae061554016f926f04694a39ff00dab7576609/src/main/java/com/sdl/selenium/web/WebLocator.java#L459-L477
marvec/encryptor
encryptor-util/src/main/java/org/marvec/encryptor/util/EncryptionUtil.java
EncryptionUtil.getPemPublicKey
private PublicKey getPemPublicKey(final String keyString) throws EncryptionException { """ Initializes a public key from a string. @param keyString String representation of the key. @return An initialized public key. @throws EncryptionException When it was not possible to initialize the key. """ t...
java
private PublicKey getPemPublicKey(final String keyString) throws EncryptionException { try { final String publicKeyPEM = keyString.replace("-----BEGIN PUBLIC KEY-----", "").replace("-----END PUBLIC KEY-----", "").replaceAll("\\v", ""); final Base64 b64 = new Base64(); final byte[] deco...
[ "private", "PublicKey", "getPemPublicKey", "(", "final", "String", "keyString", ")", "throws", "EncryptionException", "{", "try", "{", "final", "String", "publicKeyPEM", "=", "keyString", ".", "replace", "(", "\"-----BEGIN PUBLIC KEY-----\"", ",", "\"\"", ")", ".", ...
Initializes a public key from a string. @param keyString String representation of the key. @return An initialized public key. @throws EncryptionException When it was not possible to initialize the key.
[ "Initializes", "a", "public", "key", "from", "a", "string", "." ]
train
https://github.com/marvec/encryptor/blob/a3fd82fd98ee5aeec4116b66ae3320f724cc6097/encryptor-util/src/main/java/org/marvec/encryptor/util/EncryptionUtil.java#L164-L178
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/GetExportRequest.java
GetExportRequest.withParameters
public GetExportRequest withParameters(java.util.Map<String, String> parameters) { """ <p> A key-value map of query string parameters that specify properties of the export, depending on the requested <code>exportType</code>. For <code>exportType</code> <code>oas30</code> and <code>swagger</code>, any combination...
java
public GetExportRequest withParameters(java.util.Map<String, String> parameters) { setParameters(parameters); return this; }
[ "public", "GetExportRequest", "withParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "setParameters", "(", "parameters", ")", ";", "return", "this", ";", "}" ]
<p> A key-value map of query string parameters that specify properties of the export, depending on the requested <code>exportType</code>. For <code>exportType</code> <code>oas30</code> and <code>swagger</code>, any combination of the following parameters are supported: <code>extensions='integrations'</code> or <code>ex...
[ "<p", ">", "A", "key", "-", "value", "map", "of", "query", "string", "parameters", "that", "specify", "properties", "of", "the", "export", "depending", "on", "the", "requested", "<code", ">", "exportType<", "/", "code", ">", ".", "For", "<code", ">", "ex...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/GetExportRequest.java#L260-L263
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/reading/StreamSegmentReadIndex.java
StreamSegmentReadIndex.createMemoryRead
@GuardedBy("lock") private CacheReadResultEntry createMemoryRead(ReadIndexEntry entry, long streamSegmentOffset, int maxLength, boolean updateStats) { """ Creates a ReadResultEntry for data that is readily available in memory. @param entry The CacheIndexEntry to use. @param streamSegmentOffse...
java
@GuardedBy("lock") private CacheReadResultEntry createMemoryRead(ReadIndexEntry entry, long streamSegmentOffset, int maxLength, boolean updateStats) { assert streamSegmentOffset >= entry.getStreamSegmentOffset() : String.format("streamSegmentOffset{%d} < entry.getStreamSegmentOffset{%d}", streamSegmentOffse...
[ "@", "GuardedBy", "(", "\"lock\"", ")", "private", "CacheReadResultEntry", "createMemoryRead", "(", "ReadIndexEntry", "entry", ",", "long", "streamSegmentOffset", ",", "int", "maxLength", ",", "boolean", "updateStats", ")", "{", "assert", "streamSegmentOffset", ">=", ...
Creates a ReadResultEntry for data that is readily available in memory. @param entry The CacheIndexEntry to use. @param streamSegmentOffset The Offset in the StreamSegment where to the ReadResultEntry starts at. @param maxLength The maximum length of the Read, from the Offset of this ReadResult...
[ "Creates", "a", "ReadResultEntry", "for", "data", "that", "is", "readily", "available", "in", "memory", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/reading/StreamSegmentReadIndex.java#L952-L970
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java
MapIterate.selectMapOnValue
public static <K, V> MutableMap<K, V> selectMapOnValue(Map<K, V> map, final Predicate<? super V> predicate) { """ For each <em>value</em> of the source map, the Predicate is evaluated. If the result of the evaluation is true, the map entry is moved to a result map. The result map is returned containing all entri...
java
public static <K, V> MutableMap<K, V> selectMapOnValue(Map<K, V> map, final Predicate<? super V> predicate) { MutableMap<K, V> resultMap = UnifiedMap.newMap(); final Procedure2<K, V> mapTransferProcedure = new MapPutProcedure<K, V>(resultMap); Procedure2<K, V> procedure = new Procedure2<K, V...
[ "public", "static", "<", "K", ",", "V", ">", "MutableMap", "<", "K", ",", "V", ">", "selectMapOnValue", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "final", "Predicate", "<", "?", "super", "V", ">", "predicate", ")", "{", "MutableMap", "<", ...
For each <em>value</em> of the source map, the Predicate is evaluated. If the result of the evaluation is true, the map entry is moved to a result map. The result map is returned containing all entries in the source map that evaluated to true.
[ "For", "each", "<em", ">", "value<", "/", "em", ">", "of", "the", "source", "map", "the", "Predicate", "is", "evaluated", ".", "If", "the", "result", "of", "the", "evaluation", "is", "true", "the", "map", "entry", "is", "moved", "to", "a", "result", ...
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java#L345-L361
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainsInner.java
DomainsInner.getByResourceGroup
public DomainInner getByResourceGroup(String resourceGroupName, String domainName) { """ Get a domain. Get properties of a domain. @param resourceGroupName The name of the resource group within the user's subscription. @param domainName Name of the domain @throws IllegalArgumentException thrown if parameters...
java
public DomainInner getByResourceGroup(String resourceGroupName, String domainName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, domainName).toBlocking().single().body(); }
[ "public", "DomainInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "domainName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "domainName", ")", ".", "toBlocking", "(", ")", ".", "single"...
Get a domain. Get properties of a domain. @param resourceGroupName The name of the resource group within the user's subscription. @param domainName Name of the domain @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws Run...
[ "Get", "a", "domain", ".", "Get", "properties", "of", "a", "domain", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainsInner.java#L126-L128
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/ClientAsynchEventThreadPool.java
ClientAsynchEventThreadPool.dispatchAsynchEvent
public void dispatchAsynchEvent(short eventId, Conversation conversation) { """ Dispatches the data to be sent to the connection event listeners on a thread. @param eventId @param conversation """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "dispatchAsynchEv...
java
public void dispatchAsynchEvent(short eventId, Conversation conversation) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "dispatchAsynchEvent", new Object[] { ""+eventId, conversation }); // Create a runnable with the d...
[ "public", "void", "dispatchAsynchEvent", "(", "short", "eventId", ",", "Conversation", "conversation", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", ...
Dispatches the data to be sent to the connection event listeners on a thread. @param eventId @param conversation
[ "Dispatches", "the", "data", "to", "be", "sent", "to", "the", "connection", "event", "listeners", "on", "a", "thread", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/client/ClientAsynchEventThreadPool.java#L150-L160
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.getMethodName
public static String getMethodName(String name, String prefix) { """ Gets method name. @param name the name @param prefix the prefix @return the method name """ return prefix + name.substring(0, 1).toUpperCase() + name.substring(1); }
java
public static String getMethodName(String name, String prefix) { return prefix + name.substring(0, 1).toUpperCase() + name.substring(1); }
[ "public", "static", "String", "getMethodName", "(", "String", "name", ",", "String", "prefix", ")", "{", "return", "prefix", "+", "name", ".", "substring", "(", "0", ",", "1", ")", ".", "toUpperCase", "(", ")", "+", "name", ".", "substring", "(", "1", ...
Gets method name. @param name the name @param prefix the prefix @return the method name
[ "Gets", "method", "name", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L184-L186
icode/ameba
src/main/java/ameba/db/ebean/support/ModelResourceStructure.java
ModelResourceStructure.fetchHistory
public Response fetchHistory(@PathParam("id") URI_ID id) throws Exception { """ <p>fetchHistory.</p> @param id a URI_ID object. @return a {@link javax.ws.rs.core.Response} object. @throws java.lang.Exception if any. """ final MODEL_ID mId = tryConvertId(id); matchedFetchHistory(mId); ...
java
public Response fetchHistory(@PathParam("id") URI_ID id) throws Exception { final MODEL_ID mId = tryConvertId(id); matchedFetchHistory(mId); final Query<MODEL> query = server.find(modelType); defaultFindOrderBy(query); final Ref<FutureRowCount> rowCount = Refs.emptyRef(); ...
[ "public", "Response", "fetchHistory", "(", "@", "PathParam", "(", "\"id\"", ")", "URI_ID", "id", ")", "throws", "Exception", "{", "final", "MODEL_ID", "mId", "=", "tryConvertId", "(", "id", ")", ";", "matchedFetchHistory", "(", "mId", ")", ";", "final", "Q...
<p>fetchHistory.</p> @param id a URI_ID object. @return a {@link javax.ws.rs.core.Response} object. @throws java.lang.Exception if any.
[ "<p", ">", "fetchHistory", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/db/ebean/support/ModelResourceStructure.java#L835-L859
phax/ph-web
ph-smtp/src/main/java/com/helger/smtp/scope/ScopedMailAPI.java
ScopedMailAPI.queueMail
@Nonnull public ESuccess queueMail (@Nonnull final ISMTPSettings aSMTPSettings, @Nonnull final IMutableEmailData aMailData) { """ Unconditionally queue a mail @param aSMTPSettings The SMTP settings to use. May not be <code>null</code>. @param aMailData The data of the email to be send. May not be <code>nul...
java
@Nonnull public ESuccess queueMail (@Nonnull final ISMTPSettings aSMTPSettings, @Nonnull final IMutableEmailData aMailData) { return MailAPI.queueMail (aSMTPSettings, aMailData); }
[ "@", "Nonnull", "public", "ESuccess", "queueMail", "(", "@", "Nonnull", "final", "ISMTPSettings", "aSMTPSettings", ",", "@", "Nonnull", "final", "IMutableEmailData", "aMailData", ")", "{", "return", "MailAPI", ".", "queueMail", "(", "aSMTPSettings", ",", "aMailDat...
Unconditionally queue a mail @param aSMTPSettings The SMTP settings to use. May not be <code>null</code>. @param aMailData The data of the email to be send. May not be <code>null</code>. @return {@link ESuccess}
[ "Unconditionally", "queue", "a", "mail" ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-smtp/src/main/java/com/helger/smtp/scope/ScopedMailAPI.java#L88-L92
lestard/advanced-bindings
src/main/java/eu/lestard/advanced_bindings/api/MathBindings.java
MathBindings.floorDiv
public static LongBinding floorDiv(final ObservableLongValue x, final long y) { """ Binding for {@link java.lang.Math#floorDiv(long, long)} @param x the dividend @param y the divisor @return the largest (closest to positive infinity) {@code long} value that is less than or equal to the algebraic quotient. @...
java
public static LongBinding floorDiv(final ObservableLongValue x, final long y) { return createLongBinding(() -> Math.floorDiv(x.get(), y), x); }
[ "public", "static", "LongBinding", "floorDiv", "(", "final", "ObservableLongValue", "x", ",", "final", "long", "y", ")", "{", "return", "createLongBinding", "(", "(", ")", "->", "Math", ".", "floorDiv", "(", "x", ".", "get", "(", ")", ",", "y", ")", ",...
Binding for {@link java.lang.Math#floorDiv(long, long)} @param x the dividend @param y the divisor @return the largest (closest to positive infinity) {@code long} value that is less than or equal to the algebraic quotient. @throws ArithmeticException if the divisor {@code y} is zero
[ "Binding", "for", "{", "@link", "java", ".", "lang", ".", "Math#floorDiv", "(", "long", "long", ")", "}" ]
train
https://github.com/lestard/advanced-bindings/blob/054a5dde261c29f862b971765fa3da3704a13ab4/src/main/java/eu/lestard/advanced_bindings/api/MathBindings.java#L480-L482
ddf-project/DDF
spark/src/main/java/io/ddf/spark/SparkDDFManager.java
SparkDDFManager.createSparkContext
private SparkContext createSparkContext(Map<String, String> params) throws DDFException { """ Side effect: also sets SharkContext and SparkContextParams in case the client wants to examine or use those. @param params @return @throws DDFException """ this.setSparkContextParams(this.mergeSparkParamsFrom...
java
private SparkContext createSparkContext(Map<String, String> params) throws DDFException { this.setSparkContextParams(this.mergeSparkParamsFromSettings(params)); String ddfSparkJar = params.get("DDFSPARK_JAR"); String[] jobJars = ddfSparkJar != null ? ddfSparkJar.split(",") : new String[] { }; ArrayLis...
[ "private", "SparkContext", "createSparkContext", "(", "Map", "<", "String", ",", "String", ">", "params", ")", "throws", "DDFException", "{", "this", ".", "setSparkContextParams", "(", "this", ".", "mergeSparkParamsFromSettings", "(", "params", ")", ")", ";", "S...
Side effect: also sets SharkContext and SparkContextParams in case the client wants to examine or use those. @param params @return @throws DDFException
[ "Side", "effect", ":", "also", "sets", "SharkContext", "and", "SparkContextParams", "in", "case", "the", "client", "wants", "to", "examine", "or", "use", "those", "." ]
train
https://github.com/ddf-project/DDF/blob/e4e68315dcec1ed8b287bf1ee73baa88e7e41eba/spark/src/main/java/io/ddf/spark/SparkDDFManager.java#L166-L206
OpenLiberty/open-liberty
dev/com.ibm.ws.container.service.compat/src/com/ibm/ws/util/ThreadContextAccessor.java
ThreadContextAccessor.repushContextClassLoaderForUnprivileged
public Object repushContextClassLoaderForUnprivileged(Object origLoader, ClassLoader loader) { """ Updates the context class loader of the current thread between calls to {@link #pushContextClassLoader} and {@link #popContextClassLoader}. If the original class loader is {@link #UNCHANGED}, then this is equivalent...
java
public Object repushContextClassLoaderForUnprivileged(Object origLoader, ClassLoader loader) { if (origLoader == UNCHANGED) { return pushContextClassLoaderForUnprivileged(loader); } setContextClassLoaderForUnprivileged(Thread.currentThread(), loader); return origLoader; ...
[ "public", "Object", "repushContextClassLoaderForUnprivileged", "(", "Object", "origLoader", ",", "ClassLoader", "loader", ")", "{", "if", "(", "origLoader", "==", "UNCHANGED", ")", "{", "return", "pushContextClassLoaderForUnprivileged", "(", "loader", ")", ";", "}", ...
Updates the context class loader of the current thread between calls to {@link #pushContextClassLoader} and {@link #popContextClassLoader}. If the original class loader is {@link #UNCHANGED}, then this is equivalent to {@link #pushContextClassLoader}). Otherwise, this is equivalent to {@link #setContextClassLoader}, an...
[ "Updates", "the", "context", "class", "loader", "of", "the", "current", "thread", "between", "calls", "to", "{", "@link", "#pushContextClassLoader", "}", "and", "{", "@link", "#popContextClassLoader", "}", ".", "If", "the", "original", "class", "loader", "is", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.container.service.compat/src/com/ibm/ws/util/ThreadContextAccessor.java#L211-L218
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/Utility.java
Utility.getId
public static int getId(Context context, String id) { """ Parses the resource String id and get back the int res id @param context @param id String resource id @return int resource id """ final String defType; if (id.startsWith("R.")) { int dot = id.indexOf('.', 2); d...
java
public static int getId(Context context, String id) { final String defType; if (id.startsWith("R.")) { int dot = id.indexOf('.', 2); defType = id.substring(2, dot); } else { defType = "drawable"; } Log.d(TAG, "getId(): id: %s, extracted type: ...
[ "public", "static", "int", "getId", "(", "Context", "context", ",", "String", "id", ")", "{", "final", "String", "defType", ";", "if", "(", "id", ".", "startsWith", "(", "\"R.\"", ")", ")", "{", "int", "dot", "=", "id", ".", "indexOf", "(", "'", "'...
Parses the resource String id and get back the int res id @param context @param id String resource id @return int resource id
[ "Parses", "the", "resource", "String", "id", "and", "get", "back", "the", "int", "res", "id" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/main/Utility.java#L100-L111
fernandospr/javapns-jdk16
src/main/java/javapns/communication/KeystoreManager.java
KeystoreManager.loadKeystore
public static KeyStore loadKeystore(AppleServer server, Object keystore, boolean verifyKeystore) throws KeystoreException { """ Loads a keystore. @param server the server the keystore is intended for @param keystore a keystore containing your private key and the certificate signed by Apple (File, InputStream, ...
java
public static KeyStore loadKeystore(AppleServer server, Object keystore, boolean verifyKeystore) throws KeystoreException { if (keystore instanceof KeyStore) return (KeyStore) keystore; synchronized (server) { InputStream keystoreStream = streamKeystore(keystore); if (keystoreStream instanceof WrappedKeystore...
[ "public", "static", "KeyStore", "loadKeystore", "(", "AppleServer", "server", ",", "Object", "keystore", ",", "boolean", "verifyKeystore", ")", "throws", "KeystoreException", "{", "if", "(", "keystore", "instanceof", "KeyStore", ")", "return", "(", "KeyStore", ")"...
Loads a keystore. @param server the server the keystore is intended for @param keystore a keystore containing your private key and the certificate signed by Apple (File, InputStream, byte[], KeyStore or String for a file path) @param verifyKeystore whether or not to perform basic verifications on the keystore to detec...
[ "Loads", "a", "keystore", "." ]
train
https://github.com/fernandospr/javapns-jdk16/blob/84de6d9328ab01af92f77cc60c4554de02420909/src/main/java/javapns/communication/KeystoreManager.java#L55-L75
census-instrumentation/opencensus-java
contrib/dropwizard5/src/main/java/io/opencensus/contrib/dropwizard5/DropWizardUtils.java
DropWizardUtils.generateFullMetricName
static String generateFullMetricName(String name, String type) { """ Returns the metric name. @param name the initial metric name @param type the initial type of the metric. @return a string the unique metric name """ return SOURCE + DELIMITER + name + DELIMITER + type; }
java
static String generateFullMetricName(String name, String type) { return SOURCE + DELIMITER + name + DELIMITER + type; }
[ "static", "String", "generateFullMetricName", "(", "String", "name", ",", "String", "type", ")", "{", "return", "SOURCE", "+", "DELIMITER", "+", "name", "+", "DELIMITER", "+", "type", ";", "}" ]
Returns the metric name. @param name the initial metric name @param type the initial type of the metric. @return a string the unique metric name
[ "Returns", "the", "metric", "name", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/dropwizard5/src/main/java/io/opencensus/contrib/dropwizard5/DropWizardUtils.java#L40-L42
OpenLiberty/open-liberty
dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/internal/ConsumerUtil.java
ConsumerUtil.validateNbf
void validateNbf(JwtClaims jwtClaims, long clockSkewInMilliseconds) throws InvalidClaimException { """ Validates the the {@value Claims#NOT_BEFORE} claim is present and properly formed. Also """ if (jwtClaims == null) { if (tc.isDebugEnabled()) { Tr.debug(tc, "Missing JwtClaims object"); } retu...
java
void validateNbf(JwtClaims jwtClaims, long clockSkewInMilliseconds) throws InvalidClaimException { if (jwtClaims == null) { if (tc.isDebugEnabled()) { Tr.debug(tc, "Missing JwtClaims object"); } return; } NumericDate nbf = getNotBeforeClaim(jwtClaims); validateNotBeforeClaim(nbf, clockSkewInMillise...
[ "void", "validateNbf", "(", "JwtClaims", "jwtClaims", ",", "long", "clockSkewInMilliseconds", ")", "throws", "InvalidClaimException", "{", "if", "(", "jwtClaims", "==", "null", ")", "{", "if", "(", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "Tr", ".", ...
Validates the the {@value Claims#NOT_BEFORE} claim is present and properly formed. Also
[ "Validates", "the", "the", "{" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.jwt/src/com/ibm/ws/security/jwt/internal/ConsumerUtil.java#L539-L548
alkacon/opencms-core
src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java
CmsDefaultXmlContentHandler.addSimpleSearchSetting
protected void addSimpleSearchSetting(CmsXmlContentDefinition contentDef, String name, String value) throws CmsXmlException { """ Adds search settings as defined by 'simple' syntax in fields.<p> @param contentDef the content definition @param name the element name @param value the search setting value @t...
java
protected void addSimpleSearchSetting(CmsXmlContentDefinition contentDef, String name, String value) throws CmsXmlException { if ("false".equalsIgnoreCase(value)) { addSearchSetting(contentDef, name, Boolean.FALSE); } else if ("true".equalsIgnoreCase(value)) { addSearchSetti...
[ "protected", "void", "addSimpleSearchSetting", "(", "CmsXmlContentDefinition", "contentDef", ",", "String", "name", ",", "String", "value", ")", "throws", "CmsXmlException", "{", "if", "(", "\"false\"", ".", "equalsIgnoreCase", "(", "value", ")", ")", "{", "addSea...
Adds search settings as defined by 'simple' syntax in fields.<p> @param contentDef the content definition @param name the element name @param value the search setting value @throws CmsXmlException if something goes wrong
[ "Adds", "search", "settings", "as", "defined", "by", "simple", "syntax", "in", "fields", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java#L2120-L2140
sawano/java-commons
src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java
AbstractValidate.notBlank
public <T extends CharSequence> T notBlank(final T chars, final String message, final Object... values) { """ <p>Validate that the specified argument character sequence is neither {@code null}, a length of zero (no characters), empty nor whitespace; otherwise throwing an exception with the specified message. </p>...
java
public <T extends CharSequence> T notBlank(final T chars, final String message, final Object... values) { if (chars == null) { failNull(String.format(message, values)); } if (StringUtils.isBlank(chars)) { fail(String.format(message, values)); } return char...
[ "public", "<", "T", "extends", "CharSequence", ">", "T", "notBlank", "(", "final", "T", "chars", ",", "final", "String", "message", ",", "final", "Object", "...", "values", ")", "{", "if", "(", "chars", "==", "null", ")", "{", "failNull", "(", "String"...
<p>Validate that the specified argument character sequence is neither {@code null}, a length of zero (no characters), empty nor whitespace; otherwise throwing an exception with the specified message. </p> <pre>Validate.notBlank(myString, "The string must not be blank");</pre> @param <T> the character sequence type @pa...
[ "<p", ">", "Validate", "that", "the", "specified", "argument", "character", "sequence", "is", "neither", "{", "@code", "null", "}", "a", "length", "of", "zero", "(", "no", "characters", ")", "empty", "nor", "whitespace", ";", "otherwise", "throwing", "an", ...
train
https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java#L776-L784
jhunters/jprotobuf
v3/src/main/java/com/baidu/bjf/remoting/protobuf/MapEntryLite.java
MapEntryLite.writeTo
static <K, V> void writeTo(CodedOutputStream output, Metadata<K, V> metadata, K key, V value) throws IOException { """ Write to. @param <K> the key type @param <V> the value type @param output the output @param metadata the metadata @param key the key @param value the value @throws IOException Signals tha...
java
static <K, V> void writeTo(CodedOutputStream output, Metadata<K, V> metadata, K key, V value) throws IOException { CodedConstant.writeElement(output, metadata.keyType, KEY_FIELD_NUMBER, key); CodedConstant.writeElement(output, metadata.valueType, VALUE_FIELD_NUMBER, value); }
[ "static", "<", "K", ",", "V", ">", "void", "writeTo", "(", "CodedOutputStream", "output", ",", "Metadata", "<", "K", ",", "V", ">", "metadata", ",", "K", "key", ",", "V", "value", ")", "throws", "IOException", "{", "CodedConstant", ".", "writeElement", ...
Write to. @param <K> the key type @param <V> the value type @param output the output @param metadata the metadata @param key the key @param value the value @throws IOException Signals that an I/O exception has occurred.
[ "Write", "to", "." ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/v3/src/main/java/com/baidu/bjf/remoting/protobuf/MapEntryLite.java#L170-L173
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.transformEntry
public static boolean transformEntry(final File zip, final String path, final ZipEntryTransformer transformer) { """ Changes an existing ZIP file: transforms a given entry in it. @param zip an existing ZIP file (only read). @param path new ZIP entry path. @param transformer transformer for the given ZIP en...
java
public static boolean transformEntry(final File zip, final String path, final ZipEntryTransformer transformer) { return operateInPlace(zip, new InPlaceAction() { public boolean act(File tmpFile) { return transformEntry(zip, path, transformer, tmpFile); } }); }
[ "public", "static", "boolean", "transformEntry", "(", "final", "File", "zip", ",", "final", "String", "path", ",", "final", "ZipEntryTransformer", "transformer", ")", "{", "return", "operateInPlace", "(", "zip", ",", "new", "InPlaceAction", "(", ")", "{", "pub...
Changes an existing ZIP file: transforms a given entry in it. @param zip an existing ZIP file (only read). @param path new ZIP entry path. @param transformer transformer for the given ZIP entry. @return <code>true</code> if the entry was replaced.
[ "Changes", "an", "existing", "ZIP", "file", ":", "transforms", "a", "given", "entry", "in", "it", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L2794-L2800
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java
SQLOperation.getConfigForOperation
private HiveConf getConfigForOperation() throws HiveSQLException { """ If there are query specific settings to overlay, then create a copy of config There are two cases we need to clone the session config that's being passed to hive driver 1. Async query - If the client changes a config setting, that shouldn't ...
java
private HiveConf getConfigForOperation() throws HiveSQLException { HiveConf sqlOperationConf = getParentSession().getHiveConf(); if (!getConfOverlay().isEmpty() || shouldRunAsync()) { // clone the parent session config for this query sqlOperationConf = new HiveConf(sqlOperationConf); // apply...
[ "private", "HiveConf", "getConfigForOperation", "(", ")", "throws", "HiveSQLException", "{", "HiveConf", "sqlOperationConf", "=", "getParentSession", "(", ")", ".", "getHiveConf", "(", ")", ";", "if", "(", "!", "getConfOverlay", "(", ")", ".", "isEmpty", "(", ...
If there are query specific settings to overlay, then create a copy of config There are two cases we need to clone the session config that's being passed to hive driver 1. Async query - If the client changes a config setting, that shouldn't reflect in the execution already underway 2. confOverlay - The query specific s...
[ "If", "there", "are", "query", "specific", "settings", "to", "overlay", "then", "create", "a", "copy", "of", "config", "There", "are", "two", "cases", "we", "need", "to", "clone", "the", "session", "config", "that", "s", "being", "passed", "to", "hive", ...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java#L443-L459
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/XMLFactory.java
XMLFactory.createDocumentBuilder
@Nonnull public static DocumentBuilder createDocumentBuilder (@Nonnull final DocumentBuilderFactory aDocBuilderFactory) { """ Create a document builder without a certain schema, using the passed {@link DocumentBuilderFactory}. @param aDocBuilderFactory The document builder factory to be used. May not be <c...
java
@Nonnull public static DocumentBuilder createDocumentBuilder (@Nonnull final DocumentBuilderFactory aDocBuilderFactory) { ValueEnforcer.notNull (aDocBuilderFactory, "DocBuilderFactory"); try { final DocumentBuilder aDocBuilder = aDocBuilderFactory.newDocumentBuilder (); aDocBuilder.setError...
[ "@", "Nonnull", "public", "static", "DocumentBuilder", "createDocumentBuilder", "(", "@", "Nonnull", "final", "DocumentBuilderFactory", "aDocBuilderFactory", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aDocBuilderFactory", ",", "\"DocBuilderFactory\"", ")", ";", "t...
Create a document builder without a certain schema, using the passed {@link DocumentBuilderFactory}. @param aDocBuilderFactory The document builder factory to be used. May not be <code>null</code>. @return The created document builder. Never <code>null</code>. @throws InitializationException In case some DOM initializ...
[ "Create", "a", "document", "builder", "without", "a", "certain", "schema", "using", "the", "passed", "{", "@link", "DocumentBuilderFactory", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/XMLFactory.java#L234-L249
openbase/jul
storage/src/main/java/org/openbase/jul/storage/registry/ProtoBufFileSynchronizedRegistry.java
ProtoBufFileSynchronizedRegistry.activateVersionControl
public void activateVersionControl(final Package converterPackage) throws CouldNotPerformException { """ This method activate the version control unit of the underlying registry db. The version check and db upgrade is automatically performed during the registry db loading phase. The db will be upgraded to the la...
java
public void activateVersionControl(final Package converterPackage) throws CouldNotPerformException { try { String entryType; try { entryType = getDatabaseName(); } catch (Exception ex) { throw new CouldNotPerformException("Could not detect entr...
[ "public", "void", "activateVersionControl", "(", "final", "Package", "converterPackage", ")", "throws", "CouldNotPerformException", "{", "try", "{", "String", "entryType", ";", "try", "{", "entryType", "=", "getDatabaseName", "(", ")", ";", "}", "catch", "(", "E...
This method activate the version control unit of the underlying registry db. The version check and db upgrade is automatically performed during the registry db loading phase. The db will be upgraded to the latest db format provided by the given converter package. The converter package should contain only classes implem...
[ "This", "method", "activate", "the", "version", "control", "unit", "of", "the", "underlying", "registry", "db", ".", "The", "version", "check", "and", "db", "upgrade", "is", "automatically", "performed", "during", "the", "registry", "db", "loading", "phase", "...
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/storage/src/main/java/org/openbase/jul/storage/registry/ProtoBufFileSynchronizedRegistry.java#L143-L155
jbundle/jbundle
thin/base/util/util/src/main/java/org/jbundle/thin/base/util/Application.java
Application.getResources
public ResourceBundle getResources(String strResourceName, boolean bReturnKeyOnMissing) { """ Get this standard resource. This is a utility method for loading and caching resources. The returned Resources object can be called just like a resource object with some extra functions. @param strResourceName The cla...
java
public ResourceBundle getResources(String strResourceName, boolean bReturnKeyOnMissing) { ResourceBundle resources = null; try { Locale currentLocale = this.getLocale(); //Locale.getDefault(); strResourceName = this.getResourcePath(strResourceName); if (m_res...
[ "public", "ResourceBundle", "getResources", "(", "String", "strResourceName", ",", "boolean", "bReturnKeyOnMissing", ")", "{", "ResourceBundle", "resources", "=", "null", ";", "try", "{", "Locale", "currentLocale", "=", "this", ".", "getLocale", "(", ")", ";", "...
Get this standard resource. This is a utility method for loading and caching resources. The returned Resources object can be called just like a resource object with some extra functions. @param strResourceName The class name of the resource file to load. @param bReturnKeyOnMissing Return the string key if the resource ...
[ "Get", "this", "standard", "resource", ".", "This", "is", "a", "utility", "method", "for", "loading", "and", "caching", "resources", ".", "The", "returned", "Resources", "object", "can", "be", "called", "just", "like", "a", "resource", "object", "with", "som...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/util/util/src/main/java/org/jbundle/thin/base/util/Application.java#L718-L734
ogaclejapan/SmartTabLayout
utils-v4/src/main/java/com/ogaclejapan/smarttablayout/utils/v4/Bundler.java
Bundler.putCharSequence
public Bundler putCharSequence(String key, CharSequence value) { """ Inserts a CharSequence value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a CharSequence, or null @return this """ bundl...
java
public Bundler putCharSequence(String key, CharSequence value) { bundle.putCharSequence(key, value); return this; }
[ "public", "Bundler", "putCharSequence", "(", "String", "key", ",", "CharSequence", "value", ")", "{", "bundle", ".", "putCharSequence", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a CharSequence value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a CharSequence, or null @return this
[ "Inserts", "a", "CharSequence", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/ogaclejapan/SmartTabLayout/blob/712e81a92f1e12a3c33dcbda03d813e0162e8589/utils-v4/src/main/java/com/ogaclejapan/smarttablayout/utils/v4/Bundler.java#L127-L130
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/ifx/Vector2ifx.java
Vector2ifx.lengthSquaredProperty
public DoubleProperty lengthSquaredProperty() { """ Replies the property that represents the length of the vector. @return the length property """ if (this.lengthSquareProperty == null) { this.lengthSquareProperty = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.LENGTH_SQUARED); this.lengthSqu...
java
public DoubleProperty lengthSquaredProperty() { if (this.lengthSquareProperty == null) { this.lengthSquareProperty = new ReadOnlyDoubleWrapper(this, MathFXAttributeNames.LENGTH_SQUARED); this.lengthSquareProperty.bind(Bindings.createDoubleBinding(() -> { return Vector2ifx.this.x.doubleValue() * Vector2ifx.t...
[ "public", "DoubleProperty", "lengthSquaredProperty", "(", ")", "{", "if", "(", "this", ".", "lengthSquareProperty", "==", "null", ")", "{", "this", ".", "lengthSquareProperty", "=", "new", "ReadOnlyDoubleWrapper", "(", "this", ",", "MathFXAttributeNames", ".", "LE...
Replies the property that represents the length of the vector. @return the length property
[ "Replies", "the", "property", "that", "represents", "the", "length", "of", "the", "vector", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/ifx/Vector2ifx.java#L186-L195
samskivert/samskivert
src/main/java/com/samskivert/jdbc/JDBCUtil.java
JDBCUtil.checkedUpdate
public static void checkedUpdate (PreparedStatement stmt, int expectedCount) throws SQLException, PersistenceException { """ Calls <code>stmt.executeUpdate()</code> on the supplied statement, checking to see that it returns the expected update count and throwing a persistence exception if it does not. ...
java
public static void checkedUpdate (PreparedStatement stmt, int expectedCount) throws SQLException, PersistenceException { int modified = stmt.executeUpdate(); if (modified != expectedCount) { String err = "Statement did not modify expected number of rows [stmt=" + stmt + ...
[ "public", "static", "void", "checkedUpdate", "(", "PreparedStatement", "stmt", ",", "int", "expectedCount", ")", "throws", "SQLException", ",", "PersistenceException", "{", "int", "modified", "=", "stmt", ".", "executeUpdate", "(", ")", ";", "if", "(", "modified...
Calls <code>stmt.executeUpdate()</code> on the supplied statement, checking to see that it returns the expected update count and throwing a persistence exception if it does not.
[ "Calls", "<code", ">", "stmt", ".", "executeUpdate", "()", "<", "/", "code", ">", "on", "the", "supplied", "statement", "checking", "to", "see", "that", "it", "returns", "the", "expected", "update", "count", "and", "throwing", "a", "persistence", "exception"...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/jdbc/JDBCUtil.java#L93-L102
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachinesInner.java
VirtualMachinesInner.updateAsync
public Observable<VirtualMachineInner> updateAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { """ The operation to update a virtual machine. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @param parameters Parameters sup...
java
public Observable<VirtualMachineInner> updateAsync(String resourceGroupName, String vmName, VirtualMachineUpdate parameters) { return updateWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1<ServiceResponse<VirtualMachineInner>, VirtualMachineInner>() { @Override ...
[ "public", "Observable", "<", "VirtualMachineInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "vmName", ",", "VirtualMachineUpdate", "parameters", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmName", ...
The operation to update a virtual machine. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @param parameters Parameters supplied to the Update Virtual Machine operation. @throws IllegalArgumentException thrown if parameters fail the validation @return the observa...
[ "The", "operation", "to", "update", "a", "virtual", "machine", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachinesInner.java#L759-L766
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/javax/el/MapELResolver.java
MapELResolver.setValue
@Override @SuppressWarnings("unchecked") public void setValue(ELContext context, Object base, Object property, Object value) { """ If the base object is a map, attempts to set the value associated with the given key, as specified by the property argument. If the base is a Map, the propertyResolved property of ...
java
@Override @SuppressWarnings("unchecked") public void setValue(ELContext context, Object base, Object property, Object value) { if (context == null) { throw new NullPointerException("context is null"); } if (isResolvable(base)) { if (readOnly) { throw new PropertyNotWritableException("resolver is read-...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "setValue", "(", "ELContext", "context", ",", "Object", "base", ",", "Object", "property", ",", "Object", "value", ")", "{", "if", "(", "context", "==", "null", ")", "{"...
If the base object is a map, attempts to set the value associated with the given key, as specified by the property argument. If the base is a Map, the propertyResolved property of the ELContext object must be set to true by this resolver, before returning. If this property is not true after this method is called, the c...
[ "If", "the", "base", "object", "is", "a", "map", "attempts", "to", "set", "the", "value", "associated", "with", "the", "given", "key", "as", "specified", "by", "the", "property", "argument", ".", "If", "the", "base", "is", "a", "Map", "the", "propertyRes...
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/javax/el/MapELResolver.java#L276-L289
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/SARLEclipsePlugin.java
SARLEclipsePlugin.logDebugMessage
@SuppressWarnings( { """ Logs an internal debug message with the specified message. @param message the debug message to log @param cause the cause of the message log. """"static-method", "checkstyle:regexp"}) public void logDebugMessage(String message, Throwable cause) { Debug.println(message); if (ca...
java
@SuppressWarnings({"static-method", "checkstyle:regexp"}) public void logDebugMessage(String message, Throwable cause) { Debug.println(message); if (cause != null) { Debug.printStackTrace(cause); } }
[ "@", "SuppressWarnings", "(", "{", "\"static-method\"", ",", "\"checkstyle:regexp\"", "}", ")", "public", "void", "logDebugMessage", "(", "String", "message", ",", "Throwable", "cause", ")", "{", "Debug", ".", "println", "(", "message", ")", ";", "if", "(", ...
Logs an internal debug message with the specified message. @param message the debug message to log @param cause the cause of the message log.
[ "Logs", "an", "internal", "debug", "message", "with", "the", "specified", "message", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/SARLEclipsePlugin.java#L316-L322
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/util/TreeUtil.java
TreeUtil.getPath
public static String getPath(Treenode item, boolean useLabels) { """ Returns the path of the specified tree node. This consists of the indexes or labels of this and all parent nodes separated by a "\" character. @param item The node (tree item) whose path is to be returned. If this value is null, a zero lengt...
java
public static String getPath(Treenode item, boolean useLabels) { StringBuilder sb = new StringBuilder(); boolean needsDelim = false; while (item != null) { if (needsDelim) { sb.insert(0, '\\'); } else { needsDelim = true; } ...
[ "public", "static", "String", "getPath", "(", "Treenode", "item", ",", "boolean", "useLabels", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "boolean", "needsDelim", "=", "false", ";", "while", "(", "item", "!=", "null", ")",...
Returns the path of the specified tree node. This consists of the indexes or labels of this and all parent nodes separated by a "\" character. @param item The node (tree item) whose path is to be returned. If this value is null, a zero length string is returned. @param useLabels If true, use the labels as identifiers;...
[ "Returns", "the", "path", "of", "the", "specified", "tree", "node", ".", "This", "consists", "of", "the", "indexes", "or", "labels", "of", "this", "and", "all", "parent", "nodes", "separated", "by", "a", "\\", "character", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/util/TreeUtil.java#L191-L207
looly/hutool
hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java
CollUtil.forEach
public static <T> void forEach(Iterator<T> iterator, Consumer<T> consumer) { """ 循环遍历 {@link Iterator},使用{@link Consumer} 接受遍历的每条数据,并针对每条数据做处理 @param <T> 集合元素类型 @param iterator {@link Iterator} @param consumer {@link Consumer} 遍历的每条数据处理器 """ int index = 0; while (iterator.hasNext()) { consumer.a...
java
public static <T> void forEach(Iterator<T> iterator, Consumer<T> consumer) { int index = 0; while (iterator.hasNext()) { consumer.accept(iterator.next(), index); index++; } }
[ "public", "static", "<", "T", ">", "void", "forEach", "(", "Iterator", "<", "T", ">", "iterator", ",", "Consumer", "<", "T", ">", "consumer", ")", "{", "int", "index", "=", "0", ";", "while", "(", "iterator", ".", "hasNext", "(", ")", ")", "{", "...
循环遍历 {@link Iterator},使用{@link Consumer} 接受遍历的每条数据,并针对每条数据做处理 @param <T> 集合元素类型 @param iterator {@link Iterator} @param consumer {@link Consumer} 遍历的每条数据处理器
[ "循环遍历", "{", "@link", "Iterator", "}", ",使用", "{", "@link", "Consumer", "}", "接受遍历的每条数据,并针对每条数据做处理" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/collection/CollUtil.java#L2239-L2245
powermock/powermock
powermock-api/powermock-api-mockito2/src/main/java/org/powermock/api/mockito/PowerMockito.java
PowerMockito.verifyStatic
public static synchronized <T> void verifyStatic(Class<T> mockedClass, VerificationMode verificationMode) { """ Verifies certain behavior of the <code>mockedClass</code> happened at least once / exact number of times / never. E.g: <p> <pre> verifyStatic(ClassWithStaticMethod.class, times(5)); ClassWithStaticM...
java
public static synchronized <T> void verifyStatic(Class<T> mockedClass, VerificationMode verificationMode) { Mockito.verify(mockedClass, verificationMode); }
[ "public", "static", "synchronized", "<", "T", ">", "void", "verifyStatic", "(", "Class", "<", "T", ">", "mockedClass", ",", "VerificationMode", "verificationMode", ")", "{", "Mockito", ".", "verify", "(", "mockedClass", ",", "verificationMode", ")", ";", "}" ]
Verifies certain behavior of the <code>mockedClass</code> happened at least once / exact number of times / never. E.g: <p> <pre> verifyStatic(ClassWithStaticMethod.class, times(5)); ClassWithStaticMethod.someStaticMethod(&quot;was called five times&quot;); verifyStatic(ClassWithStaticMethod.class, atLeast(2)); ClassWi...
[ "Verifies", "certain", "behavior", "of", "the", "<code", ">", "mockedClass<", "/", "code", ">", "happened", "at", "least", "once", "/", "exact", "number", "of", "times", "/", "never", ".", "E", ".", "g", ":", "<p", ">", "<pre", ">", "verifyStatic", "("...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-mockito2/src/main/java/org/powermock/api/mockito/PowerMockito.java#L262-L264
OpenLiberty/open-liberty
dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLUtils.java
SSLUtils.copyBuffer
public static void copyBuffer(WsByteBuffer src, WsByteBuffer dst) { """ Simlified method call for copyBuffer which sets length to copy at src.remaining. @param src @param dst """ copyBuffer(src, dst, src.remaining()); }
java
public static void copyBuffer(WsByteBuffer src, WsByteBuffer dst) { copyBuffer(src, dst, src.remaining()); }
[ "public", "static", "void", "copyBuffer", "(", "WsByteBuffer", "src", ",", "WsByteBuffer", "dst", ")", "{", "copyBuffer", "(", "src", ",", "dst", ",", "src", ".", "remaining", "(", ")", ")", ";", "}" ]
Simlified method call for copyBuffer which sets length to copy at src.remaining. @param src @param dst
[ "Simlified", "method", "call", "for", "copyBuffer", "which", "sets", "length", "to", "copy", "at", "src", ".", "remaining", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLUtils.java#L375-L377
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/clustering/LinkClustering.java
LinkClustering.getEdgeSimMatrix
private Matrix getEdgeSimMatrix(List<Edge> edgeList, SparseMatrix sm, boolean keepSimilarityMatrixInMemory) { """ Returns the edge similarity matrix for the edges in the provided sparse matrix. """ return (keepSimilarityMatrixInMemory) ? calculateEdgeSi...
java
private Matrix getEdgeSimMatrix(List<Edge> edgeList, SparseMatrix sm, boolean keepSimilarityMatrixInMemory) { return (keepSimilarityMatrixInMemory) ? calculateEdgeSimMatrix(edgeList, sm) : new LazySimilarityMatrix(edgeList, sm); }
[ "private", "Matrix", "getEdgeSimMatrix", "(", "List", "<", "Edge", ">", "edgeList", ",", "SparseMatrix", "sm", ",", "boolean", "keepSimilarityMatrixInMemory", ")", "{", "return", "(", "keepSimilarityMatrixInMemory", ")", "?", "calculateEdgeSimMatrix", "(", "edgeList",...
Returns the edge similarity matrix for the edges in the provided sparse matrix.
[ "Returns", "the", "edge", "similarity", "matrix", "for", "the", "edges", "in", "the", "provided", "sparse", "matrix", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/clustering/LinkClustering.java#L357-L362
aws/aws-sdk-java
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/internal/Utils.java
Utils.findShapeModelByC2jName
public static ShapeModel findShapeModelByC2jName(IntermediateModel intermediateModel, String shapeC2jName) throws IllegalArgumentException { """ Search for intermediate shape model by its c2j name. @return ShapeModel @throws IllegalArgumentException if the specified c2j name is not found in the in...
java
public static ShapeModel findShapeModelByC2jName(IntermediateModel intermediateModel, String shapeC2jName) throws IllegalArgumentException { ShapeModel shapeModel = findShapeModelByC2jNameIfExists(intermediateModel, shapeC2jName); if (shapeModel != null) { return shapeModel; ...
[ "public", "static", "ShapeModel", "findShapeModelByC2jName", "(", "IntermediateModel", "intermediateModel", ",", "String", "shapeC2jName", ")", "throws", "IllegalArgumentException", "{", "ShapeModel", "shapeModel", "=", "findShapeModelByC2jNameIfExists", "(", "intermediateModel...
Search for intermediate shape model by its c2j name. @return ShapeModel @throws IllegalArgumentException if the specified c2j name is not found in the intermediate model.
[ "Search", "for", "intermediate", "shape", "model", "by", "its", "c2j", "name", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/internal/Utils.java#L265-L274
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getAttributeUUIDs
@Pure public static List<UUID> getAttributeUUIDs(Node document, String... path) { """ Replies the UUIDs that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. Be careful about the fact that the names are case sensitives. @p...
java
@Pure public static List<UUID> getAttributeUUIDs(Node document, String... path) { assert document != null : AssertMessages.notNullParameter(0); return getAttributeUUIDs(document, true, path); }
[ "@", "Pure", "public", "static", "List", "<", "UUID", ">", "getAttributeUUIDs", "(", "Node", "document", ",", "String", "...", "path", ")", "{", "assert", "document", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ")", ";", "return...
Replies the UUIDs that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. Be careful about the fact that the names are case sensitives. @param document is the XML document to explore. @param path is the list of and ended by the attribut...
[ "Replies", "the", "UUIDs", "that", "corresponds", "to", "the", "specified", "attribute", "s", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1099-L1103
elki-project/elki
elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/GaussianUniformMixture.java
GaussianUniformMixture.loglikelihoodNormal
private double loglikelihoodNormal(DBIDs objids, SetDBIDs anomalous, CovarianceMatrix builder, Relation<V> relation) { """ Computes the loglikelihood of all normal objects. Gaussian model @param objids Object IDs for 'normal' objects. @param builder Covariance matrix builder @param relation Database @return ...
java
private double loglikelihoodNormal(DBIDs objids, SetDBIDs anomalous, CovarianceMatrix builder, Relation<V> relation) { double[] mean = builder.getMeanVector(); final LUDecomposition lu = new LUDecomposition(builder.makeSampleMatrix()); double[][] covInv = lu.inverse(); // for each object compute probabi...
[ "private", "double", "loglikelihoodNormal", "(", "DBIDs", "objids", ",", "SetDBIDs", "anomalous", ",", "CovarianceMatrix", "builder", ",", "Relation", "<", "V", ">", "relation", ")", "{", "double", "[", "]", "mean", "=", "builder", ".", "getMeanVector", "(", ...
Computes the loglikelihood of all normal objects. Gaussian model @param objids Object IDs for 'normal' objects. @param builder Covariance matrix builder @param relation Database @return loglikelihood for normal objects
[ "Computes", "the", "loglikelihood", "of", "all", "normal", "objects", ".", "Gaussian", "model" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-outlier/src/main/java/de/lmu/ifi/dbs/elki/algorithm/outlier/GaussianUniformMixture.java#L199-L212
knowm/XChange
xchange-anx/src/main/java/org/knowm/xchange/anx/v2/ANXAdapters.java
ANXAdapters.adaptWallet
public static Wallet adaptWallet(Map<String, ANXWallet> anxWallets) { """ Adapts a List of ANX Wallets to an XChange Wallet @param anxWallets @return """ List<Balance> balances = new ArrayList<>(); for (ANXWallet anxWallet : anxWallets.values()) { Balance balance = adaptBalance(anxWallet); ...
java
public static Wallet adaptWallet(Map<String, ANXWallet> anxWallets) { List<Balance> balances = new ArrayList<>(); for (ANXWallet anxWallet : anxWallets.values()) { Balance balance = adaptBalance(anxWallet); if (balance != null) { balances.add(balance); } } return new Wallet(b...
[ "public", "static", "Wallet", "adaptWallet", "(", "Map", "<", "String", ",", "ANXWallet", ">", "anxWallets", ")", "{", "List", "<", "Balance", ">", "balances", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "ANXWallet", "anxWallet", ":", "anxW...
Adapts a List of ANX Wallets to an XChange Wallet @param anxWallets @return
[ "Adapts", "a", "List", "of", "ANX", "Wallets", "to", "an", "XChange", "Wallet" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-anx/src/main/java/org/knowm/xchange/anx/v2/ANXAdapters.java#L165-L176
Azure/azure-sdk-for-java
sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentScansInner.java
ManagedDatabaseVulnerabilityAssessmentScansInner.beginInitiateScanAsync
public Observable<Void> beginInitiateScanAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) { """ Executes a Vulnerability Assessment database scan. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the...
java
public Observable<Void> beginInitiateScanAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) { return beginInitiateScanWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId).map(new Func1<ServiceResponse<Void>, Void>() { @Ov...
[ "public", "Observable", "<", "Void", ">", "beginInitiateScanAsync", "(", "String", "resourceGroupName", ",", "String", "managedInstanceName", ",", "String", "databaseName", ",", "String", "scanId", ")", "{", "return", "beginInitiateScanWithServiceResponseAsync", "(", "r...
Executes a Vulnerability Assessment database scan. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managedInstanceName The name of the managed instance. @param databaseName The name of the database. ...
[ "Executes", "a", "Vulnerability", "Assessment", "database", "scan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentScansInner.java#L443-L450
apereo/cas
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java
OAuth20Utils.isResponseModeTypeFormPost
public static boolean isResponseModeTypeFormPost(final OAuthRegisteredService registeredService, final OAuth20ResponseModeTypes responseType) { """ Is response mode type form post? @param registeredService the registered service @param responseType the response type @return the boolean """ re...
java
public static boolean isResponseModeTypeFormPost(final OAuthRegisteredService registeredService, final OAuth20ResponseModeTypes responseType) { return responseType == OAuth20ResponseModeTypes.FORM_POST || StringUtils.equalsIgnoreCase("post", registeredService.getResponseType()); }
[ "public", "static", "boolean", "isResponseModeTypeFormPost", "(", "final", "OAuthRegisteredService", "registeredService", ",", "final", "OAuth20ResponseModeTypes", "responseType", ")", "{", "return", "responseType", "==", "OAuth20ResponseModeTypes", ".", "FORM_POST", "||", ...
Is response mode type form post? @param registeredService the registered service @param responseType the response type @return the boolean
[ "Is", "response", "mode", "type", "form", "post?" ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L196-L198
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PipelineApi.java
PipelineApi.takeOwnershipPipelineSchedule
public PipelineSchedule takeOwnershipPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException { """ Update the owner of the pipeline schedule of a project. <pre><code>POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership</code></pre> @param projectId...
java
public PipelineSchedule takeOwnershipPipelineSchedule(Object projectIdOrPath, Integer pipelineScheduleId) throws GitLabApiException { Response response = post(Response.Status.OK, "", "projects", getProjectIdOrPath(projectIdOrPath), "pipeline_schedules", pipelineScheduleId, "take_ownership"); return (r...
[ "public", "PipelineSchedule", "takeOwnershipPipelineSchedule", "(", "Object", "projectIdOrPath", ",", "Integer", "pipelineScheduleId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "post", "(", "Response", ".", "Status", ".", "OK", ",", "\"\""...
Update the owner of the pipeline schedule of a project. <pre><code>POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param pipelineScheduleId the pipelin...
[ "Update", "the", "owner", "of", "the", "pipeline", "schedule", "of", "a", "project", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PipelineApi.java#L455-L459
kohsuke/args4j
args4j/src/org/kohsuke/args4j/OptionHandlerRegistry.java
OptionHandlerRegistry.registerHandler
public void registerHandler(Class valueType, OptionHandlerFactory factory) { """ Registers a user-defined {@link OptionHandler} class with args4j. <p> This method allows users to extend the behavior of args4j by writing their own {@link OptionHandler} implementation. @param valueType The specified handler...
java
public void registerHandler(Class valueType, OptionHandlerFactory factory) { checkNonNull(valueType, "valueType"); checkNonNull(factory, "factory"); handlers.put(valueType, factory); }
[ "public", "void", "registerHandler", "(", "Class", "valueType", ",", "OptionHandlerFactory", "factory", ")", "{", "checkNonNull", "(", "valueType", ",", "\"valueType\"", ")", ";", "checkNonNull", "(", "factory", ",", "\"factory\"", ")", ";", "handlers", ".", "pu...
Registers a user-defined {@link OptionHandler} class with args4j. <p> This method allows users to extend the behavior of args4j by writing their own {@link OptionHandler} implementation. @param valueType The specified handler is used when the field/method annotated by {@link Option} is of this type. @param factory Fa...
[ "Registers", "a", "user", "-", "defined", "{", "@link", "OptionHandler", "}", "class", "with", "args4j", "." ]
train
https://github.com/kohsuke/args4j/blob/dc2e7e265caf15a1a146e3389c1f16a8781f06cf/args4j/src/org/kohsuke/args4j/OptionHandlerRegistry.java#L155-L160
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/template/VelocityRendererImpl.java
VelocityRendererImpl.getVelocityEngine
public static synchronized VelocityEngine getVelocityEngine() { """ <p> Returns the VelocityEngine associated with this factory. If this is the first time we are using the engine, create it and initialise it.</p> <p> Note that velocity engines are hugely resource intensive, so we don't want too many of them....
java
public static synchronized VelocityEngine getVelocityEngine() { if (engine == null) { VelocityEngine newEngine = new VelocityEngine(); // Class Loader newEngine.addProperty("resource.loader", "class"); newEngine.addProperty("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader....
[ "public", "static", "synchronized", "VelocityEngine", "getVelocityEngine", "(", ")", "{", "if", "(", "engine", "==", "null", ")", "{", "VelocityEngine", "newEngine", "=", "new", "VelocityEngine", "(", ")", ";", "// Class Loader", "newEngine", ".", "addProperty", ...
<p> Returns the VelocityEngine associated with this factory. If this is the first time we are using the engine, create it and initialise it.</p> <p> Note that velocity engines are hugely resource intensive, so we don't want too many of them. For the time being we have a single instance stored as a static variable. Thi...
[ "<p", ">", "Returns", "the", "VelocityEngine", "associated", "with", "this", "factory", ".", "If", "this", "is", "the", "first", "time", "we", "are", "using", "the", "engine", "create", "it", "and", "initialise", "it", ".", "<", "/", "p", ">" ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/template/VelocityRendererImpl.java#L120-L151
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/InternalInputStreamManager.java
InternalInputStreamManager.hasStream
public boolean hasStream(SIBUuid12 streamID, int priority, Reliability reliability ) throws SIResourceException { """ returns true if a given set of streams exists @param streamID @return @throws SIResourceException """ if (tc.isEntryEnabled()) SibTr.entry(tc, "hasStream", new Object[]...
java
public boolean hasStream(SIBUuid12 streamID, int priority, Reliability reliability ) throws SIResourceException { if (tc.isEntryEnabled()) SibTr.entry(tc, "hasStream", new Object[]{streamID, new Integer(priority), reliability}); StreamSet streamSet = (StreamSet) streamSets.get(stream...
[ "public", "boolean", "hasStream", "(", "SIBUuid12", "streamID", ",", "int", "priority", ",", "Reliability", "reliability", ")", "throws", "SIResourceException", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ","...
returns true if a given set of streams exists @param streamID @return @throws SIResourceException
[ "returns", "true", "if", "a", "given", "set", "of", "streams", "exists" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/InternalInputStreamManager.java#L79-L96
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/InheritanceHelper.java
InheritanceHelper.isProxyOrSubTypeOf
public boolean isProxyOrSubTypeOf(JvmTypeReference candidate, Class<?> jvmSuperType, Class<? extends XtendTypeDeclaration> sarlSuperType, boolean onlyInterface) { """ Replies if the type candidate is a proxy (unresolved type) or a subtype of the given super type. @param candidate the type to test. @param jv...
java
public boolean isProxyOrSubTypeOf(JvmTypeReference candidate, Class<?> jvmSuperType, Class<? extends XtendTypeDeclaration> sarlSuperType, boolean onlyInterface) { if (candidate.eIsProxy()) { return true; } return isSubTypeOf(candidate, jvmSuperType, sarlSuperType, onlyInterface); }
[ "public", "boolean", "isProxyOrSubTypeOf", "(", "JvmTypeReference", "candidate", ",", "Class", "<", "?", ">", "jvmSuperType", ",", "Class", "<", "?", "extends", "XtendTypeDeclaration", ">", "sarlSuperType", ",", "boolean", "onlyInterface", ")", "{", "if", "(", "...
Replies if the type candidate is a proxy (unresolved type) or a subtype of the given super type. @param candidate the type to test. @param jvmSuperType the expected JVM super-type. @param sarlSuperType the expected SARL super-type. @param onlyInterface <code>true</code> if only interface types are matching; <code>fals...
[ "Replies", "if", "the", "type", "candidate", "is", "a", "proxy", "(", "unresolved", "type", ")", "or", "a", "subtype", "of", "the", "given", "super", "type", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/InheritanceHelper.java#L183-L189
netty/netty
buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java
CompositeByteBuf.addComponents
public CompositeByteBuf addComponents(int cIndex, Iterable<ByteBuf> buffers) { """ Add the given {@link ByteBuf}s on the specific index Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. If you need to have it increased you need to handle it by your own. <p> ...
java
public CompositeByteBuf addComponents(int cIndex, Iterable<ByteBuf> buffers) { return addComponents(false, cIndex, buffers); }
[ "public", "CompositeByteBuf", "addComponents", "(", "int", "cIndex", ",", "Iterable", "<", "ByteBuf", ">", "buffers", ")", "{", "return", "addComponents", "(", "false", ",", "cIndex", ",", "buffers", ")", ";", "}" ]
Add the given {@link ByteBuf}s on the specific index Be aware that this method does not increase the {@code writerIndex} of the {@link CompositeByteBuf}. If you need to have it increased you need to handle it by your own. <p> {@link ByteBuf#release()} ownership of all {@link ByteBuf} objects in {@code buffers} is tran...
[ "Add", "the", "given", "{", "@link", "ByteBuf", "}", "s", "on", "the", "specific", "index" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java#L413-L415
nguyenq/tess4j
src/main/java/net/sourceforge/tess4j/util/Utils.java
Utils.writeFile
public static void writeFile(byte[] data, File outFile) throws IOException { """ Writes byte array to file. @param data byte array @param outFile output file @throws IOException """ // create parent dirs when necessary if (outFile.getParentFile() != null) { outFile.getParentFil...
java
public static void writeFile(byte[] data, File outFile) throws IOException { // create parent dirs when necessary if (outFile.getParentFile() != null) { outFile.getParentFile().mkdirs(); } try (FileOutputStream fos = new FileOutputStream(outFile)) { fos.write(data...
[ "public", "static", "void", "writeFile", "(", "byte", "[", "]", "data", ",", "File", "outFile", ")", "throws", "IOException", "{", "// create parent dirs when necessary", "if", "(", "outFile", ".", "getParentFile", "(", ")", "!=", "null", ")", "{", "outFile", ...
Writes byte array to file. @param data byte array @param outFile output file @throws IOException
[ "Writes", "byte", "array", "to", "file", "." ]
train
https://github.com/nguyenq/tess4j/blob/cfcd4a8a44042f150b4aaf7bdf5ffc485a2236e1/src/main/java/net/sourceforge/tess4j/util/Utils.java#L38-L46
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/ContainerKeyCache.java
ContainerKeyCache.updateSegmentIndexOffsetIfMissing
void updateSegmentIndexOffsetIfMissing(long segmentId, Supplier<Long> indexOffsetGetter) { """ Updates the Last Indexed Offset for a given Segment, but only if there currently isn't any information about that. See {@link #updateSegmentIndexOffset(long, long)} for more details. @param segmentId The Id o...
java
void updateSegmentIndexOffsetIfMissing(long segmentId, Supplier<Long> indexOffsetGetter) { SegmentKeyCache cache = null; int generation; synchronized (this.segmentCaches) { generation = this.currentCacheGeneration; if (!this.segmentCaches.containsKey(segmentId)) { ...
[ "void", "updateSegmentIndexOffsetIfMissing", "(", "long", "segmentId", ",", "Supplier", "<", "Long", ">", "indexOffsetGetter", ")", "{", "SegmentKeyCache", "cache", "=", "null", ";", "int", "generation", ";", "synchronized", "(", "this", ".", "segmentCaches", ")",...
Updates the Last Indexed Offset for a given Segment, but only if there currently isn't any information about that. See {@link #updateSegmentIndexOffset(long, long)} for more details. @param segmentId The Id of the Segment to update the Last Indexed Offset for. @param indexOffsetGetter A Supplier that is only i...
[ "Updates", "the", "Last", "Indexed", "Offset", "for", "a", "given", "Segment", "but", "only", "if", "there", "currently", "isn", "t", "any", "information", "about", "that", ".", "See", "{", "@link", "#updateSegmentIndexOffset", "(", "long", "long", ")", "}",...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/ContainerKeyCache.java#L222-L235
aws/aws-sdk-java
aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/StandardsSubscription.java
StandardsSubscription.withStandardsInput
public StandardsSubscription withStandardsInput(java.util.Map<String, String> standardsInput) { """ <p/> @param standardsInput @return Returns a reference to this object so that method calls can be chained together. """ setStandardsInput(standardsInput); return this; }
java
public StandardsSubscription withStandardsInput(java.util.Map<String, String> standardsInput) { setStandardsInput(standardsInput); return this; }
[ "public", "StandardsSubscription", "withStandardsInput", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "standardsInput", ")", "{", "setStandardsInput", "(", "standardsInput", ")", ";", "return", "this", ";", "}" ]
<p/> @param standardsInput @return Returns a reference to this object so that method calls can be chained together.
[ "<p", "/", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/StandardsSubscription.java#L209-L212
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/LazyGroupMember.java
LazyGroupMember.loadIfNecessary
private void loadIfNecessary() { """ Attempts to load the lazy command from the command registry of the parent command group, but only if it hasn't already been loaded. """ if (loadedMember != null) { return; } CommandRegistry commandRegistry = parentGroup.getCommandRegis...
java
private void loadIfNecessary() { if (loadedMember != null) { return; } CommandRegistry commandRegistry = parentGroup.getCommandRegistry(); Assert.isTrue(parentGroup.getCommandRegistry() != null, "Command registry must be set for group '" + parentGroup.getId...
[ "private", "void", "loadIfNecessary", "(", ")", "{", "if", "(", "loadedMember", "!=", "null", ")", "{", "return", ";", "}", "CommandRegistry", "commandRegistry", "=", "parentGroup", ".", "getCommandRegistry", "(", ")", ";", "Assert", ".", "isTrue", "(", "par...
Attempts to load the lazy command from the command registry of the parent command group, but only if it hasn't already been loaded.
[ "Attempts", "to", "load", "the", "lazy", "command", "from", "the", "command", "registry", "of", "the", "parent", "command", "group", "but", "only", "if", "it", "hasn", "t", "already", "been", "loaded", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/LazyGroupMember.java#L93-L126
JavaMoney/jsr354-api
src/main/java/javax/money/Monetary.java
Monetary.getRoundingNames
public static Set<String> getRoundingNames(String... providers) { """ Allows to access the names of the current defined roundings. @param providers the providers and ordering to be used. By default providers and ordering as defined in #getDefaultProviders is used. @return the set of custom rounding ids, never...
java
public static Set<String> getRoundingNames(String... providers) { return Optional.ofNullable(monetaryRoundingsSingletonSpi()).orElseThrow( () -> new MonetaryException("No MonetaryRoundingsSpi loaded, query functionality is not available.")) .getRoundingNames(providers); }
[ "public", "static", "Set", "<", "String", ">", "getRoundingNames", "(", "String", "...", "providers", ")", "{", "return", "Optional", ".", "ofNullable", "(", "monetaryRoundingsSingletonSpi", "(", ")", ")", ".", "orElseThrow", "(", "(", ")", "->", "new", "Mon...
Allows to access the names of the current defined roundings. @param providers the providers and ordering to be used. By default providers and ordering as defined in #getDefaultProviders is used. @return the set of custom rounding ids, never {@code null}.
[ "Allows", "to", "access", "the", "names", "of", "the", "current", "defined", "roundings", "." ]
train
https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/Monetary.java#L262-L266
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java
CassandraSchemaManager.addColumnToTable
private void addColumnToTable(TableInfo tableInfo, ColumnInfo column) throws Exception { """ Adds column to table if not exists previously i.e. alter table. @param tableInfo the table info @param column the column @throws Exception the exception """ CQLTranslator translator = new CQLTranslator(...
java
private void addColumnToTable(TableInfo tableInfo, ColumnInfo column) throws Exception { CQLTranslator translator = new CQLTranslator(); StringBuilder addColumnQuery = new StringBuilder("ALTER TABLE "); translator.ensureCase(addColumnQuery, tableInfo.getTableName(), false); addColumn...
[ "private", "void", "addColumnToTable", "(", "TableInfo", "tableInfo", ",", "ColumnInfo", "column", ")", "throws", "Exception", "{", "CQLTranslator", "translator", "=", "new", "CQLTranslator", "(", ")", ";", "StringBuilder", "addColumnQuery", "=", "new", "StringBuild...
Adds column to table if not exists previously i.e. alter table. @param tableInfo the table info @param column the column @throws Exception the exception
[ "Adds", "column", "to", "table", "if", "not", "exists", "previously", "i", ".", "e", ".", "alter", "table", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java#L1476-L1509
HsiangLeekwok/hlklib
hlklib/src/main/java/com/hlk/hlklib/lib/datetimepicker/DateTimeDialogFragment.java
DateTimeDialogFragment.onDateChanged
@Override public void onDateChanged(int year, int month, int day) { """ <p>The callback used by the DatePicker to update {@code mCalendar} as the user changes the date. Each time this is called, we also update the text on the date tab to reflect the date the user has currenly selected.</p> <p> <p>Implemen...
java
@Override public void onDateChanged(int year, int month, int day) { mCalendar.set(year, month, day); updateDateTab(); }
[ "@", "Override", "public", "void", "onDateChanged", "(", "int", "year", ",", "int", "month", ",", "int", "day", ")", "{", "mCalendar", ".", "set", "(", "year", ",", "month", ",", "day", ")", ";", "updateDateTab", "(", ")", ";", "}" ]
<p>The callback used by the DatePicker to update {@code mCalendar} as the user changes the date. Each time this is called, we also update the text on the date tab to reflect the date the user has currenly selected.</p> <p> <p>Implements the {@link DateFragment.DateChangedListener} interface.</p>
[ "<p", ">", "The", "callback", "used", "by", "the", "DatePicker", "to", "update", "{" ]
train
https://github.com/HsiangLeekwok/hlklib/blob/b122f6dcab7cec60c8e5455e0c31613d08bec6ad/hlklib/src/main/java/com/hlk/hlklib/lib/datetimepicker/DateTimeDialogFragment.java#L266-L271
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/bolt/AmBaseBolt.java
AmBaseBolt.emitWithOnlyAnchorAndStream
protected void emitWithOnlyAnchorAndStream(StreamMessage message, String streamId) { """ Use anchor function(child message failed. notify fail to parent message.), and not use this class's key history function.<br> Send message to downstream component with streamId.<br> Use following situation. <ol> <li>Not us...
java
protected void emitWithOnlyAnchorAndStream(StreamMessage message, String streamId) { getCollector().emit(streamId, this.getExecutingTuple(), new Values("", message)); }
[ "protected", "void", "emitWithOnlyAnchorAndStream", "(", "StreamMessage", "message", ",", "String", "streamId", ")", "{", "getCollector", "(", ")", ".", "emit", "(", "streamId", ",", "this", ".", "getExecutingTuple", "(", ")", ",", "new", "Values", "(", "\"\""...
Use anchor function(child message failed. notify fail to parent message.), and not use this class's key history function.<br> Send message to downstream component with streamId.<br> Use following situation. <ol> <li>Not use this class's key history function.</li> <li>Use storm's fault detect function.</li> </ol> @para...
[ "Use", "anchor", "function", "(", "child", "message", "failed", ".", "notify", "fail", "to", "parent", "message", ".", ")", "and", "not", "use", "this", "class", "s", "key", "history", "function", ".", "<br", ">", "Send", "message", "to", "downstream", "...
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/bolt/AmBaseBolt.java#L705-L708
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
FSDirectory.setTimes
void setTimes(String src, INode inode, long mtime, long atime, boolean force) throws IOException { """ Sets the access time on the file/directory. Logs it in the transaction log """ if (unprotectedSetTimes(src, inode, mtime, atime, force)) { fsI...
java
void setTimes(String src, INode inode, long mtime, long atime, boolean force) throws IOException { if (unprotectedSetTimes(src, inode, mtime, atime, force)) { fsImage.getEditLog().logTimes(src, mtime, atime); } }
[ "void", "setTimes", "(", "String", "src", ",", "INode", "inode", ",", "long", "mtime", ",", "long", "atime", ",", "boolean", "force", ")", "throws", "IOException", "{", "if", "(", "unprotectedSetTimes", "(", "src", ",", "inode", ",", "mtime", ",", "atime...
Sets the access time on the file/directory. Logs it in the transaction log
[ "Sets", "the", "access", "time", "on", "the", "file", "/", "directory", ".", "Logs", "it", "in", "the", "transaction", "log" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java#L2807-L2812
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoGrid.java
EllipseClustersIntoGrid.findClosestEdge
protected static NodeInfo findClosestEdge( NodeInfo n , Point2D_F64 p ) { """ Finds the node which is an edge of 'n' that is closest to point 'p' """ double bestDistance = Double.MAX_VALUE; NodeInfo best = null; for (int i = 0; i < n.edges.size(); i++) { Edge e = n.edges.get(i); if( e.target.marke...
java
protected static NodeInfo findClosestEdge( NodeInfo n , Point2D_F64 p ) { double bestDistance = Double.MAX_VALUE; NodeInfo best = null; for (int i = 0; i < n.edges.size(); i++) { Edge e = n.edges.get(i); if( e.target.marked ) continue; double d = e.target.ellipse.center.distance2(p); if( d < bes...
[ "protected", "static", "NodeInfo", "findClosestEdge", "(", "NodeInfo", "n", ",", "Point2D_F64", "p", ")", "{", "double", "bestDistance", "=", "Double", ".", "MAX_VALUE", ";", "NodeInfo", "best", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "i...
Finds the node which is an edge of 'n' that is closest to point 'p'
[ "Finds", "the", "node", "which", "is", "an", "edge", "of", "n", "that", "is", "closest", "to", "point", "p" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/EllipseClustersIntoGrid.java#L217-L234
codelibs/jcifs
src/main/java/jcifs/smb1/smb1/AndXServerMessageBlock.java
AndXServerMessageBlock.decode
int decode( byte[] buffer, int bufferIndex ) { """ /* We overload this because we want readAndXWireFormat to read the parameter words and bytes. This is so when commands are batched together we can recursivly call readAndXWireFormat without reading the non-existent header. """ int start = headerSta...
java
int decode( byte[] buffer, int bufferIndex ) { int start = headerStart = bufferIndex; bufferIndex += readHeaderWireFormat( buffer, bufferIndex ); bufferIndex += readAndXWireFormat( buffer, bufferIndex ); length = bufferIndex - start; return length; }
[ "int", "decode", "(", "byte", "[", "]", "buffer", ",", "int", "bufferIndex", ")", "{", "int", "start", "=", "headerStart", "=", "bufferIndex", ";", "bufferIndex", "+=", "readHeaderWireFormat", "(", "buffer", ",", "bufferIndex", ")", ";", "bufferIndex", "+=",...
/* We overload this because we want readAndXWireFormat to read the parameter words and bytes. This is so when commands are batched together we can recursivly call readAndXWireFormat without reading the non-existent header.
[ "/", "*", "We", "overload", "this", "because", "we", "want", "readAndXWireFormat", "to", "read", "the", "parameter", "words", "and", "bytes", ".", "This", "is", "so", "when", "commands", "are", "batched", "together", "we", "can", "recursivly", "call", "readA...
train
https://github.com/codelibs/jcifs/blob/ac6a8ba2925648ae003ca2508aec32316065dc34/src/main/java/jcifs/smb1/smb1/AndXServerMessageBlock.java#L84-L92
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/chart/Scatter.java
Scatter.addSeries
public void addSeries( String seriesName, double[] x, double[] y ) { """ Add a new series by name and data. @param seriesName the name. @param x the x data array. @param y the y data array. """ XYSeries series = new XYSeries(seriesName); for( int i = 0; i < x.length; i++ ) { se...
java
public void addSeries( String seriesName, double[] x, double[] y ) { XYSeries series = new XYSeries(seriesName); for( int i = 0; i < x.length; i++ ) { series.add(x[i], y[i]); } dataset.addSeries(series); }
[ "public", "void", "addSeries", "(", "String", "seriesName", ",", "double", "[", "]", "x", ",", "double", "[", "]", "y", ")", "{", "XYSeries", "series", "=", "new", "XYSeries", "(", "seriesName", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i",...
Add a new series by name and data. @param seriesName the name. @param x the x data array. @param y the y data array.
[ "Add", "a", "new", "series", "by", "name", "and", "data", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/chart/Scatter.java#L80-L86
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.getAt
@SuppressWarnings("unchecked") public static List<Short> getAt(short[] array, Range range) { """ Support the subscript operator with a range for a short array @param array a short array @param range a range indicating the indices for the items to retrieve @return list of the retrieved shorts @since 1.0 ...
java
@SuppressWarnings("unchecked") public static List<Short> getAt(short[] array, Range range) { return primitiveArrayGet(array, range); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "List", "<", "Short", ">", "getAt", "(", "short", "[", "]", "array", ",", "Range", "range", ")", "{", "return", "primitiveArrayGet", "(", "array", ",", "range", ")", ";", "}" ]
Support the subscript operator with a range for a short array @param array a short array @param range a range indicating the indices for the items to retrieve @return list of the retrieved shorts @since 1.0
[ "Support", "the", "subscript", "operator", "with", "a", "range", "for", "a", "short", "array" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L13636-L13639
davidmoten/rxjava-jdbc
src/main/java/com/github/davidmoten/rx/RxUtil.java
RxUtil.getAndAddRequest
public static <T> long getAndAddRequest(AtomicLongFieldUpdater<T> requested, T object, long n) { """ Adds {@code n} to {@code requested} field and returns the value prior to addition once the addition is successful (uses CAS semantics). If overflows then sets {@code requested} field to {@code Long.MAX_VALUE}. ...
java
public static <T> long getAndAddRequest(AtomicLongFieldUpdater<T> requested, T object, long n) { // add n to field but check for overflow while (true) { long current = requested.get(object); long next = current + n; // check for overflow if (next < 0) { ...
[ "public", "static", "<", "T", ">", "long", "getAndAddRequest", "(", "AtomicLongFieldUpdater", "<", "T", ">", "requested", ",", "T", "object", ",", "long", "n", ")", "{", "// add n to field but check for overflow", "while", "(", "true", ")", "{", "long", "curre...
Adds {@code n} to {@code requested} field and returns the value prior to addition once the addition is successful (uses CAS semantics). If overflows then sets {@code requested} field to {@code Long.MAX_VALUE}. @param requested atomic field updater for a request count @param object contains the field updated by the upd...
[ "Adds", "{", "@code", "n", "}", "to", "{", "@code", "requested", "}", "field", "and", "returns", "the", "value", "prior", "to", "addition", "once", "the", "addition", "is", "successful", "(", "uses", "CAS", "semantics", ")", ".", "If", "overflows", "then...
train
https://github.com/davidmoten/rxjava-jdbc/blob/81e157d7071a825086bde81107b8694684cdff14/src/main/java/com/github/davidmoten/rx/RxUtil.java#L159-L172
hpsa/hpe-application-automation-tools-plugin
src/main/java/com/hp/application/automation/tools/results/RunResultRecorder.java
RunResultRecorder.publishLrReports
private void publishLrReports(@Nonnull Run<?, ?> build) throws IOException { """ Adds the html reports actions to the left side menu. @param build """ File reportDirectory = new File(build.getRootDir(), PERFORMANCE_REPORT_FOLDER); if (reportDirectory.exists()) { File htmlIndexFil...
java
private void publishLrReports(@Nonnull Run<?, ?> build) throws IOException { File reportDirectory = new File(build.getRootDir(), PERFORMANCE_REPORT_FOLDER); if (reportDirectory.exists()) { File htmlIndexFile = new File(reportDirectory, INDEX_HTML_NAME); if (htmlIndexFile.exists()...
[ "private", "void", "publishLrReports", "(", "@", "Nonnull", "Run", "<", "?", ",", "?", ">", "build", ")", "throws", "IOException", "{", "File", "reportDirectory", "=", "new", "File", "(", "build", ".", "getRootDir", "(", ")", ",", "PERFORMANCE_REPORT_FOLDER"...
Adds the html reports actions to the left side menu. @param build
[ "Adds", "the", "html", "reports", "actions", "to", "the", "left", "side", "menu", "." ]
train
https://github.com/hpsa/hpe-application-automation-tools-plugin/blob/987536f5551bc76fd028d746a951d1fd72c7567a/src/main/java/com/hp/application/automation/tools/results/RunResultRecorder.java#L238-L254
elki-project/elki
elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/unionfind/WeightedQuickUnionInteger.java
WeightedQuickUnionInteger.union
public int union(int first, int second) { """ Join the components of elements p and q. @param first First element @param second Second element @return Component id. """ int firstComponent = find(first), secondComponent = find(second); if(firstComponent == secondComponent) { return firstCompo...
java
public int union(int first, int second) { int firstComponent = find(first), secondComponent = find(second); if(firstComponent == secondComponent) { return firstComponent; } final int w1 = weight[firstComponent], w2 = weight[secondComponent]; if(w1 > w2) { parent[secondComponent] = firstC...
[ "public", "int", "union", "(", "int", "first", ",", "int", "second", ")", "{", "int", "firstComponent", "=", "find", "(", "first", ")", ",", "secondComponent", "=", "find", "(", "second", ")", ";", "if", "(", "firstComponent", "==", "secondComponent", ")...
Join the components of elements p and q. @param first First element @param second Second element @return Component id.
[ "Join", "the", "components", "of", "elements", "p", "and", "q", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/unionfind/WeightedQuickUnionInteger.java#L119-L135
lucee/Lucee
core/src/main/java/lucee/runtime/functions/cache/CacheClear.java
CacheClear.call
public static double call(PageContext pc, String strFilter) throws PageException { """ FUTURE remove, only exist for code in Lucee archives using that function """ return _call(pc, strFilter, null); }
java
public static double call(PageContext pc, String strFilter) throws PageException { return _call(pc, strFilter, null); }
[ "public", "static", "double", "call", "(", "PageContext", "pc", ",", "String", "strFilter", ")", "throws", "PageException", "{", "return", "_call", "(", "pc", ",", "strFilter", ",", "null", ")", ";", "}" ]
FUTURE remove, only exist for code in Lucee archives using that function
[ "FUTURE", "remove", "only", "exist", "for", "code", "in", "Lucee", "archives", "using", "that", "function" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/functions/cache/CacheClear.java#L55-L57
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java
TransformersLogger.logAttributeWarning
public void logAttributeWarning(PathAddress address, Set<String> attributes) { """ Log a warning for the resource at the provided address and the given attributes. The detail message is a default 'Attributes are not understood in the target model version and this resource will need to be ignored on the target hos...
java
public void logAttributeWarning(PathAddress address, Set<String> attributes) { logAttributeWarning(address, null, null, attributes); }
[ "public", "void", "logAttributeWarning", "(", "PathAddress", "address", ",", "Set", "<", "String", ">", "attributes", ")", "{", "logAttributeWarning", "(", "address", ",", "null", ",", "null", ",", "attributes", ")", ";", "}" ]
Log a warning for the resource at the provided address and the given attributes. The detail message is a default 'Attributes are not understood in the target model version and this resource will need to be ignored on the target host.' @param address where warning occurred @param attributes attributes we are warning...
[ "Log", "a", "warning", "for", "the", "resource", "at", "the", "provided", "address", "and", "the", "given", "attributes", ".", "The", "detail", "message", "is", "a", "default", "Attributes", "are", "not", "understood", "in", "the", "target", "model", "versio...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/transform/TransformersLogger.java#L109-L111