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
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/net/ForwardingClient.java
ForwardingClient.allowX11Forwarding
public void allowX11Forwarding(String display) throws SshException { """ Configure the forwarding client to manage X11 connections. This method will configure the {@link com.sshtools.ssh.SshClient} for X11 forwarding and will generate a fake cookie which will be used to spoof incoming X11 requests. When a reque...
java
public void allowX11Forwarding(String display) throws SshException { String homeDir = ""; try { homeDir = System.getProperty("user.home"); } catch (SecurityException e) { // ignore } allowX11Forwarding(display, new File(homeDir, ".Xauthority")); }
[ "public", "void", "allowX11Forwarding", "(", "String", "display", ")", "throws", "SshException", "{", "String", "homeDir", "=", "\"\"", ";", "try", "{", "homeDir", "=", "System", ".", "getProperty", "(", "\"user.home\"", ")", ";", "}", "catch", "(", "Securit...
Configure the forwarding client to manage X11 connections. This method will configure the {@link com.sshtools.ssh.SshClient} for X11 forwarding and will generate a fake cookie which will be used to spoof incoming X11 requests. When a request is received the fake cookie will be replaced in the authentication packet by a...
[ "Configure", "the", "forwarding", "client", "to", "manage", "X11", "connections", ".", "This", "method", "will", "configure", "the", "{", "@link", "com", ".", "sshtools", ".", "ssh", ".", "SshClient", "}", "for", "X11", "forwarding", "and", "will", "generate...
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/net/ForwardingClient.java#L709-L717
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java
CacheProxyUtil.validateNotNull
public static <K, V> void validateNotNull(K key, V value1, V value2) { """ Validates that key and multi values are not null. @param key the key to be validated. @param value1 first value to be validated. @param value2 second value to be validated. @param <K> the type of key. @param <V> the type of ...
java
public static <K, V> void validateNotNull(K key, V value1, V value2) { checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED); checkNotNull(value1, NULL_VALUE_IS_NOT_ALLOWED); checkNotNull(value2, NULL_VALUE_IS_NOT_ALLOWED); }
[ "public", "static", "<", "K", ",", "V", ">", "void", "validateNotNull", "(", "K", "key", ",", "V", "value1", ",", "V", "value2", ")", "{", "checkNotNull", "(", "key", ",", "NULL_KEY_IS_NOT_ALLOWED", ")", ";", "checkNotNull", "(", "value1", ",", "NULL_VAL...
Validates that key and multi values are not null. @param key the key to be validated. @param value1 first value to be validated. @param value2 second value to be validated. @param <K> the type of key. @param <V> the type of value. @throws java.lang.NullPointerException if key or any value is null.
[ "Validates", "that", "key", "and", "multi", "values", "are", "not", "null", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java#L102-L106
hankcs/HanLP
src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java
MDAG.getStringsEndingWith
public HashSet<String> getStringsEndingWith(String suffixStr) { """ 后缀查询<br> Retrieves all the Strings in the MDAG that begin with a given String. @param suffixStr a String that is the suffix for all the desired Strings @return a HashSet containing all the Strings present in the MDAG that end with {@code suff...
java
public HashSet<String> getStringsEndingWith(String suffixStr) { HashSet<String> strHashSet = new HashSet<String>(); if (sourceNode != null) //if the MDAG hasn't been simplified getStrings(strHashSet, SearchCondition.SUFFIX_SEARCH_CONDITION, suffixStr, "", sourceNode.getOutgoingTran...
[ "public", "HashSet", "<", "String", ">", "getStringsEndingWith", "(", "String", "suffixStr", ")", "{", "HashSet", "<", "String", ">", "strHashSet", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "if", "(", "sourceNode", "!=", "null", ")", "//i...
后缀查询<br> Retrieves all the Strings in the MDAG that begin with a given String. @param suffixStr a String that is the suffix for all the desired Strings @return a HashSet containing all the Strings present in the MDAG that end with {@code suffixStr}
[ "后缀查询<br", ">", "Retrieves", "all", "the", "Strings", "in", "the", "MDAG", "that", "begin", "with", "a", "given", "String", "." ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/collection/MDAG/MDAG.java#L996-L1006
Metatavu/edelphi
edelphi/src/main/java/fi/metatavu/edelphi/utils/GoogleDriveUtils.java
GoogleDriveUtils.exportSpreadsheet
public static DownloadResponse exportSpreadsheet(Drive drive, File file) throws IOException { """ Exports a spreadsheet in HTML format @param drive drive client @param file file to be exported @return Spreadsheet in HTML format @throws IOException thrown when exporting fails unexpectedly """ return e...
java
public static DownloadResponse exportSpreadsheet(Drive drive, File file) throws IOException { return exportSpreadsheet(drive, file.getId()); }
[ "public", "static", "DownloadResponse", "exportSpreadsheet", "(", "Drive", "drive", ",", "File", "file", ")", "throws", "IOException", "{", "return", "exportSpreadsheet", "(", "drive", ",", "file", ".", "getId", "(", ")", ")", ";", "}" ]
Exports a spreadsheet in HTML format @param drive drive client @param file file to be exported @return Spreadsheet in HTML format @throws IOException thrown when exporting fails unexpectedly
[ "Exports", "a", "spreadsheet", "in", "HTML", "format" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/utils/GoogleDriveUtils.java#L319-L321
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getSecretAsync
public ServiceFuture<SecretBundle> getSecretAsync(String vaultBaseUrl, String secretName, String secretVersion, final ServiceCallback<SecretBundle> serviceCallback) { """ Get a specified secret from a given key vault. The GET operation is applicable to any secret stored in Azure Key Vault. This operation requires...
java
public ServiceFuture<SecretBundle> getSecretAsync(String vaultBaseUrl, String secretName, String secretVersion, final ServiceCallback<SecretBundle> serviceCallback) { return ServiceFuture.fromResponse(getSecretWithServiceResponseAsync(vaultBaseUrl, secretName, secretVersion), serviceCallback); }
[ "public", "ServiceFuture", "<", "SecretBundle", ">", "getSecretAsync", "(", "String", "vaultBaseUrl", ",", "String", "secretName", ",", "String", "secretVersion", ",", "final", "ServiceCallback", "<", "SecretBundle", ">", "serviceCallback", ")", "{", "return", "Serv...
Get a specified secret from a given key vault. The GET operation is applicable to any secret stored in Azure Key Vault. This operation requires the secrets/get permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param secretName The name of the secret. @param secretVersion The...
[ "Get", "a", "specified", "secret", "from", "a", "given", "key", "vault", ".", "The", "GET", "operation", "is", "applicable", "to", "any", "secret", "stored", "in", "Azure", "Key", "Vault", ".", "This", "operation", "requires", "the", "secrets", "/", "get",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L3843-L3845
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigDecimalExtensions.java
BigDecimalExtensions.operator_multiply
@Pure @Inline(value="$1.multiply($2)") public static BigDecimal operator_multiply(BigDecimal a, BigDecimal b) { """ The binary <code>times</code> operator. @param a a BigDecimal. May not be <code>null</code>. @param b a BigDecimal. May not be <code>null</code>. @return <code>a.multiply(b)</code> @throws ...
java
@Pure @Inline(value="$1.multiply($2)") public static BigDecimal operator_multiply(BigDecimal a, BigDecimal b) { return a.multiply(b); }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"$1.multiply($2)\"", ")", "public", "static", "BigDecimal", "operator_multiply", "(", "BigDecimal", "a", ",", "BigDecimal", "b", ")", "{", "return", "a", ".", "multiply", "(", "b", ")", ";", "}" ]
The binary <code>times</code> operator. @param a a BigDecimal. May not be <code>null</code>. @param b a BigDecimal. May not be <code>null</code>. @return <code>a.multiply(b)</code> @throws NullPointerException if {@code a} or {@code b} is <code>null</code>.
[ "The", "binary", "<code", ">", "times<", "/", "code", ">", "operator", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/BigDecimalExtensions.java#L100-L104
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java
TableSession.createDatabaseSession
public DatabaseSession createDatabaseSession(BaseDatabase database, Map<String, Object> properties) throws RemoteException { """ Create a session for this database (and place it in the right spot in the session hierarchy) @param database @param properties @return @throws RemoteException """ Databas...
java
public DatabaseSession createDatabaseSession(BaseDatabase database, Map<String, Object> properties) throws RemoteException { DatabaseSession remoteDatabase = null; Map<String,Object> propOld = this.getProperties(); this.setProperties(properties); DatabaseOwner databaseOwner = databas...
[ "public", "DatabaseSession", "createDatabaseSession", "(", "BaseDatabase", "database", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "throws", "RemoteException", "{", "DatabaseSession", "remoteDatabase", "=", "null", ";", "Map", "<", "String", ...
Create a session for this database (and place it in the right spot in the session hierarchy) @param database @param properties @return @throws RemoteException
[ "Create", "a", "session", "for", "this", "database", "(", "and", "place", "it", "in", "the", "right", "spot", "in", "the", "session", "hierarchy", ")" ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java#L990-L1006
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java
AiMaterial.getTextureMagFilter
public Integer getTextureMagFilter(AiTextureType type, int index) { """ Returns the texture magnification filter If missing, defaults to {@link GL_LINEAR } @param type the texture type @param index the index in the texture stack @return the texture magnification filter """ checkTexRange(type, i...
java
public Integer getTextureMagFilter(AiTextureType type, int index) { checkTexRange(type, index); Property p = getProperty(PropertyKey.TEX_MAG_FILTER.m_key); if (null == p || null == p.getData()) { return (Integer) m_defaults.get(PropertyKey.TEX_MAG_FILTER); } Object ...
[ "public", "Integer", "getTextureMagFilter", "(", "AiTextureType", "type", ",", "int", "index", ")", "{", "checkTexRange", "(", "type", ",", "index", ")", ";", "Property", "p", "=", "getProperty", "(", "PropertyKey", ".", "TEX_MAG_FILTER", ".", "m_key", ")", ...
Returns the texture magnification filter If missing, defaults to {@link GL_LINEAR } @param type the texture type @param index the index in the texture stack @return the texture magnification filter
[ "Returns", "the", "texture", "magnification", "filter" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java#L1051-L1069
OpenVidu/openvidu
openvidu-server/src/main/java/io/openvidu/server/recording/service/RecordingService.java
RecordingService.setFinalRecordingNameAndGetFreeRecordingId
protected PropertiesRecordingId setFinalRecordingNameAndGetFreeRecordingId(Session session, RecordingProperties properties) { """ Returns a new available recording identifier (adding a number tag at the end of the sessionId if it already exists) and rebuilds RecordinProperties object to set the final value of...
java
protected PropertiesRecordingId setFinalRecordingNameAndGetFreeRecordingId(Session session, RecordingProperties properties) { String recordingId = this.recordingManager.getFreeRecordingId(session.getSessionId(), this.getShortSessionId(session)); if (properties.name() == null || properties.name().isEmpty()) {...
[ "protected", "PropertiesRecordingId", "setFinalRecordingNameAndGetFreeRecordingId", "(", "Session", "session", ",", "RecordingProperties", "properties", ")", "{", "String", "recordingId", "=", "this", ".", "recordingManager", ".", "getFreeRecordingId", "(", "session", ".", ...
Returns a new available recording identifier (adding a number tag at the end of the sessionId if it already exists) and rebuilds RecordinProperties object to set the final value of "name" property
[ "Returns", "a", "new", "available", "recording", "identifier", "(", "adding", "a", "number", "tag", "at", "the", "end", "of", "the", "sessionId", "if", "it", "already", "exists", ")", "and", "rebuilds", "RecordinProperties", "object", "to", "set", "the", "fi...
train
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-server/src/main/java/io/openvidu/server/recording/service/RecordingService.java#L120-L142
kamranzafar/jtar
src/main/java/org/kamranzafar/jtar/TarHeader.java
TarHeader.createHeader
public static TarHeader createHeader(String entryName, long size, long modTime, boolean dir, int permissions) { """ Creates a new header for a file/directory entry. @param entryName File name @param size File size in bytes @param modTime Last modification time in numeric Unix time format @param dir Is ...
java
public static TarHeader createHeader(String entryName, long size, long modTime, boolean dir, int permissions) { String name = entryName; name = TarUtils.trim(name.replace(File.separatorChar, '/'), '/'); TarHeader header = new TarHeader(); header.linkName = new StringBuffer(""); header.mode = permission...
[ "public", "static", "TarHeader", "createHeader", "(", "String", "entryName", ",", "long", "size", ",", "long", "modTime", ",", "boolean", "dir", ",", "int", "permissions", ")", "{", "String", "name", "=", "entryName", ";", "name", "=", "TarUtils", ".", "tr...
Creates a new header for a file/directory entry. @param entryName File name @param size File size in bytes @param modTime Last modification time in numeric Unix time format @param dir Is directory
[ "Creates", "a", "new", "header", "for", "a", "file", "/", "directory", "entry", "." ]
train
https://github.com/kamranzafar/jtar/blob/aace0a3c8a6478fd1bac95865c27535e658afb73/src/main/java/org/kamranzafar/jtar/TarHeader.java#L205-L236
stratosphere/stratosphere
stratosphere-addons/jdbc/src/main/java/eu/stratosphere/api/java/io/jdbc/JDBCInputFormat.java
JDBCInputFormat.nextRecord
@Override public OUT nextRecord(OUT tuple) throws IOException { """ Stores the next resultSet row in a tuple @param tuple @return tuple containing next row @throws java.io.IOException """ try { resultSet.next(); if (columnTypes == null) { extractTypes(tuple); } addValue(tuple); retur...
java
@Override public OUT nextRecord(OUT tuple) throws IOException { try { resultSet.next(); if (columnTypes == null) { extractTypes(tuple); } addValue(tuple); return tuple; } catch (SQLException se) { close(); throw new IOException("Couldn't read data - " + se.getMessage(), se); } catch (Nul...
[ "@", "Override", "public", "OUT", "nextRecord", "(", "OUT", "tuple", ")", "throws", "IOException", "{", "try", "{", "resultSet", ".", "next", "(", ")", ";", "if", "(", "columnTypes", "==", "null", ")", "{", "extractTypes", "(", "tuple", ")", ";", "}", ...
Stores the next resultSet row in a tuple @param tuple @return tuple containing next row @throws java.io.IOException
[ "Stores", "the", "next", "resultSet", "row", "in", "a", "tuple" ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-addons/jdbc/src/main/java/eu/stratosphere/api/java/io/jdbc/JDBCInputFormat.java#L151-L167
Netflix/Nicobar
nicobar-core/src/main/java/com/netflix/nicobar/core/utils/ClassPathUtils.java
ClassPathUtils.findRootPathForResource
@Nullable public static Path findRootPathForResource(String resourceName, ClassLoader classLoader) { """ Find the root path for the given resource. If the resource is found in a Jar file, then the result will be an absolute path to the jar file. If the resource is found in a directory, then the result will b...
java
@Nullable public static Path findRootPathForResource(String resourceName, ClassLoader classLoader) { Objects.requireNonNull(resourceName, "resourceName"); Objects.requireNonNull(classLoader, "classLoader"); URL resource = classLoader.getResource(resourceName); if (resource != null)...
[ "@", "Nullable", "public", "static", "Path", "findRootPathForResource", "(", "String", "resourceName", ",", "ClassLoader", "classLoader", ")", "{", "Objects", ".", "requireNonNull", "(", "resourceName", ",", "\"resourceName\"", ")", ";", "Objects", ".", "requireNonN...
Find the root path for the given resource. If the resource is found in a Jar file, then the result will be an absolute path to the jar file. If the resource is found in a directory, then the result will be the parent path of the given resource. For example, if the resourceName is given as "scripts/myscript.groovy", an...
[ "Find", "the", "root", "path", "for", "the", "given", "resource", ".", "If", "the", "resource", "is", "found", "in", "a", "Jar", "file", "then", "the", "result", "will", "be", "an", "absolute", "path", "to", "the", "jar", "file", ".", "If", "the", "r...
train
https://github.com/Netflix/Nicobar/blob/507173dcae4a86a955afc3df222a855862fab8d7/nicobar-core/src/main/java/com/netflix/nicobar/core/utils/ClassPathUtils.java#L66-L83
roboconf/roboconf-platform
miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java
CompletionUtils.basicProposal
public static RoboconfCompletionProposal basicProposal( String s, String lastWord, boolean trim ) { """ A convenience method to shorten the creation of a basic proposal. @param s @param lastWord @param trim @return a non-null proposal """ return new RoboconfCompletionProposal( s, trim ? s.trim() : s, nul...
java
public static RoboconfCompletionProposal basicProposal( String s, String lastWord, boolean trim ) { return new RoboconfCompletionProposal( s, trim ? s.trim() : s, null, lastWord.length()); }
[ "public", "static", "RoboconfCompletionProposal", "basicProposal", "(", "String", "s", ",", "String", "lastWord", ",", "boolean", "trim", ")", "{", "return", "new", "RoboconfCompletionProposal", "(", "s", ",", "trim", "?", "s", ".", "trim", "(", ")", ":", "s...
A convenience method to shorten the creation of a basic proposal. @param s @param lastWord @param trim @return a non-null proposal
[ "A", "convenience", "method", "to", "shorten", "the", "creation", "of", "a", "basic", "proposal", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java#L146-L148
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/FtpFileUtil.java
FtpFileUtil.uploadFileToFTPServer
public static String uploadFileToFTPServer(String hostName, Integer port, String userName, String password, String localFileFullName, String remotePath) { """ Upload a given file to FTP server. @param hostName the FTP server host name to connect @param port the port ...
java
public static String uploadFileToFTPServer(String hostName, Integer port, String userName, String password, String localFileFullName, String remotePath) { String result = null; FTPClient ftpClient = new FTPClient(); String errorMessage = "Unable to ...
[ "public", "static", "String", "uploadFileToFTPServer", "(", "String", "hostName", ",", "Integer", "port", ",", "String", "userName", ",", "String", "password", ",", "String", "localFileFullName", ",", "String", "remotePath", ")", "{", "String", "result", "=", "n...
Upload a given file to FTP server. @param hostName the FTP server host name to connect @param port the port to connect @param userName the user name @param password the password @param localFileFullName the full name (inclusive path) of the local file. @param remotePath the path to the file on the FTP. @return reply st...
[ "Upload", "a", "given", "file", "to", "FTP", "server", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/FtpFileUtil.java#L95-L130
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_easyHunting_serviceName_sound_soundId_DELETE
public void billingAccount_easyHunting_serviceName_sound_soundId_DELETE(String billingAccount, String serviceName, Long soundId) throws IOException { """ Delete the given sound REST: DELETE /telephony/{billingAccount}/easyHunting/{serviceName}/sound/{soundId} @param billingAccount [required] The name of your b...
java
public void billingAccount_easyHunting_serviceName_sound_soundId_DELETE(String billingAccount, String serviceName, Long soundId) throws IOException { String qPath = "/telephony/{billingAccount}/easyHunting/{serviceName}/sound/{soundId}"; StringBuilder sb = path(qPath, billingAccount, serviceName, soundId); exec(q...
[ "public", "void", "billingAccount_easyHunting_serviceName_sound_soundId_DELETE", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "soundId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/easyHunting/{service...
Delete the given sound REST: DELETE /telephony/{billingAccount}/easyHunting/{serviceName}/sound/{soundId} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param soundId [required]
[ "Delete", "the", "given", "sound" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L2228-L2232
OpenTSDB/opentsdb
src/tsd/QueryRpc.java
QueryRpc.parseRateOptions
static final public RateOptions parseRateOptions(final boolean rate, final String spec) { """ Parses the "rate" section of the query string and returns an instance of the RateOptions class that contains the values found. <p/> The format of the rate specification is rate[{counter[,#[,#]]}]. @param rate I...
java
static final public RateOptions parseRateOptions(final boolean rate, final String spec) { if (!rate || spec.length() == 4) { return new RateOptions(false, Long.MAX_VALUE, RateOptions.DEFAULT_RESET_VALUE); } if (spec.length() < 6) { throw new BadRequestException("Invalid r...
[ "static", "final", "public", "RateOptions", "parseRateOptions", "(", "final", "boolean", "rate", ",", "final", "String", "spec", ")", "{", "if", "(", "!", "rate", "||", "spec", ".", "length", "(", ")", "==", "4", ")", "{", "return", "new", "RateOptions",...
Parses the "rate" section of the query string and returns an instance of the RateOptions class that contains the values found. <p/> The format of the rate specification is rate[{counter[,#[,#]]}]. @param rate If true, then the query is set as a rate query and the rate specification will be parsed. If false, a default R...
[ "Parses", "the", "rate", "section", "of", "the", "query", "string", "and", "returns", "an", "instance", "of", "the", "RateOptions", "class", "that", "contains", "the", "values", "found", ".", "<p", "/", ">", "The", "format", "of", "the", "rate", "specifica...
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/QueryRpc.java#L758-L797
ow2-chameleon/fuchsia
bases/knx/calimero/src/main/java/tuwien/auto/calimero/Settings.java
Settings.getBundle
private static String getBundle(String friendlyName, String className, int truncate) { """ to check availability, then class name is truncated to bundle id """ try { cl.loadClass(className); int start = className.length(); for (int i = 0; i < truncate; ++i) start = className.lastIndexOf('.'...
java
private static String getBundle(String friendlyName, String className, int truncate) { try { cl.loadClass(className); int start = className.length(); for (int i = 0; i < truncate; ++i) start = className.lastIndexOf('.', start - 1); final String bundle = className.substring(0, start); retur...
[ "private", "static", "String", "getBundle", "(", "String", "friendlyName", ",", "String", "className", ",", "int", "truncate", ")", "{", "try", "{", "cl", ".", "loadClass", "(", "className", ")", ";", "int", "start", "=", "className", ".", "length", "(", ...
to check availability, then class name is truncated to bundle id
[ "to", "check", "availability", "then", "class", "name", "is", "truncated", "to", "bundle", "id" ]
train
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/Settings.java#L188-L201
jensgerdes/sonar-pmd
sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRuleSet.java
PmdRuleSet.writeTo
public void writeTo(Writer destination) { """ Serializes this RuleSet in an XML document. @param destination The writer to which the XML document shall be written. """ Element eltRuleset = new Element("ruleset"); addAttribute(eltRuleset, "name", name); addChild(eltRuleset, "descripti...
java
public void writeTo(Writer destination) { Element eltRuleset = new Element("ruleset"); addAttribute(eltRuleset, "name", name); addChild(eltRuleset, "description", description); for (PmdRule pmdRule : rules) { Element eltRule = new Element("rule"); addAttribute(elt...
[ "public", "void", "writeTo", "(", "Writer", "destination", ")", "{", "Element", "eltRuleset", "=", "new", "Element", "(", "\"ruleset\"", ")", ";", "addAttribute", "(", "eltRuleset", ",", "\"name\"", ",", "name", ")", ";", "addChild", "(", "eltRuleset", ",", ...
Serializes this RuleSet in an XML document. @param destination The writer to which the XML document shall be written.
[ "Serializes", "this", "RuleSet", "in", "an", "XML", "document", "." ]
train
https://github.com/jensgerdes/sonar-pmd/blob/49b9272b2a71aa1b480972ec6cb4cc347bb50959/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/xml/PmdRuleSet.java#L76-L102
asterisk-java/asterisk-java
src/main/java/org/asteriskjava/manager/action/OriginateAction.java
OriginateAction.setVariable
@Deprecated public void setVariable(String variable) { """ Sets the variables to set on the originated call. <p> Variable assignments are of the form "VARNAME=VALUE". You can specify multiple variable assignments separated by the '|' character. <p> Example: "VAR1=abc|VAR2=def" sets the channel variables V...
java
@Deprecated public void setVariable(String variable) { final StringTokenizer st; if (variable == null) { this.variables = null; return; } st = new StringTokenizer(variable, "|"); variables = new LinkedHashMap<>(); while (st.hasMor...
[ "@", "Deprecated", "public", "void", "setVariable", "(", "String", "variable", ")", "{", "final", "StringTokenizer", "st", ";", "if", "(", "variable", "==", "null", ")", "{", "this", ".", "variables", "=", "null", ";", "return", ";", "}", "st", "=", "n...
Sets the variables to set on the originated call. <p> Variable assignments are of the form "VARNAME=VALUE". You can specify multiple variable assignments separated by the '|' character. <p> Example: "VAR1=abc|VAR2=def" sets the channel variables VAR1 to "abc" and VAR2 to "def". @deprecated use {@link #setVariables(Map...
[ "Sets", "the", "variables", "to", "set", "on", "the", "originated", "call", ".", "<p", ">", "Variable", "assignments", "are", "of", "the", "form", "VARNAME", "=", "VALUE", ".", "You", "can", "specify", "multiple", "variable", "assignments", "separated", "by"...
train
https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/action/OriginateAction.java#L393-L420
hal/elemento
core/src/main/java/org/jboss/gwt/elemento/core/Elements.java
Elements.setVisible
public static void setVisible(HTMLElement element, boolean visible) { """ Shows / hide the specified element by modifying the {@code display} property. """ if (element != null) { element.style.display = visible ? "" : "none"; } }
java
public static void setVisible(HTMLElement element, boolean visible) { if (element != null) { element.style.display = visible ? "" : "none"; } }
[ "public", "static", "void", "setVisible", "(", "HTMLElement", "element", ",", "boolean", "visible", ")", "{", "if", "(", "element", "!=", "null", ")", "{", "element", ".", "style", ".", "display", "=", "visible", "?", "\"\"", ":", "\"none\"", ";", "}", ...
Shows / hide the specified element by modifying the {@code display} property.
[ "Shows", "/", "hide", "the", "specified", "element", "by", "modifying", "the", "{" ]
train
https://github.com/hal/elemento/blob/26da2d5a1fe2ec55b779737dbaeda25a942eee61/core/src/main/java/org/jboss/gwt/elemento/core/Elements.java#L780-L784
digitalfondue/stampo
src/main/java/ch/digitalfondue/stampo/processor/IncludeAllPaginator.java
IncludeAllPaginator.handleDepth0Page
private List<IncludeAllPage> handleDepth0Page(List<IncludeAllPage> pages, FileResource resource, int maxDepth, Path defaultOutputPath) { """ /* It's a special case: depth 0 represent the page with the include-all directive. We let the user decide if he want to render it (default: yes). Additionally we handle the...
java
private List<IncludeAllPage> handleDepth0Page(List<IncludeAllPage> pages, FileResource resource, int maxDepth, Path defaultOutputPath) { boolean skipDepth0 = (boolean) resource.getMetadata().getRawMap().getOrDefault("ignore-depth-0-page", false); if (maxDepth == 0) { List<FileResource> files = new A...
[ "private", "List", "<", "IncludeAllPage", ">", "handleDepth0Page", "(", "List", "<", "IncludeAllPage", ">", "pages", ",", "FileResource", "resource", ",", "int", "maxDepth", ",", "Path", "defaultOutputPath", ")", "{", "boolean", "skipDepth0", "=", "(", "boolean"...
/* It's a special case: depth 0 represent the page with the include-all directive. We let the user decide if he want to render it (default: yes). Additionally we handle the case where maxDepth is 0, we should transfer the IncludeAllPage object under the page that have the include-all directive.
[ "/", "*", "It", "s", "a", "special", "case", ":", "depth", "0", "represent", "the", "page", "with", "the", "include", "-", "all", "directive", ".", "We", "let", "the", "user", "decide", "if", "he", "want", "to", "render", "it", "(", "default", ":", ...
train
https://github.com/digitalfondue/stampo/blob/5a41f20acd9211cf3951c30d0e0825994ae95573/src/main/java/ch/digitalfondue/stampo/processor/IncludeAllPaginator.java#L193-L210
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/hc/ext/HCExtHelper.java
HCExtHelper.nl2divList
public static void nl2divList (@Nullable final String sText, @Nonnull final Consumer <? super HCDiv> aTarget) { """ Convert the passed text to a list of &lt;div&gt; elements. Each \n is used to split the text into separate lines. \r characters are removed from the string! Empty lines are preserved except for the...
java
public static void nl2divList (@Nullable final String sText, @Nonnull final Consumer <? super HCDiv> aTarget) { forEachLine (sText, (sLine, bLast) -> aTarget.accept (new HCDiv ().addChild (sLine))); }
[ "public", "static", "void", "nl2divList", "(", "@", "Nullable", "final", "String", "sText", ",", "@", "Nonnull", "final", "Consumer", "<", "?", "super", "HCDiv", ">", "aTarget", ")", "{", "forEachLine", "(", "sText", ",", "(", "sLine", ",", "bLast", ")",...
Convert the passed text to a list of &lt;div&gt; elements. Each \n is used to split the text into separate lines. \r characters are removed from the string! Empty lines are preserved except for the last line. E.g. <code>Hello\nworld</code> results in 2 &lt;div&gt;s: &lt;div&gt;Hello&lt;/div&gt; and &lt;div&gt;world&lt;...
[ "Convert", "the", "passed", "text", "to", "a", "list", "of", "&lt", ";", "div&gt", ";", "elements", ".", "Each", "\\", "n", "is", "used", "to", "split", "the", "text", "into", "separate", "lines", ".", "\\", "r", "characters", "are", "removed", "from",...
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/hc/ext/HCExtHelper.java#L516-L519
redisson/redisson
redisson/src/main/java/org/redisson/spring/cache/CacheConfig.java
CacheConfig.toYAML
public static String toYAML(Map<String, ? extends CacheConfig> config) throws IOException { """ Convert current configuration to YAML format @param config map @return yaml string @throws IOException error """ return new CacheConfigSupport().toYAML(config); }
java
public static String toYAML(Map<String, ? extends CacheConfig> config) throws IOException { return new CacheConfigSupport().toYAML(config); }
[ "public", "static", "String", "toYAML", "(", "Map", "<", "String", ",", "?", "extends", "CacheConfig", ">", "config", ")", "throws", "IOException", "{", "return", "new", "CacheConfigSupport", "(", ")", ".", "toYAML", "(", "config", ")", ";", "}" ]
Convert current configuration to YAML format @param config map @return yaml string @throws IOException error
[ "Convert", "current", "configuration", "to", "YAML", "format" ]
train
https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/spring/cache/CacheConfig.java#L234-L236
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerHandlerImpl.java
TransformerHandlerImpl.startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException { """ Filter a start Namespace prefix mapping event. @param prefix The Namespace prefix. @param uri The Namespace URI. @throws SAXException The client may throw an exception during processing. @see org.xml.sax.ContentHan...
java
public void startPrefixMapping(String prefix, String uri) throws SAXException { if (DEBUG) System.out.println("TransformerHandlerImpl#startPrefixMapping: " + prefix + ", " + uri); if (m_contentHandler != null) { m_contentHandler.startPrefixMapping(prefix, u...
[ "public", "void", "startPrefixMapping", "(", "String", "prefix", ",", "String", "uri", ")", "throws", "SAXException", "{", "if", "(", "DEBUG", ")", "System", ".", "out", ".", "println", "(", "\"TransformerHandlerImpl#startPrefixMapping: \"", "+", "prefix", "+", ...
Filter a start Namespace prefix mapping event. @param prefix The Namespace prefix. @param uri The Namespace URI. @throws SAXException The client may throw an exception during processing. @see org.xml.sax.ContentHandler#startPrefixMapping
[ "Filter", "a", "start", "Namespace", "prefix", "mapping", "event", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerHandlerImpl.java#L443-L455
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/growl/GrowlRenderer.java
GrowlRenderer.encodeSeverityMessage
private void encodeSeverityMessage(FacesContext facesContext, Growl uiGrowl, FacesMessage msg) throws IOException { """ Encode single faces message as growl @param facesContext @param uiGrowl @param msg @throws IOException """ ResponseWriter writer = facesContext.getResponseWriter(); ...
java
private void encodeSeverityMessage(FacesContext facesContext, Growl uiGrowl, FacesMessage msg) throws IOException { ResponseWriter writer = facesContext.getResponseWriter(); String summary = msg.getSummary() != null ? msg.getSummary() : ""; String detail = msg.getDetail() != null ? msg.get...
[ "private", "void", "encodeSeverityMessage", "(", "FacesContext", "facesContext", ",", "Growl", "uiGrowl", ",", "FacesMessage", "msg", ")", "throws", "IOException", "{", "ResponseWriter", "writer", "=", "facesContext", ".", "getResponseWriter", "(", ")", ";", "String...
Encode single faces message as growl @param facesContext @param uiGrowl @param msg @throws IOException
[ "Encode", "single", "faces", "message", "as", "growl" ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/growl/GrowlRenderer.java#L104-L163
undertow-io/undertow
core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/NodePingUtil.java
NodePingUtil.pingHost
static void pingHost(InetSocketAddress address, HttpServerExchange exchange, PingCallback callback, OptionMap options) { """ Try to open a socket connection to given address. @param address the socket address @param exchange the http servers exchange @param callback the ping callback @param options...
java
static void pingHost(InetSocketAddress address, HttpServerExchange exchange, PingCallback callback, OptionMap options) { final XnioIoThread thread = exchange.getIoThread(); final XnioWorker worker = thread.getWorker(); final HostPingTask r = new HostPingTask(address, worker, callback, options);...
[ "static", "void", "pingHost", "(", "InetSocketAddress", "address", ",", "HttpServerExchange", "exchange", ",", "PingCallback", "callback", ",", "OptionMap", "options", ")", "{", "final", "XnioIoThread", "thread", "=", "exchange", ".", "getIoThread", "(", ")", ";",...
Try to open a socket connection to given address. @param address the socket address @param exchange the http servers exchange @param callback the ping callback @param options the options
[ "Try", "to", "open", "a", "socket", "connection", "to", "given", "address", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/NodePingUtil.java#L83-L91
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/bind/BindUploader.java
BindUploader.putBinds
private void putBinds() throws BindException { """ Upload binds from local file to stage @throws BindException if uploading the binds fails """ createStageIfNeeded(); String putStatement = getPutStmt(bindDir.toString(), stagePath); for (int i = 0; i < PUT_RETRY_COUNT; i++) { try ...
java
private void putBinds() throws BindException { createStageIfNeeded(); String putStatement = getPutStmt(bindDir.toString(), stagePath); for (int i = 0; i < PUT_RETRY_COUNT; i++) { try { SFStatement statement = new SFStatement(session); SFBaseResultSet putResult = statement...
[ "private", "void", "putBinds", "(", ")", "throws", "BindException", "{", "createStageIfNeeded", "(", ")", ";", "String", "putStatement", "=", "getPutStmt", "(", "bindDir", ".", "toString", "(", ")", ",", "stagePath", ")", ";", "for", "(", "int", "i", "=", ...
Upload binds from local file to stage @throws BindException if uploading the binds fails
[ "Upload", "binds", "from", "local", "file", "to", "stage" ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/bind/BindUploader.java#L424-L457
JodaOrg/joda-convert
src/main/java/org/joda/convert/StringConvert.java
StringConvert.convertToString
public String convertToString(Class<?> cls, Object object) { """ Converts the specified object to a {@code String}. <p> This uses {@link #findConverter} to provide the converter. The class can be provided to select a more specific converter. @param cls the class to convert from, not null @param object the...
java
public String convertToString(Class<?> cls, Object object) { if (object == null) { return null; } StringConverter<Object> conv = findConverterNoGenerics(cls); return conv.convertToString(object); }
[ "public", "String", "convertToString", "(", "Class", "<", "?", ">", "cls", ",", "Object", "object", ")", "{", "if", "(", "object", "==", "null", ")", "{", "return", "null", ";", "}", "StringConverter", "<", "Object", ">", "conv", "=", "findConverterNoGen...
Converts the specified object to a {@code String}. <p> This uses {@link #findConverter} to provide the converter. The class can be provided to select a more specific converter. @param cls the class to convert from, not null @param object the object to convert, null returns null @return the converted string, may be n...
[ "Converts", "the", "specified", "object", "to", "a", "{", "@code", "String", "}", ".", "<p", ">", "This", "uses", "{", "@link", "#findConverter", "}", "to", "provide", "the", "converter", ".", "The", "class", "can", "be", "provided", "to", "select", "a",...
train
https://github.com/JodaOrg/joda-convert/blob/266bd825f4550590d5dafdf4225c548559e0633b/src/main/java/org/joda/convert/StringConvert.java#L422-L428
js-lib-com/commons
src/main/java/js/util/Types.java
Types.isInstanceOf
public static boolean isInstanceOf(Object o, Type t) { """ Test if object instance is not null and extends or implements expected type. This predicate consider primitive and related boxing types as equivalent, e.g. <code>1.23</code> is instance of {@link Double}. @param o object instance to test, possible null...
java
public static boolean isInstanceOf(Object o, Type t) { if(o == null) { return false; } if(t instanceof Class) { Class<?> clazz = (Class<?>)t; if(clazz.isPrimitive()) { return BOXING_MAP.get(clazz) == o.getClass(); } return clazz.isInstance(o); } re...
[ "public", "static", "boolean", "isInstanceOf", "(", "Object", "o", ",", "Type", "t", ")", "{", "if", "(", "o", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "t", "instanceof", "Class", ")", "{", "Class", "<", "?", ">", "clazz", ...
Test if object instance is not null and extends or implements expected type. This predicate consider primitive and related boxing types as equivalent, e.g. <code>1.23</code> is instance of {@link Double}. @param o object instance to test, possible null, @param t expected type. @return true if instance is not null and ...
[ "Test", "if", "object", "instance", "is", "not", "null", "and", "extends", "or", "implements", "expected", "type", ".", "This", "predicate", "consider", "primitive", "and", "related", "boxing", "types", "as", "equivalent", "e", ".", "g", ".", "<code", ">", ...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Types.java#L170-L183
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java
ComputeNodeOperations.getComputeNode
public ComputeNode getComputeNode(String poolId, String nodeId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Gets the specified compute node. @param poolId The ID of the pool. @param nodeId The ID of the compute node to get from the p...
java
public ComputeNode getComputeNode(String poolId, String nodeId, DetailLevel detailLevel, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { ComputeNodeGetOptions options = new ComputeNodeGetOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehavi...
[ "public", "ComputeNode", "getComputeNode", "(", "String", "poolId", ",", "String", "nodeId", ",", "DetailLevel", "detailLevel", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "Com...
Gets the specified compute node. @param poolId The ID of the pool. @param nodeId The ID of the compute node to get from the pool. @param detailLevel A {@link DetailLevel} used for controlling which properties are retrieved from the service. @param additionalBehaviors A collection of {@link BatchClientBehavior} instanc...
[ "Gets", "the", "specified", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java#L259-L266
googleapis/google-cloud-java
google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java
ProductSearchClient.removeProductFromProductSet
public final void removeProductFromProductSet(ProductSetName name, String product) { """ Removes a Product from the specified ProductSet. <p>Possible errors: <p>&#42; Returns NOT_FOUND If the Product is not found under the ProductSet. <p>Sample code: <pre><code> try (ProductSearchClient productSearchC...
java
public final void removeProductFromProductSet(ProductSetName name, String product) { RemoveProductFromProductSetRequest request = RemoveProductFromProductSetRequest.newBuilder() .setName(name == null ? null : name.toString()) .setProduct(product) .build(); removeProd...
[ "public", "final", "void", "removeProductFromProductSet", "(", "ProductSetName", "name", ",", "String", "product", ")", "{", "RemoveProductFromProductSetRequest", "request", "=", "RemoveProductFromProductSetRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "na...
Removes a Product from the specified ProductSet. <p>Possible errors: <p>&#42; Returns NOT_FOUND If the Product is not found under the ProductSet. <p>Sample code: <pre><code> try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { ProductSetName name = ProductSetName.of("[PROJECT]", "[LOCATION...
[ "Removes", "a", "Product", "from", "the", "specified", "ProductSet", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchClient.java#L2214-L2222
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/ExtractHandler.java
ExtractHandler.openTag
private void openTag(String qName, Attributes atts) { """ Append an open tag with the given specification to the result buffer. @param qName Tag's qualified name. @param atts Tag's attributes. """ this.result.append('<').append(qName); for (int i = 0; i < atts.getLength(); i++) { ...
java
private void openTag(String qName, Attributes atts) { this.result.append('<').append(qName); for (int i = 0; i < atts.getLength(); i++) { this.result.append(' ').append(atts.getQName(i)).append("=\"").append(atts.getValue(i)).append('\"'); } this.result.append('>'); }
[ "private", "void", "openTag", "(", "String", "qName", ",", "Attributes", "atts", ")", "{", "this", ".", "result", ".", "append", "(", "'", "'", ")", ".", "append", "(", "qName", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "atts", ...
Append an open tag with the given specification to the result buffer. @param qName Tag's qualified name. @param atts Tag's attributes.
[ "Append", "an", "open", "tag", "with", "the", "given", "specification", "to", "the", "result", "buffer", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/ExtractHandler.java#L169-L176
OpenTSDB/opentsdb
src/tsd/HttpJsonSerializer.java
HttpJsonSerializer.formatJVMStatsV1
public ChannelBuffer formatJVMStatsV1(final Map<String, Map<String, Object>> stats) { """ Format a list of JVM statistics @param stats The JVM stats map to format @return A ChannelBuffer object to pass on to the caller @throws JSONException if serialization failed @since 2.2 """ return serializeJSON(st...
java
public ChannelBuffer formatJVMStatsV1(final Map<String, Map<String, Object>> stats) { return serializeJSON(stats); }
[ "public", "ChannelBuffer", "formatJVMStatsV1", "(", "final", "Map", "<", "String", ",", "Map", "<", "String", ",", "Object", ">", ">", "stats", ")", "{", "return", "serializeJSON", "(", "stats", ")", ";", "}" ]
Format a list of JVM statistics @param stats The JVM stats map to format @return A ChannelBuffer object to pass on to the caller @throws JSONException if serialization failed @since 2.2
[ "Format", "a", "list", "of", "JVM", "statistics" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/HttpJsonSerializer.java#L1159-L1161
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsInner.java
WorkItemConfigurationsInner.getDefault
public WorkItemConfigurationInner getDefault(String resourceGroupName, String resourceName) { """ Gets default work item configurations that exist for the application. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @throws ...
java
public WorkItemConfigurationInner getDefault(String resourceGroupName, String resourceName) { return getDefaultWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); }
[ "public", "WorkItemConfigurationInner", "getDefault", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "getDefaultWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", ".", "toBlocking", "(", ")", ".", "sing...
Gets default work item configurations that exist for the application. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the requ...
[ "Gets", "default", "work", "item", "configurations", "that", "exist", "for", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/WorkItemConfigurationsInner.java#L274-L276
RestComm/media-core
rtp/src/main/java/org/restcomm/media/core/rtcp/RtcpPacketFactory.java
RtcpPacketFactory.buildReceiverReport
private static RtcpReceiverReport buildReceiverReport(RtpStatistics statistics, boolean padding) { """ Builds a packet containing an RTCP Receiver Report @param statistics The statistics of the RTP session @return The RTCP packet """ RtcpReceiverReport report = new RtcpReceiverReport(padding, statistics...
java
private static RtcpReceiverReport buildReceiverReport(RtpStatistics statistics, boolean padding) { RtcpReceiverReport report = new RtcpReceiverReport(padding, statistics.getSsrc()); long ssrc = statistics.getSsrc(); // Add receiver reports for each registered member List<Long> members = statistics.getMembers...
[ "private", "static", "RtcpReceiverReport", "buildReceiverReport", "(", "RtpStatistics", "statistics", ",", "boolean", "padding", ")", "{", "RtcpReceiverReport", "report", "=", "new", "RtcpReceiverReport", "(", "padding", ",", "statistics", ".", "getSsrc", "(", ")", ...
Builds a packet containing an RTCP Receiver Report @param statistics The statistics of the RTP session @return The RTCP packet
[ "Builds", "a", "packet", "containing", "an", "RTCP", "Receiver", "Report" ]
train
https://github.com/RestComm/media-core/blob/07b8703343708599f60af66bae62aded77ee81b5/rtp/src/main/java/org/restcomm/media/core/rtcp/RtcpPacketFactory.java#L118-L132
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/Rules.java
Rules.conditionsRule
public static Rule conditionsRule(final Set<Condition> conditions, StateObj results) { """ Create a rule: predicate(conditions) => new state(results) @param conditions conditions @param results results @return rule """ if (null == conditions) { throw new NullPointerException("cond...
java
public static Rule conditionsRule(final Set<Condition> conditions, StateObj results) { if (null == conditions) { throw new NullPointerException("conditions must not be null"); } final StateObj newstate = States.state(results); return new Rule() { @Override ...
[ "public", "static", "Rule", "conditionsRule", "(", "final", "Set", "<", "Condition", ">", "conditions", ",", "StateObj", "results", ")", "{", "if", "(", "null", "==", "conditions", ")", "{", "throw", "new", "NullPointerException", "(", "\"conditions must not be ...
Create a rule: predicate(conditions) => new state(results) @param conditions conditions @param results results @return rule
[ "Create", "a", "rule", ":", "predicate", "(", "conditions", ")", "=", ">", "new", "state", "(", "results", ")" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/Rules.java#L152-L176
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/document/json/JsonObject.java
JsonObject.put
public JsonObject put(String name, List<?> value) { """ Stores a {@link JsonArray} value identified by the field name. @param name the name of the JSON field. @param value the value of the JSON field. @return the {@link JsonObject}. """ return put(name, JsonArray.from(value)); }
java
public JsonObject put(String name, List<?> value) { return put(name, JsonArray.from(value)); }
[ "public", "JsonObject", "put", "(", "String", "name", ",", "List", "<", "?", ">", "value", ")", "{", "return", "put", "(", "name", ",", "JsonArray", ".", "from", "(", "value", ")", ")", ";", "}" ]
Stores a {@link JsonArray} value identified by the field name. @param name the name of the JSON field. @param value the value of the JSON field. @return the {@link JsonObject}.
[ "Stores", "a", "{", "@link", "JsonArray", "}", "value", "identified", "by", "the", "field", "name", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/document/json/JsonObject.java#L842-L844
google/error-prone
core/src/main/java/com/google/errorprone/refaster/BlockTemplate.java
BlockTemplate.printStatements
private static String printStatements(Context context, Iterable<JCStatement> statements) { """ Returns a {@code String} representation of a sequence of statements, with semicolons and newlines. """ StringWriter writer = new StringWriter(); try { pretty(context, writer).printStats(com.sun.tools.j...
java
private static String printStatements(Context context, Iterable<JCStatement> statements) { StringWriter writer = new StringWriter(); try { pretty(context, writer).printStats(com.sun.tools.javac.util.List.from(statements)); } catch (IOException e) { throw new AssertionError("StringWriter cannot t...
[ "private", "static", "String", "printStatements", "(", "Context", "context", ",", "Iterable", "<", "JCStatement", ">", "statements", ")", "{", "StringWriter", "writer", "=", "new", "StringWriter", "(", ")", ";", "try", "{", "pretty", "(", "context", ",", "wr...
Returns a {@code String} representation of a sequence of statements, with semicolons and newlines.
[ "Returns", "a", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/refaster/BlockTemplate.java#L190-L198
alkacon/opencms-core
src/org/opencms/relations/CmsCategoryService.java
CmsCategoryService.moveCategory
public void moveCategory(CmsObject cms, String oldCatPath, String newCatPath, String referencePath) throws CmsException { """ Renames/Moves a category from the old path to the new one.<p> This method will keep all categories in their original repository.<p> @param cms the current cms context @param oldC...
java
public void moveCategory(CmsObject cms, String oldCatPath, String newCatPath, String referencePath) throws CmsException { CmsCategory category = readCategory(cms, oldCatPath, referencePath); String catPath = cms.getRequestContext().removeSiteRoot(category.getRootPath()); CmsLock lock = cms....
[ "public", "void", "moveCategory", "(", "CmsObject", "cms", ",", "String", "oldCatPath", ",", "String", "newCatPath", ",", "String", "referencePath", ")", "throws", "CmsException", "{", "CmsCategory", "category", "=", "readCategory", "(", "cms", ",", "oldCatPath", ...
Renames/Moves a category from the old path to the new one.<p> This method will keep all categories in their original repository.<p> @param cms the current cms context @param oldCatPath the path of the category to move @param newCatPath the new category path @param referencePath the reference path to find the category...
[ "Renames", "/", "Moves", "a", "category", "from", "the", "old", "path", "to", "the", "new", "one", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/relations/CmsCategoryService.java#L433-L447
zmarko/sss
src/main/java/rs/in/zivanovic/sss/SasUtils.java
SasUtils.decodeFromBinary
public static SecretShare decodeFromBinary(byte[] data) { """ De-serialize secret share from binary message data. Serialization mechanism is detailed in {@link #encodeToBinary(rs.in.zivanovic.sss.SecretShare) } @param data binary data to de-serialize @return secret share data """ ByteBuffer bb = B...
java
public static SecretShare decodeFromBinary(byte[] data) { ByteBuffer bb = ByteBuffer.wrap(data); try { byte[] signature = new byte[SIGNATURE.length]; bb.get(signature); if (!Arrays.equals(SIGNATURE, signature)) { throw new IllegalArgumentException("sig...
[ "public", "static", "SecretShare", "decodeFromBinary", "(", "byte", "[", "]", "data", ")", "{", "ByteBuffer", "bb", "=", "ByteBuffer", ".", "wrap", "(", "data", ")", ";", "try", "{", "byte", "[", "]", "signature", "=", "new", "byte", "[", "SIGNATURE", ...
De-serialize secret share from binary message data. Serialization mechanism is detailed in {@link #encodeToBinary(rs.in.zivanovic.sss.SecretShare) } @param data binary data to de-serialize @return secret share data
[ "De", "-", "serialize", "secret", "share", "from", "binary", "message", "data", ".", "Serialization", "mechanism", "is", "detailed", "in", "{", "@link", "#encodeToBinary", "(", "rs", ".", "in", ".", "zivanovic", ".", "sss", ".", "SecretShare", ")", "}" ]
train
https://github.com/zmarko/sss/blob/a41d9d39ca9a4ca1a2719c441c88e209ffc511f5/src/main/java/rs/in/zivanovic/sss/SasUtils.java#L182-L210
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicy_binding.java
dnspolicy_binding.get
public static dnspolicy_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch dnspolicy_binding resource of given name . """ dnspolicy_binding obj = new dnspolicy_binding(); obj.set_name(name); dnspolicy_binding response = (dnspolicy_binding) obj.get_resource(servic...
java
public static dnspolicy_binding get(nitro_service service, String name) throws Exception{ dnspolicy_binding obj = new dnspolicy_binding(); obj.set_name(name); dnspolicy_binding response = (dnspolicy_binding) obj.get_resource(service); return response; }
[ "public", "static", "dnspolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "dnspolicy_binding", "obj", "=", "new", "dnspolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", ...
Use this API to fetch dnspolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "dnspolicy_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/dns/dnspolicy_binding.java#L114-L119
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/flow/FlowPath.java
FlowPath.setActiveBranch
public void setActiveBranch(@NonNull String nodeName, int branchIdx) { """ This method sets active/inactive branch for divergent nodes (aka Switch) @param nodeName @param branchIdx """ states.get(nodeName).setActiveBranch(branchIdx); }
java
public void setActiveBranch(@NonNull String nodeName, int branchIdx) { states.get(nodeName).setActiveBranch(branchIdx); }
[ "public", "void", "setActiveBranch", "(", "@", "NonNull", "String", "nodeName", ",", "int", "branchIdx", ")", "{", "states", ".", "get", "(", "nodeName", ")", ".", "setActiveBranch", "(", "branchIdx", ")", ";", "}" ]
This method sets active/inactive branch for divergent nodes (aka Switch) @param nodeName @param branchIdx
[ "This", "method", "sets", "active", "/", "inactive", "branch", "for", "divergent", "nodes", "(", "aka", "Switch", ")" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/flow/FlowPath.java#L74-L76
ops4j/org.ops4j.base
ops4j-base-lang/src/main/java/org/ops4j/lang/NullArgumentException.java
NullArgumentException.validateNotEmptyContent
public static void validateNotEmptyContent( String[] arrayToCheck, String argumentName ) throws NullArgumentException { """ Validates that the string array instance is not null and that it has entries that are not null or empty eithout trimming the string. @param arrayToCheck The object to be tested. ...
java
public static void validateNotEmptyContent( String[] arrayToCheck, String argumentName ) throws NullArgumentException { validateNotEmptyContent( arrayToCheck, false, argumentName ); }
[ "public", "static", "void", "validateNotEmptyContent", "(", "String", "[", "]", "arrayToCheck", ",", "String", "argumentName", ")", "throws", "NullArgumentException", "{", "validateNotEmptyContent", "(", "arrayToCheck", ",", "false", ",", "argumentName", ")", ";", "...
Validates that the string array instance is not null and that it has entries that are not null or empty eithout trimming the string. @param arrayToCheck The object to be tested. @param argumentName The name of the object, which is used to construct the exception message. @throws NullArgumentException if the array ins...
[ "Validates", "that", "the", "string", "array", "instance", "is", "not", "null", "and", "that", "it", "has", "entries", "that", "are", "not", "null", "or", "empty", "eithout", "trimming", "the", "string", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-lang/src/main/java/org/ops4j/lang/NullArgumentException.java#L160-L164
crnk-project/crnk-framework
crnk-setup/crnk-setup-rs/src/main/java/io/crnk/rs/CrnkFeature.java
CrnkFeature.registerActionRepositories
private void registerActionRepositories(FeatureContext context, CrnkBoot boot) { """ All repositories with JAX-RS action need to be registered with JAX-RS as singletons. @param context of jaxrs @param boot of crnk """ ResourceRegistry resourceRegistry = boot.getResourceRegistry(); Collec...
java
private void registerActionRepositories(FeatureContext context, CrnkBoot boot) { ResourceRegistry resourceRegistry = boot.getResourceRegistry(); Collection<RegistryEntry> registryEntries = resourceRegistry.getEntries(); for (RegistryEntry registryEntry : registryEntries) { ResourceRe...
[ "private", "void", "registerActionRepositories", "(", "FeatureContext", "context", ",", "CrnkBoot", "boot", ")", "{", "ResourceRegistry", "resourceRegistry", "=", "boot", ".", "getResourceRegistry", "(", ")", ";", "Collection", "<", "RegistryEntry", ">", "registryEntr...
All repositories with JAX-RS action need to be registered with JAX-RS as singletons. @param context of jaxrs @param boot of crnk
[ "All", "repositories", "with", "JAX", "-", "RS", "action", "need", "to", "be", "registered", "with", "JAX", "-", "RS", "as", "singletons", "." ]
train
https://github.com/crnk-project/crnk-framework/blob/2fd3ef9a991788d46fd2e83b43c8ea37cbaf8681/crnk-setup/crnk-setup-rs/src/main/java/io/crnk/rs/CrnkFeature.java#L94-L105
thombergs/docx-stamper
src/main/java/org/wickedsource/docxstamper/util/RunUtil.java
RunUtil.applyParagraphStyle
public static void applyParagraphStyle(P p, R run) { """ Applies the style of the given paragraph to the given content object (if the content object is a Run). @param p the paragraph whose style to use. @param run the Run to which the style should be applied. """ if (p.getPPr() != null && p.getPP...
java
public static void applyParagraphStyle(P p, R run) { if (p.getPPr() != null && p.getPPr().getRPr() != null) { RPr runProperties = new RPr(); StyleUtil.apply(p.getPPr().getRPr(), runProperties); run.setRPr(runProperties); } }
[ "public", "static", "void", "applyParagraphStyle", "(", "P", "p", ",", "R", "run", ")", "{", "if", "(", "p", ".", "getPPr", "(", ")", "!=", "null", "&&", "p", ".", "getPPr", "(", ")", ".", "getRPr", "(", ")", "!=", "null", ")", "{", "RPr", "run...
Applies the style of the given paragraph to the given content object (if the content object is a Run). @param p the paragraph whose style to use. @param run the Run to which the style should be applied.
[ "Applies", "the", "style", "of", "the", "given", "paragraph", "to", "the", "given", "content", "object", "(", "if", "the", "content", "object", "is", "a", "Run", ")", "." ]
train
https://github.com/thombergs/docx-stamper/blob/f1a7e3e92a59abaffac299532fe49450c3b041eb/src/main/java/org/wickedsource/docxstamper/util/RunUtil.java#L53-L59
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionValueRelPersistenceImpl.java
CPDefinitionOptionValueRelPersistenceImpl.findByUUID_G
@Override public CPDefinitionOptionValueRel findByUUID_G(String uuid, long groupId) throws NoSuchCPDefinitionOptionValueRelException { """ Returns the cp definition option value rel where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchCPDefinitionOptionValueRelException} if it could not be found. ...
java
@Override public CPDefinitionOptionValueRel findByUUID_G(String uuid, long groupId) throws NoSuchCPDefinitionOptionValueRelException { CPDefinitionOptionValueRel cpDefinitionOptionValueRel = fetchByUUID_G(uuid, groupId); if (cpDefinitionOptionValueRel == null) { StringBundler msg = new StringBundler(6); ...
[ "@", "Override", "public", "CPDefinitionOptionValueRel", "findByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchCPDefinitionOptionValueRelException", "{", "CPDefinitionOptionValueRel", "cpDefinitionOptionValueRel", "=", "fetchByUUID_G", "(", "uui...
Returns the cp definition option value rel where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchCPDefinitionOptionValueRelException} if it could not be found. @param uuid the uuid @param groupId the group ID @return the matching cp definition option value rel @throws NoSuchCPDefinitionOptionValueRelExceptio...
[ "Returns", "the", "cp", "definition", "option", "value", "rel", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchCPDefinitionOptionValueRelException", "}", "if", "it", "could", "not", "be", "fou...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionValueRelPersistenceImpl.java#L676-L703
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bos/BosClient.java
BosClient.getObject
public ObjectMetadata getObject(String bucketName, String key, File destinationFile) { """ Gets the object metadata for the object stored in Bos under the specified bucket and key, and saves the object contents to the specified file. Returns <code>null</code> if the specified constraints weren't met. @param b...
java
public ObjectMetadata getObject(String bucketName, String key, File destinationFile) { return this.getObject(new GetObjectRequest(bucketName, key), destinationFile); }
[ "public", "ObjectMetadata", "getObject", "(", "String", "bucketName", ",", "String", "key", ",", "File", "destinationFile", ")", "{", "return", "this", ".", "getObject", "(", "new", "GetObjectRequest", "(", "bucketName", ",", "key", ")", ",", "destinationFile", ...
Gets the object metadata for the object stored in Bos under the specified bucket and key, and saves the object contents to the specified file. Returns <code>null</code> if the specified constraints weren't met. @param bucketName The name of the bucket containing the desired object. @param key The key under which the d...
[ "Gets", "the", "object", "metadata", "for", "the", "object", "stored", "in", "Bos", "under", "the", "specified", "bucket", "and", "key", "and", "saves", "the", "object", "contents", "to", "the", "specified", "file", ".", "Returns", "<code", ">", "null<", "...
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bos/BosClient.java#L659-L661
aws/aws-sdk-java
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/GetGroupResult.java
GetGroupResult.withTags
public GetGroupResult withTags(java.util.Map<String, String> tags) { """ The tags for the definition. @param tags The tags for the definition. @return Returns a reference to this object so that method calls can be chained together. """ setTags(tags); return this; }
java
public GetGroupResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "GetGroupResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
The tags for the definition. @param tags The tags for the definition. @return Returns a reference to this object so that method calls can be chained together.
[ "The", "tags", "for", "the", "definition", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/GetGroupResult.java#L310-L313
apache/groovy
src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java
StaticTypeCheckingSupport.isWithCall
public static boolean isWithCall(final String name, final Expression callArguments) { """ Called on method call checks in order to determine if a method call corresponds to the idiomatic o.with { ... } structure @param name name of the method called @param callArguments arguments of the method @retu...
java
public static boolean isWithCall(final String name, final Expression callArguments) { boolean isWithCall = "with".equals(name) && callArguments instanceof ArgumentListExpression; if (isWithCall) { ArgumentListExpression argList = (ArgumentListExpression) callArguments; List<Expre...
[ "public", "static", "boolean", "isWithCall", "(", "final", "String", "name", ",", "final", "Expression", "callArguments", ")", "{", "boolean", "isWithCall", "=", "\"with\"", ".", "equals", "(", "name", ")", "&&", "callArguments", "instanceof", "ArgumentListExpress...
Called on method call checks in order to determine if a method call corresponds to the idiomatic o.with { ... } structure @param name name of the method called @param callArguments arguments of the method @return true if the name is "with" and arguments consist of a single closure
[ "Called", "on", "method", "call", "checks", "in", "order", "to", "determine", "if", "a", "method", "call", "corresponds", "to", "the", "idiomatic", "o", ".", "with", "{", "...", "}", "structure" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java#L273-L281
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java
IntegrationAccountsInner.logTrackingEventsAsync
public Observable<Void> logTrackingEventsAsync(String resourceGroupName, String integrationAccountName, TrackingEventsDefinition logTrackingEvents) { """ Logs the integration account's tracking events. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name....
java
public Observable<Void> logTrackingEventsAsync(String resourceGroupName, String integrationAccountName, TrackingEventsDefinition logTrackingEvents) { return logTrackingEventsWithServiceResponseAsync(resourceGroupName, integrationAccountName, logTrackingEvents).map(new Func1<ServiceResponse<Void>, Void>() { ...
[ "public", "Observable", "<", "Void", ">", "logTrackingEventsAsync", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "TrackingEventsDefinition", "logTrackingEvents", ")", "{", "return", "logTrackingEventsWithServiceResponseAsync", "(", "resour...
Logs the integration account's tracking events. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param logTrackingEvents The callback URL parameters. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceRespons...
[ "Logs", "the", "integration", "account", "s", "tracking", "events", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java#L1157-L1164
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributeListImpl.java
AttributeListImpl.addAttribute
public void addAttribute(String name, String type, String value) { """ Add an attribute to an attribute list. <p>This method is provided for SAX parser writers, to allow them to build up an attribute list incrementally before delivering it to the application.</p> @param name The attribute name. @param typ...
java
public void addAttribute(String name, String type, String value) { names.add(name); types.add(type); values.add(value); }
[ "public", "void", "addAttribute", "(", "String", "name", ",", "String", "type", ",", "String", "value", ")", "{", "names", ".", "add", "(", "name", ")", ";", "types", ".", "add", "(", "type", ")", ";", "values", ".", "add", "(", "value", ")", ";", ...
Add an attribute to an attribute list. <p>This method is provided for SAX parser writers, to allow them to build up an attribute list incrementally before delivering it to the application.</p> @param name The attribute name. @param type The attribute type ("NMTOKEN" for an enumeration). @param value The attribute val...
[ "Add", "an", "attribute", "to", "an", "attribute", "list", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributeListImpl.java#L139-L143
Whiley/WhileyCompiler
src/main/java/wyil/check/FlowTypeCheck.java
FlowTypeCheck.checkReturnValue
private void checkReturnValue(Decl.FunctionOrMethod d, Environment last) { """ Check that a return value is provided when it is needed. For example, a return value is not required for a method that has no return type. Likewise, we don't expect one from a native method since there was no body to analyse. @para...
java
private void checkReturnValue(Decl.FunctionOrMethod d, Environment last) { if (d.match(Modifier.Native.class) == null && last != FlowTypeUtils.BOTTOM && d.getReturns().size() != 0) { // In this case, code reaches the end of the function or method and, // furthermore, that this requires a return value. To get he...
[ "private", "void", "checkReturnValue", "(", "Decl", ".", "FunctionOrMethod", "d", ",", "Environment", "last", ")", "{", "if", "(", "d", ".", "match", "(", "Modifier", ".", "Native", ".", "class", ")", "==", "null", "&&", "last", "!=", "FlowTypeUtils", "....
Check that a return value is provided when it is needed. For example, a return value is not required for a method that has no return type. Likewise, we don't expect one from a native method since there was no body to analyse. @param d @param last
[ "Check", "that", "a", "return", "value", "is", "provided", "when", "it", "is", "needed", ".", "For", "example", "a", "return", "value", "is", "not", "required", "for", "a", "method", "that", "has", "no", "return", "type", ".", "Likewise", "we", "don", ...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/check/FlowTypeCheck.java#L230-L238
netty/netty
transport/src/main/java/io/netty/channel/DefaultChannelConfig.java
DefaultChannelConfig.setRecvByteBufAllocator
private void setRecvByteBufAllocator(RecvByteBufAllocator allocator, ChannelMetadata metadata) { """ Set the {@link RecvByteBufAllocator} which is used for the channel to allocate receive buffers. @param allocator the allocator to set. @param metadata Used to set the {@link ChannelMetadata#defaultMaxMessagesPerR...
java
private void setRecvByteBufAllocator(RecvByteBufAllocator allocator, ChannelMetadata metadata) { if (allocator instanceof MaxMessagesRecvByteBufAllocator) { ((MaxMessagesRecvByteBufAllocator) allocator).maxMessagesPerRead(metadata.defaultMaxMessagesPerRead()); } else if (allocator == null) {...
[ "private", "void", "setRecvByteBufAllocator", "(", "RecvByteBufAllocator", "allocator", ",", "ChannelMetadata", "metadata", ")", "{", "if", "(", "allocator", "instanceof", "MaxMessagesRecvByteBufAllocator", ")", "{", "(", "(", "MaxMessagesRecvByteBufAllocator", ")", "allo...
Set the {@link RecvByteBufAllocator} which is used for the channel to allocate receive buffers. @param allocator the allocator to set. @param metadata Used to set the {@link ChannelMetadata#defaultMaxMessagesPerRead()} if {@code allocator} is of type {@link MaxMessagesRecvByteBufAllocator}.
[ "Set", "the", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/DefaultChannelConfig.java#L307-L314
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/util/NodeTypeUtil.java
NodeTypeUtil.getNodeType
public static String getNodeType(String nodeTypeHeader, String defaultNodeType, Set<String> allowedNodeTypes) throws NoSuchNodeTypeException { """ Returns parsed nodeType obtained from node-type header. This method is unified for files and folders. @param nodeTypeHeader @param defaultNodeType @param a...
java
public static String getNodeType(String nodeTypeHeader, String defaultNodeType, Set<String> allowedNodeTypes) throws NoSuchNodeTypeException { if (nodeTypeHeader == null) { return defaultNodeType; } if (allowedNodeTypes.contains(nodeTypeHeader)) { return...
[ "public", "static", "String", "getNodeType", "(", "String", "nodeTypeHeader", ",", "String", "defaultNodeType", ",", "Set", "<", "String", ">", "allowedNodeTypes", ")", "throws", "NoSuchNodeTypeException", "{", "if", "(", "nodeTypeHeader", "==", "null", ")", "{", ...
Returns parsed nodeType obtained from node-type header. This method is unified for files and folders. @param nodeTypeHeader @param defaultNodeType @param allowedNodeTypes @return @throws NoSuchNodeTypeException is thrown if node-type header contains not allowed node type
[ "Returns", "parsed", "nodeType", "obtained", "from", "node", "-", "type", "header", ".", "This", "method", "is", "unified", "for", "files", "and", "folders", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/util/NodeTypeUtil.java#L49-L62
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/LocationUrl.java
LocationUrl.getInStorePickupLocationUrl
public static MozuUrl getInStorePickupLocationUrl(Boolean includeAttributeDefinition, String locationCode, String responseFields) { """ Get Resource Url for GetInStorePickupLocation @param includeAttributeDefinition True if you want to include the custom attribute definition for the location. @param locationCode...
java
public static MozuUrl getInStorePickupLocationUrl(Boolean includeAttributeDefinition, String locationCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/storefront/locationUsageTypes/SP/locations/{locationCode}?includeAttributeDefinition={includeAttributeDefinition}&responseFiel...
[ "public", "static", "MozuUrl", "getInStorePickupLocationUrl", "(", "Boolean", "includeAttributeDefinition", ",", "String", "locationCode", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/storefront/lo...
Get Resource Url for GetInStorePickupLocation @param includeAttributeDefinition True if you want to include the custom attribute definition for the location. @param locationCode The unique, user-defined code that identifies a location. @param responseFields Filtering syntax appended to an API call to increase or decrea...
[ "Get", "Resource", "Url", "for", "GetInStorePickupLocation" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/LocationUrl.java#L77-L84
albfernandez/itext2
src/main/java/com/lowagie/text/Row.java
Row.setElement
void setElement(Object aElement, int column) { """ Puts <CODE>Cell</CODE> to the <CODE>Row</CODE> at the position given, doesn't reserve colspan. @param aElement the cell to add. @param column the position where to add the cell. """ if (reserved[column]) throw new IllegalArgumentException("...
java
void setElement(Object aElement, int column) { if (reserved[column]) throw new IllegalArgumentException("setElement - position already taken"); cells[column] = aElement; if (aElement != null) { reserved[column] = true; } }
[ "void", "setElement", "(", "Object", "aElement", ",", "int", "column", ")", "{", "if", "(", "reserved", "[", "column", "]", ")", "throw", "new", "IllegalArgumentException", "(", "\"setElement - position already taken\"", ")", ";", "cells", "[", "column", "]", ...
Puts <CODE>Cell</CODE> to the <CODE>Row</CODE> at the position given, doesn't reserve colspan. @param aElement the cell to add. @param column the position where to add the cell.
[ "Puts", "<CODE", ">", "Cell<", "/", "CODE", ">", "to", "the", "<CODE", ">", "Row<", "/", "CODE", ">", "at", "the", "position", "given", "doesn", "t", "reserve", "colspan", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/Row.java#L244-L251
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbManagedConnectionImpl.java
WSRdbManagedConnectionImpl.setShardingKeys
public final void setShardingKeys(Object shardingKey, Object superShardingKey) throws SQLException { """ Updates the value of the sharding keys. @param shardingKey the new sharding key. @param superShardingKey the new super sharding key. The 'unchanged' constant can be used to avoid changing it. """ ...
java
public final void setShardingKeys(Object shardingKey, Object superShardingKey) throws SQLException { if (mcf.beforeJDBCVersion(JDBCRuntimeVersion.VERSION_4_3)) throw new SQLFeatureNotSupportedException(); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(...
[ "public", "final", "void", "setShardingKeys", "(", "Object", "shardingKey", ",", "Object", "superShardingKey", ")", "throws", "SQLException", "{", "if", "(", "mcf", ".", "beforeJDBCVersion", "(", "JDBCRuntimeVersion", ".", "VERSION_4_3", ")", ")", "throw", "new", ...
Updates the value of the sharding keys. @param shardingKey the new sharding key. @param superShardingKey the new super sharding key. The 'unchanged' constant can be used to avoid changing it.
[ "Updates", "the", "value", "of", "the", "sharding", "keys", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbManagedConnectionImpl.java#L4097-L4109
dita-ot/dita-ot
src/main/java/org/dita/dost/module/KeyrefModule.java
KeyrefModule.collectProcessingTopics
private List<ResolveTask> collectProcessingTopics(final Collection<FileInfo> fis, final KeyScope rootScope, final Document doc) { """ Collect topics for key reference processing and modify map to reflect new file names. """ final List<ResolveTask> res = new ArrayList<>(); final FileInfo input =...
java
private List<ResolveTask> collectProcessingTopics(final Collection<FileInfo> fis, final KeyScope rootScope, final Document doc) { final List<ResolveTask> res = new ArrayList<>(); final FileInfo input = job.getFileInfo(fi -> fi.isInput).iterator().next(); res.add(new ResolveTask(rootScope, input,...
[ "private", "List", "<", "ResolveTask", ">", "collectProcessingTopics", "(", "final", "Collection", "<", "FileInfo", ">", "fis", ",", "final", "KeyScope", "rootScope", ",", "final", "Document", "doc", ")", "{", "final", "List", "<", "ResolveTask", ">", "res", ...
Collect topics for key reference processing and modify map to reflect new file names.
[ "Collect", "topics", "for", "key", "reference", "processing", "and", "modify", "map", "to", "reflect", "new", "file", "names", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/KeyrefModule.java#L155-L176
joachimvda/jtransfo
core/src/main/java/org/jtransfo/internal/ConverterHelper.java
ConverterHelper.getDeclaredTypeConverter
TypeConverter getDeclaredTypeConverter(MapOnly mapOnly, TypeConverter fallback) { """ Determine type converter for a @MapOnly annotation (falling back to @MappedBy type converter. @param mapOnly MapOnly annotation @param fallback type converter from MappedBy annotation @return type converter with highest prec...
java
TypeConverter getDeclaredTypeConverter(MapOnly mapOnly, TypeConverter fallback) { if (null != mapOnly) { TypeConverter typeConverter = getDeclaredTypeConverter( mapOnly.typeConverterClass().getName(), mapOnly.typeConverter()); if (null != typeConverter) { ...
[ "TypeConverter", "getDeclaredTypeConverter", "(", "MapOnly", "mapOnly", ",", "TypeConverter", "fallback", ")", "{", "if", "(", "null", "!=", "mapOnly", ")", "{", "TypeConverter", "typeConverter", "=", "getDeclaredTypeConverter", "(", "mapOnly", ".", "typeConverterClas...
Determine type converter for a @MapOnly annotation (falling back to @MappedBy type converter. @param mapOnly MapOnly annotation @param fallback type converter from MappedBy annotation @return type converter with highest precedence
[ "Determine", "type", "converter", "for", "a", "@MapOnly", "annotation", "(", "falling", "back", "to", "@MappedBy", "type", "converter", "." ]
train
https://github.com/joachimvda/jtransfo/blob/eb1c72b64b09d6f3b6212bd3f1579cac5c983ea8/core/src/main/java/org/jtransfo/internal/ConverterHelper.java#L357-L366
greatman/craftconomy3
src/main/java/com/greatmancode/craftconomy3/account/AccountACL.java
AccountACL.setWithdraw
public void setWithdraw(String name, boolean withdraw) { """ Set if a player can withdraw money in the account @param name The Player name @param withdraw Can withdraw or not """ String newName = name.toLowerCase(); if (aclList.containsKey(name)) { AccountACLValue value = ac...
java
public void setWithdraw(String name, boolean withdraw) { String newName = name.toLowerCase(); if (aclList.containsKey(name)) { AccountACLValue value = aclList.get(newName); set(newName, value.canDeposit(), withdraw, value.canAcl(), value.canBalance(), value.isOwner()); } ...
[ "public", "void", "setWithdraw", "(", "String", "name", ",", "boolean", "withdraw", ")", "{", "String", "newName", "=", "name", ".", "toLowerCase", "(", ")", ";", "if", "(", "aclList", ".", "containsKey", "(", "name", ")", ")", "{", "AccountACLValue", "v...
Set if a player can withdraw money in the account @param name The Player name @param withdraw Can withdraw or not
[ "Set", "if", "a", "player", "can", "withdraw", "money", "in", "the", "account" ]
train
https://github.com/greatman/craftconomy3/blob/51b1b3de7d039e20c7418d1e70b8c4b02b8cf840/src/main/java/com/greatmancode/craftconomy3/account/AccountACL.java#L133-L141
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/crdt/CRDTReplicationMigrationService.java
CRDTReplicationMigrationService.tryProcessOnOtherMembers
private boolean tryProcessOnOtherMembers(Operation operation, String serviceName, long timeoutNanos) { """ Attempts to process the {@code operation} on at least one non-local member. The method will iterate through the member list and try once on each member. The method returns as soon as the first member succe...
java
private boolean tryProcessOnOtherMembers(Operation operation, String serviceName, long timeoutNanos) { final OperationService operationService = nodeEngine.getOperationService(); final Collection<Member> targets = nodeEngine.getClusterService().getMembers(DATA_MEMBER_SELECTOR); final Member loca...
[ "private", "boolean", "tryProcessOnOtherMembers", "(", "Operation", "operation", ",", "String", "serviceName", ",", "long", "timeoutNanos", ")", "{", "final", "OperationService", "operationService", "=", "nodeEngine", ".", "getOperationService", "(", ")", ";", "final"...
Attempts to process the {@code operation} on at least one non-local member. The method will iterate through the member list and try once on each member. The method returns as soon as the first member successfully processes the operation or once there are no more members to try. @param serviceName the service name @ret...
[ "Attempts", "to", "process", "the", "{", "@code", "operation", "}", "on", "at", "least", "one", "non", "-", "local", "member", ".", "The", "method", "will", "iterate", "through", "the", "member", "list", "and", "try", "once", "on", "each", "member", ".",...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/crdt/CRDTReplicationMigrationService.java#L162-L190
korpling/ANNIS
annis-service/src/main/java/annis/administration/AdministrationDao.java
AdministrationDao.analyzeAutoGeneratedQueries
private void analyzeAutoGeneratedQueries(long corpusID) { """ Counts nodes and operators of the AQL example query and writes it back to the staging area. @param corpusID specifies the corpus, the analyze things. """ // read the example queries from the staging area List<ExampleQuery> exampleQueries...
java
private void analyzeAutoGeneratedQueries(long corpusID) { // read the example queries from the staging area List<ExampleQuery> exampleQueries = getJdbcTemplate().query( "SELECT * FROM _" + EXAMPLE_QUERIES_TAB, new RowMapper<ExampleQuery>() { @Override public ExampleQuery mapRow(Res...
[ "private", "void", "analyzeAutoGeneratedQueries", "(", "long", "corpusID", ")", "{", "// read the example queries from the staging area", "List", "<", "ExampleQuery", ">", "exampleQueries", "=", "getJdbcTemplate", "(", ")", ".", "query", "(", "\"SELECT * FROM _\"", "+", ...
Counts nodes and operators of the AQL example query and writes it back to the staging area. @param corpusID specifies the corpus, the analyze things.
[ "Counts", "nodes", "and", "operators", "of", "the", "AQL", "example", "query", "and", "writes", "it", "back", "to", "the", "staging", "area", "." ]
train
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-service/src/main/java/annis/administration/AdministrationDao.java#L2122-L2144
UrielCh/ovh-java-sdk
ovh-java-sdk-kube/src/main/java/net/minidev/ovh/api/ApiOvhKube.java
ApiOvhKube.serviceName_reset_POST
public void serviceName_reset_POST(String serviceName, OvhVersion version, OvhResetWorkerNodesPolicy workerNodesPolicy) throws IOException { """ Reset cluster: all Kubernetes data will be erased (pods, services, configuration, etc), nodes will be either deleted or reinstalled REST: POST /kube/{serviceName}/rese...
java
public void serviceName_reset_POST(String serviceName, OvhVersion version, OvhResetWorkerNodesPolicy workerNodesPolicy) throws IOException { String qPath = "/kube/{serviceName}/reset"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "version", ve...
[ "public", "void", "serviceName_reset_POST", "(", "String", "serviceName", ",", "OvhVersion", "version", ",", "OvhResetWorkerNodesPolicy", "workerNodesPolicy", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/kube/{serviceName}/reset\"", ";", "StringBuilder", ...
Reset cluster: all Kubernetes data will be erased (pods, services, configuration, etc), nodes will be either deleted or reinstalled REST: POST /kube/{serviceName}/reset @param serviceName [required] Cluster ID @param version [required] Kubernetes version to use after reset, by default it keeps the current version @par...
[ "Reset", "cluster", ":", "all", "Kubernetes", "data", "will", "be", "erased", "(", "pods", "services", "configuration", "etc", ")", "nodes", "will", "be", "either", "deleted", "or", "reinstalled" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-kube/src/main/java/net/minidev/ovh/api/ApiOvhKube.java#L64-L71
samskivert/pythagoras
src/main/java/pythagoras/d/Rectangles.java
Rectangles.closestInteriorPoint
public static Point closestInteriorPoint (IRectangle r, IPoint p, Point out) { """ Computes the point inside the bounds of the rectangle that's closest to the given point, writing the result into {@code out}. @return {@code out} for call chaining convenience. """ out.set(MathUtil.clamp(p.x(), r.minX(...
java
public static Point closestInteriorPoint (IRectangle r, IPoint p, Point out) { out.set(MathUtil.clamp(p.x(), r.minX(), r.maxX()), MathUtil.clamp(p.y(), r.minY(), r.maxY())); return out; }
[ "public", "static", "Point", "closestInteriorPoint", "(", "IRectangle", "r", ",", "IPoint", "p", ",", "Point", "out", ")", "{", "out", ".", "set", "(", "MathUtil", ".", "clamp", "(", "p", ".", "x", "(", ")", ",", "r", ".", "minX", "(", ")", ",", ...
Computes the point inside the bounds of the rectangle that's closest to the given point, writing the result into {@code out}. @return {@code out} for call chaining convenience.
[ "Computes", "the", "point", "inside", "the", "bounds", "of", "the", "rectangle", "that", "s", "closest", "to", "the", "given", "point", "writing", "the", "result", "into", "{" ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Rectangles.java#L39-L43
att/AAF
cadi/core/src/main/java/com/att/cadi/util/Vars.java
Vars.convert
public static String convert(final String text, final List<String> vars) { """ Simplified Conversion based on typical use of getting AT&T style RESTful Error Messages @param text @param vars @return """ String[] array = new String[vars.size()]; StringBuilder sb = new StringBuilder(); convert(sb,text,v...
java
public static String convert(final String text, final List<String> vars) { String[] array = new String[vars.size()]; StringBuilder sb = new StringBuilder(); convert(sb,text,vars.toArray(array)); return sb.toString(); }
[ "public", "static", "String", "convert", "(", "final", "String", "text", ",", "final", "List", "<", "String", ">", "vars", ")", "{", "String", "[", "]", "array", "=", "new", "String", "[", "vars", ".", "size", "(", ")", "]", ";", "StringBuilder", "sb...
Simplified Conversion based on typical use of getting AT&T style RESTful Error Messages @param text @param vars @return
[ "Simplified", "Conversion", "based", "on", "typical", "use", "of", "getting", "AT&T", "style", "RESTful", "Error", "Messages" ]
train
https://github.com/att/AAF/blob/090562e956c0035db972aafba844dc6d3fc948ee/cadi/core/src/main/java/com/att/cadi/util/Vars.java#L15-L20
Berico-Technologies/CLAVIN-NERD
src/main/java/com/bericotech/clavin/nerd/StanfordExtractor.java
StanfordExtractor.convertNERtoCLAVIN
public static List<LocationOccurrence> convertNERtoCLAVIN (List<Triple<String, Integer, Integer>> entities, String text) { """ Converts output from Stanford NER to input required by CLAVIN resolver. @param entities A List&lt;Triple&lt;String, Integer, Integer&gt;&gt; from Stanford NER @param text ...
java
public static List<LocationOccurrence> convertNERtoCLAVIN (List<Triple<String, Integer, Integer>> entities, String text) { List<LocationOccurrence> locations = new ArrayList<LocationOccurrence>(); if (entities != null) { // iterate over each entity Triple for (Tripl...
[ "public", "static", "List", "<", "LocationOccurrence", ">", "convertNERtoCLAVIN", "(", "List", "<", "Triple", "<", "String", ",", "Integer", ",", "Integer", ">", ">", "entities", ",", "String", "text", ")", "{", "List", "<", "LocationOccurrence", ">", "locat...
Converts output from Stanford NER to input required by CLAVIN resolver. @param entities A List&lt;Triple&lt;String, Integer, Integer&gt;&gt; from Stanford NER @param text text content processed by Stanford NER + CLAVIN resolver @return List&lt;LocationOccurrence&gt; used by CLAVIN resolver
[ "Converts", "output", "from", "Stanford", "NER", "to", "input", "required", "by", "CLAVIN", "resolver", "." ]
train
https://github.com/Berico-Technologies/CLAVIN-NERD/blob/96a51b841ce42f3e406f45d7949d31f73e5e12d5/src/main/java/com/bericotech/clavin/nerd/StanfordExtractor.java#L109-L126
EsotericSoftware/kryo
src/com/esotericsoftware/kryo/io/Input.java
Input.readBytes
public void readBytes (byte[] bytes, int offset, int count) throws KryoException { """ Reads count bytes and writes them to the specified byte[], starting at offset. """ if (bytes == null) throw new IllegalArgumentException("bytes cannot be null."); int copyCount = Math.min(limit - position, count); w...
java
public void readBytes (byte[] bytes, int offset, int count) throws KryoException { if (bytes == null) throw new IllegalArgumentException("bytes cannot be null."); int copyCount = Math.min(limit - position, count); while (true) { System.arraycopy(buffer, position, bytes, offset, copyCount); position += ...
[ "public", "void", "readBytes", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "count", ")", "throws", "KryoException", "{", "if", "(", "bytes", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"bytes cannot be null.\"", ...
Reads count bytes and writes them to the specified byte[], starting at offset.
[ "Reads", "count", "bytes", "and", "writes", "them", "to", "the", "specified", "byte", "[]", "starting", "at", "offset", "." ]
train
https://github.com/EsotericSoftware/kryo/blob/a8be1ab26f347f299a3c3f7171d6447dd5390845/src/com/esotericsoftware/kryo/io/Input.java#L360-L372
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/message/embed/EmbedBuilder.java
EmbedBuilder.setThumbnail
public EmbedBuilder setThumbnail(InputStream thumbnail, String fileType) { """ Sets the thumbnail of the embed. @param thumbnail The thumbnail. @param fileType The type of the file, e.g. "png" or "gif". @return The current instance in order to chain call methods. """ delegate.setThumbnail(thumbnai...
java
public EmbedBuilder setThumbnail(InputStream thumbnail, String fileType) { delegate.setThumbnail(thumbnail, fileType); return this; }
[ "public", "EmbedBuilder", "setThumbnail", "(", "InputStream", "thumbnail", ",", "String", "fileType", ")", "{", "delegate", ".", "setThumbnail", "(", "thumbnail", ",", "fileType", ")", ";", "return", "this", ";", "}" ]
Sets the thumbnail of the embed. @param thumbnail The thumbnail. @param fileType The type of the file, e.g. "png" or "gif". @return The current instance in order to chain call methods.
[ "Sets", "the", "thumbnail", "of", "the", "embed", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/message/embed/EmbedBuilder.java#L539-L542
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/mediasource/inline/InlineAsset.java
InlineAsset.getInlineRendition
private Rendition getInlineRendition(MediaArgs mediaArgs) { """ Get inline rendition instance. @param mediaArgs Media args @return Inline rendition instance (may be invalid rendition) """ return new InlineRendition(this.resource, this.media, mediaArgs, this.fileName, this.adaptable); }
java
private Rendition getInlineRendition(MediaArgs mediaArgs) { return new InlineRendition(this.resource, this.media, mediaArgs, this.fileName, this.adaptable); }
[ "private", "Rendition", "getInlineRendition", "(", "MediaArgs", "mediaArgs", ")", "{", "return", "new", "InlineRendition", "(", "this", ".", "resource", ",", "this", ".", "media", ",", "mediaArgs", ",", "this", ".", "fileName", ",", "this", ".", "adaptable", ...
Get inline rendition instance. @param mediaArgs Media args @return Inline rendition instance (may be invalid rendition)
[ "Get", "inline", "rendition", "instance", "." ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/mediasource/inline/InlineAsset.java#L140-L142
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/watch/WatchMonitor.java
WatchMonitor.registerPath
private void registerPath(Path path, int maxDepth) { """ 将指定路径加入到监听中 @param path 路径 @param maxDepth 递归下层目录的最大深度 @return {@link WatchKey} """ try { final WatchKey key = path.register(watchService, ArrayUtil.isEmpty(this.events) ? EVENTS_ALL : this.events); watchKeyPathMap.put(key, path); if(ma...
java
private void registerPath(Path path, int maxDepth) { try { final WatchKey key = path.register(watchService, ArrayUtil.isEmpty(this.events) ? EVENTS_ALL : this.events); watchKeyPathMap.put(key, path); if(maxDepth > 1) { //遍历所有子目录并加入监听 Files.walkFileTree(path, EnumSet.noneOf(FileVisitOption.class...
[ "private", "void", "registerPath", "(", "Path", "path", ",", "int", "maxDepth", ")", "{", "try", "{", "final", "WatchKey", "key", "=", "path", ".", "register", "(", "watchService", ",", "ArrayUtil", ".", "isEmpty", "(", "this", ".", "events", ")", "?", ...
将指定路径加入到监听中 @param path 路径 @param maxDepth 递归下层目录的最大深度 @return {@link WatchKey}
[ "将指定路径加入到监听中" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/watch/WatchMonitor.java#L447-L468
ltearno/hexa.tools
hexa.binding/src/main/java/fr/lteconsulting/hexa/databinding/properties/PropertyValues.java
PropertyValues.getValue
<T> T getValue( Object object, String name ) { """ Gets the property's value from an object @param object The object @param name Property name """ T result = getPropertyImpl( object, name ); if( result instanceof Property ) { @SuppressWarnings( "unchecked" ) Property<T> property = ((Property<...
java
<T> T getValue( Object object, String name ) { T result = getPropertyImpl( object, name ); if( result instanceof Property ) { @SuppressWarnings( "unchecked" ) Property<T> property = ((Property<T>) result); return property.getValue(); } return result; }
[ "<", "T", ">", "T", "getValue", "(", "Object", "object", ",", "String", "name", ")", "{", "T", "result", "=", "getPropertyImpl", "(", "object", ",", "name", ")", ";", "if", "(", "result", "instanceof", "Property", ")", "{", "@", "SuppressWarnings", "("...
Gets the property's value from an object @param object The object @param name Property name
[ "Gets", "the", "property", "s", "value", "from", "an", "object" ]
train
https://github.com/ltearno/hexa.tools/blob/604c804901b1bb13fe10b3823cc4a639f8993363/hexa.binding/src/main/java/fr/lteconsulting/hexa/databinding/properties/PropertyValues.java#L83-L94
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.getText
public static String getText(URL url) throws IOException { """ Read the content of this URL and returns it as a String. @param url URL to read content from @return the text from that URL @throws IOException if an IOException occurs. @since 1.0 """ return getText(url, CharsetToolkit.getDefaultSyst...
java
public static String getText(URL url) throws IOException { return getText(url, CharsetToolkit.getDefaultSystemCharset().name()); }
[ "public", "static", "String", "getText", "(", "URL", "url", ")", "throws", "IOException", "{", "return", "getText", "(", "url", ",", "CharsetToolkit", ".", "getDefaultSystemCharset", "(", ")", ".", "name", "(", ")", ")", ";", "}" ]
Read the content of this URL and returns it as a String. @param url URL to read content from @return the text from that URL @throws IOException if an IOException occurs. @since 1.0
[ "Read", "the", "content", "of", "this", "URL", "and", "returns", "it", "as", "a", "String", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L603-L605
Netflix/eureka
eureka-client/src/main/java/com/netflix/discovery/util/SystemUtil.java
SystemUtil.getServerIPv4
public static String getServerIPv4() { """ Returns server IP address (v4 or v6) bound to local NIC. If multiple NICs are present, choose 'eth0' or 'en0' or any one with name ending with 0. If non found, take first on the list that is not localhost. If no NIC present (relevant only for desktop deployments), retur...
java
public static String getServerIPv4() { String candidateAddress = null; try { Enumeration<NetworkInterface> nics = NetworkInterface.getNetworkInterfaces(); while (nics.hasMoreElements()) { NetworkInterface nic = nics.nextElement(); Enumeration<InetA...
[ "public", "static", "String", "getServerIPv4", "(", ")", "{", "String", "candidateAddress", "=", "null", ";", "try", "{", "Enumeration", "<", "NetworkInterface", ">", "nics", "=", "NetworkInterface", ".", "getNetworkInterfaces", "(", ")", ";", "while", "(", "n...
Returns server IP address (v4 or v6) bound to local NIC. If multiple NICs are present, choose 'eth0' or 'en0' or any one with name ending with 0. If non found, take first on the list that is not localhost. If no NIC present (relevant only for desktop deployments), return loopback address.
[ "Returns", "server", "IP", "address", "(", "v4", "or", "v6", ")", "bound", "to", "local", "NIC", ".", "If", "multiple", "NICs", "are", "present", "choose", "eth0", "or", "en0", "or", "any", "one", "with", "name", "ending", "with", "0", ".", "If", "no...
train
https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-client/src/main/java/com/netflix/discovery/util/SystemUtil.java#L37-L59
aspectran/aspectran
core/src/main/java/com/aspectran/core/support/i18n/message/ResourceBundleMessageSource.java
ResourceBundleMessageSource.resolveCodeWithoutArguments
@Override protected String resolveCodeWithoutArguments(String code, Locale locale) { """ Resolves the given message code as key in the registered resource bundles, returning the value found in the bundle as-is (without MessageFormat parsing). """ String result = null; for (int i = 0; resul...
java
@Override protected String resolveCodeWithoutArguments(String code, Locale locale) { String result = null; for (int i = 0; result == null && i < this.basenames.length; i++) { ResourceBundle bundle = getResourceBundle(this.basenames[i], locale); if (bundle != null) { ...
[ "@", "Override", "protected", "String", "resolveCodeWithoutArguments", "(", "String", "code", ",", "Locale", "locale", ")", "{", "String", "result", "=", "null", ";", "for", "(", "int", "i", "=", "0", ";", "result", "==", "null", "&&", "i", "<", "this", ...
Resolves the given message code as key in the registered resource bundles, returning the value found in the bundle as-is (without MessageFormat parsing).
[ "Resolves", "the", "given", "message", "code", "as", "key", "in", "the", "registered", "resource", "bundles", "returning", "the", "value", "found", "in", "the", "bundle", "as", "-", "is", "(", "without", "MessageFormat", "parsing", ")", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/support/i18n/message/ResourceBundleMessageSource.java#L212-L222
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/ElasticSearchHttpExportClient.java
ElasticSearchHttpExportClient.makeRequest
private HttpUriRequest makeRequest(URI uri, final String requestBody) { """ Generate the HTTP request. @param uri The request URI @param requestBody The request body, URL encoded if necessary @return The HTTP request. """ HttpPost post = new HttpPost(uri); post.setEntity(new St...
java
private HttpUriRequest makeRequest(URI uri, final String requestBody) { HttpPost post = new HttpPost(uri); post.setEntity(new StringEntity(requestBody, m_contentType)); return post; }
[ "private", "HttpUriRequest", "makeRequest", "(", "URI", "uri", ",", "final", "String", "requestBody", ")", "{", "HttpPost", "post", "=", "new", "HttpPost", "(", "uri", ")", ";", "post", ".", "setEntity", "(", "new", "StringEntity", "(", "requestBody", ",", ...
Generate the HTTP request. @param uri The request URI @param requestBody The request body, URL encoded if necessary @return The HTTP request.
[ "Generate", "the", "HTTP", "request", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ElasticSearchHttpExportClient.java#L271-L276
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/UserInterfaceApi.java
UserInterfaceApi.postUiOpenwindowInformation
public void postUiOpenwindowInformation(Integer targetId, String datasource, String token) throws ApiException { """ Open Information Window Open the information window for a character, corporation or alliance inside the client --- SSO Scope: esi-ui.open_window.v1 @param targetId The target to open (required...
java
public void postUiOpenwindowInformation(Integer targetId, String datasource, String token) throws ApiException { postUiOpenwindowInformationWithHttpInfo(targetId, datasource, token); }
[ "public", "void", "postUiOpenwindowInformation", "(", "Integer", "targetId", ",", "String", "datasource", ",", "String", "token", ")", "throws", "ApiException", "{", "postUiOpenwindowInformationWithHttpInfo", "(", "targetId", ",", "datasource", ",", "token", ")", ";",...
Open Information Window Open the information window for a character, corporation or alliance inside the client --- SSO Scope: esi-ui.open_window.v1 @param targetId The target to open (required) @param datasource The server name you would like data from (optional, default to tranquility) @param token Access token to us...
[ "Open", "Information", "Window", "Open", "the", "information", "window", "for", "a", "character", "corporation", "or", "alliance", "inside", "the", "client", "---", "SSO", "Scope", ":", "esi", "-", "ui", ".", "open_window", ".", "v1" ]
train
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/UserInterfaceApi.java#L477-L479
oaqa/uima-ecd
src/main/java/edu/cmu/lti/oaqa/ecd/driver/SimplePipelineRev803.java
SimplePipelineRev803.runPipeline
public static void runPipeline(final JCas jcas, final AnalysisEngine... engines) throws UIMAException, IOException { """ Run a sequence of {@link AnalysisEngine analysis engines} over a {@link JCas}. This method does not {@link AnalysisEngine#destroy() destroy} the engines or send them other events like {@...
java
public static void runPipeline(final JCas jcas, final AnalysisEngine... engines) throws UIMAException, IOException { if (engines.length == 0) { return; } JCasIterator jcasIter = engines[0].processAndOutputNewCASes(jcas); AnalysisEngine[] enginesRemains = Arrays.copyOfRange(engines, 1, engine...
[ "public", "static", "void", "runPipeline", "(", "final", "JCas", "jcas", ",", "final", "AnalysisEngine", "...", "engines", ")", "throws", "UIMAException", ",", "IOException", "{", "if", "(", "engines", ".", "length", "==", "0", ")", "{", "return", ";", "}"...
Run a sequence of {@link AnalysisEngine analysis engines} over a {@link JCas}. This method does not {@link AnalysisEngine#destroy() destroy} the engines or send them other events like {@link AnalysisEngine#collectionProcessComplete()}. This is left to the caller. @param jcas the jCas to process @param engines a sequen...
[ "Run", "a", "sequence", "of", "{", "@link", "AnalysisEngine", "analysis", "engines", "}", "over", "a", "{", "@link", "JCas", "}", ".", "This", "method", "does", "not", "{", "@link", "AnalysisEngine#destroy", "()", "destroy", "}", "the", "engines", "or", "s...
train
https://github.com/oaqa/uima-ecd/blob/09a0ae26647490b43affc36ab3a01100702b989f/src/main/java/edu/cmu/lti/oaqa/ecd/driver/SimplePipelineRev803.java#L225-L237
sawano/java-commons
src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java
AbstractValidate.isFalse
public void isFalse(final boolean expression, final String message, final Object... values) { """ <p>Validate that the argument condition is {@code false}; otherwise throwing an exception with the specified message. This method is useful when validating according to an arbitrary boolean expression, such as valida...
java
public void isFalse(final boolean expression, final String message, final Object... values) { if (expression) { fail(String.format(message, values)); } }
[ "public", "void", "isFalse", "(", "final", "boolean", "expression", ",", "final", "String", "message", ",", "final", "Object", "...", "values", ")", "{", "if", "(", "expression", ")", "{", "fail", "(", "String", ".", "format", "(", "message", ",", "value...
<p>Validate that the argument condition is {@code false}; otherwise throwing an exception with the specified message. This method is useful when validating according to an arbitrary boolean expression, such as validating a primitive number or using your own custom validation expression.</p> @param expression the boole...
[ "<p", ">", "Validate", "that", "the", "argument", "condition", "is", "{", "@code", "false", "}", ";", "otherwise", "throwing", "an", "exception", "with", "the", "specified", "message", ".", "This", "method", "is", "useful", "when", "validating", "according", ...
train
https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java#L453-L457
liyiorg/weixin-popular
src/main/java/weixin/popular/api/ScanAPI.java
ScanAPI.productGetqrcode
public static ProductGetqrcodeResult productGetqrcode(String accessToken, ProductGetqrcode productGetqrcode) { """ 获取商品二维码 @param accessToken accessToken @param productGetqrcode productGetqrcode @return ProductGetqrcodeResult """ return productGetqrcode(accessToken, JsonUtil.toJSONString(pro...
java
public static ProductGetqrcodeResult productGetqrcode(String accessToken, ProductGetqrcode productGetqrcode) { return productGetqrcode(accessToken, JsonUtil.toJSONString(productGetqrcode)); }
[ "public", "static", "ProductGetqrcodeResult", "productGetqrcode", "(", "String", "accessToken", ",", "ProductGetqrcode", "productGetqrcode", ")", "{", "return", "productGetqrcode", "(", "accessToken", ",", "JsonUtil", ".", "toJSONString", "(", "productGetqrcode", ")", "...
获取商品二维码 @param accessToken accessToken @param productGetqrcode productGetqrcode @return ProductGetqrcodeResult
[ "获取商品二维码" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/ScanAPI.java#L133-L135
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
HtmlTree.HEADING
public static HtmlTree HEADING(HtmlTag headingTag, boolean printTitle, Content body) { """ Generates a heading tag (h1 to h6) with the title attribute. It also encloses a content. @param headingTag the heading tag to be generated @param printTitle true if the title for the tag needs to be printed else false ...
java
public static HtmlTree HEADING(HtmlTag headingTag, boolean printTitle, Content body) { return HEADING(headingTag, printTitle, null, body); }
[ "public", "static", "HtmlTree", "HEADING", "(", "HtmlTag", "headingTag", ",", "boolean", "printTitle", ",", "Content", "body", ")", "{", "return", "HEADING", "(", "headingTag", ",", "printTitle", ",", "null", ",", "body", ")", ";", "}" ]
Generates a heading tag (h1 to h6) with the title attribute. It also encloses a content. @param headingTag the heading tag to be generated @param printTitle true if the title for the tag needs to be printed else false @param body content for the tag @return an HtmlTree object for the tag
[ "Generates", "a", "heading", "tag", "(", "h1", "to", "h6", ")", "with", "the", "title", "attribute", ".", "It", "also", "encloses", "a", "content", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L426-L428
jqm4gwt/jqm4gwt
library/src/main/java/com/sksamuel/jqm4gwt/list/JQMList.java
JQMList.addItem
public JQMListItem addItem(String text, String url) { """ Adds a new {@link JQMListItem} that contains the given @param text as the content. Note that if you want to navigate to an internal url (ie, another JQM Page) then you must prefix the url with a hash. IE, the hash is not added automatically. This allows y...
java
public JQMListItem addItem(String text, String url) { JQMListItem item = new JQMListItem(text, url); addItem(items.size(), item); return item; }
[ "public", "JQMListItem", "addItem", "(", "String", "text", ",", "String", "url", ")", "{", "JQMListItem", "item", "=", "new", "JQMListItem", "(", "text", ",", "url", ")", ";", "addItem", "(", "items", ".", "size", "(", ")", ",", "item", ")", ";", "re...
Adds a new {@link JQMListItem} that contains the given @param text as the content. Note that if you want to navigate to an internal url (ie, another JQM Page) then you must prefix the url with a hash. IE, the hash is not added automatically. This allows you to navigate to external urls as well. <br> If you add an item ...
[ "Adds", "a", "new", "{" ]
train
https://github.com/jqm4gwt/jqm4gwt/blob/cf59958e9ba6d4b70f42507b2c77f10c2465085b/library/src/main/java/com/sksamuel/jqm4gwt/list/JQMList.java#L290-L294
hypfvieh/java-utils
src/main/java/com/github/hypfvieh/util/StringUtil.java
StringUtil.replaceByMap
public static String replaceByMap(String _searchStr, Map<String, String> _replacements) { """ Replace all placeholders in given string by value of the corresponding key in given Map. @param _searchStr search string @param _replacements replacement @return String or null if _searchStr was null """ ...
java
public static String replaceByMap(String _searchStr, Map<String, String> _replacements) { if (_searchStr == null) { return null; } if (_replacements == null || _replacements.isEmpty()) { return _searchStr; } String str = _searchStr; for (Entry<St...
[ "public", "static", "String", "replaceByMap", "(", "String", "_searchStr", ",", "Map", "<", "String", ",", "String", ">", "_replacements", ")", "{", "if", "(", "_searchStr", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "_replacements", ...
Replace all placeholders in given string by value of the corresponding key in given Map. @param _searchStr search string @param _replacements replacement @return String or null if _searchStr was null
[ "Replace", "all", "placeholders", "in", "given", "string", "by", "value", "of", "the", "corresponding", "key", "in", "given", "Map", "." ]
train
https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L168-L183
OpenLiberty/open-liberty
dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/clients/common/OIDCClientAuthenticatorUtil.java
OIDCClientAuthenticatorUtil.doClientSideRedirect
private void doClientSideRedirect(HttpServletResponse response, String loginURL, String state, String domain) throws IOException { """ /* A javascript redirect is preferred over a 302 because it will preserve web fragements in the URL, i.e. foo.com/something#fragment. """ response.setStatus(HttpServ...
java
private void doClientSideRedirect(HttpServletResponse response, String loginURL, String state, String domain) throws IOException { response.setStatus(HttpServletResponse.SC_OK); PrintWriter pw = response.getWriter(); pw.println("<html xmlns=\"http://www.w3.org/1999/xhtml\">"); pw.printl...
[ "private", "void", "doClientSideRedirect", "(", "HttpServletResponse", "response", ",", "String", "loginURL", ",", "String", "state", ",", "String", "domain", ")", "throws", "IOException", "{", "response", ".", "setStatus", "(", "HttpServletResponse", ".", "SC_OK", ...
/* A javascript redirect is preferred over a 302 because it will preserve web fragements in the URL, i.e. foo.com/something#fragment.
[ "/", "*", "A", "javascript", "redirect", "is", "preferred", "over", "a", "302", "because", "it", "will", "preserve", "web", "fragements", "in", "the", "URL", "i", ".", "e", ".", "foo", ".", "com", "/", "something#fragment", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.openidconnect.clients.common/src/com/ibm/ws/security/openidconnect/clients/common/OIDCClientAuthenticatorUtil.java#L507-L530
joniles/mpxj
src/main/java/net/sf/mpxj/sdef/SDEFWriter.java
SDEFWriter.writeCalendarException
private void writeCalendarException(ProjectCalendar parentCalendar, ProjectCalendarException record) throws IOException { """ Write a calendar exception. @param parentCalendar parent calendar instance @param record calendar exception instance @throws IOException """ m_buffer.setLength(0); Cale...
java
private void writeCalendarException(ProjectCalendar parentCalendar, ProjectCalendarException record) throws IOException { m_buffer.setLength(0); Calendar stepDay = DateHelper.popCalendar(record.getFromDate()); // Start at From Date, then step through days... Calendar lastDay = DateHelper.popCalenda...
[ "private", "void", "writeCalendarException", "(", "ProjectCalendar", "parentCalendar", ",", "ProjectCalendarException", "record", ")", "throws", "IOException", "{", "m_buffer", ".", "setLength", "(", "0", ")", ";", "Calendar", "stepDay", "=", "DateHelper", ".", "pop...
Write a calendar exception. @param parentCalendar parent calendar instance @param record calendar exception instance @throws IOException
[ "Write", "a", "calendar", "exception", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/sdef/SDEFWriter.java#L223-L241
threerings/nenya
core/src/main/java/com/threerings/media/TimerView.java
TimerView.setWarning
public void setWarning (float warnPercent, ResultListener<TimerView> warner) { """ Setup a warning to trigger after the timer is "warnPercent" or more completed. If "warner" is non-null, it will be called at that time. """ // This warning hasn't triggered yet _warned = false; // Her...
java
public void setWarning (float warnPercent, ResultListener<TimerView> warner) { // This warning hasn't triggered yet _warned = false; // Here are the details _warnPercent = warnPercent; _warner = warner; }
[ "public", "void", "setWarning", "(", "float", "warnPercent", ",", "ResultListener", "<", "TimerView", ">", "warner", ")", "{", "// This warning hasn't triggered yet", "_warned", "=", "false", ";", "// Here are the details", "_warnPercent", "=", "warnPercent", ";", "_w...
Setup a warning to trigger after the timer is "warnPercent" or more completed. If "warner" is non-null, it will be called at that time.
[ "Setup", "a", "warning", "to", "trigger", "after", "the", "timer", "is", "warnPercent", "or", "more", "completed", ".", "If", "warner", "is", "non", "-", "null", "it", "will", "be", "called", "at", "that", "time", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/TimerView.java#L93-L101
lordcodes/SnackbarBuilder
snackbarbuilder/src/main/java/com/github/andrewlord1990/snackbarbuilder/SnackbarBuilder.java
SnackbarBuilder.appendMessage
public SnackbarBuilder appendMessage(CharSequence message, @ColorInt int color) { """ Add some text to append to the message shown on the Snackbar and a colour to make it. @param message Text to append to the Snackbar message. @param color Colour to make the appended text. @return This instance. """ ...
java
public SnackbarBuilder appendMessage(CharSequence message, @ColorInt int color) { initialiseAppendMessages(); Spannable spannable = new SpannableString(message); spannable.setSpan(new ForegroundColorSpan(color), 0, spannable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); appendMessages.append(sp...
[ "public", "SnackbarBuilder", "appendMessage", "(", "CharSequence", "message", ",", "@", "ColorInt", "int", "color", ")", "{", "initialiseAppendMessages", "(", ")", ";", "Spannable", "spannable", "=", "new", "SpannableString", "(", "message", ")", ";", "spannable",...
Add some text to append to the message shown on the Snackbar and a colour to make it. @param message Text to append to the Snackbar message. @param color Colour to make the appended text. @return This instance.
[ "Add", "some", "text", "to", "append", "to", "the", "message", "shown", "on", "the", "Snackbar", "and", "a", "colour", "to", "make", "it", "." ]
train
https://github.com/lordcodes/SnackbarBuilder/blob/a104a753c78ed66940c19d295e141a521cf81d73/snackbarbuilder/src/main/java/com/github/andrewlord1990/snackbarbuilder/SnackbarBuilder.java#L198-L205
forge/core
javaee/impl/src/main/java/org/jboss/forge/addon/javaee/cdi/CDIOperations.java
CDIOperations.getProjectInjectableBeans
public List<JavaResource> getProjectInjectableBeans(Project project) { """ Returns all the injectable objects from the given {@link Project}. Most of the Java EE components can be injected, except JPA entities, message driven beans.... """ final List<JavaResource> beans = new ArrayList<>(); if (pr...
java
public List<JavaResource> getProjectInjectableBeans(Project project) { final List<JavaResource> beans = new ArrayList<>(); if (project != null) { project.getFacet(JavaSourceFacet.class).visitJavaSources(new JavaResourceVisitor() { @Override public void visi...
[ "public", "List", "<", "JavaResource", ">", "getProjectInjectableBeans", "(", "Project", "project", ")", "{", "final", "List", "<", "JavaResource", ">", "beans", "=", "new", "ArrayList", "<>", "(", ")", ";", "if", "(", "project", "!=", "null", ")", "{", ...
Returns all the injectable objects from the given {@link Project}. Most of the Java EE components can be injected, except JPA entities, message driven beans....
[ "Returns", "all", "the", "injectable", "objects", "from", "the", "given", "{" ]
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/javaee/impl/src/main/java/org/jboss/forge/addon/javaee/cdi/CDIOperations.java#L55-L103
davidmoten/rxjava2-extras
src/main/java/com/github/davidmoten/rx2/internal/flowable/buffertofile/MemoryMappedFile.java
MemoryMappedFile.getBytes
public void getBytes(long pos, byte[] data, long offset, long length) { """ May want to have offset & length within data as well, for both of these """ unsafe.copyMemory(null, pos + addr, data, BYTE_ARRAY_OFFSET + offset, length); }
java
public void getBytes(long pos, byte[] data, long offset, long length) { unsafe.copyMemory(null, pos + addr, data, BYTE_ARRAY_OFFSET + offset, length); }
[ "public", "void", "getBytes", "(", "long", "pos", ",", "byte", "[", "]", "data", ",", "long", "offset", ",", "long", "length", ")", "{", "unsafe", ".", "copyMemory", "(", "null", ",", "pos", "+", "addr", ",", "data", ",", "BYTE_ARRAY_OFFSET", "+", "o...
May want to have offset & length within data as well, for both of these
[ "May", "want", "to", "have", "offset", "&", "length", "within", "data", "as", "well", "for", "both", "of", "these" ]
train
https://github.com/davidmoten/rxjava2-extras/blob/bf5ece3f97191f29a81957a6529bc3cfa4d7b328/src/main/java/com/github/davidmoten/rx2/internal/flowable/buffertofile/MemoryMappedFile.java#L117-L119
googleapis/google-cloud-java
google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
ProductSearchClient.addProductToProductSet
public final void addProductToProductSet(ProductSetName name, ProductName product) { """ Adds a Product to the specified ProductSet. If the Product is already present, no change is made. <p>One Product can be added to at most 100 ProductSets. <p>Possible errors: <p>&#42; Returns NOT_FOUND if the Product ...
java
public final void addProductToProductSet(ProductSetName name, ProductName product) { AddProductToProductSetRequest request = AddProductToProductSetRequest.newBuilder() .setName(name == null ? null : name.toString()) .setProduct(product == null ? null : product.toString()) ...
[ "public", "final", "void", "addProductToProductSet", "(", "ProductSetName", "name", ",", "ProductName", "product", ")", "{", "AddProductToProductSetRequest", "request", "=", "AddProductToProductSetRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "name", "==...
Adds a Product to the specified ProductSet. If the Product is already present, no change is made. <p>One Product can be added to at most 100 ProductSets. <p>Possible errors: <p>&#42; Returns NOT_FOUND if the Product or the ProductSet doesn't exist. <p>Sample code: <pre><code> try (ProductSearchClient productSearch...
[ "Adds", "a", "Product", "to", "the", "specified", "ProductSet", ".", "If", "the", "Product", "is", "already", "present", "no", "change", "is", "made", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java#L2257-L2265
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/parametrics/independentsamples/LevenesIndependentSamples.java
LevenesIndependentSamples.checkCriticalValue
private static boolean checkCriticalValue(double score, int n, int k, double aLevel) { """ Checks the Critical Value to determine if the Hypothesis should be rejected. @param score @param n @param k @param aLevel @return """ double probability=ContinuousDistributions.fCdf(score,k-1,n-k); ...
java
private static boolean checkCriticalValue(double score, int n, int k, double aLevel) { double probability=ContinuousDistributions.fCdf(score,k-1,n-k); boolean rejectH0=false; if(probability<=aLevel || probability>=(1-aLevel)) { rejectH0=true; } return rejectH0; ...
[ "private", "static", "boolean", "checkCriticalValue", "(", "double", "score", ",", "int", "n", ",", "int", "k", ",", "double", "aLevel", ")", "{", "double", "probability", "=", "ContinuousDistributions", ".", "fCdf", "(", "score", ",", "k", "-", "1", ",", ...
Checks the Critical Value to determine if the Hypothesis should be rejected. @param score @param n @param k @param aLevel @return
[ "Checks", "the", "Critical", "Value", "to", "determine", "if", "the", "Hypothesis", "should", "be", "rejected", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/parametrics/independentsamples/LevenesIndependentSamples.java#L129-L139
google/closure-compiler
src/com/google/javascript/jscomp/PolymerPass.java
PolymerPass.appendPolymerElementExterns
private void appendPolymerElementExterns(final PolymerClassDefinition def) { """ Duplicates the PolymerElement externs with a different element base class if needed. For example, if the base class is HTMLInputElement, then a class PolymerInputElement will be added. If the element does not extend a native HTML el...
java
private void appendPolymerElementExterns(final PolymerClassDefinition def) { if (!nativeExternsAdded.add(def.nativeBaseElement)) { return; } Node block = IR.block(); Node baseExterns = polymerElementExterns.cloneTree(); String polymerElementType = PolymerPassStaticUtils.getPolymerElementType...
[ "private", "void", "appendPolymerElementExterns", "(", "final", "PolymerClassDefinition", "def", ")", "{", "if", "(", "!", "nativeExternsAdded", ".", "add", "(", "def", ".", "nativeBaseElement", ")", ")", "{", "return", ";", "}", "Node", "block", "=", "IR", ...
Duplicates the PolymerElement externs with a different element base class if needed. For example, if the base class is HTMLInputElement, then a class PolymerInputElement will be added. If the element does not extend a native HTML element, this method is a no-op.
[ "Duplicates", "the", "PolymerElement", "externs", "with", "a", "different", "element", "base", "class", "if", "needed", ".", "For", "example", "if", "the", "base", "class", "is", "HTMLInputElement", "then", "a", "class", "PolymerInputElement", "will", "be", "add...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/PolymerPass.java#L192-L230
line/armeria
zipkin/src/main/java/com/linecorp/armeria/server/tracing/HttpTracingService.java
HttpTracingService.newDecorator
public static Function<Service<HttpRequest, HttpResponse>, HttpTracingService> newDecorator(Tracing tracing) { """ Creates a new tracing {@link Service} decorator using the specified {@link Tracing} instance. """ ensureScopeUsesRequestContext(tracing); return service -> new HttpTracingServi...
java
public static Function<Service<HttpRequest, HttpResponse>, HttpTracingService> newDecorator(Tracing tracing) { ensureScopeUsesRequestContext(tracing); return service -> new HttpTracingService(service, tracing); }
[ "public", "static", "Function", "<", "Service", "<", "HttpRequest", ",", "HttpResponse", ">", ",", "HttpTracingService", ">", "newDecorator", "(", "Tracing", "tracing", ")", "{", "ensureScopeUsesRequestContext", "(", "tracing", ")", ";", "return", "service", "->",...
Creates a new tracing {@link Service} decorator using the specified {@link Tracing} instance.
[ "Creates", "a", "new", "tracing", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/zipkin/src/main/java/com/linecorp/armeria/server/tracing/HttpTracingService.java#L55-L59
landawn/AbacusUtil
src/com/landawn/abacus/util/FloatList.java
FloatList.anyMatch
public <E extends Exception> boolean anyMatch(Try.FloatPredicate<E> filter) throws E { """ Returns whether any elements of this List match the provided predicate. @param filter @return """ return anyMatch(0, size(), filter); }
java
public <E extends Exception> boolean anyMatch(Try.FloatPredicate<E> filter) throws E { return anyMatch(0, size(), filter); }
[ "public", "<", "E", "extends", "Exception", ">", "boolean", "anyMatch", "(", "Try", ".", "FloatPredicate", "<", "E", ">", "filter", ")", "throws", "E", "{", "return", "anyMatch", "(", "0", ",", "size", "(", ")", ",", "filter", ")", ";", "}" ]
Returns whether any elements of this List match the provided predicate. @param filter @return
[ "Returns", "whether", "any", "elements", "of", "this", "List", "match", "the", "provided", "predicate", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/FloatList.java#L929-L931
openbaton/openbaton-client
sdk/src/main/java/org/openbaton/sdk/api/rest/NetworkServiceDescriptorAgent.java
NetworkServiceDescriptorAgent.createVNFDependency
@Help( help = "Create the VirtualNetworkFunctionDescriptor dependency of a NetworkServiceDescriptor with specific id" ) public VNFDependency createVNFDependency(final String idNSD, final VNFDependency vnfDependency) throws SDKException { """ Add a new VNFDependency to a specific NetworkServic...
java
@Help( help = "Create the VirtualNetworkFunctionDescriptor dependency of a NetworkServiceDescriptor with specific id" ) public VNFDependency createVNFDependency(final String idNSD, final VNFDependency vnfDependency) throws SDKException { String url = idNSD + "/vnfdependencies" + "/"; retur...
[ "@", "Help", "(", "help", "=", "\"Create the VirtualNetworkFunctionDescriptor dependency of a NetworkServiceDescriptor with specific id\"", ")", "public", "VNFDependency", "createVNFDependency", "(", "final", "String", "idNSD", ",", "final", "VNFDependency", "vnfDependency", ")",...
Add a new VNFDependency to a specific NetworkServiceDescriptor. @param idNSD the ID of the NetworkServiceDescriptor @param vnfDependency the new VNFDependency @return the new VNFDependency @throws SDKException if the request fails
[ "Add", "a", "new", "VNFDependency", "to", "a", "specific", "NetworkServiceDescriptor", "." ]
train
https://github.com/openbaton/openbaton-client/blob/6ca6dd6b62a23940d312213d6fa489d5b636061a/sdk/src/main/java/org/openbaton/sdk/api/rest/NetworkServiceDescriptorAgent.java#L261-L269
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java
BaseMessagingEngineImpl.deleteLocalizationPoint
final void deleteLocalizationPoint(JsBus bus, LWMConfig dest) { """ Pass the request to delete a localization point onto the localizer object. @param lp localization point definition """ String thisMethodName = "deleteLocalizationPoint"; if (TraceComponent.isAnyTracingEnabled() && tc.isEnt...
java
final void deleteLocalizationPoint(JsBus bus, LWMConfig dest) { String thisMethodName = "deleteLocalizationPoint"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, thisMethodName, dest); } try { _localizer.deleteLocalizationPoi...
[ "final", "void", "deleteLocalizationPoint", "(", "JsBus", "bus", ",", "LWMConfig", "dest", ")", "{", "String", "thisMethodName", "=", "\"deleteLocalizationPoint\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEn...
Pass the request to delete a localization point onto the localizer object. @param lp localization point definition
[ "Pass", "the", "request", "to", "delete", "a", "localization", "point", "onto", "the", "localizer", "object", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/BaseMessagingEngineImpl.java#L1519-L1540
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/ContinuousDistributions.java
ContinuousDistributions.betinc
protected static double betinc(double x, double A, double B) { """ Internal function used by StudentCdf @param x @param A @param B @return """ double A0=0.0; double B0=1.0; double A1=1.0; double B1=1.0; double M9=0.0; double A2=0.0; while (Math.abs(...
java
protected static double betinc(double x, double A, double B) { double A0=0.0; double B0=1.0; double A1=1.0; double B1=1.0; double M9=0.0; double A2=0.0; while (Math.abs((A1-A2)/A1)>0.00001) { A2=A1; double C9=-(A+M9)*(A+B+M9)*x/(A+2.0*M9)/(...
[ "protected", "static", "double", "betinc", "(", "double", "x", ",", "double", "A", ",", "double", "B", ")", "{", "double", "A0", "=", "0.0", ";", "double", "B0", "=", "1.0", ";", "double", "A1", "=", "1.0", ";", "double", "B1", "=", "1.0", ";", "...
Internal function used by StudentCdf @param x @param A @param B @return
[ "Internal", "function", "used", "by", "StudentCdf" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/ContinuousDistributions.java#L128-L150
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/api/AbstractRecordReader.java
AbstractRecordReader.subscribeToEvent
@Override public void subscribeToEvent(EventListener eventListener, Class<? extends AbstractTaskEvent> eventType) { """ Subscribes the listener object to receive events of the given type. @param eventListener the listener object to register @param eventType the type of event to register the listener for ...
java
@Override public void subscribeToEvent(EventListener eventListener, Class<? extends AbstractTaskEvent> eventType) { this.eventHandler.subscribeToEvent(eventListener, eventType); }
[ "@", "Override", "public", "void", "subscribeToEvent", "(", "EventListener", "eventListener", ",", "Class", "<", "?", "extends", "AbstractTaskEvent", ">", "eventType", ")", "{", "this", ".", "eventHandler", ".", "subscribeToEvent", "(", "eventListener", ",", "even...
Subscribes the listener object to receive events of the given type. @param eventListener the listener object to register @param eventType the type of event to register the listener for
[ "Subscribes", "the", "listener", "object", "to", "receive", "events", "of", "the", "given", "type", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/api/AbstractRecordReader.java#L43-L46
wcm-io/wcm-io-config
core/src/main/java/io/wcm/config/core/management/impl/PersistenceTypeConversion.java
PersistenceTypeConversion.toPersistenceType
public static Object toPersistenceType(Object value, Class<?> parameterType) { """ Convert object to be persisted. @param value Configured value @param parameterType Parameter type @return value that can be persisted """ if (!isTypeConversionRequired(parameterType)) { return value; } if (M...
java
public static Object toPersistenceType(Object value, Class<?> parameterType) { if (!isTypeConversionRequired(parameterType)) { return value; } if (Map.class.isAssignableFrom(parameterType) && (value instanceof Map)) { Map<?, ?> map = (Map<?, ?>)value; Map.Entry<?, ?>[] entries = Iterators....
[ "public", "static", "Object", "toPersistenceType", "(", "Object", "value", ",", "Class", "<", "?", ">", "parameterType", ")", "{", "if", "(", "!", "isTypeConversionRequired", "(", "parameterType", ")", ")", "{", "return", "value", ";", "}", "if", "(", "Map...
Convert object to be persisted. @param value Configured value @param parameterType Parameter type @return value that can be persisted
[ "Convert", "object", "to", "be", "persisted", "." ]
train
https://github.com/wcm-io/wcm-io-config/blob/9a03d72a4314163a171c7ef815fb6a1eba181828/core/src/main/java/io/wcm/config/core/management/impl/PersistenceTypeConversion.java#L63-L80
languagetool-org/languagetool
languagetool-gui-commons/src/main/java/org/languagetool/gui/Tools.java
Tools.openFileDialog
static File openFileDialog(Frame frame, FileFilter fileFilter) { """ Show a file chooser dialog and return the file selected by the user or <code>null</code>. """ return openFileDialog(frame, fileFilter, null); }
java
static File openFileDialog(Frame frame, FileFilter fileFilter) { return openFileDialog(frame, fileFilter, null); }
[ "static", "File", "openFileDialog", "(", "Frame", "frame", ",", "FileFilter", "fileFilter", ")", "{", "return", "openFileDialog", "(", "frame", ",", "fileFilter", ",", "null", ")", ";", "}" ]
Show a file chooser dialog and return the file selected by the user or <code>null</code>.
[ "Show", "a", "file", "chooser", "dialog", "and", "return", "the", "file", "selected", "by", "the", "user", "or", "<code", ">", "null<", "/", "code", ">", "." ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-gui-commons/src/main/java/org/languagetool/gui/Tools.java#L57-L59
OpenLiberty/open-liberty
dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/config/CommonConfigUtils.java
CommonConfigUtils.getBooleanConfigAttribute
public boolean getBooleanConfigAttribute(Map<String, Object> props, String key, boolean defaultValue) { """ Returns the value for the configuration attribute matching the key provided. If the value does not exist or is empty, the provided default value will be returned. """ if (props.containsKey(key))...
java
public boolean getBooleanConfigAttribute(Map<String, Object> props, String key, boolean defaultValue) { if (props.containsKey(key)) { return (Boolean) props.get(key); } return defaultValue; }
[ "public", "boolean", "getBooleanConfigAttribute", "(", "Map", "<", "String", ",", "Object", ">", "props", ",", "String", "key", ",", "boolean", "defaultValue", ")", "{", "if", "(", "props", ".", "containsKey", "(", "key", ")", ")", "{", "return", "(", "B...
Returns the value for the configuration attribute matching the key provided. If the value does not exist or is empty, the provided default value will be returned.
[ "Returns", "the", "value", "for", "the", "configuration", "attribute", "matching", "the", "key", "provided", ".", "If", "the", "value", "does", "not", "exist", "or", "is", "empty", "the", "provided", "default", "value", "will", "be", "returned", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.common/src/com/ibm/ws/security/common/config/CommonConfigUtils.java#L130-L135