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
HalBuilder/halbuilder-guava
src/main/java/com/theoryinpractise/halbuilder/guava/Representations.java
Representations.withLink
public static void withLink(Representation representation, String rel, String href, Predicate<ReadableRepresentation> predicate) { """ Add a link to this resource @param rel @param href The target href for the link, relative to the href of this resource. """ withLink(representation, rel, href, ...
java
public static void withLink(Representation representation, String rel, String href, Predicate<ReadableRepresentation> predicate) { withLink(representation, rel, href, Optional.of(predicate), Optional.<String>absent(), Optional.<String>absent(), ...
[ "public", "static", "void", "withLink", "(", "Representation", "representation", ",", "String", "rel", ",", "String", "href", ",", "Predicate", "<", "ReadableRepresentation", ">", "predicate", ")", "{", "withLink", "(", "representation", ",", "rel", ",", "href",...
Add a link to this resource @param rel @param href The target href for the link, relative to the href of this resource.
[ "Add", "a", "link", "to", "this", "resource" ]
train
https://github.com/HalBuilder/halbuilder-guava/blob/648cb1ae6c4b4cebd82364a8d72d9801bd3db771/src/main/java/com/theoryinpractise/halbuilder/guava/Representations.java#L24-L31
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java
KeyVaultClientCustomImpl.listKeysAsync
public ServiceFuture<List<KeyItem>> listKeysAsync(final String vaultBaseUrl, final ListOperationCallback<KeyItem> serviceCallback) { """ List keys in the specified vault. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param serviceCallback the async ServiceCallback to h...
java
public ServiceFuture<List<KeyItem>> listKeysAsync(final String vaultBaseUrl, final ListOperationCallback<KeyItem> serviceCallback) { return getKeysAsync(vaultBaseUrl, serviceCallback); }
[ "public", "ServiceFuture", "<", "List", "<", "KeyItem", ">", ">", "listKeysAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "ListOperationCallback", "<", "KeyItem", ">", "serviceCallback", ")", "{", "return", "getKeysAsync", "(", "vaultBaseUrl", ",", ...
List keys in the specified vault. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param serviceCallback the async ServiceCallback to handle successful and failed responses. @return the {@link ServiceFuture} object
[ "List", "keys", "in", "the", "specified", "vault", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java#L849-L852
stripe/stripe-android
stripe/src/main/java/com/stripe/android/Stripe.java
Stripe.createPiiTokenSynchronous
public Token createPiiTokenSynchronous(@NonNull String personalId, String publishableKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { """ Blocking method to create a {@link Token} for PII....
java
public Token createPiiTokenSynchronous(@NonNull String personalId, String publishableKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException { validateKey(publishableKey); RequestOptions...
[ "public", "Token", "createPiiTokenSynchronous", "(", "@", "NonNull", "String", "personalId", ",", "String", "publishableKey", ")", "throws", "AuthenticationException", ",", "InvalidRequestException", ",", "APIConnectionException", ",", "CardException", ",", "APIException", ...
Blocking method to create a {@link Token} for PII. Do not call this on the UI thread or your app will crash. @param personalId the personal ID to use for this token @param publishableKey the publishable key to use with this request @return a {@link Token} that can be used for this card @throws AuthenticationException...
[ "Blocking", "method", "to", "create", "a", "{", "@link", "Token", "}", "for", "PII", ".", "Do", "not", "call", "this", "on", "the", "UI", "thread", "or", "your", "app", "will", "crash", "." ]
train
https://github.com/stripe/stripe-android/blob/0f199255f3769a3b84583fe3ace47bfae8c3b1c8/stripe/src/main/java/com/stripe/android/Stripe.java#L600-L616
undertow-io/undertow
core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/Node.java
Node.getContext
Context getContext(final String path, List<String> aliases) { """ Get a context. @param path the context path @param aliases the aliases @return the context, {@code null} if there is no matching context """ VHostMapping host = null; for (final VHostMapping vhost : vHosts) { ...
java
Context getContext(final String path, List<String> aliases) { VHostMapping host = null; for (final VHostMapping vhost : vHosts) { if (aliases.equals(vhost.getAliases())) { host = vhost; break; } } if (host == null) { ret...
[ "Context", "getContext", "(", "final", "String", "path", ",", "List", "<", "String", ">", "aliases", ")", "{", "VHostMapping", "host", "=", "null", ";", "for", "(", "final", "VHostMapping", "vhost", ":", "vHosts", ")", "{", "if", "(", "aliases", ".", "...
Get a context. @param path the context path @param aliases the aliases @return the context, {@code null} if there is no matching context
[ "Get", "a", "context", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/handlers/proxy/mod_cluster/Node.java#L275-L292
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/TableLayoutBuilder.java
TableLayoutBuilder.cell
public TableLayoutBuilder cell(JComponent component, String attributes) { """ Inserts a component at the current row/column. Attributes may be zero or more of rowSpec, columnSpec, colGrId, rowGrId, align and valign. """ Cell cc = cellInternal(component, attributes); lastCC = cc; items....
java
public TableLayoutBuilder cell(JComponent component, String attributes) { Cell cc = cellInternal(component, attributes); lastCC = cc; items.add(cc); return this; }
[ "public", "TableLayoutBuilder", "cell", "(", "JComponent", "component", ",", "String", "attributes", ")", "{", "Cell", "cc", "=", "cellInternal", "(", "component", ",", "attributes", ")", ";", "lastCC", "=", "cc", ";", "items", ".", "add", "(", "cc", ")", ...
Inserts a component at the current row/column. Attributes may be zero or more of rowSpec, columnSpec, colGrId, rowGrId, align and valign.
[ "Inserts", "a", "component", "at", "the", "current", "row", "/", "column", ".", "Attributes", "may", "be", "zero", "or", "more", "of", "rowSpec", "columnSpec", "colGrId", "rowGrId", "align", "and", "valign", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/TableLayoutBuilder.java#L262-L267
albfernandez/itext2
src/main/java/com/lowagie/text/xml/SAXmyHandler.java
SAXmyHandler.startElement
public void startElement(String uri, String lname, String name, Attributes attrs) { """ This method gets called when a start tag is encountered. @param uri the Uniform Resource Identifier @param lname the local name (without prefix), or the empty string if Namespace processing is not being performed. ...
java
public void startElement(String uri, String lname, String name, Attributes attrs) { if (myTags.containsKey(name)) { XmlPeer peer = (XmlPeer) myTags.get(name); handleStartingTags(peer.getTag(), peer.getAttributes(attrs)); } else { Properties attributes = new Pr...
[ "public", "void", "startElement", "(", "String", "uri", ",", "String", "lname", ",", "String", "name", ",", "Attributes", "attrs", ")", "{", "if", "(", "myTags", ".", "containsKey", "(", "name", ")", ")", "{", "XmlPeer", "peer", "=", "(", "XmlPeer", ")...
This method gets called when a start tag is encountered. @param uri the Uniform Resource Identifier @param lname the local name (without prefix), or the empty string if Namespace processing is not being performed. @param name the name of the tag that is encountered @param attrs the list of attributes
[ "This", "method", "gets", "called", "when", "a", "start", "tag", "is", "encountered", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/xml/SAXmyHandler.java#L86-L101
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.config.1.1/src/com/ibm/ws/microprofile/config/impl/ConversionManager.java
ConversionManager.convertGenericClazz
@SuppressWarnings("unchecked") private <T> ConversionStatus convertGenericClazz(String rawString, Class<T> type, TypeVariable<?> typeVariable) { """ Front end to (T)convert(rawString, typeVariable) if isAssignableFrom compatible Converter present @param rawString @param type @param typeVariable @return C...
java
@SuppressWarnings("unchecked") private <T> ConversionStatus convertGenericClazz(String rawString, Class<T> type, TypeVariable<?> typeVariable) { ConversionStatus status = new ConversionStatus(); AnnotatedType[] bounds = typeVariable.getAnnotatedBounds(); for (AnnotatedType bound : bounds) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "T", ">", "ConversionStatus", "convertGenericClazz", "(", "String", "rawString", ",", "Class", "<", "T", ">", "type", ",", "TypeVariable", "<", "?", ">", "typeVariable", ")", "{", "ConversionS...
Front end to (T)convert(rawString, typeVariable) if isAssignableFrom compatible Converter present @param rawString @param type @param typeVariable @return ConversionStatus<T> whether a converter is found and the converted value
[ "Front", "end", "to", "(", "T", ")", "convert", "(", "rawString", "typeVariable", ")", "if", "isAssignableFrom", "compatible", "Converter", "present" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.config.1.1/src/com/ibm/ws/microprofile/config/impl/ConversionManager.java#L244-L261
buschmais/extended-objects
impl/src/main/java/com/buschmais/xo/impl/XOManagerImpl.java
XOManagerImpl.prepareExample
private <T> Map<PrimitivePropertyMethodMetadata<PropertyMetadata>, Object> prepareExample(Example<T> example, Class<?> type, Class<?>... types) { """ Setup an example entity. @param type The type. @param example The provided example. @param <T> The type. @return The example. """ Map<PrimitiveP...
java
private <T> Map<PrimitivePropertyMethodMetadata<PropertyMetadata>, Object> prepareExample(Example<T> example, Class<?> type, Class<?>... types) { Map<PrimitivePropertyMethodMetadata<PropertyMetadata>, Object> exampleEntity = new HashMap<>(); ExampleProxyMethodService<T> proxyMethodService = (ExampleProx...
[ "private", "<", "T", ">", "Map", "<", "PrimitivePropertyMethodMetadata", "<", "PropertyMetadata", ">", ",", "Object", ">", "prepareExample", "(", "Example", "<", "T", ">", "example", ",", "Class", "<", "?", ">", "type", ",", "Class", "<", "?", ">", "..."...
Setup an example entity. @param type The type. @param example The provided example. @param <T> The type. @return The example.
[ "Setup", "an", "example", "entity", "." ]
train
https://github.com/buschmais/extended-objects/blob/186431e81f3d8d26c511cfe1143dee59b03c2e7a/impl/src/main/java/com/buschmais/xo/impl/XOManagerImpl.java#L149-L164
JodaOrg/joda-time
src/main/java/org/joda/time/LocalDateTime.java
LocalDateTime.withDurationAdded
public LocalDateTime withDurationAdded(ReadableDuration durationToAdd, int scalar) { """ Returns a copy of this datetime with the specified duration added. <p> If the addition is zero, then <code>this</code> is returned. @param durationToAdd the duration to add to this one, null means zero @param scalar th...
java
public LocalDateTime withDurationAdded(ReadableDuration durationToAdd, int scalar) { if (durationToAdd == null || scalar == 0) { return this; } long instant = getChronology().add(getLocalMillis(), durationToAdd.getMillis(), scalar); return withLocalMillis(instant); }
[ "public", "LocalDateTime", "withDurationAdded", "(", "ReadableDuration", "durationToAdd", ",", "int", "scalar", ")", "{", "if", "(", "durationToAdd", "==", "null", "||", "scalar", "==", "0", ")", "{", "return", "this", ";", "}", "long", "instant", "=", "getC...
Returns a copy of this datetime with the specified duration added. <p> If the addition is zero, then <code>this</code> is returned. @param durationToAdd the duration to add to this one, null means zero @param scalar the amount of times to add, such as -1 to subtract once @return a copy of this datetime with the dura...
[ "Returns", "a", "copy", "of", "this", "datetime", "with", "the", "specified", "duration", "added", ".", "<p", ">", "If", "the", "addition", "is", "zero", "then", "<code", ">", "this<", "/", "code", ">", "is", "returned", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/LocalDateTime.java#L1035-L1041
Coveros/selenified
src/main/java/com/coveros/selenified/element/Element.java
Element.init
private void init(WebDriver driver, Reporter reporter) { """ A private method to finish setting up each element @param driver - the selenium web driver, the underlying way all actions and assertions are controlled @param reporter - the TestOutput file. This is provided by the SeleniumTestBase functionality...
java
private void init(WebDriver driver, Reporter reporter) { this.driver = driver; this.reporter = reporter; App app = null; if (reporter != null) { app = reporter.getApp(); } is = new Is(this); get = new Get(app, driver, this); verifyState = new...
[ "private", "void", "init", "(", "WebDriver", "driver", ",", "Reporter", "reporter", ")", "{", "this", ".", "driver", "=", "driver", ";", "this", ".", "reporter", "=", "reporter", ";", "App", "app", "=", "null", ";", "if", "(", "reporter", "!=", "null",...
A private method to finish setting up each element @param driver - the selenium web driver, the underlying way all actions and assertions are controlled @param reporter - the TestOutput file. This is provided by the SeleniumTestBase functionality
[ "A", "private", "method", "to", "finish", "setting", "up", "each", "element" ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/Element.java#L215-L238
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javap/Main.java
Main.run
public static int run(String[] args, PrintWriter out) { """ Entry point that does <i>not</i> call System.exit. @param args command line arguments @param out output stream @return an exit code. 0 means success, non-zero means an error occurred. """ JavapTask t = new JavapTask(); t.setLog(out)...
java
public static int run(String[] args, PrintWriter out) { JavapTask t = new JavapTask(); t.setLog(out); return t.run(args); }
[ "public", "static", "int", "run", "(", "String", "[", "]", "args", ",", "PrintWriter", "out", ")", "{", "JavapTask", "t", "=", "new", "JavapTask", "(", ")", ";", "t", ".", "setLog", "(", "out", ")", ";", "return", "t", ".", "run", "(", "args", ")...
Entry point that does <i>not</i> call System.exit. @param args command line arguments @param out output stream @return an exit code. 0 means success, non-zero means an error occurred.
[ "Entry", "point", "that", "does", "<i", ">", "not<", "/", "i", ">", "call", "System", ".", "exit", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javap/Main.java#L56-L60
samskivert/samskivert
src/main/java/com/samskivert/util/RandomUtil.java
RandomUtil.getWeightedIndex
public static int getWeightedIndex (int[] weights, Random r) { """ Pick a random index from the array, weighted by the value of the corresponding array element. @param weights an array of non-negative integers. @param r the random number generator to use @return an index into the array, or -1 if the sum of...
java
public static int getWeightedIndex (int[] weights, Random r) { int sum = IntListUtil.sum(weights); if (sum < 1) { return -1; } int pick = getInt(sum, r); for (int ii = 0, nn = weights.length; ii < nn; ii++) { pick -= weights[ii]; if (pick <...
[ "public", "static", "int", "getWeightedIndex", "(", "int", "[", "]", "weights", ",", "Random", "r", ")", "{", "int", "sum", "=", "IntListUtil", ".", "sum", "(", "weights", ")", ";", "if", "(", "sum", "<", "1", ")", "{", "return", "-", "1", ";", "...
Pick a random index from the array, weighted by the value of the corresponding array element. @param weights an array of non-negative integers. @param r the random number generator to use @return an index into the array, or -1 if the sum of the weights is less than 1. For example, passing in {1, 0, 3, 4} will return...
[ "Pick", "a", "random", "index", "from", "the", "array", "weighted", "by", "the", "value", "of", "the", "corresponding", "array", "element", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/RandomUtil.java#L196-L211
zhangyingwei/cockroach
cockroach-core/src/main/java/com/zhangyingwei/cockroach/common/utils/FileUtils.java
FileUtils.write
public static void write(byte[] bytes,File file) throws IOException { """ wtire bytes into file @param bytes @param file @throws IOException """ BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(file)); outputStream.write(bytes); outputStream.close(); ...
java
public static void write(byte[] bytes,File file) throws IOException { BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(file)); outputStream.write(bytes); outputStream.close(); }
[ "public", "static", "void", "write", "(", "byte", "[", "]", "bytes", ",", "File", "file", ")", "throws", "IOException", "{", "BufferedOutputStream", "outputStream", "=", "new", "BufferedOutputStream", "(", "new", "FileOutputStream", "(", "file", ")", ")", ";",...
wtire bytes into file @param bytes @param file @throws IOException
[ "wtire", "bytes", "into", "file" ]
train
https://github.com/zhangyingwei/cockroach/blob/a8139dea1b4e3e6ec2451520cb9f7700ff0f704e/cockroach-core/src/main/java/com/zhangyingwei/cockroach/common/utils/FileUtils.java#L52-L56
zaproxy/zaproxy
src/org/zaproxy/zap/extension/spider/ExtensionSpider.java
ExtensionSpider.startScan
public int startScan(Target target, User user, Object[] customConfigurations) { """ Starts a new spider scan using the given target and, optionally, spidering from the perspective of a user and with custom configurations. <p> The spider scan will use the most appropriate display name created from the given targ...
java
public int startScan(Target target, User user, Object[] customConfigurations) { return startScan(createDisplayName(target, customConfigurations), target, user, customConfigurations); }
[ "public", "int", "startScan", "(", "Target", "target", ",", "User", "user", ",", "Object", "[", "]", "customConfigurations", ")", "{", "return", "startScan", "(", "createDisplayName", "(", "target", ",", "customConfigurations", ")", ",", "target", ",", "user",...
Starts a new spider scan using the given target and, optionally, spidering from the perspective of a user and with custom configurations. <p> The spider scan will use the most appropriate display name created from the given target, user and custom configurations. @param target the target that will be spidered @param u...
[ "Starts", "a", "new", "spider", "scan", "using", "the", "given", "target", "and", "optionally", "spidering", "from", "the", "perspective", "of", "a", "user", "and", "with", "custom", "configurations", ".", "<p", ">", "The", "spider", "scan", "will", "use", ...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/spider/ExtensionSpider.java#L547-L549
allure-framework/allure1
allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/AbstractPlugin.java
AbstractPlugin.getPluginData
@Override public List<PluginData> getPluginData() { """ This method creates a {@link PluginData} for each field with {@link Plugin.Data} annotation. @see #getFileName(Field) @see #getFieldValue(Field) """ List<PluginData> results = new ArrayList<>(); for (Field field : getClass().getDe...
java
@Override public List<PluginData> getPluginData() { List<PluginData> results = new ArrayList<>(); for (Field field : getClass().getDeclaredFields()) { if (field.isAnnotationPresent(Plugin.Data.class)) { String fileName = getFileName(field); results.add(new...
[ "@", "Override", "public", "List", "<", "PluginData", ">", "getPluginData", "(", ")", "{", "List", "<", "PluginData", ">", "results", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Field", "field", ":", "getClass", "(", ")", ".", "getDeclar...
This method creates a {@link PluginData} for each field with {@link Plugin.Data} annotation. @see #getFileName(Field) @see #getFieldValue(Field)
[ "This", "method", "creates", "a", "{", "@link", "PluginData", "}", "for", "each", "field", "with", "{", "@link", "Plugin", ".", "Data", "}", "annotation", "." ]
train
https://github.com/allure-framework/allure1/blob/9a816fa05d8b894a917b7ebb7fd1a4056dee4693/allure-report-plugin-api/src/main/java/ru/yandex/qatools/allure/data/plugins/AbstractPlugin.java#L54-L64
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java
BigRational.valueOf
public static BigRational valueOf(int numerator, int denominator) { """ Creates a rational number of the specified numerator/denominator int values. @param numerator the numerator int value @param denominator the denominator int value (0 not allowed) @return the rational number @throws ArithmeticException if...
java
public static BigRational valueOf(int numerator, int denominator) { return of(BigDecimal.valueOf(numerator), BigDecimal.valueOf(denominator)); }
[ "public", "static", "BigRational", "valueOf", "(", "int", "numerator", ",", "int", "denominator", ")", "{", "return", "of", "(", "BigDecimal", ".", "valueOf", "(", "numerator", ")", ",", "BigDecimal", ".", "valueOf", "(", "denominator", ")", ")", ";", "}" ...
Creates a rational number of the specified numerator/denominator int values. @param numerator the numerator int value @param denominator the denominator int value (0 not allowed) @return the rational number @throws ArithmeticException if the denominator is 0 (division by zero)
[ "Creates", "a", "rational", "number", "of", "the", "specified", "numerator", "/", "denominator", "int", "values", "." ]
train
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigRational.java#L825-L827
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/LockFile.java
LockFile.writeMagic
private final void writeMagic() throws LockFile.FileSecurityException, LockFile.UnexpectedEndOfFileException, LockFile.UnexpectedFileIOException { """ Writes the {@link #MAGIC} value to this object's lock file that distiguishes it as an HSQLDB lock file. <p> @throws FileSecurityExcept...
java
private final void writeMagic() throws LockFile.FileSecurityException, LockFile.UnexpectedEndOfFileException, LockFile.UnexpectedFileIOException { try { raf.seek(0); raf.write(MAGIC); } catch (SecurityException ex) { throw new FileSecurityEx...
[ "private", "final", "void", "writeMagic", "(", ")", "throws", "LockFile", ".", "FileSecurityException", ",", "LockFile", ".", "UnexpectedEndOfFileException", ",", "LockFile", ".", "UnexpectedFileIOException", "{", "try", "{", "raf", ".", "seek", "(", "0", ")", "...
Writes the {@link #MAGIC} value to this object's lock file that distiguishes it as an HSQLDB lock file. <p> @throws FileSecurityException possibly never (seek and write are native methods whose JavaDoc entries do not actually specify throwing <tt>SecurityException</tt>). However, it is conceivable that these native m...
[ "Writes", "the", "{", "@link", "#MAGIC", "}", "value", "to", "this", "object", "s", "lock", "file", "that", "distiguishes", "it", "as", "an", "HSQLDB", "lock", "file", ".", "<p", ">" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/LockFile.java#L1221-L1236
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java
ClassLocator.hasInterface
public static boolean hasInterface(Class intf, Class cls) { """ Checks whether the given class implements the given interface. @param intf the interface to look for in the given class @param cls the class to check for the interface @return TRUE if the class contains the interface """ ...
java
public static boolean hasInterface(Class intf, Class cls) { boolean result; String key; key = intf.getName() + "-" + cls.getName(); if (m_CheckInterface.containsKey(key)) return m_CheckInterface.get(key); result = intf.isAssignableFrom(cls); m_CheckInterface.put(key, result); return...
[ "public", "static", "boolean", "hasInterface", "(", "Class", "intf", ",", "Class", "cls", ")", "{", "boolean", "result", ";", "String", "key", ";", "key", "=", "intf", ".", "getName", "(", ")", "+", "\"-\"", "+", "cls", ".", "getName", "(", ")", ";",...
Checks whether the given class implements the given interface. @param intf the interface to look for in the given class @param cls the class to check for the interface @return TRUE if the class contains the interface
[ "Checks", "whether", "the", "given", "class", "implements", "the", "given", "interface", "." ]
train
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java#L667-L679
google/Accessibility-Test-Framework-for-Android
src/main/java/com/googlecode/eyesfree/utils/ScreenshotUtils.java
ScreenshotUtils.cropBitmap
public static Bitmap cropBitmap(Bitmap sourceBitmap, int left, int top, int width, int height) { """ Creates a new {@link Bitmap} object with a rectangular region of pixels from the source bitmap. <p> The source bitmap is unaffected by this operation. @param sourceBitmap The source bitmap to crop. @param le...
java
public static Bitmap cropBitmap(Bitmap sourceBitmap, int left, int top, int width, int height) { if (sourceBitmap == null) { return null; } try { return Bitmap.createBitmap(sourceBitmap, left, top, width, height); } catch (IllegalArgumentException ex) { ...
[ "public", "static", "Bitmap", "cropBitmap", "(", "Bitmap", "sourceBitmap", ",", "int", "left", ",", "int", "top", ",", "int", "width", ",", "int", "height", ")", "{", "if", "(", "sourceBitmap", "==", "null", ")", "{", "return", "null", ";", "}", "try",...
Creates a new {@link Bitmap} object with a rectangular region of pixels from the source bitmap. <p> The source bitmap is unaffected by this operation. @param sourceBitmap The source bitmap to crop. @param left The leftmost coordinate to include in the cropped image @param top The toptmost coordinate to include in the ...
[ "Creates", "a", "new", "{", "@link", "Bitmap", "}", "object", "with", "a", "rectangular", "region", "of", "pixels", "from", "the", "source", "bitmap", ".", "<p", ">", "The", "source", "bitmap", "is", "unaffected", "by", "this", "operation", "." ]
train
https://github.com/google/Accessibility-Test-Framework-for-Android/blob/a6117fe0059c82dd764fa628d3817d724570f69e/src/main/java/com/googlecode/eyesfree/utils/ScreenshotUtils.java#L152-L164
HeidelTime/heideltime
src/jflexcrf/Feature.java
Feature.sFeature1Init
public void sFeature1Init(int y, int yp, Map fmap) { """ S feature1 init. @param y the y @param yp the yp @param fmap the fmap """ sFeature1Init(y, cp); strId2IdxAdd(fmap); }
java
public void sFeature1Init(int y, int yp, Map fmap) { sFeature1Init(y, cp); strId2IdxAdd(fmap); }
[ "public", "void", "sFeature1Init", "(", "int", "y", ",", "int", "yp", ",", "Map", "fmap", ")", "{", "sFeature1Init", "(", "y", ",", "cp", ")", ";", "strId2IdxAdd", "(", "fmap", ")", ";", "}" ]
S feature1 init. @param y the y @param yp the yp @param fmap the fmap
[ "S", "feature1", "init", "." ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/jflexcrf/Feature.java#L125-L128
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java
ProcessEngineDriver.startProcess
public Long startProcess(Long processId, String masterRequestId, String ownerType, Long ownerId, Map<String,String> vars, Map<String,String> headers) throws Exception { """ Start a process. @param processId @param masterRequestId @param ownerType @param ownerId @param vars Input parameter bindings...
java
public Long startProcess(Long processId, String masterRequestId, String ownerType, Long ownerId, Map<String,String> vars, Map<String,String> headers) throws Exception { return startProcess(processId, masterRequestId, ownerType, ownerId, vars, null, null, headers); }
[ "public", "Long", "startProcess", "(", "Long", "processId", ",", "String", "masterRequestId", ",", "String", "ownerType", ",", "Long", "ownerId", ",", "Map", "<", "String", ",", "String", ">", "vars", ",", "Map", "<", "String", ",", "String", ">", "headers...
Start a process. @param processId @param masterRequestId @param ownerType @param ownerId @param vars Input parameter bindings for the process instance to be created @param headers @return the process instance ID
[ "Start", "a", "process", "." ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/process/ProcessEngineDriver.java#L921-L924
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/InjectionRecommender2.java
InjectionRecommender2.recommendFrom
protected void recommendFrom(String label, Set<BindingElement> source, Set<Binding> current) { """ Provide the recommendations. @param label the source of the recommendation. @param source the source of recommendation. @param current the current bindings. """ this.bindingFactory.setName(getName()); bo...
java
protected void recommendFrom(String label, Set<BindingElement> source, Set<Binding> current) { this.bindingFactory.setName(getName()); boolean hasRecommend = false; for (final BindingElement sourceElement : source) { final Binding wrapElement = this.bindingFactory.toBinding(sourceElement); if (!current.cont...
[ "protected", "void", "recommendFrom", "(", "String", "label", ",", "Set", "<", "BindingElement", ">", "source", ",", "Set", "<", "Binding", ">", "current", ")", "{", "this", ".", "bindingFactory", ".", "setName", "(", "getName", "(", ")", ")", ";", "bool...
Provide the recommendations. @param label the source of the recommendation. @param source the source of recommendation. @param current the current bindings.
[ "Provide", "the", "recommendations", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/binding/InjectionRecommender2.java#L220-L242
Stratio/bdt
src/main/java/com/stratio/qa/specs/FileSpec.java
FileSpec.readFileToVariableNoDataTable
@When("^I read file '(.+?)' as '(.+?)' and save it in environment variable '(.+?)'$") public void readFileToVariableNoDataTable(String baseData, String type, String envVar) throws Exception { """ Read the file passed as parameter and save the result in the environment variable passed as parameter. @param b...
java
@When("^I read file '(.+?)' as '(.+?)' and save it in environment variable '(.+?)'$") public void readFileToVariableNoDataTable(String baseData, String type, String envVar) throws Exception { // Retrieve data String retrievedData = commonspec.retrieveData(baseData, type); // Save in environ...
[ "@", "When", "(", "\"^I read file '(.+?)' as '(.+?)' and save it in environment variable '(.+?)'$\"", ")", "public", "void", "readFileToVariableNoDataTable", "(", "String", "baseData", ",", "String", "type", ",", "String", "envVar", ")", "throws", "Exception", "{", "// Retr...
Read the file passed as parameter and save the result in the environment variable passed as parameter. @param baseData file to read @param type whether the info in the file is a 'json' or a simple 'string' @param envVar name of the variable where to store the result
[ "Read", "the", "file", "passed", "as", "parameter", "and", "save", "the", "result", "in", "the", "environment", "variable", "passed", "as", "parameter", "." ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/FileSpec.java#L192-L199
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java
MeshGenerator.generateCone
public static VertexData generateCone(float radius, float height) { """ Generates a conical solid mesh. The center is at the middle of the cone. @param radius The radius of the base @param height The height (distance from the base to the apex) @return The vertex data """ final VertexData destinati...
java
public static VertexData generateCone(float radius, float height) { final VertexData destination = new VertexData(); final VertexAttribute positionsAttribute = new VertexAttribute("positions", DataType.FLOAT, 3); destination.addAttribute(0, positionsAttribute); final TFloatList positions...
[ "public", "static", "VertexData", "generateCone", "(", "float", "radius", ",", "float", "height", ")", "{", "final", "VertexData", "destination", "=", "new", "VertexData", "(", ")", ";", "final", "VertexAttribute", "positionsAttribute", "=", "new", "VertexAttribut...
Generates a conical solid mesh. The center is at the middle of the cone. @param radius The radius of the base @param height The height (distance from the base to the apex) @return The vertex data
[ "Generates", "a", "conical", "solid", "mesh", ".", "The", "center", "is", "at", "the", "middle", "of", "the", "cone", "." ]
train
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java#L999-L1014
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDataTable.java
WDataTable.setSort
protected void setSort(final int index, final boolean ascending) { """ For rendering purposes only - has no effect on model. @param index the sort column index, or -1 for no sort. @param ascending true for ascending order, false for descending """ TableModel model = getOrCreateComponentModel(); model.s...
java
protected void setSort(final int index, final boolean ascending) { TableModel model = getOrCreateComponentModel(); model.sortColIndex = index; model.sortAscending = ascending; }
[ "protected", "void", "setSort", "(", "final", "int", "index", ",", "final", "boolean", "ascending", ")", "{", "TableModel", "model", "=", "getOrCreateComponentModel", "(", ")", ";", "model", ".", "sortColIndex", "=", "index", ";", "model", ".", "sortAscending"...
For rendering purposes only - has no effect on model. @param index the sort column index, or -1 for no sort. @param ascending true for ascending order, false for descending
[ "For", "rendering", "purposes", "only", "-", "has", "no", "effect", "on", "model", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDataTable.java#L861-L865
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/io/MPIO.java
MPIO.isCompatibleME
public boolean isCompatibleME(SIBUuid8 meUuid, ProtocolVersion version) { """ Test whether or not a particular ME is of a version compatible with this one. @param me The ME to test. @return True if ME is of a compatible version """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) ...
java
public boolean isCompatibleME(SIBUuid8 meUuid, ProtocolVersion version) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "isCompatibleME", new Object[] {meUuid}); boolean result = false; MPConnection conn = findMPConnection(meUuid); if (conn!=null) ...
[ "public", "boolean", "isCompatibleME", "(", "SIBUuid8", "meUuid", ",", "ProtocolVersion", "version", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "t...
Test whether or not a particular ME is of a version compatible with this one. @param me The ME to test. @return True if ME is of a compatible version
[ "Test", "whether", "or", "not", "a", "particular", "ME", "is", "of", "a", "version", "compatible", "with", "this", "one", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/io/MPIO.java#L628-L647
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java
DiskClient.insertDisk
@BetaApi public final Operation insertDisk(ProjectZoneName zone, Disk diskResource) { """ Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also cr...
java
@BetaApi public final Operation insertDisk(ProjectZoneName zone, Disk diskResource) { InsertDiskHttpRequest request = InsertDiskHttpRequest.newBuilder() .setZone(zone == null ? null : zone.toString()) .setDiskResource(diskResource) .build(); return insertDisk(reque...
[ "@", "BetaApi", "public", "final", "Operation", "insertDisk", "(", "ProjectZoneName", "zone", ",", "Disk", "diskResource", ")", "{", "InsertDiskHttpRequest", "request", "=", "InsertDiskHttpRequest", ".", "newBuilder", "(", ")", ".", "setZone", "(", "zone", "==", ...
Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. <p>Sample code...
[ "Creates", "a", "persistent", "disk", "in", "the", "specified", "project", "using", "the", "data", "in", "the", "request", ".", "You", "can", "create", "a", "disk", "with", "a", "sourceImage", "a", "sourceSnapshot", "or", "create", "an", "empty", "500", "G...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/DiskClient.java#L741-L750
twitter/hraven
hraven-etl/src/main/java/com/twitter/hraven/etl/JobHistoryFileParserHadoop2.java
JobHistoryFileParserHadoop2.getAMKey
public byte[] getAMKey(String prefix, String fullId) { """ Returns the AM Attempt id stripped of the leading job ID, appended to the job row key. """ String taskComponent = prefix + fullId; return taskKeyConv.toBytes(new TaskKey(this.jobKey, taskComponent)); }
java
public byte[] getAMKey(String prefix, String fullId) { String taskComponent = prefix + fullId; return taskKeyConv.toBytes(new TaskKey(this.jobKey, taskComponent)); }
[ "public", "byte", "[", "]", "getAMKey", "(", "String", "prefix", ",", "String", "fullId", ")", "{", "String", "taskComponent", "=", "prefix", "+", "fullId", ";", "return", "taskKeyConv", ".", "toBytes", "(", "new", "TaskKey", "(", "this", ".", "jobKey", ...
Returns the AM Attempt id stripped of the leading job ID, appended to the job row key.
[ "Returns", "the", "AM", "Attempt", "id", "stripped", "of", "the", "leading", "job", "ID", "appended", "to", "the", "job", "row", "key", "." ]
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-etl/src/main/java/com/twitter/hraven/etl/JobHistoryFileParserHadoop2.java#L809-L813
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/validation/DOValidatorXMLSchema.java
DOValidatorXMLSchema.resolveEntity
public InputSource resolveEntity(String publicId, String systemId) { """ Resolve the entity if it's referring to a local schema. Otherwise, return an empty InputSource. This behavior is required in order to ensure that Xerces never attempts to load external schemas specified with xsi:schemaLocation. It is not e...
java
public InputSource resolveEntity(String publicId, String systemId) { if (systemId != null && systemId.startsWith("file:")) { return null; } else { return new InputSource(); } }
[ "public", "InputSource", "resolveEntity", "(", "String", "publicId", ",", "String", "systemId", ")", "{", "if", "(", "systemId", "!=", "null", "&&", "systemId", ".", "startsWith", "(", "\"file:\"", ")", ")", "{", "return", "null", ";", "}", "else", "{", ...
Resolve the entity if it's referring to a local schema. Otherwise, return an empty InputSource. This behavior is required in order to ensure that Xerces never attempts to load external schemas specified with xsi:schemaLocation. It is not enough that we specify processContents="skip" in our own schema.
[ "Resolve", "the", "entity", "if", "it", "s", "referring", "to", "a", "local", "schema", ".", "Otherwise", "return", "an", "empty", "InputSource", ".", "This", "behavior", "is", "required", "in", "order", "to", "ensure", "that", "Xerces", "never", "attempts",...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/validation/DOValidatorXMLSchema.java#L117-L123
bwkimmel/java-util
src/main/java/ca/eandb/util/sql/DbUtil.java
DbUtil.queryString
public static String queryString(PreparedStatement stmt, String def) throws SQLException { """ Runs a SQL query that returns a single <code>String</code> value. @param stmt The <code>PreparedStatement</code> to run. @param def The default value to return if the query returns no results. @return The value return...
java
public static String queryString(PreparedStatement stmt, String def) throws SQLException { ResultSet rs = null; try { rs = stmt.executeQuery(); return rs.next() ? rs.getString(1) : def; } finally { close(rs); } }
[ "public", "static", "String", "queryString", "(", "PreparedStatement", "stmt", ",", "String", "def", ")", "throws", "SQLException", "{", "ResultSet", "rs", "=", "null", ";", "try", "{", "rs", "=", "stmt", ".", "executeQuery", "(", ")", ";", "return", "rs",...
Runs a SQL query that returns a single <code>String</code> value. @param stmt The <code>PreparedStatement</code> to run. @param def The default value to return if the query returns no results. @return The value returned by the query, or <code>def</code> if the query returns no results. It is assumed that the query ret...
[ "Runs", "a", "SQL", "query", "that", "returns", "a", "single", "<code", ">", "String<", "/", "code", ">", "value", "." ]
train
https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/sql/DbUtil.java#L189-L197
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/transform/AbstractGeneratedSQLTransform.java
AbstractGeneratedSQLTransform.generateReadPropertyFromCursor
@Override public void generateReadPropertyFromCursor(Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName) { """ /* (non-Javadoc) @see com.abubusoft.kripton.processor.sqlite.transform.SQLTransform#generateReadPropertyFromCursor(com.squareup.javap...
java
@Override public void generateReadPropertyFromCursor(Builder methodBuilder, TypeName beanClass, String beanName, ModelProperty property, String cursorName, String indexName) { methodBuilder.addCode(setter(beanClass, beanName, property, "$T.parse$L($L.getBlob($L))"), TypeUtility.mergeTypeNameWithSuffix(beanClass, "Ta...
[ "@", "Override", "public", "void", "generateReadPropertyFromCursor", "(", "Builder", "methodBuilder", ",", "TypeName", "beanClass", ",", "String", "beanName", ",", "ModelProperty", "property", ",", "String", "cursorName", ",", "String", "indexName", ")", "{", "metho...
/* (non-Javadoc) @see com.abubusoft.kripton.processor.sqlite.transform.SQLTransform#generateReadPropertyFromCursor(com.squareup.javapoet.MethodSpec.Builder, com.squareup.javapoet.TypeName, java.lang.String, com.abubusoft.kripton.processor.core.ModelProperty, java.lang.String, java.lang.String)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/transform/AbstractGeneratedSQLTransform.java#L79-L83
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java
DFSAdmin.upgradeProgress
public int upgradeProgress(String[] argv, int idx) throws IOException { """ Command to request current distributed upgrade status, a detailed status, or to force the upgrade to proceed. Usage: java DFSAdmin -upgradeProgress [status | details | force] @exception IOException """ DistributedFileSystem df...
java
public int upgradeProgress(String[] argv, int idx) throws IOException { DistributedFileSystem dfs = getDFS(); if (dfs == null) { System.out.println("FileSystem is " + getFS().getUri()); return -1; } if (idx != argv.length - 1) { printUsage("-upgradeProgress"); return -1; } ...
[ "public", "int", "upgradeProgress", "(", "String", "[", "]", "argv", ",", "int", "idx", ")", "throws", "IOException", "{", "DistributedFileSystem", "dfs", "=", "getDFS", "(", ")", ";", "if", "(", "dfs", "==", "null", ")", "{", "System", ".", "out", "."...
Command to request current distributed upgrade status, a detailed status, or to force the upgrade to proceed. Usage: java DFSAdmin -upgradeProgress [status | details | force] @exception IOException
[ "Command", "to", "request", "current", "distributed", "upgrade", "status", "a", "detailed", "status", "or", "to", "force", "the", "upgrade", "to", "proceed", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java#L709-L738
m-m-m/util
text/src/main/java/net/sf/mmm/util/text/base/DefaultLineWrapper.java
DefaultLineWrapper.verifyWithOfColumns
private boolean verifyWithOfColumns(ColumnState[] columnStates, TextTableInfo tableInfo) { """ This method verifies that the width of the columns are sane. @param columnStates are the {@link ColumnState}s. @param tableInfo is the {@link TextTableInfo}. @return {@code true} if the width is sane, {@code false} ...
java
private boolean verifyWithOfColumns(ColumnState[] columnStates, TextTableInfo tableInfo) { int tableWidth = tableInfo.getWidth(); if (tableWidth != TextColumnInfo.WIDTH_AUTO_ADJUST) { int calculatedWidth = 0; for (ColumnState columnState : columnStates) { if (columnState.width < 0) { ...
[ "private", "boolean", "verifyWithOfColumns", "(", "ColumnState", "[", "]", "columnStates", ",", "TextTableInfo", "tableInfo", ")", "{", "int", "tableWidth", "=", "tableInfo", ".", "getWidth", "(", ")", ";", "if", "(", "tableWidth", "!=", "TextColumnInfo", ".", ...
This method verifies that the width of the columns are sane. @param columnStates are the {@link ColumnState}s. @param tableInfo is the {@link TextTableInfo}. @return {@code true} if the width is sane, {@code false} otherwise.
[ "This", "method", "verifies", "that", "the", "width", "of", "the", "columns", "are", "sane", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/text/src/main/java/net/sf/mmm/util/text/base/DefaultLineWrapper.java#L258-L276
adohe/etcd4j
src/main/java/com/xqbase/etcd4j/EtcdClient.java
EtcdClient.cas
public EtcdResult cas(String key, String value, Map<String, String> params) throws EtcdClientException { """ Atomic Compare-and-Swap @param key the key @param value the new value @param params comparable conditions @return operation result @throws EtcdClientException """ List<BasicNameValuePair> d...
java
public EtcdResult cas(String key, String value, Map<String, String> params) throws EtcdClientException { List<BasicNameValuePair> data = Lists.newArrayList(); data.add(new BasicNameValuePair("value", value)); return put(key, data, params, new int[] {200, 412}, 101, 105); }
[ "public", "EtcdResult", "cas", "(", "String", "key", ",", "String", "value", ",", "Map", "<", "String", ",", "String", ">", "params", ")", "throws", "EtcdClientException", "{", "List", "<", "BasicNameValuePair", ">", "data", "=", "Lists", ".", "newArrayList"...
Atomic Compare-and-Swap @param key the key @param value the new value @param params comparable conditions @return operation result @throws EtcdClientException
[ "Atomic", "Compare", "-", "and", "-", "Swap" ]
train
https://github.com/adohe/etcd4j/blob/8d30ae9aa5da32d8e78287d61e69861c63538629/src/main/java/com/xqbase/etcd4j/EtcdClient.java#L267-L272
urbanairship/datacube
src/main/java/com/urbanairship/datacube/dbharnesses/HBaseDbHarness.java
HBaseDbHarness.runBatchAsync
@Override public Future<?> runBatchAsync(Batch<T> batch, AfterExecute<T> afterExecute) throws FullQueueException { """ Hands off the given batch to the flush executor to be sent to the database soon. Doesn't throw IOException, since batches are just asynchronously submitted for execution, but will throw Asyn...
java
@Override public Future<?> runBatchAsync(Batch<T> batch, AfterExecute<T> afterExecute) throws FullQueueException { /* * Since ThreadPoolExecutor throws RejectedExecutionException when its queue is full, * we have to backoff and retry if execute() throws RejectedExecutionHandler. ...
[ "@", "Override", "public", "Future", "<", "?", ">", "runBatchAsync", "(", "Batch", "<", "T", ">", "batch", ",", "AfterExecute", "<", "T", ">", "afterExecute", ")", "throws", "FullQueueException", "{", "/* \n * Since ThreadPoolExecutor throws RejectedExecutionE...
Hands off the given batch to the flush executor to be sent to the database soon. Doesn't throw IOException, since batches are just asynchronously submitted for execution, but will throw AsyncException if some previous batch had a RuntimeException. @return a Future that the caller can use to detect when the database IO...
[ "Hands", "off", "the", "given", "batch", "to", "the", "flush", "executor", "to", "be", "sent", "to", "the", "database", "soon", ".", "Doesn", "t", "throw", "IOException", "since", "batches", "are", "just", "asynchronously", "submitted", "for", "execution", "...
train
https://github.com/urbanairship/datacube/blob/89c6b68744cc384c8b49f921cdb0a0f9f414ada6/src/main/java/com/urbanairship/datacube/dbharnesses/HBaseDbHarness.java#L224-L243
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java
JCudnn.cudnnGetConvolutionForwardWorkspaceSize
public static int cudnnGetConvolutionForwardWorkspaceSize( cudnnHandle handle, cudnnTensorDescriptor xDesc, cudnnFilterDescriptor wDesc, cudnnConvolutionDescriptor convDesc, cudnnTensorDescriptor yDesc, int algo, long[] sizeInBytes) { """ Helper functio...
java
public static int cudnnGetConvolutionForwardWorkspaceSize( cudnnHandle handle, cudnnTensorDescriptor xDesc, cudnnFilterDescriptor wDesc, cudnnConvolutionDescriptor convDesc, cudnnTensorDescriptor yDesc, int algo, long[] sizeInBytes) { return chec...
[ "public", "static", "int", "cudnnGetConvolutionForwardWorkspaceSize", "(", "cudnnHandle", "handle", ",", "cudnnTensorDescriptor", "xDesc", ",", "cudnnFilterDescriptor", "wDesc", ",", "cudnnConvolutionDescriptor", "convDesc", ",", "cudnnTensorDescriptor", "yDesc", ",", "int", ...
Helper function to return the minimum size of the workspace to be passed to the convolution given an algo
[ "Helper", "function", "to", "return", "the", "minimum", "size", "of", "the", "workspace", "to", "be", "passed", "to", "the", "convolution", "given", "an", "algo" ]
train
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java#L1133-L1143
podio/podio-java
src/main/java/com/podio/item/ItemAPI.java
ItemAPI.getItemsByExternalId
public ItemsResponse getItemsByExternalId(int appId, String externalId) { """ Utility method to get items matching an external id @param appId The id of the app @param externalId The external id @return The items matching the app and external id """ return getItems(appId, null, null, null, null, n...
java
public ItemsResponse getItemsByExternalId(int appId, String externalId) { return getItems(appId, null, null, null, null, new FilterByValue<String>(new ExternalIdFilterBy(), externalId)); }
[ "public", "ItemsResponse", "getItemsByExternalId", "(", "int", "appId", ",", "String", "externalId", ")", "{", "return", "getItems", "(", "appId", ",", "null", ",", "null", ",", "null", ",", "null", ",", "new", "FilterByValue", "<", "String", ">", "(", "ne...
Utility method to get items matching an external id @param appId The id of the app @param externalId The external id @return The items matching the app and external id
[ "Utility", "method", "to", "get", "items", "matching", "an", "external", "id" ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/item/ItemAPI.java#L327-L330
alkacon/opencms-core
src/org/opencms/xml/containerpage/CmsDynamicFunctionParser.java
CmsDynamicFunctionParser.parseAdditionalFormat
protected Format parseAdditionalFormat( CmsObject cms, I_CmsXmlContentValueLocation location, CmsResource functionRes) { """ Parses an additional format from the XML content.<p> @param cms the current CMS context @param location the location from which to parse the additional forma...
java
protected Format parseAdditionalFormat( CmsObject cms, I_CmsXmlContentValueLocation location, CmsResource functionRes) { I_CmsXmlContentValueLocation jspLoc = location.getSubValue("FunctionProvider"); CmsUUID structureId = jspLoc.asId(cms); I_CmsXmlContentValueLoc...
[ "protected", "Format", "parseAdditionalFormat", "(", "CmsObject", "cms", ",", "I_CmsXmlContentValueLocation", "location", ",", "CmsResource", "functionRes", ")", "{", "I_CmsXmlContentValueLocation", "jspLoc", "=", "location", ".", "getSubValue", "(", "\"FunctionProvider\"",...
Parses an additional format from the XML content.<p> @param cms the current CMS context @param location the location from which to parse the additional format @param functionRes the dynamic function resource @return the additional format
[ "Parses", "an", "additional", "format", "from", "the", "XML", "content", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsDynamicFunctionParser.java#L245-L260
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/ArrayUtils.java
ArrayUtils.contains
public static <T> boolean contains(T[] a, T o) { """ Returns true iff object o equals (not ==) some element of array a. """ for (T item : a) { if (item.equals(o)) return true; } return false; }
java
public static <T> boolean contains(T[] a, T o) { for (T item : a) { if (item.equals(o)) return true; } return false; }
[ "public", "static", "<", "T", ">", "boolean", "contains", "(", "T", "[", "]", "a", ",", "T", "o", ")", "{", "for", "(", "T", "item", ":", "a", ")", "{", "if", "(", "item", ".", "equals", "(", "o", ")", ")", "return", "true", ";", "}", "retu...
Returns true iff object o equals (not ==) some element of array a.
[ "Returns", "true", "iff", "object", "o", "equals", "(", "not", "==", ")", "some", "element", "of", "array", "a", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/ArrayUtils.java#L558-L563
Samsung/GearVRf
GVRf/Framework/backend_monoscopic/src/main/java/org/gearvrf/MonoscopicInternalSensorListener.java
MonoscopicInternalSensorListener.getQuaternionW
private float getQuaternionW(float x, float y, float z) { """ Finds the missing value. Seems to lose a degree of freedom, but it doesn't. That degree of freedom is already lost by the sensor. """ return (float) Math.cos(Math.asin(Math.sqrt(x * x + y * y + z * z))); }
java
private float getQuaternionW(float x, float y, float z) { return (float) Math.cos(Math.asin(Math.sqrt(x * x + y * y + z * z))); }
[ "private", "float", "getQuaternionW", "(", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "return", "(", "float", ")", "Math", ".", "cos", "(", "Math", ".", "asin", "(", "Math", ".", "sqrt", "(", "x", "*", "x", "+", "y", "*", "y"...
Finds the missing value. Seems to lose a degree of freedom, but it doesn't. That degree of freedom is already lost by the sensor.
[ "Finds", "the", "missing", "value", ".", "Seems", "to", "lose", "a", "degree", "of", "freedom", "but", "it", "doesn", "t", ".", "That", "degree", "of", "freedom", "is", "already", "lost", "by", "the", "sensor", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/backend_monoscopic/src/main/java/org/gearvrf/MonoscopicInternalSensorListener.java#L69-L71
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/vat/VATManager.java
VATManager.findVATItem
@Nullable public IVATItem findVATItem (@Nullable final EVATItemType eType, @Nullable final BigDecimal aPercentage) { """ Find a matching VAT item with the passed properties, independent of the country. @param eType The VAT type to use. May be <code>null</code> resulting in a <code>null</code> result. @par...
java
@Nullable public IVATItem findVATItem (@Nullable final EVATItemType eType, @Nullable final BigDecimal aPercentage) { if (eType == null || aPercentage == null) return null; return findFirst (x -> x.getType ().equals (eType) && x.hasPercentage (aPercentage)); }
[ "@", "Nullable", "public", "IVATItem", "findVATItem", "(", "@", "Nullable", "final", "EVATItemType", "eType", ",", "@", "Nullable", "final", "BigDecimal", "aPercentage", ")", "{", "if", "(", "eType", "==", "null", "||", "aPercentage", "==", "null", ")", "ret...
Find a matching VAT item with the passed properties, independent of the country. @param eType The VAT type to use. May be <code>null</code> resulting in a <code>null</code> result. @param aPercentage The percentage to find. May be <code>null</code> resulting in a <code>null</code> result. @return <code>null</code> if ...
[ "Find", "a", "matching", "VAT", "item", "with", "the", "passed", "properties", "independent", "of", "the", "country", "." ]
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/vat/VATManager.java#L352-L358
jenkinsci/support-core-plugin
src/main/java/com/cloudbees/jenkins/support/impl/JenkinsLogs.java
JenkinsLogs.addMasterJulLogRecords
private void addMasterJulLogRecords(Container result) { """ Adds j.u.l logging output that the support-core plugin captures. <p> Compared to {@link #addMasterJulRingBuffer(Container)}, this one uses disk files, so it remembers larger number of entries. """ // this file captures the most recent of ...
java
private void addMasterJulLogRecords(Container result) { // this file captures the most recent of those that are still kept around in memory. // this overlaps with Jenkins.logRecords, and also overlaps with what's written in files, // but added nonetheless just in case. // // shou...
[ "private", "void", "addMasterJulLogRecords", "(", "Container", "result", ")", "{", "// this file captures the most recent of those that are still kept around in memory.", "// this overlaps with Jenkins.logRecords, and also overlaps with what's written in files,", "// but added nonetheless just i...
Adds j.u.l logging output that the support-core plugin captures. <p> Compared to {@link #addMasterJulRingBuffer(Container)}, this one uses disk files, so it remembers larger number of entries.
[ "Adds", "j", ".", "u", ".", "l", "logging", "output", "that", "the", "support", "-", "core", "plugin", "captures", "." ]
train
https://github.com/jenkinsci/support-core-plugin/blob/bcbe1dfd5bf48ac89903645cd48ed897c1a04688/src/main/java/com/cloudbees/jenkins/support/impl/JenkinsLogs.java#L172-L195
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator.generateAnonymousClassDefinition
protected void generateAnonymousClassDefinition(AnonymousClass anonClass, IAppendable it, IExtraLanguageGeneratorContext context) { """ Generate the anonymous class definition. @param anonClass the anonymous class. @param it the target for the generated content. @param context the context. """ if (!it.h...
java
protected void generateAnonymousClassDefinition(AnonymousClass anonClass, IAppendable it, IExtraLanguageGeneratorContext context) { if (!it.hasName(anonClass) && it instanceof PyAppendable) { final LightweightTypeReference jvmAnonType = getExpectedType(anonClass); final String anonName = it.declareSyntheticVari...
[ "protected", "void", "generateAnonymousClassDefinition", "(", "AnonymousClass", "anonClass", ",", "IAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "if", "(", "!", "it", ".", "hasName", "(", "anonClass", ")", "&&", "it", "instanceof", ...
Generate the anonymous class definition. @param anonClass the anonymous class. @param it the target for the generated content. @param context the context.
[ "Generate", "the", "anonymous", "class", "definition", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L211-L247
overturetool/overture
core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java
SyntaxReader.checkFor
protected void checkFor(VDMToken tok, int number, String message) throws LexException, ParserException { """ If the last token is as expected, advance, else raise an error. @param tok The token type to check for. @param number The error number. @param message The error message to raise if the token is n...
java
protected void checkFor(VDMToken tok, int number, String message) throws LexException, ParserException { if (lastToken().is(tok)) { nextToken(); } else { throwMessage(number, message); } }
[ "protected", "void", "checkFor", "(", "VDMToken", "tok", ",", "int", "number", ",", "String", "message", ")", "throws", "LexException", ",", "ParserException", "{", "if", "(", "lastToken", "(", ")", ".", "is", "(", "tok", ")", ")", "{", "nextToken", "(",...
If the last token is as expected, advance, else raise an error. @param tok The token type to check for. @param number The error number. @param message The error message to raise if the token is not as expected. @throws LexException @throws ParserException
[ "If", "the", "last", "token", "is", "as", "expected", "advance", "else", "raise", "an", "error", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java#L445-L455
facebookarchive/hadoop-20
src/core/org/apache/hadoop/io/ReadaheadPool.java
ReadaheadPool.readaheadStream
public ReadaheadRequest readaheadStream( String identifier, FileDescriptor fd, long curPos, long readaheadLength, long maxOffsetToRead, ReadaheadRequest lastReadahead) { """ Issue a request to readahead on the given file descriptor. @param identifier a textual identifier that...
java
public ReadaheadRequest readaheadStream( String identifier, FileDescriptor fd, long curPos, long readaheadLength, long maxOffsetToRead, ReadaheadRequest lastReadahead) { Preconditions.checkArgument(curPos <= maxOffsetToRead, "Readahead position %s higher than maxOffs...
[ "public", "ReadaheadRequest", "readaheadStream", "(", "String", "identifier", ",", "FileDescriptor", "fd", ",", "long", "curPos", ",", "long", "readaheadLength", ",", "long", "maxOffsetToRead", ",", "ReadaheadRequest", "lastReadahead", ")", "{", "Preconditions", ".", ...
Issue a request to readahead on the given file descriptor. @param identifier a textual identifier that will be used in error messages (e.g. the file name) @param fd the file descriptor to read ahead @param curPos the current offset at which reads are being issued @param readaheadLength the configured length to read ah...
[ "Issue", "a", "request", "to", "readahead", "on", "the", "given", "file", "descriptor", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/ReadaheadPool.java#L85-L132
getlantern/kaleidoscope
src/main/java/org/kaleidoscope/TrustGraphNode.java
TrustGraphNode.forwardAdvertisement
protected boolean forwardAdvertisement(TrustGraphAdvertisement message) { """ This method performs the forwarding behavior for a received message. The message is forwarded to the next hop on the route according to the routing table, with ttl decreased by 1. The message is dropped if it has an invalid hop cou...
java
protected boolean forwardAdvertisement(TrustGraphAdvertisement message) { // don't forward if the forwarding policy rejects if (!shouldForward(message)) { return false; } // determine the next hop to send to TrustGraphNodeId nextHop = getRoutingTable().getNe...
[ "protected", "boolean", "forwardAdvertisement", "(", "TrustGraphAdvertisement", "message", ")", "{", "// don't forward if the forwarding policy rejects", "if", "(", "!", "shouldForward", "(", "message", ")", ")", "{", "return", "false", ";", "}", "// determine the next ho...
This method performs the forwarding behavior for a received message. The message is forwarded to the next hop on the route according to the routing table, with ttl decreased by 1. The message is dropped if it has an invalid hop count or the sender of the message is not a known peer (ie is not paired to another outbou...
[ "This", "method", "performs", "the", "forwarding", "behavior", "for", "a", "received", "message", ".", "The", "message", "is", "forwarded", "to", "the", "next", "hop", "on", "the", "route", "according", "to", "the", "routing", "table", "with", "ttl", "decrea...
train
https://github.com/getlantern/kaleidoscope/blob/7516f05724c8f54e5d535d23da9116817c08a09f/src/main/java/org/kaleidoscope/TrustGraphNode.java#L254-L273
yanzhenjie/AndPermission
support/src/main/java/com/yanzhenjie/permission/AndPermission.java
AndPermission.getFileUri
public static Uri getFileUri(Context context, File file) { """ Get compatible Android 7.0 and lower versions of Uri. @param context {@link Context}. @param file apk file. @return uri. """ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { return FileProvider.getUriForFile(context,...
java
public static Uri getFileUri(Context context, File file) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { return FileProvider.getUriForFile(context, context.getPackageName() + ".file.path.share", file); } return Uri.fromFile(file); }
[ "public", "static", "Uri", "getFileUri", "(", "Context", "context", ",", "File", "file", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_INT", ">=", "Build", ".", "VERSION_CODES", ".", "N", ")", "{", "return", "FileProvider", ".", "getUriForFile", ...
Get compatible Android 7.0 and lower versions of Uri. @param context {@link Context}. @param file apk file. @return uri.
[ "Get", "compatible", "Android", "7", ".", "0", "and", "lower", "versions", "of", "Uri", "." ]
train
https://github.com/yanzhenjie/AndPermission/blob/bbfaaecdb8ecf0f2aa270d80c0b88d022dddda7c/support/src/main/java/com/yanzhenjie/permission/AndPermission.java#L323-L328
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateCertificate
public CertificateBundle updateCertificate(String vaultBaseUrl, String certificateName, String certificateVersion) { """ Updates the specified attributes associated with the given certificate. The UpdateCertificate operation applies the specified update on the given certificate; the only elements updated are the ...
java
public CertificateBundle updateCertificate(String vaultBaseUrl, String certificateName, String certificateVersion) { return updateCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName, certificateVersion).toBlocking().single().body(); }
[ "public", "CertificateBundle", "updateCertificate", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "String", "certificateVersion", ")", "{", "return", "updateCertificateWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "certificateName", ",", "cert...
Updates the specified attributes associated with the given certificate. The UpdateCertificate operation applies the specified update on the given certificate; the only elements updated are the certificate's attributes. This operation requires the certificates/update permission. @param vaultBaseUrl The vault name, for ...
[ "Updates", "the", "specified", "attributes", "associated", "with", "the", "given", "certificate", ".", "The", "UpdateCertificate", "operation", "applies", "the", "specified", "update", "on", "the", "given", "certificate", ";", "the", "only", "elements", "updated", ...
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#L7337-L7339
geomajas/geomajas-project-client-gwt
plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/GeomajasServiceImpl.java
GeomajasServiceImpl.createMap
@Export public Map createMap(String applicationId, String mapId, String elementId) { """ Register the given {@link Map} with applicationId and mapId. @param applicationId the application id. @param mapId the map id. @param elementId the DOM element ID onto which to attach the map. """ Map map = getM...
java
@Export public Map createMap(String applicationId, String mapId, String elementId) { Map map = getMap(applicationId, mapId); if (map == null) { MapWidget mapWidget = new MapWidget(mapId, applicationId); map = new MapImpl(mapWidget); Element element = DOM.getElementById(elementId); if (element != null) ...
[ "@", "Export", "public", "Map", "createMap", "(", "String", "applicationId", ",", "String", "mapId", ",", "String", "elementId", ")", "{", "Map", "map", "=", "getMap", "(", "applicationId", ",", "mapId", ")", ";", "if", "(", "map", "==", "null", ")", "...
Register the given {@link Map} with applicationId and mapId. @param applicationId the application id. @param mapId the map id. @param elementId the DOM element ID onto which to attach the map.
[ "Register", "the", "given", "{", "@link", "Map", "}", "with", "applicationId", "and", "mapId", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/javascript-api/javascript-api-gwt/src/main/java/org/geomajas/plugin/jsapi/gwt/client/exporter/GeomajasServiceImpl.java#L91-L109
azkaban/azkaban
azkaban-common/src/main/java/azkaban/storage/StorageManager.java
StorageManager.getProjectFile
public ProjectFileHandler getProjectFile(final int projectId, final int version) { """ Fetch project file from storage. @param projectId required project ID @param version version to be fetched @return Handler object containing hooks to fetched project file """ log.info( String.format("Fetchin...
java
public ProjectFileHandler getProjectFile(final int projectId, final int version) { log.info( String.format("Fetching project file. project ID: %d version: %d", projectId, version)); // TODO spyne: remove huge hack ! There should not be any special handling for Database Storage. if (this.storage inst...
[ "public", "ProjectFileHandler", "getProjectFile", "(", "final", "int", "projectId", ",", "final", "int", "version", ")", "{", "log", ".", "info", "(", "String", ".", "format", "(", "\"Fetching project file. project ID: %d version: %d\"", ",", "projectId", ",", "vers...
Fetch project file from storage. @param projectId required project ID @param version version to be fetched @return Handler object containing hooks to fetched project file
[ "Fetch", "project", "file", "from", "storage", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/storage/StorageManager.java#L152-L185
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/epanet/core/EpanetWrapper.java
EpanetWrapper.ENsetlinkvalue
public void ENsetlinkvalue( int index, LinkParameters linkParameter, float value ) throws EpanetException { """ Sets the value of a parameter for a specific link. @param index node index. @param paramcode parameter code. @param value parameter value. @throws EpanetException """ int errcode = epan...
java
public void ENsetlinkvalue( int index, LinkParameters linkParameter, float value ) throws EpanetException { int errcode = epanet.ENsetnodevalue(index, linkParameter.getCode(), value); checkError(errcode); }
[ "public", "void", "ENsetlinkvalue", "(", "int", "index", ",", "LinkParameters", "linkParameter", ",", "float", "value", ")", "throws", "EpanetException", "{", "int", "errcode", "=", "epanet", ".", "ENsetnodevalue", "(", "index", ",", "linkParameter", ".", "getCo...
Sets the value of a parameter for a specific link. @param index node index. @param paramcode parameter code. @param value parameter value. @throws EpanetException
[ "Sets", "the", "value", "of", "a", "parameter", "for", "a", "specific", "link", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/epanet/core/EpanetWrapper.java#L622-L625
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/http/HttpUtil.java
HttpUtil.encodeParameters
public static String encodeParameters(RequestConfig config, Heroku.RequestKey... keys) { """ URL encode request paramaters from a {@link RequestConfig}. @param config Name/value pairs for a HTTP request. @param keys List of keys in the config to encode. @return A string representation of encoded name/value para...
java
public static String encodeParameters(RequestConfig config, Heroku.RequestKey... keys) { StringBuilder encodedParameters = new StringBuilder(); String separator = ""; for (Heroku.RequestKey key : keys) { if (config.get(key) != null) { encodedParameters.append(separat...
[ "public", "static", "String", "encodeParameters", "(", "RequestConfig", "config", ",", "Heroku", ".", "RequestKey", "...", "keys", ")", "{", "StringBuilder", "encodedParameters", "=", "new", "StringBuilder", "(", ")", ";", "String", "separator", "=", "\"\"", ";"...
URL encode request paramaters from a {@link RequestConfig}. @param config Name/value pairs for a HTTP request. @param keys List of keys in the config to encode. @return A string representation of encoded name/value parameters.
[ "URL", "encode", "request", "paramaters", "from", "a", "{" ]
train
https://github.com/heroku/heroku.jar/blob/d9e52991293159498c10c498c6f91fcdd637378e/heroku-api/src/main/java/com/heroku/api/http/HttpUtil.java#L38-L53
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/filter/binary/ThresholdNick.java
ThresholdNick.process
@Override public void process(GrayF32 input , GrayU8 output ) { """ Converts the input image into a binary image. @param input Input image. Not modified. @param output Output binary image. Modified. """ imageI2.reshape(input.width,input.height); meanImage.reshape(input.width,input.height); meanI2....
java
@Override public void process(GrayF32 input , GrayU8 output ) { imageI2.reshape(input.width,input.height); meanImage.reshape(input.width,input.height); meanI2.reshape(input.width,input.height); tmp.reshape(input.width,input.height); imageI2.reshape(input.width,input.height); int radius = width.computeI(Ma...
[ "@", "Override", "public", "void", "process", "(", "GrayF32", "input", ",", "GrayU8", "output", ")", "{", "imageI2", ".", "reshape", "(", "input", ".", "width", ",", "input", ".", "height", ")", ";", "meanImage", ".", "reshape", "(", "input", ".", "wid...
Converts the input image into a binary image. @param input Input image. Not modified. @param output Output binary image. Modified.
[ "Converts", "the", "input", "image", "into", "a", "binary", "image", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/binary/ThresholdNick.java#L82-L138
calimero-project/calimero-core
src/tuwien/auto/calimero/knxnetip/servicetype/TunnelingFeature.java
TunnelingFeature.newInfo
public static TunnelingFeature newInfo(final int channelId, final int seq, final InterfaceFeature featureId, final byte... featureValue) { """ Creates a new tunneling feature-info service. @param channelId tunneling connection channel identifier @param seq tunneling connection send sequence number @param fe...
java
public static TunnelingFeature newInfo(final int channelId, final int seq, final InterfaceFeature featureId, final byte... featureValue) { return new TunnelingFeature(KNXnetIPHeader.TunnelingFeatureInfo, channelId, seq, featureId, Success, featureValue); }
[ "public", "static", "TunnelingFeature", "newInfo", "(", "final", "int", "channelId", ",", "final", "int", "seq", ",", "final", "InterfaceFeature", "featureId", ",", "final", "byte", "...", "featureValue", ")", "{", "return", "new", "TunnelingFeature", "(", "KNXn...
Creates a new tunneling feature-info service. @param channelId tunneling connection channel identifier @param seq tunneling connection send sequence number @param featureId interface feature which should be announced @param featureValue feature value to announce @return new tunneling feature-info service
[ "Creates", "a", "new", "tunneling", "feature", "-", "info", "service", "." ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/knxnetip/servicetype/TunnelingFeature.java#L124-L127
jayantk/jklol
src/com/jayantkrish/jklol/cfg/CfgParseChart.java
CfgParseChart.getInsideEntries
public Factor getInsideEntries(int spanStart, int spanEnd) { """ Get the inside unnormalized probabilities over productions at a particular span in the tree. """ Tensor entries = new DenseTensor(parentVar.getVariableNumsArray(), parentVar.getVariableSizes(), insideChart[spanStart][spanEnd]); r...
java
public Factor getInsideEntries(int spanStart, int spanEnd) { Tensor entries = new DenseTensor(parentVar.getVariableNumsArray(), parentVar.getVariableSizes(), insideChart[spanStart][spanEnd]); return new TableFactor(parentVar, entries); }
[ "public", "Factor", "getInsideEntries", "(", "int", "spanStart", ",", "int", "spanEnd", ")", "{", "Tensor", "entries", "=", "new", "DenseTensor", "(", "parentVar", ".", "getVariableNumsArray", "(", ")", ",", "parentVar", ".", "getVariableSizes", "(", ")", ",",...
Get the inside unnormalized probabilities over productions at a particular span in the tree.
[ "Get", "the", "inside", "unnormalized", "probabilities", "over", "productions", "at", "a", "particular", "span", "in", "the", "tree", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/cfg/CfgParseChart.java#L253-L257
iipc/webarchive-commons
src/main/java/org/archive/io/ArchiveReader.java
ArchiveReader.logStdErr
public void logStdErr(Level level, String message) { """ Log on stderr. Logging should go via the logging system. This method bypasses the logging system going direct to stderr. Should not generally be used. Its used for rare messages that come of cmdline usage of ARCReader ERRORs and WARNINGs. Override if ...
java
public void logStdErr(Level level, String message) { System.err.println(level.toString() + " " + message); }
[ "public", "void", "logStdErr", "(", "Level", "level", ",", "String", "message", ")", "{", "System", ".", "err", ".", "println", "(", "level", ".", "toString", "(", ")", "+", "\" \"", "+", "message", ")", ";", "}" ]
Log on stderr. Logging should go via the logging system. This method bypasses the logging system going direct to stderr. Should not generally be used. Its used for rare messages that come of cmdline usage of ARCReader ERRORs and WARNINGs. Override if using ARCReader in a context where no stderr or where you'd like to...
[ "Log", "on", "stderr", ".", "Logging", "should", "go", "via", "the", "logging", "system", ".", "This", "method", "bypasses", "the", "logging", "system", "going", "direct", "to", "stderr", ".", "Should", "not", "generally", "be", "used", ".", "Its", "used",...
train
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/ArchiveReader.java#L389-L391
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.containsIgnoreCase
public static boolean containsIgnoreCase (@Nullable final String sText, final char cSearch, @Nonnull final Locale aSortLocale) { """ Check if cSearch is contained within sText ignoring case. @param sText The text to search ...
java
public static boolean containsIgnoreCase (@Nullable final String sText, final char cSearch, @Nonnull final Locale aSortLocale) { return getIndexOfIgnoreCase (sText, cSearch, aSortLocale) != STRING_NOT_FOUND; }
[ "public", "static", "boolean", "containsIgnoreCase", "(", "@", "Nullable", "final", "String", "sText", ",", "final", "char", "cSearch", ",", "@", "Nonnull", "final", "Locale", "aSortLocale", ")", "{", "return", "getIndexOfIgnoreCase", "(", "sText", ",", "cSearch...
Check if cSearch is contained within sText ignoring case. @param sText The text to search in. May be <code>null</code>. @param cSearch The char to search for. May be <code>null</code>. @param aSortLocale The locale to be used for case unifying. @return <code>true</code> if sSearch is contained in sText, <code>false</c...
[ "Check", "if", "cSearch", "is", "contained", "within", "sText", "ignoring", "case", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L3082-L3087
kiegroup/jbpm
jbpm-runtime-manager/src/main/java/org/jbpm/runtime/manager/impl/RuntimeEnvironmentBuilder.java
RuntimeEnvironmentBuilder.getClasspathKmoduleDefault
public static RuntimeEnvironmentBuilder getClasspathKmoduleDefault(String kbaseName, String ksessionName) { """ Provides default configuration of <code>RuntimeEnvironmentBuilder</code> that is based on: <ul> <li>DefaultRuntimeEnvironment</li> </ul> It relies on KieClasspathContainer that requires to have kmodu...
java
public static RuntimeEnvironmentBuilder getClasspathKmoduleDefault(String kbaseName, String ksessionName) { return setupClasspathKmoduleBuilder( KieServices.Factory.get().getKieClasspathContainer(), kbaseName, ksessionName ); }
[ "public", "static", "RuntimeEnvironmentBuilder", "getClasspathKmoduleDefault", "(", "String", "kbaseName", ",", "String", "ksessionName", ")", "{", "return", "setupClasspathKmoduleBuilder", "(", "KieServices", ".", "Factory", ".", "get", "(", ")", ".", "getKieClasspathC...
Provides default configuration of <code>RuntimeEnvironmentBuilder</code> that is based on: <ul> <li>DefaultRuntimeEnvironment</li> </ul> It relies on KieClasspathContainer that requires to have kmodule.xml present in META-INF folder which defines the kjar itself. @param kbaseName name of the kbase defined in kmodule.xm...
[ "Provides", "default", "configuration", "of", "<code", ">", "RuntimeEnvironmentBuilder<", "/", "code", ">", "that", "is", "based", "on", ":", "<ul", ">", "<li", ">", "DefaultRuntimeEnvironment<", "/", "li", ">", "<", "/", "ul", ">", "It", "relies", "on", "...
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-runtime-manager/src/main/java/org/jbpm/runtime/manager/impl/RuntimeEnvironmentBuilder.java#L294-L296
httl/httl
httl/src/main/java/httl/Engine.java
Engine.getTemplate
public Template getTemplate(String name) throws IOException, ParseException { """ Get template. @param name - template name @return template instance @throws IOException - If an I/O error occurs @throws ParseException - If the template cannot be parsed @see #getEngine() """ return getTemplate...
java
public Template getTemplate(String name) throws IOException, ParseException { return getTemplate(name, null, null, null); }
[ "public", "Template", "getTemplate", "(", "String", "name", ")", "throws", "IOException", ",", "ParseException", "{", "return", "getTemplate", "(", "name", ",", "null", ",", "null", ",", "null", ")", ";", "}" ]
Get template. @param name - template name @return template instance @throws IOException - If an I/O error occurs @throws ParseException - If the template cannot be parsed @see #getEngine()
[ "Get", "template", "." ]
train
https://github.com/httl/httl/blob/e13e00f4ab41252a8f53d6dafd4a6610be9dcaad/httl/src/main/java/httl/Engine.java#L328-L330
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/TableRow.java
TableRow.setColumnsSpanned
public void setColumnsSpanned(final int colIndex, final int n) { """ Add a span across columns @param colIndex the index of the first column @param n the number of columns in the span """ if (n <= 1) return; final TableCell firstCell = this.getOrCreateCell(colIndex); if ...
java
public void setColumnsSpanned(final int colIndex, final int n) { if (n <= 1) return; final TableCell firstCell = this.getOrCreateCell(colIndex); if (firstCell.isCovered()) // already spanned return; firstCell.markColumnsSpanned(n); this.coverRightCells(colIn...
[ "public", "void", "setColumnsSpanned", "(", "final", "int", "colIndex", ",", "final", "int", "n", ")", "{", "if", "(", "n", "<=", "1", ")", "return", ";", "final", "TableCell", "firstCell", "=", "this", ".", "getOrCreateCell", "(", "colIndex", ")", ";", ...
Add a span across columns @param colIndex the index of the first column @param n the number of columns in the span
[ "Add", "a", "span", "across", "columns" ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableRow.java#L179-L188
frostwire/frostwire-jlibtorrent
src/main/java/com/frostwire/jlibtorrent/FileStorage.java
FileStorage.addFile
public void addFile(String path, long size, file_flags_t flags, int mtime) { """ Adds a file to the file storage. The {@code flags} argument sets attributes on the file. The file attributes is an extension and may not work in all bittorrent clients. <p> If more files than one are added, certain restrictions to ...
java
public void addFile(String path, long size, file_flags_t flags, int mtime) { fs.add_file(path, size, flags, mtime); }
[ "public", "void", "addFile", "(", "String", "path", ",", "long", "size", ",", "file_flags_t", "flags", ",", "int", "mtime", ")", "{", "fs", ".", "add_file", "(", "path", ",", "size", ",", "flags", ",", "mtime", ")", ";", "}" ]
Adds a file to the file storage. The {@code flags} argument sets attributes on the file. The file attributes is an extension and may not work in all bittorrent clients. <p> If more files than one are added, certain restrictions to their paths apply. In a multi-file file storage (torrent), all files must share the same ...
[ "Adds", "a", "file", "to", "the", "file", "storage", ".", "The", "{", "@code", "flags", "}", "argument", "sets", "attributes", "on", "the", "file", ".", "The", "file", "attributes", "is", "an", "extension", "and", "may", "not", "work", "in", "all", "bi...
train
https://github.com/frostwire/frostwire-jlibtorrent/blob/a29249a940d34aba8c4677d238b472ef01833506/src/main/java/com/frostwire/jlibtorrent/FileStorage.java#L125-L127
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_upgrade.java
ns_upgrade.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ ns_upgrade_responses result = (ns_upgrade_responses) service.get_payloa...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { ns_upgrade_responses result = (ns_upgrade_responses) service.get_payload_formatter().string_to_resource(ns_upgrade_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == S...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "ns_upgrade_responses", "result", "=", "(", "ns_upgrade_responses", ")", "service", ".", "get_payload_formatte...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_upgrade.java#L191-L208
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java
Calc.isConnected
public static final boolean isConnected(AminoAcid a, AminoAcid b) { """ Test if two amino acids are connected, i.e. if the distance from C to N < 2.5 Angstrom. If one of the AminoAcids has an atom missing, returns false. @param a an AminoAcid object @param b an AminoAcid object @return true if ... "...
java
public static final boolean isConnected(AminoAcid a, AminoAcid b) { Atom C = null ; Atom N = null; C = a.getC(); N = b.getN(); if ( C == null || N == null) return false; // one could also check if the CA atoms are < 4 A... double distance = getDistance(C,N); return distance < 2.5; }
[ "public", "static", "final", "boolean", "isConnected", "(", "AminoAcid", "a", ",", "AminoAcid", "b", ")", "{", "Atom", "C", "=", "null", ";", "Atom", "N", "=", "null", ";", "C", "=", "a", ".", "getC", "(", ")", ";", "N", "=", "b", ".", "getN", ...
Test if two amino acids are connected, i.e. if the distance from C to N < 2.5 Angstrom. If one of the AminoAcids has an atom missing, returns false. @param a an AminoAcid object @param b an AminoAcid object @return true if ...
[ "Test", "if", "two", "amino", "acids", "are", "connected", "i", ".", "e", ".", "if", "the", "distance", "from", "C", "to", "N", "<", "2", ".", "5", "Angstrom", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/Calc.java#L341-L354
UrielCh/ovh-java-sdk
ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java
ApiOvhSms.serviceName_hlr_POST
public OvhSmsSendingReport serviceName_hlr_POST(String serviceName, String[] receivers, String receiversDocumentUrl) throws IOException { """ Add one or several sending hlr lookup request REST: POST /sms/{serviceName}/hlr @param receiversDocumentUrl [required] The receivers document url link in csv format @pa...
java
public OvhSmsSendingReport serviceName_hlr_POST(String serviceName, String[] receivers, String receiversDocumentUrl) throws IOException { String qPath = "/sms/{serviceName}/hlr"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "receivers", receiv...
[ "public", "OvhSmsSendingReport", "serviceName_hlr_POST", "(", "String", "serviceName", ",", "String", "[", "]", "receivers", ",", "String", "receiversDocumentUrl", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/sms/{serviceName}/hlr\"", ";", "StringBuild...
Add one or several sending hlr lookup request REST: POST /sms/{serviceName}/hlr @param receiversDocumentUrl [required] The receivers document url link in csv format @param receivers [required] The receivers @param serviceName [required] The internal name of your SMS offer
[ "Add", "one", "or", "several", "sending", "hlr", "lookup", "request" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java#L1517-L1525
stagemonitor/stagemonitor
stagemonitor-os/src/main/java/org/stagemonitor/os/SigarNativeBindingLoader.java
SigarNativeBindingLoader.extractFromJarToTemp
public static void extractFromJarToTemp(String path, File tempDirectory) throws IOException { """ Loads library from current JAR archive<p> The file from JAR is copied into system temporary directory and then loaded. The temporary file is deleted after exiting. Method uses String as filename because the pathna...
java
public static void extractFromJarToTemp(String path, File tempDirectory) throws IOException { File temp = createTempFile(path, tempDirectory); if (temp == null) { // already extracted return; } writeFromJarToTempFile(path, temp); }
[ "public", "static", "void", "extractFromJarToTemp", "(", "String", "path", ",", "File", "tempDirectory", ")", "throws", "IOException", "{", "File", "temp", "=", "createTempFile", "(", "path", ",", "tempDirectory", ")", ";", "if", "(", "temp", "==", "null", "...
Loads library from current JAR archive<p> The file from JAR is copied into system temporary directory and then loaded. The temporary file is deleted after exiting. Method uses String as filename because the pathname is "abstract", not system-dependent. @param path The filename inside JAR as absolute path (beginning w...
[ "Loads", "library", "from", "current", "JAR", "archive<p", ">" ]
train
https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-os/src/main/java/org/stagemonitor/os/SigarNativeBindingLoader.java#L81-L88
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java
JDBCStorableGenerator.closeStatement
private void closeStatement (CodeBuilder b, LocalVariable statementVar, Label tryAfterStatement) { """ Generates code which emulates this: ... } finally { statement.close(); } @param statementVar Statement variable @param tryAfterStatement label right after Statement acquisition """ ...
java
private void closeStatement (CodeBuilder b, LocalVariable statementVar, Label tryAfterStatement) { Label contLabel = b.createLabel(); Label endFinallyLabel = b.createLabel().setLocation(); b.loadLocal(statementVar); b.invokeInterface(TypeDesc.forClass(Statement.class)...
[ "private", "void", "closeStatement", "(", "CodeBuilder", "b", ",", "LocalVariable", "statementVar", ",", "Label", "tryAfterStatement", ")", "{", "Label", "contLabel", "=", "b", ".", "createLabel", "(", ")", ";", "Label", "endFinallyLabel", "=", "b", ".", "crea...
Generates code which emulates this: ... } finally { statement.close(); } @param statementVar Statement variable @param tryAfterStatement label right after Statement acquisition
[ "Generates", "code", "which", "emulates", "this", ":" ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorableGenerator.java#L1886-L1902
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java
ST_CollectionExtract.getArealGeometry
private static void getArealGeometry(ArrayList<Polygon> polygones, Geometry geometry) { """ Filter polygon from a geometry @param polygones @param geometry """ for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry subGeom = geometry.getGeometryN(i); if(subGeom inst...
java
private static void getArealGeometry(ArrayList<Polygon> polygones, Geometry geometry) { for (int i = 0; i < geometry.getNumGeometries(); i++) { Geometry subGeom = geometry.getGeometryN(i); if(subGeom instanceof Polygon){ polygones.add((Polygon) subGeom); } ...
[ "private", "static", "void", "getArealGeometry", "(", "ArrayList", "<", "Polygon", ">", "polygones", ",", "Geometry", "geometry", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "geometry", ".", "getNumGeometries", "(", ")", ";", "i", "++", ...
Filter polygon from a geometry @param polygones @param geometry
[ "Filter", "polygon", "from", "a", "geometry" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_CollectionExtract.java#L140-L150
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java
AnnotationsClassLoader.deleteDir
protected static void deleteDir(File dir) { """ Delete the specified directory, including all of its contents and subdirectories recursively. @param dir File object representing the directory to be deleted """ String files[] = dir.list(); if (files == null) { files = new String...
java
protected static void deleteDir(File dir) { String files[] = dir.list(); if (files == null) { files = new String[0]; } for (int i = 0; i < files.length; i++) { File file = new File(dir, files[i]); if (file.isDirectory()) { deleteDir(fi...
[ "protected", "static", "void", "deleteDir", "(", "File", "dir", ")", "{", "String", "files", "[", "]", "=", "dir", ".", "list", "(", ")", ";", "if", "(", "files", "==", "null", ")", "{", "files", "=", "new", "String", "[", "0", "]", ";", "}", "...
Delete the specified directory, including all of its contents and subdirectories recursively. @param dir File object representing the directory to be deleted
[ "Delete", "the", "specified", "directory", "including", "all", "of", "its", "contents", "and", "subdirectories", "recursively", "." ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/annotations/AnnotationsClassLoader.java#L2359-L2382
sahan/ZombieLink
zombielink/src/main/java/com/lonepulse/zombielink/executor/AsyncExecutionHandler.java
AsyncExecutionHandler.onError
@Override public void onError(InvocationContext context, Exception error) { """ <p>If an {@link AsyncHandler} is defined, any exception which resulted in an error will be available via the <i>onError</i> callback.</p> <p>See {@link ExecutionHandler#onError(InvocationContext, Exception)}</p> @param context ...
java
@Override public void onError(InvocationContext context, Exception error) { AsyncHandler<Object> asyncHandler = getAsyncHandler(context); if(asyncHandler != null) { try { asyncHandler.onError(error instanceof InvocationException? (InvocationException)error :InvocationException.newInstanc...
[ "@", "Override", "public", "void", "onError", "(", "InvocationContext", "context", ",", "Exception", "error", ")", "{", "AsyncHandler", "<", "Object", ">", "asyncHandler", "=", "getAsyncHandler", "(", "context", ")", ";", "if", "(", "asyncHandler", "!=", "null...
<p>If an {@link AsyncHandler} is defined, any exception which resulted in an error will be available via the <i>onError</i> callback.</p> <p>See {@link ExecutionHandler#onError(InvocationContext, Exception)}</p> @param context the {@link InvocationContext} with information on the proxy invocation <br><br> @param erro...
[ "<p", ">", "If", "an", "{", "@link", "AsyncHandler", "}", "is", "defined", "any", "exception", "which", "resulted", "in", "an", "error", "will", "be", "available", "via", "the", "<i", ">", "onError<", "/", "i", ">", "callback", ".", "<", "/", "p", ">...
train
https://github.com/sahan/ZombieLink/blob/a9971add56d4f6919a4a5e84c78e9220011d8982/zombielink/src/main/java/com/lonepulse/zombielink/executor/AsyncExecutionHandler.java#L181-L198
michel-kraemer/citeproc-java
citeproc-java/src/main/java/de/undercouch/citeproc/CSL.java
CSL.makeAdhocBibliography
public static Bibliography makeAdhocBibliography(String style, CSLItemData... items) throws IOException { """ Creates an ad hoc bibliography from the given citation items using the <code>"html"</code> output format. Calling this method is rather expensive as it initializes the CSL processor. If you need to cr...
java
public static Bibliography makeAdhocBibliography(String style, CSLItemData... items) throws IOException { return makeAdhocBibliography(style, "html", items); }
[ "public", "static", "Bibliography", "makeAdhocBibliography", "(", "String", "style", ",", "CSLItemData", "...", "items", ")", "throws", "IOException", "{", "return", "makeAdhocBibliography", "(", "style", ",", "\"html\"", ",", "items", ")", ";", "}" ]
Creates an ad hoc bibliography from the given citation items using the <code>"html"</code> output format. Calling this method is rather expensive as it initializes the CSL processor. If you need to create bibliographies multiple times in your application you should create the processor yourself and cache it if necessar...
[ "Creates", "an", "ad", "hoc", "bibliography", "from", "the", "given", "citation", "items", "using", "the", "<code", ">", "html", "<", "/", "code", ">", "output", "format", ".", "Calling", "this", "method", "is", "rather", "expensive", "as", "it", "initiali...
train
https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/CSL.java#L930-L933
hdbeukel/james-core
src/main/java/org/jamesframework/core/search/Search.java
Search.updateBestSolution
protected boolean updateBestSolution(SolutionType newSolution) { """ <p> Checks whether a new best solution has been found and updates it accordingly. The given solution is evaluated and validated, after which the best solution is updated only if the solution is valid and </p> <ul> <li>no best solution had b...
java
protected boolean updateBestSolution(SolutionType newSolution){ // validate solution Validation validation = getProblem().validate(newSolution); if(validation.passed()){ // passed validation: evaluate Evaluation evaluation = getProblem().evaluate(newSolution); ...
[ "protected", "boolean", "updateBestSolution", "(", "SolutionType", "newSolution", ")", "{", "// validate solution", "Validation", "validation", "=", "getProblem", "(", ")", ".", "validate", "(", "newSolution", ")", ";", "if", "(", "validation", ".", "passed", "(",...
<p> Checks whether a new best solution has been found and updates it accordingly. The given solution is evaluated and validated, after which the best solution is updated only if the solution is valid and </p> <ul> <li>no best solution had been set before, or</li> <li>the new solution has a better evaluation</li> </ul> ...
[ "<p", ">", "Checks", "whether", "a", "new", "best", "solution", "has", "been", "found", "and", "updates", "it", "accordingly", ".", "The", "given", "solution", "is", "evaluated", "and", "validated", "after", "which", "the", "best", "solution", "is", "updated...
train
https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/search/Search.java#L853-L865
JOML-CI/JOML
src/org/joml/Matrix4x3f.java
Matrix4x3f.orthoSymmetric
public Matrix4x3f orthoSymmetric(float width, float height, float zNear, float zFar, Matrix4x3f dest) { """ Apply a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code> to this matrix and store the result in <code>dest</code>. <...
java
public Matrix4x3f orthoSymmetric(float width, float height, float zNear, float zFar, Matrix4x3f dest) { return orthoSymmetric(width, height, zNear, zFar, false, dest); }
[ "public", "Matrix4x3f", "orthoSymmetric", "(", "float", "width", ",", "float", "height", ",", "float", "zNear", ",", "float", "zFar", ",", "Matrix4x3f", "dest", ")", "{", "return", "orthoSymmetric", "(", "width", ",", "height", ",", "zNear", ",", "zFar", "...
Apply a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code> to this matrix and store the result in <code>dest</code>. <p> This method is equivalent to calling {@link #ortho(float, float, float, float, float, float, Matrix4x3f) ortho()...
[ "Apply", "a", "symmetric", "orthographic", "projection", "transformation", "for", "a", "right", "-", "handed", "coordinate", "system", "using", "OpenGL", "s", "NDC", "z", "range", "of", "<code", ">", "[", "-", "1", "..", "+", "1", "]", "<", "/", "code", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3f.java#L5287-L5289
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/config/CommandLine.java
CommandLine.addOption
public void addOption(String option, String argumentDesc, String description) { """ Add an option requiring an argument. @param option the option, must start with "-" @param argumentDesc brief (one or two word) description of the argument @param description single line description of the option """ ...
java
public void addOption(String option, String argumentDesc, String description) { optionList.add(option); optionDescriptionMap.put(option, description); requiresArgumentSet.add(option); argumentDescriptionMap.put(option, argumentDesc); int width = option.length() + 3 + argumentDes...
[ "public", "void", "addOption", "(", "String", "option", ",", "String", "argumentDesc", ",", "String", "description", ")", "{", "optionList", ".", "add", "(", "option", ")", ";", "optionDescriptionMap", ".", "put", "(", "option", ",", "description", ")", ";",...
Add an option requiring an argument. @param option the option, must start with "-" @param argumentDesc brief (one or two word) description of the argument @param description single line description of the option
[ "Add", "an", "option", "requiring", "an", "argument", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/config/CommandLine.java#L136-L146
apache/groovy
src/main/groovy/groovy/ui/GroovyMain.java
GroovyMain.getScriptSource
protected GroovyCodeSource getScriptSource(boolean isScriptFile, String script) throws IOException, URISyntaxException { """ Get a new GroovyCodeSource for a script which may be given as a location (isScript is true) or as text (isScript is false). @param isScriptFile indicates whether the script parameter is ...
java
protected GroovyCodeSource getScriptSource(boolean isScriptFile, String script) throws IOException, URISyntaxException { //check the script is currently valid before starting a server against the script if (isScriptFile) { // search for the file and if it exists don't try to use URIs ... ...
[ "protected", "GroovyCodeSource", "getScriptSource", "(", "boolean", "isScriptFile", ",", "String", "script", ")", "throws", "IOException", ",", "URISyntaxException", "{", "//check the script is currently valid before starting a server against the script", "if", "(", "isScriptFile...
Get a new GroovyCodeSource for a script which may be given as a location (isScript is true) or as text (isScript is false). @param isScriptFile indicates whether the script parameter is a location or content @param script the location or context of the script @return a new GroovyCodeSource for the given script @throws...
[ "Get", "a", "new", "GroovyCodeSource", "for", "a", "script", "which", "may", "be", "given", "as", "a", "location", "(", "isScript", "is", "true", ")", "or", "as", "text", "(", "isScript", "is", "false", ")", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/ui/GroovyMain.java#L402-L413
jetty-project/jetty-npn
npn-boot/src/main/java/sun/security/ssl/SSLEngineImpl.java
SSLEngineImpl.checkSequenceNumber
private boolean checkSequenceNumber(MAC mac, byte type) throws IOException { """ Check the sequence number state RFC 4346 states that, "Sequence numbers are of type uint64 and may not exceed 2^64-1. Sequence numbers do not wrap. If a TLS implementation would need to wrap a sequence number, it mus...
java
private boolean checkSequenceNumber(MAC mac, byte type) throws IOException { /* * Don't bother to check the sequence number for error or * closed connections, or NULL MAC */ if (connectionState >= cs_ERROR || mac == MAC.NULL) { return false; } ...
[ "private", "boolean", "checkSequenceNumber", "(", "MAC", "mac", ",", "byte", "type", ")", "throws", "IOException", "{", "/*\n * Don't bother to check the sequence number for error or\n * closed connections, or NULL MAC\n */", "if", "(", "connectionState", ">...
Check the sequence number state RFC 4346 states that, "Sequence numbers are of type uint64 and may not exceed 2^64-1. Sequence numbers do not wrap. If a TLS implementation would need to wrap a sequence number, it must renegotiate instead." Return true if the handshake status may be changed.
[ "Check", "the", "sequence", "number", "state" ]
train
https://github.com/jetty-project/jetty-npn/blob/a26a7a5eabeeb57a63c6ee08fcf9b8cec1fa6c0d/npn-boot/src/main/java/sun/security/ssl/SSLEngineImpl.java#L1380-L1429
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/BaseProfile.java
BaseProfile.generateMbeanXml
void generateMbeanXml(Definition def, String outputDir) { """ generate mbean deployment xml @param def Definition @param outputDir output directory """ String mbeanName = def.getDefaultValue().toLowerCase(Locale.US); if (def.getRaPackage() != null && !def.getRaPackage().equals("")) ...
java
void generateMbeanXml(Definition def, String outputDir) { String mbeanName = def.getDefaultValue().toLowerCase(Locale.US); if (def.getRaPackage() != null && !def.getRaPackage().equals("")) { if (def.getRaPackage().indexOf('.') >= 0) { mbeanName = def.getRaPackage().sub...
[ "void", "generateMbeanXml", "(", "Definition", "def", ",", "String", "outputDir", ")", "{", "String", "mbeanName", "=", "def", ".", "getDefaultValue", "(", ")", ".", "toLowerCase", "(", "Locale", ".", "US", ")", ";", "if", "(", "def", ".", "getRaPackage", ...
generate mbean deployment xml @param def Definition @param outputDir output directory
[ "generate", "mbean", "deployment", "xml" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/BaseProfile.java#L510-L536
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/RequestUtil.java
RequestUtil.addFileItem
public static void addFileItem(final Map<String, FileItem[]> files, final String name, final FileItem item) { """ Add the file data to the files collection. If a file already exists with the given name then the value for this name will be an array of all registered files. @param files the map in which to store...
java
public static void addFileItem(final Map<String, FileItem[]> files, final String name, final FileItem item) { if (files.containsKey(name)) { // This field contains multiple values, append the new value to the existing values. FileItem[] oldValues = files.get(name); FileItem[] newValues = new FileItem[oldValu...
[ "public", "static", "void", "addFileItem", "(", "final", "Map", "<", "String", ",", "FileItem", "[", "]", ">", "files", ",", "final", "String", "name", ",", "final", "FileItem", "item", ")", "{", "if", "(", "files", ".", "containsKey", "(", "name", ")"...
Add the file data to the files collection. If a file already exists with the given name then the value for this name will be an array of all registered files. @param files the map in which to store file data. @param name the name of the file, i.e. the key to store the file against. @param item the file data.
[ "Add", "the", "file", "data", "to", "the", "files", "collection", ".", "If", "a", "file", "already", "exists", "with", "the", "given", "name", "then", "the", "value", "for", "this", "name", "will", "be", "an", "array", "of", "all", "registered", "files",...
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/RequestUtil.java#L28-L39
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java
DateFunctions.millisToUtc
public static Expression millisToUtc(String expression, String format) { """ Returned expression results in the UTC string to which the UNIX time stamp has been converted in the supported format. """ return millisToUtc(x(expression), format); }
java
public static Expression millisToUtc(String expression, String format) { return millisToUtc(x(expression), format); }
[ "public", "static", "Expression", "millisToUtc", "(", "String", "expression", ",", "String", "format", ")", "{", "return", "millisToUtc", "(", "x", "(", "expression", ")", ",", "format", ")", ";", "}" ]
Returned expression results in the UTC string to which the UNIX time stamp has been converted in the supported format.
[ "Returned", "expression", "results", "in", "the", "UTC", "string", "to", "which", "the", "UNIX", "time", "stamp", "has", "been", "converted", "in", "the", "supported", "format", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/DateFunctions.java#L262-L264
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
StreamExecutionEnvironment.readFile
@PublicEvolving @Deprecated public <OUT> DataStreamSource<OUT> readFile(FileInputFormat<OUT> inputFormat, String filePath, FileProcessingMode watchType, long interval, FilePathFilter filter) { """ Reads the contents of the user-specified {@code filePath} based on t...
java
@PublicEvolving @Deprecated public <OUT> DataStreamSource<OUT> readFile(FileInputFormat<OUT> inputFormat, String filePath, FileProcessingMode watchType, long interval, FilePathFilter filter) { inputFormat.setFilesFilter(filter); TypeInformation<OUT> typeInformation...
[ "@", "PublicEvolving", "@", "Deprecated", "public", "<", "OUT", ">", "DataStreamSource", "<", "OUT", ">", "readFile", "(", "FileInputFormat", "<", "OUT", ">", "inputFormat", ",", "String", "filePath", ",", "FileProcessingMode", "watchType", ",", "long", "interva...
Reads the contents of the user-specified {@code filePath} based on the given {@link FileInputFormat}. Depending on the provided {@link FileProcessingMode}. <p>See {@link #readFile(FileInputFormat, String, FileProcessingMode, long)} @param inputFormat The input format used to create the data stream @param filePath The...
[ "Reads", "the", "contents", "of", "the", "user", "-", "specified", "{", "@code", "filePath", "}", "based", "on", "the", "given", "{", "@link", "FileInputFormat", "}", ".", "Depending", "on", "the", "provided", "{", "@link", "FileProcessingMode", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java#L1023-L1041
voldemort/voldemort
src/java/voldemort/utils/RebalanceUtils.java
RebalanceUtils.printBatchLog
public static void printBatchLog(int batchId, Logger logger, String message) { """ Print log to the following logger ( Info level ) @param batchId Task id @param logger Logger class @param message The message to print """ logger.info("[Rebalance batch id " + batchId + "] " + message); }
java
public static void printBatchLog(int batchId, Logger logger, String message) { logger.info("[Rebalance batch id " + batchId + "] " + message); }
[ "public", "static", "void", "printBatchLog", "(", "int", "batchId", ",", "Logger", "logger", ",", "String", "message", ")", "{", "logger", ".", "info", "(", "\"[Rebalance batch id \"", "+", "batchId", "+", "\"] \"", "+", "message", ")", ";", "}" ]
Print log to the following logger ( Info level ) @param batchId Task id @param logger Logger class @param message The message to print
[ "Print", "log", "to", "the", "following", "logger", "(", "Info", "level", ")" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/RebalanceUtils.java#L452-L454
OpenLiberty/open-liberty
dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/ws/impl/StringUtils.java
StringUtils.areEqual
public static boolean areEqual(String s1, String s2) { """ Null safe equals() method @return true if the two strs are equal, or if they're both null; false otherwise. """ return (s1 == null) ? s2 == null : s1.equals(s2); }
java
public static boolean areEqual(String s1, String s2) { return (s1 == null) ? s2 == null : s1.equals(s2); }
[ "public", "static", "boolean", "areEqual", "(", "String", "s1", ",", "String", "s2", ")", "{", "return", "(", "s1", "==", "null", ")", "?", "s2", "==", "null", ":", "s1", ".", "equals", "(", "s2", ")", ";", "}" ]
Null safe equals() method @return true if the two strs are equal, or if they're both null; false otherwise.
[ "Null", "safe", "equals", "()", "method" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/ws/impl/StringUtils.java#L176-L178
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/color/ColorYuv.java
ColorYuv.yuvToRgb
public static <T extends ImageGray<T>> void yuvToRgb(Planar<T> yuv , Planar<T> rgb) { """ Convert a 3-channel {@link Planar} image from YUV into RGB. If integer then YCbCr and not YUV. @param rgb (Input) RGB encoded image @param yuv (Output) YUV encoded image """ rgb.reshape(rgb.width,rgb.height,3); ...
java
public static <T extends ImageGray<T>> void yuvToRgb(Planar<T> yuv , Planar<T> rgb) { rgb.reshape(rgb.width,rgb.height,3); if( rgb.getBandType() == GrayF32.class ) { if(BoofConcurrency.USE_CONCURRENT ) { ImplColorYuv_MT.yuvToRgb_F32((Planar<GrayF32>)yuv,(Planar<GrayF32>)rgb); } else { ImplColorYuv....
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "void", "yuvToRgb", "(", "Planar", "<", "T", ">", "yuv", ",", "Planar", "<", "T", ">", "rgb", ")", "{", "rgb", ".", "reshape", "(", "rgb", ".", "width", ",", "rgb", ".", ...
Convert a 3-channel {@link Planar} image from YUV into RGB. If integer then YCbCr and not YUV. @param rgb (Input) RGB encoded image @param yuv (Output) YUV encoded image
[ "Convert", "a", "3", "-", "channel", "{", "@link", "Planar", "}", "image", "from", "YUV", "into", "RGB", ".", "If", "integer", "then", "YCbCr", "and", "not", "YUV", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/color/ColorYuv.java#L147-L166
pwheel/spring-security-oauth2-client
src/main/java/com/racquettrack/security/oauth/OAuth2UserDetailsService.java
OAuth2UserDetailsService.postCreatedOrEnabledUser
private void postCreatedOrEnabledUser(UserDetails userDetails, Map<String, Object> userInfo) { """ Extension point to allow sub classes to optionally do some processing after a user has been created or enabled. For example they could set something in the session so that the authentication success handler can trea...
java
private void postCreatedOrEnabledUser(UserDetails userDetails, Map<String, Object> userInfo) { if (oAuth2PostCreatedOrEnabledUserService != null) { oAuth2PostCreatedOrEnabledUserService.postCreatedOrEnabledUser(userDetails, userInfo); } }
[ "private", "void", "postCreatedOrEnabledUser", "(", "UserDetails", "userDetails", ",", "Map", "<", "String", ",", "Object", ">", "userInfo", ")", "{", "if", "(", "oAuth2PostCreatedOrEnabledUserService", "!=", "null", ")", "{", "oAuth2PostCreatedOrEnabledUserService", ...
Extension point to allow sub classes to optionally do some processing after a user has been created or enabled. For example they could set something in the session so that the authentication success handler can treat the first log in differently. @param userDetails The {@link UserDetails} object created by {@link OAuth...
[ "Extension", "point", "to", "allow", "sub", "classes", "to", "optionally", "do", "some", "processing", "after", "a", "user", "has", "been", "created", "or", "enabled", ".", "For", "example", "they", "could", "set", "something", "in", "the", "session", "so", ...
train
https://github.com/pwheel/spring-security-oauth2-client/blob/c0258823493e268495c9752c5d752f74c6809c6b/src/main/java/com/racquettrack/security/oauth/OAuth2UserDetailsService.java#L99-L103
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.hasRole
public boolean hasRole(CmsRequestContext context, CmsUser user, CmsRole role) { """ Checks if the given user has the given role in the given organizational unit.<p> If the organizational unit is <code>null</code>, this method will check if the given user has the given role for at least one organizational unit....
java
public boolean hasRole(CmsRequestContext context, CmsUser user, CmsRole role) { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); boolean result; try { result = hasRole(dbc, user, role); } finally { dbc.clear(); } return result; }
[ "public", "boolean", "hasRole", "(", "CmsRequestContext", "context", ",", "CmsUser", "user", ",", "CmsRole", "role", ")", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", "boolean", "result", ";", "try", "{"...
Checks if the given user has the given role in the given organizational unit.<p> If the organizational unit is <code>null</code>, this method will check if the given user has the given role for at least one organizational unit.<p> @param context the current request context @param user the user to check the role for @...
[ "Checks", "if", "the", "given", "user", "has", "the", "given", "role", "in", "the", "given", "organizational", "unit", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L3065-L3075
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java
MsgDestEncodingUtilsImpl.getDestinationFromMsgRepresentation
public final JmsDestination getDestinationFromMsgRepresentation(byte[] msgForm) throws JMSException { """ /* @see com.ibm.ws.sib.api.jms.MessageDestEncodingUtils#getDestinationFromMsgRepresentation(byte[]) Inflates the efficient byte[] representation from the message into a JmsDestination object. Throws a ...
java
public final JmsDestination getDestinationFromMsgRepresentation(byte[] msgForm) throws JMSException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getDestinationFromMsgRepresentation"); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "msgForm...
[ "public", "final", "JmsDestination", "getDestinationFromMsgRepresentation", "(", "byte", "[", "]", "msgForm", ")", "throws", "JMSException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", ...
/* @see com.ibm.ws.sib.api.jms.MessageDestEncodingUtils#getDestinationFromMsgRepresentation(byte[]) Inflates the efficient byte[] representation from the message into a JmsDestination object. Throws a JMSException if there are problems during the deserialization process, for example if the parameter is null.
[ "/", "*", "@see", "com", ".", "ibm", ".", "ws", ".", "sib", ".", "api", ".", "jms", ".", "MessageDestEncodingUtils#getDestinationFromMsgRepresentation", "(", "byte", "[]", ")" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/MsgDestEncodingUtilsImpl.java#L235-L264
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java
MeshGenerator.generateNormals
public static TFloatList generateNormals(TFloatList positions, TIntList indices) { """ Generate the normals for the positions, according to the indices. This assumes that the positions have 3 components, in the x, y, z order. The normals are stored as a 3 component vector, in the x, y, z order. @param position...
java
public static TFloatList generateNormals(TFloatList positions, TIntList indices) { final TFloatList normals = new TFloatArrayList(); generateNormals(positions, indices, normals); return normals; }
[ "public", "static", "TFloatList", "generateNormals", "(", "TFloatList", "positions", ",", "TIntList", "indices", ")", "{", "final", "TFloatList", "normals", "=", "new", "TFloatArrayList", "(", ")", ";", "generateNormals", "(", "positions", ",", "indices", ",", "...
Generate the normals for the positions, according to the indices. This assumes that the positions have 3 components, in the x, y, z order. The normals are stored as a 3 component vector, in the x, y, z order. @param positions The position components @param indices The indices @return The normals
[ "Generate", "the", "normals", "for", "the", "positions", "according", "to", "the", "indices", ".", "This", "assumes", "that", "the", "positions", "have", "3", "components", "in", "the", "x", "y", "z", "order", ".", "The", "normals", "are", "stored", "as", ...
train
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java#L142-L146
morfologik/morfologik-stemming
morfologik-stemming/src/main/java/morfologik/stemming/Dictionary.java
Dictionary.read
public static Dictionary read(Path location) throws IOException { """ Attempts to load a dictionary using the path to the FSA file and the expected metadata extension. @param location The location of the dictionary file (<code>*.dict</code>). @return An instantiated dictionary. @throws IOException if an I/O ...
java
public static Dictionary read(Path location) throws IOException { final Path metadata = DictionaryMetadata.getExpectedMetadataLocation(location); try (InputStream fsaStream = Files.newInputStream(location); InputStream metadataStream = Files.newInputStream(metadata)) { return read(fsaStream...
[ "public", "static", "Dictionary", "read", "(", "Path", "location", ")", "throws", "IOException", "{", "final", "Path", "metadata", "=", "DictionaryMetadata", ".", "getExpectedMetadataLocation", "(", "location", ")", ";", "try", "(", "InputStream", "fsaStream", "="...
Attempts to load a dictionary using the path to the FSA file and the expected metadata extension. @param location The location of the dictionary file (<code>*.dict</code>). @return An instantiated dictionary. @throws IOException if an I/O error occurs.
[ "Attempts", "to", "load", "a", "dictionary", "using", "the", "path", "to", "the", "FSA", "file", "and", "the", "expected", "metadata", "extension", "." ]
train
https://github.com/morfologik/morfologik-stemming/blob/9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e/morfologik-stemming/src/main/java/morfologik/stemming/Dictionary.java#L60-L67
wiselenium/wiselenium
wiselenium-factory/src/main/java/com/github/wiselenium/factory/WisePageFactory.java
WisePageFactory.initElements
public static <T> T initElements(WebDriver driver, Class<T> clazz) { """ Instantiates an object of the given class and initializes its elements. <br/> This method will attempt to instantiate the object using preferably a constructor that takes a WebDriver instance as its only argument or falling back on a no-arg...
java
public static <T> T initElements(WebDriver driver, Class<T> clazz) { T instance = instantiatePage(driver, clazz); return initElements(driver, instance); }
[ "public", "static", "<", "T", ">", "T", "initElements", "(", "WebDriver", "driver", ",", "Class", "<", "T", ">", "clazz", ")", "{", "T", "instance", "=", "instantiatePage", "(", "driver", ",", "clazz", ")", ";", "return", "initElements", "(", "driver", ...
Instantiates an object of the given class and initializes its elements. <br/> This method will attempt to instantiate the object using preferably a constructor that takes a WebDriver instance as its only argument or falling back on a no-arg constructor. An exception will be thrown if the object cannot be instantiated. ...
[ "Instantiates", "an", "object", "of", "the", "given", "class", "and", "initializes", "its", "elements", ".", "<br", "/", ">", "This", "method", "will", "attempt", "to", "instantiate", "the", "object", "using", "preferably", "a", "constructor", "that", "takes",...
train
https://github.com/wiselenium/wiselenium/blob/15de6484d8f516b3d02391d3bd6a56a03e632706/wiselenium-factory/src/main/java/com/github/wiselenium/factory/WisePageFactory.java#L58-L61
zaproxy/zaproxy
src/org/zaproxy/zap/utils/ApiUtils.java
ApiUtils.getContextByName
public static Context getContextByName(JSONObject parameters, String parameterName) throws ApiException { """ Returns the {@code Context} with the given name. The context's name is obtained from the given {@code parameters}, whose name is the value of {@code parameterName}. <p> The parameter must exist, that is...
java
public static Context getContextByName(JSONObject parameters, String parameterName) throws ApiException { return getContextByName(parameters.getString(parameterName)); }
[ "public", "static", "Context", "getContextByName", "(", "JSONObject", "parameters", ",", "String", "parameterName", ")", "throws", "ApiException", "{", "return", "getContextByName", "(", "parameters", ".", "getString", "(", "parameterName", ")", ")", ";", "}" ]
Returns the {@code Context} with the given name. The context's name is obtained from the given {@code parameters}, whose name is the value of {@code parameterName}. <p> The parameter must exist, that is, it should be a mandatory parameter, otherwise a runtime exception is thrown. @param parameters the parameters that ...
[ "Returns", "the", "{", "@code", "Context", "}", "with", "the", "given", "name", ".", "The", "context", "s", "name", "is", "obtained", "from", "the", "given", "{", "@code", "parameters", "}", "whose", "name", "is", "the", "value", "of", "{", "@code", "p...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/ApiUtils.java#L173-L175
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getCharacterCrafting
public void getCharacterCrafting(String API, String name, Callback<CharacterCraftingLevel> callback) throws GuildWars2Exception, NullPointerException { """ For more info on character crafting API go <a href="https://wiki.guildwars2.com/wiki/API:2/characters#Crafting">here</a><br/> @param API API key @para...
java
public void getCharacterCrafting(String API, String name, Callback<CharacterCraftingLevel> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name)); gw2API.getCharacterCrafting(name, API).enqueue(callback); }
[ "public", "void", "getCharacterCrafting", "(", "String", "API", ",", "String", "name", ",", "Callback", "<", "CharacterCraftingLevel", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", ...
For more info on character crafting API go <a href="https://wiki.guildwars2.com/wiki/API:2/characters#Crafting">here</a><br/> @param API API key @param name name of character @param callback callback that is going to be used for {@link Call#enqueue(Callback)} @throws GuildWars2Exception invalid API key | emp...
[ "For", "more", "info", "on", "character", "crafting", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "characters#Crafting", ">", "here<", "/", "a", ">", "<br", "/", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L736-L739
Squarespace/cldr
runtime/src/main/java/com/squarespace/cldr/MessageArgsUnitParser.java
MessageArgsUnitParser.inputFromExactUnit
protected static Unit inputFromExactUnit(Unit exact, UnitConverter converter) { """ Based on the unit we're converting to, guess the input unit. For example, if we're converting to MEGABIT and no input unit was specified, assume BIT. """ switch (exact) { case TERABIT: case GIGABIT: case ...
java
protected static Unit inputFromExactUnit(Unit exact, UnitConverter converter) { switch (exact) { case TERABIT: case GIGABIT: case MEGABIT: case KILOBIT: case BIT: return Unit.BIT; case TERABYTE: case GIGABYTE: case MEGABYTE: case KILOBYTE: case BY...
[ "protected", "static", "Unit", "inputFromExactUnit", "(", "Unit", "exact", ",", "UnitConverter", "converter", ")", "{", "switch", "(", "exact", ")", "{", "case", "TERABIT", ":", "case", "GIGABIT", ":", "case", "MEGABIT", ":", "case", "KILOBIT", ":", "case", ...
Based on the unit we're converting to, guess the input unit. For example, if we're converting to MEGABIT and no input unit was specified, assume BIT.
[ "Based", "on", "the", "unit", "we", "re", "converting", "to", "guess", "the", "input", "unit", ".", "For", "example", "if", "we", "re", "converting", "to", "MEGABIT", "and", "no", "input", "unit", "was", "specified", "assume", "BIT", "." ]
train
https://github.com/Squarespace/cldr/blob/54b752d4ec2457df56e98461618f9c0eec41e1e1/runtime/src/main/java/com/squarespace/cldr/MessageArgsUnitParser.java#L164-L209
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/processor/EntityListenersProcessor.java
EntityListenersProcessor.addCallBackMethod
@SuppressWarnings("unchecked") private void addCallBackMethod(EntityMetadata metadata, Class<?> jpaAnnotation, CallbackMethod callbackMethod) { """ Adds the call back method. @param metadata the metadata @param jpaAnnotation the jpa annotation @param callbackMethod the callback method """ ...
java
@SuppressWarnings("unchecked") private void addCallBackMethod(EntityMetadata metadata, Class<?> jpaAnnotation, CallbackMethod callbackMethod) { Map<Class<?>, List<? extends CallbackMethod>> callBackMethodsMap = metadata.getCallbackMethodsMap(); List<CallbackMethod> list = (List<CallbackMetho...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "addCallBackMethod", "(", "EntityMetadata", "metadata", ",", "Class", "<", "?", ">", "jpaAnnotation", ",", "CallbackMethod", "callbackMethod", ")", "{", "Map", "<", "Class", "<", "?", ">", ...
Adds the call back method. @param metadata the metadata @param jpaAnnotation the jpa annotation @param callbackMethod the callback method
[ "Adds", "the", "call", "back", "method", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/processor/EntityListenersProcessor.java#L148-L159
facebookarchive/hive-dwrf
hive-dwrf/src/main/java/com/facebook/hive/orc/ReaderImpl.java
ReaderImpl.checkIfORC
public static void checkIfORC(FileSystem fs, Path path) throws IOException { """ Reads the file header (first 40 bytes) and checks if the first three characters are 'ORC'. """ // hardcoded to 40 because "SEQ-org.apache.hadoop.hive.ql.io.RCFile", the header, is of 40 chars final int buffLen = 40; fi...
java
public static void checkIfORC(FileSystem fs, Path path) throws IOException { // hardcoded to 40 because "SEQ-org.apache.hadoop.hive.ql.io.RCFile", the header, is of 40 chars final int buffLen = 40; final byte header[] = new byte[buffLen]; final FSDataInputStream file = fs.open(path); final long file...
[ "public", "static", "void", "checkIfORC", "(", "FileSystem", "fs", ",", "Path", "path", ")", "throws", "IOException", "{", "// hardcoded to 40 because \"SEQ-org.apache.hadoop.hive.ql.io.RCFile\", the header, is of 40 chars", "final", "int", "buffLen", "=", "40", ";", "final...
Reads the file header (first 40 bytes) and checks if the first three characters are 'ORC'.
[ "Reads", "the", "file", "header", "(", "first", "40", "bytes", ")", "and", "checks", "if", "the", "first", "three", "characters", "are", "ORC", "." ]
train
https://github.com/facebookarchive/hive-dwrf/blob/a7b4fcf28a57e006a2fc041d40cf7e5ad16e6b45/hive-dwrf/src/main/java/com/facebook/hive/orc/ReaderImpl.java#L265-L285
ehcache/ehcache3
core/src/main/java/org/ehcache/core/util/CollectionUtil.java
CollectionUtil.findBestCollectionSize
public static int findBestCollectionSize(Iterable<?> iterable, int bestBet) { """ Used to create a new collection with the correct size. Given an iterable, will try to see it the iterable actually have a size and will return it. If the iterable has no known size, we return the best bet. @param iterable the ite...
java
public static int findBestCollectionSize(Iterable<?> iterable, int bestBet) { return (iterable instanceof Collection ? ((Collection<?>) iterable).size() : bestBet); }
[ "public", "static", "int", "findBestCollectionSize", "(", "Iterable", "<", "?", ">", "iterable", ",", "int", "bestBet", ")", "{", "return", "(", "iterable", "instanceof", "Collection", "?", "(", "(", "Collection", "<", "?", ">", ")", "iterable", ")", ".", ...
Used to create a new collection with the correct size. Given an iterable, will try to see it the iterable actually have a size and will return it. If the iterable has no known size, we return the best bet. @param iterable the iterable we will try to find the size of @param bestBet our best bet for the size if the iter...
[ "Used", "to", "create", "a", "new", "collection", "with", "the", "correct", "size", ".", "Given", "an", "iterable", "will", "try", "to", "see", "it", "the", "iterable", "actually", "have", "a", "size", "and", "will", "return", "it", ".", "If", "the", "...
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/core/src/main/java/org/ehcache/core/util/CollectionUtil.java#L37-L39
sematext/sematext-metrics
src/main/java/com/sematext/metrics/client/SematextClient.java
SematextClient.newInstance
public static SematextClient newInstance(String token) { """ Create new instance of client. @param token token @return new client instance @throws IllegalArgumentException when token or executor is {@code null} """ if (token == null) { throw new IllegalArgumentException("Token should be defined.")...
java
public static SematextClient newInstance(String token) { if (token == null) { throw new IllegalArgumentException("Token should be defined."); } return newInstance(new ClientProperties(token, null, null)); }
[ "public", "static", "SematextClient", "newInstance", "(", "String", "token", ")", "{", "if", "(", "token", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Token should be defined.\"", ")", ";", "}", "return", "newInstance", "(", "new"...
Create new instance of client. @param token token @return new client instance @throws IllegalArgumentException when token or executor is {@code null}
[ "Create", "new", "instance", "of", "client", "." ]
train
https://github.com/sematext/sematext-metrics/blob/a89ebb9eca2e4e8d8547e68bc9bc1f01aeb3975c/src/main/java/com/sematext/metrics/client/SematextClient.java#L194-L199
yangjm/winlet
utils/src/main/java/com/aggrepoint/utils/CollectionUtils.java
CollectionUtils.toHashMap
public static <T, K> HashMap<K, T> toHashMap(Collection<T> entities, Function<T, K> keyMapper) { """ Convert a collection to HashMap, The key is decided by keyMapper, value is the object in collection @param entities @param keyMapper @return """ return toMap(entities, keyMapper, HashMap<K, T>::new...
java
public static <T, K> HashMap<K, T> toHashMap(Collection<T> entities, Function<T, K> keyMapper) { return toMap(entities, keyMapper, HashMap<K, T>::new); }
[ "public", "static", "<", "T", ",", "K", ">", "HashMap", "<", "K", ",", "T", ">", "toHashMap", "(", "Collection", "<", "T", ">", "entities", ",", "Function", "<", "T", ",", "K", ">", "keyMapper", ")", "{", "return", "toMap", "(", "entities", ",", ...
Convert a collection to HashMap, The key is decided by keyMapper, value is the object in collection @param entities @param keyMapper @return
[ "Convert", "a", "collection", "to", "HashMap", "The", "key", "is", "decided", "by", "keyMapper", "value", "is", "the", "object", "in", "collection" ]
train
https://github.com/yangjm/winlet/blob/2126236f56858e283fa6ad69fe9279ee30f47b67/utils/src/main/java/com/aggrepoint/utils/CollectionUtils.java#L98-L101
btrplace/scheduler
api/src/main/java/org/btrplace/model/constraint/Ban.java
Ban.newBan
public static List<Ban> newBan(Collection<VM> vms, Collection<Node> nodes) { """ Instantiate discrete constraints for a collection of VMs. @param vms the VMs to integrate @param nodes the hosts to disallow @return the associated list of constraints """ return vms.stream().map(v -> new Ban(v, nod...
java
public static List<Ban> newBan(Collection<VM> vms, Collection<Node> nodes) { return vms.stream().map(v -> new Ban(v, nodes)).collect(Collectors.toList()); }
[ "public", "static", "List", "<", "Ban", ">", "newBan", "(", "Collection", "<", "VM", ">", "vms", ",", "Collection", "<", "Node", ">", "nodes", ")", "{", "return", "vms", ".", "stream", "(", ")", ".", "map", "(", "v", "->", "new", "Ban", "(", "v",...
Instantiate discrete constraints for a collection of VMs. @param vms the VMs to integrate @param nodes the hosts to disallow @return the associated list of constraints
[ "Instantiate", "discrete", "constraints", "for", "a", "collection", "of", "VMs", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/model/constraint/Ban.java#L103-L105
rzwitserloot/lombok
src/core/lombok/javac/handlers/JavacHandlerUtil.java
JavacHandlerUtil.typeMatches
public static boolean typeMatches(Class<?> type, JavacNode node, JCTree typeNode) { """ Checks if the given TypeReference node is likely to be a reference to the provided class. @param type An actual type. This method checks if {@code typeNode} is likely to be a reference to this type. @param node A Lombok AST...
java
public static boolean typeMatches(Class<?> type, JavacNode node, JCTree typeNode) { return typeMatches(type.getName(), node, typeNode); }
[ "public", "static", "boolean", "typeMatches", "(", "Class", "<", "?", ">", "type", ",", "JavacNode", "node", ",", "JCTree", "typeNode", ")", "{", "return", "typeMatches", "(", "type", ".", "getName", "(", ")", ",", "node", ",", "typeNode", ")", ";", "}...
Checks if the given TypeReference node is likely to be a reference to the provided class. @param type An actual type. This method checks if {@code typeNode} is likely to be a reference to this type. @param node A Lombok AST node. Any node in the appropriate compilation unit will do (used to get access to import statem...
[ "Checks", "if", "the", "given", "TypeReference", "node", "is", "likely", "to", "be", "a", "reference", "to", "the", "provided", "class", "." ]
train
https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/core/lombok/javac/handlers/JavacHandlerUtil.java#L291-L293
Azure/azure-sdk-for-java
batchai/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/FileServersInner.java
FileServersInner.getByResourceGroupAsync
public Observable<FileServerInner> getByResourceGroupAsync(String resourceGroupName, String fileServerName) { """ Gets information about the specified Cluster. @param resourceGroupName Name of the resource group to which the resource belongs. @param fileServerName The name of the file server within the specifi...
java
public Observable<FileServerInner> getByResourceGroupAsync(String resourceGroupName, String fileServerName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, fileServerName).map(new Func1<ServiceResponse<FileServerInner>, FileServerInner>() { @Override public FileSer...
[ "public", "Observable", "<", "FileServerInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "fileServerName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "fileServerName", ")", ".", ...
Gets information about the specified Cluster. @param resourceGroupName Name of the resource group to which the resource belongs. @param fileServerName The name of the file server within the specified resource group. File server names can only contain a combination of alphanumeric characters along with dash (-) and und...
[ "Gets", "information", "about", "the", "specified", "Cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batchai/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/FileServersInner.java#L470-L477
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplString_CustomFieldSerializer.java
OWLLiteralImplString_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLLiteralImplString instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt....
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLLiteralImplString instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLLiteralImplString", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user.clie...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplString_CustomFieldSerializer.java#L83-L86