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
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/view/ApptentiveNestedScrollView.java
ApptentiveNestedScrollView.scrollAndFocus
private boolean scrollAndFocus(int direction, int top, int bottom) { """ <p>Scrolls the view to make the area defined by <code>top</code> and <code>bottom</code> visible. This method attempts to give the focus to a component visible in this area. If no component can be focused in the new visible area, the focus...
java
private boolean scrollAndFocus(int direction, int top, int bottom) { boolean handled = true; int height = getHeight(); int containerTop = getScrollY(); int containerBottom = containerTop + height; boolean up = direction == View.FOCUS_UP; View newFocused = findFocusableViewInBounds(up, top, bottom); if (...
[ "private", "boolean", "scrollAndFocus", "(", "int", "direction", ",", "int", "top", ",", "int", "bottom", ")", "{", "boolean", "handled", "=", "true", ";", "int", "height", "=", "getHeight", "(", ")", ";", "int", "containerTop", "=", "getScrollY", "(", "...
<p>Scrolls the view to make the area defined by <code>top</code> and <code>bottom</code> visible. This method attempts to give the focus to a component visible in this area. If no component can be focused in the new visible area, the focus is reclaimed by this ScrollView.</p> @param direction the scroll direction: {@l...
[ "<p", ">", "Scrolls", "the", "view", "to", "make", "the", "area", "defined", "by", "<code", ">", "top<", "/", "code", ">", "and", "<code", ">", "bottom<", "/", "code", ">", "visible", ".", "This", "method", "attempts", "to", "give", "the", "focus", "...
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/view/ApptentiveNestedScrollView.java#L1179-L1202
fuinorg/utils4j
src/main/java/org/fuin/utils4j/Utils4J.java
Utils4J.zipDir
public static void zipDir(final File srcDir, final FileFilter filter, final String destPath, final File destFile) throws IOException { """ Creates a ZIP file and adds all files in a directory and all it's sub directories to the archive. Only entries are added that comply to the file filter. @param srcDir Dire...
java
public static void zipDir(final File srcDir, final FileFilter filter, final String destPath, final File destFile) throws IOException { Utils4J.checkNotNull("srcDir", srcDir); Utils4J.checkValidDir(srcDir); Utils4J.checkNotNull("destFile", destFile); try (final ZipOutputStream out...
[ "public", "static", "void", "zipDir", "(", "final", "File", "srcDir", ",", "final", "FileFilter", "filter", ",", "final", "String", "destPath", ",", "final", "File", "destFile", ")", "throws", "IOException", "{", "Utils4J", ".", "checkNotNull", "(", "\"srcDir\...
Creates a ZIP file and adds all files in a directory and all it's sub directories to the archive. Only entries are added that comply to the file filter. @param srcDir Directory to add - Cannot be <code>null</code> and must be a valid directory. @param filter Filter or <code>null</code> for all files/directories. @para...
[ "Creates", "a", "ZIP", "file", "and", "adds", "all", "files", "in", "a", "directory", "and", "all", "it", "s", "sub", "directories", "to", "the", "archive", ".", "Only", "entries", "are", "added", "that", "comply", "to", "the", "file", "filter", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/Utils4J.java#L1379-L1389
JetBrains/xodus
vfs/src/main/java/jetbrains/exodus/vfs/VirtualFileSystem.java
VirtualFileSystem.writeFile
public OutputStream writeFile(@NotNull final Transaction txn, @NotNull final File file) { """ Returns {@linkplain OutputStream} to write the contents of the specified file from the beginning. @param txn {@linkplain Transaction} instance @param file {@linkplain File} instance @return {@linkplain OutputStream}...
java
public OutputStream writeFile(@NotNull final Transaction txn, @NotNull final File file) { return new VfsOutputStream(this, txn, file.getDescriptor(), new LastModifiedTrigger(txn, file, pathnames)); }
[ "public", "OutputStream", "writeFile", "(", "@", "NotNull", "final", "Transaction", "txn", ",", "@", "NotNull", "final", "File", "file", ")", "{", "return", "new", "VfsOutputStream", "(", "this", ",", "txn", ",", "file", ".", "getDescriptor", "(", ")", ","...
Returns {@linkplain OutputStream} to write the contents of the specified file from the beginning. @param txn {@linkplain Transaction} instance @param file {@linkplain File} instance @return {@linkplain OutputStream} to write the contents of the specified file from the beginning @see #readFile(Transaction, File) @see ...
[ "Returns", "{", "@linkplain", "OutputStream", "}", "to", "write", "the", "contents", "of", "the", "specified", "file", "from", "the", "beginning", "." ]
train
https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/vfs/src/main/java/jetbrains/exodus/vfs/VirtualFileSystem.java#L494-L496
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
Task.loadAndInstantiateInvokable
private static AbstractInvokable loadAndInstantiateInvokable( ClassLoader classLoader, String className, Environment environment) throws Throwable { """ Instantiates the given task invokable class, passing the given environment (and possibly the initial task state) to the task's constructor. <p>The metho...
java
private static AbstractInvokable loadAndInstantiateInvokable( ClassLoader classLoader, String className, Environment environment) throws Throwable { final Class<? extends AbstractInvokable> invokableClass; try { invokableClass = Class.forName(className, true, classLoader) .asSubclass(AbstractInvokable...
[ "private", "static", "AbstractInvokable", "loadAndInstantiateInvokable", "(", "ClassLoader", "classLoader", ",", "String", "className", ",", "Environment", "environment", ")", "throws", "Throwable", "{", "final", "Class", "<", "?", "extends", "AbstractInvokable", ">", ...
Instantiates the given task invokable class, passing the given environment (and possibly the initial task state) to the task's constructor. <p>The method will first try to instantiate the task via a constructor accepting both the Environment and the TaskStateSnapshot. If no such constructor exists, and there is no ini...
[ "Instantiates", "the", "given", "task", "invokable", "class", "passing", "the", "given", "environment", "(", "and", "possibly", "the", "initial", "task", "state", ")", "to", "the", "task", "s", "constructor", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java#L1410-L1441
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/Transaction.java
Transaction.setBlockAppearance
public void setBlockAppearance(StoredBlock block, boolean bestChain, int relativityOffset) { """ <p>Puts the given block in the internal set of blocks in which this transaction appears. This is used by the wallet to ensure transactions that appear on side chains are recorded properly even though the block stores...
java
public void setBlockAppearance(StoredBlock block, boolean bestChain, int relativityOffset) { long blockTime = block.getHeader().getTimeSeconds() * 1000; if (bestChain && (updatedAt == null || updatedAt.getTime() == 0 || updatedAt.getTime() > blockTime)) { updatedAt = new Date(blockTime); ...
[ "public", "void", "setBlockAppearance", "(", "StoredBlock", "block", ",", "boolean", "bestChain", ",", "int", "relativityOffset", ")", "{", "long", "blockTime", "=", "block", ".", "getHeader", "(", ")", ".", "getTimeSeconds", "(", ")", "*", "1000", ";", "if"...
<p>Puts the given block in the internal set of blocks in which this transaction appears. This is used by the wallet to ensure transactions that appear on side chains are recorded properly even though the block stores do not save the transaction data at all.</p> <p>If there is a re-org this will be called once for each...
[ "<p", ">", "Puts", "the", "given", "block", "in", "the", "internal", "set", "of", "blocks", "in", "which", "this", "transaction", "appears", ".", "This", "is", "used", "by", "the", "wallet", "to", "ensure", "transactions", "that", "appear", "on", "side", ...
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/Transaction.java#L394-L407
facebook/fresco
imagepipeline-base/src/main/java/com/facebook/cache/disk/ScoreBasedEvictionComparatorSupplier.java
ScoreBasedEvictionComparatorSupplier.calculateScore
@VisibleForTesting float calculateScore(DiskStorage.Entry entry, long now) { """ Calculates an eviction score. Entries with a higher eviction score should be evicted first. """ long ageMs = now - entry.getTimestamp(); long bytes = entry.getSize(); return mAgeWeight * ageMs + mSizeWeight * byte...
java
@VisibleForTesting float calculateScore(DiskStorage.Entry entry, long now) { long ageMs = now - entry.getTimestamp(); long bytes = entry.getSize(); return mAgeWeight * ageMs + mSizeWeight * bytes; }
[ "@", "VisibleForTesting", "float", "calculateScore", "(", "DiskStorage", ".", "Entry", "entry", ",", "long", "now", ")", "{", "long", "ageMs", "=", "now", "-", "entry", ".", "getTimestamp", "(", ")", ";", "long", "bytes", "=", "entry", ".", "getSize", "(...
Calculates an eviction score. Entries with a higher eviction score should be evicted first.
[ "Calculates", "an", "eviction", "score", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/cache/disk/ScoreBasedEvictionComparatorSupplier.java#L48-L53
meertensinstituut/mtas
src/main/java/mtas/codec/util/CodecInfo.java
CodecInfo.getNumberOfTokens
public Integer getNumberOfTokens(String field, int docId) { """ Gets the number of tokens. @param field the field @param docId the doc id @return the number of tokens """ if (fieldReferences.containsKey(field)) { IndexDoc doc = getDoc(field, docId); if (doc != null) { return doc....
java
public Integer getNumberOfTokens(String field, int docId) { if (fieldReferences.containsKey(field)) { IndexDoc doc = getDoc(field, docId); if (doc != null) { return doc.size; } } return null; }
[ "public", "Integer", "getNumberOfTokens", "(", "String", "field", ",", "int", "docId", ")", "{", "if", "(", "fieldReferences", ".", "containsKey", "(", "field", ")", ")", "{", "IndexDoc", "doc", "=", "getDoc", "(", "field", ",", "docId", ")", ";", "if", ...
Gets the number of tokens. @param field the field @param docId the doc id @return the number of tokens
[ "Gets", "the", "number", "of", "tokens", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/util/CodecInfo.java#L690-L698
sailthru/sailthru-java-client
src/main/com/sailthru/client/SailthruClient.java
SailthruClient.scheduleBlastFromTemplate
public JsonResponse scheduleBlastFromTemplate(String template, String list, Date scheduleTime, Blast blast) throws IOException { """ Schedule a mass mail from a template @param template template name @param list list name @param scheduleTime schedule time for the blast @param blast Blast Object @throws IOExce...
java
public JsonResponse scheduleBlastFromTemplate(String template, String list, Date scheduleTime, Blast blast) throws IOException { blast.setCopyTemplate(template); blast.setList(list); blast.setScheduleTime(scheduleTime); return apiPost(blast); }
[ "public", "JsonResponse", "scheduleBlastFromTemplate", "(", "String", "template", ",", "String", "list", ",", "Date", "scheduleTime", ",", "Blast", "blast", ")", "throws", "IOException", "{", "blast", ".", "setCopyTemplate", "(", "template", ")", ";", "blast", "...
Schedule a mass mail from a template @param template template name @param list list name @param scheduleTime schedule time for the blast @param blast Blast Object @throws IOException
[ "Schedule", "a", "mass", "mail", "from", "a", "template" ]
train
https://github.com/sailthru/sailthru-java-client/blob/62b491f6a39b41b836bfc021779200d29b6d2069/src/main/com/sailthru/client/SailthruClient.java#L179-L184
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsClientStringUtil.java
CmsClientStringUtil.getStackTraceAsString
public static String getStackTraceAsString(StackTraceElement[] trace, String separator) { """ Returns the stack trace as a string.<p> @param trace the stack trace @param separator the separator between the lines of the stack trace @return a string representing a stack trace """ String result = ...
java
public static String getStackTraceAsString(StackTraceElement[] trace, String separator) { String result = ""; for (StackTraceElement elem : trace) { result += elem.toString(); result += separator; } return result; }
[ "public", "static", "String", "getStackTraceAsString", "(", "StackTraceElement", "[", "]", "trace", ",", "String", "separator", ")", "{", "String", "result", "=", "\"\"", ";", "for", "(", "StackTraceElement", "elem", ":", "trace", ")", "{", "result", "+=", "...
Returns the stack trace as a string.<p> @param trace the stack trace @param separator the separator between the lines of the stack trace @return a string representing a stack trace
[ "Returns", "the", "stack", "trace", "as", "a", "string", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsClientStringUtil.java#L119-L127
eclipse/xtext-core
org.eclipse.xtext/src/org/eclipse/xtext/documentation/impl/MultiLineJavaDocTypeReferenceProvider.java
MultiLineJavaDocTypeReferenceProvider.computeRegions
@Deprecated protected void computeRegions(List<ReplaceRegion> regions, Iterable<ILeafNode> leafNodes, String toSearch, String end, String optionalEnd, String optionalEnd2) { """ Computes regions between a given string to search and different ends searched by their precedence @param regions - List to put new re...
java
@Deprecated protected void computeRegions(List<ReplaceRegion> regions, Iterable<ILeafNode> leafNodes, String toSearch, String end, String optionalEnd, String optionalEnd2) { computeRegions(regions, leafNodes, toSearch, new String[]{end, optionalEnd, optionalEnd2}); }
[ "@", "Deprecated", "protected", "void", "computeRegions", "(", "List", "<", "ReplaceRegion", ">", "regions", ",", "Iterable", "<", "ILeafNode", ">", "leafNodes", ",", "String", "toSearch", ",", "String", "end", ",", "String", "optionalEnd", ",", "String", "opt...
Computes regions between a given string to search and different ends searched by their precedence @param regions - List to put new regions in @param leafNodes - nodes to search in @param toSearch - String to search @param end - end with highest precedence @param optionalEnd - end with lower precedence @param optionalE...
[ "Computes", "regions", "between", "a", "given", "string", "to", "search", "and", "different", "ends", "searched", "by", "their", "precedence" ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/documentation/impl/MultiLineJavaDocTypeReferenceProvider.java#L114-L117
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/AppsImpl.java
AppsImpl.publishAsync
public Observable<ProductionOrStagingEndpointInfo> publishAsync(UUID appId, ApplicationPublishObject applicationPublishObject) { """ Publishes a specific version of the application. @param appId The application ID. @param applicationPublishObject The application publish object. The region is the target region ...
java
public Observable<ProductionOrStagingEndpointInfo> publishAsync(UUID appId, ApplicationPublishObject applicationPublishObject) { return publishWithServiceResponseAsync(appId, applicationPublishObject).map(new Func1<ServiceResponse<ProductionOrStagingEndpointInfo>, ProductionOrStagingEndpointInfo>() { ...
[ "public", "Observable", "<", "ProductionOrStagingEndpointInfo", ">", "publishAsync", "(", "UUID", "appId", ",", "ApplicationPublishObject", "applicationPublishObject", ")", "{", "return", "publishWithServiceResponseAsync", "(", "appId", ",", "applicationPublishObject", ")", ...
Publishes a specific version of the application. @param appId The application ID. @param applicationPublishObject The application publish object. The region is the target region that the application is published to. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the...
[ "Publishes", "a", "specific", "version", "of", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/AppsImpl.java#L1172-L1179
kaazing/gateway
service/spi/src/main/java/org/kaazing/gateway/service/util/ServiceUtils.java
ServiceUtils.getOptionalDataSizeProperty
public static int getOptionalDataSizeProperty(ServiceProperties properties, String propertyName, int defaultValue) { """ Get a property which is a number of bytes expressed either as an integer (number of bytes) or an integer followed by K (number of kilobytes) or an integer followed by M (for megabytes). Example...
java
public static int getOptionalDataSizeProperty(ServiceProperties properties, String propertyName, int defaultValue) { String value = getOptionalProperty(properties, propertyName, Integer.toString(defaultValue)); return Utils.parseDataSize(value); }
[ "public", "static", "int", "getOptionalDataSizeProperty", "(", "ServiceProperties", "properties", ",", "String", "propertyName", ",", "int", "defaultValue", ")", "{", "String", "value", "=", "getOptionalProperty", "(", "properties", ",", "propertyName", ",", "Integer"...
Get a property which is a number of bytes expressed either as an integer (number of bytes) or an integer followed by K (number of kilobytes) or an integer followed by M (for megabytes). Examples: 1048, 64k, 10M
[ "Get", "a", "property", "which", "is", "a", "number", "of", "bytes", "expressed", "either", "as", "an", "integer", "(", "number", "of", "bytes", ")", "or", "an", "integer", "followed", "by", "K", "(", "number", "of", "kilobytes", ")", "or", "an", "inte...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/service/spi/src/main/java/org/kaazing/gateway/service/util/ServiceUtils.java#L65-L68
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/QueryFactory.java
QueryFactory.addCriteriaForOjbConcreteClasses
private static Criteria addCriteriaForOjbConcreteClasses(ClassDescriptor cld, Criteria crit) { """ Searches the class descriptor for the ojbConcrete class attribute if it finds the concrete class attribute, append a where clause which specifies we can load all classes that are this type or extents of this type. ...
java
private static Criteria addCriteriaForOjbConcreteClasses(ClassDescriptor cld, Criteria crit) { /** * 1. check if this class has a ojbConcreteClass attribute */ Criteria concreteClassDiscriminator = null; Collection classes = getExtentClasses(cld); /** ...
[ "private", "static", "Criteria", "addCriteriaForOjbConcreteClasses", "(", "ClassDescriptor", "cld", ",", "Criteria", "crit", ")", "{", "/**\r\n * 1. check if this class has a ojbConcreteClass attribute\r\n */", "Criteria", "concreteClassDiscriminator", "=", "null", ...
Searches the class descriptor for the ojbConcrete class attribute if it finds the concrete class attribute, append a where clause which specifies we can load all classes that are this type or extents of this type. @param cld @param crit @return the passed in Criteria object + optionally and'ed criteria with OR'd class ...
[ "Searches", "the", "class", "descriptor", "for", "the", "ojbConcrete", "class", "attribute", "if", "it", "finds", "the", "concrete", "class", "attribute", "append", "a", "where", "clause", "which", "specifies", "we", "can", "load", "all", "classes", "that", "a...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/QueryFactory.java#L216-L263
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/serialization/OBase64Utils.java
OBase64Utils.encodeBytes
public static StringBuilder encodeBytes(final StringBuilder iOutput, final byte[] source) { """ Encodes a byte array into Base64 notation. Does not GZip-compress data. @param source The data to convert @return The data in Base64-encoded form @throws NullPointerException if source array is null @since 1.4 ...
java
public static StringBuilder encodeBytes(final StringBuilder iOutput, final byte[] source) { if (source != null) { // Since we're not going to have the GZIP encoding turned on, // we're not going to have an java.io.IOException thrown, so // we should not force the user to have to catch it. try { ...
[ "public", "static", "StringBuilder", "encodeBytes", "(", "final", "StringBuilder", "iOutput", ",", "final", "byte", "[", "]", "source", ")", "{", "if", "(", "source", "!=", "null", ")", "{", "// Since we're not going to have the GZIP encoding turned on,\r", "// we're ...
Encodes a byte array into Base64 notation. Does not GZip-compress data. @param source The data to convert @return The data in Base64-encoded form @throws NullPointerException if source array is null @since 1.4
[ "Encodes", "a", "byte", "array", "into", "Base64", "notation", ".", "Does", "not", "GZip", "-", "compress", "data", "." ]
train
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/serialization/OBase64Utils.java#L646-L658
bartprokop/rxtx
src/main/java/name/prokop/bart/rxtx/Demo1.java
Demo1.getSerialPort
public static SerialPort getSerialPort(String portName) throws IOException { """ Zwraca <b>otwarty</b> port szeregowy o zadanej nazwie @return Zwraca port szeregowy o zadanej nazwie @param portName Nazwa portu @throws IOException W przypadku, gdy nie uda�o si� otworzy� portu szeregowego, wraz z opisem. "...
java
public static SerialPort getSerialPort(String portName) throws IOException { try { CommPortIdentifier portId = CommPortIdentifier.getPortIdentifier(portName); //Enumeration portList = CommPortIdentifier.getPortIdentifiers(); if (portId.getPortType() == CommPortIdentifier....
[ "public", "static", "SerialPort", "getSerialPort", "(", "String", "portName", ")", "throws", "IOException", "{", "try", "{", "CommPortIdentifier", "portId", "=", "CommPortIdentifier", ".", "getPortIdentifier", "(", "portName", ")", ";", "//Enumeration portList = CommPor...
Zwraca <b>otwarty</b> port szeregowy o zadanej nazwie @return Zwraca port szeregowy o zadanej nazwie @param portName Nazwa portu @throws IOException W przypadku, gdy nie uda�o si� otworzy� portu szeregowego, wraz z opisem.
[ "Zwraca", "<b", ">", "otwarty<", "/", "b", ">", "port", "szeregowy", "o", "zadanej", "nazwie" ]
train
https://github.com/bartprokop/rxtx/blob/7b2c7857c262743e9dd15e9779c880b93c650890/src/main/java/name/prokop/bart/rxtx/Demo1.java#L148-L164
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfPKCS7.java
PdfPKCS7.verifyTimestampCertificates
public static boolean verifyTimestampCertificates(TimeStampToken ts, KeyStore keystore, String provider) { """ Verifies a timestamp against a KeyStore. @param ts the timestamp @param keystore the <CODE>KeyStore</CODE> @param provider the provider or <CODE>null</CODE> to use the BouncyCastle provider @return <C...
java
public static boolean verifyTimestampCertificates(TimeStampToken ts, KeyStore keystore, String provider) { if (provider == null) provider = "BC"; try { for (Enumeration aliases = keystore.aliases(); aliases.hasMoreElements();) { try { String al...
[ "public", "static", "boolean", "verifyTimestampCertificates", "(", "TimeStampToken", "ts", ",", "KeyStore", "keystore", ",", "String", "provider", ")", "{", "if", "(", "provider", "==", "null", ")", "provider", "=", "\"BC\"", ";", "try", "{", "for", "(", "En...
Verifies a timestamp against a KeyStore. @param ts the timestamp @param keystore the <CODE>KeyStore</CODE> @param provider the provider or <CODE>null</CODE> to use the BouncyCastle provider @return <CODE>true</CODE> is a certificate was found @since 2.1.6
[ "Verifies", "a", "timestamp", "against", "a", "KeyStore", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfPKCS7.java#L934-L955
CenturyLinkCloud/mdw
mdw-workflow/assets/com/centurylink/mdw/drools/RulesBasedStrategy.java
RulesBasedStrategy.getClassLoader
public ClassLoader getClassLoader() throws StrategyException { """ <p> By default returns the package CloudClassloader The knowledge based name is of the format "packageName/assetName", e.g "com.centurylink.mdw.test/TestDroolsRules.drl" If an application needs a different class loader for Strategies then this m...
java
public ClassLoader getClassLoader() throws StrategyException { // Determine the package by parsing the attribute name (different name for different types of Rules based strategies) String kbAttributeName = getKnowledgeBaseAttributeName(); Object kbName = getParameter(kbAttributeName); i...
[ "public", "ClassLoader", "getClassLoader", "(", ")", "throws", "StrategyException", "{", "// Determine the package by parsing the attribute name (different name for different types of Rules based strategies)", "String", "kbAttributeName", "=", "getKnowledgeBaseAttributeName", "(", ")", ...
<p> By default returns the package CloudClassloader The knowledge based name is of the format "packageName/assetName", e.g "com.centurylink.mdw.test/TestDroolsRules.drl" If an application needs a different class loader for Strategies then this method should be overridden </p> @return Class Loader used for Knowledge bas...
[ "<p", ">", "By", "default", "returns", "the", "package", "CloudClassloader", "The", "knowledge", "based", "name", "is", "of", "the", "format", "packageName", "/", "assetName", "e", ".", "g", "com", ".", "centurylink", ".", "mdw", ".", "test", "/", "TestDro...
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-workflow/assets/com/centurylink/mdw/drools/RulesBasedStrategy.java#L73-L96
adyliu/jafka
src/main/java/io/jafka/producer/ZKBrokerPartitionInfo.java
ZKBrokerPartitionInfo.getBrokerPartitions
private static SortedSet<Partition> getBrokerPartitions(ZkClient zkClient, String topic, List<?> brokerList) { """ Generate a mapping from broker id to (brokerId, numPartitions) for the list of brokers specified @param topic the topic to which the brokers have registered @param brokerList the list of brokers ...
java
private static SortedSet<Partition> getBrokerPartitions(ZkClient zkClient, String topic, List<?> brokerList) { final String brokerTopicPath = ZkUtils.BrokerTopicsPath + "/" + topic; final SortedSet<Partition> brokerParts = new TreeSet<Partition>(); for (Object brokerId : brokerList) { ...
[ "private", "static", "SortedSet", "<", "Partition", ">", "getBrokerPartitions", "(", "ZkClient", "zkClient", ",", "String", "topic", ",", "List", "<", "?", ">", "brokerList", ")", "{", "final", "String", "brokerTopicPath", "=", "ZkUtils", ".", "BrokerTopicsPath"...
Generate a mapping from broker id to (brokerId, numPartitions) for the list of brokers specified @param topic the topic to which the brokers have registered @param brokerList the list of brokers for which the partitions info is to be generated @return a sequence of (brokerId, numPartitions) for brokers in brokerList
[ "Generate", "a", "mapping", "from", "broker", "id", "to", "(", "brokerId", "numPartitions", ")", "for", "the", "list", "of", "brokers", "specified" ]
train
https://github.com/adyliu/jafka/blob/cc14d2ed60c039b12d7b106bb5269ef21d0add7e/src/main/java/io/jafka/producer/ZKBrokerPartitionInfo.java#L351-L362
inkstand-io/scribble
scribble-inject/src/main/java/io/inkstand/scribble/inject/TypeUtil.java
TypeUtil.valueOf
private static Object valueOf(final String value, final Class<?> objectType) { """ Converts the given String value to a object type. The method assumes the object type has a constructor accepting a single String representation of the content. @param objectType the object type that MUST have a single String co...
java
private static Object valueOf(final String value, final Class<?> objectType) { if (objectType == Character.class) { return value.charAt(0); } try { final Constructor<?> constructor = objectType.getConstructor(String.class); return constructor.newInstance(val...
[ "private", "static", "Object", "valueOf", "(", "final", "String", "value", ",", "final", "Class", "<", "?", ">", "objectType", ")", "{", "if", "(", "objectType", "==", "Character", ".", "class", ")", "{", "return", "value", ".", "charAt", "(", "0", ")"...
Converts the given String value to a object type. The method assumes the object type has a constructor accepting a single String representation of the content. @param objectType the object type that MUST have a single String constructor, which is the case for any any primitive type. @param value the value as a string ...
[ "Converts", "the", "given", "String", "value", "to", "a", "object", "type", ".", "The", "method", "assumes", "the", "object", "type", "has", "a", "constructor", "accepting", "a", "single", "String", "representation", "of", "the", "content", "." ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-inject/src/main/java/io/inkstand/scribble/inject/TypeUtil.java#L156-L173
radkovo/jStyleParser
src/main/java/cz/vutbr/web/domassign/DeclarationTransformerImpl.java
DeclarationTransformerImpl.genericOneIdent
protected <T extends CSSProperty> boolean genericOneIdent(Class<T> type, Declaration d, Map<String, CSSProperty> properties) { """ Processes declaration which is supposed to contain one identification term @param <T> Type of CSSProperty @param type Class of CSSProperty to be stored @param d Declaration...
java
protected <T extends CSSProperty> boolean genericOneIdent(Class<T> type, Declaration d, Map<String, CSSProperty> properties) { if (d.size() != 1) return false; return genericTermIdent(type, d.get(0), ALLOW_INH, d.getProperty(), properties); }
[ "protected", "<", "T", "extends", "CSSProperty", ">", "boolean", "genericOneIdent", "(", "Class", "<", "T", ">", "type", ",", "Declaration", "d", ",", "Map", "<", "String", ",", "CSSProperty", ">", "properties", ")", "{", "if", "(", "d", ".", "size", "...
Processes declaration which is supposed to contain one identification term @param <T> Type of CSSProperty @param type Class of CSSProperty to be stored @param d Declaration to be parsed @param properties Properties map where to store enum @return <code>true</code> in case of success, <code>false</code> elsewhere
[ "Processes", "declaration", "which", "is", "supposed", "to", "contain", "one", "identification", "term" ]
train
https://github.com/radkovo/jStyleParser/blob/8ab049ac6866aa52c4d7deee25c9e294e7191957/src/main/java/cz/vutbr/web/domassign/DeclarationTransformerImpl.java#L452-L460
googleapis/google-cloud-java
google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java
CloudTasksClient.createQueue
public final Queue createQueue(LocationName parent, Queue queue) { """ Creates a queue. <p>Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. <p>WARNING: Using this method may hav...
java
public final Queue createQueue(LocationName parent, Queue queue) { CreateQueueRequest request = CreateQueueRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setQueue(queue) .build(); return createQueue(request); }
[ "public", "final", "Queue", "createQueue", "(", "LocationName", "parent", ",", "Queue", "queue", ")", "{", "CreateQueueRequest", "request", "=", "CreateQueueRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "parent", "==", "null", "?", "null", ":",...
Creates a queue. <p>Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. <p>WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.x...
[ "Creates", "a", "queue", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2/CloudTasksClient.java#L427-L435
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/QueryLoader.java
QueryLoader.loadMemento
public QueryMemento loadMemento() { """ The memento contains a JSON representation of the query as well as a Java-DSL like string representation. @return """ IDBAccess dbAccess = ((IIntDomainAccess)this.domainAccess).getInternalDomainAccess().getDBAccess(); String qLabel = ((IIntDomainAccess)this.domainAc...
java
public QueryMemento loadMemento() { IDBAccess dbAccess = ((IIntDomainAccess)this.domainAccess).getInternalDomainAccess().getDBAccess(); String qLabel = ((IIntDomainAccess)this.domainAccess).getInternalDomainAccess().getDomainLabel() .concat(QueryPersistor.Q_LABEL_POSTFIX); JcNode n = new JcNode("n"); ICl...
[ "public", "QueryMemento", "loadMemento", "(", ")", "{", "IDBAccess", "dbAccess", "=", "(", "(", "IIntDomainAccess", ")", "this", ".", "domainAccess", ")", ".", "getInternalDomainAccess", "(", ")", ".", "getDBAccess", "(", ")", ";", "String", "qLabel", "=", "...
The memento contains a JSON representation of the query as well as a Java-DSL like string representation. @return
[ "The", "memento", "contains", "a", "JSON", "representation", "of", "the", "query", "as", "well", "as", "a", "Java", "-", "DSL", "like", "string", "representation", "." ]
train
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/QueryLoader.java#L79-L106
JDBDT/jdbdt
src/main/java/org/jdbdt/DataSource.java
DataSource.theEmptySet
final DataSet theEmptySet() { """ Return an empty, read-only data set, for use by {@link JDBDT#empty(DataSource)} @return Empty, read-only data set. """ if (theEmptyOne == null) { theEmptyOne = new DataSet(this, EMPTY_ROW_LIST); theEmptyOne.setReadOnly(); } return theEmptyOne; }
java
final DataSet theEmptySet() { if (theEmptyOne == null) { theEmptyOne = new DataSet(this, EMPTY_ROW_LIST); theEmptyOne.setReadOnly(); } return theEmptyOne; }
[ "final", "DataSet", "theEmptySet", "(", ")", "{", "if", "(", "theEmptyOne", "==", "null", ")", "{", "theEmptyOne", "=", "new", "DataSet", "(", "this", ",", "EMPTY_ROW_LIST", ")", ";", "theEmptyOne", ".", "setReadOnly", "(", ")", ";", "}", "return", "theE...
Return an empty, read-only data set, for use by {@link JDBDT#empty(DataSource)} @return Empty, read-only data set.
[ "Return", "an", "empty", "read", "-", "only", "data", "set", "for", "use", "by", "{" ]
train
https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/DataSource.java#L188-L194
jenkinsci/jenkins
core/src/main/java/hudson/views/ListViewColumn.java
ListViewColumn.createDefaultInitialColumnList
public static List<ListViewColumn> createDefaultInitialColumnList(Class<? extends View> context) { """ Creates the list of {@link ListViewColumn}s to be used for newly created {@link ListView}s and their likes. @see ListView#initColumns() @since 2.37 """ return createDefaultInitialColumnList(Descri...
java
public static List<ListViewColumn> createDefaultInitialColumnList(Class<? extends View> context) { return createDefaultInitialColumnList(DescriptorVisibilityFilter.applyType(context, ListViewColumn.all())); }
[ "public", "static", "List", "<", "ListViewColumn", ">", "createDefaultInitialColumnList", "(", "Class", "<", "?", "extends", "View", ">", "context", ")", "{", "return", "createDefaultInitialColumnList", "(", "DescriptorVisibilityFilter", ".", "applyType", "(", "contex...
Creates the list of {@link ListViewColumn}s to be used for newly created {@link ListView}s and their likes. @see ListView#initColumns() @since 2.37
[ "Creates", "the", "list", "of", "{", "@link", "ListViewColumn", "}", "s", "to", "be", "used", "for", "newly", "created", "{", "@link", "ListView", "}", "s", "and", "their", "likes", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/views/ListViewColumn.java#L138-L140
apache/groovy
subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java
SwingGroovyMethods.getAt
public static AbstractButton getAt(ButtonGroup self, int index) { """ Support the subscript operator for ButtonGroup. @param self a ButtonGroup @param index the index of the AbstractButton to get @return the button at the given index @since 1.6.4 """ int size = self.getButtonCount(); if ...
java
public static AbstractButton getAt(ButtonGroup self, int index) { int size = self.getButtonCount(); if (index < 0 || index >= size) return null; Enumeration buttons = self.getElements(); for (int i = 0; i <= index; i++) { AbstractButton b = (AbstractButton) buttons.nextElemen...
[ "public", "static", "AbstractButton", "getAt", "(", "ButtonGroup", "self", ",", "int", "index", ")", "{", "int", "size", "=", "self", ".", "getButtonCount", "(", ")", ";", "if", "(", "index", "<", "0", "||", "index", ">=", "size", ")", "return", "null"...
Support the subscript operator for ButtonGroup. @param self a ButtonGroup @param index the index of the AbstractButton to get @return the button at the given index @since 1.6.4
[ "Support", "the", "subscript", "operator", "for", "ButtonGroup", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java#L121-L130
cantrowitz/RxBroadcast
rxbroadcast/src/main/java/com/cantrowitz/rxbroadcast/RxBroadcast.java
RxBroadcast.fromBroadcast
public static Observable<Intent> fromBroadcast(Context context, IntentFilter intentFilter) { """ Create {@link Observable} that wraps {@link BroadcastReceiver} and emits received intents. @param context the context the {@link BroadcastReceiver} will be created from @param intentFilter the filter for the p...
java
public static Observable<Intent> fromBroadcast(Context context, IntentFilter intentFilter) { return fromBroadcast(context, intentFilter, NO_OP_ORDERED_BROADCAST_STRATEGY); }
[ "public", "static", "Observable", "<", "Intent", ">", "fromBroadcast", "(", "Context", "context", ",", "IntentFilter", "intentFilter", ")", "{", "return", "fromBroadcast", "(", "context", ",", "intentFilter", ",", "NO_OP_ORDERED_BROADCAST_STRATEGY", ")", ";", "}" ]
Create {@link Observable} that wraps {@link BroadcastReceiver} and emits received intents. @param context the context the {@link BroadcastReceiver} will be created from @param intentFilter the filter for the particular intent @return {@link Observable} of {@link Intent} that matches the filter
[ "Create", "{", "@link", "Observable", "}", "that", "wraps", "{", "@link", "BroadcastReceiver", "}", "and", "emits", "received", "intents", "." ]
train
https://github.com/cantrowitz/RxBroadcast/blob/8b479d0e28617e9b86fa4d462c6675c131b0c5d0/rxbroadcast/src/main/java/com/cantrowitz/rxbroadcast/RxBroadcast.java#L41-L43
bazaarvoice/ostrich
core/src/main/java/com/bazaarvoice/ostrich/pool/ServicePoolBuilder.java
ServicePoolBuilder.withHostDiscoverySource
public ServicePoolBuilder<S> withHostDiscoverySource(HostDiscoverySource hostDiscoverySource) { """ Adds a {@link HostDiscoverySource} instance to the builder. Multiple instances of {@code HostDiscoverySource} may be specified. The service pool will query the sources in the order they were registered and use th...
java
public ServicePoolBuilder<S> withHostDiscoverySource(HostDiscoverySource hostDiscoverySource) { checkNotNull(hostDiscoverySource); return withHostDiscovery(hostDiscoverySource, true); }
[ "public", "ServicePoolBuilder", "<", "S", ">", "withHostDiscoverySource", "(", "HostDiscoverySource", "hostDiscoverySource", ")", "{", "checkNotNull", "(", "hostDiscoverySource", ")", ";", "return", "withHostDiscovery", "(", "hostDiscoverySource", ",", "true", ")", ";",...
Adds a {@link HostDiscoverySource} instance to the builder. Multiple instances of {@code HostDiscoverySource} may be specified. The service pool will query the sources in the order they were registered and use the first non-null {@link HostDiscovery} returned for the service name provided by the {@link ServiceFactory...
[ "Adds", "a", "{", "@link", "HostDiscoverySource", "}", "instance", "to", "the", "builder", ".", "Multiple", "instances", "of", "{", "@code", "HostDiscoverySource", "}", "may", "be", "specified", ".", "The", "service", "pool", "will", "query", "the", "sources",...
train
https://github.com/bazaarvoice/ostrich/blob/13591867870ab23445253f11fc872662a8028191/core/src/main/java/com/bazaarvoice/ostrich/pool/ServicePoolBuilder.java#L75-L78
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.findNearby
public <P extends ParaObject> List<P> findNearby(String type, String query, int radius, double lat, double lng, Pager... pager) { """ Search for {@link com.erudika.para.core.Address} objects in a radius of X km from a given point. @param <P> type of the object @param type the type of object to search for. See...
java
public <P extends ParaObject> List<P> findNearby(String type, String query, int radius, double lat, double lng, Pager... pager) { MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); params.putSingle("latlng", lat + "," + lng); params.putSingle("radius", Integer.toString(radius)); params.putSi...
[ "public", "<", "P", "extends", "ParaObject", ">", "List", "<", "P", ">", "findNearby", "(", "String", "type", ",", "String", "query", ",", "int", "radius", ",", "double", "lat", ",", "double", "lng", ",", "Pager", "...", "pager", ")", "{", "Multivalued...
Search for {@link com.erudika.para.core.Address} objects in a radius of X km from a given point. @param <P> type of the object @param type the type of object to search for. See {@link com.erudika.para.core.ParaObject#getType()} @param query the query string @param radius the radius of the search circle @param lat latit...
[ "Search", "for", "{" ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L688-L697
meertensinstituut/mtas
src/main/java/mtas/codec/payload/MtasBitOutputStream.java
MtasBitOutputStream.writeBit
public void writeBit(int value, int number) throws IOException { """ Write bit. @param value the value @param number the number @throws IOException Signals that an I/O exception has occurred. """ int localNumber = number; while (localNumber > 0) { localNumber--; bitBuffer |= ((value & ...
java
public void writeBit(int value, int number) throws IOException { int localNumber = number; while (localNumber > 0) { localNumber--; bitBuffer |= ((value & 1) << bitCount++); if (bitCount == 8) { createByte(); } } }
[ "public", "void", "writeBit", "(", "int", "value", ",", "int", "number", ")", "throws", "IOException", "{", "int", "localNumber", "=", "number", ";", "while", "(", "localNumber", ">", "0", ")", "{", "localNumber", "--", ";", "bitBuffer", "|=", "(", "(", ...
Write bit. @param value the value @param number the number @throws IOException Signals that an I/O exception has occurred.
[ "Write", "bit", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/codec/payload/MtasBitOutputStream.java#L41-L50
wso2/transport-http
components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/states/Http2StateUtil.java
Http2StateUtil.setupCarbonRequest
public static HttpCarbonRequest setupCarbonRequest(HttpRequest httpRequest, Http2SourceHandler http2SourceHandler) { """ Creates a {@code HttpCarbonRequest} from HttpRequest. @param httpRequest the HTTPRequest message @param http2SourceHandler the HTTP/2 source handler @return the CarbonRequest Message...
java
public static HttpCarbonRequest setupCarbonRequest(HttpRequest httpRequest, Http2SourceHandler http2SourceHandler) { ChannelHandlerContext ctx = http2SourceHandler.getChannelHandlerContext(); HttpCarbonRequest sourceReqCMsg = new HttpCarbonRequest(httpRequest, new DefaultListener(ctx)); sourceRe...
[ "public", "static", "HttpCarbonRequest", "setupCarbonRequest", "(", "HttpRequest", "httpRequest", ",", "Http2SourceHandler", "http2SourceHandler", ")", "{", "ChannelHandlerContext", "ctx", "=", "http2SourceHandler", ".", "getChannelHandlerContext", "(", ")", ";", "HttpCarbo...
Creates a {@code HttpCarbonRequest} from HttpRequest. @param httpRequest the HTTPRequest message @param http2SourceHandler the HTTP/2 source handler @return the CarbonRequest Message created from given HttpRequest
[ "Creates", "a", "{", "@code", "HttpCarbonRequest", "}", "from", "HttpRequest", "." ]
train
https://github.com/wso2/transport-http/blob/c51aa715b473db6c1b82a7d7b22f6e65f74df4c9/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/states/Http2StateUtil.java#L111-L134
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfAppearance.java
PdfAppearance.createAppearance
public static PdfAppearance createAppearance(PdfWriter writer, float width, float height) { """ Creates a new appearance to be used with form fields. @param writer the PdfWriter to use @param width the bounding box width @param height the bounding box height @return the appearance created """ ret...
java
public static PdfAppearance createAppearance(PdfWriter writer, float width, float height) { return createAppearance(writer, width, height, null); }
[ "public", "static", "PdfAppearance", "createAppearance", "(", "PdfWriter", "writer", ",", "float", "width", ",", "float", "height", ")", "{", "return", "createAppearance", "(", "writer", ",", "width", ",", "height", ",", "null", ")", ";", "}" ]
Creates a new appearance to be used with form fields. @param writer the PdfWriter to use @param width the bounding box width @param height the bounding box height @return the appearance created
[ "Creates", "a", "new", "appearance", "to", "be", "used", "with", "form", "fields", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfAppearance.java#L120-L122
sarl/sarl
docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java
Utils.qualifiedNameEquals
public static boolean qualifiedNameEquals(String s1, String s2) { """ Replies if the given qualified names are equal. <p>Because the Javadoc tool cannot create the fully qualified name, this function also test simple names. @param s1 the first string. @param s2 the first string. @return {@code true} if th...
java
public static boolean qualifiedNameEquals(String s1, String s2) { if (isNullOrEmpty(s1)) { return isNullOrEmpty(s2); } if (!s1.equals(s2)) { final String simple1 = simpleName(s1); final String simple2 = simpleName(s2); return simpleNameEquals(simple1, simple2); } return true; }
[ "public", "static", "boolean", "qualifiedNameEquals", "(", "String", "s1", ",", "String", "s2", ")", "{", "if", "(", "isNullOrEmpty", "(", "s1", ")", ")", "{", "return", "isNullOrEmpty", "(", "s2", ")", ";", "}", "if", "(", "!", "s1", ".", "equals", ...
Replies if the given qualified names are equal. <p>Because the Javadoc tool cannot create the fully qualified name, this function also test simple names. @param s1 the first string. @param s2 the first string. @return {@code true} if the strings are equal.
[ "Replies", "if", "the", "given", "qualified", "names", "are", "equal", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/docs/io.sarl.docs.doclet/src/main/java/io/sarl/docs/doclet/utils/Utils.java#L344-L354
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/client/DrpcRequestClient.java
DrpcRequestClient.createClient
protected DRPCClient createClient(String host, int port, int timeout) { """ DRPCClientを生成する。 @param host DRPCServerホスト @param port DRPCServerポート @param timeout DRPCタイムアウト(ミリ秒単位) @return DRPCClient """ return new DRPCClient(host, port, timeout); }
java
protected DRPCClient createClient(String host, int port, int timeout) { return new DRPCClient(host, port, timeout); }
[ "protected", "DRPCClient", "createClient", "(", "String", "host", ",", "int", "port", ",", "int", "timeout", ")", "{", "return", "new", "DRPCClient", "(", "host", ",", "port", ",", "timeout", ")", ";", "}" ]
DRPCClientを生成する。 @param host DRPCServerホスト @param port DRPCServerポート @param timeout DRPCタイムアウト(ミリ秒単位) @return DRPCClient
[ "DRPCClientを生成する。" ]
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/client/DrpcRequestClient.java#L168-L171
SteelBridgeLabs/neo4j-gremlin-bolt
src/main/java/com/steelbridgelabs/oss/neo4j/structure/Neo4JVertex.java
Neo4JVertex.matchPredicate
public String matchPredicate(String alias, String idParameterName) { """ Generates a Cypher MATCH predicate for the vertex, example: <p> alias.id = {id} AND (alias:Label1 OR alias:Label2) </p> @param alias The node alias. @param idParameterName The name of the parameter that contains the vertex id...
java
public String matchPredicate(String alias, String idParameterName) { Objects.requireNonNull(alias, "alias cannot be null"); Objects.requireNonNull(idParameterName, "idParameterName cannot be null"); // get partition Neo4JReadPartition partition = graph.getPartition(); // create m...
[ "public", "String", "matchPredicate", "(", "String", "alias", ",", "String", "idParameterName", ")", "{", "Objects", ".", "requireNonNull", "(", "alias", ",", "\"alias cannot be null\"", ")", ";", "Objects", ".", "requireNonNull", "(", "idParameterName", ",", "\"i...
Generates a Cypher MATCH predicate for the vertex, example: <p> alias.id = {id} AND (alias:Label1 OR alias:Label2) </p> @param alias The node alias. @param idParameterName The name of the parameter that contains the vertex id. @return the Cypher MATCH predicate or <code>null</code> if not required to MATCH t...
[ "Generates", "a", "Cypher", "MATCH", "predicate", "for", "the", "vertex", "example", ":", "<p", ">", "alias", ".", "id", "=", "{", "id", "}", "AND", "(", "alias", ":", "Label1", "OR", "alias", ":", "Label2", ")", "<", "/", "p", ">" ]
train
https://github.com/SteelBridgeLabs/neo4j-gremlin-bolt/blob/df3ab429e0c83affae6cd43d41edd90de80c032e/src/main/java/com/steelbridgelabs/oss/neo4j/structure/Neo4JVertex.java#L380-L387
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/CmsGalleryFactory.java
CmsGalleryFactory.createDialog
@SuppressWarnings("unused") public static CmsGalleryDialog createDialog(I_CmsGalleryHandler galleryHandler, CmsGalleryDataBean data) { """ Creates a new gallery dialog.<p> @param galleryHandler the gallery handler @param data the gallery data @return the gallery dialog instance """ CmsGalle...
java
@SuppressWarnings("unused") public static CmsGalleryDialog createDialog(I_CmsGalleryHandler galleryHandler, CmsGalleryDataBean data) { CmsGalleryDialog galleryDialog = new CmsGalleryDialog(galleryHandler); new CmsGalleryController(new CmsGalleryControllerHandler(galleryDialog), data, null); ...
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "static", "CmsGalleryDialog", "createDialog", "(", "I_CmsGalleryHandler", "galleryHandler", ",", "CmsGalleryDataBean", "data", ")", "{", "CmsGalleryDialog", "galleryDialog", "=", "new", "CmsGalleryDialog", "(", ...
Creates a new gallery dialog.<p> @param galleryHandler the gallery handler @param data the gallery data @return the gallery dialog instance
[ "Creates", "a", "new", "gallery", "dialog", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/CmsGalleryFactory.java#L123-L129
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/corona/ClusterManager.java
ClusterManager.recoverClusterManagerFromDisk
private void recoverClusterManagerFromDisk(HostsFileReader hostsReader) throws IOException { """ This method is used when the ClusterManager is restarting after going down while in Safe Mode. It starts the process of recovering the original CM state by reading back the state in JSON form. @param hostsReader...
java
private void recoverClusterManagerFromDisk(HostsFileReader hostsReader) throws IOException { LOG.info("Restoring state from " + new java.io.File(conf.getCMStateFile()).getAbsolutePath()); // This will prevent the expireNodes and expireSessions threads from // expiring the nodes and sessions respe...
[ "private", "void", "recoverClusterManagerFromDisk", "(", "HostsFileReader", "hostsReader", ")", "throws", "IOException", "{", "LOG", ".", "info", "(", "\"Restoring state from \"", "+", "new", "java", ".", "io", ".", "File", "(", "conf", ".", "getCMStateFile", "(",...
This method is used when the ClusterManager is restarting after going down while in Safe Mode. It starts the process of recovering the original CM state by reading back the state in JSON form. @param hostsReader The HostsReader instance @throws IOException
[ "This", "method", "is", "used", "when", "the", "ClusterManager", "is", "restarting", "after", "going", "down", "while", "in", "Safe", "Mode", ".", "It", "starts", "the", "process", "of", "recovering", "the", "original", "CM", "state", "by", "reading", "back"...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/corona/ClusterManager.java#L198-L231
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/html/TableForm.java
TableForm.addField
public void addField(String label,Element field) { """ Add an arbitrary element to the table. @param label The label for the element in the table. """ if (label==null) label="&nbsp;"; else label="<b>"+label+":</b>"; if (extendRow) { column.a...
java
public void addField(String label,Element field) { if (label==null) label="&nbsp;"; else label="<b>"+label+":</b>"; if (extendRow) { column.add(field); extendRow=false; } else { column.newRow(); ...
[ "public", "void", "addField", "(", "String", "label", ",", "Element", "field", ")", "{", "if", "(", "label", "==", "null", ")", "label", "=", "\"&nbsp;\"", ";", "else", "label", "=", "\"<b>\"", "+", "label", "+", "\":</b>\"", ";", "if", "(", "extendRow...
Add an arbitrary element to the table. @param label The label for the element in the table.
[ "Add", "an", "arbitrary", "element", "to", "the", "table", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L327-L353
google/error-prone-javac
src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor7.java
ElementKindVisitor7.visitVariableAsResourceVariable
@Override public R visitVariableAsResourceVariable(VariableElement e, P p) { """ Visits a {@code RESOURCE_VARIABLE} variable element by calling {@code defaultAction}. @param e {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction} """ return defaultAction(e, p); ...
java
@Override public R visitVariableAsResourceVariable(VariableElement e, P p) { return defaultAction(e, p); }
[ "@", "Override", "public", "R", "visitVariableAsResourceVariable", "(", "VariableElement", "e", ",", "P", "p", ")", "{", "return", "defaultAction", "(", "e", ",", "p", ")", ";", "}" ]
Visits a {@code RESOURCE_VARIABLE} variable element by calling {@code defaultAction}. @param e {@inheritDoc} @param p {@inheritDoc} @return the result of {@code defaultAction}
[ "Visits", "a", "{", "@code", "RESOURCE_VARIABLE", "}", "variable", "element", "by", "calling", "{", "@code", "defaultAction", "}", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor7.java#L109-L112
arquillian/arquillian-algeron
common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java
GitOperations.isLocalBranch
public boolean isLocalBranch(final Git git, final String branch) { """ Checks if given branch has been checkedout locally too. @param git instance. @param branch to check. @return True if it is local, false otherwise. """ try { final List<Ref> refs = git.branchList().call(); ...
java
public boolean isLocalBranch(final Git git, final String branch) { try { final List<Ref> refs = git.branchList().call(); return refs.stream() .anyMatch(ref -> ref.getName().endsWith(branch)); } catch (GitAPIException e) { throw new IllegalStateExceptio...
[ "public", "boolean", "isLocalBranch", "(", "final", "Git", "git", ",", "final", "String", "branch", ")", "{", "try", "{", "final", "List", "<", "Ref", ">", "refs", "=", "git", ".", "branchList", "(", ")", ".", "call", "(", ")", ";", "return", "refs",...
Checks if given branch has been checkedout locally too. @param git instance. @param branch to check. @return True if it is local, false otherwise.
[ "Checks", "if", "given", "branch", "has", "been", "checkedout", "locally", "too", "." ]
train
https://github.com/arquillian/arquillian-algeron/blob/ec79372defdafe99ab2f7bb696f1c1eabdbbacb6/common/git/src/main/java/org/arquillian/algeron/git/GitOperations.java#L97-L105
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java
Http2ConnectionHandler.closeStreamLocal
@Override public void closeStreamLocal(Http2Stream stream, ChannelFuture future) { """ Closes the local side of the given stream. If this causes the stream to be closed, adds a hook to close the channel after the given future completes. @param stream the stream to be half closed. @param future If closing,...
java
@Override public void closeStreamLocal(Http2Stream stream, ChannelFuture future) { switch (stream.state()) { case HALF_CLOSED_LOCAL: case OPEN: stream.closeLocalSide(); break; default: closeStream(stream, future); ...
[ "@", "Override", "public", "void", "closeStreamLocal", "(", "Http2Stream", "stream", ",", "ChannelFuture", "future", ")", "{", "switch", "(", "stream", ".", "state", "(", ")", ")", "{", "case", "HALF_CLOSED_LOCAL", ":", "case", "OPEN", ":", "stream", ".", ...
Closes the local side of the given stream. If this causes the stream to be closed, adds a hook to close the channel after the given future completes. @param stream the stream to be half closed. @param future If closing, the future after which to close the channel.
[ "Closes", "the", "local", "side", "of", "the", "given", "stream", ".", "If", "this", "causes", "the", "stream", "to", "be", "closed", "adds", "a", "hook", "to", "close", "the", "channel", "after", "the", "given", "future", "completes", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java#L570-L581
OpenLiberty/open-liberty
dev/com.ibm.ws.config/src/com/ibm/ws/config/xml/internal/schema/SchemaMetaTypeParser.java
SchemaMetaTypeParser.generateMetatypePropertiesName
private URL generateMetatypePropertiesName(String metatypeName, String locale) { """ Tries to generate the correct metatype properties location according to locale @param metatypeName @return a String with the correct metatype properties location """ String lookupName; if (locale != null &&...
java
private URL generateMetatypePropertiesName(String metatypeName, String locale) { String lookupName; if (locale != null && locale.length() > 0) { lookupName = metatypeName + LOCALE_SEPARATOR + locale + PROP_EXT; } else { lookupName = metatypeName + PROP_EXT; } ...
[ "private", "URL", "generateMetatypePropertiesName", "(", "String", "metatypeName", ",", "String", "locale", ")", "{", "String", "lookupName", ";", "if", "(", "locale", "!=", "null", "&&", "locale", ".", "length", "(", ")", ">", "0", ")", "{", "lookupName", ...
Tries to generate the correct metatype properties location according to locale @param metatypeName @return a String with the correct metatype properties location
[ "Tries", "to", "generate", "the", "correct", "metatype", "properties", "location", "according", "to", "locale" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.config/src/com/ibm/ws/config/xml/internal/schema/SchemaMetaTypeParser.java#L250-L267
contentful/contentful.java
src/main/java/com/contentful/java/cda/rich/RichTextFactory.java
RichTextFactory.resolveRichTextField
public static void resolveRichTextField(ArrayResource array, CDAClient client) { """ Walk through the given array and resolve all rich text fields. @param array the array to be walked. @param client the client to be used if updating of types is needed. """ for (CDAEntry entry : array.entries().values(...
java
public static void resolveRichTextField(ArrayResource array, CDAClient client) { for (CDAEntry entry : array.entries().values()) { ensureContentType(entry, client); for (CDAField field : entry.contentType().fields()) { if ("RichText".equals(field.type())) { resolveRichDocument(entry, f...
[ "public", "static", "void", "resolveRichTextField", "(", "ArrayResource", "array", ",", "CDAClient", "client", ")", "{", "for", "(", "CDAEntry", "entry", ":", "array", ".", "entries", "(", ")", ".", "values", "(", ")", ")", "{", "ensureContentType", "(", "...
Walk through the given array and resolve all rich text fields. @param array the array to be walked. @param client the client to be used if updating of types is needed.
[ "Walk", "through", "the", "given", "array", "and", "resolve", "all", "rich", "text", "fields", "." ]
train
https://github.com/contentful/contentful.java/blob/6ecc2ace454c674b218b99489dc50697b1dbffcb/src/main/java/com/contentful/java/cda/rich/RichTextFactory.java#L267-L277
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/model/globalfac/ProjDepTreeFactor.java
ProjDepTreeFactor.addMsgs
private void addMsgs(VarTensor[] msgs, Tensor t, int tf) { """ Adds to messages on a Messages[]. @param msgs The output messages. @param t The input messages. @param tf Whether to set TRUE or FALSE messages. """ assert msgs[0].getAlgebra().equals(t.getAlgebra()); EdgeScores es = EdgeScores...
java
private void addMsgs(VarTensor[] msgs, Tensor t, int tf) { assert msgs[0].getAlgebra().equals(t.getAlgebra()); EdgeScores es = EdgeScores.tensorToEdgeScores(t); for (VarTensor msg : msgs) { LinkVar link = (LinkVar) msg.getVars().get(0); double val = es.getScore(link.getPa...
[ "private", "void", "addMsgs", "(", "VarTensor", "[", "]", "msgs", ",", "Tensor", "t", ",", "int", "tf", ")", "{", "assert", "msgs", "[", "0", "]", ".", "getAlgebra", "(", ")", ".", "equals", "(", "t", ".", "getAlgebra", "(", ")", ")", ";", "EdgeS...
Adds to messages on a Messages[]. @param msgs The output messages. @param t The input messages. @param tf Whether to set TRUE or FALSE messages.
[ "Adds", "to", "messages", "on", "a", "Messages", "[]", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/model/globalfac/ProjDepTreeFactor.java#L318-L326
cdk/cdk
legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java
GeometryTools.get2DCentreOfMass
public static Point2d get2DCentreOfMass(IAtomContainer ac) { """ Calculates the center of mass for the <code>Atom</code>s in the AtomContainer for the 2D coordinates. See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate sets @param ac ...
java
public static Point2d get2DCentreOfMass(IAtomContainer ac) { double xsum = 0.0; double ysum = 0.0; double totalmass = 0.0; Iterator<IAtom> atoms = ac.atoms().iterator(); while (atoms.hasNext()) { IAtom a = (IAtom) atoms.next(); Double mass = a.getExactMa...
[ "public", "static", "Point2d", "get2DCentreOfMass", "(", "IAtomContainer", "ac", ")", "{", "double", "xsum", "=", "0.0", ";", "double", "ysum", "=", "0.0", ";", "double", "totalmass", "=", "0.0", ";", "Iterator", "<", "IAtom", ">", "atoms", "=", "ac", "....
Calculates the center of mass for the <code>Atom</code>s in the AtomContainer for the 2D coordinates. See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate sets @param ac AtomContainer for which the center of mass is calculated @return N...
[ "Calculates", "the", "center", "of", "mass", "for", "the", "<code", ">", "Atom<", "/", "code", ">", "s", "in", "the", "AtomContainer", "for", "the", "2D", "coordinates", ".", "See", "comment", "for", "center", "(", "IAtomContainer", "atomCon", "Dimension", ...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java#L455-L472
couchbase/couchbase-lite-java-core
vendor/sqlite/src/java/com/couchbase/lite/internal/database/sqlite/SQLiteConnection.java
SQLiteConnection.dumpUnsafe
void dumpUnsafe(Printer printer, boolean verbose) { """ Dumps debugging information about this connection, in the case where the caller might not actually own the connection. This function is written so that it may be called by a thread that does not own the connection. We need to be very careful because the...
java
void dumpUnsafe(Printer printer, boolean verbose) { printer.println("Connection #" + mConnectionId + ":"); if (verbose) { printer.println(" connectionPtr: 0x" + Long.toHexString(mConnectionPtr)); } printer.println(" isPrimaryConnection: " + mIsPrimaryConnection); pr...
[ "void", "dumpUnsafe", "(", "Printer", "printer", ",", "boolean", "verbose", ")", "{", "printer", ".", "println", "(", "\"Connection #\"", "+", "mConnectionId", "+", "\":\"", ")", ";", "if", "(", "verbose", ")", "{", "printer", ".", "println", "(", "\" con...
Dumps debugging information about this connection, in the case where the caller might not actually own the connection. This function is written so that it may be called by a thread that does not own the connection. We need to be very careful because the connection state is not synchronized. At worst, the method may ...
[ "Dumps", "debugging", "information", "about", "this", "connection", "in", "the", "case", "where", "the", "caller", "might", "not", "actually", "own", "the", "connection", "." ]
train
https://github.com/couchbase/couchbase-lite-java-core/blob/3b275642e2d2f231fd155ad9def9c5e9eff3118e/vendor/sqlite/src/java/com/couchbase/lite/internal/database/sqlite/SQLiteConnection.java#L876-L885
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/LineReader.java
LineReader.readLine
public int readLine(Text str, int maxLineLength, int maxBytesToConsume) throws IOException { """ Read one line from the InputStream into the given Text. @param str the object to store the given line (without newline) @param maxLineLength the maximum number of bytes to store into str; @pa...
java
public int readLine(Text str, int maxLineLength, int maxBytesToConsume) throws IOException { if (this.recordDelimiterBytes != null) { return readCustomLine(str, maxLineLength, maxBytesToConsume); } else { return readDefaultLine(str, maxLineLength, maxBytesToConsume); } }
[ "public", "int", "readLine", "(", "Text", "str", ",", "int", "maxLineLength", ",", "int", "maxBytesToConsume", ")", "throws", "IOException", "{", "if", "(", "this", ".", "recordDelimiterBytes", "!=", "null", ")", "{", "return", "readCustomLine", "(", "str", ...
Read one line from the InputStream into the given Text. @param str the object to store the given line (without newline) @param maxLineLength the maximum number of bytes to store into str; @param maxBytesToConsume the maximum number of bytes to consume in this call. This is only a hint, because if the line cross this ...
[ "Read", "one", "line", "from", "the", "InputStream", "into", "the", "given", "Text", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/LineReader.java#L156-L163
sarl/sarl
main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/TypeParameterBuilderImpl.java
TypeParameterBuilderImpl.eInit
public void eInit(EObject context, String name, IJvmTypeProvider typeContext) { """ Initialize the type parameter. <p>Caution: This initialization function does not add the type parameter in its container. The container is responsible of adding the type parameter in its internal object. @param name the name of ...
java
public void eInit(EObject context, String name, IJvmTypeProvider typeContext) { setTypeResolutionContext(typeContext); this.context = context; this.parameter = this.jvmTypesFactory.createJvmTypeParameter(); this.parameter.setName(name); }
[ "public", "void", "eInit", "(", "EObject", "context", ",", "String", "name", ",", "IJvmTypeProvider", "typeContext", ")", "{", "setTypeResolutionContext", "(", "typeContext", ")", ";", "this", ".", "context", "=", "context", ";", "this", ".", "parameter", "=",...
Initialize the type parameter. <p>Caution: This initialization function does not add the type parameter in its container. The container is responsible of adding the type parameter in its internal object. @param name the name of the type parameter. @param typeContext the provider of types or null.
[ "Initialize", "the", "type", "parameter", ".", "<p", ">", "Caution", ":", "This", "initialization", "function", "does", "not", "add", "the", "type", "parameter", "in", "its", "container", ".", "The", "container", "is", "responsible", "of", "adding", "the", "...
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/TypeParameterBuilderImpl.java#L55-L61
OpenLiberty/open-liberty
dev/com.ibm.ws.repository/src/com/ibm/ws/repository/resources/internal/RepositoryResourceImpl.java
RepositoryResourceImpl.findMatchingResource
public List<RepositoryResourceImpl> findMatchingResource() throws RepositoryResourceValidationException, RepositoryBackendException, RepositoryBadDataException, RepositoryResourceNoConnectionException { """ This method tries to find out if there is a match for "this" resource already in massive. @return A list ...
java
public List<RepositoryResourceImpl> findMatchingResource() throws RepositoryResourceValidationException, RepositoryBackendException, RepositoryBadDataException, RepositoryResourceNoConnectionException { List<RepositoryResourceImpl> matchingRes; try { matchingRes = performMatching(); ...
[ "public", "List", "<", "RepositoryResourceImpl", ">", "findMatchingResource", "(", ")", "throws", "RepositoryResourceValidationException", ",", "RepositoryBackendException", ",", "RepositoryBadDataException", ",", "RepositoryResourceNoConnectionException", "{", "List", "<", "Re...
This method tries to find out if there is a match for "this" resource already in massive. @return A list of resources that were found in massive which has the same name, provider and type as this resource, an empty list otherwise. @throws RepositoryResourceValidationException If the resource fails a validation check @...
[ "This", "method", "tries", "to", "find", "out", "if", "there", "is", "a", "match", "for", "this", "resource", "already", "in", "massive", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/resources/internal/RepositoryResourceImpl.java#L1028-L1045
apereo/cas
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java
WebUtils.putRecaptchaPropertiesFlowScope
public static void putRecaptchaPropertiesFlowScope(final RequestContext context, final GoogleRecaptchaProperties googleRecaptcha) { """ Put recaptcha settings flow scope. @param context the context @param googleRecaptcha the properties """ val flowScope = context.getFlowScope(); flo...
java
public static void putRecaptchaPropertiesFlowScope(final RequestContext context, final GoogleRecaptchaProperties googleRecaptcha) { val flowScope = context.getFlowScope(); flowScope.put("recaptchaSiteKey", googleRecaptcha.getSiteKey()); flowScope.put("recaptchaInvisible", googleRecaptcha.isInvis...
[ "public", "static", "void", "putRecaptchaPropertiesFlowScope", "(", "final", "RequestContext", "context", ",", "final", "GoogleRecaptchaProperties", "googleRecaptcha", ")", "{", "val", "flowScope", "=", "context", ".", "getFlowScope", "(", ")", ";", "flowScope", ".", ...
Put recaptcha settings flow scope. @param context the context @param googleRecaptcha the properties
[ "Put", "recaptcha", "settings", "flow", "scope", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java#L629-L635
Javacord/Javacord
javacord-core/src/main/java/org/javacord/core/DiscordApiImpl.java
DiscordApiImpl.updateActivity
private void updateActivity(ActivityType type, String name, String streamingUrl) { """ Sets the current activity, along with type and streaming Url. @param type The activity's type. @param name The name of the activity. @param streamingUrl The Url used for streaming. """ if (name == null) { ...
java
private void updateActivity(ActivityType type, String name, String streamingUrl) { if (name == null) { activity = null; } else if (streamingUrl == null) { activity = new ActivityImpl(type, name, null); } else { activity = new ActivityImpl(type, name, streaming...
[ "private", "void", "updateActivity", "(", "ActivityType", "type", ",", "String", "name", ",", "String", "streamingUrl", ")", "{", "if", "(", "name", "==", "null", ")", "{", "activity", "=", "null", ";", "}", "else", "if", "(", "streamingUrl", "==", "null...
Sets the current activity, along with type and streaming Url. @param type The activity's type. @param name The name of the activity. @param streamingUrl The Url used for streaming.
[ "Sets", "the", "current", "activity", "along", "with", "type", "and", "streaming", "Url", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/DiscordApiImpl.java#L1227-L1236
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/metadata/SecurityServletConfiguratorHelper.java
SecurityServletConfiguratorHelper.processSecurityRoleRefs
private void processSecurityRoleRefs(String servletName, List<SecurityRoleRef> servletSecurityRoleRefs) { """ Creates a map of security-role-ref elements to servlet name. @param servletName the name of the servlet @param servletSecurityRoleRefs a list of security-role-ref elements in the given servlet """ ...
java
private void processSecurityRoleRefs(String servletName, List<SecurityRoleRef> servletSecurityRoleRefs) { Map<String, String> securityRoleRefs = new HashMap<String, String>(); securityRoleRefsByServlet.put(servletName, securityRoleRefs); for (SecurityRoleRef secRoleRef : servletSecurityRoleRefs...
[ "private", "void", "processSecurityRoleRefs", "(", "String", "servletName", ",", "List", "<", "SecurityRoleRef", ">", "servletSecurityRoleRefs", ")", "{", "Map", "<", "String", ",", "String", ">", "securityRoleRefs", "=", "new", "HashMap", "<", "String", ",", "S...
Creates a map of security-role-ref elements to servlet name. @param servletName the name of the servlet @param servletSecurityRoleRefs a list of security-role-ref elements in the given servlet
[ "Creates", "a", "map", "of", "security", "-", "role", "-", "ref", "elements", "to", "servlet", "name", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/metadata/SecurityServletConfiguratorHelper.java#L471-L487
jiaqi/jcli
src/main/java/org/cyclopsgroup/jcli/spi/CommandLineBuilder.java
CommandLineBuilder.withShortOption
public CommandLineBuilder withShortOption(String name, String value) { """ Add an option with its short name @param name Short name of the option to add @param value Value of option to add @return Builder itself """ cl.addOptionValue(name, value, true); return this; }
java
public CommandLineBuilder withShortOption(String name, String value) { cl.addOptionValue(name, value, true); return this; }
[ "public", "CommandLineBuilder", "withShortOption", "(", "String", "name", ",", "String", "value", ")", "{", "cl", ".", "addOptionValue", "(", "name", ",", "value", ",", "true", ")", ";", "return", "this", ";", "}" ]
Add an option with its short name @param name Short name of the option to add @param value Value of option to add @return Builder itself
[ "Add", "an", "option", "with", "its", "short", "name" ]
train
https://github.com/jiaqi/jcli/blob/3854b3bb3c26bbe7407bf1b6600d8b25592d398e/src/main/java/org/cyclopsgroup/jcli/spi/CommandLineBuilder.java#L83-L86
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java
ExpressRouteCircuitsInner.getByResourceGroup
public ExpressRouteCircuitInner getByResourceGroup(String resourceGroupName, String circuitName) { """ Gets information about the specified express route circuit. @param resourceGroupName The name of the resource group. @param circuitName The name of express route circuit. @throws IllegalArgumentException thr...
java
public ExpressRouteCircuitInner getByResourceGroup(String resourceGroupName, String circuitName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().single().body(); }
[ "public", "ExpressRouteCircuitInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "circuitName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "circuitName", ")", ".", "toBlocking", "(", ")", ...
Gets information about the specified express route circuit. @param resourceGroupName The name of the resource group. @param circuitName The name of express route circuit. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws...
[ "Gets", "information", "about", "the", "specified", "express", "route", "circuit", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/ExpressRouteCircuitsInner.java#L310-L312
fuinorg/utils4swing
src/main/java/org/fuin/utils4swing/threadsafe/ThreadSafeJOptionPane.java
ThreadSafeJOptionPane.showMessageDialog
public static void showMessageDialog(final Component parentComponent, final Object message) { """ Brings up an information-message dialog titled "Message". @param parentComponent determines the <code>Frame</code> in which the dialog is displayed; if <code>null</code>, or if the <code>parentComponent</code> h...
java
public static void showMessageDialog(final Component parentComponent, final Object message) { execute(new VoidOptionPane() { public void show() { JOptionPane.showMessageDialog(parentComponent, message); } }); }
[ "public", "static", "void", "showMessageDialog", "(", "final", "Component", "parentComponent", ",", "final", "Object", "message", ")", "{", "execute", "(", "new", "VoidOptionPane", "(", ")", "{", "public", "void", "show", "(", ")", "{", "JOptionPane", ".", "...
Brings up an information-message dialog titled "Message". @param parentComponent determines the <code>Frame</code> in which the dialog is displayed; if <code>null</code>, or if the <code>parentComponent</code> has no <code>Frame</code>, a default <code>Frame</code> is used @param message the <code>Object</code> to dis...
[ "Brings", "up", "an", "information", "-", "message", "dialog", "titled", "Message", "." ]
train
https://github.com/fuinorg/utils4swing/blob/560fb69eac182e3473de9679c3c15433e524ef6b/src/main/java/org/fuin/utils4swing/threadsafe/ThreadSafeJOptionPane.java#L827-L835
mabe02/lanterna
src/main/java/com/googlecode/lanterna/gui2/dialogs/ActionListDialogBuilder.java
ActionListDialogBuilder.addAction
public ActionListDialogBuilder addAction(final String label, final Runnable action) { """ Adds an additional action to the {@code ActionListBox} that is to be displayed when the dialog is opened @param label Label of the new action @param action Action to perform if the user selects this item @return Itself ...
java
public ActionListDialogBuilder addAction(final String label, final Runnable action) { return addAction(new Runnable() { @Override public String toString() { return label; } @Override public void run() { action.run(); ...
[ "public", "ActionListDialogBuilder", "addAction", "(", "final", "String", "label", ",", "final", "Runnable", "action", ")", "{", "return", "addAction", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "String", "toString", "(", ")", "{", "re...
Adds an additional action to the {@code ActionListBox} that is to be displayed when the dialog is opened @param label Label of the new action @param action Action to perform if the user selects this item @return Itself
[ "Adds", "an", "additional", "action", "to", "the", "{" ]
train
https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/gui2/dialogs/ActionListDialogBuilder.java#L111-L123
sporniket/core
sporniket-core-io/src/main/java/com/sporniket/libre/io/AbstractTextFileConverter.java
AbstractTextFileConverter.convertFile
public final void convertFile(final String inputFileName, final String outputFileName) throws IOException, ConversionException { """ The file conversion process. @param inputFileName Name of the file to convert @param outputFileName Name of the converted file @throws IOException IO Exceptions are not proce...
java
public final void convertFile(final String inputFileName, final String outputFileName) throws IOException, ConversionException { openInputFile(inputFileName); openOutputFile(outputFileName); doConvertFile(myLineReader, myBufferedWriter); closeOutputFile(); closeInputFile(); }
[ "public", "final", "void", "convertFile", "(", "final", "String", "inputFileName", ",", "final", "String", "outputFileName", ")", "throws", "IOException", ",", "ConversionException", "{", "openInputFile", "(", "inputFileName", ")", ";", "openOutputFile", "(", "outpu...
The file conversion process. @param inputFileName Name of the file to convert @param outputFileName Name of the converted file @throws IOException IO Exceptions are not processed. It is up to the calling process to decide what to do, typically retry, abort or ignore. @throws ConversionException if a conversion problem...
[ "The", "file", "conversion", "process", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-io/src/main/java/com/sporniket/libre/io/AbstractTextFileConverter.java#L271-L278
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/java/JavaOutputType.java
JavaOutputType.callFindAssociation
private void callFindAssociation(Java.METHOD method, String result, Variable variable, Member member) { """ Call the find association method. <p> @param method the invoking method @param result the result variable @param variable the input variable @param member the member """ String setName = va...
java
private void callFindAssociation(Java.METHOD method, String result, Variable variable, Member member) { String setName = variable.getName() + "$" + member.getName(); method.addS("Number " + result + " = findAssociation(" + variable.getName() + ", " + variable.getFrom() + ", " + variable.getTo() + ", " ...
[ "private", "void", "callFindAssociation", "(", "Java", ".", "METHOD", "method", ",", "String", "result", ",", "Variable", "variable", ",", "Member", "member", ")", "{", "String", "setName", "=", "variable", ".", "getName", "(", ")", "+", "\"$\"", "+", "mem...
Call the find association method. <p> @param method the invoking method @param result the result variable @param variable the input variable @param member the member
[ "Call", "the", "find", "association", "method", ".", "<p", ">" ]
train
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/java/JavaOutputType.java#L266-L275
johncarl81/transfuse
transfuse-support/src/main/java/org/androidtransfuse/adapter/element/ASTElementFactory.java
ASTElementFactory.getConstructor
public ASTConstructor getConstructor(ExecutableElement executableElement) { """ Build an ASTConstructor from the input ExecutableElement @param executableElement require input element @return ASTConstructor """ ImmutableList<ASTParameter> parameters = getParameters(executableElement.getParameters()...
java
public ASTConstructor getConstructor(ExecutableElement executableElement) { ImmutableList<ASTParameter> parameters = getParameters(executableElement.getParameters()); ASTAccessModifier modifier = buildAccessModifier(executableElement); ImmutableSet<ASTType> throwsTypes = buildASTElementTypes(exe...
[ "public", "ASTConstructor", "getConstructor", "(", "ExecutableElement", "executableElement", ")", "{", "ImmutableList", "<", "ASTParameter", ">", "parameters", "=", "getParameters", "(", "executableElement", ".", "getParameters", "(", ")", ")", ";", "ASTAccessModifier",...
Build an ASTConstructor from the input ExecutableElement @param executableElement require input element @return ASTConstructor
[ "Build", "an", "ASTConstructor", "from", "the", "input", "ExecutableElement" ]
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-support/src/main/java/org/androidtransfuse/adapter/element/ASTElementFactory.java#L260-L266
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/Layout.java
Layout.setOffset
public void setOffset(float offset, final Axis axis) { """ Set the amount of offset between child objects and parent. @param axis {@link Axis} @param offset """ if (!equal(mOffset.get(axis), offset)) { mOffset.set(offset, axis); if (mContainer != null) { mConta...
java
public void setOffset(float offset, final Axis axis) { if (!equal(mOffset.get(axis), offset)) { mOffset.set(offset, axis); if (mContainer != null) { mContainer.onLayoutChanged(this); } } }
[ "public", "void", "setOffset", "(", "float", "offset", ",", "final", "Axis", "axis", ")", "{", "if", "(", "!", "equal", "(", "mOffset", ".", "get", "(", "axis", ")", ",", "offset", ")", ")", "{", "mOffset", ".", "set", "(", "offset", ",", "axis", ...
Set the amount of offset between child objects and parent. @param axis {@link Axis} @param offset
[ "Set", "the", "amount", "of", "offset", "between", "child", "objects", "and", "parent", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/layout/Layout.java#L232-L239
NessComputing/components-ness-pg
src/main/java/com/nesscomputing/db/postgres/junit/EmbeddedPostgresRules.java
EmbeddedPostgresRules.embeddedDatabaseRule
public static EmbeddedPostgresTestDatabaseRule embeddedDatabaseRule(@Nonnull final URL baseUrl, final String... personalities) { """ Returns a {@link TestRule} to create a Postgres cluster, shared amongst all test cases in this JVM. The rule contributes {@link Config} switches to configure each test case to get i...
java
public static EmbeddedPostgresTestDatabaseRule embeddedDatabaseRule(@Nonnull final URL baseUrl, final String... personalities) { try { return embeddedDatabaseRule(baseUrl.toURI(), personalities); } catch (URISyntaxException e) { throw new IllegalArgumentException(e); ...
[ "public", "static", "EmbeddedPostgresTestDatabaseRule", "embeddedDatabaseRule", "(", "@", "Nonnull", "final", "URL", "baseUrl", ",", "final", "String", "...", "personalities", ")", "{", "try", "{", "return", "embeddedDatabaseRule", "(", "baseUrl", ".", "toURI", "(",...
Returns a {@link TestRule} to create a Postgres cluster, shared amongst all test cases in this JVM. The rule contributes {@link Config} switches to configure each test case to get its own database.
[ "Returns", "a", "{" ]
train
https://github.com/NessComputing/components-ness-pg/blob/e983d6075645ea1bf51cc5fc16901e5aab0f5c70/src/main/java/com/nesscomputing/db/postgres/junit/EmbeddedPostgresRules.java#L34-L41
Netflix/Nicobar
nicobar-cassandra/src/main/java/com/netflix/nicobar/cassandra/CassandraArchiveRepository.java
CassandraArchiveRepository.generateSelectByShardCql
protected String generateSelectByShardCql(EnumSet<?> columns, Integer shardNum) { """ Generate the CQL to select specific columns by shard number. <pre> SELECT ${columns}... FROM script_repo WHERE shard_num = ? </pre> """ StringBuilder sb = new StringBuilder() .append("SELECT "); ...
java
protected String generateSelectByShardCql(EnumSet<?> columns, Integer shardNum) { StringBuilder sb = new StringBuilder() .append("SELECT "); boolean first = true; for (Enum<?> column : columns) { if (first) { first = false; } else { ...
[ "protected", "String", "generateSelectByShardCql", "(", "EnumSet", "<", "?", ">", "columns", ",", "Integer", "shardNum", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ".", "append", "(", "\"SELECT \"", ")", ";", "boolean", "first", ...
Generate the CQL to select specific columns by shard number. <pre> SELECT ${columns}... FROM script_repo WHERE shard_num = ? </pre>
[ "Generate", "the", "CQL", "to", "select", "specific", "columns", "by", "shard", "number", ".", "<pre", ">", "SELECT", "$", "{", "columns", "}", "...", "FROM", "script_repo", "WHERE", "shard_num", "=", "?", "<", "/", "pre", ">" ]
train
https://github.com/Netflix/Nicobar/blob/507173dcae4a86a955afc3df222a855862fab8d7/nicobar-cassandra/src/main/java/com/netflix/nicobar/cassandra/CassandraArchiveRepository.java#L299-L316
korpling/ANNIS
annis-interfaces/src/main/java/annis/service/objects/CorpusConfig.java
CorpusConfig.setConfig
public void setConfig(String configName, String configValue) { """ Add a new configuration. If the config name already exists, the config value is overwritten. @param configName The key of the config. @param configValue The value of the new config. """ if (config == null) { config = new Prop...
java
public void setConfig(String configName, String configValue) { if (config == null) { config = new Properties(); } if(configValue == null) { config.remove(configName); } else { config.setProperty(configName, configValue); } }
[ "public", "void", "setConfig", "(", "String", "configName", ",", "String", "configValue", ")", "{", "if", "(", "config", "==", "null", ")", "{", "config", "=", "new", "Properties", "(", ")", ";", "}", "if", "(", "configValue", "==", "null", ")", "{", ...
Add a new configuration. If the config name already exists, the config value is overwritten. @param configName The key of the config. @param configValue The value of the new config.
[ "Add", "a", "new", "configuration", ".", "If", "the", "config", "name", "already", "exists", "the", "config", "value", "is", "overwritten", "." ]
train
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-interfaces/src/main/java/annis/service/objects/CorpusConfig.java#L62-L77
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CPDAvailabilityEstimatePersistenceImpl.java
CPDAvailabilityEstimatePersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the cpd availability estimates where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CPDAvailabilityEstimate cpdAvailabilityEstimate : findByUuid_C( ...
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CPDAvailabilityEstimate cpdAvailabilityEstimate : findByUuid_C( uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpdAvailabilityEstimate); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CPDAvailabilityEstimate", "cpdAvailabilityEstimate", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS", ...
Removes all the cpd availability estimates where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "cpd", "availability", "estimates", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CPDAvailabilityEstimatePersistenceImpl.java#L1416-L1422
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java
JCudnn.cudnnLRNCrossChannelBackward
public static int cudnnLRNCrossChannelBackward( cudnnHandle handle, cudnnLRNDescriptor normDesc, int lrnMode, Pointer alpha, cudnnTensorDescriptor yDesc, Pointer y, cudnnTensorDescriptor dyDesc, Pointer dy, cudnnTensorDescriptor xDesc, ...
java
public static int cudnnLRNCrossChannelBackward( cudnnHandle handle, cudnnLRNDescriptor normDesc, int lrnMode, Pointer alpha, cudnnTensorDescriptor yDesc, Pointer y, cudnnTensorDescriptor dyDesc, Pointer dy, cudnnTensorDescriptor xDesc, ...
[ "public", "static", "int", "cudnnLRNCrossChannelBackward", "(", "cudnnHandle", "handle", ",", "cudnnLRNDescriptor", "normDesc", ",", "int", "lrnMode", ",", "Pointer", "alpha", ",", "cudnnTensorDescriptor", "yDesc", ",", "Pointer", "y", ",", "cudnnTensorDescriptor", "d...
LRN cross-channel backward computation. Double parameters cast to tensor data type
[ "LRN", "cross", "-", "channel", "backward", "computation", ".", "Double", "parameters", "cast", "to", "tensor", "data", "type" ]
train
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java#L2080-L2096
Azure/azure-sdk-for-java
containerinstance/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2018_02_01_preview/implementation/ContainerGroupsInner.java
ContainerGroupsInner.getByResourceGroupAsync
public Observable<ContainerGroupInner> getByResourceGroupAsync(String resourceGroupName, String containerGroupName) { """ Get the properties of the specified container group. Gets the properties of the specified container group in the specified subscription and resource group. The operation returns the properties...
java
public Observable<ContainerGroupInner> getByResourceGroupAsync(String resourceGroupName, String containerGroupName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, containerGroupName).map(new Func1<ServiceResponse<ContainerGroupInner>, ContainerGroupInner>() { @Override ...
[ "public", "Observable", "<", "ContainerGroupInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "containerGroupName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "containerGroupName", ...
Get the properties of the specified container group. Gets the properties of the specified container group in the specified subscription and resource group. The operation returns the properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and ...
[ "Get", "the", "properties", "of", "the", "specified", "container", "group", ".", "Gets", "the", "properties", "of", "the", "specified", "container", "group", "in", "the", "specified", "subscription", "and", "resource", "group", ".", "The", "operation", "returns"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerinstance/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2018_02_01_preview/implementation/ContainerGroupsInner.java#L377-L384
lessthanoptimal/ddogleg
src/org/ddogleg/nn/alg/VpTree.java
VpTree.partitionItems
private int partitionItems(int left, int right, int pivot, double[] origin) { """ Partition the points based on their distance to origin around the selected pivot. @param left range start @param right range end (exclusive) @param pivot pivot for the partition @param origin origin to compute the distance to @r...
java
private int partitionItems(int left, int right, int pivot, double[] origin) { double pivotDistance = distance(origin, items[pivot]); listSwap(items, pivot, right - 1); listSwap(indexes, pivot, right - 1); int storeIndex = left; for (int i = left; i < right - 1; i++) { if (distance(origin, items[i]) <...
[ "private", "int", "partitionItems", "(", "int", "left", ",", "int", "right", ",", "int", "pivot", ",", "double", "[", "]", "origin", ")", "{", "double", "pivotDistance", "=", "distance", "(", "origin", ",", "items", "[", "pivot", "]", ")", ";", "listSw...
Partition the points based on their distance to origin around the selected pivot. @param left range start @param right range end (exclusive) @param pivot pivot for the partition @param origin origin to compute the distance to @return index of the pivot
[ "Partition", "the", "points", "based", "on", "their", "distance", "to", "origin", "around", "the", "selected", "pivot", "." ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/nn/alg/VpTree.java#L149-L164
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/form/builder/FormLayoutFormBuilder.java
FormLayoutFormBuilder.addBinding
public JComponent addBinding(Binding binding, int column, int row) { """ Add a binder to a column and a row. Equals to builder.addBinding(component, column, row). @param binding The binding to add @param column The column on which the binding must be added @param column The row on which the binding must be...
java
public JComponent addBinding(Binding binding, int column, int row) { return this.addBinding(binding, column, row, 1, 1); }
[ "public", "JComponent", "addBinding", "(", "Binding", "binding", ",", "int", "column", ",", "int", "row", ")", "{", "return", "this", ".", "addBinding", "(", "binding", ",", "column", ",", "row", ",", "1", ",", "1", ")", ";", "}" ]
Add a binder to a column and a row. Equals to builder.addBinding(component, column, row). @param binding The binding to add @param column The column on which the binding must be added @param column The row on which the binding must be added @return The component produced by the binding @see #addBinding(Binding, int,...
[ "Add", "a", "binder", "to", "a", "column", "and", "a", "row", ".", "Equals", "to", "builder", ".", "addBinding", "(", "component", "column", "row", ")", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/builder/FormLayoutFormBuilder.java#L263-L266
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/inject/writer/BeanDefinitionWriter.java
BeanDefinitionWriter.visitBeanDefinitionConstructor
@Override public void visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata, boolean requiresReflection, Map<String, Object> argumentTypes, Map<String, Annotati...
java
@Override public void visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata, boolean requiresReflection, Map<String, Object> argumentTypes, Map<String, Annotati...
[ "@", "Override", "public", "void", "visitBeanDefinitionConstructor", "(", "AnnotationMetadata", "annotationMetadata", ",", "boolean", "requiresReflection", ",", "Map", "<", "String", ",", "Object", ">", "argumentTypes", ",", "Map", "<", "String", ",", "AnnotationMetad...
Visits the constructor used to create the bean definition. @param annotationMetadata The annotation metadata for the constructor @param requiresReflection Whether invoking the constructor requires reflection @param argumentTypes The argument type names for each parameter @param argumentAnn...
[ "Visits", "the", "constructor", "used", "to", "create", "the", "bean", "definition", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/writer/BeanDefinitionWriter.java#L412-L433
datacleaner/DataCleaner
engine/core/src/main/java/org/datacleaner/lifecycle/LifeCycleHelper.java
LifeCycleHelper.assignProvidedProperties
public void assignProvidedProperties(final ComponentDescriptor<?> descriptor, final Object component) { """ Assigns/injects {@link Provided} property values to a component. @param descriptor @param component """ final Set<ProvidedPropertyDescriptor> providedDescriptors = descriptor.getProvidedPrope...
java
public void assignProvidedProperties(final ComponentDescriptor<?> descriptor, final Object component) { final Set<ProvidedPropertyDescriptor> providedDescriptors = descriptor.getProvidedProperties(); for (final ProvidedPropertyDescriptor providedDescriptor : providedDescriptors) { final Inj...
[ "public", "void", "assignProvidedProperties", "(", "final", "ComponentDescriptor", "<", "?", ">", "descriptor", ",", "final", "Object", "component", ")", "{", "final", "Set", "<", "ProvidedPropertyDescriptor", ">", "providedDescriptors", "=", "descriptor", ".", "get...
Assigns/injects {@link Provided} property values to a component. @param descriptor @param component
[ "Assigns", "/", "injects", "{", "@link", "Provided", "}", "property", "values", "to", "a", "component", "." ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/engine/core/src/main/java/org/datacleaner/lifecycle/LifeCycleHelper.java#L135-L144
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java
DFSAdmin.saveNamespace
public int saveNamespace(String[] argv, int idx) throws IOException { """ Command to ask the namenode to save the namespace. Usage: java DFSAdmin -saveNamespace [force] [uncompressed] @param argv List of of command line parameters. @param idx The index of the command that is being processed. @exception IOExc...
java
public int saveNamespace(String[] argv, int idx) throws IOException { int exitCode = -1; DistributedFileSystem dfs = getDFS(); if (dfs == null) { System.err.println("FileSystem is " + getFS().getUri()); return exitCode; } boolean force = false; boolean uncompressed = false; for...
[ "public", "int", "saveNamespace", "(", "String", "[", "]", "argv", ",", "int", "idx", ")", "throws", "IOException", "{", "int", "exitCode", "=", "-", "1", ";", "DistributedFileSystem", "dfs", "=", "getDFS", "(", ")", ";", "if", "(", "dfs", "==", "null"...
Command to ask the namenode to save the namespace. Usage: java DFSAdmin -saveNamespace [force] [uncompressed] @param argv List of of command line parameters. @param idx The index of the command that is being processed. @exception IOException
[ "Command", "to", "ask", "the", "namenode", "to", "save", "the", "namespace", ".", "Usage", ":", "java", "DFSAdmin", "-", "saveNamespace", "[", "force", "]", "[", "uncompressed", "]" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java#L454-L477
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.server/src/com/ibm/ws/jaxrs20/server/LibertyJaxRsInvoker.java
LibertyJaxRsInvoker.invoke
@Override public Object invoke(Exchange exchange, Object request, Object resourceObject) { """ override this method for EJB & CDI context&parameter field/setter method injection if the resourceObject is actually a EJB or CDI bean, then store the injection objects when Liberty injection engine triggers the in...
java
@Override public Object invoke(Exchange exchange, Object request, Object resourceObject) { JaxRsFactoryBeanCustomizer beanCustomizer = libertyJaxRsServerFactoryBean.findBeanCustomizer(resourceObject.getClass()); //only for EJB or CDI if (beanCustomizer != null) { final Operatio...
[ "@", "Override", "public", "Object", "invoke", "(", "Exchange", "exchange", ",", "Object", "request", ",", "Object", "resourceObject", ")", "{", "JaxRsFactoryBeanCustomizer", "beanCustomizer", "=", "libertyJaxRsServerFactoryBean", ".", "findBeanCustomizer", "(", "resour...
override this method for EJB & CDI context&parameter field/setter method injection if the resourceObject is actually a EJB or CDI bean, then store the injection objects when Liberty injection engine triggers the injection, retrieve the injection objects in XXXParamInjecitonBinding or ContextObjectFactory
[ "override", "this", "method", "for", "EJB", "&", "CDI", "context&parameter", "field", "/", "setter", "method", "injection", "if", "the", "resourceObject", "is", "actually", "a", "EJB", "or", "CDI", "bean", "then", "store", "the", "injection", "objects", "when"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.server/src/com/ibm/ws/jaxrs20/server/LibertyJaxRsInvoker.java#L424-L445
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java
Widget.translate
public void translate(float x, float y, float z) { """ Move the object, relative to its current position. Modify the tranform's current translation by applying translations on all 3 axes. @param x 'X' delta @param y 'Y' delta @param z 'Z' delta """ getTransform().translate(x, y, z); ...
java
public void translate(float x, float y, float z) { getTransform().translate(x, y, z); if (mTransformCache.translate(x, y, z)) { onTransformChanged(); } }
[ "public", "void", "translate", "(", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "getTransform", "(", ")", ".", "translate", "(", "x", ",", "y", ",", "z", ")", ";", "if", "(", "mTransformCache", ".", "translate", "(", "x", ",", "...
Move the object, relative to its current position. Modify the tranform's current translation by applying translations on all 3 axes. @param x 'X' delta @param y 'Y' delta @param z 'Z' delta
[ "Move", "the", "object", "relative", "to", "its", "current", "position", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/Widget.java#L1545-L1550
skyscreamer/JSONassert
src/main/java/org/skyscreamer/jsonassert/JSONCompare.java
JSONCompare.compareJSON
public static JSONCompareResult compareJSON(JSONArray expected, JSONArray actual, JSONComparator comparator) throws JSONException { """ Compares JSON object provided to the expected JSON object using provided comparator, and returns the results of the comparison. @param expected expected json array ...
java
public static JSONCompareResult compareJSON(JSONArray expected, JSONArray actual, JSONComparator comparator) throws JSONException { return comparator.compareJSON(expected, actual); }
[ "public", "static", "JSONCompareResult", "compareJSON", "(", "JSONArray", "expected", ",", "JSONArray", "actual", ",", "JSONComparator", "comparator", ")", "throws", "JSONException", "{", "return", "comparator", ".", "compareJSON", "(", "expected", ",", "actual", ")...
Compares JSON object provided to the expected JSON object using provided comparator, and returns the results of the comparison. @param expected expected json array @param actual actual json array @param comparator comparator to use @return result of the comparison @throws JSONException JSON parsing error
[ "Compares", "JSON", "object", "provided", "to", "the", "expected", "JSON", "object", "using", "provided", "comparator", "and", "returns", "the", "results", "of", "the", "comparison", "." ]
train
https://github.com/skyscreamer/JSONassert/blob/830efcf546d07f955d8a213cc5c8a1db34d78f04/src/main/java/org/skyscreamer/jsonassert/JSONCompare.java#L91-L94
Nexmo/nexmo-java
src/main/java/com/nexmo/client/sms/SmsClient.java
SmsClient.searchMessages
public SearchSmsResponse searchMessages(String id, String... ids) throws IOException, NexmoClientException { """ Search for completed SMS transactions by ID @param id the first ID to look up @param ids optional extra IDs to look up @return SMS data matching the provided criteria """ List<String...
java
public SearchSmsResponse searchMessages(String id, String... ids) throws IOException, NexmoClientException { List<String> idList = new ArrayList<>(ids.length + 1); idList.add(id); idList.addAll(Arrays.asList(ids)); return this.searchMessages(new SmsIdSearchRequest(idList)); }
[ "public", "SearchSmsResponse", "searchMessages", "(", "String", "id", ",", "String", "...", "ids", ")", "throws", "IOException", ",", "NexmoClientException", "{", "List", "<", "String", ">", "idList", "=", "new", "ArrayList", "<>", "(", "ids", ".", "length", ...
Search for completed SMS transactions by ID @param id the first ID to look up @param ids optional extra IDs to look up @return SMS data matching the provided criteria
[ "Search", "for", "completed", "SMS", "transactions", "by", "ID" ]
train
https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/sms/SmsClient.java#L99-L104
Ordinastie/MalisisCore
src/main/java/net/malisis/core/client/gui/element/position/Positions.java
Positions.leftAligned
public static IntSupplier leftAligned(IChild<?> owner, int spacing) { """ Positions the owner to the left inside its parent.<br> Respects the parent padding. @param spacing the spacing @return the int supplier """ return () -> { return Padding.of(owner.getParent()).left() + spacing; }; }
java
public static IntSupplier leftAligned(IChild<?> owner, int spacing) { return () -> { return Padding.of(owner.getParent()).left() + spacing; }; }
[ "public", "static", "IntSupplier", "leftAligned", "(", "IChild", "<", "?", ">", "owner", ",", "int", "spacing", ")", "{", "return", "(", ")", "->", "{", "return", "Padding", ".", "of", "(", "owner", ".", "getParent", "(", ")", ")", ".", "left", "(", ...
Positions the owner to the left inside its parent.<br> Respects the parent padding. @param spacing the spacing @return the int supplier
[ "Positions", "the", "owner", "to", "the", "left", "inside", "its", "parent", ".", "<br", ">", "Respects", "the", "parent", "padding", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/client/gui/element/position/Positions.java#L53-L58
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/bloom/RetouchedBloomFilter.java
RetouchedBloomFilter.selectiveClearing
public void selectiveClearing(Key k, short scheme) { """ Performs the selective clearing for a given key. @param k The false positive key to remove from <i>this</i> retouched Bloom filter. @param scheme The selective clearing scheme to apply. """ if (k == null) { throw new NullPointerException("Key...
java
public void selectiveClearing(Key k, short scheme) { if (k == null) { throw new NullPointerException("Key can not be null"); } if (!membershipTest(k)) { throw new IllegalArgumentException("Key is not a member"); } int index = 0; int[] h = hash.hash(k); switch(scheme) { ca...
[ "public", "void", "selectiveClearing", "(", "Key", "k", ",", "short", "scheme", ")", "{", "if", "(", "k", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"Key can not be null\"", ")", ";", "}", "if", "(", "!", "membershipTest", "(", ...
Performs the selective clearing for a given key. @param k The false positive key to remove from <i>this</i> retouched Bloom filter. @param scheme The selective clearing scheme to apply.
[ "Performs", "the", "selective", "clearing", "for", "a", "given", "key", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/bloom/RetouchedBloomFilter.java#L194-L230
lightbend/config
config/src/main/java/com/typesafe/config/ConfigException.java
ConfigException.setOriginField
private static <T> void setOriginField(T hasOriginField, Class<T> clazz, ConfigOrigin origin) throws IOException { """ For deserialization - uses reflection to set the final origin field on the object """ // circumvent "final" Field f; try { f = clazz.getDeclared...
java
private static <T> void setOriginField(T hasOriginField, Class<T> clazz, ConfigOrigin origin) throws IOException { // circumvent "final" Field f; try { f = clazz.getDeclaredField("origin"); } catch (NoSuchFieldException e) { throw new IOException(clazz...
[ "private", "static", "<", "T", ">", "void", "setOriginField", "(", "T", "hasOriginField", ",", "Class", "<", "T", ">", "clazz", ",", "ConfigOrigin", "origin", ")", "throws", "IOException", "{", "// circumvent \"final\"", "Field", "f", ";", "try", "{", "f", ...
For deserialization - uses reflection to set the final origin field on the object
[ "For", "deserialization", "-", "uses", "reflection", "to", "set", "the", "final", "origin", "field", "on", "the", "object" ]
train
https://github.com/lightbend/config/blob/68cebfde5e861e9a5fdc75ceff366ed95e17d475/config/src/main/java/com/typesafe/config/ConfigException.java#L62-L82
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/topology/CheckpointTupleForwarder.java
CheckpointTupleForwarder.handleCheckpoint
protected void handleCheckpoint(Tuple checkpointTuple, Action action, long txid) { """ Forwards the checkpoint tuple downstream. Sub-classes can override with the logic for handling checkpoint tuple. @param checkpointTuple the checkpoint tuple @param action the action (prepare, commit, rollback or in...
java
protected void handleCheckpoint(Tuple checkpointTuple, Action action, long txid) { collector.emit(CheckpointSpout.CHECKPOINT_STREAM_ID, checkpointTuple, new Values(txid, action)); collector.ack(checkpointTuple); }
[ "protected", "void", "handleCheckpoint", "(", "Tuple", "checkpointTuple", ",", "Action", "action", ",", "long", "txid", ")", "{", "collector", ".", "emit", "(", "CheckpointSpout", ".", "CHECKPOINT_STREAM_ID", ",", "checkpointTuple", ",", "new", "Values", "(", "t...
Forwards the checkpoint tuple downstream. Sub-classes can override with the logic for handling checkpoint tuple. @param checkpointTuple the checkpoint tuple @param action the action (prepare, commit, rollback or initstate) @param txid the transaction id.
[ "Forwards", "the", "checkpoint", "tuple", "downstream", ".", "Sub", "-", "classes", "can", "override", "with", "the", "logic", "for", "handling", "checkpoint", "tuple", "." ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/topology/CheckpointTupleForwarder.java#L103-L106
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/pattern/ExtrasPatternParser.java
ExtrasPatternParser.extractOptions
private static int extractOptions(String pattern, int i, List options) { """ Extract options. @param pattern conversion pattern. @param i start of options. @param options array to receive extracted options @return position in pattern after options. """ while ((i < pattern.length()) && (pattern.charAt(i...
java
private static int extractOptions(String pattern, int i, List options) { while ((i < pattern.length()) && (pattern.charAt(i) == '{')) { int end = pattern.indexOf('}', i); if (end == -1) { break; } String r = pattern.substring(i + 1, end); options.add(r); i = end + 1; ...
[ "private", "static", "int", "extractOptions", "(", "String", "pattern", ",", "int", "i", ",", "List", "options", ")", "{", "while", "(", "(", "i", "<", "pattern", ".", "length", "(", ")", ")", "&&", "(", "pattern", ".", "charAt", "(", "i", ")", "==...
Extract options. @param pattern conversion pattern. @param i start of options. @param options array to receive extracted options @return position in pattern after options.
[ "Extract", "options", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/pattern/ExtrasPatternParser.java#L220-L234
akberc/ceylon-maven-plugin
src/main/java/com/dgwave/car/common/CeylonUtil.java
CeylonUtil.ceylonModuleBaseName
public static String ceylonModuleBaseName(final String groupId, final String artifactId) { """ Determines the Ceylon module name (without extension). @param groupId Maven group id @param artifactId Maven artifact id @return String The module base name """ if (groupId == null || artifactId == null...
java
public static String ceylonModuleBaseName(final String groupId, final String artifactId) { if (groupId == null || artifactId == null || "".equals(artifactId) || artifactId.contains(".")) { throw new IllegalArgumentException(" Null or empty, or '.' is not allowed in artifactId"); } ...
[ "public", "static", "String", "ceylonModuleBaseName", "(", "final", "String", "groupId", ",", "final", "String", "artifactId", ")", "{", "if", "(", "groupId", "==", "null", "||", "artifactId", "==", "null", "||", "\"\"", ".", "equals", "(", "artifactId", ")"...
Determines the Ceylon module name (without extension). @param groupId Maven group id @param artifactId Maven artifact id @return String The module base name
[ "Determines", "the", "Ceylon", "module", "name", "(", "without", "extension", ")", "." ]
train
https://github.com/akberc/ceylon-maven-plugin/blob/b7f6c4a2b24f2fa237350c9e715f4193e83415ef/src/main/java/com/dgwave/car/common/CeylonUtil.java#L170-L175
telly/groundy
library/src/main/java/com/telly/groundy/TaskResult.java
TaskResult.addStringArrayList
public TaskResult addStringArrayList(String key, ArrayList<String> value) { """ Inserts an ArrayList<String> value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value an ArrayList<String> object, or null ...
java
public TaskResult addStringArrayList(String key, ArrayList<String> value) { mBundle.putStringArrayList(key, value); return this; }
[ "public", "TaskResult", "addStringArrayList", "(", "String", "key", ",", "ArrayList", "<", "String", ">", "value", ")", "{", "mBundle", ".", "putStringArrayList", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts an ArrayList<String> value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value an ArrayList<String> object, or null
[ "Inserts", "an", "ArrayList<String", ">", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/TaskResult.java#L239-L242
undertow-io/undertow
core/src/main/java/io/undertow/websockets/core/StreamSourceFrameChannel.java
StreamSourceFrameChannel.afterRead
protected void afterRead(ByteBuffer buffer, int position, int length) throws IOException { """ Called after data was read into the {@link ByteBuffer} @param buffer the {@link ByteBuffer} into which the data was read @param position the position it was written to @param length the number of bytes there wer...
java
protected void afterRead(ByteBuffer buffer, int position, int length) throws IOException { try { for (ChannelFunction func : functions) { func.afterRead(buffer, position, length); } if (isComplete()) { checkComplete(); } } c...
[ "protected", "void", "afterRead", "(", "ByteBuffer", "buffer", ",", "int", "position", ",", "int", "length", ")", "throws", "IOException", "{", "try", "{", "for", "(", "ChannelFunction", "func", ":", "functions", ")", "{", "func", ".", "afterRead", "(", "b...
Called after data was read into the {@link ByteBuffer} @param buffer the {@link ByteBuffer} into which the data was read @param position the position it was written to @param length the number of bytes there were written @throws IOException thrown if an error occurs
[ "Called", "after", "data", "was", "read", "into", "the", "{", "@link", "ByteBuffer", "}" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/StreamSourceFrameChannel.java#L210-L222
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/ChatApi.java
ChatApi.sendCustomNotification
public ApiSuccessResponse sendCustomNotification(String id, CustomNotificationData customNotificationData) throws ApiException { """ Send a custom notification Send a custom notification to the specified chat. The notification is typically used as a trigger for some custom behavior on the recipient&#39;s end. @p...
java
public ApiSuccessResponse sendCustomNotification(String id, CustomNotificationData customNotificationData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = sendCustomNotificationWithHttpInfo(id, customNotificationData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "sendCustomNotification", "(", "String", "id", ",", "CustomNotificationData", "customNotificationData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "sendCustomNotificationWithHttpInfo", "(", ...
Send a custom notification Send a custom notification to the specified chat. The notification is typically used as a trigger for some custom behavior on the recipient&#39;s end. @param id The ID of the chat interaction. (required) @param customNotificationData Request parameters. (optional) @return ApiSuccessResponse @...
[ "Send", "a", "custom", "notification", "Send", "a", "custom", "notification", "to", "the", "specified", "chat", ".", "The", "notification", "is", "typically", "used", "as", "a", "trigger", "for", "some", "custom", "behavior", "on", "the", "recipient&#39", ";",...
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/ChatApi.java#L1445-L1448
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/environment/logging/LoggingHandlerEnvironmentFacet.java
LoggingHandlerEnvironmentFacet.setup
@Override public void setup() { """ {@inheritDoc} <p>Redirects JUL logging statements to the Maven Log.</p> """ // Redirect the JUL Logging statements to the Maven Log. rootLogger.setLevel(MavenLogHandler.getJavaUtilLoggingLevelFor(log)); this.mavenLogHandler = new MavenLogHandler...
java
@Override public void setup() { // Redirect the JUL Logging statements to the Maven Log. rootLogger.setLevel(MavenLogHandler.getJavaUtilLoggingLevelFor(log)); this.mavenLogHandler = new MavenLogHandler(log, logPrefix, encoding, loggerNamePrefixes); for (Handler current : rootLogger...
[ "@", "Override", "public", "void", "setup", "(", ")", "{", "// Redirect the JUL Logging statements to the Maven Log.", "rootLogger", ".", "setLevel", "(", "MavenLogHandler", ".", "getJavaUtilLoggingLevelFor", "(", "log", ")", ")", ";", "this", ".", "mavenLogHandler", ...
{@inheritDoc} <p>Redirects JUL logging statements to the Maven Log.</p>
[ "{" ]
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/environment/logging/LoggingHandlerEnvironmentFacet.java#L93-L111
lastaflute/lastaflute
src/main/java/org/lastaflute/web/ruts/process/ActionFormMapper.java
ActionFormMapper.throwRequestJsonParseFailureException
protected void throwRequestJsonParseFailureException(String msg, List<JsonDebugChallenge> challengeList, RuntimeException cause) { """ while, is likely to due to client bugs (or server) so request client error """ throw new RequestJsonParseFailureException(msg, getRequestJsonParseFailureMessages(), cau...
java
protected void throwRequestJsonParseFailureException(String msg, List<JsonDebugChallenge> challengeList, RuntimeException cause) { throw new RequestJsonParseFailureException(msg, getRequestJsonParseFailureMessages(), cause).withChallengeList(challengeList); }
[ "protected", "void", "throwRequestJsonParseFailureException", "(", "String", "msg", ",", "List", "<", "JsonDebugChallenge", ">", "challengeList", ",", "RuntimeException", "cause", ")", "{", "throw", "new", "RequestJsonParseFailureException", "(", "msg", ",", "getRequest...
while, is likely to due to client bugs (or server) so request client error
[ "while", "is", "likely", "to", "due", "to", "client", "bugs", "(", "or", "server", ")", "so", "request", "client", "error" ]
train
https://github.com/lastaflute/lastaflute/blob/17b56dda8322e4c6d79043532c1dda917d6b60a8/src/main/java/org/lastaflute/web/ruts/process/ActionFormMapper.java#L1569-L1571
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/model/BoundingBox.java
BoundingBox.extendMeters
public BoundingBox extendMeters(int meters) { """ Creates a BoundingBox that is a fixed meter amount larger on all sides (but does not cross date line/poles). @param meters extension (must be >= 0) @return an extended BoundingBox or this (if meters == 0) """ if (meters == 0) { return th...
java
public BoundingBox extendMeters(int meters) { if (meters == 0) { return this; } else if (meters < 0) { throw new IllegalArgumentException("BoundingBox extend operation does not accept negative values"); } double verticalExpansion = LatLongUtils.latitudeDistance(m...
[ "public", "BoundingBox", "extendMeters", "(", "int", "meters", ")", "{", "if", "(", "meters", "==", "0", ")", "{", "return", "this", ";", "}", "else", "if", "(", "meters", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"BoundingBo...
Creates a BoundingBox that is a fixed meter amount larger on all sides (but does not cross date line/poles). @param meters extension (must be >= 0) @return an extended BoundingBox or this (if meters == 0)
[ "Creates", "a", "BoundingBox", "that", "is", "a", "fixed", "meter", "amount", "larger", "on", "all", "sides", "(", "but", "does", "not", "cross", "date", "line", "/", "poles", ")", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/model/BoundingBox.java#L244-L260
RestComm/sipunit
src/main/java/org/cafesip/sipunit/EventSubscriber.java
EventSubscriber.replyToNotify
public boolean replyToNotify(RequestEvent reqevent, Response response) { """ This method sends the given response to the network in reply to the given request that was previously received. Call this method after processNotify() has handled the received request. @param reqevent The object returned by waitNotify...
java
public boolean replyToNotify(RequestEvent reqevent, Response response) { initErrorInfo(); if ((reqevent == null) || (reqevent.getRequest() == null) || (response == null)) { setErrorMessage("Cannot send reply, request or response info is null"); setReturnCode(SipSession.INVALID_ARGUMENT); retu...
[ "public", "boolean", "replyToNotify", "(", "RequestEvent", "reqevent", ",", "Response", "response", ")", "{", "initErrorInfo", "(", ")", ";", "if", "(", "(", "reqevent", "==", "null", ")", "||", "(", "reqevent", ".", "getRequest", "(", ")", "==", "null", ...
This method sends the given response to the network in reply to the given request that was previously received. Call this method after processNotify() has handled the received request. @param reqevent The object returned by waitNotify(). @param response The object returned by processNotify(), or a user-modified versio...
[ "This", "method", "sends", "the", "given", "response", "to", "the", "network", "in", "reply", "to", "the", "given", "request", "that", "was", "previously", "received", ".", "Call", "this", "method", "after", "processNotify", "()", "has", "handled", "the", "r...
train
https://github.com/RestComm/sipunit/blob/18a6be2e29be3fbdc14226e8c41b25e2d57378b1/src/main/java/org/cafesip/sipunit/EventSubscriber.java#L992-L1022
lucee/Lucee
core/src/main/java/lucee/runtime/tag/Ftp.java
Ftp.required
private void required(String attributeName, String atttributValue) throws ApplicationException { """ throw a error if the value is empty (null) @param attributeName @param atttributValue @throws ApplicationException """ if (atttributValue == null) throw new ApplicationException("invalid attribute co...
java
private void required(String attributeName, String atttributValue) throws ApplicationException { if (atttributValue == null) throw new ApplicationException("invalid attribute constelation for the tag ftp", "attribute [" + attributeName + "] is required, if action is [" + action + "]"); }
[ "private", "void", "required", "(", "String", "attributeName", ",", "String", "atttributValue", ")", "throws", "ApplicationException", "{", "if", "(", "atttributValue", "==", "null", ")", "throw", "new", "ApplicationException", "(", "\"invalid attribute constelation for...
throw a error if the value is empty (null) @param attributeName @param atttributValue @throws ApplicationException
[ "throw", "a", "error", "if", "the", "value", "is", "empty", "(", "null", ")" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/tag/Ftp.java#L646-L649
apache/incubator-atlas
client/src/main/java/org/apache/atlas/AtlasClient.java
AtlasClient.addTrait
public void addTrait(String guid, Struct traitDefinition) throws AtlasServiceException { """ Associate trait to an entity @param guid guid @param traitDefinition trait definition """ String traitJson = InstanceSerialization.toJson(traitDefinition, true); LOG.debug("Adding trait to enti...
java
public void addTrait(String guid, Struct traitDefinition) throws AtlasServiceException { String traitJson = InstanceSerialization.toJson(traitDefinition, true); LOG.debug("Adding trait to entity with id {} {}", guid, traitJson); callAPIWithBodyAndParams(API.ADD_TRAITS, traitJson, guid, URI_TRAIT...
[ "public", "void", "addTrait", "(", "String", "guid", ",", "Struct", "traitDefinition", ")", "throws", "AtlasServiceException", "{", "String", "traitJson", "=", "InstanceSerialization", ".", "toJson", "(", "traitDefinition", ",", "true", ")", ";", "LOG", ".", "de...
Associate trait to an entity @param guid guid @param traitDefinition trait definition
[ "Associate", "trait", "to", "an", "entity" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/client/src/main/java/org/apache/atlas/AtlasClient.java#L530-L534
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/WriterUtils.java
WriterUtils.mkdirsWithRecursivePermission
public static void mkdirsWithRecursivePermission(final FileSystem fs, final Path path, FsPermission perm) throws IOException { """ Create the given dir as well as all missing ancestor dirs. All created dirs will have the given permission. This should be used instead of {@link FileSystem#mkdirs(Path, FsPermission)...
java
public static void mkdirsWithRecursivePermission(final FileSystem fs, final Path path, FsPermission perm) throws IOException { mkdirsWithRecursivePermissionWithRetry(fs, path, perm, NO_RETRY_CONFIG); }
[ "public", "static", "void", "mkdirsWithRecursivePermission", "(", "final", "FileSystem", "fs", ",", "final", "Path", "path", ",", "FsPermission", "perm", ")", "throws", "IOException", "{", "mkdirsWithRecursivePermissionWithRetry", "(", "fs", ",", "path", ",", "perm"...
Create the given dir as well as all missing ancestor dirs. All created dirs will have the given permission. This should be used instead of {@link FileSystem#mkdirs(Path, FsPermission)}, since that method only sets the permission for the given dir, and not recursively for the ancestor dirs. @param fs FileSystem @param ...
[ "Create", "the", "given", "dir", "as", "well", "as", "all", "missing", "ancestor", "dirs", ".", "All", "created", "dirs", "will", "have", "the", "given", "permission", ".", "This", "should", "be", "used", "instead", "of", "{", "@link", "FileSystem#mkdirs", ...
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/WriterUtils.java#L277-L279
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/CassandraClientBase.java
CassandraClientBase.executeCQLQuery
protected Object executeCQLQuery(String cqlQuery, boolean isCql3Enabled) { """ Executes query string using cql3. @param cqlQuery the cql query @param isCql3Enabled the is cql3 enabled @return the object """ Cassandra.Client conn = null; Object pooledConnection = null; pooledConne...
java
protected Object executeCQLQuery(String cqlQuery, boolean isCql3Enabled) { Cassandra.Client conn = null; Object pooledConnection = null; pooledConnection = getConnection(); conn = (org.apache.cassandra.thrift.Cassandra.Client) getConnection(pooledConnection); try { if...
[ "protected", "Object", "executeCQLQuery", "(", "String", "cqlQuery", ",", "boolean", "isCql3Enabled", ")", "{", "Cassandra", ".", "Client", "conn", "=", "null", ";", "Object", "pooledConnection", "=", "null", ";", "pooledConnection", "=", "getConnection", "(", "...
Executes query string using cql3. @param cqlQuery the cql query @param isCql3Enabled the is cql3 enabled @return the object
[ "Executes", "query", "string", "using", "cql3", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/CassandraClientBase.java#L1828-L1850
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/command/CommandUtil.java
CommandUtil.addShortcut
private static void addShortcut(StringBuilder sb, Set<String> shortcuts) { """ Adds a parsed shortcut to the set of shortcuts. Only valid shortcuts are added. @param sb String builder containing a parsed shortcut. @param shortcuts Set to receive parsed shortcut. """ if (sb.length() > 0) { ...
java
private static void addShortcut(StringBuilder sb, Set<String> shortcuts) { if (sb.length() > 0) { String shortcut = validateShortcut(sb.toString()); if (shortcut != null) { shortcuts.add(shortcut); } sb.delete(0, sb.length...
[ "private", "static", "void", "addShortcut", "(", "StringBuilder", "sb", ",", "Set", "<", "String", ">", "shortcuts", ")", "{", "if", "(", "sb", ".", "length", "(", ")", ">", "0", ")", "{", "String", "shortcut", "=", "validateShortcut", "(", "sb", ".", ...
Adds a parsed shortcut to the set of shortcuts. Only valid shortcuts are added. @param sb String builder containing a parsed shortcut. @param shortcuts Set to receive parsed shortcut.
[ "Adds", "a", "parsed", "shortcut", "to", "the", "set", "of", "shortcuts", ".", "Only", "valid", "shortcuts", "are", "added", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/command/CommandUtil.java#L246-L256
kiswanij/jk-util
src/main/java/com/jk/util/model/table/JKDefaultTableModel.java
JKDefaultTableModel.insertRow
public void insertRow(final int row, final Vector rowData) { """ Inserts a row at <code>row</code> in the model. The new row will contain <code>null</code> values unless <code>rowData</code> is specified. Notification of the row being added will be generated. @param row the row index of the row to be inse...
java
public void insertRow(final int row, final Vector rowData) { this.dataVector.insertElementAt(rowData, row); justifyRows(row, row + 1); fireTableRowsInserted(row, row); }
[ "public", "void", "insertRow", "(", "final", "int", "row", ",", "final", "Vector", "rowData", ")", "{", "this", ".", "dataVector", ".", "insertElementAt", "(", "rowData", ",", "row", ")", ";", "justifyRows", "(", "row", ",", "row", "+", "1", ")", ";", ...
Inserts a row at <code>row</code> in the model. The new row will contain <code>null</code> values unless <code>rowData</code> is specified. Notification of the row being added will be generated. @param row the row index of the row to be inserted @param rowData optional data of the row being added @exception ArrayI...
[ "Inserts", "a", "row", "at", "<code", ">", "row<", "/", "code", ">", "in", "the", "model", ".", "The", "new", "row", "will", "contain", "<code", ">", "null<", "/", "code", ">", "values", "unless", "<code", ">", "rowData<", "/", "code", ">", "is", "...
train
https://github.com/kiswanij/jk-util/blob/8e0c85818423406f769444c76194a748e0a0fc0a/src/main/java/com/jk/util/model/table/JKDefaultTableModel.java#L437-L441
jamesagnew/hapi-fhir
hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java
AbstractJaxRsResourceProvider.conditionalUpdate
@PUT public Response conditionalUpdate(final String resource) throws IOException { """ Update an existing resource based on the given condition @param resource the body contents for the put method @return the response @see <a href="https://www.hl7.org/fhir/http.html#update">https://www.hl7.org/f...
java
@PUT public Response conditionalUpdate(final String resource) throws IOException { return execute(getResourceRequest(RequestTypeEnum.PUT, RestOperationTypeEnum.UPDATE).resource(resource)); }
[ "@", "PUT", "public", "Response", "conditionalUpdate", "(", "final", "String", "resource", ")", "throws", "IOException", "{", "return", "execute", "(", "getResourceRequest", "(", "RequestTypeEnum", ".", "PUT", ",", "RestOperationTypeEnum", ".", "UPDATE", ")", ".",...
Update an existing resource based on the given condition @param resource the body contents for the put method @return the response @see <a href="https://www.hl7.org/fhir/http.html#update">https://www.hl7.org/fhir/http.html#update</a>
[ "Update", "an", "existing", "resource", "based", "on", "the", "given", "condition" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L168-L172
Jasig/uPortal
uPortal-events/src/main/java/org/apereo/portal/events/aggr/EventDateTimeUtils.java
EventDateTimeUtils.createStandardQuarters
public static List<QuarterDetail> createStandardQuarters() { """ Create a new set of quarter details in the standard 1/1-4/1, 4/1-7/1, 7/1-10/1, 10/1-1/1 arrangement """ return ImmutableList.<QuarterDetail>of( new QuarterDetailImpl(new MonthDay(1, 1), new MonthDay(4, 1), 0), ...
java
public static List<QuarterDetail> createStandardQuarters() { return ImmutableList.<QuarterDetail>of( new QuarterDetailImpl(new MonthDay(1, 1), new MonthDay(4, 1), 0), new QuarterDetailImpl(new MonthDay(4, 1), new MonthDay(7, 1), 1), new QuarterDetailImpl(new Month...
[ "public", "static", "List", "<", "QuarterDetail", ">", "createStandardQuarters", "(", ")", "{", "return", "ImmutableList", ".", "<", "QuarterDetail", ">", "of", "(", "new", "QuarterDetailImpl", "(", "new", "MonthDay", "(", "1", ",", "1", ")", ",", "new", "...
Create a new set of quarter details in the standard 1/1-4/1, 4/1-7/1, 7/1-10/1, 10/1-1/1 arrangement
[ "Create", "a", "new", "set", "of", "quarter", "details", "in", "the", "standard", "1", "/", "1", "-", "4", "/", "1", "4", "/", "1", "-", "7", "/", "1", "7", "/", "1", "-", "10", "/", "1", "10", "/", "1", "-", "1", "/", "1", "arrangement" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-events/src/main/java/org/apereo/portal/events/aggr/EventDateTimeUtils.java#L192-L198
groupon/odo
client/src/main/java/com/groupon/odo/client/Client.java
Client.setCustomResponse
public boolean setCustomResponse(String pathName, String customResponse) throws Exception { """ Set a custom response for this path @param pathName name of path @param customResponse value of custom response @return true if success, false otherwise @throws Exception exception """ // figure out th...
java
public boolean setCustomResponse(String pathName, String customResponse) throws Exception { // figure out the new ordinal int nextOrdinal = this.getNextOrdinalForMethodId(-1, pathName); // add override this.addMethodToResponseOverride(pathName, "-1"); // set argument re...
[ "public", "boolean", "setCustomResponse", "(", "String", "pathName", ",", "String", "customResponse", ")", "throws", "Exception", "{", "// figure out the new ordinal", "int", "nextOrdinal", "=", "this", ".", "getNextOrdinalForMethodId", "(", "-", "1", ",", "pathName",...
Set a custom response for this path @param pathName name of path @param customResponse value of custom response @return true if success, false otherwise @throws Exception exception
[ "Set", "a", "custom", "response", "for", "this", "path" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/client/src/main/java/com/groupon/odo/client/Client.java#L568-L577
alkacon/opencms-core
src/org/opencms/gwt/A_CmsClientMessageBundle.java
A_CmsClientMessageBundle.importMessage
public String importMessage(String key, Locale locale) { """ Imports a message from another bundle.<p> @param key a key of the form classname#MESSAGE_FIELD_NAME @param locale the locale for which to import the message @return the imported message string """ key = key.trim(); String[] to...
java
public String importMessage(String key, Locale locale) { key = key.trim(); String[] tokens = key.split("#"); if (tokens.length != 2) { return null; } String className = tokens[0]; String messageName = tokens[1]; try { Method messagesGet = ...
[ "public", "String", "importMessage", "(", "String", "key", ",", "Locale", "locale", ")", "{", "key", "=", "key", ".", "trim", "(", ")", ";", "String", "[", "]", "tokens", "=", "key", ".", "split", "(", "\"#\"", ")", ";", "if", "(", "tokens", ".", ...
Imports a message from another bundle.<p> @param key a key of the form classname#MESSAGE_FIELD_NAME @param locale the locale for which to import the message @return the imported message string
[ "Imports", "a", "message", "from", "another", "bundle", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/A_CmsClientMessageBundle.java#L160-L177
apache/fluo
modules/core/src/main/java/org/apache/fluo/core/oracle/OracleClient.java
OracleClient.getStamp
public Stamp getStamp() { """ Retrieves time stamp from Oracle. Throws {@link FluoException} if timed out or interrupted. """ checkClosed(); TimeRequest tr = new TimeRequest(); try { queue.put(tr); int timeout = env.getConfiguration().getConnectionRetryTimeout(); if (timeout < 0)...
java
public Stamp getStamp() { checkClosed(); TimeRequest tr = new TimeRequest(); try { queue.put(tr); int timeout = env.getConfiguration().getConnectionRetryTimeout(); if (timeout < 0) { long waitPeriod = 1; long waitTotal = 0; while (!tr.cdl.await(waitPeriod, TimeUnit...
[ "public", "Stamp", "getStamp", "(", ")", "{", "checkClosed", "(", ")", ";", "TimeRequest", "tr", "=", "new", "TimeRequest", "(", ")", ";", "try", "{", "queue", ".", "put", "(", "tr", ")", ";", "int", "timeout", "=", "env", ".", "getConfiguration", "(...
Retrieves time stamp from Oracle. Throws {@link FluoException} if timed out or interrupted.
[ "Retrieves", "time", "stamp", "from", "Oracle", ".", "Throws", "{" ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/core/src/main/java/org/apache/fluo/core/oracle/OracleClient.java#L354-L382
NordicSemiconductor/Android-DFU-Library
dfu/src/main/java/no/nordicsemi/android/dfu/BaseDfuImpl.java
BaseDfuImpl.readNotificationResponse
byte[] readNotificationResponse() throws DeviceDisconnectedException, DfuException, UploadAbortedException { """ Waits until the notification will arrive. Returns the data returned by the notification. This method will block the thread until response is not ready or the device gets disconnected. If c...
java
byte[] readNotificationResponse() throws DeviceDisconnectedException, DfuException, UploadAbortedException { // do not clear the mReceiveData here. The response might already be obtained. Clear it in write request instead. try { synchronized (mLock) { while ((mReceivedData == null && mConnected &...
[ "byte", "[", "]", "readNotificationResponse", "(", ")", "throws", "DeviceDisconnectedException", ",", "DfuException", ",", "UploadAbortedException", "{", "// do not clear the mReceiveData here. The response might already be obtained. Clear it in write request instead.", "try", "{", "...
Waits until the notification will arrive. Returns the data returned by the notification. This method will block the thread until response is not ready or the device gets disconnected. If connection state will change, or an error will occur, an exception will be thrown. @return the value returned by the Control Point n...
[ "Waits", "until", "the", "notification", "will", "arrive", ".", "Returns", "the", "data", "returned", "by", "the", "notification", ".", "This", "method", "will", "block", "the", "thread", "until", "response", "is", "not", "ready", "or", "the", "device", "get...
train
https://github.com/NordicSemiconductor/Android-DFU-Library/blob/ec14c8c522bebe801a9a4c3dfbbeb1f53262c03f/dfu/src/main/java/no/nordicsemi/android/dfu/BaseDfuImpl.java#L715-L733
calrissian/mango
mango-core/src/main/java/org/calrissian/mango/collect/CloseableIterables.java
CloseableIterables.paddedParition
public static <T> CloseableIterable<List<T>> paddedParition(final CloseableIterable<T> iterable, final int size) { """ Divides a closeable iterable into unmodifiable sublists of the given size, padding the final list with null values if necessary. For example, partitioning a closeable iterable containing {@code ...
java
public static <T> CloseableIterable<List<T>> paddedParition(final CloseableIterable<T> iterable, final int size) { return wrap(Iterables.paddedPartition(iterable, size), iterable); }
[ "public", "static", "<", "T", ">", "CloseableIterable", "<", "List", "<", "T", ">", ">", "paddedParition", "(", "final", "CloseableIterable", "<", "T", ">", "iterable", ",", "final", "int", "size", ")", "{", "return", "wrap", "(", "Iterables", ".", "padd...
Divides a closeable iterable into unmodifiable sublists of the given size, padding the final list with null values if necessary. For example, partitioning a closeable iterable containing {@code [a, b, c, d, e]} with a partition size of 3 yields {@code [[a, b, c], [d, e, null]]} -- an outer iterable containing two inner...
[ "Divides", "a", "closeable", "iterable", "into", "unmodifiable", "sublists", "of", "the", "given", "size", "padding", "the", "final", "list", "with", "null", "values", "if", "necessary", ".", "For", "example", "partitioning", "a", "closeable", "iterable", "conta...
train
https://github.com/calrissian/mango/blob/a95aa5e77af9aa0e629787228d80806560023452/mango-core/src/main/java/org/calrissian/mango/collect/CloseableIterables.java#L182-L184