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
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/xml/AnnotationReader.java
AnnotationReader.hasAnnotation
public <A extends Annotation> boolean hasAnnotation(final Method method, final Class<A> annClass) { """ メソッドに付与されたアノテーションを持つか判定します。 @since 2.0 @param method 判定対象のメソッド @param annClass アノテーションのタイプ @return trueの場合、アノテーションを持ちます。 """ return getAnnotation(method, annClass) != null; }
java
public <A extends Annotation> boolean hasAnnotation(final Method method, final Class<A> annClass) { return getAnnotation(method, annClass) != null; }
[ "public", "<", "A", "extends", "Annotation", ">", "boolean", "hasAnnotation", "(", "final", "Method", "method", ",", "final", "Class", "<", "A", ">", "annClass", ")", "{", "return", "getAnnotation", "(", "method", ",", "annClass", ")", "!=", "null", ";", ...
メソッドに付与されたアノテーションを持つか判定します。 @since 2.0 @param method 判定対象のメソッド @param annClass アノテーションのタイプ @return trueの場合、アノテーションを持ちます。
[ "メソッドに付与されたアノテーションを持つか判定します。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/xml/AnnotationReader.java#L145-L147
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bcc/BccClient.java
BccClient.getSnapshot
public GetSnapshotResponse getSnapshot(GetSnapshotRequest request) { """ Getting the detail information of specified snapshot. @param request The request containing all options for getting the detail information of specified snapshot. @return The response with the snapshot detail information. """ c...
java
public GetSnapshotResponse getSnapshot(GetSnapshotRequest request) { checkNotNull(request, "request should not be null."); checkStringNotEmpty(request.getSnapshotId(), "request snapshotId should no be empty."); InternalRequest internalRequest = this.createRequest(request, HttpMet...
[ "public", "GetSnapshotResponse", "getSnapshot", "(", "GetSnapshotRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"request should not be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getSnapshotId", "(", ")", ",", "\"request snaps...
Getting the detail information of specified snapshot. @param request The request containing all options for getting the detail information of specified snapshot. @return The response with the snapshot detail information.
[ "Getting", "the", "detail", "information", "of", "specified", "snapshot", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bcc/BccClient.java#L1456-L1462
finmath/finmath-lib
src/main/java/net/finmath/montecarlo/interestrate/products/components/IndexedValue.java
IndexedValue.getValue
@Override public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException { """ This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value c...
java
@Override public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException { double evaluationTimeUnderlying = Math.max(evaluationTime, exerciseDate); RandomVariable underlyingValues = underlying.getValue(evaluationTimeUnderlying, model); RandomVariab...
[ "@", "Override", "public", "RandomVariable", "getValue", "(", "double", "evaluationTime", ",", "LIBORModelMonteCarloSimulationModel", "model", ")", "throws", "CalculationException", "{", "double", "evaluationTimeUnderlying", "=", "Math", ".", "max", "(", "evaluationTime",...
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. Cash flows prior evaluationTim...
[ "This", "method", "returns", "the", "value", "random", "variable", "of", "the", "product", "within", "the", "specified", "model", "evaluated", "at", "a", "given", "evalutationTime", ".", "Note", ":", "For", "a", "lattice", "this", "is", "often", "the", "valu...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/interestrate/products/components/IndexedValue.java#L73-L101
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/DocEnv.java
DocEnv.makeConstructorDoc
protected void makeConstructorDoc(MethodSymbol meth, TreePath treePath) { """ Create the ConstructorDoc for a MethodSymbol. Should be called only on symbols representing constructors. """ ConstructorDocImpl result = (ConstructorDocImpl)methodMap.get(meth); if (result != null) { if ...
java
protected void makeConstructorDoc(MethodSymbol meth, TreePath treePath) { ConstructorDocImpl result = (ConstructorDocImpl)methodMap.get(meth); if (result != null) { if (treePath != null) result.setTreePath(treePath); } else { result = new ConstructorDocImpl(this, meth, tr...
[ "protected", "void", "makeConstructorDoc", "(", "MethodSymbol", "meth", ",", "TreePath", "treePath", ")", "{", "ConstructorDocImpl", "result", "=", "(", "ConstructorDocImpl", ")", "methodMap", ".", "get", "(", "meth", ")", ";", "if", "(", "result", "!=", "null...
Create the ConstructorDoc for a MethodSymbol. Should be called only on symbols representing constructors.
[ "Create", "the", "ConstructorDoc", "for", "a", "MethodSymbol", ".", "Should", "be", "called", "only", "on", "symbols", "representing", "constructors", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/DocEnv.java#L688-L696
maestrano/maestrano-java
src/main/java/com/maestrano/Maestrano.java
Maestrano.autoConfigure
public static Map<String, Preset> autoConfigure() throws MnoConfigurationException { """ Method to fetch configuration from the dev-platform, using environment variable. The following variable must be set in the environment. <ul> <li>MNO_DEVPL_ENV_NAME</li> <li>MNO_DEVPL_ENV_KEY</li> <li>MNO_DEVPL_ENV_SECRE...
java
public static Map<String, Preset> autoConfigure() throws MnoConfigurationException { String host = MnoPropertiesHelper.readEnvironment("MNO_DEVPL_HOST", "https://developer.maestrano.com"); String apiPath = MnoPropertiesHelper.readEnvironment("MNO_DEVPL_API_PATH", "/api/config/v1"); String apiKey = MnoPropertiesHe...
[ "public", "static", "Map", "<", "String", ",", "Preset", ">", "autoConfigure", "(", ")", "throws", "MnoConfigurationException", "{", "String", "host", "=", "MnoPropertiesHelper", ".", "readEnvironment", "(", "\"MNO_DEVPL_HOST\"", ",", "\"https://developer.maestrano.com\...
Method to fetch configuration from the dev-platform, using environment variable. The following variable must be set in the environment. <ul> <li>MNO_DEVPL_ENV_NAME</li> <li>MNO_DEVPL_ENV_KEY</li> <li>MNO_DEVPL_ENV_SECRET</li> </ul> @throws MnoConfigurationException
[ "Method", "to", "fetch", "configuration", "from", "the", "dev", "-", "platform", "using", "environment", "variable", "." ]
train
https://github.com/maestrano/maestrano-java/blob/e71c6d3172d7645529d678d1cb3ea9e0a59de314/src/main/java/com/maestrano/Maestrano.java#L93-L99
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.retrieveCertificateActions
public List<CertificateOrderActionInner> retrieveCertificateActions(String resourceGroupName, String name) { """ Retrieve the list of certificate actions. Retrieve the list of certificate actions. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the certif...
java
public List<CertificateOrderActionInner> retrieveCertificateActions(String resourceGroupName, String name) { return retrieveCertificateActionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
[ "public", "List", "<", "CertificateOrderActionInner", ">", "retrieveCertificateActions", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "retrieveCertificateActionsWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "...
Retrieve the list of certificate actions. Retrieve the list of certificate actions. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the certificate order. @throws IllegalArgumentException thrown if parameters fail the validation @throws DefaultErrorResponseExcepti...
[ "Retrieve", "the", "list", "of", "certificate", "actions", ".", "Retrieve", "the", "list", "of", "certificate", "actions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L2234-L2236
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPManager.java
AMPManager.isActionSupported
public static boolean isActionSupported(XMPPConnection connection, AMPExtension.Action action) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Check if server supports specified action. @param connection active xmpp connection @param action action to check @retu...
java
public static boolean isActionSupported(XMPPConnection connection, AMPExtension.Action action) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { String featureName = AMPExtension.NAMESPACE + "?action=" + action.toString(); return isFeatureSupportedByServer(con...
[ "public", "static", "boolean", "isActionSupported", "(", "XMPPConnection", "connection", ",", "AMPExtension", ".", "Action", "action", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "String"...
Check if server supports specified action. @param connection active xmpp connection @param action action to check @return true if this action is supported. @throws XMPPErrorException @throws NoResponseException @throws NotConnectedException @throws InterruptedException
[ "Check", "if", "server", "supports", "specified", "action", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/amp/AMPManager.java#L93-L96
inferred/FreeBuilder
src/main/java/org/inferred/freebuilder/processor/source/QualifiedName.java
QualifiedName.of
public static QualifiedName of(String packageName, String topLevelType, String... nestedTypes) { """ Returns a {@link QualifiedName} for a type in {@code packageName}. If {@code nestedTypes} is empty, it is a top level type called {@code topLevelType}; otherwise, it is nested in that type. """ requireNon...
java
public static QualifiedName of(String packageName, String topLevelType, String... nestedTypes) { requireNonNull(!packageName.isEmpty()); checkArgument(!topLevelType.isEmpty()); return new QualifiedName( unshadedName(packageName), // shadowJar modifies string literals; unshade them here Immu...
[ "public", "static", "QualifiedName", "of", "(", "String", "packageName", ",", "String", "topLevelType", ",", "String", "...", "nestedTypes", ")", "{", "requireNonNull", "(", "!", "packageName", ".", "isEmpty", "(", ")", ")", ";", "checkArgument", "(", "!", "...
Returns a {@link QualifiedName} for a type in {@code packageName}. If {@code nestedTypes} is empty, it is a top level type called {@code topLevelType}; otherwise, it is nested in that type.
[ "Returns", "a", "{" ]
train
https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/src/main/java/org/inferred/freebuilder/processor/source/QualifiedName.java#L55-L61
lucee/Lucee
core/src/main/java/lucee/transformer/library/tag/TagLibEntityResolver.java
TagLibEntityResolver.resolveEntity
@Override public InputSource resolveEntity(String publicId, String systemId) { """ Laedt die DTD vom lokalen System. @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String, java.lang.String) """ for (int i = 0; i < Constants.DTDS_TLD.length; i++) { if (publicId.equals(Constants.DTDS_TLD[i...
java
@Override public InputSource resolveEntity(String publicId, String systemId) { for (int i = 0; i < Constants.DTDS_TLD.length; i++) { if (publicId.equals(Constants.DTDS_TLD[i])) { return new InputSource(getClass().getResourceAsStream(LUCEE_DTD_1_0)); } } if (publicId.equals("-//Sun Microsystems, Inc...
[ "@", "Override", "public", "InputSource", "resolveEntity", "(", "String", "publicId", ",", "String", "systemId", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "Constants", ".", "DTDS_TLD", ".", "length", ";", "i", "++", ")", "{", "if", "...
Laedt die DTD vom lokalen System. @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String, java.lang.String)
[ "Laedt", "die", "DTD", "vom", "lokalen", "System", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/tag/TagLibEntityResolver.java#L47-L63
biojava/biojava
biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/DisplayAFP.java
DisplayAFP.display
public static final StructureAlignmentJmol display(AFPChain afpChain,Group[] twistedGroups, Atom[] ca1, Atom[] ca2,List<Group> hetatms1, List<Group> hetatms2 ) throws StructureException { """ Note: ca2, hetatoms2 and nucleotides2 should not be rotated. This will be done here... """ List<Atom> twistedAs = ne...
java
public static final StructureAlignmentJmol display(AFPChain afpChain,Group[] twistedGroups, Atom[] ca1, Atom[] ca2,List<Group> hetatms1, List<Group> hetatms2 ) throws StructureException { List<Atom> twistedAs = new ArrayList<Atom>(); for ( Group g: twistedGroups){ if ( g == null ) continue; if ( g.size(...
[ "public", "static", "final", "StructureAlignmentJmol", "display", "(", "AFPChain", "afpChain", ",", "Group", "[", "]", "twistedGroups", ",", "Atom", "[", "]", "ca1", ",", "Atom", "[", "]", "ca2", ",", "List", "<", "Group", ">", "hetatms1", ",", "List", "...
Note: ca2, hetatoms2 and nucleotides2 should not be rotated. This will be done here...
[ "Note", ":", "ca2", "hetatoms2", "and", "nucleotides2", "should", "not", "be", "rotated", ".", "This", "will", "be", "done", "here", "..." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure-gui/src/main/java/org/biojava/nbio/structure/align/gui/DisplayAFP.java#L437-L477
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/serialize/write/XMLEmitter.java
XMLEmitter.onText
public void onText (@Nullable final String sText, final boolean bEscape) { """ Text node. @param sText The contained text @param bEscape If <code>true</code> the text should be XML masked (the default), <code>false</code> if not. The <code>false</code> case is especially interesting for HTML inline JS and ...
java
public void onText (@Nullable final String sText, final boolean bEscape) { if (bEscape) _appendMasked (EXMLCharMode.TEXT, sText); else _append (sText); }
[ "public", "void", "onText", "(", "@", "Nullable", "final", "String", "sText", ",", "final", "boolean", "bEscape", ")", "{", "if", "(", "bEscape", ")", "_appendMasked", "(", "EXMLCharMode", ".", "TEXT", ",", "sText", ")", ";", "else", "_append", "(", "sTe...
Text node. @param sText The contained text @param bEscape If <code>true</code> the text should be XML masked (the default), <code>false</code> if not. The <code>false</code> case is especially interesting for HTML inline JS and CSS code.
[ "Text", "node", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/serialize/write/XMLEmitter.java#L478-L484
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/groupschart/GroupsPieChart.java
GroupsPieChart.setChartState
public void setChartState(final List<Long> groupTargetCounts, final Long totalTargetsCount) { """ Updates the state of the chart @param groupTargetCounts list of target counts @param totalTargetsCount total count of targets that are represented by the pie """ getState().setGroupTargetCounts(group...
java
public void setChartState(final List<Long> groupTargetCounts, final Long totalTargetsCount) { getState().setGroupTargetCounts(groupTargetCounts); getState().setTotalTargetCount(totalTargetsCount); markAsDirty(); }
[ "public", "void", "setChartState", "(", "final", "List", "<", "Long", ">", "groupTargetCounts", ",", "final", "Long", "totalTargetsCount", ")", "{", "getState", "(", ")", ".", "setGroupTargetCounts", "(", "groupTargetCounts", ")", ";", "getState", "(", ")", "....
Updates the state of the chart @param groupTargetCounts list of target counts @param totalTargetsCount total count of targets that are represented by the pie
[ "Updates", "the", "state", "of", "the", "chart" ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/rollout/groupschart/GroupsPieChart.java#L32-L36
apereo/cas
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/principal/resolvers/PersonDirectoryPrincipalResolver.java
PersonDirectoryPrincipalResolver.extractPrincipalId
protected String extractPrincipalId(final Credential credential, final Optional<Principal> currentPrincipal) { """ Extracts the id of the user from the provided credential. This method should be overridden by subclasses to achieve more sophisticated strategies for producing a principal ID from a credential. @p...
java
protected String extractPrincipalId(final Credential credential, final Optional<Principal> currentPrincipal) { LOGGER.debug("Extracting credential id based on existing credential [{}]", credential); val id = credential.getId(); if (currentPrincipal != null && currentPrincipal.isPresent()) { ...
[ "protected", "String", "extractPrincipalId", "(", "final", "Credential", "credential", ",", "final", "Optional", "<", "Principal", ">", "currentPrincipal", ")", "{", "LOGGER", ".", "debug", "(", "\"Extracting credential id based on existing credential [{}]\"", ",", "crede...
Extracts the id of the user from the provided credential. This method should be overridden by subclasses to achieve more sophisticated strategies for producing a principal ID from a credential. @param credential the credential provided by the user. @param currentPrincipal the current principal @return the userna...
[ "Extracts", "the", "id", "of", "the", "user", "from", "the", "provided", "credential", ".", "This", "method", "should", "be", "overridden", "by", "subclasses", "to", "achieve", "more", "sophisticated", "strategies", "for", "producing", "a", "principal", "ID", ...
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/principal/resolvers/PersonDirectoryPrincipalResolver.java#L262-L282
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/io/ImageLoader.java
ImageLoader.loadImage
public static BufferedImage loadImage(String fileName, int imageType) { """ Tries to load Image from file and converts it to the desired image type if needed. <br> See {@link BufferedImage#BufferedImage(int, int, int)} for details on the available image types. @param fileName path to the image file @param i...
java
public static BufferedImage loadImage(String fileName, int imageType){ BufferedImage img = loadImage(fileName); if(img.getType() != imageType){ img = BufferedImageFactory.get(img, imageType); } return img; }
[ "public", "static", "BufferedImage", "loadImage", "(", "String", "fileName", ",", "int", "imageType", ")", "{", "BufferedImage", "img", "=", "loadImage", "(", "fileName", ")", ";", "if", "(", "img", ".", "getType", "(", ")", "!=", "imageType", ")", "{", ...
Tries to load Image from file and converts it to the desired image type if needed. <br> See {@link BufferedImage#BufferedImage(int, int, int)} for details on the available image types. @param fileName path to the image file @param imageType of the resulting BufferedImage @return loaded Image. @throws ImageLoaderExcept...
[ "Tries", "to", "load", "Image", "from", "file", "and", "converts", "it", "to", "the", "desired", "image", "type", "if", "needed", ".", "<br", ">", "See", "{", "@link", "BufferedImage#BufferedImage", "(", "int", "int", "int", ")", "}", "for", "details", "...
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/io/ImageLoader.java#L143-L149
phax/ph-web
ph-web/src/main/java/com/helger/web/fileupload/parse/DiskFileItem.java
DiskFileItem.getTempFile
@Nonnull protected File getTempFile () { """ Creates and returns a {@link File} representing a uniquely named temporary file in the configured repository path. The lifetime of the file is tied to the lifetime of the <code>FileItem</code> instance; the file will be deleted when the instance is garbage collecte...
java
@Nonnull protected File getTempFile () { if (m_aTempFile == null) { // If you manage to get more than 100 million of ids, you'll // start getting ids longer than 8 characters. final String sUniqueID = StringHelper.getLeadingZero (s_aTempFileCounter.getAndIncrement (), 8); final Strin...
[ "@", "Nonnull", "protected", "File", "getTempFile", "(", ")", "{", "if", "(", "m_aTempFile", "==", "null", ")", "{", "// If you manage to get more than 100 million of ids, you'll", "// start getting ids longer than 8 characters.", "final", "String", "sUniqueID", "=", "Strin...
Creates and returns a {@link File} representing a uniquely named temporary file in the configured repository path. The lifetime of the file is tied to the lifetime of the <code>FileItem</code> instance; the file will be deleted when the instance is garbage collected. @return The {@link File} to be used for temporary s...
[ "Creates", "and", "returns", "a", "{", "@link", "File", "}", "representing", "a", "uniquely", "named", "temporary", "file", "in", "the", "configured", "repository", "path", ".", "The", "lifetime", "of", "the", "file", "is", "tied", "to", "the", "lifetime", ...
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/fileupload/parse/DiskFileItem.java#L303-L315
actorapp/actor-platform
actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/tour/VerticalViewPager.java
VerticalViewPager.setPageTransformer
public void setPageTransformer(boolean reverseDrawingOrder, ViewPager.PageTransformer transformer) { """ Set a {@link ViewPager.PageTransformer} that will be called for each attached page whenever the scroll position is changed. This allows the application to apply custom property transformations to each page, o...
java
public void setPageTransformer(boolean reverseDrawingOrder, ViewPager.PageTransformer transformer) { if (Build.VERSION.SDK_INT >= 11) { final boolean hasTransformer = transformer != null; final boolean needsPopulate = hasTransformer != (mPageTransformer != null); mPageTransfo...
[ "public", "void", "setPageTransformer", "(", "boolean", "reverseDrawingOrder", ",", "ViewPager", ".", "PageTransformer", "transformer", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_INT", ">=", "11", ")", "{", "final", "boolean", "hasTransformer", "=",...
Set a {@link ViewPager.PageTransformer} that will be called for each attached page whenever the scroll position is changed. This allows the application to apply custom property transformations to each page, overriding the default sliding look and feel. <p/> <p><em>Note:</em> Prior to Android 3.0 the property animation ...
[ "Set", "a", "{", "@link", "ViewPager", ".", "PageTransformer", "}", "that", "will", "be", "called", "for", "each", "attached", "page", "whenever", "the", "scroll", "position", "is", "changed", ".", "This", "allows", "the", "application", "to", "apply", "cust...
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-app/src/main/java/im/actor/tour/VerticalViewPager.java#L472-L485
graphhopper/graphhopper
core/src/main/java/com/graphhopper/storage/BaseGraph.java
BaseGraph.initNodeRefs
void initNodeRefs(long oldCapacity, long newCapacity) { """ Initializes the node area with the empty edge value and default additional value. """ for (long pointer = oldCapacity + N_EDGE_REF; pointer < newCapacity; pointer += nodeEntryBytes) { nodes.setInt(pointer, EdgeIterator.NO_EDGE); ...
java
void initNodeRefs(long oldCapacity, long newCapacity) { for (long pointer = oldCapacity + N_EDGE_REF; pointer < newCapacity; pointer += nodeEntryBytes) { nodes.setInt(pointer, EdgeIterator.NO_EDGE); } if (extStorage.isRequireNodeField()) { for (long pointer = oldCapacity ...
[ "void", "initNodeRefs", "(", "long", "oldCapacity", ",", "long", "newCapacity", ")", "{", "for", "(", "long", "pointer", "=", "oldCapacity", "+", "N_EDGE_REF", ";", "pointer", "<", "newCapacity", ";", "pointer", "+=", "nodeEntryBytes", ")", "{", "nodes", "."...
Initializes the node area with the empty edge value and default additional value.
[ "Initializes", "the", "node", "area", "with", "the", "empty", "edge", "value", "and", "default", "additional", "value", "." ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/storage/BaseGraph.java#L258-L267
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java
PerspectiveOps.estimatePinhole
public static CameraPinhole estimatePinhole(Point2Transform2_F64 pixelToNorm , int width , int height ) { """ Given the transform from pixels to normalized image coordinates, create an approximate pinhole model for this camera. Assumes (cx,cy) is the image center and that there is no skew. @param pixelToNorm P...
java
public static CameraPinhole estimatePinhole(Point2Transform2_F64 pixelToNorm , int width , int height ) { Point2D_F64 normA = new Point2D_F64(); Point2D_F64 normB = new Point2D_F64(); Vector3D_F64 vectorA = new Vector3D_F64(); Vector3D_F64 vectorB = new Vector3D_F64(); pixelToNorm.compute(0,height/2,normA);...
[ "public", "static", "CameraPinhole", "estimatePinhole", "(", "Point2Transform2_F64", "pixelToNorm", ",", "int", "width", ",", "int", "height", ")", "{", "Point2D_F64", "normA", "=", "new", "Point2D_F64", "(", ")", ";", "Point2D_F64", "normB", "=", "new", "Point2...
Given the transform from pixels to normalized image coordinates, create an approximate pinhole model for this camera. Assumes (cx,cy) is the image center and that there is no skew. @param pixelToNorm Pixel coordinates into normalized image coordinates @param width Input image's width @param height Input image's height...
[ "Given", "the", "transform", "from", "pixels", "to", "normalized", "image", "coordinates", "create", "an", "approximate", "pinhole", "model", "for", "this", "camera", ".", "Assumes", "(", "cx", "cy", ")", "is", "the", "image", "center", "and", "that", "there...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java#L325-L354
apereo/cas
support/cas-server-support-logging-config-splunk/src/main/java/org/apereo/cas/logging/SplunkAppender.java
SplunkAppender.build
@PluginFactory public static SplunkAppender build(@PluginAttribute("name") final String name, @PluginElement("AppenderRef") final AppenderRef appenderRef, @PluginConfiguration final Configuration config) { """ Create appender. @pa...
java
@PluginFactory public static SplunkAppender build(@PluginAttribute("name") final String name, @PluginElement("AppenderRef") final AppenderRef appenderRef, @PluginConfiguration final Configuration config) { return new SplunkAppende...
[ "@", "PluginFactory", "public", "static", "SplunkAppender", "build", "(", "@", "PluginAttribute", "(", "\"name\"", ")", "final", "String", "name", ",", "@", "PluginElement", "(", "\"AppenderRef\"", ")", "final", "AppenderRef", "appenderRef", ",", "@", "PluginConfi...
Create appender. @param name the name @param appenderRef the appender ref @param config the config @return the appender
[ "Create", "appender", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-logging-config-splunk/src/main/java/org/apereo/cas/logging/SplunkAppender.java#L45-L50
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/EnvironmentSettingsInner.java
EnvironmentSettingsInner.stop
public void stop(String resourceGroupName, String labAccountName, String labName, String environmentSettingName) { """ Starts a template by starting all resources inside the template. This operation can take a while to complete. @param resourceGroupName The name of the resource group. @param labAccountName The...
java
public void stop(String resourceGroupName, String labAccountName, String labName, String environmentSettingName) { stopWithServiceResponseAsync(resourceGroupName, labAccountName, labName, environmentSettingName).toBlocking().last().body(); }
[ "public", "void", "stop", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "String", "labName", ",", "String", "environmentSettingName", ")", "{", "stopWithServiceResponseAsync", "(", "resourceGroupName", ",", "labAccountName", ",", "labName", ...
Starts a template by starting all resources inside the template. This operation can take a while to complete. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labName The name of the lab. @param environmentSettingName The name of the environment Setting...
[ "Starts", "a", "template", "by", "starting", "all", "resources", "inside", "the", "template", ".", "This", "operation", "can", "take", "a", "while", "to", "complete", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/EnvironmentSettingsInner.java#L1585-L1587
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java
TimeZoneFormat.setGMTOffsetPattern
public TimeZoneFormat setGMTOffsetPattern(GMTOffsetPatternType type, String pattern) { """ Sets the offset pattern for the given offset type. @param type the offset pattern. @param pattern the pattern string. @return this object. @throws IllegalArgumentException when the pattern string does not have required...
java
public TimeZoneFormat setGMTOffsetPattern(GMTOffsetPatternType type, String pattern) { if (isFrozen()) { throw new UnsupportedOperationException("Attempt to modify frozen object"); } if (pattern == null) { throw new NullPointerException("Null GMT offset pattern"); ...
[ "public", "TimeZoneFormat", "setGMTOffsetPattern", "(", "GMTOffsetPatternType", "type", ",", "String", "pattern", ")", "{", "if", "(", "isFrozen", "(", ")", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"Attempt to modify frozen object\"", ")", ";"...
Sets the offset pattern for the given offset type. @param type the offset pattern. @param pattern the pattern string. @return this object. @throws IllegalArgumentException when the pattern string does not have required time field letters. @throws UnsupportedOperationException when this object is frozen. @see #getGMTOf...
[ "Sets", "the", "offset", "pattern", "for", "the", "given", "offset", "type", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L584-L599
googleapis/google-cloud-java
google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java
ConfigClient.createExclusion
public final LogExclusion createExclusion(String parent, LogExclusion exclusion) { """ Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. <p>Sample code: <pre><code> try (ConfigClient configCli...
java
public final LogExclusion createExclusion(String parent, LogExclusion exclusion) { CreateExclusionRequest request = CreateExclusionRequest.newBuilder().setParent(parent).setExclusion(exclusion).build(); return createExclusion(request); }
[ "public", "final", "LogExclusion", "createExclusion", "(", "String", "parent", ",", "LogExclusion", "exclusion", ")", "{", "CreateExclusionRequest", "request", "=", "CreateExclusionRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", ")", ".", "...
Creates a new exclusion in a specified parent resource. Only log entries belonging to that resource can be excluded. You can have up to 10 exclusions in a resource. <p>Sample code: <pre><code> try (ConfigClient configClient = ConfigClient.create()) { ParentName parent = ProjectName.of("[PROJECT]"); LogExclusion exclu...
[ "Creates", "a", "new", "exclusion", "in", "a", "specified", "parent", "resource", ".", "Only", "log", "entries", "belonging", "to", "that", "resource", "can", "be", "excluded", ".", "You", "can", "have", "up", "to", "10", "exclusions", "in", "a", "resource...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java#L1147-L1152
inferred/FreeBuilder
src/main/java/org/inferred/freebuilder/processor/Analyser.java
Analyser.tryFindBuilder
private Optional<DeclaredType> tryFindBuilder( final QualifiedName superclass, TypeElement valueType) { """ Looks for a nested type in {@code valueType} called Builder, and verifies it extends the autogenerated {@code superclass}. <p>If the value type is generic, the builder type must match, and the retu...
java
private Optional<DeclaredType> tryFindBuilder( final QualifiedName superclass, TypeElement valueType) { TypeElement builderType = typesIn(valueType.getEnclosedElements()) .stream() .filter(element -> element.getSimpleName().contentEquals(USER_BUILDER_NAME)) .findAny() .orElse(n...
[ "private", "Optional", "<", "DeclaredType", ">", "tryFindBuilder", "(", "final", "QualifiedName", "superclass", ",", "TypeElement", "valueType", ")", "{", "TypeElement", "builderType", "=", "typesIn", "(", "valueType", ".", "getEnclosedElements", "(", ")", ")", "....
Looks for a nested type in {@code valueType} called Builder, and verifies it extends the autogenerated {@code superclass}. <p>If the value type is generic, the builder type must match, and the returned DeclaredType will be parameterized with the type variables from the <b>value type</b>, not the builder. (This makes t...
[ "Looks", "for", "a", "nested", "type", "in", "{", "@code", "valueType", "}", "called", "Builder", "and", "verifies", "it", "extends", "the", "autogenerated", "{", "@code", "superclass", "}", "." ]
train
https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/src/main/java/org/inferred/freebuilder/processor/Analyser.java#L332-L383
NoraUi/NoraUi
src/main/java/com/github/noraui/data/CommonDataProvider.java
CommonDataProvider.writeWarningResult
public void writeWarningResult(int line, String value) { """ Writes a warning result @param line The line number @param value The value """ logger.debug("Write Warning result => line:{} value:{}", line, value); writeValue(resultColumnName, line, value); }
java
public void writeWarningResult(int line, String value) { logger.debug("Write Warning result => line:{} value:{}", line, value); writeValue(resultColumnName, line, value); }
[ "public", "void", "writeWarningResult", "(", "int", "line", ",", "String", "value", ")", "{", "logger", ".", "debug", "(", "\"Write Warning result => line:{} value:{}\"", ",", "line", ",", "value", ")", ";", "writeValue", "(", "resultColumnName", ",", "line", ",...
Writes a warning result @param line The line number @param value The value
[ "Writes", "a", "warning", "result" ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/data/CommonDataProvider.java#L167-L170
TheHortonMachine/hortonmachine
apps/src/main/java/org/hortonmachine/style/JFontChooser.java
JFontChooser.showDialog
public Font showDialog(Component component, String title) { """ Shows a modal font-chooser dialog and blocks until the dialog is hidden. If the user presses the "OK" button, then this method hides/disposes the dialog and returns the selected color. If the user presses the "Cancel" button or closes the dialog w...
java
public Font showDialog(Component component, String title) { FontTracker ok = new FontTracker(this); JDialog dialog = createDialog(component, title, true, ok, null); dialog.addWindowListener(new FontChooserDialog.Closer()); dialog.addComponentListener(new FontChooserDialog.DisposeOnClose...
[ "public", "Font", "showDialog", "(", "Component", "component", ",", "String", "title", ")", "{", "FontTracker", "ok", "=", "new", "FontTracker", "(", "this", ")", ";", "JDialog", "dialog", "=", "createDialog", "(", "component", ",", "title", ",", "true", "...
Shows a modal font-chooser dialog and blocks until the dialog is hidden. If the user presses the "OK" button, then this method hides/disposes the dialog and returns the selected color. If the user presses the "Cancel" button or closes the dialog without pressing "OK", then this method hides/disposes the dialog and ret...
[ "Shows", "a", "modal", "font", "-", "chooser", "dialog", "and", "blocks", "until", "the", "dialog", "is", "hidden", ".", "If", "the", "user", "presses", "the", "OK", "button", "then", "this", "method", "hides", "/", "disposes", "the", "dialog", "and", "r...
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/apps/src/main/java/org/hortonmachine/style/JFontChooser.java#L143-L153
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/snmp_user.java
snmp_user.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> """ snmp_user_responses result = (snmp_user_responses) service.get_payload_...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { snmp_user_responses result = (snmp_user_responses) service.get_payload_formatter().string_to_resource(snmp_user_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == SESS...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "snmp_user_responses", "result", "=", "(", "snmp_user_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/mps/snmp_user.java#L494-L511
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/ChatApi.java
ChatApi.sendMessage
public ApiSuccessResponse sendMessage(String id, AcceptData1 acceptData) throws ApiException { """ Send a message Send a message to participants in the specified chat. @param id The ID of the chat interaction. (required) @param acceptData Request parameters. (optional) @return ApiSuccessResponse @throws ApiEx...
java
public ApiSuccessResponse sendMessage(String id, AcceptData1 acceptData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = sendMessageWithHttpInfo(id, acceptData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "sendMessage", "(", "String", "id", ",", "AcceptData1", "acceptData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "sendMessageWithHttpInfo", "(", "id", ",", "acceptData", ")", ";", ...
Send a message Send a message to participants in the specified chat. @param id The ID of the chat interaction. (required) @param acceptData Request parameters. (optional) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Send", "a", "message", "Send", "a", "message", "to", "participants", "in", "the", "specified", "chat", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/ChatApi.java#L1572-L1575
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/Table.java
Table.flushAllAvailableRows
public void flushAllAvailableRows(final XMLUtil util, final Appendable appendable) throws IOException { """ Open the table, flush all rows from start, but do not freeze the table @param util a XMLUtil instance for writing XML @param appendable where to write @throws IOException if an I/O er...
java
public void flushAllAvailableRows(final XMLUtil util, final Appendable appendable) throws IOException { this.appender.flushAllAvailableRows(util, appendable); }
[ "public", "void", "flushAllAvailableRows", "(", "final", "XMLUtil", "util", ",", "final", "Appendable", "appendable", ")", "throws", "IOException", "{", "this", ".", "appender", ".", "flushAllAvailableRows", "(", "util", ",", "appendable", ")", ";", "}" ]
Open the table, flush all rows from start, but do not freeze the table @param util a XMLUtil instance for writing XML @param appendable where to write @throws IOException if an I/O error occurs during the flush
[ "Open", "the", "table", "flush", "all", "rows", "from", "start", "but", "do", "not", "freeze", "the", "table" ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/Table.java#L136-L139
structurizr/java
structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java
DocumentationTemplate.addSection
@Nonnull public Section addSection(SoftwareSystem softwareSystem, String title, File... files) throws IOException { """ Adds a section relating to a {@link SoftwareSystem} from one or more files. @param softwareSystem the {@link SoftwareSystem} the documentation content relates to @param title ...
java
@Nonnull public Section addSection(SoftwareSystem softwareSystem, String title, File... files) throws IOException { return add(softwareSystem, title, files); }
[ "@", "Nonnull", "public", "Section", "addSection", "(", "SoftwareSystem", "softwareSystem", ",", "String", "title", ",", "File", "...", "files", ")", "throws", "IOException", "{", "return", "add", "(", "softwareSystem", ",", "title", ",", "files", ")", ";", ...
Adds a section relating to a {@link SoftwareSystem} from one or more files. @param softwareSystem the {@link SoftwareSystem} the documentation content relates to @param title the section title @param files one or more File objects that point to the documentation content @return ...
[ "Adds", "a", "section", "relating", "to", "a", "{", "@link", "SoftwareSystem", "}", "from", "one", "or", "more", "files", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java#L73-L76
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java
NodeSet.insertElementAt
public void insertElementAt(Node value, int at) { """ Inserts the specified node in this vector at the specified index. Each component in this vector with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously. @param value Node to ins...
java
public void insertElementAt(Node value, int at) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!"); if (null == m_map) { m_map = new Node[m_blocksize]; m_mapSize = m_blocksize;...
[ "public", "void", "insertElementAt", "(", "Node", "value", ",", "int", "at", ")", "{", "if", "(", "!", "m_mutable", ")", "throw", "new", "RuntimeException", "(", "XSLMessages", ".", "createXPATHMessage", "(", "XPATHErrorResources", ".", "ER_NODESET_NOT_MUTABLE", ...
Inserts the specified node in this vector at the specified index. Each component in this vector with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously. @param value Node to insert @param at Position where to insert
[ "Inserts", "the", "specified", "node", "in", "this", "vector", "at", "the", "specified", "index", ".", "Each", "component", "in", "this", "vector", "with", "an", "index", "greater", "or", "equal", "to", "the", "specified", "index", "is", "shifted", "upward",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java#L1102-L1131
willowtreeapps/Hyperion-Android
hyperion-phoenix/src/main/java/com/willowtreeapps/hyperion/phoenix/ProcessPhoenix.java
ProcessPhoenix.triggerRebirth
public static void triggerRebirth(Context context, Intent... nextIntents) { """ Call to restart the application process using the specified intents. <p> Behavior of the current process after invoking this method is undefined. """ Intent intent = new Intent(context, ProcessPhoenix.class); inte...
java
public static void triggerRebirth(Context context, Intent... nextIntents) { Intent intent = new Intent(context, ProcessPhoenix.class); intent.addFlags(FLAG_ACTIVITY_NEW_TASK); // In case we are called with non-Activity context. intent.putParcelableArrayListExtra(KEY_RESTART_INTENTS, new ArrayLis...
[ "public", "static", "void", "triggerRebirth", "(", "Context", "context", ",", "Intent", "...", "nextIntents", ")", "{", "Intent", "intent", "=", "new", "Intent", "(", "context", ",", "ProcessPhoenix", ".", "class", ")", ";", "intent", ".", "addFlags", "(", ...
Call to restart the application process using the specified intents. <p> Behavior of the current process after invoking this method is undefined.
[ "Call", "to", "restart", "the", "application", "process", "using", "the", "specified", "intents", ".", "<p", ">", "Behavior", "of", "the", "current", "process", "after", "invoking", "this", "method", "is", "undefined", "." ]
train
https://github.com/willowtreeapps/Hyperion-Android/blob/1910f53869a53f1395ba90588a0b4db7afdec79c/hyperion-phoenix/src/main/java/com/willowtreeapps/hyperion/phoenix/ProcessPhoenix.java#L61-L72
LearnLib/automatalib
util/src/main/java/net/automatalib/util/automata/fsa/DFAs.java
DFAs.isPrefixClosed
public static <S, I> boolean isPrefixClosed(DFA<S, I> dfa, Alphabet<I> alphabet) { """ Computes whether the language of the given DFA is prefix-closed. Assumes all states in the given {@link DFA} are reachable from the initial state. @param dfa the DFA to check @param alphabet the Alphabet @param <S> the t...
java
public static <S, I> boolean isPrefixClosed(DFA<S, I> dfa, Alphabet<I> alphabet) { return dfa.getStates() .parallelStream() .allMatch(s -> dfa.isAccepting(s) || alphabet.parallelStream().noneMatch(i -> dfa.isAccepting(dfa.getSuccessors(s, i)))...
[ "public", "static", "<", "S", ",", "I", ">", "boolean", "isPrefixClosed", "(", "DFA", "<", "S", ",", "I", ">", "dfa", ",", "Alphabet", "<", "I", ">", "alphabet", ")", "{", "return", "dfa", ".", "getStates", "(", ")", ".", "parallelStream", "(", ")"...
Computes whether the language of the given DFA is prefix-closed. Assumes all states in the given {@link DFA} are reachable from the initial state. @param dfa the DFA to check @param alphabet the Alphabet @param <S> the type of state @param <I> the type of input @return whether the DFA is prefix-closed.
[ "Computes", "whether", "the", "language", "of", "the", "given", "DFA", "is", "prefix", "-", "closed", "." ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/automata/fsa/DFAs.java#L384-L389
EasyinnovaSL/Tiff-Library-4J
src/main/java/com/easyinnova/tiff/profiles/TiffITProfile.java
TiffITProfile.checkRequiredTag
private boolean checkRequiredTag(IfdTags metadata, String tagName, int cardinality) { """ Check a required tag is present. @param metadata the metadata @param tagName the name of the mandatory tag @param cardinality the mandatory cardinality @return true, if tag is present """ return checkRequiredTag...
java
private boolean checkRequiredTag(IfdTags metadata, String tagName, int cardinality) { return checkRequiredTag(metadata, tagName, cardinality, null); }
[ "private", "boolean", "checkRequiredTag", "(", "IfdTags", "metadata", ",", "String", "tagName", ",", "int", "cardinality", ")", "{", "return", "checkRequiredTag", "(", "metadata", ",", "tagName", ",", "cardinality", ",", "null", ")", ";", "}" ]
Check a required tag is present. @param metadata the metadata @param tagName the name of the mandatory tag @param cardinality the mandatory cardinality @return true, if tag is present
[ "Check", "a", "required", "tag", "is", "present", "." ]
train
https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/profiles/TiffITProfile.java#L661-L663
NordicSemiconductor/Android-DFU-Library
dfu/src/main/java/no/nordicsemi/android/dfu/DfuServiceInitiator.java
DfuServiceInitiator.setZip
public DfuServiceInitiator setZip(@RawRes final int rawResId) { """ Sets the resource ID of the Distribution packet (ZIP) or the a ZIP file matching the deprecated naming convention. The file should be in the /res/raw folder. @param rawResId file's resource ID @return the builder @see #setZip(Uri) @see #set...
java
public DfuServiceInitiator setZip(@RawRes final int rawResId) { return init(null, null, rawResId, DfuBaseService.TYPE_AUTO, DfuBaseService.MIME_TYPE_ZIP); }
[ "public", "DfuServiceInitiator", "setZip", "(", "@", "RawRes", "final", "int", "rawResId", ")", "{", "return", "init", "(", "null", ",", "null", ",", "rawResId", ",", "DfuBaseService", ".", "TYPE_AUTO", ",", "DfuBaseService", ".", "MIME_TYPE_ZIP", ")", ";", ...
Sets the resource ID of the Distribution packet (ZIP) or the a ZIP file matching the deprecated naming convention. The file should be in the /res/raw folder. @param rawResId file's resource ID @return the builder @see #setZip(Uri) @see #setZip(String)
[ "Sets", "the", "resource", "ID", "of", "the", "Distribution", "packet", "(", "ZIP", ")", "or", "the", "a", "ZIP", "file", "matching", "the", "deprecated", "naming", "convention", ".", "The", "file", "should", "be", "in", "the", "/", "res", "/", "raw", ...
train
https://github.com/NordicSemiconductor/Android-DFU-Library/blob/ec14c8c522bebe801a9a4c3dfbbeb1f53262c03f/dfu/src/main/java/no/nordicsemi/android/dfu/DfuServiceInitiator.java#L591-L593
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/Serializer.java
Serializer.readById
@SuppressWarnings("unchecked") private <T> T readById(int id, BufferInput<?> buffer) { """ Reads a serializable object. @param id The serializable type ID. @param buffer The buffer from which to read the object. @param <T> The object type. @return The read object. """ Class<T> type = (Class<T>) reg...
java
@SuppressWarnings("unchecked") private <T> T readById(int id, BufferInput<?> buffer) { Class<T> type = (Class<T>) registry.type(id); if (type == null) throw new SerializationException("cannot deserialize: unknown type"); TypeSerializer<T> serializer = getSerializer(type); if (serializer == null...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "T", ">", "T", "readById", "(", "int", "id", ",", "BufferInput", "<", "?", ">", "buffer", ")", "{", "Class", "<", "T", ">", "type", "=", "(", "Class", "<", "T", ">", ")", "registry...
Reads a serializable object. @param id The serializable type ID. @param buffer The buffer from which to read the object. @param <T> The object type. @return The read object.
[ "Reads", "a", "serializable", "object", "." ]
train
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/Serializer.java#L1030-L1041
eclipse/xtext-core
org.eclipse.xtext.xtext.generator/src/org/eclipse/xtext/xtext/generator/parser/antlr/splitting/AntlrCodeQualityHelper.java
AntlrCodeQualityHelper.removeDuplicateBitsets
public String removeDuplicateBitsets(String javaContent, AntlrOptions options) { """ Remove duplicate bitset declarations to reduce the size of the static initializer but keep the bitsets that match the given pattern with a normalized name. """ if (!options.isOptimizeCodeQuality()) { return javaContent; ...
java
public String removeDuplicateBitsets(String javaContent, AntlrOptions options) { if (!options.isOptimizeCodeQuality()) { return javaContent; } return removeDuplicateFields(javaContent, followsetPattern, 1, 2, "\\bFOLLOW_\\w+\\b", "FOLLOW_%d", options.getKeptBitSetsPattern(), options.getKeptBitSetName()); }
[ "public", "String", "removeDuplicateBitsets", "(", "String", "javaContent", ",", "AntlrOptions", "options", ")", "{", "if", "(", "!", "options", ".", "isOptimizeCodeQuality", "(", ")", ")", "{", "return", "javaContent", ";", "}", "return", "removeDuplicateFields",...
Remove duplicate bitset declarations to reduce the size of the static initializer but keep the bitsets that match the given pattern with a normalized name.
[ "Remove", "duplicate", "bitset", "declarations", "to", "reduce", "the", "size", "of", "the", "static", "initializer", "but", "keep", "the", "bitsets", "that", "match", "the", "given", "pattern", "with", "a", "normalized", "name", "." ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.xtext.generator/src/org/eclipse/xtext/xtext/generator/parser/antlr/splitting/AntlrCodeQualityHelper.java#L67-L73
bwkimmel/java-util
src/main/java/ca/eandb/util/FloatArray.java
FloatArray.addAll
public boolean addAll(int index, float[] items) { """ Inserts values into the array at the specified index. @param index The index at which to insert the new values. @param items An array of values to insert. @return A value indicating if the array has changed. @throws IndexOutOfBoundsException if <code>i...
java
public boolean addAll(int index, float[] items) { if (index < 0 || index > size) { throw new IndexOutOfBoundsException(); } ensureCapacity(size + items.length); if (index < size) { for (int i = size - 1; i >= index; i--) { elements[i + items.length] = elements[i]; } } f...
[ "public", "boolean", "addAll", "(", "int", "index", ",", "float", "[", "]", "items", ")", "{", "if", "(", "index", "<", "0", "||", "index", ">", "size", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", ")", ";", "}", "ensureCapacity", "(", ...
Inserts values into the array at the specified index. @param index The index at which to insert the new values. @param items An array of values to insert. @return A value indicating if the array has changed. @throws IndexOutOfBoundsException if <code>index &lt; 0 || index &gt; size()</code>.
[ "Inserts", "values", "into", "the", "array", "at", "the", "specified", "index", "." ]
train
https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/FloatArray.java#L429-L444
ozimov/cirneco
hamcrest/guava-hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/guava/collect/IsMultimapKeyWithCollectionSize.java
IsMultimapKeyWithCollectionSize.keyWithSize
public static <K> Matcher<Multimap<K, ?>> keyWithSize(final K element, final int size) { """ Creates a matcher for {@linkplain Multimap} matching when the examined object <code>K</code> in the key set has <code>size</code> elements in the retained {@linkplain Collection}. """ return new IsMultimapKeyW...
java
public static <K> Matcher<Multimap<K, ?>> keyWithSize(final K element, final int size) { return new IsMultimapKeyWithCollectionSize(element, size); }
[ "public", "static", "<", "K", ">", "Matcher", "<", "Multimap", "<", "K", ",", "?", ">", ">", "keyWithSize", "(", "final", "K", "element", ",", "final", "int", "size", ")", "{", "return", "new", "IsMultimapKeyWithCollectionSize", "(", "element", ",", "siz...
Creates a matcher for {@linkplain Multimap} matching when the examined object <code>K</code> in the key set has <code>size</code> elements in the retained {@linkplain Collection}.
[ "Creates", "a", "matcher", "for", "{" ]
train
https://github.com/ozimov/cirneco/blob/78ad782da0a2256634cfbebb2f97ed78c993b999/hamcrest/guava-hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/guava/collect/IsMultimapKeyWithCollectionSize.java#L28-L30
tommyettinger/RegExodus
src/main/java/regexodus/CharacterClass.java
CharacterClass.printRealm
private static void printRealm(ArrayList<String> realm, String name) { """ /* int[][] data=new int[CATEGORY_COUNT][BLOCK_SIZE+2]; for(int i=Character.MIN_VALUE;i<=Character.MAX_VALUE;i++){ int cat=Character.getType((char)i); data[cat][BLOCK_SIZE]++; int b=(i>>8)&0xff; if(data[cat][b]==0){ data[cat][b]=1; d...
java
private static void printRealm(ArrayList<String> realm, String name) { System.out.println(name + ":"); for (String s : realm) { System.out.println(" " + s); } }
[ "private", "static", "void", "printRealm", "(", "ArrayList", "<", "String", ">", "realm", ",", "String", "name", ")", "{", "System", ".", "out", ".", "println", "(", "name", "+", "\":\"", ")", ";", "for", "(", "String", "s", ":", "realm", ")", "{", ...
/* int[][] data=new int[CATEGORY_COUNT][BLOCK_SIZE+2]; for(int i=Character.MIN_VALUE;i<=Character.MAX_VALUE;i++){ int cat=Character.getType((char)i); data[cat][BLOCK_SIZE]++; int b=(i>>8)&0xff; if(data[cat][b]==0){ data[cat][b]=1; data[cat][BLOCK_SIZE+1]++; } } for(int i=0;i<CATEGORY_COUNT;i++){ System.out.print(unicod...
[ "/", "*", "int", "[]", "[]", "data", "=", "new", "int", "[", "CATEGORY_COUNT", "]", "[", "BLOCK_SIZE", "+", "2", "]", ";", "for", "(", "int", "i", "=", "Character", ".", "MIN_VALUE", ";", "i<", "=", "Character", ".", "MAX_VALUE", ";", "i", "++", ...
train
https://github.com/tommyettinger/RegExodus/blob/d4af9bb7c132c5f9d29f45b76121f93b2f89de16/src/main/java/regexodus/CharacterClass.java#L866-L871
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.executeStatusUpdateRequestAsync
@Deprecated public static RequestAsyncTask executeStatusUpdateRequestAsync(Session session, String message, Callback callback) { """ Starts a new Request configured to post a status update to a user's feed. <p/> This should only be called from the UI thread. This method is deprecated. Prefer to call Reque...
java
@Deprecated public static RequestAsyncTask executeStatusUpdateRequestAsync(Session session, String message, Callback callback) { return newStatusUpdateRequest(session, message, callback).executeAsync(); }
[ "@", "Deprecated", "public", "static", "RequestAsyncTask", "executeStatusUpdateRequestAsync", "(", "Session", "session", ",", "String", "message", ",", "Callback", "callback", ")", "{", "return", "newStatusUpdateRequest", "(", "session", ",", "message", ",", "callback...
Starts a new Request configured to post a status update to a user's feed. <p/> This should only be called from the UI thread. This method is deprecated. Prefer to call Request.newStatusUpdateRequest(...).executeAsync(); @param session the Session to use, or null; if non-null, the session must be in an opened state @p...
[ "Starts", "a", "new", "Request", "configured", "to", "post", "a", "status", "update", "to", "a", "user", "s", "feed", ".", "<p", "/", ">", "This", "should", "only", "be", "called", "from", "the", "UI", "thread", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L1244-L1247
op4j/op4j
src/main/java/org/op4j/Op.java
Op.onArray
public static <T> Level0ArrayOperator<Date[],Date> onArray(final Date[] target) { """ <p> Creates an <i>operation expression</i> on the specified target object. </p> @param target the target object on which the expression will execute @return an operator, ready for chaining """ return onArrayOf(...
java
public static <T> Level0ArrayOperator<Date[],Date> onArray(final Date[] target) { return onArrayOf(Types.DATE, target); }
[ "public", "static", "<", "T", ">", "Level0ArrayOperator", "<", "Date", "[", "]", ",", "Date", ">", "onArray", "(", "final", "Date", "[", "]", "target", ")", "{", "return", "onArrayOf", "(", "Types", ".", "DATE", ",", "target", ")", ";", "}" ]
<p> Creates an <i>operation expression</i> on the specified target object. </p> @param target the target object on which the expression will execute @return an operator, ready for chaining
[ "<p", ">", "Creates", "an", "<i", ">", "operation", "expression<", "/", "i", ">", "on", "the", "specified", "target", "object", ".", "<", "/", "p", ">" ]
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/Op.java#L819-L821
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java
LocaleFormatter.getFormatted
@Nonnull public static String getFormatted (@Nonnull final BigDecimal aValue, @Nonnull final Locale aDisplayLocale) { """ Format the passed value according to the rules specified by the given locale. All calls to {@link BigDecimal#toString()} that are displayed to the user should instead use this method. By de...
java
@Nonnull public static String getFormatted (@Nonnull final BigDecimal aValue, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aValue, "Value"); ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale"); return NumberFormat.getInstance (aDisplayLocale).format (aValue); }
[ "@", "Nonnull", "public", "static", "String", "getFormatted", "(", "@", "Nonnull", "final", "BigDecimal", "aValue", ",", "@", "Nonnull", "final", "Locale", "aDisplayLocale", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aValue", ",", "\"Value\"", ")", ";", ...
Format the passed value according to the rules specified by the given locale. All calls to {@link BigDecimal#toString()} that are displayed to the user should instead use this method. By default a maximum of 3 fraction digits are shown. @param aValue The value to be formatted. May not be <code>null</code>. @param aDis...
[ "Format", "the", "passed", "value", "according", "to", "the", "rules", "specified", "by", "the", "given", "locale", ".", "All", "calls", "to", "{", "@link", "BigDecimal#toString", "()", "}", "that", "are", "displayed", "to", "the", "user", "should", "instead...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/locale/LocaleFormatter.java#L134-L141
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesClient.java
EntityTypesClient.updateEntityType
public final EntityType updateEntityType(EntityType entityType, String languageCode) { """ Updates the specified entity type. <p>Sample code: <pre><code> try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { EntityType entityType = EntityType.newBuilder().build(); String languageCode = ...
java
public final EntityType updateEntityType(EntityType entityType, String languageCode) { UpdateEntityTypeRequest request = UpdateEntityTypeRequest.newBuilder() .setEntityType(entityType) .setLanguageCode(languageCode) .build(); return updateEntityType(request); }
[ "public", "final", "EntityType", "updateEntityType", "(", "EntityType", "entityType", ",", "String", "languageCode", ")", "{", "UpdateEntityTypeRequest", "request", "=", "UpdateEntityTypeRequest", ".", "newBuilder", "(", ")", ".", "setEntityType", "(", "entityType", "...
Updates the specified entity type. <p>Sample code: <pre><code> try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { EntityType entityType = EntityType.newBuilder().build(); String languageCode = ""; EntityType response = entityTypesClient.updateEntityType(entityType, languageCode); } </code></pre>...
[ "Updates", "the", "specified", "entity", "type", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesClient.java#L768-L776
jianlins/FastContext
src/main/java/edu/utah/bmi/nlp/fastcontext/uima/FastContext_General_AE.java
FastContext_General_AE.getTypeDefinitions
@Deprecated public static HashMap<String, TypeDefinition> getTypeDefinitions(String ruleStr, boolean caseInsensitive) { """ Because implement a reinforced interface method (static is not reinforced), this is deprecated, just to enable back-compatibility. @param ruleStr Rule file path or rule conten...
java
@Deprecated public static HashMap<String, TypeDefinition> getTypeDefinitions(String ruleStr, boolean caseInsensitive) { return new FastContextUIMA(ruleStr, caseInsensitive).getTypeDefinitions(); }
[ "@", "Deprecated", "public", "static", "HashMap", "<", "String", ",", "TypeDefinition", ">", "getTypeDefinitions", "(", "String", "ruleStr", ",", "boolean", "caseInsensitive", ")", "{", "return", "new", "FastContextUIMA", "(", "ruleStr", ",", "caseInsensitive", ")...
Because implement a reinforced interface method (static is not reinforced), this is deprecated, just to enable back-compatibility. @param ruleStr Rule file path or rule content string @param caseInsensitive whether to parse the rule in case-insensitive manner @return Type name--Type definition map
[ "Because", "implement", "a", "reinforced", "interface", "method", "(", "static", "is", "not", "reinforced", ")", "this", "is", "deprecated", "just", "to", "enable", "back", "-", "compatibility", "." ]
train
https://github.com/jianlins/FastContext/blob/e3f7cfa7e6eb69bbeb49a51021d8ec5613654fc8/src/main/java/edu/utah/bmi/nlp/fastcontext/uima/FastContext_General_AE.java#L345-L348
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/Parameters.java
Parameters.setFloat
@NonNull public Parameters setFloat(@NonNull String name, float value) { """ Set a float value to the query parameter referenced by the given name. A query parameter is defined by using the Expression's parameter(String name) function. @param name The parameter name. @param value The float value. @retur...
java
@NonNull public Parameters setFloat(@NonNull String name, float value) { return setValue(name, value); }
[ "@", "NonNull", "public", "Parameters", "setFloat", "(", "@", "NonNull", "String", "name", ",", "float", "value", ")", "{", "return", "setValue", "(", "name", ",", "value", ")", ";", "}" ]
Set a float value to the query parameter referenced by the given name. A query parameter is defined by using the Expression's parameter(String name) function. @param name The parameter name. @param value The float value. @return The self object.
[ "Set", "a", "float", "value", "to", "the", "query", "parameter", "referenced", "by", "the", "given", "name", ".", "A", "query", "parameter", "is", "defined", "by", "using", "the", "Expression", "s", "parameter", "(", "String", "name", ")", "function", "." ...
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/Parameters.java#L131-L134
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java
FileSystem.makeRelative
private static File makeRelative(File filenameToMakeRelative, File rootPath, boolean appendCurrentDirectorySymbol) throws IOException { """ Make the given filename relative to the given root path. @param filenameToMakeRelative is the name to make relative. @param rootPath is the root path from which the rel...
java
private static File makeRelative(File filenameToMakeRelative, File rootPath, boolean appendCurrentDirectorySymbol) throws IOException { if (filenameToMakeRelative == null || rootPath == null) { throw new IllegalArgumentException(); } if (!filenameToMakeRelative.isAbsolute()) { return filenameToMakeRela...
[ "private", "static", "File", "makeRelative", "(", "File", "filenameToMakeRelative", ",", "File", "rootPath", ",", "boolean", "appendCurrentDirectorySymbol", ")", "throws", "IOException", "{", "if", "(", "filenameToMakeRelative", "==", "null", "||", "rootPath", "==", ...
Make the given filename relative to the given root path. @param filenameToMakeRelative is the name to make relative. @param rootPath is the root path from which the relative path will be set. @param appendCurrentDirectorySymbol indicates if "./" should be append at the begining of the relative filename. @return a rela...
[ "Make", "the", "given", "filename", "relative", "to", "the", "given", "root", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/FileSystem.java#L2729-L2755
motown-io/motown
chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java
DomainService.deleteEvse
public void deleteEvse(Long chargingStationTypeId, Long id) { """ Delete an evse. @param chargingStationTypeId charging station identifier. @param id the id of the evse to delete. """ ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationT...
java
public void deleteEvse(Long chargingStationTypeId, Long id) { ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId); chargingStationType.getEvses().remove(getEvseById(chargingStationType, id)); updateChargingStationType(chargingStationType.getId...
[ "public", "void", "deleteEvse", "(", "Long", "chargingStationTypeId", ",", "Long", "id", ")", "{", "ChargingStationType", "chargingStationType", "=", "chargingStationTypeRepository", ".", "findOne", "(", "chargingStationTypeId", ")", ";", "chargingStationType", ".", "ge...
Delete an evse. @param chargingStationTypeId charging station identifier. @param id the id of the evse to delete.
[ "Delete", "an", "evse", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java#L304-L310
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/MBlockPos.java
MBlockPos.fromLong
public static MBlockPos fromLong(long serialized) { """ Create a BlockPos from a serialized long value (created by toLong) """ int j = (int) (serialized << 64 - X_SHIFT - NUM_X_BITS >> 64 - NUM_X_BITS); int k = (int) (serialized << 64 - Y_SHIFT - NUM_Y_BITS >> 64 - NUM_Y_BITS); int l = (int) (serialized ...
java
public static MBlockPos fromLong(long serialized) { int j = (int) (serialized << 64 - X_SHIFT - NUM_X_BITS >> 64 - NUM_X_BITS); int k = (int) (serialized << 64 - Y_SHIFT - NUM_Y_BITS >> 64 - NUM_Y_BITS); int l = (int) (serialized << 64 - NUM_Z_BITS >> 64 - NUM_Z_BITS); return new MBlockPos(j, k, l); }
[ "public", "static", "MBlockPos", "fromLong", "(", "long", "serialized", ")", "{", "int", "j", "=", "(", "int", ")", "(", "serialized", "<<", "64", "-", "X_SHIFT", "-", "NUM_X_BITS", ">>", "64", "-", "NUM_X_BITS", ")", ";", "int", "k", "=", "(", "int"...
Create a BlockPos from a serialized long value (created by toLong)
[ "Create", "a", "BlockPos", "from", "a", "serialized", "long", "value", "(", "created", "by", "toLong", ")" ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/MBlockPos.java#L303-L309
google/closure-templates
java/src/com/google/template/soy/jssrc/internal/JsSrcMain.java
JsSrcMain.genJsSrc
public List<String> genJsSrc( SoyFileSetNode soyTree, TemplateRegistry templateRegistry, SoyJsSrcOptions jsSrcOptions, @Nullable SoyMsgBundle msgBundle, ErrorReporter errorReporter) { """ Generates JS source code given a Soy parse tree, an options object, and an optional bundle of tr...
java
public List<String> genJsSrc( SoyFileSetNode soyTree, TemplateRegistry templateRegistry, SoyJsSrcOptions jsSrcOptions, @Nullable SoyMsgBundle msgBundle, ErrorReporter errorReporter) { // VeLogInstrumentationVisitor add html attributes for {velog} commands and also run desugaring /...
[ "public", "List", "<", "String", ">", "genJsSrc", "(", "SoyFileSetNode", "soyTree", ",", "TemplateRegistry", "templateRegistry", ",", "SoyJsSrcOptions", "jsSrcOptions", ",", "@", "Nullable", "SoyMsgBundle", "msgBundle", ",", "ErrorReporter", "errorReporter", ")", "{",...
Generates JS source code given a Soy parse tree, an options object, and an optional bundle of translated messages. @param soyTree The Soy parse tree to generate JS source code for. @param templateRegistry The template registry that contains all the template information. @param jsSrcOptions The compilation options rele...
[ "Generates", "JS", "source", "code", "given", "a", "Soy", "parse", "tree", "an", "options", "object", "and", "an", "optional", "bundle", "of", "translated", "messages", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jssrc/internal/JsSrcMain.java#L67-L97
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/SystemUtil.java
SystemUtil.concatFilePath
public static String concatFilePath(boolean _includeTrailingDelimiter, String..._parts) { """ Concats a path from all given parts, using the path delimiter for the currently used platform. @param _includeTrailingDelimiter include delimiter after last token @param _parts parts to concat @return concatinated stri...
java
public static String concatFilePath(boolean _includeTrailingDelimiter, String..._parts) { if (_parts == null) { return null; } StringBuilder allParts = new StringBuilder(); for (int i = 0; i < _parts.length; i++) { if (_parts[i] == null) { continu...
[ "public", "static", "String", "concatFilePath", "(", "boolean", "_includeTrailingDelimiter", ",", "String", "...", "_parts", ")", "{", "if", "(", "_parts", "==", "null", ")", "{", "return", "null", ";", "}", "StringBuilder", "allParts", "=", "new", "StringBuil...
Concats a path from all given parts, using the path delimiter for the currently used platform. @param _includeTrailingDelimiter include delimiter after last token @param _parts parts to concat @return concatinated string
[ "Concats", "a", "path", "from", "all", "given", "parts", "using", "the", "path", "delimiter", "for", "the", "currently", "used", "platform", "." ]
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/SystemUtil.java#L129-L151
blinkfox/zealot
src/main/java/com/blinkfox/zealot/core/ZealotKhala.java
ZealotKhala.doBetween
private ZealotKhala doBetween(String prefix, String field, Object startValue, Object endValue, boolean match) { """ 执行生成like模糊查询SQL片段的方法. @param prefix 前缀 @param field 数据库字段 @param startValue 值 @param endValue 值 @param match 是否匹配 @return ZealotKhala实例的当前实例 """ if (match) { SqlInfoBuil...
java
private ZealotKhala doBetween(String prefix, String field, Object startValue, Object endValue, boolean match) { if (match) { SqlInfoBuilder.newInstace(this.source.setPrefix(prefix)).buildBetweenSql(field, startValue, endValue); this.source.resetPrefix(); } return this; ...
[ "private", "ZealotKhala", "doBetween", "(", "String", "prefix", ",", "String", "field", ",", "Object", "startValue", ",", "Object", "endValue", ",", "boolean", "match", ")", "{", "if", "(", "match", ")", "{", "SqlInfoBuilder", ".", "newInstace", "(", "this",...
执行生成like模糊查询SQL片段的方法. @param prefix 前缀 @param field 数据库字段 @param startValue 值 @param endValue 值 @param match 是否匹配 @return ZealotKhala实例的当前实例
[ "执行生成like模糊查询SQL片段的方法", "." ]
train
https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/core/ZealotKhala.java#L429-L435
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/string/Strs.java
Strs.endAny
public static boolean endAny(String target, List<String> endWith) { """ Check if target string ends with any of a list of specified strings. @param target @param endWith @return """ if (isNull(target)) { return false; } return matcher(target).ends(endWith); }
java
public static boolean endAny(String target, List<String> endWith) { if (isNull(target)) { return false; } return matcher(target).ends(endWith); }
[ "public", "static", "boolean", "endAny", "(", "String", "target", ",", "List", "<", "String", ">", "endWith", ")", "{", "if", "(", "isNull", "(", "target", ")", ")", "{", "return", "false", ";", "}", "return", "matcher", "(", "target", ")", ".", "end...
Check if target string ends with any of a list of specified strings. @param target @param endWith @return
[ "Check", "if", "target", "string", "ends", "with", "any", "of", "a", "list", "of", "specified", "strings", "." ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/string/Strs.java#L314-L320
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.createOrUpdate
public AppServiceEnvironmentResourceInner createOrUpdate(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { """ Create or update an App Service Environment. Create or update an App Service Environment. @param resourceGroupName Name of the resource group to w...
java
public AppServiceEnvironmentResourceInner createOrUpdate(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).toBlocking().last().body(); }
[ "public", "AppServiceEnvironmentResourceInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "name", ",", "AppServiceEnvironmentResourceInner", "hostingEnvironmentEnvelope", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupNam...
Create or update an App Service Environment. Create or update an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. @throws I...
[ "Create", "or", "update", "an", "App", "Service", "Environment", ".", "Create", "or", "update", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L686-L688
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java
MapUtils.getToleranceDistance
public static double getToleranceDistance(LatLng latLng, View view, GoogleMap map, float screenClickPercentage) { """ Get the allowable tolerance distance in meters from the click location on the map view and map with the screen percentage tolerance. @param latLng click location @param view ...
java
public static double getToleranceDistance(LatLng latLng, View view, GoogleMap map, float screenClickPercentage) { LatLngBoundingBox latLngBoundingBox = buildClickLatLngBoundingBox(latLng, view, map, screenClickPercentage); double longitudeDistance = SphericalUtil.computeDistanceBetween(latLngBoundingB...
[ "public", "static", "double", "getToleranceDistance", "(", "LatLng", "latLng", ",", "View", "view", ",", "GoogleMap", "map", ",", "float", "screenClickPercentage", ")", "{", "LatLngBoundingBox", "latLngBoundingBox", "=", "buildClickLatLngBoundingBox", "(", "latLng", "...
Get the allowable tolerance distance in meters from the click location on the map view and map with the screen percentage tolerance. @param latLng click location @param view map view @param map map @param screenClickPercentage screen click percentage between 0.0 and 1....
[ "Get", "the", "allowable", "tolerance", "distance", "in", "meters", "from", "the", "click", "location", "on", "the", "map", "view", "and", "map", "with", "the", "screen", "percentage", "tolerance", "." ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/MapUtils.java#L162-L172
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java
AbstractDocumentQuery._whereLucene
@SuppressWarnings("ConstantConditions") public void _whereLucene(String fieldName, String whereClause, boolean exact) { """ Filter the results from the index using the specified where clause. @param fieldName Field name @param whereClause Where clause @param exact Use exact matcher """ fieldName...
java
@SuppressWarnings("ConstantConditions") public void _whereLucene(String fieldName, String whereClause, boolean exact) { fieldName = ensureValidFieldName(fieldName, false); List<QueryToken> tokens = getCurrentWhereTokens(); appendOperatorIfNeeded(tokens); negateIfNeeded(tokens, field...
[ "@", "SuppressWarnings", "(", "\"ConstantConditions\"", ")", "public", "void", "_whereLucene", "(", "String", "fieldName", ",", "String", "whereClause", ",", "boolean", "exact", ")", "{", "fieldName", "=", "ensureValidFieldName", "(", "fieldName", ",", "false", ")...
Filter the results from the index using the specified where clause. @param fieldName Field name @param whereClause Where clause @param exact Use exact matcher
[ "Filter", "the", "results", "from", "the", "index", "using", "the", "specified", "where", "clause", "." ]
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/session/AbstractDocumentQuery.java#L413-L424
stagemonitor/stagemonitor
stagemonitor-tracing/src/main/java/org/stagemonitor/tracing/profiler/CallStackElement.java
CallStackElement.create
public static CallStackElement create(CallStackElement parent, String signature, long startTimestamp) { """ This static factory method also sets the parent-child relationships. @param parent the parent @param startTimestamp the timestamp at the beginning of the method """ CallStackElement cse; if (useObj...
java
public static CallStackElement create(CallStackElement parent, String signature, long startTimestamp) { CallStackElement cse; if (useObjectPooling) { cse = objectPool.poll(); if (cse == null) { cse = new CallStackElement(); } } else { cse = new CallStackElement(); } cse.executionTime = startT...
[ "public", "static", "CallStackElement", "create", "(", "CallStackElement", "parent", ",", "String", "signature", ",", "long", "startTimestamp", ")", "{", "CallStackElement", "cse", ";", "if", "(", "useObjectPooling", ")", "{", "cse", "=", "objectPool", ".", "pol...
This static factory method also sets the parent-child relationships. @param parent the parent @param startTimestamp the timestamp at the beginning of the method
[ "This", "static", "factory", "method", "also", "sets", "the", "parent", "-", "child", "relationships", "." ]
train
https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-tracing/src/main/java/org/stagemonitor/tracing/profiler/CallStackElement.java#L55-L73
hypercube1024/firefly
firefly/src/main/java/com/firefly/codec/websocket/utils/QuoteUtil.java
QuoteUtil.quoteIfNeeded
public static void quoteIfNeeded(StringBuilder buf, String str, String delim) { """ Append into buf the provided string, adding quotes if needed. <p> Quoting is determined if any of the characters in the <code>delim</code> are found in the input <code>str</code>. @param buf the buffer to append to @param s...
java
public static void quoteIfNeeded(StringBuilder buf, String str, String delim) { if (str == null) { return; } // check for delimiters in input string int len = str.length(); if (len == 0) { return; } int ch; for (int i = 0; i < len; ...
[ "public", "static", "void", "quoteIfNeeded", "(", "StringBuilder", "buf", ",", "String", "str", ",", "String", "delim", ")", "{", "if", "(", "str", "==", "null", ")", "{", "return", ";", "}", "// check for delimiters in input string", "int", "len", "=", "str...
Append into buf the provided string, adding quotes if needed. <p> Quoting is determined if any of the characters in the <code>delim</code> are found in the input <code>str</code>. @param buf the buffer to append to @param str the string to possibly quote @param delim the delimiter characters that will trigger auto...
[ "Append", "into", "buf", "the", "provided", "string", "adding", "quotes", "if", "needed", ".", "<p", ">", "Quoting", "is", "determined", "if", "any", "of", "the", "characters", "in", "the", "<code", ">", "delim<", "/", "code", ">", "are", "found", "in", ...
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly/src/main/java/com/firefly/codec/websocket/utils/QuoteUtil.java#L245-L266
actframework/actframework
src/main/java/act/event/EventBus.java
EventBus.emitAsync
public EventBus emitAsync(Enum<?> event, Object... args) { """ Emit an enum event with parameters and force all listeners to be called asynchronously. @param event the target event @param args the arguments passed in @see #emit(Enum, Object...) """ return _emitWithOnceBus(eventContextAsync(event...
java
public EventBus emitAsync(Enum<?> event, Object... args) { return _emitWithOnceBus(eventContextAsync(event, args)); }
[ "public", "EventBus", "emitAsync", "(", "Enum", "<", "?", ">", "event", ",", "Object", "...", "args", ")", "{", "return", "_emitWithOnceBus", "(", "eventContextAsync", "(", "event", ",", "args", ")", ")", ";", "}" ]
Emit an enum event with parameters and force all listeners to be called asynchronously. @param event the target event @param args the arguments passed in @see #emit(Enum, Object...)
[ "Emit", "an", "enum", "event", "with", "parameters", "and", "force", "all", "listeners", "to", "be", "called", "asynchronously", "." ]
train
https://github.com/actframework/actframework/blob/55a8f8b45e71159a79ec6e157c02f71700f8cd54/src/main/java/act/event/EventBus.java#L1009-L1011
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/DevicesSharesApi.java
DevicesSharesApi.getAllSharesForDevice
public DeviceSharingEnvelope getAllSharesForDevice(String deviceId, Integer count, Integer offset) throws ApiException { """ List all shares for the given device id List all shares for the given device id @param deviceId Device ID. (required) @param count Desired count of items in the result set. (optional) @p...
java
public DeviceSharingEnvelope getAllSharesForDevice(String deviceId, Integer count, Integer offset) throws ApiException { ApiResponse<DeviceSharingEnvelope> resp = getAllSharesForDeviceWithHttpInfo(deviceId, count, offset); return resp.getData(); }
[ "public", "DeviceSharingEnvelope", "getAllSharesForDevice", "(", "String", "deviceId", ",", "Integer", "count", ",", "Integer", "offset", ")", "throws", "ApiException", "{", "ApiResponse", "<", "DeviceSharingEnvelope", ">", "resp", "=", "getAllSharesForDeviceWithHttpInfo"...
List all shares for the given device id List all shares for the given device id @param deviceId Device ID. (required) @param count Desired count of items in the result set. (optional) @param offset Offset for pagination. (optional) @return DeviceSharingEnvelope @throws ApiException If fail to call the API, e.g. server ...
[ "List", "all", "shares", "for", "the", "given", "device", "id", "List", "all", "shares", "for", "the", "given", "device", "id" ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/DevicesSharesApi.java#L388-L391
virgo47/javasimon
core/src/main/java/org/javasimon/utils/SimonUtils.java
SimonUtils.calculateStopwatchAggregate
public static StopwatchAggregate calculateStopwatchAggregate(Simon simon, SimonFilter filter) { """ Aggregate statistics from all stopwatches in hierarchy that pass specified filter. Filter is applied to all simons in the hierarchy of all types. If a simon is rejected by filter its children are not considered. S...
java
public static StopwatchAggregate calculateStopwatchAggregate(Simon simon, SimonFilter filter) { StopwatchAggregate stopwatchAggregate = new StopwatchAggregate(); aggregateStopwatches(stopwatchAggregate, simon, filter != null ? filter : SimonFilter.ACCEPT_ALL_FILTER); return stopwatchAggregate; }
[ "public", "static", "StopwatchAggregate", "calculateStopwatchAggregate", "(", "Simon", "simon", ",", "SimonFilter", "filter", ")", "{", "StopwatchAggregate", "stopwatchAggregate", "=", "new", "StopwatchAggregate", "(", ")", ";", "aggregateStopwatches", "(", "stopwatchAggr...
Aggregate statistics from all stopwatches in hierarchy that pass specified filter. Filter is applied to all simons in the hierarchy of all types. If a simon is rejected by filter its children are not considered. Simons are aggregated in the top-bottom fashion, i.e. parent simons are aggregated before children. @param ...
[ "Aggregate", "statistics", "from", "all", "stopwatches", "in", "hierarchy", "that", "pass", "specified", "filter", ".", "Filter", "is", "applied", "to", "all", "simons", "in", "the", "hierarchy", "of", "all", "types", ".", "If", "a", "simon", "is", "rejected...
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/utils/SimonUtils.java#L406-L412
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/AbstractJobLauncher.java
AbstractJobLauncher.cancelJob
@Override public void cancelJob(JobListener jobListener) throws JobException { """ A default implementation of {@link JobLauncher#cancelJob(JobListener)}. <p> This implementation relies on two conditional variables: one for the condition that a cancellation is requested, and the other for the conditio...
java
@Override public void cancelJob(JobListener jobListener) throws JobException { synchronized (this.cancellationRequest) { if (this.cancellationRequested) { // Return immediately if a cancellation has already been requested return; } this.cancellationRequested = true; ...
[ "@", "Override", "public", "void", "cancelJob", "(", "JobListener", "jobListener", ")", "throws", "JobException", "{", "synchronized", "(", "this", ".", "cancellationRequest", ")", "{", "if", "(", "this", ".", "cancellationRequested", ")", "{", "// Return immediat...
A default implementation of {@link JobLauncher#cancelJob(JobListener)}. <p> This implementation relies on two conditional variables: one for the condition that a cancellation is requested, and the other for the condition that the cancellation is executed. Upon entrance, the method notifies the cancellation executor st...
[ "A", "default", "implementation", "of", "{", "@link", "JobLauncher#cancelJob", "(", "JobListener", ")", "}", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/AbstractJobLauncher.java#L251-L295
SonarSource/sonarqube
server/sonar-server-common/src/main/java/org/sonar/server/rule/index/RuleIndex.java
RuleIndex.searchAll
public Iterator<Integer> searchAll(RuleQuery query) { """ Return all rule ids matching the search query, without pagination nor facets """ SearchRequestBuilder esSearch = client .prepareSearch(TYPE_RULE) .setScroll(TimeValue.timeValueMinutes(SCROLL_TIME_IN_MINUTES)); optimizeScrollRequest(...
java
public Iterator<Integer> searchAll(RuleQuery query) { SearchRequestBuilder esSearch = client .prepareSearch(TYPE_RULE) .setScroll(TimeValue.timeValueMinutes(SCROLL_TIME_IN_MINUTES)); optimizeScrollRequest(esSearch); QueryBuilder qb = buildQuery(query); Map<String, QueryBuilder> filters = bu...
[ "public", "Iterator", "<", "Integer", ">", "searchAll", "(", "RuleQuery", "query", ")", "{", "SearchRequestBuilder", "esSearch", "=", "client", ".", "prepareSearch", "(", "TYPE_RULE", ")", ".", "setScroll", "(", "TimeValue", ".", "timeValueMinutes", "(", "SCROLL...
Return all rule ids matching the search query, without pagination nor facets
[ "Return", "all", "rule", "ids", "matching", "the", "search", "query", "without", "pagination", "nor", "facets" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server-common/src/main/java/org/sonar/server/rule/index/RuleIndex.java#L172-L189
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/productinfo/ProductInfo.java
ProductInfo.getVersionFilesByProdExtension
public static Map<String, File[]> getVersionFilesByProdExtension(File installDir) { """ Retrieves the product extension jar bundles pointed to by the properties file in etc/extensions. @return The array of product extension jar bundles """ Map<String, File[]> versionFiles = new TreeMap<String, File[...
java
public static Map<String, File[]> getVersionFilesByProdExtension(File installDir) { Map<String, File[]> versionFiles = new TreeMap<String, File[]>(); Iterator<ProductExtensionInfo> productExtensions = ProductExtension.getProductExtensions().iterator(); while (productExtensions != null && produc...
[ "public", "static", "Map", "<", "String", ",", "File", "[", "]", ">", "getVersionFilesByProdExtension", "(", "File", "installDir", ")", "{", "Map", "<", "String", ",", "File", "[", "]", ">", "versionFiles", "=", "new", "TreeMap", "<", "String", ",", "Fil...
Retrieves the product extension jar bundles pointed to by the properties file in etc/extensions. @return The array of product extension jar bundles
[ "Retrieves", "the", "product", "extension", "jar", "bundles", "pointed", "to", "by", "the", "properties", "file", "in", "etc", "/", "extensions", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/productinfo/ProductInfo.java#L254-L280
qiniu/java-sdk
src/main/java/com/qiniu/storage/BucketManager.java
BucketManager.changeType
public Response changeType(String bucket, String key, StorageType type) throws QiniuException { """ 修改文件的类型(普通存储或低频存储) @param bucket 空间名称 @param key 文件名称 @param type type=0 表示普通存储,type=1 表示低频存存储 @throws QiniuException """ String resource = encodedEntry(bucket, key); Strin...
java
public Response changeType(String bucket, String key, StorageType type) throws QiniuException { String resource = encodedEntry(bucket, key); String path = String.format("/chtype/%s/type/%d", resource, type.ordinal()); return rsPost(bucket, path, null); }
[ "public", "Response", "changeType", "(", "String", "bucket", ",", "String", "key", ",", "StorageType", "type", ")", "throws", "QiniuException", "{", "String", "resource", "=", "encodedEntry", "(", "bucket", ",", "key", ")", ";", "String", "path", "=", "Strin...
修改文件的类型(普通存储或低频存储) @param bucket 空间名称 @param key 文件名称 @param type type=0 表示普通存储,type=1 表示低频存存储 @throws QiniuException
[ "修改文件的类型(普通存储或低频存储)" ]
train
https://github.com/qiniu/java-sdk/blob/6c05f3fb718403a496c725b048e9241f80171499/src/main/java/com/qiniu/storage/BucketManager.java#L309-L314
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java
ManagementClient.getSubscriptionRuntimeInfo
public SubscriptionRuntimeInfo getSubscriptionRuntimeInfo(String topicPath, String subscriptionName) throws ServiceBusException, InterruptedException { """ Retrieves the runtime information of a subscription in a given topic @param topicPath - The path of the topic relative to service bus namespace. @param subsc...
java
public SubscriptionRuntimeInfo getSubscriptionRuntimeInfo(String topicPath, String subscriptionName) throws ServiceBusException, InterruptedException { return Utils.completeFuture(this.asyncClient.getSubscriptionRuntimeInfoAsync(topicPath, subscriptionName)); }
[ "public", "SubscriptionRuntimeInfo", "getSubscriptionRuntimeInfo", "(", "String", "topicPath", ",", "String", "subscriptionName", ")", "throws", "ServiceBusException", ",", "InterruptedException", "{", "return", "Utils", ".", "completeFuture", "(", "this", ".", "asyncClie...
Retrieves the runtime information of a subscription in a given topic @param topicPath - The path of the topic relative to service bus namespace. @param subscriptionName - The name of the subscription @return - SubscriptionRuntimeInfo containing the runtime information about the subscription. @throws IllegalArgumentExce...
[ "Retrieves", "the", "runtime", "information", "of", "a", "subscription", "in", "a", "given", "topic" ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/management/ManagementClient.java#L132-L134
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java
JobScheduleOperations.patchJobSchedule
public void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Updates the specified job schedule. This method only replaces the properties specif...
java
public void patchJobSchedule(String jobScheduleId, Schedule schedule, JobSpecification jobSpecification, List<MetadataItem> metadata, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { JobSchedulePatchOptions options = new JobSchedulePatchOptions(); BehaviorMana...
[ "public", "void", "patchJobSchedule", "(", "String", "jobScheduleId", ",", "Schedule", "schedule", ",", "JobSpecification", "jobSpecification", ",", "List", "<", "MetadataItem", ">", "metadata", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ...
Updates the specified job schedule. This method only replaces the properties specified with non-null values. @param jobScheduleId The ID of the job schedule. @param schedule The schedule according to which jobs will be created. If null, any existing schedule is left unchanged. @param jobSpecification The details of th...
[ "Updates", "the", "specified", "job", "schedule", ".", "This", "method", "only", "replaces", "the", "properties", "specified", "with", "non", "-", "null", "values", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java#L209-L219
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.spare_spare_serviceInfos_GET
public OvhService spare_spare_serviceInfos_GET(String spare) throws IOException { """ Get this object properties REST: GET /telephony/spare/{spare}/serviceInfos @param spare [required] The internal name of your spare """ String qPath = "/telephony/spare/{spare}/serviceInfos"; StringBuilder sb = path(qP...
java
public OvhService spare_spare_serviceInfos_GET(String spare) throws IOException { String qPath = "/telephony/spare/{spare}/serviceInfos"; StringBuilder sb = path(qPath, spare); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhService.class); }
[ "public", "OvhService", "spare_spare_serviceInfos_GET", "(", "String", "spare", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/spare/{spare}/serviceInfos\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "spare", ")", ";", "St...
Get this object properties REST: GET /telephony/spare/{spare}/serviceInfos @param spare [required] The internal name of your spare
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L9065-L9070
JamesIry/jADT
jADT-core/src/main/java/com/pogofish/jadt/JADT.java
JADT.parseAndEmit
public void parseAndEmit(String srcPath, final String destDir) { """ Do the jADT thing given the srceFileName and destination directory @param srcPath full name of the source directory or file @param destDir full name of the destination directory (trailing slash is optional) """ final String vers...
java
public void parseAndEmit(String srcPath, final String destDir) { final String version = new Version().getVersion(); logger.info("jADT version " + version + "."); logger.info("Will read from source " + srcPath); logger.info("Will write to destDir " + destDir); final List<? extends S...
[ "public", "void", "parseAndEmit", "(", "String", "srcPath", ",", "final", "String", "destDir", ")", "{", "final", "String", "version", "=", "new", "Version", "(", ")", ".", "getVersion", "(", ")", ";", "logger", ".", "info", "(", "\"jADT version \"", "+", ...
Do the jADT thing given the srceFileName and destination directory @param srcPath full name of the source directory or file @param destDir full name of the destination directory (trailing slash is optional)
[ "Do", "the", "jADT", "thing", "given", "the", "srceFileName", "and", "destination", "directory" ]
train
https://github.com/JamesIry/jADT/blob/92ee94b6624cd673851497d78c218837dcf02b8a/jADT-core/src/main/java/com/pogofish/jadt/JADT.java#L148-L171
UrielCh/ovh-java-sdk
ovh-java-sdk-licenseoffice/src/main/java/net/minidev/ovh/api/ApiOvhLicenseoffice.java
ApiOvhLicenseoffice.serviceName_user_activationEmail_PUT
public void serviceName_user_activationEmail_PUT(String serviceName, String activationEmail, OvhOfficeUser body) throws IOException { """ Alter this object properties REST: PUT /license/office/{serviceName}/user/{activationEmail} @param body [required] New object properties @param serviceName [required] The u...
java
public void serviceName_user_activationEmail_PUT(String serviceName, String activationEmail, OvhOfficeUser body) throws IOException { String qPath = "/license/office/{serviceName}/user/{activationEmail}"; StringBuilder sb = path(qPath, serviceName, activationEmail); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_user_activationEmail_PUT", "(", "String", "serviceName", ",", "String", "activationEmail", ",", "OvhOfficeUser", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/license/office/{serviceName}/user/{activationEmail}\"", ";", ...
Alter this object properties REST: PUT /license/office/{serviceName}/user/{activationEmail} @param body [required] New object properties @param serviceName [required] The unique identifier of your Office service @param activationEmail [required] Email used to activate Microsoft Office
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-licenseoffice/src/main/java/net/minidev/ovh/api/ApiOvhLicenseoffice.java#L165-L169
keenlabs/KeenClient-Java
query/src/main/java/io/keen/client/java/SubAnalysis.java
SubAnalysis.constructParameterRequestArgs
@Override Map<String, Object> constructParameterRequestArgs() { """ Constructs request sub-parameters for this SubAnalysis. {@inheritDoc} @return A jsonifiable object that should be the value for a key with the name of the label of this SubAnalysis instance. """ // The label needs to be the ...
java
@Override Map<String, Object> constructParameterRequestArgs() { // The label needs to be the key and this object is the value. Unfortunately that means // whatever parent object calls this needs to know to use this label as the key. // We could fix this by changing RequestParameter's interfa...
[ "@", "Override", "Map", "<", "String", ",", "Object", ">", "constructParameterRequestArgs", "(", ")", "{", "// The label needs to be the key and this object is the value. Unfortunately that means", "// whatever parent object calls this needs to know to use this label as the key.", "// We...
Constructs request sub-parameters for this SubAnalysis. {@inheritDoc} @return A jsonifiable object that should be the value for a key with the name of the label of this SubAnalysis instance.
[ "Constructs", "request", "sub", "-", "parameters", "for", "this", "SubAnalysis", "." ]
train
https://github.com/keenlabs/KeenClient-Java/blob/2ea021547b5338257c951a2596bd49749038d018/query/src/main/java/io/keen/client/java/SubAnalysis.java#L103-L124
hibernate/hibernate-ogm
core/src/main/java/org/hibernate/ogm/datastore/document/impl/EmbeddableStateFinder.java
EmbeddableStateFinder.getOuterMostNullEmbeddableIfAny
public String getOuterMostNullEmbeddableIfAny(String column) { """ Should only called on a column that is being set to null. Returns the most outer embeddable containing {@code column} that is entirely null. Return null otherwise i.e. not embeddable. The implementation lazily compute the embeddable state an...
java
public String getOuterMostNullEmbeddableIfAny(String column) { String[] path = column.split( "\\." ); if ( !isEmbeddableColumn( path ) ) { return null; } // the cached value may be null hence the explicit key lookup if ( columnToOuterMostNullEmbeddableCache.containsKey( column ) ) { return columnToOuter...
[ "public", "String", "getOuterMostNullEmbeddableIfAny", "(", "String", "column", ")", "{", "String", "[", "]", "path", "=", "column", ".", "split", "(", "\"\\\\.\"", ")", ";", "if", "(", "!", "isEmbeddableColumn", "(", "path", ")", ")", "{", "return", "null...
Should only called on a column that is being set to null. Returns the most outer embeddable containing {@code column} that is entirely null. Return null otherwise i.e. not embeddable. The implementation lazily compute the embeddable state and caches it. The idea behind the lazy computation is that only some columns w...
[ "Should", "only", "called", "on", "a", "column", "that", "is", "being", "set", "to", "null", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/datastore/document/impl/EmbeddableStateFinder.java#L48-L58
OpenLiberty/open-liberty
dev/com.ibm.ws.concurrent/src/com/ibm/ws/concurrent/internal/ThreadGroupTracker.java
ThreadGroupTracker.getThreadGroup
ThreadGroup getThreadGroup(String identifier, String threadFactoryName, ThreadGroup parentGroup) { """ Returns the thread group to use for the specified application component. @param jeeName name of the application component @param threadFactoryName unique identifier for the thread factory @param parentGroup ...
java
ThreadGroup getThreadGroup(String identifier, String threadFactoryName, ThreadGroup parentGroup) { ConcurrentHashMap<String, ThreadGroup> threadFactoryToThreadGroup = metadataIdentifierToThreadGroups.get(identifier); if (threadFactoryToThreadGroup == null) if (metadataIdentifierService.isMet...
[ "ThreadGroup", "getThreadGroup", "(", "String", "identifier", ",", "String", "threadFactoryName", ",", "ThreadGroup", "parentGroup", ")", "{", "ConcurrentHashMap", "<", "String", ",", "ThreadGroup", ">", "threadFactoryToThreadGroup", "=", "metadataIdentifierToThreadGroups",...
Returns the thread group to use for the specified application component. @param jeeName name of the application component @param threadFactoryName unique identifier for the thread factory @param parentGroup parent thread group @return child thread group for the application component. Null if the application component ...
[ "Returns", "the", "thread", "group", "to", "use", "for", "the", "specified", "application", "component", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.concurrent/src/com/ibm/ws/concurrent/internal/ThreadGroupTracker.java#L107-L123
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/objectManager/ManagedObject.java
ManagedObject.setState
private void setState(int[] nextState) throws StateErrorException { """ Makes a state transition. @param nextState maps the current stte to the new one. @throws StateErrorException if the transition is invalid. """ if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) ...
java
private void setState(int[] nextState) throws StateErrorException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, "setState", new Object[] { nextState, ...
[ "private", "void", "setState", "(", "int", "[", "]", "nextState", ")", "throws", "StateErrorException", "{", "if", "(", "Tracing", ".", "isAnyTracingEnabled", "(", ")", "&&", "trace", ".", "isEntryEnabled", "(", ")", ")", "trace", ".", "entry", "(", "this"...
Makes a state transition. @param nextState maps the current stte to the new one. @throws StateErrorException if the transition is invalid.
[ "Makes", "a", "state", "transition", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/objectManager/ManagedObject.java#L1997-L2033
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionPersistenceImpl.java
CPOptionPersistenceImpl.findByC_ERC
@Override public CPOption findByC_ERC(long companyId, String externalReferenceCode) throws NoSuchCPOptionException { """ Returns the cp option where companyId = &#63; and externalReferenceCode = &#63; or throws a {@link NoSuchCPOptionException} if it could not be found. @param companyId the company ID @para...
java
@Override public CPOption findByC_ERC(long companyId, String externalReferenceCode) throws NoSuchCPOptionException { CPOption cpOption = fetchByC_ERC(companyId, externalReferenceCode); if (cpOption == null) { StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("...
[ "@", "Override", "public", "CPOption", "findByC_ERC", "(", "long", "companyId", ",", "String", "externalReferenceCode", ")", "throws", "NoSuchCPOptionException", "{", "CPOption", "cpOption", "=", "fetchByC_ERC", "(", "companyId", ",", "externalReferenceCode", ")", ";"...
Returns the cp option where companyId = &#63; and externalReferenceCode = &#63; or throws a {@link NoSuchCPOptionException} if it could not be found. @param companyId the company ID @param externalReferenceCode the external reference code @return the matching cp option @throws NoSuchCPOptionException if a matching cp ...
[ "Returns", "the", "cp", "option", "where", "companyId", "=", "&#63", ";", "and", "externalReferenceCode", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchCPOptionException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionPersistenceImpl.java#L2239-L2265
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/scheduler/JobScheduler.java
JobScheduler.scheduleJobImmediately
public Future<?> scheduleJobImmediately(Properties jobProps, JobListener jobListener, JobLauncher jobLauncher) { """ Schedule a job immediately. <p> This method calls the Quartz scheduler to scheduler the job. </p> @param jobProps Job configuration properties @param jobListener {@link JobListener} used fo...
java
public Future<?> scheduleJobImmediately(Properties jobProps, JobListener jobListener, JobLauncher jobLauncher) { Callable<Void> callable = new Callable<Void>() { @Override public Void call() throws JobException { try { runJob(jobProps, jobListener, jobLauncher); } catch (JobExc...
[ "public", "Future", "<", "?", ">", "scheduleJobImmediately", "(", "Properties", "jobProps", ",", "JobListener", "jobListener", ",", "JobLauncher", "jobLauncher", ")", "{", "Callable", "<", "Void", ">", "callable", "=", "new", "Callable", "<", "Void", ">", "(",...
Schedule a job immediately. <p> This method calls the Quartz scheduler to scheduler the job. </p> @param jobProps Job configuration properties @param jobListener {@link JobListener} used for callback, can be <em>null</em> if no callback is needed. @throws JobException when there is anything wrong with scheduling the ...
[ "Schedule", "a", "job", "immediately", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/scheduler/JobScheduler.java#L258-L312
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_bulk_POST
public ArrayList<OvhInstance> project_serviceName_instance_bulk_POST(String serviceName, String flavorId, String groupId, String imageId, Boolean monthlyBilling, String name, OvhNetworkBulkParams[] networks, Long number, String region, String sshKeyId, String userData, String volumeId) throws IOException { """ Cre...
java
public ArrayList<OvhInstance> project_serviceName_instance_bulk_POST(String serviceName, String flavorId, String groupId, String imageId, Boolean monthlyBilling, String name, OvhNetworkBulkParams[] networks, Long number, String region, String sshKeyId, String userData, String volumeId) throws IOException { String qPa...
[ "public", "ArrayList", "<", "OvhInstance", ">", "project_serviceName_instance_bulk_POST", "(", "String", "serviceName", ",", "String", "flavorId", ",", "String", "groupId", ",", "String", "imageId", ",", "Boolean", "monthlyBilling", ",", "String", "name", ",", "OvhN...
Create multiple instances REST: POST /cloud/project/{serviceName}/instance/bulk @param flavorId [required] Instance flavor id @param groupId [required] Start instance in group @param imageId [required] Instance image id @param monthlyBilling [required] Active monthly billing @param name [required] Instance name @param...
[ "Create", "multiple", "instances" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L2090-L2107
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java
SameDiff.addVariableMappingForField
public void addVariableMappingForField(DifferentialFunction function, String fieldName, String varName) { """ Adds a field name -> variable name mapping for a given function.<br> This is used for model import where there is an unresolved variable at the time of calling any {@link org.nd4j.imports.graphmapper.Gra...
java
public void addVariableMappingForField(DifferentialFunction function, String fieldName, String varName) { fieldVariableResolutionMapping.put(function.getOwnName(), fieldName, varName); }
[ "public", "void", "addVariableMappingForField", "(", "DifferentialFunction", "function", ",", "String", "fieldName", ",", "String", "varName", ")", "{", "fieldVariableResolutionMapping", ".", "put", "(", "function", ".", "getOwnName", "(", ")", ",", "fieldName", ","...
Adds a field name -> variable name mapping for a given function.<br> This is used for model import where there is an unresolved variable at the time of calling any {@link org.nd4j.imports.graphmapper.GraphMapper#importGraph(File)} . <p> This data structure is typically accessed during {@link DifferentialFunction#resolv...
[ "Adds", "a", "field", "name", "-", ">", "variable", "name", "mapping", "for", "a", "given", "function", ".", "<br", ">", "This", "is", "used", "for", "model", "import", "where", "there", "is", "an", "unresolved", "variable", "at", "the", "time", "of", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java#L1033-L1035
Coveros/selenified
src/main/java/com/coveros/selenified/utilities/Reporter.java
Reporter.getAction
private String getAction(String check, double waitFor) { """ Helper to recordStep, which takes in a check being performed, and determines if a wait is occuring or not. If no wait, no action is recorded. If a wait was performed, that wait is added to the check, and provided back as the action @param check - ...
java
private String getAction(String check, double waitFor) { String action = ""; if (waitFor > 0) { action = "Waiting up to " + waitFor + " seconds " + check; } return action; }
[ "private", "String", "getAction", "(", "String", "check", ",", "double", "waitFor", ")", "{", "String", "action", "=", "\"\"", ";", "if", "(", "waitFor", ">", "0", ")", "{", "action", "=", "\"Waiting up to \"", "+", "waitFor", "+", "\" seconds \"", "+", ...
Helper to recordStep, which takes in a check being performed, and determines if a wait is occuring or not. If no wait, no action is recorded. If a wait was performed, that wait is added to the check, and provided back as the action @param check - the check being performed @param waitFor - how long was something wait...
[ "Helper", "to", "recordStep", "which", "takes", "in", "a", "check", "being", "performed", "and", "determines", "if", "a", "wait", "is", "occuring", "or", "not", ".", "If", "no", "wait", "no", "action", "is", "recorded", ".", "If", "a", "wait", "was", "...
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Reporter.java#L344-L350
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToHTMLStream.java
ToHTMLStream.processAttributes
public void processAttributes(java.io.Writer writer, int nAttrs) throws IOException,SAXException { """ Process the attributes, which means to write out the currently collected attributes to the writer. The attributes are not cleared by this method @param writer the writer to write processed attributes...
java
public void processAttributes(java.io.Writer writer, int nAttrs) throws IOException,SAXException { /* * process the collected attributes */ for (int i = 0; i < nAttrs; i++) { processAttribute( writer, ...
[ "public", "void", "processAttributes", "(", "java", ".", "io", ".", "Writer", "writer", ",", "int", "nAttrs", ")", "throws", "IOException", ",", "SAXException", "{", "/* \n * process the collected attributes\n */", "for", "(", "int", "i", "=", ...
Process the attributes, which means to write out the currently collected attributes to the writer. The attributes are not cleared by this method @param writer the writer to write processed attributes to. @param nAttrs the number of attributes in m_attributes to be processed @throws org.xml.sax.SAXException
[ "Process", "the", "attributes", "which", "means", "to", "write", "out", "the", "currently", "collected", "attributes", "to", "the", "writer", ".", "The", "attributes", "are", "not", "cleared", "by", "this", "method" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToHTMLStream.java#L1767-L1781
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java
Hierarchy.visitSuperInterfaceMethods
public static JavaClassAndMethod visitSuperInterfaceMethods(JavaClassAndMethod method, JavaClassAndMethodChooser chooser) throws ClassNotFoundException { """ Visit all superinterface methods which the given method implements. @param method the method @param chooser chooser which visits each super...
java
public static JavaClassAndMethod visitSuperInterfaceMethods(JavaClassAndMethod method, JavaClassAndMethodChooser chooser) throws ClassNotFoundException { return findMethod(method.getJavaClass().getAllInterfaces(), method.getMethod().getName(), method.getMethod() .getSignature(), choo...
[ "public", "static", "JavaClassAndMethod", "visitSuperInterfaceMethods", "(", "JavaClassAndMethod", "method", ",", "JavaClassAndMethodChooser", "chooser", ")", "throws", "ClassNotFoundException", "{", "return", "findMethod", "(", "method", ".", "getJavaClass", "(", ")", "....
Visit all superinterface methods which the given method implements. @param method the method @param chooser chooser which visits each superinterface method @return the chosen method, or null if no method is chosen @throws ClassNotFoundException
[ "Visit", "all", "superinterface", "methods", "which", "the", "given", "method", "implements", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Hierarchy.java#L288-L292
StanKocken/EfficientAdapter
efficientadapter/src/main/java/com/skocken/efficientadapter/lib/viewholder/EfficientViewHolder.java
EfficientViewHolder.setImageUri
public void setImageUri(int viewId, @Nullable Uri uri) { """ Equivalent to calling ImageView.setImageUri @param viewId The id of the view whose image should change @param uri the Uri of an image, or {@code null} to clear the content """ ViewHelper.setImageUri(mCacheView, viewId, uri); }
java
public void setImageUri(int viewId, @Nullable Uri uri) { ViewHelper.setImageUri(mCacheView, viewId, uri); }
[ "public", "void", "setImageUri", "(", "int", "viewId", ",", "@", "Nullable", "Uri", "uri", ")", "{", "ViewHelper", ".", "setImageUri", "(", "mCacheView", ",", "viewId", ",", "uri", ")", ";", "}" ]
Equivalent to calling ImageView.setImageUri @param viewId The id of the view whose image should change @param uri the Uri of an image, or {@code null} to clear the content
[ "Equivalent", "to", "calling", "ImageView", ".", "setImageUri" ]
train
https://github.com/StanKocken/EfficientAdapter/blob/0bcc3a20182cbce9d7901e1e2a9104251637167d/efficientadapter/src/main/java/com/skocken/efficientadapter/lib/viewholder/EfficientViewHolder.java#L376-L378
sculptor/sculptor
sculptor-framework/sculptor-framework-main/src/main/java/org/sculptor/framework/accessimpl/jpa/JpaHelper.java
JpaHelper.toSeparatedString
public static String toSeparatedString(List<?> values, String separator) { """ build a single String from a List of objects with a given separator @param values @param separator @return """ return toSeparatedString(values, separator, null); }
java
public static String toSeparatedString(List<?> values, String separator) { return toSeparatedString(values, separator, null); }
[ "public", "static", "String", "toSeparatedString", "(", "List", "<", "?", ">", "values", ",", "String", "separator", ")", "{", "return", "toSeparatedString", "(", "values", ",", "separator", ",", "null", ")", ";", "}" ]
build a single String from a List of objects with a given separator @param values @param separator @return
[ "build", "a", "single", "String", "from", "a", "List", "of", "objects", "with", "a", "given", "separator" ]
train
https://github.com/sculptor/sculptor/blob/38df06ceb7e40f5f52dbd53b1cd1d07ee11aade5/sculptor-framework/sculptor-framework-main/src/main/java/org/sculptor/framework/accessimpl/jpa/JpaHelper.java#L285-L287
super-csv/super-csv
super-csv-joda/src/main/java/org/supercsv/cellprocessor/joda/FmtDuration.java
FmtDuration.execute
public Object execute(final Object value, final CsvContext context) { """ {@inheritDoc} @throws SuperCsvCellProcessorException if value is null or not a Duration """ validateInputNotNull(value, context); if (!(value instanceof Duration)) { throw new SuperCsvCellProcessorException(Duration.class, val...
java
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if (!(value instanceof Duration)) { throw new SuperCsvCellProcessorException(Duration.class, value, context, this); } final Duration duration = (Duration) value; final String result = duration.t...
[ "public", "Object", "execute", "(", "final", "Object", "value", ",", "final", "CsvContext", "context", ")", "{", "validateInputNotNull", "(", "value", ",", "context", ")", ";", "if", "(", "!", "(", "value", "instanceof", "Duration", ")", ")", "{", "throw",...
{@inheritDoc} @throws SuperCsvCellProcessorException if value is null or not a Duration
[ "{", "@inheritDoc", "}" ]
train
https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv-joda/src/main/java/org/supercsv/cellprocessor/joda/FmtDuration.java#L63-L72
apache/incubator-shardingsphere
sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/api/yaml/YamlOrchestrationMasterSlaveDataSourceFactory.java
YamlOrchestrationMasterSlaveDataSourceFactory.createDataSource
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final File yamlFile) throws SQLException, IOException { """ Create master-slave data source. @param dataSourceMap data source map @param yamlFile YAML file for master-slave rule configuration without data sources @return ma...
java
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final File yamlFile) throws SQLException, IOException { YamlOrchestrationMasterSlaveRuleConfiguration config = unmarshal(yamlFile); return createDataSource(dataSourceMap, config.getMasterSlaveRule(), config.getProps()...
[ "public", "static", "DataSource", "createDataSource", "(", "final", "Map", "<", "String", ",", "DataSource", ">", "dataSourceMap", ",", "final", "File", "yamlFile", ")", "throws", "SQLException", ",", "IOException", "{", "YamlOrchestrationMasterSlaveRuleConfiguration", ...
Create master-slave data source. @param dataSourceMap data source map @param yamlFile YAML file for master-slave rule configuration without data sources @return master-slave data source @throws SQLException SQL exception @throws IOException IO exception
[ "Create", "master", "-", "slave", "data", "source", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/api/yaml/YamlOrchestrationMasterSlaveDataSourceFactory.java#L74-L77
JOML-CI/JOML
src/org/joml/Matrix4x3f.java
Matrix4x3f.ortho2DLH
public Matrix4x3f ortho2DLH(float left, float right, float bottom, float top, Matrix4x3f dest) { """ Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result in <code>dest</code>. <p> This method is equivalent to calling {@link #orthoLH(float, float,...
java
public Matrix4x3f ortho2DLH(float left, float right, float bottom, float top, Matrix4x3f dest) { // calculate right matrix elements float rm00 = 2.0f / (right - left); float rm11 = 2.0f / (top - bottom); float rm30 = -(right + left) / (right - left); float rm31 = -(top + bottom) ...
[ "public", "Matrix4x3f", "ortho2DLH", "(", "float", "left", ",", "float", "right", ",", "float", "bottom", ",", "float", "top", ",", "Matrix4x3f", "dest", ")", "{", "// calculate right matrix elements", "float", "rm00", "=", "2.0f", "/", "(", "right", "-", "l...
Apply an orthographic projection transformation for a left-handed coordinate system to this matrix and store the result in <code>dest</code>. <p> This method is equivalent to calling {@link #orthoLH(float, float, float, float, float, float, Matrix4x3f) orthoLH()} with <code>zNear=-1</code> and <code>zFar=+1</code>. <p>...
[ "Apply", "an", "orthographic", "projection", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "to", "this", "matrix", "and", "store", "the", "result", "in", "<code", ">", "dest<", "/", "code", ">", ".", "<p", ">", "This", "metho...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3f.java#L5774-L5798
lucee/Lucee
core/src/main/java/lucee/transformer/library/function/FunctionLibFunction.java
FunctionLibFunction.setFunctionClass
public void setFunctionClass(String value, Identification id, Attributes attrs) { """ Setzt die Klassendefinition als Zeichenkette, welche diese Funktion implementiert. @param value Klassendefinition als Zeichenkette. """ functionCD = ClassDefinitionImpl.toClassDefinition(value, id, attrs); }
java
public void setFunctionClass(String value, Identification id, Attributes attrs) { functionCD = ClassDefinitionImpl.toClassDefinition(value, id, attrs); }
[ "public", "void", "setFunctionClass", "(", "String", "value", ",", "Identification", "id", ",", "Attributes", "attrs", ")", "{", "functionCD", "=", "ClassDefinitionImpl", ".", "toClassDefinition", "(", "value", ",", "id", ",", "attrs", ")", ";", "}" ]
Setzt die Klassendefinition als Zeichenkette, welche diese Funktion implementiert. @param value Klassendefinition als Zeichenkette.
[ "Setzt", "die", "Klassendefinition", "als", "Zeichenkette", "welche", "diese", "Funktion", "implementiert", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/function/FunctionLibFunction.java#L271-L274
wonderpush/wonderpush-android-sdk
sdk/src/main/java/com/wonderpush/sdk/DataManager.java
DataManager.downloadAllData
static boolean downloadAllData() { """ Blocks until interrupted or completed. @return {@code true} if successfully called startActivity() with a sharing intent. """ String data; try { data = export().get(); } catch (InterruptedException ex) { Log.e(WonderPush.TA...
java
static boolean downloadAllData() { String data; try { data = export().get(); } catch (InterruptedException ex) { Log.e(WonderPush.TAG, "Unexpected error while exporting data", ex); return false; } catch (ExecutionException ex) { Log.e(Wonde...
[ "static", "boolean", "downloadAllData", "(", ")", "{", "String", "data", ";", "try", "{", "data", "=", "export", "(", ")", ".", "get", "(", ")", ";", "}", "catch", "(", "InterruptedException", "ex", ")", "{", "Log", ".", "e", "(", "WonderPush", ".", ...
Blocks until interrupted or completed. @return {@code true} if successfully called startActivity() with a sharing intent.
[ "Blocks", "until", "interrupted", "or", "completed", "." ]
train
https://github.com/wonderpush/wonderpush-android-sdk/blob/ba0a1568f705cdd6206639bfab1e5cf529084b59/sdk/src/main/java/com/wonderpush/sdk/DataManager.java#L191-L234
Coveros/selenified
src/main/java/com/coveros/selenified/utilities/Reporter.java
Reporter.replaceInFile
private void replaceInFile(String oldText, String newText) { """ Replaces an occurrence of a string within a file @param oldText - the text to be replaced @param newText - the text to be replaced with """ StringBuilder oldContent = new StringBuilder(); try (FileReader fr = new FileReader(f...
java
private void replaceInFile(String oldText, String newText) { StringBuilder oldContent = new StringBuilder(); try (FileReader fr = new FileReader(file); BufferedReader reader = new BufferedReader(fr)) { String line; while ((line = reader.readLine()) != null) { old...
[ "private", "void", "replaceInFile", "(", "String", "oldText", ",", "String", "newText", ")", "{", "StringBuilder", "oldContent", "=", "new", "StringBuilder", "(", ")", ";", "try", "(", "FileReader", "fr", "=", "new", "FileReader", "(", "file", ")", ";", "B...
Replaces an occurrence of a string within a file @param oldText - the text to be replaced @param newText - the text to be replaced with
[ "Replaces", "an", "occurrence", "of", "a", "string", "within", "a", "file" ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Reporter.java#L249-L270
lucee/Lucee
core/src/main/java/lucee/runtime/crypt/UnixCrypt.java
UnixCrypt.matches
public final static boolean matches(String encryptedPassword, String enteredPassword) { """ * Check that enteredPassword encrypts to * encryptedPassword. @param encryptedPassword The encryptedPassword. The first two characters are assumed to be the salt. This string would be the same as one found in a Unix /et...
java
public final static boolean matches(String encryptedPassword, String enteredPassword) { String salt = encryptedPassword.substring(0, 3); String newCrypt = crypt(salt, enteredPassword); return newCrypt.equals(encryptedPassword); }
[ "public", "final", "static", "boolean", "matches", "(", "String", "encryptedPassword", ",", "String", "enteredPassword", ")", "{", "String", "salt", "=", "encryptedPassword", ".", "substring", "(", "0", ",", "3", ")", ";", "String", "newCrypt", "=", "crypt", ...
* Check that enteredPassword encrypts to * encryptedPassword. @param encryptedPassword The encryptedPassword. The first two characters are assumed to be the salt. This string would be the same as one found in a Unix /etc/passwd file. @param enteredPassword The password as entered by the user (or otherwise aquired). @r...
[ "*", "Check", "that", "enteredPassword", "encrypts", "to", "*", "encryptedPassword", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/crypt/UnixCrypt.java#L331-L335
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/IDCreator.java
IDCreator.createIDsForAtomContainerSet
private static void createIDsForAtomContainerSet(IAtomContainerSet containerSet, List<String> tabuList) { """ Labels the Atom's and Bond's in each AtomContainer using the a1, a2, b1, b2 scheme often used in CML. It will also set id's for all AtomContainers, naming them m1, m2, etc. It will not the AtomContainer...
java
private static void createIDsForAtomContainerSet(IAtomContainerSet containerSet, List<String> tabuList) { if (tabuList == null) tabuList = AtomContainerSetManipulator.getAllIDs(containerSet); if (null == containerSet.getID()) { atomContainerSetCount = setID(ATOMCONTAINERSET_PREFIX, atomCont...
[ "private", "static", "void", "createIDsForAtomContainerSet", "(", "IAtomContainerSet", "containerSet", ",", "List", "<", "String", ">", "tabuList", ")", "{", "if", "(", "tabuList", "==", "null", ")", "tabuList", "=", "AtomContainerSetManipulator", ".", "getAllIDs", ...
Labels the Atom's and Bond's in each AtomContainer using the a1, a2, b1, b2 scheme often used in CML. It will also set id's for all AtomContainers, naming them m1, m2, etc. It will not the AtomContainerSet itself.
[ "Labels", "the", "Atom", "s", "and", "Bond", "s", "in", "each", "AtomContainer", "using", "the", "a1", "a2", "b1", "b2", "scheme", "often", "used", "in", "CML", ".", "It", "will", "also", "set", "id", "s", "for", "all", "AtomContainers", "naming", "the...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/IDCreator.java#L232-L249
auth0/auth0-java
src/main/java/com/auth0/client/auth/AuthAPI.java
AuthAPI.signUp
public SignUpRequest signUp(String email, String password, String connection) { """ Creates a sign up request with the given credentials and database connection. i.e.: <pre> {@code AuthAPI auth = new AuthAPI("me.auth0.com", "B3c6RYhk1v9SbIJcRIOwu62gIUGsnze", "2679NfkaBn62e6w5E8zNEzjr-yWfkaBne"); try { Map<St...
java
public SignUpRequest signUp(String email, String password, String connection) { Asserts.assertNotNull(email, "email"); Asserts.assertNotNull(password, "password"); Asserts.assertNotNull(connection, "connection"); String url = baseUrl .newBuilder() .addPat...
[ "public", "SignUpRequest", "signUp", "(", "String", "email", ",", "String", "password", ",", "String", "connection", ")", "{", "Asserts", ".", "assertNotNull", "(", "email", ",", "\"email\"", ")", ";", "Asserts", ".", "assertNotNull", "(", "password", ",", "...
Creates a sign up request with the given credentials and database connection. i.e.: <pre> {@code AuthAPI auth = new AuthAPI("me.auth0.com", "B3c6RYhk1v9SbIJcRIOwu62gIUGsnze", "2679NfkaBn62e6w5E8zNEzjr-yWfkaBne"); try { Map<String, String> fields = new HashMap<String, String>(); fields.put("age", "25); fields.put("city"...
[ "Creates", "a", "sign", "up", "request", "with", "the", "given", "credentials", "and", "database", "connection", ".", "i", ".", "e", ".", ":", "<pre", ">", "{", "@code", "AuthAPI", "auth", "=", "new", "AuthAPI", "(", "me", ".", "auth0", ".", "com", "...
train
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/client/auth/AuthAPI.java#L285-L302
undertow-io/undertow
core/src/main/java/io/undertow/util/FlexBase64.java
FlexBase64.encodeString
public static String encodeString(byte[] source, boolean wrap) { """ Encodes a fixed and complete byte array into a Base64 String. <p>This method is only useful for applications which require a String and have all data to be encoded up-front. Note that byte arrays or buffers are almost always a better storage ...
java
public static String encodeString(byte[] source, boolean wrap) { return Encoder.encodeString(source, 0, source.length, wrap, false); }
[ "public", "static", "String", "encodeString", "(", "byte", "[", "]", "source", ",", "boolean", "wrap", ")", "{", "return", "Encoder", ".", "encodeString", "(", "source", ",", "0", ",", "source", ".", "length", ",", "wrap", ",", "false", ")", ";", "}" ]
Encodes a fixed and complete byte array into a Base64 String. <p>This method is only useful for applications which require a String and have all data to be encoded up-front. Note that byte arrays or buffers are almost always a better storage choice. They consume half the memory and can be reused (modified). In other w...
[ "Encodes", "a", "fixed", "and", "complete", "byte", "array", "into", "a", "Base64", "String", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/FlexBase64.java#L148-L150
defei/codelogger-utils
src/main/java/org/codelogger/utils/StringUtils.java
StringUtils.indexOfIgnoreCase
public static int indexOfIgnoreCase(final String source, final String target) { """ Returns the index within given source string of the first occurrence of the specified target string with ignore case sensitive. @param source source string to be tested. @param target target string to be tested. @return index...
java
public static int indexOfIgnoreCase(final String source, final String target) { int targetIndex = source.indexOf(target); if (targetIndex == INDEX_OF_NOT_FOUND) { String sourceLowerCase = source.toLowerCase(); String targetLowerCase = target.toLowerCase(); targetIndex = sourceLowerCase.indexO...
[ "public", "static", "int", "indexOfIgnoreCase", "(", "final", "String", "source", ",", "final", "String", "target", ")", "{", "int", "targetIndex", "=", "source", ".", "indexOf", "(", "target", ")", ";", "if", "(", "targetIndex", "==", "INDEX_OF_NOT_FOUND", ...
Returns the index within given source string of the first occurrence of the specified target string with ignore case sensitive. @param source source string to be tested. @param target target string to be tested. @return index number if found, -1 otherwise.
[ "Returns", "the", "index", "within", "given", "source", "string", "of", "the", "first", "occurrence", "of", "the", "specified", "target", "string", "with", "ignore", "case", "sensitive", "." ]
train
https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/StringUtils.java#L125-L136
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java
ReviewsImpl.addVideoFrameUrl
public void addVideoFrameUrl(String teamName, String reviewId, String contentType, List<VideoFrameBodyItem> videoFrameBody, AddVideoFrameUrlOptionalParameter addVideoFrameUrlOptionalParameter) { """ Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the ...
java
public void addVideoFrameUrl(String teamName, String reviewId, String contentType, List<VideoFrameBodyItem> videoFrameBody, AddVideoFrameUrlOptionalParameter addVideoFrameUrlOptionalParameter) { addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody, addVideoFrameUrlOptionalPar...
[ "public", "void", "addVideoFrameUrl", "(", "String", "teamName", ",", "String", "reviewId", ",", "String", "contentType", ",", "List", "<", "VideoFrameBodyItem", ">", "videoFrameBody", ",", "AddVideoFrameUrlOptionalParameter", "addVideoFrameUrlOptionalParameter", ")", "{"...
Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is ...
[ "Use", "this", "method", "to", "add", "frames", "for", "a", "video", "review", ".", "Timescale", ":", "This", "parameter", "is", "a", "factor", "which", "is", "used", "to", "convert", "the", "timestamp", "on", "a", "frame", "into", "milliseconds", ".", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java#L2181-L2183
tiesebarrell/process-assertions
process-assertions-api/src/main/java/org/toxos/processassertions/api/internal/MessageLogger.java
MessageLogger.logError
public final void logError(final Logger logger, final String messageKey, final Object... objects) { """ Logs a message by the provided key to the provided {@link Logger} at error level after substituting the parameters in the message by the provided objects. @param logger the logger to log to @param messageKey t...
java
public final void logError(final Logger logger, final String messageKey, final Object... objects) { logger.error(getMessage(messageKey, objects)); }
[ "public", "final", "void", "logError", "(", "final", "Logger", "logger", ",", "final", "String", "messageKey", ",", "final", "Object", "...", "objects", ")", "{", "logger", ".", "error", "(", "getMessage", "(", "messageKey", ",", "objects", ")", ")", ";", ...
Logs a message by the provided key to the provided {@link Logger} at error level after substituting the parameters in the message by the provided objects. @param logger the logger to log to @param messageKey the key of the message in the bundle @param objects the substitution parameters
[ "Logs", "a", "message", "by", "the", "provided", "key", "to", "the", "provided", "{" ]
train
https://github.com/tiesebarrell/process-assertions/blob/932a8443982e356cdf5a230165a35c725d9306ab/process-assertions-api/src/main/java/org/toxos/processassertions/api/internal/MessageLogger.java#L68-L70
allengeorge/libraft
libraft-agent/src/main/java/io/libraft/agent/RaftMember.java
RaftMember.compareAndSetChannel
public boolean compareAndSetChannel(@Nullable Channel oldChannel, @Nullable Channel newChannel) { """ Set the {@link Channel} used to communicate with the Raft server to {@code newChannel} <strong>only if</strong> the current channel is {@code oldChannel}. noop otherwise. @param oldChannel expected value of t...
java
public boolean compareAndSetChannel(@Nullable Channel oldChannel, @Nullable Channel newChannel) { return channel.compareAndSet(oldChannel, newChannel); }
[ "public", "boolean", "compareAndSetChannel", "(", "@", "Nullable", "Channel", "oldChannel", ",", "@", "Nullable", "Channel", "newChannel", ")", "{", "return", "channel", ".", "compareAndSet", "(", "oldChannel", ",", "newChannel", ")", ";", "}" ]
Set the {@link Channel} used to communicate with the Raft server to {@code newChannel} <strong>only if</strong> the current channel is {@code oldChannel}. noop otherwise. @param oldChannel expected value of the {@code Channel} @param newChannel a valid, <strong>connected</strong>d {@code Channel} to the Raft server. {...
[ "Set", "the", "{", "@link", "Channel", "}", "used", "to", "communicate", "with", "the", "Raft", "server", "to", "{", "@code", "newChannel", "}", "<strong", ">", "only", "if<", "/", "strong", ">", "the", "current", "channel", "is", "{", "@code", "oldChann...
train
https://github.com/allengeorge/libraft/blob/00d68bb5e68d4020af59df3c8a9a14380108ac89/libraft-agent/src/main/java/io/libraft/agent/RaftMember.java#L114-L116
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuGLGetDevices
public static int cuGLGetDevices(int pCudaDeviceCount[], CUdevice pCudaDevices[], int cudaDeviceCount, int CUGLDeviceList_deviceList) { """ Gets the CUDA devices associated with the current OpenGL context. <pre> CUresult cuGLGetDevices ( unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int ...
java
public static int cuGLGetDevices(int pCudaDeviceCount[], CUdevice pCudaDevices[], int cudaDeviceCount, int CUGLDeviceList_deviceList) { return checkResult(cuGLGetDevicesNative(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, CUGLDeviceList_deviceList)); }
[ "public", "static", "int", "cuGLGetDevices", "(", "int", "pCudaDeviceCount", "[", "]", ",", "CUdevice", "pCudaDevices", "[", "]", ",", "int", "cudaDeviceCount", ",", "int", "CUGLDeviceList_deviceList", ")", "{", "return", "checkResult", "(", "cuGLGetDevicesNative", ...
Gets the CUDA devices associated with the current OpenGL context. <pre> CUresult cuGLGetDevices ( unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList ) </pre> <div> <p>Gets the CUDA devices associated with the current OpenGL context. Returns in <tt>*pCudaDe...
[ "Gets", "the", "CUDA", "devices", "associated", "with", "the", "current", "OpenGL", "context", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L15187-L15190
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/CmsGalleryControllerHandler.java
CmsGalleryControllerHandler.onUpdateTypes
public void onUpdateTypes(List<CmsResourceTypeBean> types, List<String> selectedTypes) { """ Will be triggered when the sort parameters of the types list are changed.<p> @param types the updated types list @param selectedTypes the list of types to select """ m_galleryDialog.getTypesTab().updateCon...
java
public void onUpdateTypes(List<CmsResourceTypeBean> types, List<String> selectedTypes) { m_galleryDialog.getTypesTab().updateContent(types, selectedTypes); }
[ "public", "void", "onUpdateTypes", "(", "List", "<", "CmsResourceTypeBean", ">", "types", ",", "List", "<", "String", ">", "selectedTypes", ")", "{", "m_galleryDialog", ".", "getTypesTab", "(", ")", ".", "updateContent", "(", "types", ",", "selectedTypes", ")"...
Will be triggered when the sort parameters of the types list are changed.<p> @param types the updated types list @param selectedTypes the list of types to select
[ "Will", "be", "triggered", "when", "the", "sort", "parameters", "of", "the", "types", "list", "are", "changed", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/CmsGalleryControllerHandler.java#L407-L410
voldemort/voldemort
src/java/voldemort/store/readonly/io/jna/mman.java
mman.munmap
public static int munmap(Pointer addr, long len) throws IOException { """ Unmap the given region. Returns 0 on success or -1 (and sets errno) on failure. """ int result = Delegate.munmap(addr, new NativeLong(len)); if(result != 0) { if(logger.isDebugEnabled()) lo...
java
public static int munmap(Pointer addr, long len) throws IOException { int result = Delegate.munmap(addr, new NativeLong(len)); if(result != 0) { if(logger.isDebugEnabled()) logger.debug(errno.strerror()); throw new IOException("munmap failed: " + errno.strerror()); ...
[ "public", "static", "int", "munmap", "(", "Pointer", "addr", ",", "long", "len", ")", "throws", "IOException", "{", "int", "result", "=", "Delegate", ".", "munmap", "(", "addr", ",", "new", "NativeLong", "(", "len", ")", ")", ";", "if", "(", "result", ...
Unmap the given region. Returns 0 on success or -1 (and sets errno) on failure.
[ "Unmap", "the", "given", "region", ".", "Returns", "0", "on", "success", "or", "-", "1", "(", "and", "sets", "errno", ")", "on", "failure", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/store/readonly/io/jna/mman.java#L63-L75
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionImagesInner.java
VirtualMachineExtensionImagesInner.getAsync
public Observable<VirtualMachineExtensionImageInner> getAsync(String location, String publisherName, String type, String version) { """ Gets a virtual machine extension image. @param location The name of a supported Azure region. @param publisherName the String value @param type the String value @param versi...
java
public Observable<VirtualMachineExtensionImageInner> getAsync(String location, String publisherName, String type, String version) { return getWithServiceResponseAsync(location, publisherName, type, version).map(new Func1<ServiceResponse<VirtualMachineExtensionImageInner>, VirtualMachineExtensionImageInner>() { ...
[ "public", "Observable", "<", "VirtualMachineExtensionImageInner", ">", "getAsync", "(", "String", "location", ",", "String", "publisherName", ",", "String", "type", ",", "String", "version", ")", "{", "return", "getWithServiceResponseAsync", "(", "location", ",", "p...
Gets a virtual machine extension image. @param location The name of a supported Azure region. @param publisherName the String value @param type the String value @param version the String value @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VirtualMachineExtensio...
[ "Gets", "a", "virtual", "machine", "extension", "image", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionImagesInner.java#L110-L117