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
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/CreateApplicationRequest.java
CreateApplicationRequest.withTags
public CreateApplicationRequest withTags(java.util.Map<String, String> tags) { """ The Tags for the app. @param tags The Tags for the app. @return Returns a reference to this object so that method calls can be chained together. """ setTags(tags); return this; }
java
public CreateApplicationRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateApplicationRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
The Tags for the app. @param tags The Tags for the app. @return Returns a reference to this object so that method calls can be chained together.
[ "The", "Tags", "for", "the", "app", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/CreateApplicationRequest.java#L97-L100
paypal/SeLion
server/src/main/java/com/paypal/selion/utils/AuthenticationHelper.java
AuthenticationHelper.authenticate
public static boolean authenticate(String userName, String userPassword) { """ Tries authenticating a given credentials and returns <code>true</code> if the credentials were valid. @param userName @param userPassword @return - <code>true</code> if the credentials were valid. """ LOGGER.entering(us...
java
public static boolean authenticate(String userName, String userPassword) { LOGGER.entering(userName, StringUtils.isBlank(userPassword) ? userPassword : userPassword.replaceAll(".", "*")); boolean validLogin = false; byte[] currentAuthData; byte[] hashedInputData; if (StringUtils....
[ "public", "static", "boolean", "authenticate", "(", "String", "userName", ",", "String", "userPassword", ")", "{", "LOGGER", ".", "entering", "(", "userName", ",", "StringUtils", ".", "isBlank", "(", "userPassword", ")", "?", "userPassword", ":", "userPassword",...
Tries authenticating a given credentials and returns <code>true</code> if the credentials were valid. @param userName @param userPassword @return - <code>true</code> if the credentials were valid.
[ "Tries", "authenticating", "a", "given", "credentials", "and", "returns", "<code", ">", "true<", "/", "code", ">", "if", "the", "credentials", "were", "valid", "." ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/utils/AuthenticationHelper.java#L68-L90
crawljax/crawljax
core/src/main/java/com/crawljax/browser/WebDriverBackedEmbeddedBrowser.java
WebDriverBackedEmbeddedBrowser.fireEventWait
private boolean fireEventWait(WebElement webElement, Eventable eventable) throws ElementNotVisibleException, InterruptedException { """ Fires the event and waits for a specified time. @param webElement the element to fire event on. @param eventable The HTML event type (onclick, onmouseover, ...). @return ...
java
private boolean fireEventWait(WebElement webElement, Eventable eventable) throws ElementNotVisibleException, InterruptedException { switch (eventable.getEventType()) { case click: try { webElement.click(); } catch (ElementNotVisibleException e) { throw e; } catch (WebDriverException e) { ...
[ "private", "boolean", "fireEventWait", "(", "WebElement", "webElement", ",", "Eventable", "eventable", ")", "throws", "ElementNotVisibleException", ",", "InterruptedException", "{", "switch", "(", "eventable", ".", "getEventType", "(", ")", ")", "{", "case", "click"...
Fires the event and waits for a specified time. @param webElement the element to fire event on. @param eventable The HTML event type (onclick, onmouseover, ...). @return true if firing event is successful. @throws InterruptedException when interrupted during the wait.
[ "Fires", "the", "event", "and", "waits", "for", "a", "specified", "time", "." ]
train
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/browser/WebDriverBackedEmbeddedBrowser.java#L288-L311
payneteasy/superfly
superfly-service/src/main/java/com/payneteasy/superfly/utils/PGPKeyValidator.java
PGPKeyValidator.validatePublicKey
public static void validatePublicKey(String value, PublicKeyCrypto crypto) throws BadPublicKeyException { """ Validates a PGP public key. @param value value to validate @param crypto crypto implementation to carry out additional checks @throws BadPublicKeyException thrown if validation fails; getMes...
java
public static void validatePublicKey(String value, PublicKeyCrypto crypto) throws BadPublicKeyException { if (org.springframework.util.StringUtils.hasText(value)) { int open = value.indexOf("-----BEGIN PGP PUBLIC KEY BLOCK-----"); int close = value.indexOf("-----END PGP PUBLIC KEY BLOCK-...
[ "public", "static", "void", "validatePublicKey", "(", "String", "value", ",", "PublicKeyCrypto", "crypto", ")", "throws", "BadPublicKeyException", "{", "if", "(", "org", ".", "springframework", ".", "util", ".", "StringUtils", ".", "hasText", "(", "value", ")", ...
Validates a PGP public key. @param value value to validate @param crypto crypto implementation to carry out additional checks @throws BadPublicKeyException thrown if validation fails; getMessage() contains error code
[ "Validates", "a", "PGP", "public", "key", "." ]
train
https://github.com/payneteasy/superfly/blob/4cad6d0f8e951a61f3c302c49b13a51d179076f8/superfly-service/src/main/java/com/payneteasy/superfly/utils/PGPKeyValidator.java#L20-L38
HeidelTime/heideltime
src/de/unihd/dbs/uima/annotator/treetagger/TreeTaggerProperties.java
TreeTaggerProperties.getTokenizationProcess
@Deprecated public Process getTokenizationProcess(File inputFile) throws IOException { """ This method creates a process with some parameters for the tokenizer script. Deprecated: We use TreeTaggerTokenizer in the same package nowadays which implements the utf8-tokenize.perl script from the TreeTagger package...
java
@Deprecated public Process getTokenizationProcess(File inputFile) throws IOException { // assemble a command line for the tokenization script and execute it ArrayList<String> command = new ArrayList<String>(); command.add("perl"); if(this.utf8Switch != "") command.add(this.utf8Switch); command.add(this.ro...
[ "@", "Deprecated", "public", "Process", "getTokenizationProcess", "(", "File", "inputFile", ")", "throws", "IOException", "{", "// assemble a command line for the tokenization script and execute it", "ArrayList", "<", "String", ">", "command", "=", "new", "ArrayList", "<", ...
This method creates a process with some parameters for the tokenizer script. Deprecated: We use TreeTaggerTokenizer in the same package nowadays which implements the utf8-tokenize.perl script from the TreeTagger package. This fixes some issues with Perl's Unicode handling. @param inputFile @return @throws IOException
[ "This", "method", "creates", "a", "process", "with", "some", "parameters", "for", "the", "tokenizer", "script", "." ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/de/unihd/dbs/uima/annotator/treetagger/TreeTaggerProperties.java#L59-L80
line/armeria
saml/src/main/java/com/linecorp/armeria/server/saml/SamlEndpoint.java
SamlEndpoint.ofHttpPost
public static SamlEndpoint ofHttpPost(URI uri) { """ Creates a {@link SamlEndpoint} of the specified {@code uri} and the HTTP POST binding protocol. """ requireNonNull(uri, "uri"); return new SamlEndpoint(uri, SamlBindingProtocol.HTTP_POST); }
java
public static SamlEndpoint ofHttpPost(URI uri) { requireNonNull(uri, "uri"); return new SamlEndpoint(uri, SamlBindingProtocol.HTTP_POST); }
[ "public", "static", "SamlEndpoint", "ofHttpPost", "(", "URI", "uri", ")", "{", "requireNonNull", "(", "uri", ",", "\"uri\"", ")", ";", "return", "new", "SamlEndpoint", "(", "uri", ",", "SamlBindingProtocol", ".", "HTTP_POST", ")", ";", "}" ]
Creates a {@link SamlEndpoint} of the specified {@code uri} and the HTTP POST binding protocol.
[ "Creates", "a", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/saml/src/main/java/com/linecorp/armeria/server/saml/SamlEndpoint.java#L68-L71
finmath/finmath-lib
src/main/java6/net/finmath/marketdata/model/curves/DiscountCurve.java
DiscountCurve.createDiscountFactorsFromForwardRates
public static DiscountCurveInterface createDiscountFactorsFromForwardRates(String name, TimeDiscretizationInterface tenor, double[] forwardRates) { """ Create a discount curve from given time discretization and forward rates. This function is provided for "single interest rate curve" frameworks. @param name Th...
java
public static DiscountCurveInterface createDiscountFactorsFromForwardRates(String name, TimeDiscretizationInterface tenor, double[] forwardRates) { DiscountCurve discountFactors = new DiscountCurve(name); double df = 1.0; for(int timeIndex=0; timeIndex<tenor.getNumberOfTimeSteps();timeIndex++) { df /= 1.0 + f...
[ "public", "static", "DiscountCurveInterface", "createDiscountFactorsFromForwardRates", "(", "String", "name", ",", "TimeDiscretizationInterface", "tenor", ",", "double", "[", "]", "forwardRates", ")", "{", "DiscountCurve", "discountFactors", "=", "new", "DiscountCurve", "...
Create a discount curve from given time discretization and forward rates. This function is provided for "single interest rate curve" frameworks. @param name The name of this discount curve. @param tenor Time discretization for the forward rates @param forwardRates Array of forward rates. @return A new discount factor ...
[ "Create", "a", "discount", "curve", "from", "given", "time", "discretization", "and", "forward", "rates", ".", "This", "function", "is", "provided", "for", "single", "interest", "rate", "curve", "frameworks", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/marketdata/model/curves/DiscountCurve.java#L377-L387
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.getUntaggedImagesAsync
public Observable<List<Image>> getUntaggedImagesAsync(UUID projectId, GetUntaggedImagesOptionalParameter getUntaggedImagesOptionalParameter) { """ Get untagged images for a given project iteration. This API supports batching and range selection. By default it will only return first 50 images matching images. Use...
java
public Observable<List<Image>> getUntaggedImagesAsync(UUID projectId, GetUntaggedImagesOptionalParameter getUntaggedImagesOptionalParameter) { return getUntaggedImagesWithServiceResponseAsync(projectId, getUntaggedImagesOptionalParameter).map(new Func1<ServiceResponse<List<Image>>, List<Image>>() { ...
[ "public", "Observable", "<", "List", "<", "Image", ">", ">", "getUntaggedImagesAsync", "(", "UUID", "projectId", ",", "GetUntaggedImagesOptionalParameter", "getUntaggedImagesOptionalParameter", ")", "{", "return", "getUntaggedImagesWithServiceResponseAsync", "(", "projectId",...
Get untagged images for a given project iteration. This API supports batching and range selection. By default it will only return first 50 images matching images. Use the {take} and {skip} parameters to control how many images to return in a given batch. @param projectId The project id @param getUntaggedImagesOptional...
[ "Get", "untagged", "images", "for", "a", "given", "project", "iteration", ".", "This", "API", "supports", "batching", "and", "range", "selection", ".", "By", "default", "it", "will", "only", "return", "first", "50", "images", "matching", "images", ".", "Use"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L4814-L4821
haraldk/TwelveMonkeys
common/common-image/src/main/java/com/twelvemonkeys/image/BrightnessContrastFilter.java
BrightnessContrastFilter.filterRGB
public int filterRGB(int pX, int pY, int pARGB) { """ Filters one pixel, adjusting brightness and contrast according to this filter. @param pX x @param pY y @param pARGB pixel value in default color space @return the filtered pixel value in the default color space """ // Get color components ...
java
public int filterRGB(int pX, int pY, int pARGB) { // Get color components int r = pARGB >> 16 & 0xFF; int g = pARGB >> 8 & 0xFF; int b = pARGB & 0xFF; // Scale to new contrast r = LUT[r]; g = LUT[g]; b = LUT[b]; // Return ARGB pixel, l...
[ "public", "int", "filterRGB", "(", "int", "pX", ",", "int", "pY", ",", "int", "pARGB", ")", "{", "// Get color components\r", "int", "r", "=", "pARGB", ">>", "16", "&", "0xFF", ";", "int", "g", "=", "pARGB", ">>", "8", "&", "0xFF", ";", "int", "b",...
Filters one pixel, adjusting brightness and contrast according to this filter. @param pX x @param pY y @param pARGB pixel value in default color space @return the filtered pixel value in the default color space
[ "Filters", "one", "pixel", "adjusting", "brightness", "and", "contrast", "according", "to", "this", "filter", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-image/src/main/java/com/twelvemonkeys/image/BrightnessContrastFilter.java#L156-L169
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java
KeyUtil.generatePublicKey
public static PublicKey generatePublicKey(String algorithm, byte[] key) { """ 生成公钥,仅用于非对称加密<br> 采用X509证书规范<br> 算法见:https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#KeyFactory @param algorithm 算法 @param key 密钥,必须为DER编码存储 @return 公钥 {@link PublicKey} """ if (null == ke...
java
public static PublicKey generatePublicKey(String algorithm, byte[] key) { if (null == key) { return null; } return generatePublicKey(algorithm, new X509EncodedKeySpec(key)); }
[ "public", "static", "PublicKey", "generatePublicKey", "(", "String", "algorithm", ",", "byte", "[", "]", "key", ")", "{", "if", "(", "null", "==", "key", ")", "{", "return", "null", ";", "}", "return", "generatePublicKey", "(", "algorithm", ",", "new", "...
生成公钥,仅用于非对称加密<br> 采用X509证书规范<br> 算法见:https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#KeyFactory @param algorithm 算法 @param key 密钥,必须为DER编码存储 @return 公钥 {@link PublicKey}
[ "生成公钥,仅用于非对称加密<br", ">", "采用X509证书规范<br", ">", "算法见:https", ":", "//", "docs", ".", "oracle", ".", "com", "/", "javase", "/", "7", "/", "docs", "/", "technotes", "/", "guides", "/", "security", "/", "StandardNames", ".", "html#KeyFactory" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/KeyUtil.java#L285-L290
twilio/twilio-java
src/main/java/com/twilio/rest/voice/v1/dialingpermissions/CountryReader.java
CountryReader.previousPage
@Override public Page<Country> previousPage(final Page<Country> page, final TwilioRestClient client) { """ Retrieve the previous page from the Twilio API. @param page current page @param client TwilioRestClient with which to make the request @return Previous Page ...
java
@Override public Page<Country> previousPage(final Page<Country> page, final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, page.getPreviousPageUrl( Domains.VOICE.toString(), client.getRe...
[ "@", "Override", "public", "Page", "<", "Country", ">", "previousPage", "(", "final", "Page", "<", "Country", ">", "page", ",", "final", "TwilioRestClient", "client", ")", "{", "Request", "request", "=", "new", "Request", "(", "HttpMethod", ".", "GET", ","...
Retrieve the previous page from the Twilio API. @param page current page @param client TwilioRestClient with which to make the request @return Previous Page
[ "Retrieve", "the", "previous", "page", "from", "the", "Twilio", "API", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/voice/v1/dialingpermissions/CountryReader.java#L190-L201
apache/groovy
src/main/java/org/codehaus/groovy/classgen/asm/MopWriter.java
MopWriter.getMopMethodName
public static String getMopMethodName(MethodNode method, boolean useThis) { """ creates a MOP method name from a method @param method the method to be called by the mop method @param useThis if true, then it is a call on "this", "super" else @return the mop method name """ ClassNode declaringNode...
java
public static String getMopMethodName(MethodNode method, boolean useThis) { ClassNode declaringNode = method.getDeclaringClass(); int distance = 0; for (; declaringNode != null; declaringNode = declaringNode.getSuperClass()) { distance++; } return (useThis ? "this" : ...
[ "public", "static", "String", "getMopMethodName", "(", "MethodNode", "method", ",", "boolean", "useThis", ")", "{", "ClassNode", "declaringNode", "=", "method", ".", "getDeclaringClass", "(", ")", ";", "int", "distance", "=", "0", ";", "for", "(", ";", "decl...
creates a MOP method name from a method @param method the method to be called by the mop method @param useThis if true, then it is a call on "this", "super" else @return the mop method name
[ "creates", "a", "MOP", "method", "name", "from", "a", "method" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/classgen/asm/MopWriter.java#L160-L167
line/armeria
grpc/src/main/java/com/linecorp/armeria/internal/grpc/GrpcLogUtil.java
GrpcLogUtil.rpcRequest
public static RpcRequest rpcRequest(MethodDescriptor<?, ?> method, Object message) { """ Returns a {@link RpcRequest} corresponding to the given {@link MethodDescriptor}. """ // We don't actually use the RpcRequest for request processing since it doesn't fit well with streaming. // We still pop...
java
public static RpcRequest rpcRequest(MethodDescriptor<?, ?> method, Object message) { // We don't actually use the RpcRequest for request processing since it doesn't fit well with streaming. // We still populate it with a reasonable method name for use in logging. The service type is currently //...
[ "public", "static", "RpcRequest", "rpcRequest", "(", "MethodDescriptor", "<", "?", ",", "?", ">", "method", ",", "Object", "message", ")", "{", "// We don't actually use the RpcRequest for request processing since it doesn't fit well with streaming.", "// We still populate it wit...
Returns a {@link RpcRequest} corresponding to the given {@link MethodDescriptor}.
[ "Returns", "a", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/grpc/src/main/java/com/linecorp/armeria/internal/grpc/GrpcLogUtil.java#L43-L49
lawloretienne/ImageGallery
library/src/main/java/com/etiennelawlor/imagegallery/library/ui/TouchImageView.java
TouchImageView.transformCoordBitmapToTouch
private PointF transformCoordBitmapToTouch(float bx, float by) { """ Inverse of transformCoordTouchToBitmap. This function will transform the coordinates in the drawable's coordinate system to the view's coordinate system. @param bx x-coordinate in original bitmap coordinate system @param by y-coordinate in o...
java
private PointF transformCoordBitmapToTouch(float bx, float by) { matrix.getValues(m); float origW = getDrawable().getIntrinsicWidth(); float origH = getDrawable().getIntrinsicHeight(); float px = bx / origW; float py = by / origH; float finalX = m[Matrix.MTRANS_X] + getIm...
[ "private", "PointF", "transformCoordBitmapToTouch", "(", "float", "bx", ",", "float", "by", ")", "{", "matrix", ".", "getValues", "(", "m", ")", ";", "float", "origW", "=", "getDrawable", "(", ")", ".", "getIntrinsicWidth", "(", ")", ";", "float", "origH",...
Inverse of transformCoordTouchToBitmap. This function will transform the coordinates in the drawable's coordinate system to the view's coordinate system. @param bx x-coordinate in original bitmap coordinate system @param by y-coordinate in original bitmap coordinate system @return Coordinates of the point in the view'...
[ "Inverse", "of", "transformCoordTouchToBitmap", ".", "This", "function", "will", "transform", "the", "coordinates", "in", "the", "drawable", "s", "coordinate", "system", "to", "the", "view", "s", "coordinate", "system", "." ]
train
https://github.com/lawloretienne/ImageGallery/blob/960d68dfb2b81d05322a576723ac4f090e10eda7/library/src/main/java/com/etiennelawlor/imagegallery/library/ui/TouchImageView.java#L1102-L1111
nicoulaj/checksum-maven-plugin
src/main/java/net/nicoulaj/maven/plugins/checksum/mojo/FilesMojo.java
FilesMojo.getFilesToProcess
@Override protected List<ChecksumFile> getFilesToProcess() { """ Build the list of files from which digests should be generated. @return the list of files that should be processed. """ final List<ChecksumFile> filesToProcess = new ArrayList<ChecksumFile>(); for ( final FileSet fileSet : ...
java
@Override protected List<ChecksumFile> getFilesToProcess() { final List<ChecksumFile> filesToProcess = new ArrayList<ChecksumFile>(); for ( final FileSet fileSet : fileSets ) { final DirectoryScanner scanner = new DirectoryScanner(); final String fileSetDirectory ...
[ "@", "Override", "protected", "List", "<", "ChecksumFile", ">", "getFilesToProcess", "(", ")", "{", "final", "List", "<", "ChecksumFile", ">", "filesToProcess", "=", "new", "ArrayList", "<", "ChecksumFile", ">", "(", ")", ";", "for", "(", "final", "FileSet",...
Build the list of files from which digests should be generated. @return the list of files that should be processed.
[ "Build", "the", "list", "of", "files", "from", "which", "digests", "should", "be", "generated", "." ]
train
https://github.com/nicoulaj/checksum-maven-plugin/blob/8d8feab8a0a34e24ae41621e7372be6387e1fe55/src/main/java/net/nicoulaj/maven/plugins/checksum/mojo/FilesMojo.java#L167-L206
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/TriggersInner.java
TriggersInner.createOrUpdate
public TriggerInner createOrUpdate(String deviceName, String name, String resourceGroupName, TriggerInner trigger) { """ Creates or updates a trigger. @param deviceName Creates or updates a trigger @param name The trigger name. @param resourceGroupName The resource group name. @param trigger The trigger. @t...
java
public TriggerInner createOrUpdate(String deviceName, String name, String resourceGroupName, TriggerInner trigger) { return createOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, trigger).toBlocking().last().body(); }
[ "public", "TriggerInner", "createOrUpdate", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ",", "TriggerInner", "trigger", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "deviceName", ",", "name", ",", "reso...
Creates or updates a trigger. @param deviceName Creates or updates a trigger @param name The trigger name. @param resourceGroupName The resource group name. @param trigger The trigger. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by ...
[ "Creates", "or", "updates", "a", "trigger", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/TriggersInner.java#L444-L446
Coveros/selenified
src/main/java/com/coveros/selenified/application/App.java
App.isNotConfirmation
private boolean isNotConfirmation(String action, String expected) { """ Determines if a confirmation is present or not, and can be interacted with. If it's not present, an indication that the confirmation can't be clicked on is written to the log file @param action - the action occurring @param expected - ...
java
private boolean isNotConfirmation(String action, String expected) { // wait for element to be present if (!is.confirmationPresent()) { waitFor.confirmationPresent(); } if (!is.confirmationPresent()) { reporter.fail(action, expected, "Unable to click confirmation a...
[ "private", "boolean", "isNotConfirmation", "(", "String", "action", ",", "String", "expected", ")", "{", "// wait for element to be present", "if", "(", "!", "is", ".", "confirmationPresent", "(", ")", ")", "{", "waitFor", ".", "confirmationPresent", "(", ")", "...
Determines if a confirmation is present or not, and can be interacted with. If it's not present, an indication that the confirmation can't be clicked on is written to the log file @param action - the action occurring @param expected - the expected result @return Boolean: is a confirmation actually present or not.
[ "Determines", "if", "a", "confirmation", "is", "present", "or", "not", "and", "can", "be", "interacted", "with", ".", "If", "it", "s", "not", "present", "an", "indication", "that", "the", "confirmation", "can", "t", "be", "clicked", "on", "is", "written", ...
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/application/App.java#L809-L819
jillesvangurp/jsonj
src/main/java/com/github/jsonj/tools/JsonSerializer.java
JsonSerializer.serialize
public static void serialize(OutputStream out, @Nonnull JsonElement json, boolean pretty) throws IOException { """ Writes the object out as json. @param out output writer @param json a {@link JsonElement} @param pretty if true, a properly indented version of the json is written @throws IOException if th...
java
public static void serialize(OutputStream out, @Nonnull JsonElement json, boolean pretty) throws IOException { Validate.notNull(out); BufferedOutputStream bufferedOut = new BufferedOutputStream(out); OutputStreamWriter w = new OutputStreamWriter(bufferedOut, UTF8); if(pretty) { ...
[ "public", "static", "void", "serialize", "(", "OutputStream", "out", ",", "@", "Nonnull", "JsonElement", "json", ",", "boolean", "pretty", ")", "throws", "IOException", "{", "Validate", ".", "notNull", "(", "out", ")", ";", "BufferedOutputStream", "bufferedOut",...
Writes the object out as json. @param out output writer @param json a {@link JsonElement} @param pretty if true, a properly indented version of the json is written @throws IOException if there is a problem writing to the stream
[ "Writes", "the", "object", "out", "as", "json", "." ]
train
https://github.com/jillesvangurp/jsonj/blob/1da0c44c5bdb60c0cd806c48d2da5a8a75bf84af/src/main/java/com/github/jsonj/tools/JsonSerializer.java#L161-L173
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java
SerializedFormBuilder.buildSerialUIDInfo
public void buildSerialUIDInfo(XMLNode node, Content classTree) { """ Build the serial UID information for the given class. @param node the XML element that specifies which components to document @param classTree content tree to which the serial UID information will be added """ Content serialUidTr...
java
public void buildSerialUIDInfo(XMLNode node, Content classTree) { Content serialUidTree = writer.getSerialUIDInfoHeader(); for (Element e : utils.getFieldsUnfiltered(currentTypeElement)) { VariableElement field = (VariableElement)e; if (field.getSimpleName().toString().compareTo(...
[ "public", "void", "buildSerialUIDInfo", "(", "XMLNode", "node", ",", "Content", "classTree", ")", "{", "Content", "serialUidTree", "=", "writer", ".", "getSerialUIDInfoHeader", "(", ")", ";", "for", "(", "Element", "e", ":", "utils", ".", "getFieldsUnfiltered", ...
Build the serial UID information for the given class. @param node the XML element that specifies which components to document @param classTree content tree to which the serial UID information will be added
[ "Build", "the", "serial", "UID", "information", "for", "the", "given", "class", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java#L253-L265
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java
MultiViewOps.fundamentalCompatible3
public static boolean fundamentalCompatible3( DMatrixRMaj F21 , DMatrixRMaj F31 , DMatrixRMaj F32 , double tol ) { """ <p> Checks to see if the three fundamental matrices are consistent based on their epipoles. </p> <p> e<sub>23</sub><sup>T</sup>F<sub>21</sub>e<sub>13</sub> = 0<br> e<sub>31</sub><sup>T</sup>F...
java
public static boolean fundamentalCompatible3( DMatrixRMaj F21 , DMatrixRMaj F31 , DMatrixRMaj F32 , double tol ) { FundamentalExtractEpipoles extractEpi = new FundamentalExtractEpipoles(); Point3D_F64 e21 = new Point3D_F64(); Point3D_F64 e12 = new Point3D_F64(); Point3D_F64 e31 = new Point3D_F64(); Point3D_...
[ "public", "static", "boolean", "fundamentalCompatible3", "(", "DMatrixRMaj", "F21", ",", "DMatrixRMaj", "F31", ",", "DMatrixRMaj", "F32", ",", "double", "tol", ")", "{", "FundamentalExtractEpipoles", "extractEpi", "=", "new", "FundamentalExtractEpipoles", "(", ")", ...
<p> Checks to see if the three fundamental matrices are consistent based on their epipoles. </p> <p> e<sub>23</sub><sup>T</sup>F<sub>21</sub>e<sub>13</sub> = 0<br> e<sub>31</sub><sup>T</sup>F<sub>32</sub>e<sub>21</sub> = 0<br> e<sub>32</sub><sup>T</sup>F<sub>31</sub>e<sub>12</sub> = 0<br> </p> <p> Section 15.4 in R. H...
[ "<p", ">", "Checks", "to", "see", "if", "the", "three", "fundamental", "matrices", "are", "consistent", "based", "on", "their", "epipoles", ".", "<", "/", "p", ">", "<p", ">", "e<sub", ">", "23<", "/", "sub", ">", "<sup", ">", "T<", "/", "sup", ">"...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1030-L1056
linkhub-sdk/popbill.sdk.java
src/main/java/com/popbill/api/cashbill/CashbillServiceImp.java
CashbillServiceImp.sendSMS
@Override public Response sendSMS(String CorpNum, String MgtKey, String Sender, String Receiver, String Contents) throws PopbillException { """ /* (non-Javadoc) @see com.popbill.api.CashbillService#sendSMS(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) """ ...
java
@Override public Response sendSMS(String CorpNum, String MgtKey, String Sender, String Receiver, String Contents) throws PopbillException { if (MgtKey == null || MgtKey.isEmpty()) throw new PopbillException(-99999999, "관리번호가 입력되지 않았습니다."); return sendSMS(CorpNum, MgtKey, Sender, Receiver, Contents...
[ "@", "Override", "public", "Response", "sendSMS", "(", "String", "CorpNum", ",", "String", "MgtKey", ",", "String", "Sender", ",", "String", "Receiver", ",", "String", "Contents", ")", "throws", "PopbillException", "{", "if", "(", "MgtKey", "==", "null", "||...
/* (non-Javadoc) @see com.popbill.api.CashbillService#sendSMS(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/linkhub-sdk/popbill.sdk.java/blob/63a341fefe96d60a368776638f3d4c81888238b7/src/main/java/com/popbill/api/cashbill/CashbillServiceImp.java#L262-L270
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/DOTranslationUtility.java
DOTranslationUtility.readStateAttribute
public static String readStateAttribute(String rawValue) throws ParseException { """ Parse and read the object state value from raw text. <p> Reads a text representation of object state, and returns a "state code" abbreviation corresponding to that state. Null or empty values are interpreted as "Active". </p...
java
public static String readStateAttribute(String rawValue) throws ParseException { if (MODEL.DELETED.looselyMatches(rawValue, true)) { return "D"; } else if (MODEL.INACTIVE.looselyMatches(rawValue, true)) { return "I"; } else if (MODEL.ACTIVE.looselyMatches(rawValue, true) ...
[ "public", "static", "String", "readStateAttribute", "(", "String", "rawValue", ")", "throws", "ParseException", "{", "if", "(", "MODEL", ".", "DELETED", ".", "looselyMatches", "(", "rawValue", ",", "true", ")", ")", "{", "return", "\"D\"", ";", "}", "else", ...
Parse and read the object state value from raw text. <p> Reads a text representation of object state, and returns a "state code" abbreviation corresponding to that state. Null or empty values are interpreted as "Active". </p> XXX: It might clearer to nix state codes altogether and just use the full value @param rawV...
[ "Parse", "and", "read", "the", "object", "state", "value", "from", "raw", "text", ".", "<p", ">", "Reads", "a", "text", "representation", "of", "object", "state", "and", "returns", "a", "state", "code", "abbreviation", "corresponding", "to", "that", "state",...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/DOTranslationUtility.java#L875-L888
mozilla/rhino
src/org/mozilla/javascript/ScriptRuntime.java
ScriptRuntime.getObjectIndex
public static Object getObjectIndex(Object obj, double dblIndex, Context cx, Scriptable scope) { """ A cheaper and less general version of the above for well-known argument types. """ Scriptable sobj = toObjectOrNull(cx, obj, scope); if (sobj == null) { ...
java
public static Object getObjectIndex(Object obj, double dblIndex, Context cx, Scriptable scope) { Scriptable sobj = toObjectOrNull(cx, obj, scope); if (sobj == null) { throw undefReadError(obj, toString(dblIndex)); } int index = (in...
[ "public", "static", "Object", "getObjectIndex", "(", "Object", "obj", ",", "double", "dblIndex", ",", "Context", "cx", ",", "Scriptable", "scope", ")", "{", "Scriptable", "sobj", "=", "toObjectOrNull", "(", "cx", ",", "obj", ",", "scope", ")", ";", "if", ...
A cheaper and less general version of the above for well-known argument types.
[ "A", "cheaper", "and", "less", "general", "version", "of", "the", "above", "for", "well", "-", "known", "argument", "types", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptRuntime.java#L1642-L1656
jbundle/jbundle
main/msg/src/main/java/org/jbundle/main/msg/db/MessageProcessInfo.java
MessageProcessInfo.createReplyMessage
public Message createReplyMessage(Message message) { """ Create the response message for this message. @return the response message (or null if none). """ Object objResponseID = ((BaseMessage)message).getMessageHeader().get(TrxMessageHeader.MESSAGE_RESPONSE_ID); if (objResponseID == null) ...
java
public Message createReplyMessage(Message message) { Object objResponseID = ((BaseMessage)message).getMessageHeader().get(TrxMessageHeader.MESSAGE_RESPONSE_ID); if (objResponseID == null) return null; // TODO (don) FIX this - return an error. MessageProcessInfo recMessageProce...
[ "public", "Message", "createReplyMessage", "(", "Message", "message", ")", "{", "Object", "objResponseID", "=", "(", "(", "BaseMessage", ")", "message", ")", ".", "getMessageHeader", "(", ")", ".", "get", "(", "TrxMessageHeader", ".", "MESSAGE_RESPONSE_ID", ")",...
Create the response message for this message. @return the response message (or null if none).
[ "Create", "the", "response", "message", "for", "this", "message", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageProcessInfo.java#L708-L718
JOML-CI/JOML
src/org/joml/Matrix3f.java
Matrix3f.setLookAlong
public Matrix3f setLookAlong(Vector3fc dir, Vector3fc up) { """ Set this matrix to a rotation transformation to make <code>-z</code> point along <code>dir</code>. <p> In order to apply the lookalong transformation to any previous existing transformation, use {@link #lookAlong(Vector3fc, Vector3fc)}. @see #s...
java
public Matrix3f setLookAlong(Vector3fc dir, Vector3fc up) { return setLookAlong(dir.x(), dir.y(), dir.z(), up.x(), up.y(), up.z()); }
[ "public", "Matrix3f", "setLookAlong", "(", "Vector3fc", "dir", ",", "Vector3fc", "up", ")", "{", "return", "setLookAlong", "(", "dir", ".", "x", "(", ")", ",", "dir", ".", "y", "(", ")", ",", "dir", ".", "z", "(", ")", ",", "up", ".", "x", "(", ...
Set this matrix to a rotation transformation to make <code>-z</code> point along <code>dir</code>. <p> In order to apply the lookalong transformation to any previous existing transformation, use {@link #lookAlong(Vector3fc, Vector3fc)}. @see #setLookAlong(Vector3fc, Vector3fc) @see #lookAlong(Vector3fc, Vector3fc) @p...
[ "Set", "this", "matrix", "to", "a", "rotation", "transformation", "to", "make", "<code", ">", "-", "z<", "/", "code", ">", "point", "along", "<code", ">", "dir<", "/", "code", ">", ".", "<p", ">", "In", "order", "to", "apply", "the", "lookalong", "tr...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3f.java#L3148-L3150
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/internal/SymmOptimizer.java
SymmOptimizer.probabilityFunction
private double probabilityFunction(double AS, int m, int maxIter) { """ Calculates the probability of accepting a bad move given the iteration step and the score change. <p> Function: p=(C-AS)/(C*sqrt(step)) Added a normalization factor so that the probability approaches 0 when the maxIter is reached. """ ...
java
private double probabilityFunction(double AS, int m, int maxIter) { double prob = (C + AS) / (C * Math.sqrt(m)); double norm = (1 - (m * 1.0) / maxIter); // Normalization factor return Math.min(Math.max(prob * norm, 0.0), 1.0); }
[ "private", "double", "probabilityFunction", "(", "double", "AS", ",", "int", "m", ",", "int", "maxIter", ")", "{", "double", "prob", "=", "(", "C", "+", "AS", ")", "/", "(", "C", "*", "Math", ".", "sqrt", "(", "m", ")", ")", ";", "double", "norm"...
Calculates the probability of accepting a bad move given the iteration step and the score change. <p> Function: p=(C-AS)/(C*sqrt(step)) Added a normalization factor so that the probability approaches 0 when the maxIter is reached.
[ "Calculates", "the", "probability", "of", "accepting", "a", "bad", "move", "given", "the", "iteration", "step", "and", "the", "score", "change", ".", "<p", ">", "Function", ":", "p", "=", "(", "C", "-", "AS", ")", "/", "(", "C", "*", "sqrt", "(", "...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/internal/SymmOptimizer.java#L827-L832
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/objects/DwgBlock.java
DwgBlock.readDwgBlockV15
public void readDwgBlockV15(int[] data, int offset) throws Exception { """ Read a Block in the DWG format Version 15 @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is found in the DW...
java
public void readDwgBlockV15(int[] data, int offset) throws Exception { int bitPos = offset; bitPos = readObjectHeaderV15(data, bitPos); Vector v = DwgUtil.getTextString(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); String text = (String)v.get(1); name = text; bitPos = readObjectTailV15(data, bit...
[ "public", "void", "readDwgBlockV15", "(", "int", "[", "]", "data", ",", "int", "offset", ")", "throws", "Exception", "{", "int", "bitPos", "=", "offset", ";", "bitPos", "=", "readObjectHeaderV15", "(", "data", ",", "bitPos", ")", ";", "Vector", "v", "=",...
Read a Block in the DWG format Version 15 @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is found in the DWG file. Occurs when we are looking for LwPolylines.
[ "Read", "a", "Block", "in", "the", "DWG", "format", "Version", "15" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/objects/DwgBlock.java#L42-L50
Wikidata/Wikidata-Toolkit
wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/helpers/Datamodel.java
Datamodel.makeSiteLink
public static SiteLink makeSiteLink(String title, String siteKey) { """ Creates a {@link SiteLink} without badges. @param title the title string of the linked page, including namespace prefixes if any @param siteKey the string key of the site of the linked article @return a {@link SiteLink} corresponding t...
java
public static SiteLink makeSiteLink(String title, String siteKey) { return factory.getSiteLink(title, siteKey, Collections.emptyList()); }
[ "public", "static", "SiteLink", "makeSiteLink", "(", "String", "title", ",", "String", "siteKey", ")", "{", "return", "factory", ".", "getSiteLink", "(", "title", ",", "siteKey", ",", "Collections", ".", "emptyList", "(", ")", ")", ";", "}" ]
Creates a {@link SiteLink} without badges. @param title the title string of the linked page, including namespace prefixes if any @param siteKey the string key of the site of the linked article @return a {@link SiteLink} corresponding to the input
[ "Creates", "a", "{", "@link", "SiteLink", "}", "without", "badges", "." ]
train
https://github.com/Wikidata/Wikidata-Toolkit/blob/7732851dda47e1febff406fba27bfec023f4786e/wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/helpers/Datamodel.java#L577-L579
threerings/nenya
core/src/main/java/com/threerings/util/KeyboardManager.java
KeyboardManager.setTarget
public void setTarget (JComponent target, KeyTranslator xlate) { """ Initializes the keyboard manager with the supplied target component and key translator and disables the keyboard manager if it is currently active. @param target the component whose keyboard events are to be observed. @param xlate the key tr...
java
public void setTarget (JComponent target, KeyTranslator xlate) { setEnabled(false); // save off references _target = target; _xlate = xlate; }
[ "public", "void", "setTarget", "(", "JComponent", "target", ",", "KeyTranslator", "xlate", ")", "{", "setEnabled", "(", "false", ")", ";", "// save off references", "_target", "=", "target", ";", "_xlate", "=", "xlate", ";", "}" ]
Initializes the keyboard manager with the supplied target component and key translator and disables the keyboard manager if it is currently active. @param target the component whose keyboard events are to be observed. @param xlate the key translator used to map keyboard events to controller action commands.
[ "Initializes", "the", "keyboard", "manager", "with", "the", "supplied", "target", "component", "and", "key", "translator", "and", "disables", "the", "keyboard", "manager", "if", "it", "is", "currently", "active", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/util/KeyboardManager.java#L107-L114
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.readPropertyObject
public CmsProperty readPropertyObject(CmsResource resource, String property, boolean search) throws CmsException { """ Reads a property object from a resource specified by a property name.<p> Returns <code>{@link CmsProperty#getNullProperty()}</code> if the property is not found.<p> This method is more effic...
java
public CmsProperty readPropertyObject(CmsResource resource, String property, boolean search) throws CmsException { return m_securityManager.readPropertyObject(m_context, resource, property, search); }
[ "public", "CmsProperty", "readPropertyObject", "(", "CmsResource", "resource", ",", "String", "property", ",", "boolean", "search", ")", "throws", "CmsException", "{", "return", "m_securityManager", ".", "readPropertyObject", "(", "m_context", ",", "resource", ",", ...
Reads a property object from a resource specified by a property name.<p> Returns <code>{@link CmsProperty#getNullProperty()}</code> if the property is not found.<p> This method is more efficient then using <code>{@link CmsObject#readPropertyObject(String, String, boolean)}</code> if you already have an instance of th...
[ "Reads", "a", "property", "object", "from", "a", "resource", "specified", "by", "a", "property", "name", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L2899-L2902
puniverse/capsule
capsule-util/src/main/java/co/paralleluniverse/capsule/Jar.java
Jar.addEntry
public Jar addEntry(String path, byte[] content) throws IOException { """ Adds an entry to this JAR. @param path the entry's path within the JAR @param content the entry's content @return {@code this} """ beginWriting(); addEntry(jos, path, content); return this; }
java
public Jar addEntry(String path, byte[] content) throws IOException { beginWriting(); addEntry(jos, path, content); return this; }
[ "public", "Jar", "addEntry", "(", "String", "path", ",", "byte", "[", "]", "content", ")", "throws", "IOException", "{", "beginWriting", "(", ")", ";", "addEntry", "(", "jos", ",", "path", ",", "content", ")", ";", "return", "this", ";", "}" ]
Adds an entry to this JAR. @param path the entry's path within the JAR @param content the entry's content @return {@code this}
[ "Adds", "an", "entry", "to", "this", "JAR", "." ]
train
https://github.com/puniverse/capsule/blob/291a54e501a32aaf0284707b8c1fbff6a566822b/capsule-util/src/main/java/co/paralleluniverse/capsule/Jar.java#L308-L312
mbenson/uelbox
src/main/java/uelbox/UEL.java
UEL.getContext
public static <T> T getContext(ELContext context, Class<T> key, T defaultValue) { """ Casts context objects per documented convention. @param <T> @param context @param key @param defaultValue @return T """ @SuppressWarnings("unchecked") final T result = (T) context.getContext(key); ...
java
public static <T> T getContext(ELContext context, Class<T> key, T defaultValue) { @SuppressWarnings("unchecked") final T result = (T) context.getContext(key); return result == null ? defaultValue : result; }
[ "public", "static", "<", "T", ">", "T", "getContext", "(", "ELContext", "context", ",", "Class", "<", "T", ">", "key", ",", "T", "defaultValue", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "final", "T", "result", "=", "(", "T", ")", ...
Casts context objects per documented convention. @param <T> @param context @param key @param defaultValue @return T
[ "Casts", "context", "objects", "per", "documented", "convention", "." ]
train
https://github.com/mbenson/uelbox/blob/b0c2df2c738295bddfd3c16a916e67c9c7c512ef/src/main/java/uelbox/UEL.java#L120-L124
PistoiaHELM/HELM2NotationToolkit
src/main/java/org/helm/notation2/tools/ChangeObjects.java
ChangeObjects.changePolymerNotation
public final static void changePolymerNotation(int position, PolymerNotation polymer, HELM2Notation helm2notation) { """ method to change the PolymerNotation at a specific position of the HELM2Notation @param position position of the PolymerNotation @param polymer new PolymerNotation @param helm2notation ...
java
public final static void changePolymerNotation(int position, PolymerNotation polymer, HELM2Notation helm2notation) { helm2notation.getListOfPolymers().set(position, polymer); }
[ "public", "final", "static", "void", "changePolymerNotation", "(", "int", "position", ",", "PolymerNotation", "polymer", ",", "HELM2Notation", "helm2notation", ")", "{", "helm2notation", ".", "getListOfPolymers", "(", ")", ".", "set", "(", "position", ",", "polyme...
method to change the PolymerNotation at a specific position of the HELM2Notation @param position position of the PolymerNotation @param polymer new PolymerNotation @param helm2notation input HELM2Notation
[ "method", "to", "change", "the", "PolymerNotation", "at", "a", "specific", "position", "of", "the", "HELM2Notation" ]
train
https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/tools/ChangeObjects.java#L380-L382
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java
Expressions.dateTimeTemplate
public static <T extends Comparable<?>> DateTimeTemplate<T> dateTimeTemplate(Class<? extends T> cl, Template template, Object... args) { """ Create a new Template expression @param cl type of expression @param template template ...
java
public static <T extends Comparable<?>> DateTimeTemplate<T> dateTimeTemplate(Class<? extends T> cl, Template template, Object... args) { return dateTimeTemplate(cl, template, ImmutableList.copyOf(args)); }
[ "public", "static", "<", "T", "extends", "Comparable", "<", "?", ">", ">", "DateTimeTemplate", "<", "T", ">", "dateTimeTemplate", "(", "Class", "<", "?", "extends", "T", ">", "cl", ",", "Template", "template", ",", "Object", "...", "args", ")", "{", "r...
Create a new Template expression @param cl type of expression @param template template @param args template parameters @return template expression
[ "Create", "a", "new", "Template", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java#L603-L606
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/api/Database.java
Database.getPermissions
public Map<String, EnumSet<Permissions>> getPermissions() { """ Returns the Permissions of this database. <p> Note this method is only applicable to databases that support the <a target="_blank" href="https://console.bluemix.net/docs/services/Cloudant/api/authorization.html#authorization"> Cloudant authorizat...
java
public Map<String, EnumSet<Permissions>> getPermissions() { JsonObject perms = getPermissionsObject(); return client.getGson().getAdapter(DeserializationTypes.PERMISSIONS_MAP_TOKEN).fromJsonTree (perms); }
[ "public", "Map", "<", "String", ",", "EnumSet", "<", "Permissions", ">", ">", "getPermissions", "(", ")", "{", "JsonObject", "perms", "=", "getPermissionsObject", "(", ")", ";", "return", "client", ".", "getGson", "(", ")", ".", "getAdapter", "(", "Deseria...
Returns the Permissions of this database. <p> Note this method is only applicable to databases that support the <a target="_blank" href="https://console.bluemix.net/docs/services/Cloudant/api/authorization.html#authorization"> Cloudant authorization API </a> such as Cloudant DBaaS. For unsupported databases consider us...
[ "Returns", "the", "Permissions", "of", "this", "database", ".", "<p", ">", "Note", "this", "method", "is", "only", "applicable", "to", "databases", "that", "support", "the", "<a", "target", "=", "_blank", "href", "=", "https", ":", "//", "console", ".", ...
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/api/Database.java#L230-L234
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/core/urltemplates/URLTemplate.java
URLTemplate.substitute
public void substitute( String token, int value ) { """ Replace a single token in the template with a corresponding int value. Tokens are expected to be qualified in braces. E.g. {url:port} """ String valueStr = Integer.toString( value ); _tokenValuesMap.put( token, valueStr ); }
java
public void substitute( String token, int value ) { String valueStr = Integer.toString( value ); _tokenValuesMap.put( token, valueStr ); }
[ "public", "void", "substitute", "(", "String", "token", ",", "int", "value", ")", "{", "String", "valueStr", "=", "Integer", ".", "toString", "(", "value", ")", ";", "_tokenValuesMap", ".", "put", "(", "token", ",", "valueStr", ")", ";", "}" ]
Replace a single token in the template with a corresponding int value. Tokens are expected to be qualified in braces. E.g. {url:port}
[ "Replace", "a", "single", "token", "in", "the", "template", "with", "a", "corresponding", "int", "value", ".", "Tokens", "are", "expected", "to", "be", "qualified", "in", "braces", ".", "E", ".", "g", ".", "{", "url", ":", "port", "}" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/core/urltemplates/URLTemplate.java#L258-L262
UrielCh/ovh-java-sdk
ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java
ApiOvhXdsl.serviceName_modem_lan_lanName_dhcp_dhcpName_DHCPStaticAddresses_MACAddress_GET
public OvhDHCPStaticAddress serviceName_modem_lan_lanName_dhcp_dhcpName_DHCPStaticAddresses_MACAddress_GET(String serviceName, String lanName, String dhcpName, String MACAddress) throws IOException { """ Get this object properties REST: GET /xdsl/{serviceName}/modem/lan/{lanName}/dhcp/{dhcpName}/DHCPStaticAddre...
java
public OvhDHCPStaticAddress serviceName_modem_lan_lanName_dhcp_dhcpName_DHCPStaticAddresses_MACAddress_GET(String serviceName, String lanName, String dhcpName, String MACAddress) throws IOException { String qPath = "/xdsl/{serviceName}/modem/lan/{lanName}/dhcp/{dhcpName}/DHCPStaticAddresses/{MACAddress}"; StringBui...
[ "public", "OvhDHCPStaticAddress", "serviceName_modem_lan_lanName_dhcp_dhcpName_DHCPStaticAddresses_MACAddress_GET", "(", "String", "serviceName", ",", "String", "lanName", ",", "String", "dhcpName", ",", "String", "MACAddress", ")", "throws", "IOException", "{", "String", "qP...
Get this object properties REST: GET /xdsl/{serviceName}/modem/lan/{lanName}/dhcp/{dhcpName}/DHCPStaticAddresses/{MACAddress} @param serviceName [required] The internal name of your XDSL offer @param lanName [required] Name of the LAN @param dhcpName [required] Name of the DHCP @param MACAddress [required] The MAC add...
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1090-L1095
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaNonTransactionalDispatcher.java
SibRaNonTransactionalDispatcher.beforeDelivery
protected final void beforeDelivery(final SIBusMessage message, MessageEndpoint endpoint) { """ Invoked before delivery of a message. @param message the message that is about to be delivered @param endpoint The messaage endpoint """ if (TRACE.isEntryEnabled()) { final String methodNam...
java
protected final void beforeDelivery(final SIBusMessage message, MessageEndpoint endpoint) { if (TRACE.isEntryEnabled()) { final String methodName = "beforeDelivery"; SibTr.entry(this, TRACE, methodName, new Object [] { message, endpoint}); SibTr.exit(this, TRACE, methodName)...
[ "protected", "final", "void", "beforeDelivery", "(", "final", "SIBusMessage", "message", ",", "MessageEndpoint", "endpoint", ")", "{", "if", "(", "TRACE", ".", "isEntryEnabled", "(", ")", ")", "{", "final", "String", "methodName", "=", "\"beforeDelivery\"", ";",...
Invoked before delivery of a message. @param message the message that is about to be delivered @param endpoint The messaage endpoint
[ "Invoked", "before", "delivery", "of", "a", "message", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaNonTransactionalDispatcher.java#L146-L154
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.importKey
public KeyBundle importKey(String vaultBaseUrl, String keyName, JsonWebKey key, Boolean hsm, KeyAttributes keyAttributes, Map<String, String> tags) { """ Imports an externally created key, stores it, and returns key parameters and attributes to the client. The import key operation may be used to import any key ty...
java
public KeyBundle importKey(String vaultBaseUrl, String keyName, JsonWebKey key, Boolean hsm, KeyAttributes keyAttributes, Map<String, String> tags) { return importKeyWithServiceResponseAsync(vaultBaseUrl, keyName, key, hsm, keyAttributes, tags).toBlocking().single().body(); }
[ "public", "KeyBundle", "importKey", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "JsonWebKey", "key", ",", "Boolean", "hsm", ",", "KeyAttributes", "keyAttributes", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "i...
Imports an externally created key, stores it, and returns key parameters and attributes to the client. The import key operation may be used to import any key type into an Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key. This operation requires the keys/import permissio...
[ "Imports", "an", "externally", "created", "key", "stores", "it", "and", "returns", "key", "parameters", "and", "attributes", "to", "the", "client", ".", "The", "import", "key", "operation", "may", "be", "used", "to", "import", "any", "key", "type", "into", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L976-L978
jinahya/bit-io
src/main/java/com/github/jinahya/bit/io/AbstractBitOutput.java
AbstractBitOutput.unsigned16
protected void unsigned16(final int size, final int value) throws IOException { """ Writes an unsigned value whose size is {@value Short#SIZE} in maximum. @param size the number of lower bits to write; between {@code 1} and {@value Short#SIZE}, both inclusive. @param value the value to write @throws IOExcept...
java
protected void unsigned16(final int size, final int value) throws IOException { requireValidSizeUnsigned16(size); final int quotient = size / Byte.SIZE; final int remainder = size % Byte.SIZE; if (remainder > 0) { unsigned8(remainder, value >> (quotient * Byte.SIZE)); ...
[ "protected", "void", "unsigned16", "(", "final", "int", "size", ",", "final", "int", "value", ")", "throws", "IOException", "{", "requireValidSizeUnsigned16", "(", "size", ")", ";", "final", "int", "quotient", "=", "size", "/", "Byte", ".", "SIZE", ";", "f...
Writes an unsigned value whose size is {@value Short#SIZE} in maximum. @param size the number of lower bits to write; between {@code 1} and {@value Short#SIZE}, both inclusive. @param value the value to write @throws IOException if an I/O error occurs
[ "Writes", "an", "unsigned", "value", "whose", "size", "is", "{", "@value", "Short#SIZE", "}", "in", "maximum", "." ]
train
https://github.com/jinahya/bit-io/blob/f3b49bbec80047c0cc3ea2424def98eb2d08352a/src/main/java/com/github/jinahya/bit/io/AbstractBitOutput.java#L86-L96
kuali/ojb-1.0.4
src/ejb/org/apache/ojb/ejb/pb/RollbackBean.java
RollbackBean.rollbackClientWrongInput
public void rollbackClientWrongInput(List articles, List persons) { """ This test method expect an invalid object in the person list, so that OJB cause an internal error. @ejb:interface-method """ log.info("rollbackClientWrongInput method was called"); ArticleManagerPBLocal am = getArticl...
java
public void rollbackClientWrongInput(List articles, List persons) { log.info("rollbackClientWrongInput method was called"); ArticleManagerPBLocal am = getArticleManager(); PersonManagerPBLocal pm = getPersonManager(); am.storeArticles(articles); pm.storePersons(persons)...
[ "public", "void", "rollbackClientWrongInput", "(", "List", "articles", ",", "List", "persons", ")", "{", "log", ".", "info", "(", "\"rollbackClientWrongInput method was called\"", ")", ";", "ArticleManagerPBLocal", "am", "=", "getArticleManager", "(", ")", ";", "Per...
This test method expect an invalid object in the person list, so that OJB cause an internal error. @ejb:interface-method
[ "This", "test", "method", "expect", "an", "invalid", "object", "in", "the", "person", "list", "so", "that", "OJB", "cause", "an", "internal", "error", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/ejb/org/apache/ojb/ejb/pb/RollbackBean.java#L132-L139
redbox-mint/redbox
plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/CurationManager.java
CurationManager.scheduleTransformers
private void scheduleTransformers(JsonSimple message, JsonSimple response) { """ Generate orders for the list of normal transformers scheduled to execute on the tool chain @param message The incoming message, which contains the tool chain config for this object @param response The response to edit @param ...
java
private void scheduleTransformers(JsonSimple message, JsonSimple response) { String oid = message.getString(null, "oid"); List<String> list = message.getStringList("transformer", "metadata"); if (list != null && !list.isEmpty()) { for (String id : list) { JsonObject order = newTransform(response, id, oid);...
[ "private", "void", "scheduleTransformers", "(", "JsonSimple", "message", ",", "JsonSimple", "response", ")", "{", "String", "oid", "=", "message", ".", "getString", "(", "null", ",", "\"oid\"", ")", ";", "List", "<", "String", ">", "list", "=", "message", ...
Generate orders for the list of normal transformers scheduled to execute on the tool chain @param message The incoming message, which contains the tool chain config for this object @param response The response to edit @param oid The object to schedule for clearing
[ "Generate", "orders", "for", "the", "list", "of", "normal", "transformers", "scheduled", "to", "execute", "on", "the", "tool", "chain" ]
train
https://github.com/redbox-mint/redbox/blob/1db230f218031b85c48c8603cbb04fce7ac6de0c/plugins/transaction/curation/src/main/java/com/googlecode/fascinator/redbox/plugins/curation/redbox/CurationManager.java#L1616-L1631
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/UserResources.java
UserResources.checkOauthAccess
@GET @Produces(MediaType.APPLICATION_JSON) @Path("/check_oauth_access") @Description("Returns redirectURI based on whether this user has previously accepted the authorization page") public OAuthAcceptResponseDto checkOauthAccess(@Context HttpServletRequest req) { """ Returns redirectURI based on wh...
java
@GET @Produces(MediaType.APPLICATION_JSON) @Path("/check_oauth_access") @Description("Returns redirectURI based on whether this user has previously accepted the authorization page") public OAuthAcceptResponseDto checkOauthAccess(@Context HttpServletRequest req) { String userName=findUserByToken(...
[ "@", "GET", "@", "Produces", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "Path", "(", "\"/check_oauth_access\"", ")", "@", "Description", "(", "\"Returns redirectURI based on whether this user has previously accepted the authorization page\"", ")", "public", "OAuthAc...
Returns redirectURI based on whether this user has previously accepted the authorization page @param req The Http Request with authorization header @return Returns either redirectURI or OauthException
[ "Returns", "redirectURI", "based", "on", "whether", "this", "user", "has", "previously", "accepted", "the", "authorization", "page" ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/UserResources.java#L388-L403
ACRA/acra
acra-core/src/main/java/org/acra/collector/ReflectionCollector.java
ReflectionCollector.collectConstants
private static void collectConstants(@NonNull Class<?> someClass, @NonNull JSONObject container) throws JSONException { """ Retrieves key/value pairs from static fields of a class. @param someClass the class to be inspected. """ final Field[] fields = someClass.getFields(); for (final Field ...
java
private static void collectConstants(@NonNull Class<?> someClass, @NonNull JSONObject container) throws JSONException { final Field[] fields = someClass.getFields(); for (final Field field : fields) { try { final Object value = field.get(null); if (value != nu...
[ "private", "static", "void", "collectConstants", "(", "@", "NonNull", "Class", "<", "?", ">", "someClass", ",", "@", "NonNull", "JSONObject", "container", ")", "throws", "JSONException", "{", "final", "Field", "[", "]", "fields", "=", "someClass", ".", "getF...
Retrieves key/value pairs from static fields of a class. @param someClass the class to be inspected.
[ "Retrieves", "key", "/", "value", "pairs", "from", "static", "fields", "of", "a", "class", "." ]
train
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-core/src/main/java/org/acra/collector/ReflectionCollector.java#L82-L100
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.mapValues
public static Map mapValues(Mapper mapper, Map map) { """ Create a new Map by mapping all values from the original map and maintaining the original key. @param mapper a Mapper to map the values @param map an Map @return a new Map with values mapped """ return mapValues(mapper, map, false); ...
java
public static Map mapValues(Mapper mapper, Map map) { return mapValues(mapper, map, false); }
[ "public", "static", "Map", "mapValues", "(", "Mapper", "mapper", ",", "Map", "map", ")", "{", "return", "mapValues", "(", "mapper", ",", "map", ",", "false", ")", ";", "}" ]
Create a new Map by mapping all values from the original map and maintaining the original key. @param mapper a Mapper to map the values @param map an Map @return a new Map with values mapped
[ "Create", "a", "new", "Map", "by", "mapping", "all", "values", "from", "the", "original", "map", "and", "maintaining", "the", "original", "key", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L410-L412
UrielCh/ovh-java-sdk
ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java
ApiOvhVps.serviceName_reinstall_POST
public OvhTask serviceName_reinstall_POST(String serviceName, Boolean doNotSendPassword, String language, Long[] softwareId, String[] sshKey, Long templateId) throws IOException { """ Reinstall the virtual server REST: POST /vps/{serviceName}/reinstall @param doNotSendPassword [required] If asked, the installa...
java
public OvhTask serviceName_reinstall_POST(String serviceName, Boolean doNotSendPassword, String language, Long[] softwareId, String[] sshKey, Long templateId) throws IOException { String qPath = "/vps/{serviceName}/reinstall"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<Str...
[ "public", "OvhTask", "serviceName_reinstall_POST", "(", "String", "serviceName", ",", "Boolean", "doNotSendPassword", ",", "String", "language", ",", "Long", "[", "]", "softwareId", ",", "String", "[", "]", "sshKey", ",", "Long", "templateId", ")", "throws", "IO...
Reinstall the virtual server REST: POST /vps/{serviceName}/reinstall @param doNotSendPassword [required] If asked, the installation password will NOT be sent (only if sshKey defined) @param softwareId [required] Id of the vps.Software type fetched in /template/{id}/software @param language [required] Distribution lang...
[ "Reinstall", "the", "virtual", "server" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java#L84-L95
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryTreeDump.java
QueryTreeDump.appendPath
private static void appendPath(QPath relPath, StringBuilder buffer) { """ Appends the relative path to the <code>buffer</code> using '/' as the delimiter for path elements. @param relPath a relative path. @param buffer the buffer where to append the path. """ QPathEntry[] elements = relPath.getEn...
java
private static void appendPath(QPath relPath, StringBuilder buffer) { QPathEntry[] elements = relPath.getEntries(); String slash = ""; for (int i = 0; i < elements.length; i++) { buffer.append(slash); slash = "/"; buffer.append(elements[i].getAsString(true));...
[ "private", "static", "void", "appendPath", "(", "QPath", "relPath", ",", "StringBuilder", "buffer", ")", "{", "QPathEntry", "[", "]", "elements", "=", "relPath", ".", "getEntries", "(", ")", ";", "String", "slash", "=", "\"\"", ";", "for", "(", "int", "i...
Appends the relative path to the <code>buffer</code> using '/' as the delimiter for path elements. @param relPath a relative path. @param buffer the buffer where to append the path.
[ "Appends", "the", "relative", "path", "to", "the", "<code", ">", "buffer<", "/", "code", ">", "using", "/", "as", "the", "delimiter", "for", "path", "elements", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryTreeDump.java#L307-L315
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLinkPersistenceImpl.java
CPDefinitionLinkPersistenceImpl.fetchByC_C_T
@Override public CPDefinitionLink fetchByC_C_T(long CPDefinitionId, long CProductId, String type) { """ Returns the cp definition link where CPDefinitionId = &#63; and CProductId = &#63; and type = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param CPDefinitionId the c...
java
@Override public CPDefinitionLink fetchByC_C_T(long CPDefinitionId, long CProductId, String type) { return fetchByC_C_T(CPDefinitionId, CProductId, type, true); }
[ "@", "Override", "public", "CPDefinitionLink", "fetchByC_C_T", "(", "long", "CPDefinitionId", ",", "long", "CProductId", ",", "String", "type", ")", "{", "return", "fetchByC_C_T", "(", "CPDefinitionId", ",", "CProductId", ",", "type", ",", "true", ")", ";", "}...
Returns the cp definition link where CPDefinitionId = &#63; and CProductId = &#63; and type = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param CPDefinitionId the cp definition ID @param CProductId the c product ID @param type the type @return the matching cp definition link, o...
[ "Returns", "the", "cp", "definition", "link", "where", "CPDefinitionId", "=", "&#63", ";", "and", "CProductId", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLinkPersistenceImpl.java#L3762-L3766
buyi/RecyclerViewPagerIndicator
recycler-viewpager-indicator/src/main/java/com/viewpagerindicator/as/library/pageview/RecyclerViewHeader.java
RecyclerViewHeader.fromXml
public static RecyclerViewHeader fromXml(Context context, @LayoutRes int layoutRes) { """ Inflates layout from <code>xml</code> and encapsulates it with <code>RecyclerViewHeader</code>. @param context application context. @param layoutRes layout resource to be inflated. @return <code>RecyclerViewHeader</cod...
java
public static RecyclerViewHeader fromXml(Context context, @LayoutRes int layoutRes) { RecyclerViewHeader header = new RecyclerViewHeader(context); View.inflate(context, layoutRes, header); return header; }
[ "public", "static", "RecyclerViewHeader", "fromXml", "(", "Context", "context", ",", "@", "LayoutRes", "int", "layoutRes", ")", "{", "RecyclerViewHeader", "header", "=", "new", "RecyclerViewHeader", "(", "context", ")", ";", "View", ".", "inflate", "(", "context...
Inflates layout from <code>xml</code> and encapsulates it with <code>RecyclerViewHeader</code>. @param context application context. @param layoutRes layout resource to be inflated. @return <code>RecyclerViewHeader</code> view object.
[ "Inflates", "layout", "from", "<code", ">", "xml<", "/", "code", ">", "and", "encapsulates", "it", "with", "<code", ">", "RecyclerViewHeader<", "/", "code", ">", "." ]
train
https://github.com/buyi/RecyclerViewPagerIndicator/blob/b3b5283801b60d40f7325c7f590c945262194fad/recycler-viewpager-indicator/src/main/java/com/viewpagerindicator/as/library/pageview/RecyclerViewHeader.java#L69-L73
beders/Resty
src/main/java/us/monoid/util/EncoderUtil.java
EncoderUtil.encodeHeaderParameter
public static String encodeHeaderParameter(String name, String value) { """ Encodes the specified strings into a header parameter as described in RFC 2045 section 5.1 and RFC 2183 section 2. The specified strings should not contain any illegal (control or non-ASCII) characters. @param name parameter name. @...
java
public static String encodeHeaderParameter(String name, String value) { name = name.toLowerCase(Locale.US); // value := token / quoted-string if (isToken(value)) { return name + "=" + value; } else { return name + "=" + quote(value); } }
[ "public", "static", "String", "encodeHeaderParameter", "(", "String", "name", ",", "String", "value", ")", "{", "name", "=", "name", ".", "toLowerCase", "(", "Locale", ".", "US", ")", ";", "// value := token / quoted-string", "if", "(", "isToken", "(", "value"...
Encodes the specified strings into a header parameter as described in RFC 2045 section 5.1 and RFC 2183 section 2. The specified strings should not contain any illegal (control or non-ASCII) characters. @param name parameter name. @param value parameter value. @return encoded result.
[ "Encodes", "the", "specified", "strings", "into", "a", "header", "parameter", "as", "described", "in", "RFC", "2045", "section", "5", ".", "1", "and", "RFC", "2183", "section", "2", ".", "The", "specified", "strings", "should", "not", "contain", "any", "il...
train
https://github.com/beders/Resty/blob/4493603e9689c942cc3e53b9c5018010e414a364/src/main/java/us/monoid/util/EncoderUtil.java#L164-L173
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer/src/com/ibm/ws/ejbcontainer/osgi/internal/ModuleInitDataFactory.java
ModuleInitDataFactory.getManagedBeansInternalEJBName
private String getManagedBeansInternalEJBName(ClassInfo classInfo, AnnotationInfo managedBeanAnn) { """ Return the ManagedBean name to be used internally by the EJBContainer. The internal ManagedBean name is the value on the annotation (which must be unique even compared to EJBs in the module) or the class nam...
java
private String getManagedBeansInternalEJBName(ClassInfo classInfo, AnnotationInfo managedBeanAnn) { String name = getStringValue(managedBeanAnn, "value"); if (name == null) { name = '$' + classInfo.getName(); } return name; }
[ "private", "String", "getManagedBeansInternalEJBName", "(", "ClassInfo", "classInfo", ",", "AnnotationInfo", "managedBeanAnn", ")", "{", "String", "name", "=", "getStringValue", "(", "managedBeanAnn", ",", "\"value\"", ")", ";", "if", "(", "name", "==", "null", ")...
Return the ManagedBean name to be used internally by the EJBContainer. The internal ManagedBean name is the value on the annotation (which must be unique even compared to EJBs in the module) or the class name of the ManagedBean with a $ prefix. This is done for two reasons: 1 - when a name is not specified, our inter...
[ "Return", "the", "ManagedBean", "name", "to", "be", "used", "internally", "by", "the", "EJBContainer", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer/src/com/ibm/ws/ejbcontainer/osgi/internal/ModuleInitDataFactory.java#L882-L888
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/JCRUserListAccess.java
JCRUserListAccess.reuseIterator
protected void reuseIterator(Session session, int newPosition) throws RepositoryException { """ Check if possible to reuse current iterator (which means possibility to fetch next nodes in row). Otherwise the new one will be created. """ if (!(canReuseIterator() && iterator != null && iterator.getPositio...
java
protected void reuseIterator(Session session, int newPosition) throws RepositoryException { if (!(canReuseIterator() && iterator != null && iterator.getPosition() == newPosition)) { iterator = createIterator(session); iterator.skip(newPosition); } }
[ "protected", "void", "reuseIterator", "(", "Session", "session", ",", "int", "newPosition", ")", "throws", "RepositoryException", "{", "if", "(", "!", "(", "canReuseIterator", "(", ")", "&&", "iterator", "!=", "null", "&&", "iterator", ".", "getPosition", "(",...
Check if possible to reuse current iterator (which means possibility to fetch next nodes in row). Otherwise the new one will be created.
[ "Check", "if", "possible", "to", "reuse", "current", "iterator", "(", "which", "means", "possibility", "to", "fetch", "next", "nodes", "in", "row", ")", ".", "Otherwise", "the", "new", "one", "will", "be", "created", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/JCRUserListAccess.java#L161-L168
beihaifeiwu/dolphin
dolphin-common/src/main/java/com/freetmp/common/annotation/AnnotationUtils.java
AnnotationUtils.getValue
public static Object getValue(Annotation annotation, String attributeName) { """ Retrieve the <em>value</em> of a named attribute, given an annotation instance. @param annotation the annotation instance from which to retrieve the value @param attributeName the name of the attribute value to retrieve @return the...
java
public static Object getValue(Annotation annotation, String attributeName) { if (annotation == null || !StringUtils.hasLength(attributeName)) { return null; } try { Method method = annotation.annotationType().getDeclaredMethod(attributeName); ReflectionUtils.makeAccessible(method); return method.invok...
[ "public", "static", "Object", "getValue", "(", "Annotation", "annotation", ",", "String", "attributeName", ")", "{", "if", "(", "annotation", "==", "null", "||", "!", "StringUtils", ".", "hasLength", "(", "attributeName", ")", ")", "{", "return", "null", ";"...
Retrieve the <em>value</em> of a named attribute, given an annotation instance. @param annotation the annotation instance from which to retrieve the value @param attributeName the name of the attribute value to retrieve @return the attribute value, or {@code null} if not found @see #getValue(Annotation)
[ "Retrieve", "the", "<em", ">", "value<", "/", "em", ">", "of", "a", "named", "attribute", "given", "an", "annotation", "instance", "." ]
train
https://github.com/beihaifeiwu/dolphin/blob/b100579cc6986dce5eba5593ebb5fbae7bad9d1a/dolphin-common/src/main/java/com/freetmp/common/annotation/AnnotationUtils.java#L636-L648
morimekta/providence
it-serialization/src/main/java/net/morimekta/providence/it/serialization/FormatStatistics.java
FormatStatistics.colorHeader
public static String colorHeader() { """ Header string that matches the asString output. @return The asString header. """ return Color.BOLD + HEADER_L1 + "\n" + new Color(Color.YELLOW, Color.UNDERLINE) + HEADER_L2 + " " + Color.CLEA...
java
public static String colorHeader() { return Color.BOLD + HEADER_L1 + "\n" + new Color(Color.YELLOW, Color.UNDERLINE) + HEADER_L2 + " " + Color.CLEAR; }
[ "public", "static", "String", "colorHeader", "(", ")", "{", "return", "Color", ".", "BOLD", "+", "HEADER_L1", "+", "\"\\n\"", "+", "new", "Color", "(", "Color", ".", "YELLOW", ",", "Color", ".", "UNDERLINE", ")", "+", "HEADER_L2", "+", "\" \"", "+", ...
Header string that matches the asString output. @return The asString header.
[ "Header", "string", "that", "matches", "the", "asString", "output", "." ]
train
https://github.com/morimekta/providence/blob/7c17dc1c96b1a1d4b9ff942c2cfeb725278bd3aa/it-serialization/src/main/java/net/morimekta/providence/it/serialization/FormatStatistics.java#L94-L100
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateTime.java
DateTime.setField
public DateTime setField(int field, int value) { """ 设置日期的某个部分<br> 如果此对象为可变对象,返回自身,否则返回新对象,设置是否可变对象见{@link #setMutable(boolean)} @param field 表示日期的哪个部分的int值 {@link Calendar} @param value 值 @return {@link DateTime} """ final Calendar calendar = toCalendar(); calendar.set(field, value); DateTime...
java
public DateTime setField(int field, int value) { final Calendar calendar = toCalendar(); calendar.set(field, value); DateTime dt = this; if (false == mutable) { dt = ObjectUtil.clone(this); } return dt.setTimeInternal(calendar.getTimeInMillis()); }
[ "public", "DateTime", "setField", "(", "int", "field", ",", "int", "value", ")", "{", "final", "Calendar", "calendar", "=", "toCalendar", "(", ")", ";", "calendar", ".", "set", "(", "field", ",", "value", ")", ";", "DateTime", "dt", "=", "this", ";", ...
设置日期的某个部分<br> 如果此对象为可变对象,返回自身,否则返回新对象,设置是否可变对象见{@link #setMutable(boolean)} @param field 表示日期的哪个部分的int值 {@link Calendar} @param value 值 @return {@link DateTime}
[ "设置日期的某个部分<br", ">", "如果此对象为可变对象,返回自身,否则返回新对象,设置是否可变对象见", "{", "@link", "#setMutable", "(", "boolean", ")", "}" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateTime.java#L263-L272
facebook/fresco
animated-base/src/main/java/com/facebook/imagepipeline/animated/util/AnimatedDrawableUtil.java
AnimatedDrawableUtil.getFrameForTimestampMs
public int getFrameForTimestampMs(int frameTimestampsMs[], int timestampMs) { """ Gets the frame index for specified timestamp. @param frameTimestampsMs an array of timestamps generated by {@link #getFrameForTimestampMs)} @param timestampMs the timestamp @return the frame index for the timestamp or the last f...
java
public int getFrameForTimestampMs(int frameTimestampsMs[], int timestampMs) { int index = Arrays.binarySearch(frameTimestampsMs, timestampMs); if (index < 0) { return -index - 1 - 1; } else { return index; } }
[ "public", "int", "getFrameForTimestampMs", "(", "int", "frameTimestampsMs", "[", "]", ",", "int", "timestampMs", ")", "{", "int", "index", "=", "Arrays", ".", "binarySearch", "(", "frameTimestampsMs", ",", "timestampMs", ")", ";", "if", "(", "index", "<", "0...
Gets the frame index for specified timestamp. @param frameTimestampsMs an array of timestamps generated by {@link #getFrameForTimestampMs)} @param timestampMs the timestamp @return the frame index for the timestamp or the last frame number if the timestamp is outside the duration of the entire animation
[ "Gets", "the", "frame", "index", "for", "specified", "timestamp", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/animated-base/src/main/java/com/facebook/imagepipeline/animated/util/AnimatedDrawableUtil.java#L81-L88
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/ObjectUtils.java
ObjectUtils.identityToString
public static void identityToString(final Appendable appendable, final Object object) throws IOException { """ <p>Appends the toString that would be produced by {@code Object} if a class did not override toString itself. {@code null} will throw a NullPointerException for either of the two parameters. </p> <pr...
java
public static void identityToString(final Appendable appendable, final Object object) throws IOException { Validate.notNull(object, "Cannot get the toString of a null identity"); appendable.append(object.getClass().getName()) .append('@') .append(Integer.toHexString(System.id...
[ "public", "static", "void", "identityToString", "(", "final", "Appendable", "appendable", ",", "final", "Object", "object", ")", "throws", "IOException", "{", "Validate", ".", "notNull", "(", "object", ",", "\"Cannot get the toString of a null identity\"", ")", ";", ...
<p>Appends the toString that would be produced by {@code Object} if a class did not override toString itself. {@code null} will throw a NullPointerException for either of the two parameters. </p> <pre> ObjectUtils.identityToString(appendable, "") = appendable.append("java.lang.String@1e23" ObjectUtils.ident...
[ "<p", ">", "Appends", "the", "toString", "that", "would", "be", "produced", "by", "{", "@code", "Object", "}", "if", "a", "class", "did", "not", "override", "toString", "itself", ".", "{", "@code", "null", "}", "will", "throw", "a", "NullPointerException",...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/ObjectUtils.java#L357-L362
alexvasilkov/GestureViews
library/src/main/java/com/alexvasilkov/gestures/StateController.java
StateController.toggleMinMaxZoom
State toggleMinMaxZoom(State state, float pivotX, float pivotY) { """ Maximizes zoom if it closer to min zoom or minimizes it if it closer to max zoom. @param state Current state @param pivotX Pivot's X coordinate @param pivotY Pivot's Y coordinate @return End state for toggle animation. """ zoom...
java
State toggleMinMaxZoom(State state, float pivotX, float pivotY) { zoomBounds.set(state); final float minZoom = zoomBounds.getFitZoom(); final float maxZoom = settings.getDoubleTapZoom() > 0f ? settings.getDoubleTapZoom() : zoomBounds.getMaxZoom(); final float middleZoom ...
[ "State", "toggleMinMaxZoom", "(", "State", "state", ",", "float", "pivotX", ",", "float", "pivotY", ")", "{", "zoomBounds", ".", "set", "(", "state", ")", ";", "final", "float", "minZoom", "=", "zoomBounds", ".", "getFitZoom", "(", ")", ";", "final", "fl...
Maximizes zoom if it closer to min zoom or minimizes it if it closer to max zoom. @param state Current state @param pivotX Pivot's X coordinate @param pivotY Pivot's Y coordinate @return End state for toggle animation.
[ "Maximizes", "zoom", "if", "it", "closer", "to", "min", "zoom", "or", "minimizes", "it", "if", "it", "closer", "to", "max", "zoom", "." ]
train
https://github.com/alexvasilkov/GestureViews/blob/f0a4c266e31dcad23bd0d9013531bc1c501b9c9f/library/src/main/java/com/alexvasilkov/gestures/StateController.java#L106-L118
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/RedundentExprEliminator.java
RedundentExprEliminator.eleminateRedundent
protected void eleminateRedundent(ElemTemplateElement psuedoVarRecipient, Vector paths) { """ Method to be called after the all expressions within an node context have been visited. It eliminates redundent expressions by creating a variable in the psuedoVarRecipient for each redundent expression, and then rewr...
java
protected void eleminateRedundent(ElemTemplateElement psuedoVarRecipient, Vector paths) { int n = paths.size(); int numPathsEliminated = 0; int numUniquePathsEliminated = 0; for (int i = 0; i < n; i++) { ExpressionOwner owner = (ExpressionOwner) paths.elementAt(i); if (null != owner) ...
[ "protected", "void", "eleminateRedundent", "(", "ElemTemplateElement", "psuedoVarRecipient", ",", "Vector", "paths", ")", "{", "int", "n", "=", "paths", ".", "size", "(", ")", ";", "int", "numPathsEliminated", "=", "0", ";", "int", "numUniquePathsEliminated", "=...
Method to be called after the all expressions within an node context have been visited. It eliminates redundent expressions by creating a variable in the psuedoVarRecipient for each redundent expression, and then rewriting the redundent expression to be a variable reference. @param psuedoVarRecipient The owner of the...
[ "Method", "to", "be", "called", "after", "the", "all", "expressions", "within", "an", "node", "context", "have", "been", "visited", ".", "It", "eliminates", "redundent", "expressions", "by", "creating", "a", "variable", "in", "the", "psuedoVarRecipient", "for", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/RedundentExprEliminator.java#L121-L142
modelmapper/modelmapper
core/src/main/java/org/modelmapper/internal/util/Iterables.java
Iterables.getElementFromArrary
public static Object getElementFromArrary(Object array, int index) { """ Gets the element from an array with given index. @param array the array @param index the index @return null if the array doesn't have the element at index, otherwise, return the element """ try { return Array.get(array, i...
java
public static Object getElementFromArrary(Object array, int index) { try { return Array.get(array, index); } catch (ArrayIndexOutOfBoundsException e) { return null; } }
[ "public", "static", "Object", "getElementFromArrary", "(", "Object", "array", ",", "int", "index", ")", "{", "try", "{", "return", "Array", ".", "get", "(", "array", ",", "index", ")", ";", "}", "catch", "(", "ArrayIndexOutOfBoundsException", "e", ")", "{"...
Gets the element from an array with given index. @param array the array @param index the index @return null if the array doesn't have the element at index, otherwise, return the element
[ "Gets", "the", "element", "from", "an", "array", "with", "given", "index", "." ]
train
https://github.com/modelmapper/modelmapper/blob/491d165ded9dc9aba7ce8b56984249e1a1363204/core/src/main/java/org/modelmapper/internal/util/Iterables.java#L90-L96
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/platforms/PlatformSybaseASAImpl.java
PlatformSybaseASAImpl.initializeJdbcConnection
public void initializeJdbcConnection(JdbcConnectionDescriptor jcd, Connection conn) throws PlatformException { """ Sybase Adaptive Server Enterprise (ASE) support timestamp to a precision of 1/300th of second. Adaptive Server Anywhere (ASA) support timestamp to a precision of 1/1000000tho of second. Sybase JDBC ...
java
public void initializeJdbcConnection(JdbcConnectionDescriptor jcd, Connection conn) throws PlatformException { // Do origial init super.initializeJdbcConnection(jcd, conn); // Execute a statement setting the tempory option try { Statement stmt = conn.create...
[ "public", "void", "initializeJdbcConnection", "(", "JdbcConnectionDescriptor", "jcd", ",", "Connection", "conn", ")", "throws", "PlatformException", "{", "// Do origial init\r", "super", ".", "initializeJdbcConnection", "(", "jcd", ",", "conn", ")", ";", "// Execute a s...
Sybase Adaptive Server Enterprise (ASE) support timestamp to a precision of 1/300th of second. Adaptive Server Anywhere (ASA) support timestamp to a precision of 1/1000000tho of second. Sybase JDBC driver (JConnect) retrieving timestamp always rounds to 1/300th sec., causing rounding problems with ASA when retrieving T...
[ "Sybase", "Adaptive", "Server", "Enterprise", "(", "ASE", ")", "support", "timestamp", "to", "a", "precision", "of", "1", "/", "300th", "of", "second", ".", "Adaptive", "Server", "Anywhere", "(", "ASA", ")", "support", "timestamp", "to", "a", "precision", ...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/platforms/PlatformSybaseASAImpl.java#L47-L61
lievendoclo/Valkyrie-RCP
valkyrie-rcp-integrations/valkyrie-rcp-jideoss/src/main/java/org/valkyriercp/component/JideOverlayService.java
JideOverlayService.installOverlay
@Override public Boolean installOverlay(JComponent targetComponent, JComponent overlay) { """ {@inheritDoc} <p> Employs a default position <code>SwingConstants.NORTH_WEST</code> and <code>null</code> insets to avoid changes. @see #installOverlay(JComponent, JComponent, int, Insets) """ return...
java
@Override public Boolean installOverlay(JComponent targetComponent, JComponent overlay) { return this.installOverlay(targetComponent, overlay, SwingConstants.NORTH_WEST, null); }
[ "@", "Override", "public", "Boolean", "installOverlay", "(", "JComponent", "targetComponent", ",", "JComponent", "overlay", ")", "{", "return", "this", ".", "installOverlay", "(", "targetComponent", ",", "overlay", ",", "SwingConstants", ".", "NORTH_WEST", ",", "n...
{@inheritDoc} <p> Employs a default position <code>SwingConstants.NORTH_WEST</code> and <code>null</code> insets to avoid changes. @see #installOverlay(JComponent, JComponent, int, Insets)
[ "{", "@inheritDoc", "}", "<p", ">", "Employs", "a", "default", "position", "<code", ">", "SwingConstants", ".", "NORTH_WEST<", "/", "code", ">", "and", "<code", ">", "null<", "/", "code", ">", "insets", "to", "avoid", "changes", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-integrations/valkyrie-rcp-jideoss/src/main/java/org/valkyriercp/component/JideOverlayService.java#L99-L103
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsLightTrace.java
CommsLightTrace._traceMessageId
private static void _traceMessageId(TraceComponent callersTrace, String action, String messageText) { """ Allow minimal tracing of System Message IDs (along with a transaction if on exists) @param callersTrace The trace component of the caller @param action A string (no spaces) provided by the caller to prefix t...
java
private static void _traceMessageId(TraceComponent callersTrace, String action, String messageText) { // Build the trace string String traceText = action + ": " + messageText; // Trace using the correct trace group if (light_tc.isDebugEnabled()) { SibTr.debug(light_tc, traceText); } ...
[ "private", "static", "void", "_traceMessageId", "(", "TraceComponent", "callersTrace", ",", "String", "action", ",", "String", "messageText", ")", "{", "// Build the trace string", "String", "traceText", "=", "action", "+", "\": \"", "+", "messageText", ";", "// Tra...
Allow minimal tracing of System Message IDs (along with a transaction if on exists) @param callersTrace The trace component of the caller @param action A string (no spaces) provided by the caller to prefix the keyword included in the trace line @param message The message to trace
[ "Allow", "minimal", "tracing", "of", "System", "Message", "IDs", "(", "along", "with", "a", "transaction", "if", "on", "exists", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsLightTrace.java#L80-L92
blinkfox/zealot
src/main/java/com/blinkfox/zealot/core/ZealotKhala.java
ZealotKhala.andLikePattern
public ZealotKhala andLikePattern(String field, String pattern) { """ 根据指定的模式字符串生成带" AND "前缀的like模糊查询的SQL片段. <p>示例:传入 {"b.title", "Java%"} 两个参数,生成的SQL片段为:" AND b.title LIKE 'Java%' "</p> @param field 数据库字段 @param pattern 模式字符串 @return ZealotKhala实例 """ return this.doLikePattern(ZealotConst.AND_PR...
java
public ZealotKhala andLikePattern(String field, String pattern) { return this.doLikePattern(ZealotConst.AND_PREFIX, field, pattern, true, true); }
[ "public", "ZealotKhala", "andLikePattern", "(", "String", "field", ",", "String", "pattern", ")", "{", "return", "this", ".", "doLikePattern", "(", "ZealotConst", ".", "AND_PREFIX", ",", "field", ",", "pattern", ",", "true", ",", "true", ")", ";", "}" ]
根据指定的模式字符串生成带" AND "前缀的like模糊查询的SQL片段. <p>示例:传入 {"b.title", "Java%"} 两个参数,生成的SQL片段为:" AND b.title LIKE 'Java%' "</p> @param field 数据库字段 @param pattern 模式字符串 @return ZealotKhala实例
[ "根据指定的模式字符串生成带", "AND", "前缀的like模糊查询的SQL片段", ".", "<p", ">", "示例:传入", "{", "b", ".", "title", "Java%", "}", "两个参数,生成的SQL片段为:", "AND", "b", ".", "title", "LIKE", "Java%", "<", "/", "p", ">" ]
train
https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/core/ZealotKhala.java#L1066-L1068
dita-ot/dita-ot
src/main/java/org/dita/dost/util/StringUtils.java
StringUtils.setOrAppend
public static String setOrAppend(final String target, final String value, final boolean withSpace) { """ If target is null, return the value; else append value to target. If withSpace is true, insert a blank between them. @param target target to be appended @param value value to append @param withSpace whether...
java
public static String setOrAppend(final String target, final String value, final boolean withSpace) { if (target == null) { return value; }if(value == null) { return target; } else { if (withSpace && !target.endsWith(STRING_BLANK)) { return targ...
[ "public", "static", "String", "setOrAppend", "(", "final", "String", "target", ",", "final", "String", "value", ",", "final", "boolean", "withSpace", ")", "{", "if", "(", "target", "==", "null", ")", "{", "return", "value", ";", "}", "if", "(", "value", ...
If target is null, return the value; else append value to target. If withSpace is true, insert a blank between them. @param target target to be appended @param value value to append @param withSpace whether insert a blank @return processed string
[ "If", "target", "is", "null", "return", "the", "value", ";", "else", "append", "value", "to", "target", ".", "If", "withSpace", "is", "true", "insert", "a", "blank", "between", "them", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/util/StringUtils.java#L179-L191
Azure/azure-sdk-for-java
dns/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/dns/v2017_10_01/implementation/ZonesInner.java
ZonesInner.getByResourceGroupAsync
public Observable<ZoneInner> getByResourceGroupAsync(String resourceGroupName, String zoneName) { """ Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone. @param resourceGroupName The name of the resource group. @param zoneName The name of the DNS zone (without a terminating...
java
public Observable<ZoneInner> getByResourceGroupAsync(String resourceGroupName, String zoneName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, zoneName).map(new Func1<ServiceResponse<ZoneInner>, ZoneInner>() { @Override public ZoneInner call(ServiceResponse<ZoneIn...
[ "public", "Observable", "<", "ZoneInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "zoneName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "zoneName", ")", ".", "map", "(", ...
Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone. @param resourceGroupName The name of the resource group. @param zoneName The name of the DNS zone (without a terminating dot). @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the...
[ "Gets", "a", "DNS", "zone", ".", "Retrieves", "the", "zone", "properties", "but", "not", "the", "record", "sets", "within", "the", "zone", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/dns/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/dns/v2017_10_01/implementation/ZonesInner.java#L645-L652
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/Utils.java
Utils.textPadding
@Deprecated public static byte[] textPadding(String text, String characterSetName, int length, int alignment, byte paddingByte) throws UnsupportedEncodingException { """ Text is truncated if exceed field capacity. Uses spaces as padding @param text the text to write @param characterSetName The charset to use...
java
@Deprecated public static byte[] textPadding(String text, String characterSetName, int length, int alignment, byte paddingByte) throws UnsupportedEncodingException { DBFAlignment align = DBFAlignment.RIGHT; if (alignment == ALIGN_LEFT) { align = DBFAlignment.LEFT; } return textPadding(text, characterSetN...
[ "@", "Deprecated", "public", "static", "byte", "[", "]", "textPadding", "(", "String", "text", ",", "String", "characterSetName", ",", "int", "length", ",", "int", "alignment", ",", "byte", "paddingByte", ")", "throws", "UnsupportedEncodingException", "{", "DBFA...
Text is truncated if exceed field capacity. Uses spaces as padding @param text the text to write @param characterSetName The charset to use @param length field length @param alignment where to align the data @param paddingByte the byte to use for padding @return byte[] to store in the file @throws UnsupportedEncodingEx...
[ "Text", "is", "truncated", "if", "exceed", "field", "capacity", ".", "Uses", "spaces", "as", "padding" ]
train
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/Utils.java#L264-L273
mozilla/rhino
src/org/mozilla/javascript/WrapFactory.java
WrapFactory.wrapAsJavaObject
public Scriptable wrapAsJavaObject(Context cx, Scriptable scope, Object javaObject, Class<?> staticType) { """ Wrap Java object as Scriptable instance to allow full access to its methods and fields from JavaScript. <p> {@link #wrap(Context, Scriptable, Object, Class)} and ...
java
public Scriptable wrapAsJavaObject(Context cx, Scriptable scope, Object javaObject, Class<?> staticType) { return new NativeJavaObject(scope, javaObject, staticType); }
[ "public", "Scriptable", "wrapAsJavaObject", "(", "Context", "cx", ",", "Scriptable", "scope", ",", "Object", "javaObject", ",", "Class", "<", "?", ">", "staticType", ")", "{", "return", "new", "NativeJavaObject", "(", "scope", ",", "javaObject", ",", "staticTy...
Wrap Java object as Scriptable instance to allow full access to its methods and fields from JavaScript. <p> {@link #wrap(Context, Scriptable, Object, Class)} and {@link #wrapNewObject(Context, Scriptable, Object)} call this method when they can not convert <tt>javaObject</tt> to JavaScript primitive value or JavaScript...
[ "Wrap", "Java", "object", "as", "Scriptable", "instance", "to", "allow", "full", "access", "to", "its", "methods", "and", "fields", "from", "JavaScript", ".", "<p", ">", "{" ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/WrapFactory.java#L117-L121
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java
FacebookRestClient.notifications_sendEmail
public String notifications_sendEmail(Collection<Integer> recipientIds, CharSequence subject, CharSequence fbml, CharSequence text) throws FacebookException, IOException { """ Sends a notification email to the specified users, who must have added your application. You can send five (5) emails to a user per da...
java
public String notifications_sendEmail(Collection<Integer> recipientIds, CharSequence subject, CharSequence fbml, CharSequence text) throws FacebookException, IOException { if (null == recipientIds || recipientIds.isEmpty()) { throw new IllegalArgumentException("List of email recipients cannot be empty"); ...
[ "public", "String", "notifications_sendEmail", "(", "Collection", "<", "Integer", ">", "recipientIds", ",", "CharSequence", "subject", ",", "CharSequence", "fbml", ",", "CharSequence", "text", ")", "throws", "FacebookException", ",", "IOException", "{", "if", "(", ...
Sends a notification email to the specified users, who must have added your application. You can send five (5) emails to a user per day. Requires a session key for desktop applications, which may only send email to the person whose session it is. This method does not require a session for Web applications. Either <code...
[ "Sends", "a", "notification", "email", "to", "the", "specified", "users", "who", "must", "have", "added", "your", "application", ".", "You", "can", "send", "five", "(", "5", ")", "emails", "to", "a", "user", "per", "day", ".", "Requires", "a", "session",...
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L1197-L1220
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelFrameworkImpl.java
ChannelFrameworkImpl.initChannelFactory
protected synchronized void initChannelFactory(Class<?> type, ChannelFactory factory, Map<Object, Object> properties) throws ChannelFactoryException { """ This method will store factory properties, initialize the factory & map the factory to it's type. This method exists primarily as a performance enhancement fo...
java
protected synchronized void initChannelFactory(Class<?> type, ChannelFactory factory, Map<Object, Object> properties) throws ChannelFactoryException { // if no properties were provided, then we must retrieve them from // channelFactoriesProperties using the factory type as the key; if // the pr...
[ "protected", "synchronized", "void", "initChannelFactory", "(", "Class", "<", "?", ">", "type", ",", "ChannelFactory", "factory", ",", "Map", "<", "Object", ",", "Object", ">", "properties", ")", "throws", "ChannelFactoryException", "{", "// if no properties were pr...
This method will store factory properties, initialize the factory & map the factory to it's type. This method exists primarily as a performance enhancement for the WebSphere-specific implementation; without this method we would have to create two factory instances: one to translate WCCM objects to property maps, the ot...
[ "This", "method", "will", "store", "factory", "properties", "initialize", "the", "factory", "&", "map", "the", "factory", "to", "it", "s", "type", ".", "This", "method", "exists", "primarily", "as", "a", "performance", "enhancement", "for", "the", "WebSphere",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelFrameworkImpl.java#L839-L869
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/xspec/SS.java
SS.ifNotExists
public IfNotExistsFunction<SS> ifNotExists(String... defaultValue) { """ Returns an <code>IfNotExistsFunction</code> object which represents an <a href= "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html" >if_not_exists(path, operand)</a> function call where path refers t...
java
public IfNotExistsFunction<SS> ifNotExists(String... defaultValue) { return new IfNotExistsFunction<SS>(this, new LiteralOperand( new LinkedHashSet<String>(Arrays.asList(defaultValue)))); }
[ "public", "IfNotExistsFunction", "<", "SS", ">", "ifNotExists", "(", "String", "...", "defaultValue", ")", "{", "return", "new", "IfNotExistsFunction", "<", "SS", ">", "(", "this", ",", "new", "LiteralOperand", "(", "new", "LinkedHashSet", "<", "String", ">", ...
Returns an <code>IfNotExistsFunction</code> object which represents an <a href= "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Modifying.html" >if_not_exists(path, operand)</a> function call where path refers to that of the current path operand; used for building expressions. <pre> "if_no...
[ "Returns", "an", "<code", ">", "IfNotExistsFunction<", "/", "code", ">", "object", "which", "represents", "an", "<a", "href", "=", "http", ":", "//", "docs", ".", "aws", ".", "amazon", ".", "com", "/", "amazondynamodb", "/", "latest", "/", "developerguide"...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/xspec/SS.java#L190-L193
VoltDB/voltdb
src/frontend/org/voltcore/agreement/AgreementSeeker.java
AgreementSeeker.removeValues
static protected void removeValues(TreeMultimap<Long, Long> mm, Set<Long> values) { """ Convenience method that remove all instances of the given values from the given map @param mm a multimap @param values a set of values that need to be removed """ Iterator<Map.Entry<Long, Long>> itr = mm.entries(...
java
static protected void removeValues(TreeMultimap<Long, Long> mm, Set<Long> values) { Iterator<Map.Entry<Long, Long>> itr = mm.entries().iterator(); while (itr.hasNext()) { Map.Entry<Long, Long> e = itr.next(); if (values.contains(e.getValue())) { itr.remove(); ...
[ "static", "protected", "void", "removeValues", "(", "TreeMultimap", "<", "Long", ",", "Long", ">", "mm", ",", "Set", "<", "Long", ">", "values", ")", "{", "Iterator", "<", "Map", ".", "Entry", "<", "Long", ",", "Long", ">", ">", "itr", "=", "mm", "...
Convenience method that remove all instances of the given values from the given map @param mm a multimap @param values a set of values that need to be removed
[ "Convenience", "method", "that", "remove", "all", "instances", "of", "the", "given", "values", "from", "the", "given", "map" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/agreement/AgreementSeeker.java#L116-L124
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_conf.java
ns_conf.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ ns_conf_responses result = (ns_conf_responses) service.get_payload_form...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { ns_conf_responses result = (ns_conf_responses) service.get_payload_formatter().string_to_resource(ns_conf_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == SESSION_NO...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "ns_conf_responses", "result", "=", "(", "ns_conf_responses", ")", "service", ".", "get_payload_formatter", ...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_conf.java#L269-L286
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/cos/COSAPIClient.java
COSAPIClient.copyFile
private void copyFile(String srcKey, String dstKey, long size) throws IOException, InterruptedIOException, AmazonClientException { """ Copy a single object in the bucket via a COPY operation. @param srcKey source object path @param dstKey destination object path @param size object size @throws AmazonClie...
java
private void copyFile(String srcKey, String dstKey, long size) throws IOException, InterruptedIOException, AmazonClientException { LOG.debug("copyFile {} -> {} ", srcKey, dstKey); CopyObjectRequest copyObjectRequest = new CopyObjectRequest(mBucket, srcKey, mBucket, dstKey); try { ObjectM...
[ "private", "void", "copyFile", "(", "String", "srcKey", ",", "String", "dstKey", ",", "long", "size", ")", "throws", "IOException", ",", "InterruptedIOException", ",", "AmazonClientException", "{", "LOG", ".", "debug", "(", "\"copyFile {} -> {} \"", ",", "srcKey",...
Copy a single object in the bucket via a COPY operation. @param srcKey source object path @param dstKey destination object path @param size object size @throws AmazonClientException on failures inside the AWS SDK @throws InterruptedIOException the operation was interrupted @throws IOException Other IO problems
[ "Copy", "a", "single", "object", "in", "the", "bucket", "via", "a", "COPY", "operation", "." ]
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/cos/COSAPIClient.java#L1604-L1637
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/photos/PhotosInterface.java
PhotosInterface.getInfo
public Photo getInfo(String photoId, String secret) throws FlickrException { """ Get all info for the specified photo. The calling user must have permission to view the photo. This method does not require authentication. @param photoId The photo Id @param secret The optional secret String @return The ...
java
public Photo getInfo(String photoId, String secret) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_INFO); parameters.put("photo_id", photoId); if (secret != null) { parameters.put("secret", s...
[ "public", "Photo", "getInfo", "(", "String", "photoId", ",", "String", "secret", ")", "throws", "FlickrException", "{", "Map", "<", "String", ",", "Object", ">", "parameters", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "para...
Get all info for the specified photo. The calling user must have permission to view the photo. This method does not require authentication. @param photoId The photo Id @param secret The optional secret String @return The Photo @throws FlickrException
[ "Get", "all", "info", "for", "the", "specified", "photo", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/PhotosInterface.java#L565-L581
google/closure-templates
java/src/com/google/template/soy/jbcsrc/SoyNodeCompiler.java
SoyNodeCompiler.getParamStoreExpression
private Expression getParamStoreExpression(CallNode node, Label reattachPoint) { """ Returns an expression that creates a new {@link ParamStore} suitable for holding all the parameters. """ if (!node.isPassingData()) { return ConstructorRef.BASIC_PARAM_STORE.construct(constant(node.numChildren())); ...
java
private Expression getParamStoreExpression(CallNode node, Label reattachPoint) { if (!node.isPassingData()) { return ConstructorRef.BASIC_PARAM_STORE.construct(constant(node.numChildren())); } Expression dataExpression; if (node.isPassingAllData()) { dataExpression = parameterLookup.getPara...
[ "private", "Expression", "getParamStoreExpression", "(", "CallNode", "node", ",", "Label", "reattachPoint", ")", "{", "if", "(", "!", "node", ".", "isPassingData", "(", ")", ")", "{", "return", "ConstructorRef", ".", "BASIC_PARAM_STORE", ".", "construct", "(", ...
Returns an expression that creates a new {@link ParamStore} suitable for holding all the parameters.
[ "Returns", "an", "expression", "that", "creates", "a", "new", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/SoyNodeCompiler.java#L1052-L1071
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/cli/CLIUtils.java
CLIUtils.generateArgline
public static String generateArgline(final String scriptpath, final String[] args, final Boolean unsafe) { """ Create an appropriately quoted argline to use given the command (script path) and argument strings. @param scriptpath path to command or script @param args arguments to pass to the command @par...
java
public static String generateArgline(final String scriptpath, final String[] args, final Boolean unsafe) { return generateArgline(scriptpath, args, " ", unsafe); }
[ "public", "static", "String", "generateArgline", "(", "final", "String", "scriptpath", ",", "final", "String", "[", "]", "args", ",", "final", "Boolean", "unsafe", ")", "{", "return", "generateArgline", "(", "scriptpath", ",", "args", ",", "\" \"", ",", "uns...
Create an appropriately quoted argline to use given the command (script path) and argument strings. @param scriptpath path to command or script @param args arguments to pass to the command @param unsafe whether to use backwards-compatible, known-insecure quoting @return a String of the command followed by t...
[ "Create", "an", "appropriately", "quoted", "argline", "to", "use", "given", "the", "command", "(", "script", "path", ")", "and", "argument", "strings", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/cli/CLIUtils.java#L66-L68
lessthanoptimal/BoofCV
integration/boofcv-android/src/main/java/boofcv/android/camera/VideoRenderProcessing.java
VideoRenderProcessing.outputToImage
protected void outputToImage( double x , double y , Point2D_F64 pt ) { """ Converts a coordinate from output image coordinates to input image """ pt.x = x*scale + tranX; pt.y = y*scale + tranY; }
java
protected void outputToImage( double x , double y , Point2D_F64 pt ) { pt.x = x*scale + tranX; pt.y = y*scale + tranY; }
[ "protected", "void", "outputToImage", "(", "double", "x", ",", "double", "y", ",", "Point2D_F64", "pt", ")", "{", "pt", ".", "x", "=", "x", "*", "scale", "+", "tranX", ";", "pt", ".", "y", "=", "y", "*", "scale", "+", "tranY", ";", "}" ]
Converts a coordinate from output image coordinates to input image
[ "Converts", "a", "coordinate", "from", "output", "image", "coordinates", "to", "input", "image" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/camera/VideoRenderProcessing.java#L147-L150
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/AnimatorModel.java
AnimatorModel.updateReversing
private void updateReversing(double extrp) { """ Update in reverse mode routine. @param extrp The extrapolation value. """ current -= speed * extrp; // First frame reached, done if (Double.compare(current, first) <= 0) { current = first; if (repeat) ...
java
private void updateReversing(double extrp) { current -= speed * extrp; // First frame reached, done if (Double.compare(current, first) <= 0) { current = first; if (repeat) { state = AnimState.PLAYING; current += 1....
[ "private", "void", "updateReversing", "(", "double", "extrp", ")", "{", "current", "-=", "speed", "*", "extrp", ";", "// First frame reached, done", "if", "(", "Double", ".", "compare", "(", "current", ",", "first", ")", "<=", "0", ")", "{", "current", "="...
Update in reverse mode routine. @param extrp The extrapolation value.
[ "Update", "in", "reverse", "mode", "routine", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/AnimatorModel.java#L99-L118
line/armeria
core/src/main/java/com/linecorp/armeria/internal/annotation/AnnotatedHttpServiceFactory.java
AnnotatedHttpServiceFactory.getInstance
static <T> T getInstance(Annotation annotation, Class<T> expectedType) { """ Returns a cached instance of the specified {@link Class} which is specified in the given {@link Annotation}. """ try { @SuppressWarnings("unchecked") final Class<? extends T> clazz = (Class<? extends T...
java
static <T> T getInstance(Annotation annotation, Class<T> expectedType) { try { @SuppressWarnings("unchecked") final Class<? extends T> clazz = (Class<? extends T>) invokeValueMethod(annotation); return expectedType.cast(instanceCache.computeIfAbsent(clazz, type -> { ...
[ "static", "<", "T", ">", "T", "getInstance", "(", "Annotation", "annotation", ",", "Class", "<", "T", ">", "expectedType", ")", "{", "try", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "final", "Class", "<", "?", "extends", "T", ">", "clazz",...
Returns a cached instance of the specified {@link Class} which is specified in the given {@link Annotation}.
[ "Returns", "a", "cached", "instance", "of", "the", "specified", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/internal/annotation/AnnotatedHttpServiceFactory.java#L735-L753
mikepenz/FastAdapter
library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/dialog/FastAdapterDialog.java
FastAdapterDialog.withPositiveButton
public FastAdapterDialog<Item> withPositiveButton(@StringRes int textRes, OnClickListener listener) { """ Set a listener to be invoked when the positive button of the dialog is pressed. @param textRes The resource id of the text to display in the positive button @param listener The {@link DialogInterface.OnCl...
java
public FastAdapterDialog<Item> withPositiveButton(@StringRes int textRes, OnClickListener listener) { return withButton(BUTTON_POSITIVE, textRes, listener); }
[ "public", "FastAdapterDialog", "<", "Item", ">", "withPositiveButton", "(", "@", "StringRes", "int", "textRes", ",", "OnClickListener", "listener", ")", "{", "return", "withButton", "(", "BUTTON_POSITIVE", ",", "textRes", ",", "listener", ")", ";", "}" ]
Set a listener to be invoked when the positive button of the dialog is pressed. @param textRes The resource id of the text to display in the positive button @param listener The {@link DialogInterface.OnClickListener} to use. @return This Builder object to allow for chaining of calls to set methods
[ "Set", "a", "listener", "to", "be", "invoked", "when", "the", "positive", "button", "of", "the", "dialog", "is", "pressed", "." ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/dialog/FastAdapterDialog.java#L142-L144
mikepenz/FastAdapter
library-core/src/main/java/com/mikepenz/fastadapter/utils/ComparableItemListImpl.java
ComparableItemListImpl.withComparator
public ComparableItemListImpl<Item> withComparator(@Nullable Comparator<Item> comparator) { """ define a comparator which will be used to sort the list "everytime" it is altered NOTE this will only sort if you "set" a new list or "add" new items (not if you provide a position for the add function) @param compa...
java
public ComparableItemListImpl<Item> withComparator(@Nullable Comparator<Item> comparator) { return withComparator(comparator, true); }
[ "public", "ComparableItemListImpl", "<", "Item", ">", "withComparator", "(", "@", "Nullable", "Comparator", "<", "Item", ">", "comparator", ")", "{", "return", "withComparator", "(", "comparator", ",", "true", ")", ";", "}" ]
define a comparator which will be used to sort the list "everytime" it is altered NOTE this will only sort if you "set" a new list or "add" new items (not if you provide a position for the add function) @param comparator used to sort the list @return this
[ "define", "a", "comparator", "which", "will", "be", "used", "to", "sort", "the", "list", "everytime", "it", "is", "altered", "NOTE", "this", "will", "only", "sort", "if", "you", "set", "a", "new", "list", "or", "add", "new", "items", "(", "not", "if", ...
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-core/src/main/java/com/mikepenz/fastadapter/utils/ComparableItemListImpl.java#L44-L46
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.xmlAttributeInexistent
public static void xmlAttributeInexistent(String path, String attributeName, Class<?> aClass) { """ Thrown if attribute is present in the xml file. @param path xml path @param attributeName attribute present @param aClass attribute's class """ throw new XmlMappingAttributeDoesNotExistException (MSG.INSTA...
java
public static void xmlAttributeInexistent(String path, String attributeName, Class<?> aClass){ throw new XmlMappingAttributeDoesNotExistException (MSG.INSTANCE.message(xmlMappingAttributeDoesNotExistException2,attributeName,aClass.getSimpleName(),path)); }
[ "public", "static", "void", "xmlAttributeInexistent", "(", "String", "path", ",", "String", "attributeName", ",", "Class", "<", "?", ">", "aClass", ")", "{", "throw", "new", "XmlMappingAttributeDoesNotExistException", "(", "MSG", ".", "INSTANCE", ".", "message", ...
Thrown if attribute is present in the xml file. @param path xml path @param attributeName attribute present @param aClass attribute's class
[ "Thrown", "if", "attribute", "is", "present", "in", "the", "xml", "file", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L294-L296
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/setup/SetupSteps.java
SetupSteps.runSetup
@PostConstruct public void runSetup() throws SetupException { """ Call each registered {@link SetupStep} one after the other. @throws SetupException Thrown with any error during running setup, including Zookeeper interactions, and individual failures in the {@link SetupStep}. """ HAConfiguration....
java
@PostConstruct public void runSetup() throws SetupException { HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); InterProcessMutex lock = curatorFactory.lockInstance(zookeeperProperties.getZkRoot()); try { LOG.info("Tr...
[ "@", "PostConstruct", "public", "void", "runSetup", "(", ")", "throws", "SetupException", "{", "HAConfiguration", ".", "ZookeeperProperties", "zookeeperProperties", "=", "HAConfiguration", ".", "getZookeeperProperties", "(", "configuration", ")", ";", "InterProcessMutex",...
Call each registered {@link SetupStep} one after the other. @throws SetupException Thrown with any error during running setup, including Zookeeper interactions, and individual failures in the {@link SetupStep}.
[ "Call", "each", "registered", "{" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/setup/SetupSteps.java#L75-L99
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java
SVGPath.ellipticalArc
public SVGPath ellipticalArc(double[] rxy, double ar, double la, double sp, double[] xy) { """ Elliptical arc curve to the given coordinates. @param rxy radius @param ar x-axis-rotation @param la large arc flag, if angle &gt;= 180 deg @param sp sweep flag, if arc will be drawn in positive-angle direction @p...
java
public SVGPath ellipticalArc(double[] rxy, double ar, double la, double sp, double[] xy) { return append(PATH_ARC).append(rxy[0]).append(rxy[1]).append(ar).append(la).append(sp).append(xy[0]).append(xy[1]); }
[ "public", "SVGPath", "ellipticalArc", "(", "double", "[", "]", "rxy", ",", "double", "ar", ",", "double", "la", ",", "double", "sp", ",", "double", "[", "]", "xy", ")", "{", "return", "append", "(", "PATH_ARC", ")", ".", "append", "(", "rxy", "[", ...
Elliptical arc curve to the given coordinates. @param rxy radius @param ar x-axis-rotation @param la large arc flag, if angle &gt;= 180 deg @param sp sweep flag, if arc will be drawn in positive-angle direction @param xy new coordinates
[ "Elliptical", "arc", "curve", "to", "the", "given", "coordinates", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java#L576-L578
javagl/ND
nd-tuples/src/main/java/de/javagl/nd/tuples/j/LongTuples.java
LongTuples.incrementLexicographically
private static boolean incrementLexicographically( MutableLongTuple current, LongTuple min, LongTuple max, int index) { """ Recursively increment the given tuple lexicographically, starting at the given index. @param current The tuple to increment @param min The minimum values @param max The maximum...
java
private static boolean incrementLexicographically( MutableLongTuple current, LongTuple min, LongTuple max, int index) { if (index == -1) { return false; } long oldValue = current.get(index); long newValue = oldValue + 1; current.set(index,...
[ "private", "static", "boolean", "incrementLexicographically", "(", "MutableLongTuple", "current", ",", "LongTuple", "min", ",", "LongTuple", "max", ",", "int", "index", ")", "{", "if", "(", "index", "==", "-", "1", ")", "{", "return", "false", ";", "}", "l...
Recursively increment the given tuple lexicographically, starting at the given index. @param current The tuple to increment @param min The minimum values @param max The maximum values @param index The index @return Whether the tuple could be incremented
[ "Recursively", "increment", "the", "given", "tuple", "lexicographically", "starting", "at", "the", "given", "index", "." ]
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-tuples/src/main/java/de/javagl/nd/tuples/j/LongTuples.java#L1557-L1573
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/format/FastDateFormat.java
FastDateFormat.getDateTimeInstance
public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle, final TimeZone timeZone, final Locale locale) { """ 获得 {@link FastDateFormat} 实例<br> 支持缓存 @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT @param timeZ...
java
public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle, final TimeZone timeZone, final Locale locale) { return cache.getDateTimeInstance(dateStyle, timeStyle, timeZone, locale); }
[ "public", "static", "FastDateFormat", "getDateTimeInstance", "(", "final", "int", "dateStyle", ",", "final", "int", "timeStyle", ",", "final", "TimeZone", "timeZone", ",", "final", "Locale", "locale", ")", "{", "return", "cache", ".", "getDateTimeInstance", "(", ...
获得 {@link FastDateFormat} 实例<br> 支持缓存 @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT @param timeZone 时区{@link TimeZone} @param locale {@link Locale} 日期地理位置 @return 本地化 {@link FastDateFormat}
[ "获得", "{", "@link", "FastDateFormat", "}", "实例<br", ">", "支持缓存" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/format/FastDateFormat.java#L260-L262
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ParameterMapper.java
ParameterMapper.requestParamaterToObject
public static <T> T requestParamaterToObject(HttpServletRequest request, Class<T> c, String charset) { """ Request paramater to object t. @param <T> the type parameter @param request the request @param c the c @param charset the charset @return the t """ Map<String, String> map = new ...
java
public static <T> T requestParamaterToObject(HttpServletRequest request, Class<T> c, String charset) { Map<String, String> map = new HashMap<>(); String query = request.getQueryString(); if (query != null) { String[] params = query.split("&"); for (String param : para...
[ "public", "static", "<", "T", ">", "T", "requestParamaterToObject", "(", "HttpServletRequest", "request", ",", "Class", "<", "T", ">", "c", ",", "String", "charset", ")", "{", "Map", "<", "String", ",", "String", ">", "map", "=", "new", "HashMap", "<>", ...
Request paramater to object t. @param <T> the type parameter @param request the request @param c the c @param charset the charset @return the t
[ "Request", "paramater", "to", "object", "t", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ParameterMapper.java#L50-L83
haraldk/TwelveMonkeys
common/common-lang/src/main/java/com/twelvemonkeys/lang/StringUtil.java
StringUtil.lastIndexOfIgnoreCase
public static int lastIndexOfIgnoreCase(String pString, String pLookFor) { """ Returns the index within this string of the rightmost occurrence of the specified substring. The rightmost empty string "" is considered to occur at the index value {@code pString.length() - 1}. @param pString The string to test ...
java
public static int lastIndexOfIgnoreCase(String pString, String pLookFor) { return lastIndexOfIgnoreCase(pString, pLookFor, pString != null ? pString.length() - 1 : -1); }
[ "public", "static", "int", "lastIndexOfIgnoreCase", "(", "String", "pString", ",", "String", "pLookFor", ")", "{", "return", "lastIndexOfIgnoreCase", "(", "pString", ",", "pLookFor", ",", "pString", "!=", "null", "?", "pString", ".", "length", "(", ")", "-", ...
Returns the index within this string of the rightmost occurrence of the specified substring. The rightmost empty string "" is considered to occur at the index value {@code pString.length() - 1}. @param pString The string to test @param pLookFor The string to look for @return If the string argument occurs one or more ...
[ "Returns", "the", "index", "within", "this", "string", "of", "the", "rightmost", "occurrence", "of", "the", "specified", "substring", ".", "The", "rightmost", "empty", "string", "is", "considered", "to", "occur", "at", "the", "index", "value", "{", "@code", ...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-lang/src/main/java/com/twelvemonkeys/lang/StringUtil.java#L347-L349
xqbase/util
util/src/main/java/com/xqbase/util/Numbers.java
Numbers.parseDouble
public static double parseDouble(String s, double d) { """ Parse a <b>double</b> with a given default value <b>d</b> @return default value if null or not parsable """ if (s == null) { return d; } try { return Double.parseDouble(s.trim()); } catch (NumberFormatException e) { return d;...
java
public static double parseDouble(String s, double d) { if (s == null) { return d; } try { return Double.parseDouble(s.trim()); } catch (NumberFormatException e) { return d; } }
[ "public", "static", "double", "parseDouble", "(", "String", "s", ",", "double", "d", ")", "{", "if", "(", "s", "==", "null", ")", "{", "return", "d", ";", "}", "try", "{", "return", "Double", ".", "parseDouble", "(", "s", ".", "trim", "(", ")", "...
Parse a <b>double</b> with a given default value <b>d</b> @return default value if null or not parsable
[ "Parse", "a", "<b", ">", "double<", "/", "b", ">", "with", "a", "given", "default", "value", "<b", ">", "d<", "/", "b", ">" ]
train
https://github.com/xqbase/util/blob/e7b9167b6c701b9eec988a9d1e68446cef5ef420/util/src/main/java/com/xqbase/util/Numbers.java#L124-L133
lucee/Lucee
core/src/main/java/lucee/runtime/engine/CFMLEngineImpl.java
CFMLEngineImpl.getInstance
public static synchronized CFMLEngine getInstance(CFMLEngineFactory factory, BundleCollection bc) { """ get singelton instance of the CFML Engine @param factory @return CFMLEngine """ if (engine == null) { if (SystemUtil.getLoaderVersion() < 6.0D) { // windows needs 6.0 because restart is not worki...
java
public static synchronized CFMLEngine getInstance(CFMLEngineFactory factory, BundleCollection bc) { if (engine == null) { if (SystemUtil.getLoaderVersion() < 6.0D) { // windows needs 6.0 because restart is not working with older versions if (SystemUtil.isWindows()) throw new RuntimeException("You need t...
[ "public", "static", "synchronized", "CFMLEngine", "getInstance", "(", "CFMLEngineFactory", "factory", ",", "BundleCollection", "bc", ")", "{", "if", "(", "engine", "==", "null", ")", "{", "if", "(", "SystemUtil", ".", "getLoaderVersion", "(", ")", "<", "6.0D",...
get singelton instance of the CFML Engine @param factory @return CFMLEngine
[ "get", "singelton", "instance", "of", "the", "CFML", "Engine" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/engine/CFMLEngineImpl.java#L592-L607
infinispan/infinispan
core/src/main/java/org/infinispan/manager/DefaultCacheManager.java
DefaultCacheManager.getCache
@Override public <K, V> Cache<K, V> getCache() { """ Retrieves the default cache associated with this cache manager. Note that the default cache does not need to be explicitly created with {@link #createCache(String, String)} (String)} since it is automatically created lazily when first used. <p/> As such, ...
java
@Override public <K, V> Cache<K, V> getCache() { if (defaultCacheName == null) { throw log.noDefaultCache(); } return internalGetCache(defaultCacheName, defaultCacheName); }
[ "@", "Override", "public", "<", "K", ",", "V", ">", "Cache", "<", "K", ",", "V", ">", "getCache", "(", ")", "{", "if", "(", "defaultCacheName", "==", "null", ")", "{", "throw", "log", ".", "noDefaultCache", "(", ")", ";", "}", "return", "internalGe...
Retrieves the default cache associated with this cache manager. Note that the default cache does not need to be explicitly created with {@link #createCache(String, String)} (String)} since it is automatically created lazily when first used. <p/> As such, this method is always guaranteed to return the default cache. @r...
[ "Retrieves", "the", "default", "cache", "associated", "with", "this", "cache", "manager", ".", "Note", "that", "the", "default", "cache", "does", "not", "need", "to", "be", "explicitly", "created", "with", "{", "@link", "#createCache", "(", "String", "String",...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/manager/DefaultCacheManager.java#L434-L440
citrusframework/citrus
modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ExecuteSQLQueryBuilder.java
ExecuteSQLQueryBuilder.validateScript
public ExecuteSQLQueryBuilder validateScript(String script, String type) { """ Validate SQL result set via validation script, for instance Groovy. @param script @param type """ ScriptValidationContext scriptValidationContext = new ScriptValidationContext(type); scriptValidationContext.setVali...
java
public ExecuteSQLQueryBuilder validateScript(String script, String type) { ScriptValidationContext scriptValidationContext = new ScriptValidationContext(type); scriptValidationContext.setValidationScript(script); action.setScriptValidationContext(scriptValidationContext); return this; ...
[ "public", "ExecuteSQLQueryBuilder", "validateScript", "(", "String", "script", ",", "String", "type", ")", "{", "ScriptValidationContext", "scriptValidationContext", "=", "new", "ScriptValidationContext", "(", "type", ")", ";", "scriptValidationContext", ".", "setValidati...
Validate SQL result set via validation script, for instance Groovy. @param script @param type
[ "Validate", "SQL", "result", "set", "via", "validation", "script", "for", "instance", "Groovy", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ExecuteSQLQueryBuilder.java#L175-L180
Ordinastie/MalisisCore
src/main/java/net/malisis/core/client/gui/component/UIComponent.java
UIComponent.getComponentAt
public UIComponent getComponentAt(int x, int y) { """ Gets the {@link UIComponent} at the specified coordinates.<br> Will return a {@link IControlComponent} if any. Checks if inside bounds, visible and not disabled. @param x the x @param y the y @return this {@link UIComponent} or null if outside its bounds....
java
public UIComponent getComponentAt(int x, int y) { //control components take precedence over regular components for (IControlComponent c : controlComponents) { UIComponent component = c.getComponentAt(x, y); if (component != null) return component; } return isInsideBounds(x, y) ? this : null; }
[ "public", "UIComponent", "getComponentAt", "(", "int", "x", ",", "int", "y", ")", "{", "//control components take precedence over regular components", "for", "(", "IControlComponent", "c", ":", "controlComponents", ")", "{", "UIComponent", "component", "=", "c", ".", ...
Gets the {@link UIComponent} at the specified coordinates.<br> Will return a {@link IControlComponent} if any. Checks if inside bounds, visible and not disabled. @param x the x @param y the y @return this {@link UIComponent} or null if outside its bounds.
[ "Gets", "the", "{", "@link", "UIComponent", "}", "at", "the", "specified", "coordinates", ".", "<br", ">", "Will", "return", "a", "{", "@link", "IControlComponent", "}", "if", "any", ".", "Checks", "if", "inside", "bounds", "visible", "and", "not", "disabl...
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/client/gui/component/UIComponent.java#L702-L713
igniterealtime/Smack
smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/util/OmemoKeyUtil.java
OmemoKeyUtil.addInBounds
public static int addInBounds(int value, int added) { """ Add integers modulo MAX_VALUE. @param value base integer @param added value that is added to the base value @return (value plus added) modulo Integer.MAX_VALUE """ int avail = Integer.MAX_VALUE - value; if (avail < added) { ...
java
public static int addInBounds(int value, int added) { int avail = Integer.MAX_VALUE - value; if (avail < added) { return added - avail; } else { return value + added; } }
[ "public", "static", "int", "addInBounds", "(", "int", "value", ",", "int", "added", ")", "{", "int", "avail", "=", "Integer", ".", "MAX_VALUE", "-", "value", ";", "if", "(", "avail", "<", "added", ")", "{", "return", "added", "-", "avail", ";", "}", ...
Add integers modulo MAX_VALUE. @param value base integer @param added value that is added to the base value @return (value plus added) modulo Integer.MAX_VALUE
[ "Add", "integers", "modulo", "MAX_VALUE", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/util/OmemoKeyUtil.java#L383-L390
asterisk-java/asterisk-java
src/main/java/org/asteriskjava/manager/internal/ManagerUtil.java
ManagerUtil.addInternalActionId
public static String addInternalActionId(String actionId, String internalActionId) { """ Adds the internal action id to the given action id. @param actionId the action id as set by the user. @param internalActionId the internal action id to add. @return the action id prefixed by the internal action id suitabl...
java
public static String addInternalActionId(String actionId, String internalActionId) { if (actionId == null) { return internalActionId + INTERNAL_ACTION_ID_DELIMITER; } return internalActionId + INTERNAL_ACTION_ID_DELIMITER + actionId; }
[ "public", "static", "String", "addInternalActionId", "(", "String", "actionId", ",", "String", "internalActionId", ")", "{", "if", "(", "actionId", "==", "null", ")", "{", "return", "internalActionId", "+", "INTERNAL_ACTION_ID_DELIMITER", ";", "}", "return", "inte...
Adds the internal action id to the given action id. @param actionId the action id as set by the user. @param internalActionId the internal action id to add. @return the action id prefixed by the internal action id suitable to be sent to Asterisk.
[ "Adds", "the", "internal", "action", "id", "to", "the", "given", "action", "id", "." ]
train
https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/internal/ManagerUtil.java#L123-L130
zaproxy/zaproxy
src/org/zaproxy/zap/view/StandardFieldsDialog.java
StandardFieldsDialog.addTableField
public void addTableField(String fieldLabel, JTable field, List<JButton> buttons) { """ Add a table field. @param fieldLabel If null then the table will be full width @param field the table field @param buttons if not null then the buttons will be added to the right of the table """ validateNotTabbed(); ...
java
public void addTableField(String fieldLabel, JTable field, List<JButton> buttons) { validateNotTabbed(); JScrollPane scrollPane = new JScrollPane(); scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); scrollPane.setViewportView(field); field.setFillsViewportHeight(true); // T...
[ "public", "void", "addTableField", "(", "String", "fieldLabel", ",", "JTable", "field", ",", "List", "<", "JButton", ">", "buttons", ")", "{", "validateNotTabbed", "(", ")", ";", "JScrollPane", "scrollPane", "=", "new", "JScrollPane", "(", ")", ";", "scrollP...
Add a table field. @param fieldLabel If null then the table will be full width @param field the table field @param buttons if not null then the buttons will be added to the right of the table
[ "Add", "a", "table", "field", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/StandardFieldsDialog.java#L900-L949
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/JobsInner.java
JobsInner.getOutputAsync
public Observable<InputStream> getOutputAsync(String resourceGroupName, String automationAccountName, String jobId) { """ Retrieve the job output identified by job id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param jobId The jo...
java
public Observable<InputStream> getOutputAsync(String resourceGroupName, String automationAccountName, String jobId) { return getOutputWithServiceResponseAsync(resourceGroupName, automationAccountName, jobId).map(new Func1<ServiceResponse<InputStream>, InputStream>() { @Override public In...
[ "public", "Observable", "<", "InputStream", ">", "getOutputAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "jobId", ")", "{", "return", "getOutputWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccoun...
Retrieve the job output identified by job id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param jobId The job id. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the InputStream object
[ "Retrieve", "the", "job", "output", "identified", "by", "job", "id", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/JobsInner.java#L146-L153
msgpack/msgpack-java
msgpack-core/src/main/java/org/msgpack/core/MessagePack.java
MessagePack.newDefaultUnpacker
public static MessageUnpacker newDefaultUnpacker(byte[] contents, int offset, int length) { """ Creates an unpacker that deserializes objects from subarray of a specified byte array. <p> This method provides an optimized implementation of <code>newDefaultUnpacker(new ByteArrayInputStream(contents, offset, length...
java
public static MessageUnpacker newDefaultUnpacker(byte[] contents, int offset, int length) { return DEFAULT_UNPACKER_CONFIG.newUnpacker(contents, offset, length); }
[ "public", "static", "MessageUnpacker", "newDefaultUnpacker", "(", "byte", "[", "]", "contents", ",", "int", "offset", ",", "int", "length", ")", "{", "return", "DEFAULT_UNPACKER_CONFIG", ".", "newUnpacker", "(", "contents", ",", "offset", ",", "length", ")", "...
Creates an unpacker that deserializes objects from subarray of a specified byte array. <p> This method provides an optimized implementation of <code>newDefaultUnpacker(new ByteArrayInputStream(contents, offset, length))</code>. <p> This method is equivalent to <code>DEFAULT_UNPACKER_CONFIG.newDefaultUnpacker(contents)<...
[ "Creates", "an", "unpacker", "that", "deserializes", "objects", "from", "subarray", "of", "a", "specified", "byte", "array", ".", "<p", ">", "This", "method", "provides", "an", "optimized", "implementation", "of", "<code", ">", "newDefaultUnpacker", "(", "new", ...
train
https://github.com/msgpack/msgpack-java/blob/16e370e348215a72a14c210b42d448d513aee015/msgpack-core/src/main/java/org/msgpack/core/MessagePack.java#L309-L312
Azure/azure-sdk-for-java
mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ServersInner.java
ServersInner.getByResourceGroup
public ServerInner getByResourceGroup(String resourceGroupName, String serverName) { """ Gets information about a server. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name o...
java
public ServerInner getByResourceGroup(String resourceGroupName, String serverName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, serverName).toBlocking().single().body(); }
[ "public", "ServerInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", ".", "toBlocking", "(", ")", ".", "single"...
Gets information about a server. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalArgumentException thrown if parameters fail the validation @throws C...
[ "Gets", "information", "about", "a", "server", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ServersInner.java#L615-L617