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
alkacon/opencms-core
src/org/opencms/widgets/dataview/CmsDataViewQuery.java
CmsDataViewQuery.setFilterValues
public void setFilterValues(LinkedHashMap<String, String> filterValues) { """ Sets the selected filter values.<p> @param filterValues the filter values """ m_filterValues = new LinkedHashMap<String, String>(filterValues); }
java
public void setFilterValues(LinkedHashMap<String, String> filterValues) { m_filterValues = new LinkedHashMap<String, String>(filterValues); }
[ "public", "void", "setFilterValues", "(", "LinkedHashMap", "<", "String", ",", "String", ">", "filterValues", ")", "{", "m_filterValues", "=", "new", "LinkedHashMap", "<", "String", ",", "String", ">", "(", "filterValues", ")", ";", "}" ]
Sets the selected filter values.<p> @param filterValues the filter values
[ "Sets", "the", "selected", "filter", "values", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/dataview/CmsDataViewQuery.java#L99-L102
grpc/grpc-java
stub/src/main/java/io/grpc/stub/AbstractStub.java
AbstractStub.withInterceptors
public final S withInterceptors(ClientInterceptor... interceptors) { """ Returns a new stub that has the given interceptors attached to the underlying channel. @since 1.0.0 """ return build(ClientInterceptors.intercept(channel, interceptors), callOptions); }
java
public final S withInterceptors(ClientInterceptor... interceptors) { return build(ClientInterceptors.intercept(channel, interceptors), callOptions); }
[ "public", "final", "S", "withInterceptors", "(", "ClientInterceptor", "...", "interceptors", ")", "{", "return", "build", "(", "ClientInterceptors", ".", "intercept", "(", "channel", ",", "interceptors", ")", ",", "callOptions", ")", ";", "}" ]
Returns a new stub that has the given interceptors attached to the underlying channel. @since 1.0.0
[ "Returns", "a", "new", "stub", "that", "has", "the", "given", "interceptors", "attached", "to", "the", "underlying", "channel", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/stub/src/main/java/io/grpc/stub/AbstractStub.java#L184-L186
Erudika/para
para-core/src/main/java/com/erudika/para/core/App.java
App.addValidationConstraint
public boolean addValidationConstraint(String type, String field, Constraint c) { """ Adds a new constraint to the list of constraints for a given field and type. @param type the type @param field the field @param c the constraint @return true if successful """ if (!StringUtils.isBlank(type) && !StringUt...
java
public boolean addValidationConstraint(String type, String field, Constraint c) { if (!StringUtils.isBlank(type) && !StringUtils.isBlank(field) && c != null && !c.getPayload().isEmpty() && Constraint.isValidConstraintName(c.getName())) { Map<String, Map<String, Map<String, ?>>> fieldMap = getValidationCons...
[ "public", "boolean", "addValidationConstraint", "(", "String", "type", ",", "String", "field", ",", "Constraint", "c", ")", "{", "if", "(", "!", "StringUtils", ".", "isBlank", "(", "type", ")", "&&", "!", "StringUtils", ".", "isBlank", "(", "field", ")", ...
Adds a new constraint to the list of constraints for a given field and type. @param type the type @param field the field @param c the constraint @return true if successful
[ "Adds", "a", "new", "constraint", "to", "the", "list", "of", "constraints", "for", "a", "given", "field", "and", "type", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-core/src/main/java/com/erudika/para/core/App.java#L519-L540
alkacon/opencms-core
src/org/opencms/ui/components/CmsResourceIcon.java
CmsResourceIcon.getIconHTML
public static String getIconHTML(CmsResourceUtil resUtil, CmsResourceState state, boolean showLocks) { """ Returns the icon HTML.<p> @param resUtil the resource util for the resource @param state the resource state @param showLocks <code>true</code> to show lock state overlay @return the icon HTML """ ...
java
public static String getIconHTML(CmsResourceUtil resUtil, CmsResourceState state, boolean showLocks) { return "<span class=\"" + OpenCmsTheme.RESOURCE_ICON + "\">" + getIconInnerHTML(resUtil, state, showLocks, true) + "</span>"; }
[ "public", "static", "String", "getIconHTML", "(", "CmsResourceUtil", "resUtil", ",", "CmsResourceState", "state", ",", "boolean", "showLocks", ")", "{", "return", "\"<span class=\\\"\"", "+", "OpenCmsTheme", ".", "RESOURCE_ICON", "+", "\"\\\">\"", "+", "getIconInnerHT...
Returns the icon HTML.<p> @param resUtil the resource util for the resource @param state the resource state @param showLocks <code>true</code> to show lock state overlay @return the icon HTML
[ "Returns", "the", "icon", "HTML", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/CmsResourceIcon.java#L203-L210
dadoonet/elasticsearch-beyonder
src/main/java/fr/pilato/elasticsearch/tools/template/TemplateElasticsearchUpdater.java
TemplateElasticsearchUpdater.isTemplateExist
public static boolean isTemplateExist(RestClient client, String template) throws IOException { """ Check if a template exists @param client Elasticsearch client @param template template name @return true if the template exists @throws IOException if something goes wrong """ Response response = client.per...
java
public static boolean isTemplateExist(RestClient client, String template) throws IOException { Response response = client.performRequest(new Request("HEAD", "/_template/" + template)); return response.getStatusLine().getStatusCode() == 200; }
[ "public", "static", "boolean", "isTemplateExist", "(", "RestClient", "client", ",", "String", "template", ")", "throws", "IOException", "{", "Response", "response", "=", "client", ".", "performRequest", "(", "new", "Request", "(", "\"HEAD\"", ",", "\"/_template/\"...
Check if a template exists @param client Elasticsearch client @param template template name @return true if the template exists @throws IOException if something goes wrong
[ "Check", "if", "a", "template", "exists" ]
train
https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/template/TemplateElasticsearchUpdater.java#L230-L233
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLStreamHandler.java
URLStreamHandler.hostsEqual
protected boolean hostsEqual(URL u1, URL u2) { """ Compares the host components of two URLs. @param u1 the URL of the first host to compare @param u2 the URL of the second host to compare @return {@code true} if and only if they are equal, {@code false} otherwise. @since 1.3 """ // Android-change...
java
protected boolean hostsEqual(URL u1, URL u2) { // Android-changed: Don't compare the InetAddresses of the hosts. if (u1.getHost() != null && u2.getHost() != null) return u1.getHost().equalsIgnoreCase(u2.getHost()); else return u1.getHost() == null && u2.getHost() == null...
[ "protected", "boolean", "hostsEqual", "(", "URL", "u1", ",", "URL", "u2", ")", "{", "// Android-changed: Don't compare the InetAddresses of the hosts.", "if", "(", "u1", ".", "getHost", "(", ")", "!=", "null", "&&", "u2", ".", "getHost", "(", ")", "!=", "null"...
Compares the host components of two URLs. @param u1 the URL of the first host to compare @param u2 the URL of the second host to compare @return {@code true} if and only if they are equal, {@code false} otherwise. @since 1.3
[ "Compares", "the", "host", "components", "of", "two", "URLs", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLStreamHandler.java#L482-L488
cryptomator/cryptolib
src/main/java/org/cryptomator/cryptolib/common/ByteBuffers.java
ByteBuffers.copy
public static int copy(ByteBuffer source, ByteBuffer destination) { """ Copies as many bytes as possible from the given source to the destination buffer. The position of both buffers will be incremented by as many bytes as have been copied. @param source ByteBuffer from which bytes are read @param destination...
java
public static int copy(ByteBuffer source, ByteBuffer destination) { final int numBytes = Math.min(source.remaining(), destination.remaining()); final ByteBuffer tmp = source.asReadOnlyBuffer(); tmp.limit(tmp.position() + numBytes); destination.put(tmp); source.position(tmp.position()); // until now only tmp p...
[ "public", "static", "int", "copy", "(", "ByteBuffer", "source", ",", "ByteBuffer", "destination", ")", "{", "final", "int", "numBytes", "=", "Math", ".", "min", "(", "source", ".", "remaining", "(", ")", ",", "destination", ".", "remaining", "(", ")", ")...
Copies as many bytes as possible from the given source to the destination buffer. The position of both buffers will be incremented by as many bytes as have been copied. @param source ByteBuffer from which bytes are read @param destination ByteBuffer into which bytes are written @return number of bytes copied, i.e. {@l...
[ "Copies", "as", "many", "bytes", "as", "possible", "from", "the", "given", "source", "to", "the", "destination", "buffer", ".", "The", "position", "of", "both", "buffers", "will", "be", "incremented", "by", "as", "many", "bytes", "as", "have", "been", "cop...
train
https://github.com/cryptomator/cryptolib/blob/33bc881f6ee7d4924043ea6309efd2c063ec3638/src/main/java/org/cryptomator/cryptolib/common/ByteBuffers.java#L23-L30
trajano/caliper
caliper/src/main/java/com/google/caliper/runner/ServerSocketService.java
ServerSocketService.getOutputStream
private static OutputStream getOutputStream(final Socket socket) throws IOException { """ Returns an {@link OutputStream} for the socket, but unlike {@link Socket#getOutputStream()} when you call {@link OutputStream#close() close} it only closes the output end of the socket instead of the entire socket. """ ...
java
private static OutputStream getOutputStream(final Socket socket) throws IOException { final OutputStream delegate = socket.getOutputStream(); return new OutputStream() { @Override public void close() throws IOException { delegate.flush(); synchronized (socket) { socket.shutdownO...
[ "private", "static", "OutputStream", "getOutputStream", "(", "final", "Socket", "socket", ")", "throws", "IOException", "{", "final", "OutputStream", "delegate", "=", "socket", ".", "getOutputStream", "(", ")", ";", "return", "new", "OutputStream", "(", ")", "{"...
Returns an {@link OutputStream} for the socket, but unlike {@link Socket#getOutputStream()} when you call {@link OutputStream#close() close} it only closes the output end of the socket instead of the entire socket.
[ "Returns", "an", "{" ]
train
https://github.com/trajano/caliper/blob/a8bcfd84fa9d7b893b3edfadc3b13240ae5cd658/caliper/src/main/java/com/google/caliper/runner/ServerSocketService.java#L255-L286
nguyenq/tess4j
src/main/java/net/sourceforge/tess4j/util/LoadLibs.java
LoadLibs.copyFromWarToFolder
static void copyFromWarToFolder(VirtualFile virtualFileOrFolder, File targetFolder) throws IOException { """ Copies resources from WAR to target folder. @param virtualFileOrFolder @param targetFolder @throws IOException """ if (virtualFileOrFolder.isDirectory() && !virtualFileOrFolder.getName().co...
java
static void copyFromWarToFolder(VirtualFile virtualFileOrFolder, File targetFolder) throws IOException { if (virtualFileOrFolder.isDirectory() && !virtualFileOrFolder.getName().contains(".")) { if (targetFolder.getName().equalsIgnoreCase(virtualFileOrFolder.getName())) { for (Virtual...
[ "static", "void", "copyFromWarToFolder", "(", "VirtualFile", "virtualFileOrFolder", ",", "File", "targetFolder", ")", "throws", "IOException", "{", "if", "(", "virtualFileOrFolder", ".", "isDirectory", "(", ")", "&&", "!", "virtualFileOrFolder", ".", "getName", "(",...
Copies resources from WAR to target folder. @param virtualFileOrFolder @param targetFolder @throws IOException
[ "Copies", "resources", "from", "WAR", "to", "target", "folder", "." ]
train
https://github.com/nguyenq/tess4j/blob/cfcd4a8a44042f150b4aaf7bdf5ffc485a2236e1/src/main/java/net/sourceforge/tess4j/util/LoadLibs.java#L216-L235
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/functions/core/RandomStringFunction.java
RandomStringFunction.getRandomString
public static String getRandomString(int numberOfLetters, char[] alphabet, boolean includeNumbers) { """ Static random number generator aware string generating method. @param numberOfLetters @param alphabet @param includeNumbers @return """ StringBuilder builder = new StringBuilder(); ...
java
public static String getRandomString(int numberOfLetters, char[] alphabet, boolean includeNumbers) { StringBuilder builder = new StringBuilder(); int upperRange = alphabet.length - 1; // make sure first character is not a number builder.append(alphabet[generator.nextInt...
[ "public", "static", "String", "getRandomString", "(", "int", "numberOfLetters", ",", "char", "[", "]", "alphabet", ",", "boolean", "includeNumbers", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "int", "upperRange", "=", "al...
Static random number generator aware string generating method. @param numberOfLetters @param alphabet @param includeNumbers @return
[ "Static", "random", "number", "generator", "aware", "string", "generating", "method", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/functions/core/RandomStringFunction.java#L107-L130
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java
GrailsClassUtils.isMatchBetweenPrimativeAndWrapperTypes
@SuppressWarnings("rawtypes") public static boolean isMatchBetweenPrimativeAndWrapperTypes(Class leftType, Class rightType) { """ Detect if left and right types are matching types. In particular, test if one is a primitive type and the other is the corresponding Java wrapper type. Primitive and wrapper class...
java
@SuppressWarnings("rawtypes") public static boolean isMatchBetweenPrimativeAndWrapperTypes(Class leftType, Class rightType) { if (leftType == null) { throw new NullPointerException("Left type is null!"); } if (rightType == null) { throw new NullPointerException("Right...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "static", "boolean", "isMatchBetweenPrimativeAndWrapperTypes", "(", "Class", "leftType", ",", "Class", "rightType", ")", "{", "if", "(", "leftType", "==", "null", ")", "{", "throw", "new", "NullPointerEx...
Detect if left and right types are matching types. In particular, test if one is a primitive type and the other is the corresponding Java wrapper type. Primitive and wrapper classes may be passed to either arguments. @param leftType @param rightType @return true if one of the classes is a native type and the other the...
[ "Detect", "if", "left", "and", "right", "types", "are", "matching", "types", ".", "In", "particular", "test", "if", "one", "is", "a", "primitive", "type", "and", "the", "other", "is", "the", "corresponding", "Java", "wrapper", "type", ".", "Primitive", "an...
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L457-L467
aboutsip/sipstack
sipstack-example/src/main/java/io/sipstack/example/netty/sip/proxyregistrar/ProxyRegistrarHandler.java
ProxyRegistrarHandler.processRegisterRequest
private SipResponse processRegisterRequest(final SipRequest request) { """ Section 10.3 in RFC3261 outlines how to process a register request. For the purpose of this little exercise, we are skipping many steps just to keep things simple. @param request """ final SipURI requestURI = (SipURI) reques...
java
private SipResponse processRegisterRequest(final SipRequest request) { final SipURI requestURI = (SipURI) request.getRequestUri(); final Buffer domain = requestURI.getHost(); final SipURI aor = getAOR(request); // the aor is not allowed to register under this domain // generate ...
[ "private", "SipResponse", "processRegisterRequest", "(", "final", "SipRequest", "request", ")", "{", "final", "SipURI", "requestURI", "=", "(", "SipURI", ")", "request", ".", "getRequestUri", "(", ")", ";", "final", "Buffer", "domain", "=", "requestURI", ".", ...
Section 10.3 in RFC3261 outlines how to process a register request. For the purpose of this little exercise, we are skipping many steps just to keep things simple. @param request
[ "Section", "10", ".", "3", "in", "RFC3261", "outlines", "how", "to", "process", "a", "register", "request", ".", "For", "the", "purpose", "of", "this", "little", "exercise", "we", "are", "skipping", "many", "steps", "just", "to", "keep", "things", "simple"...
train
https://github.com/aboutsip/sipstack/blob/33f2db1d580738f0385687b0429fab0630118f42/sipstack-example/src/main/java/io/sipstack/example/netty/sip/proxyregistrar/ProxyRegistrarHandler.java#L188-L220
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/views/overlay/OverlayItem.java
OverlayItem.setState
public static void setState(final Drawable drawable, final int stateBitset) { """ /* (copied from the Google API docs) Sets the state of a drawable to match a given state bitset. This is done by converting the state bitset bits into a state set of R.attr.state_pressed, R.attr.state_selected and R.attr.state_foc...
java
public static void setState(final Drawable drawable, final int stateBitset) { final int[] states = new int[3]; int index = 0; if ((stateBitset & ITEM_STATE_PRESSED_MASK) > 0) states[index++] = android.R.attr.state_pressed; if ((stateBitset & ITEM_STATE_SELECTED_MASK) > 0) states[index++] = android.R.attr....
[ "public", "static", "void", "setState", "(", "final", "Drawable", "drawable", ",", "final", "int", "stateBitset", ")", "{", "final", "int", "[", "]", "states", "=", "new", "int", "[", "3", "]", ";", "int", "index", "=", "0", ";", "if", "(", "(", "s...
/* (copied from the Google API docs) Sets the state of a drawable to match a given state bitset. This is done by converting the state bitset bits into a state set of R.attr.state_pressed, R.attr.state_selected and R.attr.state_focused attributes, and then calling {@link Drawable.setState(int[])}.
[ "/", "*", "(", "copied", "from", "the", "Google", "API", "docs", ")", "Sets", "the", "state", "of", "a", "drawable", "to", "match", "a", "given", "state", "bitset", ".", "This", "is", "done", "by", "converting", "the", "state", "bitset", "bits", "into"...
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/views/overlay/OverlayItem.java#L140-L151
spring-projects/spring-plugin
core/src/main/java/org/springframework/plugin/core/OrderAwarePluginRegistry.java
OrderAwarePluginRegistry.createReverse
@Deprecated public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> createReverse(List<? extends T> plugins) { """ Creates a new {@link OrderAwarePluginRegistry} with the given {@link Plugin}s and the order of the {@link Plugin}s reverted. @param plugins must not be {@literal null}. @return @d...
java
@Deprecated public static <S, T extends Plugin<S>> OrderAwarePluginRegistry<T, S> createReverse(List<? extends T> plugins) { return of(plugins, DEFAULT_REVERSE_COMPARATOR); }
[ "@", "Deprecated", "public", "static", "<", "S", ",", "T", "extends", "Plugin", "<", "S", ">", ">", "OrderAwarePluginRegistry", "<", "T", ",", "S", ">", "createReverse", "(", "List", "<", "?", "extends", "T", ">", "plugins", ")", "{", "return", "of", ...
Creates a new {@link OrderAwarePluginRegistry} with the given {@link Plugin}s and the order of the {@link Plugin}s reverted. @param plugins must not be {@literal null}. @return @deprecated since 2.0, for removal in 2.1. Prefer {@link OrderAwarePluginRegistry#ofReverse(List)}
[ "Creates", "a", "new", "{", "@link", "OrderAwarePluginRegistry", "}", "with", "the", "given", "{", "@link", "Plugin", "}", "s", "and", "the", "order", "of", "the", "{", "@link", "Plugin", "}", "s", "reverted", "." ]
train
https://github.com/spring-projects/spring-plugin/blob/953d2ce12f05f26444fbb3bf21011f538f729868/core/src/main/java/org/springframework/plugin/core/OrderAwarePluginRegistry.java#L190-L193
uniform-java/uniform
src/main/java/net/uniform/api/html/SimpleHTMLTag.java
SimpleHTMLTag.setProperty
public SimpleHTMLTag setProperty(String key, String value) { """ Sets a property of the tag by key. @param key Property key @param value Property value @return This tag """ key = UniformUtils.checkPropertyNameAndLowerCase(key); if (properties == null) { properties = new Ha...
java
public SimpleHTMLTag setProperty(String key, String value) { key = UniformUtils.checkPropertyNameAndLowerCase(key); if (properties == null) { properties = new HashMap<>(); } properties.put(key, value); return this; }
[ "public", "SimpleHTMLTag", "setProperty", "(", "String", "key", ",", "String", "value", ")", "{", "key", "=", "UniformUtils", ".", "checkPropertyNameAndLowerCase", "(", "key", ")", ";", "if", "(", "properties", "==", "null", ")", "{", "properties", "=", "new...
Sets a property of the tag by key. @param key Property key @param value Property value @return This tag
[ "Sets", "a", "property", "of", "the", "tag", "by", "key", "." ]
train
https://github.com/uniform-java/uniform/blob/0b84f0db562253165bc06c69f631e464dca0cb48/src/main/java/net/uniform/api/html/SimpleHTMLTag.java#L192-L202
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/form/CmsBasicFormField.java
CmsBasicFormField.createField
public static CmsBasicFormField createField( CmsXmlContentProperty propertyConfig, String fieldId, I_CmsFormWidgetMultiFactory factory, Map<String, String> additionalParams, boolean alwaysAllowEmpty) { """ Utility method for creating a single basic form field from an id and ...
java
public static CmsBasicFormField createField( CmsXmlContentProperty propertyConfig, String fieldId, I_CmsFormWidgetMultiFactory factory, Map<String, String> additionalParams, boolean alwaysAllowEmpty) { String widgetConfigStr = propertyConfig.getWidgetConfiguration(); ...
[ "public", "static", "CmsBasicFormField", "createField", "(", "CmsXmlContentProperty", "propertyConfig", ",", "String", "fieldId", ",", "I_CmsFormWidgetMultiFactory", "factory", ",", "Map", "<", "String", ",", "String", ">", "additionalParams", ",", "boolean", "alwaysAll...
Utility method for creating a single basic form field from an id and a property configuration. @param propertyConfig the configuration of the property @param fieldId the field id @param factory a factory for creating form widgets @param additionalParams additional field parameters @param alwaysAllowEmpty indicates an...
[ "Utility", "method", "for", "creating", "a", "single", "basic", "form", "field", "from", "an", "id", "and", "a", "property", "configuration", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/form/CmsBasicFormField.java#L148-L188
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/websphere/logging/hpel/reader/HpelCBEFormatter.java
HpelCBEFormatter.createExtendedElement
private void createExtendedElement(StringBuilder sb, RepositoryLogRecord record, String extensionID) { """ Appends the CBE Extended Data Element of a record's extension to a String buffer @param sb the string buffer the element will be added to @param record the record that represents the c...
java
private void createExtendedElement(StringBuilder sb, RepositoryLogRecord record, String extensionID){ String edeValue = record.getExtension(extensionID); if (edeValue != null && !edeValue.isEmpty()){ createExtendedElement(sb, extensionID, "string", edeValue); } }
[ "private", "void", "createExtendedElement", "(", "StringBuilder", "sb", ",", "RepositoryLogRecord", "record", ",", "String", "extensionID", ")", "{", "String", "edeValue", "=", "record", ".", "getExtension", "(", "extensionID", ")", ";", "if", "(", "edeValue", "...
Appends the CBE Extended Data Element of a record's extension to a String buffer @param sb the string buffer the element will be added to @param record the record that represents the common base event @param extensionId the extension ID field from the record to use
[ "Appends", "the", "CBE", "Extended", "Data", "Element", "of", "a", "record", "s", "extension", "to", "a", "String", "buffer" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/websphere/logging/hpel/reader/HpelCBEFormatter.java#L264-L269
undertow-io/undertow
core/src/main/java/io/undertow/util/DateUtils.java
DateUtils.handleIfModifiedSince
public static boolean handleIfModifiedSince(final String modifiedSince, final Date lastModified) { """ Handles the if-modified-since header. returns true if the request should proceed, false otherwise @param modifiedSince the modified since date @param lastModified The last modified date @return """ ...
java
public static boolean handleIfModifiedSince(final String modifiedSince, final Date lastModified) { if (lastModified == null) { return true; } if (modifiedSince == null) { return true; } Date modDate = parseDate(modifiedSince); if (modDate == null) ...
[ "public", "static", "boolean", "handleIfModifiedSince", "(", "final", "String", "modifiedSince", ",", "final", "Date", "lastModified", ")", "{", "if", "(", "lastModified", "==", "null", ")", "{", "return", "true", ";", "}", "if", "(", "modifiedSince", "==", ...
Handles the if-modified-since header. returns true if the request should proceed, false otherwise @param modifiedSince the modified since date @param lastModified The last modified date @return
[ "Handles", "the", "if", "-", "modified", "-", "since", "header", ".", "returns", "true", "if", "the", "request", "should", "proceed", "false", "otherwise" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/DateUtils.java#L191-L203
kmi/iserve
iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/impl/GenericLogicDiscoverer.java
GenericLogicDiscoverer.findOperationsClassifiedBySome
@Override public Map<URI, MatchResult> findOperationsClassifiedBySome(Set<URI> modelReferences) { """ Discover the operations that are classified by some (i.e., at least one) of the types given. That is, all those that have some level of matching with respect to at least one entity provided in the model refer...
java
@Override public Map<URI, MatchResult> findOperationsClassifiedBySome(Set<URI> modelReferences) { return findServicesClassifiedBySome(modelReferences, LogicConceptMatchType.Subsume); }
[ "@", "Override", "public", "Map", "<", "URI", ",", "MatchResult", ">", "findOperationsClassifiedBySome", "(", "Set", "<", "URI", ">", "modelReferences", ")", "{", "return", "findServicesClassifiedBySome", "(", "modelReferences", ",", "LogicConceptMatchType", ".", "S...
Discover the operations that are classified by some (i.e., at least one) of the types given. That is, all those that have some level of matching with respect to at least one entity provided in the model references. @param modelReferences the classifications to match against @return a Set containing all the matching op...
[ "Discover", "the", "operations", "that", "are", "classified", "by", "some", "(", "i", ".", "e", ".", "at", "least", "one", ")", "of", "the", "types", "given", ".", "That", "is", "all", "those", "that", "have", "some", "level", "of", "matching", "with",...
train
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/impl/GenericLogicDiscoverer.java#L333-L336
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java
base_resource.unset_string
protected String unset_string(nitro_service service, String id, options option, String args[]) throws Exception { """ forms a String for unset operation on a resource. @param service nitro_service object. @param id session id. @param option Options object. @param args Array of args that are to be unset. @ret...
java
protected String unset_string(nitro_service service, String id, options option, String args[]) throws Exception { Boolean warning = service.get_warning(); String result = service.get_payload_formatter().unset_string(this, id, option, args, warning); return result; }
[ "protected", "String", "unset_string", "(", "nitro_service", "service", ",", "String", "id", ",", "options", "option", ",", "String", "args", "[", "]", ")", "throws", "Exception", "{", "Boolean", "warning", "=", "service", ".", "get_warning", "(", ")", ";", ...
forms a String for unset operation on a resource. @param service nitro_service object. @param id session id. @param option Options object. @param args Array of args that are to be unset. @return string in Json format. @throws Exception if invalid input is given.
[ "forms", "a", "String", "for", "unset", "operation", "on", "a", "resource", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/base/base_resource.java#L93-L98
hal/elemento
template-processor/src/main/java/org/jboss/gwt/elemento/processor/TemplatedProcessor.java
TemplatedProcessor.abortWithError
private void abortWithError(Element element, String msg, Object... args) throws AbortProcessingException { """ Issue a compilation error and abandon the processing of this template. This does not prevent the processing of other templates. """ error(element, msg, args); throw new AbortProcessin...
java
private void abortWithError(Element element, String msg, Object... args) throws AbortProcessingException { error(element, msg, args); throw new AbortProcessingException(); }
[ "private", "void", "abortWithError", "(", "Element", "element", ",", "String", "msg", ",", "Object", "...", "args", ")", "throws", "AbortProcessingException", "{", "error", "(", "element", ",", "msg", ",", "args", ")", ";", "throw", "new", "AbortProcessingExce...
Issue a compilation error and abandon the processing of this template. This does not prevent the processing of other templates.
[ "Issue", "a", "compilation", "error", "and", "abandon", "the", "processing", "of", "this", "template", ".", "This", "does", "not", "prevent", "the", "processing", "of", "other", "templates", "." ]
train
https://github.com/hal/elemento/blob/26da2d5a1fe2ec55b779737dbaeda25a942eee61/template-processor/src/main/java/org/jboss/gwt/elemento/processor/TemplatedProcessor.java#L711-L714
fabric8io/fabric8-forge
addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelXmlHelper.java
CamelXmlHelper.collapseNode
private static String collapseNode(String xml, String name) { """ Collapses all the named node in the XML @param xml the XML @param name the name of the node @return the XML with collapsed nodes """ String answer = xml; Pattern pattern = Pattern.compile("<" + name + "(.*)></" + name + ">...
java
private static String collapseNode(String xml, String name) { String answer = xml; Pattern pattern = Pattern.compile("<" + name + "(.*)></" + name + ">"); Matcher matcher = pattern.matcher(answer); if (matcher.find()) { answer = matcher.replaceAll("<" + name + "$1/>"); ...
[ "private", "static", "String", "collapseNode", "(", "String", "xml", ",", "String", "name", ")", "{", "String", "answer", "=", "xml", ";", "Pattern", "pattern", "=", "Pattern", ".", "compile", "(", "\"<\"", "+", "name", "+", "\"(.*)></\"", "+", "name", "...
Collapses all the named node in the XML @param xml the XML @param name the name of the node @return the XML with collapsed nodes
[ "Collapses", "all", "the", "named", "node", "in", "the", "XML" ]
train
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelXmlHelper.java#L484-L493
vznet/mongo-jackson-mapper
src/main/java/net/vz/mongodb/jackson/DBUpdate.java
DBUpdate.addToSet
public static Builder addToSet(String field, List<?> values) { """ Add the given values to the array value if they don't already exist in the specified field atomically @param field The field to add the values to @param values The values to add @return this object """ return new Builder().addToSe...
java
public static Builder addToSet(String field, List<?> values) { return new Builder().addToSet(field, values); }
[ "public", "static", "Builder", "addToSet", "(", "String", "field", ",", "List", "<", "?", ">", "values", ")", "{", "return", "new", "Builder", "(", ")", ".", "addToSet", "(", "field", ",", "values", ")", ";", "}" ]
Add the given values to the array value if they don't already exist in the specified field atomically @param field The field to add the values to @param values The values to add @return this object
[ "Add", "the", "given", "values", "to", "the", "array", "value", "if", "they", "don", "t", "already", "exist", "in", "the", "specified", "field", "atomically" ]
train
https://github.com/vznet/mongo-jackson-mapper/blob/ecd189aefa89636cddf70fb383f5d676be347976/src/main/java/net/vz/mongodb/jackson/DBUpdate.java#L145-L147
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VpnSitesInner.java
VpnSitesInner.getByResourceGroup
public VpnSiteInner getByResourceGroup(String resourceGroupName, String vpnSiteName) { """ Retrieves the details of a VPNsite. @param resourceGroupName The resource group name of the VpnSite. @param vpnSiteName The name of the VpnSite being retrieved. @throws IllegalArgumentException thrown if parameters fail...
java
public VpnSiteInner getByResourceGroup(String resourceGroupName, String vpnSiteName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vpnSiteName).toBlocking().single().body(); }
[ "public", "VpnSiteInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "vpnSiteName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "vpnSiteName", ")", ".", "toBlocking", "(", ")", ".", "sing...
Retrieves the details of a VPNsite. @param resourceGroupName The resource group name of the VpnSite. @param vpnSiteName The name of the VpnSite being retrieved. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorException thrown if the request is rejected by server @throws RuntimeEx...
[ "Retrieves", "the", "details", "of", "a", "VPNsite", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VpnSitesInner.java#L126-L128
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/authentication/ChallengeCache.java
ChallengeCache.addCachedChallenge
public void addCachedChallenge(HttpUrl url, Map<String, String> challenge) { """ Uses authority to cache challenge. @param url the url that is used as a cache key. @param challenge the challenge to cache. """ if (url == null || challenge == null) { return; } String aut...
java
public void addCachedChallenge(HttpUrl url, Map<String, String> challenge) { if (url == null || challenge == null) { return; } String authority = getAuthority(url); authority = authority.toLowerCase(Locale.ENGLISH); cachedChallenges.put(authority, challenge); }
[ "public", "void", "addCachedChallenge", "(", "HttpUrl", "url", ",", "Map", "<", "String", ",", "String", ">", "challenge", ")", "{", "if", "(", "url", "==", "null", "||", "challenge", "==", "null", ")", "{", "return", ";", "}", "String", "authority", "...
Uses authority to cache challenge. @param url the url that is used as a cache key. @param challenge the challenge to cache.
[ "Uses", "authority", "to", "cache", "challenge", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/authentication/ChallengeCache.java#L43-L50
GCRC/nunaliit
nunaliit2-utils/src/main/java/ca/carleton/gcrc/utils/PropertiesWriter.java
PropertiesWriter.saveConvert
private String saveConvert(String theString, boolean escapeSpace) { """ /* Converts unicodes to encoded &#92;uxxxx and escapes special characters with a preceding slash """ int len = theString.length(); int bufLen = len * 2; if (bufLen < 0) { bufLen = Integer.MAX_VALUE; } StringBuffer outBuffer ...
java
private String saveConvert(String theString, boolean escapeSpace) { int len = theString.length(); int bufLen = len * 2; if (bufLen < 0) { bufLen = Integer.MAX_VALUE; } StringBuffer outBuffer = new StringBuffer(bufLen); for (int x = 0; x < len; x++) { char aChar = theString.charAt(x); // Handle com...
[ "private", "String", "saveConvert", "(", "String", "theString", ",", "boolean", "escapeSpace", ")", "{", "int", "len", "=", "theString", ".", "length", "(", ")", ";", "int", "bufLen", "=", "len", "*", "2", ";", "if", "(", "bufLen", "<", "0", ")", "{"...
/* Converts unicodes to encoded &#92;uxxxx and escapes special characters with a preceding slash
[ "/", "*", "Converts", "unicodes", "to", "encoded", "&#92", ";", "uxxxx", "and", "escapes", "special", "characters", "with", "a", "preceding", "slash" ]
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-utils/src/main/java/ca/carleton/gcrc/utils/PropertiesWriter.java#L66-L121
yegor256/takes
src/main/java/org/takes/misc/Href.java
Href.with
public Href with(final Object key, final Object value) { """ Add this extra param. @param key Key of the param @param value The value @return New HREF """ final SortedMap<String, List<String>> map = new TreeMap<>(this.params); if (!map.containsKey(key.toString())) { map.put(key.t...
java
public Href with(final Object key, final Object value) { final SortedMap<String, List<String>> map = new TreeMap<>(this.params); if (!map.containsKey(key.toString())) { map.put(key.toString(), new LinkedList<>()); } map.get(key.toString()).add(value.toString()); retur...
[ "public", "Href", "with", "(", "final", "Object", "key", ",", "final", "Object", "value", ")", "{", "final", "SortedMap", "<", "String", ",", "List", "<", "String", ">", ">", "map", "=", "new", "TreeMap", "<>", "(", "this", ".", "params", ")", ";", ...
Add this extra param. @param key Key of the param @param value The value @return New HREF
[ "Add", "this", "extra", "param", "." ]
train
https://github.com/yegor256/takes/blob/a4f4d939c8f8e0af190025716ad7f22b7de40e70/src/main/java/org/takes/misc/Href.java#L236-L243
molgenis/molgenis
molgenis-data-postgresql/src/main/java/org/molgenis/data/postgresql/PostgreSqlRepositoryCollection.java
PostgreSqlRepositoryCollection.updateRefEntity
private void updateRefEntity(EntityType entityType, Attribute attr, Attribute updatedAttr) { """ Updates foreign keys based on referenced entity changes. @param entityType entity meta data @param attr current attribute @param updatedAttr updated attribute """ if (isSingleReferenceType(attr) && isSingl...
java
private void updateRefEntity(EntityType entityType, Attribute attr, Attribute updatedAttr) { if (isSingleReferenceType(attr) && isSingleReferenceType(updatedAttr)) { dropForeignKey(entityType, attr); if (attr.getRefEntity().getIdAttribute().getDataType() != updatedAttr.getRefEntity().getIdAtt...
[ "private", "void", "updateRefEntity", "(", "EntityType", "entityType", ",", "Attribute", "attr", ",", "Attribute", "updatedAttr", ")", "{", "if", "(", "isSingleReferenceType", "(", "attr", ")", "&&", "isSingleReferenceType", "(", "updatedAttr", ")", ")", "{", "d...
Updates foreign keys based on referenced entity changes. @param entityType entity meta data @param attr current attribute @param updatedAttr updated attribute
[ "Updates", "foreign", "keys", "based", "on", "referenced", "entity", "changes", "." ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data-postgresql/src/main/java/org/molgenis/data/postgresql/PostgreSqlRepositoryCollection.java#L405-L425
pmwmedia/tinylog
tinylog-impl/src/main/java/org/tinylog/core/ConfigurationParser.java
ConfigurationParser.addWriter
private static void addWriter(final Writer writer, final Collection<Writer>[][] matrix, final int tagIndex, final Level level) { """ Adds a writer to a well-defined matrix. The given writer will be added only at the given tag index for severity levels equal or above the given severity level. @param writer Wri...
java
private static void addWriter(final Writer writer, final Collection<Writer>[][] matrix, final int tagIndex, final Level level) { for (int levelIndex = level.ordinal(); levelIndex < Level.OFF.ordinal(); ++levelIndex) { Collection<Writer> collection = matrix[tagIndex][levelIndex]; if (collection == null) { co...
[ "private", "static", "void", "addWriter", "(", "final", "Writer", "writer", ",", "final", "Collection", "<", "Writer", ">", "[", "]", "[", "]", "matrix", ",", "final", "int", "tagIndex", ",", "final", "Level", "level", ")", "{", "for", "(", "int", "lev...
Adds a writer to a well-defined matrix. The given writer will be added only at the given tag index for severity levels equal or above the given severity level. @param writer Writer to add @param matrix Well-defined two-dimensional matrix @param tagIndex Represents the tag (first dimension of matrix) @param level Repre...
[ "Adds", "a", "writer", "to", "a", "well", "-", "defined", "matrix", ".", "The", "given", "writer", "will", "be", "added", "only", "at", "the", "given", "tag", "index", "for", "severity", "levels", "equal", "or", "above", "the", "given", "severity", "leve...
train
https://github.com/pmwmedia/tinylog/blob/d03d4ef84a1310155037e08ca8822a91697d1086/tinylog-impl/src/main/java/org/tinylog/core/ConfigurationParser.java#L203-L212
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.onLayout
@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { """ Override method to configure the dragged view and secondView layout properly. """ if (isInEditMode()) super.onLayout(changed, left, top, right, bottom); else if (isDragViewAtTop()) { dragView....
java
@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { if (isInEditMode()) super.onLayout(changed, left, top, right, bottom); else if (isDragViewAtTop()) { dragView.layout(left, top, right, transformer.getOriginalHeight()); secondView.layout(left, transf...
[ "@", "Override", "protected", "void", "onLayout", "(", "boolean", "changed", ",", "int", "left", ",", "int", "top", ",", "int", "right", ",", "int", "bottom", ")", "{", "if", "(", "isInEditMode", "(", ")", ")", "super", ".", "onLayout", "(", "changed",...
Override method to configure the dragged view and secondView layout properly.
[ "Override", "method", "to", "configure", "the", "dragged", "view", "and", "secondView", "layout", "properly", "." ]
train
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L428-L439
redisson/redisson
redisson/src/main/java/org/redisson/misc/HighwayHash.java
HighwayHash.hash64
public static long hash64(byte[] data, int offset, int length, long[] key) { """ NOTE: The 64-bit HighwayHash algorithm is declared stable and no longer subject to change. @param data array with data bytes @param offset position of first byte of data to read from @param length number of bytes from data to rea...
java
public static long hash64(byte[] data, int offset, int length, long[] key) { HighwayHash h = new HighwayHash(key); h.processAll(data, offset, length); return h.finalize64(); }
[ "public", "static", "long", "hash64", "(", "byte", "[", "]", "data", ",", "int", "offset", ",", "int", "length", ",", "long", "[", "]", "key", ")", "{", "HighwayHash", "h", "=", "new", "HighwayHash", "(", "key", ")", ";", "h", ".", "processAll", "(...
NOTE: The 64-bit HighwayHash algorithm is declared stable and no longer subject to change. @param data array with data bytes @param offset position of first byte of data to read from @param length number of bytes from data to read @param key array of size 4 with the key to initialize the hash with @return 64-bit hash ...
[ "NOTE", ":", "The", "64", "-", "bit", "HighwayHash", "algorithm", "is", "declared", "stable", "and", "no", "longer", "subject", "to", "change", "." ]
train
https://github.com/redisson/redisson/blob/d3acc0249b2d5d658d36d99e2c808ce49332ea44/redisson/src/main/java/org/redisson/misc/HighwayHash.java#L290-L294
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelWriter.java
ExcelWriter.setHeaderOrFooter
public ExcelWriter setHeaderOrFooter(String text, Align align, boolean isFooter) { """ 设置Excel页眉或页脚 @param text 页脚的文本 @param align 对齐方式枚举 {@link Align} @param isFooter 是否为页脚,false表示页眉,true表示页脚 @return this @since 4.1.0 """ final HeaderFooter headerFooter = isFooter ? this.sheet.getFooter() : this.she...
java
public ExcelWriter setHeaderOrFooter(String text, Align align, boolean isFooter) { final HeaderFooter headerFooter = isFooter ? this.sheet.getFooter() : this.sheet.getHeader(); switch (align) { case LEFT: headerFooter.setLeft(text); break; case RIGHT: headerFooter.setRight(text); break; c...
[ "public", "ExcelWriter", "setHeaderOrFooter", "(", "String", "text", ",", "Align", "align", ",", "boolean", "isFooter", ")", "{", "final", "HeaderFooter", "headerFooter", "=", "isFooter", "?", "this", ".", "sheet", ".", "getFooter", "(", ")", ":", "this", "....
设置Excel页眉或页脚 @param text 页脚的文本 @param align 对齐方式枚举 {@link Align} @param isFooter 是否为页脚,false表示页眉,true表示页脚 @return this @since 4.1.0
[ "设置Excel页眉或页脚" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelWriter.java#L465-L481
code4everything/util
src/main/java/com/zhazhapan/util/AopLogUtils.java
AopLogUtils.getDescription
public static String getDescription(String className, String methodName, Object[] args) throws ClassNotFoundException { """ 获取 {@link AopLog}注解中的描述 @param className 类名:joinPoint#getTarget#getClass#getName @param methodName 方法名:joinPoint#getSignature#getName @param args 参数数组:joinPoint#getArgs @return 描述 ...
java
public static String getDescription(String className, String methodName, Object[] args) throws ClassNotFoundException { Class targetClass = Class.forName(className); Method[] methods = targetClass.getMethods(); for (Method method : methods) { if (method.getName().equals(methodName)) ...
[ "public", "static", "String", "getDescription", "(", "String", "className", ",", "String", "methodName", ",", "Object", "[", "]", "args", ")", "throws", "ClassNotFoundException", "{", "Class", "targetClass", "=", "Class", ".", "forName", "(", "className", ")", ...
获取 {@link AopLog}注解中的描述 @param className 类名:joinPoint#getTarget#getClass#getName @param methodName 方法名:joinPoint#getSignature#getName @param args 参数数组:joinPoint#getArgs @return 描述 @throws ClassNotFoundException 异常 @since 1.1.0
[ "获取", "{", "@link", "AopLog", "}", "注解中的描述" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/AopLogUtils.java#L27-L39
powermock/powermock
powermock-api/powermock-api-mockito2/src/main/java/org/powermock/api/mockito/PowerMockito.java
PowerMockito.doReturn
public static PowerMockitoStubber doReturn(Object toBeReturned, Object... othersToBeReturned) { """ Same as {@link #doReturn(Object)} but sets consecutive values to be returned. Remember to use <code>doReturn()</code> in those rare occasions when you cannot use {@link PowerMockito#when(Object)}. <p> <b>Beware t...
java
public static PowerMockitoStubber doReturn(Object toBeReturned, Object... othersToBeReturned) { return POWERMOCKITO_CORE.doAnswer(toBeReturned, othersToBeReturned); }
[ "public", "static", "PowerMockitoStubber", "doReturn", "(", "Object", "toBeReturned", ",", "Object", "...", "othersToBeReturned", ")", "{", "return", "POWERMOCKITO_CORE", ".", "doAnswer", "(", "toBeReturned", ",", "othersToBeReturned", ")", ";", "}" ]
Same as {@link #doReturn(Object)} but sets consecutive values to be returned. Remember to use <code>doReturn()</code> in those rare occasions when you cannot use {@link PowerMockito#when(Object)}. <p> <b>Beware that {@link PowerMockito#when(Object)} is always recommended for stubbing because it is argument type-safe an...
[ "Same", "as", "{", "@link", "#doReturn", "(", "Object", ")", "}", "but", "sets", "consecutive", "values", "to", "be", "returned", ".", "Remember", "to", "use", "<code", ">", "doReturn", "()", "<", "/", "code", ">", "in", "those", "rare", "occasions", "...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-mockito2/src/main/java/org/powermock/api/mockito/PowerMockito.java#L763-L765
Mthwate/DatLib
src/main/java/com/mthwate/datlib/HashUtils.java
HashUtils.md5Hex
public static String md5Hex(String data, Charset charset) throws NoSuchAlgorithmException { """ Hashes a string using the MD5 algorithm. Returns a hexadecimal result. @since 1.1 @param data the string to hash @param charset the charset of the string @return the hexadecimal MD5 hash of the string @throws NoS...
java
public static String md5Hex(String data, Charset charset) throws NoSuchAlgorithmException { return md5Hex(data.getBytes(charset)); }
[ "public", "static", "String", "md5Hex", "(", "String", "data", ",", "Charset", "charset", ")", "throws", "NoSuchAlgorithmException", "{", "return", "md5Hex", "(", "data", ".", "getBytes", "(", "charset", ")", ")", ";", "}" ]
Hashes a string using the MD5 algorithm. Returns a hexadecimal result. @since 1.1 @param data the string to hash @param charset the charset of the string @return the hexadecimal MD5 hash of the string @throws NoSuchAlgorithmException the algorithm is not supported by existing providers
[ "Hashes", "a", "string", "using", "the", "MD5", "algorithm", ".", "Returns", "a", "hexadecimal", "result", "." ]
train
https://github.com/Mthwate/DatLib/blob/f0b3a9f9cf6fdc773d4f86234ebd95986c9b6077/src/main/java/com/mthwate/datlib/HashUtils.java#L212-L214
sahan/RoboZombie
robozombie/src/main/java/com/lonepulse/robozombie/util/Assert.java
Assert.assertValid
public static <T> T assertValid(T context, Validator<T> validator) { """ <p>Asserts that the given context is valid using the supplied {@link Validator} along with a few other trivial validations such as a {@code null} check.</p> @param context the context to be validated using the given {@link Validator} <b...
java
public static <T> T assertValid(T context, Validator<T> validator) { assertNotNull(context); if(validator != null) { validator.validate(context); } return context; }
[ "public", "static", "<", "T", ">", "T", "assertValid", "(", "T", "context", ",", "Validator", "<", "T", ">", "validator", ")", "{", "assertNotNull", "(", "context", ")", ";", "if", "(", "validator", "!=", "null", ")", "{", "validator", ".", "validate",...
<p>Asserts that the given context is valid using the supplied {@link Validator} along with a few other trivial validations such as a {@code null} check.</p> @param context the context to be validated using the given {@link Validator} <br><br> @param validator the {@link Validator} to be used on the given context <br><...
[ "<p", ">", "Asserts", "that", "the", "given", "context", "is", "valid", "using", "the", "supplied", "{", "@link", "Validator", "}", "along", "with", "a", "few", "other", "trivial", "validations", "such", "as", "a", "{", "@code", "null", "}", "check", "."...
train
https://github.com/sahan/RoboZombie/blob/2e02f0d41647612e9d89360c5c48811ea86b33c8/robozombie/src/main/java/com/lonepulse/robozombie/util/Assert.java#L295-L305
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/comp/TransTypes.java
TransTypes.translateTopLevelClass
public JCTree translateTopLevelClass(JCTree cdef, TreeMaker make) { """ Translate a toplevel class definition. @param cdef The definition to be translated. """ // note that this method does NOT support recursion. this.make = make; pt = null; return translate(cdef, null); ...
java
public JCTree translateTopLevelClass(JCTree cdef, TreeMaker make) { // note that this method does NOT support recursion. this.make = make; pt = null; return translate(cdef, null); }
[ "public", "JCTree", "translateTopLevelClass", "(", "JCTree", "cdef", ",", "TreeMaker", "make", ")", "{", "// note that this method does NOT support recursion.", "this", ".", "make", "=", "make", ";", "pt", "=", "null", ";", "return", "translate", "(", "cdef", ",",...
Translate a toplevel class definition. @param cdef The definition to be translated.
[ "Translate", "a", "toplevel", "class", "definition", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/TransTypes.java#L1031-L1036
glyptodon/guacamole-client
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ActivityRecordSearchTerm.java
ActivityRecordSearchTerm.parseInt
private static int parseInt(String str, int defaultValue) { """ Parse the given string as an integer, returning the provided default value if the string is null. @param str The string to parse as an integer. @param defaultValue The value to return if <code>str</code> is null. @return The parsed value,...
java
private static int parseInt(String str, int defaultValue) { if (str == null) return defaultValue; return Integer.parseInt(str); }
[ "private", "static", "int", "parseInt", "(", "String", "str", ",", "int", "defaultValue", ")", "{", "if", "(", "str", "==", "null", ")", "return", "defaultValue", ";", "return", "Integer", ".", "parseInt", "(", "str", ")", ";", "}" ]
Parse the given string as an integer, returning the provided default value if the string is null. @param str The string to parse as an integer. @param defaultValue The value to return if <code>str</code> is null. @return The parsed value, or the provided default value if <code>str</code> is null.
[ "Parse", "the", "given", "string", "as", "an", "integer", "returning", "the", "provided", "default", "value", "if", "the", "string", "is", "null", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/base/ActivityRecordSearchTerm.java#L90-L97
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/CheckBoxPainter.java
CheckBoxPainter.getCheckBoxBulletPaint
public Paint getCheckBoxBulletPaint(Shape s, CommonControlState type) { """ Create the paint for the check mark. @param s the check mark shape. Used for bounds. @param type the color type to create. @return the paint to use for the check mark. """ return createCheckMarkGradient(s, getCheckB...
java
public Paint getCheckBoxBulletPaint(Shape s, CommonControlState type) { return createCheckMarkGradient(s, getCheckBoxBulletColors(type)); }
[ "public", "Paint", "getCheckBoxBulletPaint", "(", "Shape", "s", ",", "CommonControlState", "type", ")", "{", "return", "createCheckMarkGradient", "(", "s", ",", "getCheckBoxBulletColors", "(", "type", ")", ")", ";", "}" ]
Create the paint for the check mark. @param s the check mark shape. Used for bounds. @param type the color type to create. @return the paint to use for the check mark.
[ "Create", "the", "paint", "for", "the", "check", "mark", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/CheckBoxPainter.java#L204-L206
alkacon/opencms-core
src/org/opencms/ui/CmsUserIconHelper.java
CmsUserIconHelper.getTinyIconPath
public String getTinyIconPath(CmsObject cms, CmsUser user) { """ Returns the tiny ident-icon path for the given user.<p> @param cms the cms context @param user the user @return the icon path """ return getIconPath(cms, user, IconSize.Tiny); }
java
public String getTinyIconPath(CmsObject cms, CmsUser user) { return getIconPath(cms, user, IconSize.Tiny); }
[ "public", "String", "getTinyIconPath", "(", "CmsObject", "cms", ",", "CmsUser", "user", ")", "{", "return", "getIconPath", "(", "cms", ",", "user", ",", "IconSize", ".", "Tiny", ")", ";", "}" ]
Returns the tiny ident-icon path for the given user.<p> @param cms the cms context @param user the user @return the icon path
[ "Returns", "the", "tiny", "ident", "-", "icon", "path", "for", "the", "given", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/CmsUserIconHelper.java#L244-L247
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/NetworkInterfacesInner.java
NetworkInterfacesInner.beginGetEffectiveRouteTable
public EffectiveRouteListResultInner beginGetEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) { """ Gets all route tables applied to a network interface. @param resourceGroupName The name of the resource group. @param networkInterfaceName The name of the network interface. @throws Il...
java
public EffectiveRouteListResultInner beginGetEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) { return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); }
[ "public", "EffectiveRouteListResultInner", "beginGetEffectiveRouteTable", "(", "String", "resourceGroupName", ",", "String", "networkInterfaceName", ")", "{", "return", "beginGetEffectiveRouteTableWithServiceResponseAsync", "(", "resourceGroupName", ",", "networkInterfaceName", ")"...
Gets all route tables applied to a network interface. @param resourceGroupName The name of the resource group. @param networkInterfaceName The name of the network interface. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @thr...
[ "Gets", "all", "route", "tables", "applied", "to", "a", "network", "interface", "." ]
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/NetworkInterfacesInner.java#L1259-L1261
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/appflow/appflow_stats.java
appflow_stats.get_nitro_response
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception { """ <pre> converts nitro response into object and returns the object array in case of get request. </pre> """ appflow_stats[] resources = new appflow_stats[1]; appflow_response result = (appflow_respon...
java
protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception { appflow_stats[] resources = new appflow_stats[1]; appflow_response result = (appflow_response) service.get_payload_formatter().string_to_resource(appflow_response.class, response); if(result.errorcode != 0) { ...
[ "protected", "base_resource", "[", "]", "get_nitro_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "appflow_stats", "[", "]", "resources", "=", "new", "appflow_stats", "[", "1", "]", ";", "appflow_response", ...
<pre> converts nitro response into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "converts", "nitro", "response", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/appflow/appflow_stats.java#L217-L236
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/qr/QRDecompositionHouseholderColumn_DDRM.java
QRDecompositionHouseholderColumn_DDRM.getQ
@Override public DMatrixRMaj getQ(DMatrixRMaj Q , boolean compact ) { """ Computes the Q matrix from the imformation stored in the QR matrix. This operation requires about 4(m<sup>2</sup>n-mn<sup>2</sup>+n<sup>3</sup>/3) flops. @param Q The orthogonal Q matrix. """ if( compact ) { ...
java
@Override public DMatrixRMaj getQ(DMatrixRMaj Q , boolean compact ) { if( compact ) { Q = UtilDecompositons_DDRM.checkIdentity(Q,numRows,minLength); } else { Q = UtilDecompositons_DDRM.checkIdentity(Q,numRows,numRows); } for( int j = minLength-1; j >= 0; j-- ...
[ "@", "Override", "public", "DMatrixRMaj", "getQ", "(", "DMatrixRMaj", "Q", ",", "boolean", "compact", ")", "{", "if", "(", "compact", ")", "{", "Q", "=", "UtilDecompositons_DDRM", ".", "checkIdentity", "(", "Q", ",", "numRows", ",", "minLength", ")", ";", ...
Computes the Q matrix from the imformation stored in the QR matrix. This operation requires about 4(m<sup>2</sup>n-mn<sup>2</sup>+n<sup>3</sup>/3) flops. @param Q The orthogonal Q matrix.
[ "Computes", "the", "Q", "matrix", "from", "the", "imformation", "stored", "in", "the", "QR", "matrix", ".", "This", "operation", "requires", "about", "4", "(", "m<sup", ">", "2<", "/", "sup", ">", "n", "-", "mn<sup", ">", "2<", "/", "sup", ">", "+", ...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/qr/QRDecompositionHouseholderColumn_DDRM.java#L98-L116
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/trento_p/net/Pipe.java
Pipe.verifyEmptyDegree
public double verifyEmptyDegree( StringBuilder strWarnings, double q ) { """ Verify if the empty degree is greather than the 0.8. @param strWarnings a string which collect all the warning messages. @param q discharge in this pipe. """ /* Pari a A * ( Rh ^1/6 ) */ double B; /* Anglo f...
java
public double verifyEmptyDegree( StringBuilder strWarnings, double q ) { /* Pari a A * ( Rh ^1/6 ) */ double B; /* Anglo formato dalla sezione bagnata */ double thta; /* Costante */ double known; /* * [rad]Angolo formato dalla sezione bagnata, adottando u...
[ "public", "double", "verifyEmptyDegree", "(", "StringBuilder", "strWarnings", ",", "double", "q", ")", "{", "/* Pari a A * ( Rh ^1/6 ) */", "double", "B", ";", "/* Anglo formato dalla sezione bagnata */", "double", "thta", ";", "/* Costante */", "double", "known", ";", ...
Verify if the empty degree is greather than the 0.8. @param strWarnings a string which collect all the warning messages. @param q discharge in this pipe.
[ "Verify", "if", "the", "empty", "degree", "is", "greather", "than", "the", "0", ".", "8", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/trento_p/net/Pipe.java#L1445-L1473
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/indexing/BooleanIndexing.java
BooleanIndexing.lastIndex
public static INDArray lastIndex(INDArray array, Condition condition) { """ This method returns last index matching given condition PLEASE NOTE: This method will return -1 value if condition wasn't met @param array @param condition @return """ if (!(condition instanceof BaseCondition)) ...
java
public static INDArray lastIndex(INDArray array, Condition condition) { if (!(condition instanceof BaseCondition)) throw new UnsupportedOperationException("Only static Conditions are supported"); LastIndex idx = new LastIndex(array, condition); Nd4j.getExecutioner().exec(idx); ...
[ "public", "static", "INDArray", "lastIndex", "(", "INDArray", "array", ",", "Condition", "condition", ")", "{", "if", "(", "!", "(", "condition", "instanceof", "BaseCondition", ")", ")", "throw", "new", "UnsupportedOperationException", "(", "\"Only static Conditions...
This method returns last index matching given condition PLEASE NOTE: This method will return -1 value if condition wasn't met @param array @param condition @return
[ "This", "method", "returns", "last", "index", "matching", "given", "condition" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/indexing/BooleanIndexing.java#L315-L322
kiegroup/drools
drools-core/src/main/java/org/drools/core/reteoo/builder/BuildUtils.java
BuildUtils.isSharingEnabledForNode
private boolean isSharingEnabledForNode(BuildContext context, BaseNode node) { """ Utility function to check if sharing is enabled for nodes of the given class """ if ( NodeTypeEnums.isLeftTupleSource( node )) { return context.getKnowledgeBase().getConfiguration().isShareBetaNodes(); ...
java
private boolean isSharingEnabledForNode(BuildContext context, BaseNode node) { if ( NodeTypeEnums.isLeftTupleSource( node )) { return context.getKnowledgeBase().getConfiguration().isShareBetaNodes(); } else if ( NodeTypeEnums.isObjectSource( node ) ) { return context.getKnowledge...
[ "private", "boolean", "isSharingEnabledForNode", "(", "BuildContext", "context", ",", "BaseNode", "node", ")", "{", "if", "(", "NodeTypeEnums", ".", "isLeftTupleSource", "(", "node", ")", ")", "{", "return", "context", ".", "getKnowledgeBase", "(", ")", ".", "...
Utility function to check if sharing is enabled for nodes of the given class
[ "Utility", "function", "to", "check", "if", "sharing", "is", "enabled", "for", "nodes", "of", "the", "given", "class" ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/builder/BuildUtils.java#L185-L192
shrinkwrap/shrinkwrap
api/src/main/java/org/jboss/shrinkwrap/api/asset/FileAsset.java
FileAsset.openStream
@Override public InputStream openStream() { """ Opens a new FileInputStream for the given File. Can throw a Runtime exception if the file has been deleted in between the FileResource was created and the stream is opened. @throws RuntimeException If the file is not found. """ try { ...
java
@Override public InputStream openStream() { try { return new BufferedInputStream(new FileInputStream(file), 8192); } catch (FileNotFoundException e) { throw new RuntimeException("Could not open file " + file, e); } }
[ "@", "Override", "public", "InputStream", "openStream", "(", ")", "{", "try", "{", "return", "new", "BufferedInputStream", "(", "new", "FileInputStream", "(", "file", ")", ",", "8192", ")", ";", "}", "catch", "(", "FileNotFoundException", "e", ")", "{", "t...
Opens a new FileInputStream for the given File. Can throw a Runtime exception if the file has been deleted in between the FileResource was created and the stream is opened. @throws RuntimeException If the file is not found.
[ "Opens", "a", "new", "FileInputStream", "for", "the", "given", "File", "." ]
train
https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/api/src/main/java/org/jboss/shrinkwrap/api/asset/FileAsset.java#L63-L70
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/ReportResourcesImpl.java
ReportResourcesImpl.getReport
public Report getReport(long reportId, EnumSet<ReportInclusion> includes, Integer pageSize, Integer page, Integer level) throws SmartsheetException { """ Get a report. It mirrors to the following Smartsheet REST API method: GET /reports/{id} Exceptions: InvalidRequestException : if there is any problem with...
java
public Report getReport(long reportId, EnumSet<ReportInclusion> includes, Integer pageSize, Integer page, Integer level) throws SmartsheetException{ String path = "reports/" + reportId; HashMap<String, Object> parameters = new HashMap<String, Object>(); parameters.put("include", QueryUtil.gener...
[ "public", "Report", "getReport", "(", "long", "reportId", ",", "EnumSet", "<", "ReportInclusion", ">", "includes", ",", "Integer", "pageSize", ",", "Integer", "page", ",", "Integer", "level", ")", "throws", "SmartsheetException", "{", "String", "path", "=", "\...
Get a report. It mirrors to the following Smartsheet REST API method: GET /reports/{id} Exceptions: InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorization(access token) ResourceNotFoundException : if the resource can...
[ "Get", "a", "report", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/ReportResourcesImpl.java#L123-L142
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Project.java
Project.createEnvironment
public Environment createEnvironment(String name, Map<String, Object> attributes) { """ Creates a new Environment in the Project with additional attributes. @param name Environment title. @param attributes Additional attributes for initialization Environment. @return A new Environment. """ r...
java
public Environment createEnvironment(String name, Map<String, Object> attributes) { return getInstance().create().environment(name, this, attributes); }
[ "public", "Environment", "createEnvironment", "(", "String", "name", ",", "Map", "<", "String", ",", "Object", ">", "attributes", ")", "{", "return", "getInstance", "(", ")", ".", "create", "(", ")", ".", "environment", "(", "name", ",", "this", ",", "at...
Creates a new Environment in the Project with additional attributes. @param name Environment title. @param attributes Additional attributes for initialization Environment. @return A new Environment.
[ "Creates", "a", "new", "Environment", "in", "the", "Project", "with", "additional", "attributes", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Project.java#L447-L449
jenkinsci/jenkins
core/src/main/java/hudson/Util.java
Util.isOverridden
public static boolean isOverridden(@Nonnull Class base, @Nonnull Class derived, @Nonnull String methodName, @Nonnull Class... types) { """ Checks if the method defined on the base type with the given arguments is overridden in the given derived type. """ return !getMethod(base, methodName, types).equa...
java
public static boolean isOverridden(@Nonnull Class base, @Nonnull Class derived, @Nonnull String methodName, @Nonnull Class... types) { return !getMethod(base, methodName, types).equals(getMethod(derived, methodName, types)); }
[ "public", "static", "boolean", "isOverridden", "(", "@", "Nonnull", "Class", "base", ",", "@", "Nonnull", "Class", "derived", ",", "@", "Nonnull", "String", "methodName", ",", "@", "Nonnull", "Class", "...", "types", ")", "{", "return", "!", "getMethod", "...
Checks if the method defined on the base type with the given arguments is overridden in the given derived type.
[ "Checks", "if", "the", "method", "defined", "on", "the", "base", "type", "with", "the", "given", "arguments", "is", "overridden", "in", "the", "given", "derived", "type", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/Util.java#L1336-L1338
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/ExportDecoderBase.java
ExportDecoderBase.decodeRow
protected ExportRowData decodeRow(byte[] rowData) throws IOException { """ Decode a byte array of row data into ExportRowData @param rowData @return ExportRowData @throws IOException """ ExportRow row = ExportRow.decodeRow(m_legacyRow, getPartition(), m_startTS, rowData); return new Export...
java
protected ExportRowData decodeRow(byte[] rowData) throws IOException { ExportRow row = ExportRow.decodeRow(m_legacyRow, getPartition(), m_startTS, rowData); return new ExportRowData(row.values, row.partitionValue, row.partitionId); }
[ "protected", "ExportRowData", "decodeRow", "(", "byte", "[", "]", "rowData", ")", "throws", "IOException", "{", "ExportRow", "row", "=", "ExportRow", ".", "decodeRow", "(", "m_legacyRow", ",", "getPartition", "(", ")", ",", "m_startTS", ",", "rowData", ")", ...
Decode a byte array of row data into ExportRowData @param rowData @return ExportRowData @throws IOException
[ "Decode", "a", "byte", "array", "of", "row", "data", "into", "ExportRowData" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportDecoderBase.java#L119-L122
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/util/data/SerialArrayList.java
SerialArrayList.putAll
public synchronized void putAll(SerialArrayList<U> data, int startIndex) { """ Put all. @param data the data @param startIndex the start index """ ensureCapacity((startIndex * unitSize) + data.maxByte); System.arraycopy(data.buffer, 0, this.buffer, startIndex * unitSize, data.maxByte); }
java
public synchronized void putAll(SerialArrayList<U> data, int startIndex) { ensureCapacity((startIndex * unitSize) + data.maxByte); System.arraycopy(data.buffer, 0, this.buffer, startIndex * unitSize, data.maxByte); }
[ "public", "synchronized", "void", "putAll", "(", "SerialArrayList", "<", "U", ">", "data", ",", "int", "startIndex", ")", "{", "ensureCapacity", "(", "(", "startIndex", "*", "unitSize", ")", "+", "data", ".", "maxByte", ")", ";", "System", ".", "arraycopy"...
Put all. @param data the data @param startIndex the start index
[ "Put", "all", "." ]
train
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/util/data/SerialArrayList.java#L239-L242
nats-io/java-nats-streaming
src/main/java/io/nats/streaming/StreamingConnectionFactory.java
StreamingConnectionFactory.setAckTimeout
public void setAckTimeout(long ackTimeout, TimeUnit unit) { """ Sets the ACK timeout in the specified time unit. @param ackTimeout the pubAckWait to set @param unit the time unit to set """ this.ackTimeout = Duration.ofMillis(unit.toMillis(ackTimeout)); }
java
public void setAckTimeout(long ackTimeout, TimeUnit unit) { this.ackTimeout = Duration.ofMillis(unit.toMillis(ackTimeout)); }
[ "public", "void", "setAckTimeout", "(", "long", "ackTimeout", ",", "TimeUnit", "unit", ")", "{", "this", ".", "ackTimeout", "=", "Duration", ".", "ofMillis", "(", "unit", ".", "toMillis", "(", "ackTimeout", ")", ")", ";", "}" ]
Sets the ACK timeout in the specified time unit. @param ackTimeout the pubAckWait to set @param unit the time unit to set
[ "Sets", "the", "ACK", "timeout", "in", "the", "specified", "time", "unit", "." ]
train
https://github.com/nats-io/java-nats-streaming/blob/72f964e9093622875d7f1c85ce60820e028863e7/src/main/java/io/nats/streaming/StreamingConnectionFactory.java#L97-L99
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Integer.java
Integer.valueOf
public static Integer valueOf(String s, int radix) throws NumberFormatException { """ Returns an {@code Integer} object holding the value extracted from the specified {@code String} when parsed with the radix given by the second argument. The first argument is interpreted as representing a signed integer in the...
java
public static Integer valueOf(String s, int radix) throws NumberFormatException { return Integer.valueOf(parseInt(s,radix)); }
[ "public", "static", "Integer", "valueOf", "(", "String", "s", ",", "int", "radix", ")", "throws", "NumberFormatException", "{", "return", "Integer", ".", "valueOf", "(", "parseInt", "(", "s", ",", "radix", ")", ")", ";", "}" ]
Returns an {@code Integer} object holding the value extracted from the specified {@code String} when parsed with the radix given by the second argument. The first argument is interpreted as representing a signed integer in the radix specified by the second argument, exactly as if the arguments were given to the {@link ...
[ "Returns", "an", "{", "@code", "Integer", "}", "object", "holding", "the", "value", "extracted", "from", "the", "specified", "{", "@code", "String", "}", "when", "parsed", "with", "the", "radix", "given", "by", "the", "second", "argument", ".", "The", "fir...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Integer.java#L556-L558
samtingleff/jchronic
src/main/java/com/mdimension/jchronic/handlers/Handler.java
Handler.findWithin
public static Span findWithin(List<Repeater<?>> tags, Span span, Pointer.PointerType pointer, Options options) { """ Recursively finds repeaters within other repeaters. Returns a Span representing the innermost time span or nil if no repeater union could be found """ if (options.isDebug()) { System...
java
public static Span findWithin(List<Repeater<?>> tags, Span span, Pointer.PointerType pointer, Options options) { if (options.isDebug()) { System.out.println("Chronic.findWithin: " + tags + " in " + span); } if (tags.isEmpty()) { return span; } Repeater<?> head = tags.get(0); List<Rep...
[ "public", "static", "Span", "findWithin", "(", "List", "<", "Repeater", "<", "?", ">", ">", "tags", ",", "Span", "span", ",", "Pointer", ".", "PointerType", "pointer", ",", "Options", "options", ")", "{", "if", "(", "options", ".", "isDebug", "(", ")",...
Recursively finds repeaters within other repeaters. Returns a Span representing the innermost time span or nil if no repeater union could be found
[ "Recursively", "finds", "repeaters", "within", "other", "repeaters", ".", "Returns", "a", "Span", "representing", "the", "innermost", "time", "span", "or", "nil", "if", "no", "repeater", "union", "could", "be", "found" ]
train
https://github.com/samtingleff/jchronic/blob/b66bd2815eda3e79adefa2642f8ccf6b4b7586ce/src/main/java/com/mdimension/jchronic/handlers/Handler.java#L346-L362
NessComputing/components-ness-jms
src/main/java/com/nesscomputing/jms/JmsRunnableFactory.java
JmsRunnableFactory.createQueueListener
public QueueConsumer createQueueListener(final String topic, final ConsumerCallback<Message> messageCallback) { """ Creates a new {@link QueueConsumer}. For every message received (or when the timeout waiting for messages is hit), the callback is invoked with the message received. """ Preconditions.ch...
java
public QueueConsumer createQueueListener(final String topic, final ConsumerCallback<Message> messageCallback) { Preconditions.checkState(connectionFactory != null, "connection factory was never injected!"); return new QueueConsumer(connectionFactory, jmsConfig, topic, messageCallback); }
[ "public", "QueueConsumer", "createQueueListener", "(", "final", "String", "topic", ",", "final", "ConsumerCallback", "<", "Message", ">", "messageCallback", ")", "{", "Preconditions", ".", "checkState", "(", "connectionFactory", "!=", "null", ",", "\"connection factor...
Creates a new {@link QueueConsumer}. For every message received (or when the timeout waiting for messages is hit), the callback is invoked with the message received.
[ "Creates", "a", "new", "{" ]
train
https://github.com/NessComputing/components-ness-jms/blob/29e0d320ada3a1a375483437a9f3ff629822b714/src/main/java/com/nesscomputing/jms/JmsRunnableFactory.java#L134-L138
line/centraldogma
server/src/main/java/com/linecorp/centraldogma/server/internal/metadata/MetadataService.java
MetadataService.perTokenPermissionPointer
private static JsonPointer perTokenPermissionPointer(String repoName, String appId) { """ Generates the path of {@link JsonPointer} of permission of the specified token {@code appId} in the specified {@code repoName}. """ return JsonPointer.compile("/repos" + encodeSegment(repoName) + ...
java
private static JsonPointer perTokenPermissionPointer(String repoName, String appId) { return JsonPointer.compile("/repos" + encodeSegment(repoName) + "/perTokenPermissions" + encodeSegment(appId)); }
[ "private", "static", "JsonPointer", "perTokenPermissionPointer", "(", "String", "repoName", ",", "String", "appId", ")", "{", "return", "JsonPointer", ".", "compile", "(", "\"/repos\"", "+", "encodeSegment", "(", "repoName", ")", "+", "\"/perTokenPermissions\"", "+"...
Generates the path of {@link JsonPointer} of permission of the specified token {@code appId} in the specified {@code repoName}.
[ "Generates", "the", "path", "of", "{" ]
train
https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/internal/metadata/MetadataService.java#L892-L895
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java
SameDiff.removeArgFromFunction
public void removeArgFromFunction(String varName, DifferentialFunction function) { """ Remove an argument for a function. Note that if this function does not contain the argument, it will just be a no op. @param varName the variable name to remove @param function the function to remove the argument from "...
java
public void removeArgFromFunction(String varName, DifferentialFunction function) { val args = function.args(); for (int i = 0; i < args.length; i++) { if (args[i].getVarName().equals(varName)) { /** * Since we are removing the variable reference ...
[ "public", "void", "removeArgFromFunction", "(", "String", "varName", ",", "DifferentialFunction", "function", ")", "{", "val", "args", "=", "function", ".", "args", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "args", ".", "length", ...
Remove an argument for a function. Note that if this function does not contain the argument, it will just be a no op. @param varName the variable name to remove @param function the function to remove the argument from
[ "Remove", "an", "argument", "for", "a", "function", ".", "Note", "that", "if", "this", "function", "does", "not", "contain", "the", "argument", "it", "will", "just", "be", "a", "no", "op", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java#L2545-L2567
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.loadSlashedClassAsBytes
public static byte[] loadSlashedClassAsBytes(ClassLoader loader, String slashedclassname) { """ Access the specified class as a resource accessible through the specified loader and return the bytes. The classname should be 'dot' separated (eg. com.foo.Bar) and not suffixed .class @param loader the classloader ...
java
public static byte[] loadSlashedClassAsBytes(ClassLoader loader, String slashedclassname) { if (GlobalConfiguration.assertsMode) { if (slashedclassname.endsWith(".class")) { throw new IllegalStateException(".class suffixed name should not be passed:" + slashedclassname); } if (slashedclassname.indexOf('....
[ "public", "static", "byte", "[", "]", "loadSlashedClassAsBytes", "(", "ClassLoader", "loader", ",", "String", "slashedclassname", ")", "{", "if", "(", "GlobalConfiguration", ".", "assertsMode", ")", "{", "if", "(", "slashedclassname", ".", "endsWith", "(", "\".c...
Access the specified class as a resource accessible through the specified loader and return the bytes. The classname should be 'dot' separated (eg. com.foo.Bar) and not suffixed .class @param loader the classloader against which getResourceAsStream() will be invoked @param slashedclassname the dot separated classname ...
[ "Access", "the", "specified", "class", "as", "a", "resource", "accessible", "through", "the", "specified", "loader", "and", "return", "the", "bytes", ".", "The", "classname", "should", "be", "dot", "separated", "(", "eg", ".", "com", ".", "foo", ".", "Bar"...
train
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L794-L808
indeedeng/util
util-core/src/main/java/com/indeed/util/core/io/Closeables2.java
Closeables2.closeQuietly
public static void closeQuietly(@Nullable final Closeable closeable, @Nonnull final Logger log) { """ this is very similar to guava's {#link Closeables.closeQuietly()}, except with logging unlike guava this swallows all Exceptions, not just IOExceptions. Error is still propagated. @param closeable closeable to c...
java
public static void closeQuietly(@Nullable final Closeable closeable, @Nonnull final Logger log) { try { if (null != closeable) { closeable.close(); } } catch (Exception e) { log.error("Exception during cleanup of a Closeable, ignoring", e); } ...
[ "public", "static", "void", "closeQuietly", "(", "@", "Nullable", "final", "Closeable", "closeable", ",", "@", "Nonnull", "final", "Logger", "log", ")", "{", "try", "{", "if", "(", "null", "!=", "closeable", ")", "{", "closeable", ".", "close", "(", ")",...
this is very similar to guava's {#link Closeables.closeQuietly()}, except with logging unlike guava this swallows all Exceptions, not just IOExceptions. Error is still propagated. @param closeable closeable to close @param log logger to use
[ "this", "is", "very", "similar", "to", "guava", "s", "{", "#link", "Closeables", ".", "closeQuietly", "()", "}", "except", "with", "logging", "unlike", "guava", "this", "swallows", "all", "Exceptions", "not", "just", "IOExceptions", ".", "Error", "is", "stil...
train
https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/util-core/src/main/java/com/indeed/util/core/io/Closeables2.java#L26-L34
Azure/azure-sdk-for-java
dns/resource-manager/v2016_04_01/src/main/java/com/microsoft/azure/management/dns/v2016_04_01/implementation/ZonesInner.java
ZonesInner.beginDeleteAsync
public Observable<ZoneDeleteResultInner> beginDeleteAsync(String resourceGroupName, String zoneName, String ifMatch) { """ Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. @param resourceGroupName The name of the resource group. @param zoneName The...
java
public Observable<ZoneDeleteResultInner> beginDeleteAsync(String resourceGroupName, String zoneName, String ifMatch) { return beginDeleteWithServiceResponseAsync(resourceGroupName, zoneName, ifMatch).map(new Func1<ServiceResponse<ZoneDeleteResultInner>, ZoneDeleteResultInner>() { @Override ...
[ "public", "Observable", "<", "ZoneDeleteResultInner", ">", "beginDeleteAsync", "(", "String", "resourceGroupName", ",", "String", "zoneName", ",", "String", "ifMatch", ")", "{", "return", "beginDeleteWithServiceResponseAsync", "(", "resourceGroupName", ",", "zoneName", ...
Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. @param resourceGroupName The name of the resource group. @param zoneName The name of the DNS zone (without a terminating dot). @param ifMatch The etag of the DNS zone. Omit this value to always delete the cu...
[ "Deletes", "a", "DNS", "zone", ".", "WARNING", ":", "All", "DNS", "records", "in", "the", "zone", "will", "also", "be", "deleted", ".", "This", "operation", "cannot", "be", "undone", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/dns/resource-manager/v2016_04_01/src/main/java/com/microsoft/azure/management/dns/v2016_04_01/implementation/ZonesInner.java#L553-L560
stephenc/java-iso-tools
iso9660-writer/src/main/java/com/github/stephenc/javaisotools/iso9660/ISO9660Directory.java
ISO9660Directory.unsortedIterator
public Iterator<ISO9660Directory> unsortedIterator() { """ Returns a directory iterator to traverse the directory hierarchy using a recursive method @return Iterator """ if (unsortedIterator == null) { unsortedIterator = new ISO9660DirectoryIterator(this, false); } unsort...
java
public Iterator<ISO9660Directory> unsortedIterator() { if (unsortedIterator == null) { unsortedIterator = new ISO9660DirectoryIterator(this, false); } unsortedIterator.reset(); return unsortedIterator; }
[ "public", "Iterator", "<", "ISO9660Directory", ">", "unsortedIterator", "(", ")", "{", "if", "(", "unsortedIterator", "==", "null", ")", "{", "unsortedIterator", "=", "new", "ISO9660DirectoryIterator", "(", "this", ",", "false", ")", ";", "}", "unsortedIterator"...
Returns a directory iterator to traverse the directory hierarchy using a recursive method @return Iterator
[ "Returns", "a", "directory", "iterator", "to", "traverse", "the", "directory", "hierarchy", "using", "a", "recursive", "method" ]
train
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/iso9660-writer/src/main/java/com/github/stephenc/javaisotools/iso9660/ISO9660Directory.java#L532-L538
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java
TypeExtractor.createTypeInfo
@SuppressWarnings("unchecked") @PublicEvolving public static <OUT> TypeInformation<OUT> createTypeInfo(Object instance, Class<?> baseClass, Class<?> clazz, int returnParamPos) { """ Creates a {@link TypeInformation} from the given parameters. If the given {@code instance} implements {@link ResultTypeQueryable...
java
@SuppressWarnings("unchecked") @PublicEvolving public static <OUT> TypeInformation<OUT> createTypeInfo(Object instance, Class<?> baseClass, Class<?> clazz, int returnParamPos) { if (instance instanceof ResultTypeQueryable) { return ((ResultTypeQueryable<OUT>) instance).getProducedType(); } else { return cre...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "PublicEvolving", "public", "static", "<", "OUT", ">", "TypeInformation", "<", "OUT", ">", "createTypeInfo", "(", "Object", "instance", ",", "Class", "<", "?", ">", "baseClass", ",", "Class", "<", "?",...
Creates a {@link TypeInformation} from the given parameters. If the given {@code instance} implements {@link ResultTypeQueryable}, its information is used to determine the type information. Otherwise, the type information is derived based on the given class information. @param instance instance to determine type in...
[ "Creates", "a", "{", "@link", "TypeInformation", "}", "from", "the", "given", "parameters", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/typeutils/TypeExtractor.java#L756-L764
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/util/IntegerList.java
IntegerList.removeElementInSegment
protected boolean removeElementInSegment(int segmentIndex, int element) { """ Remove the {@code element} in the segment starting at index {@code segmentIndex}. @param segmentIndex is the index of the segment from which the element must be removed. @param element is the element to remove. @return <code>true<...
java
protected boolean removeElementInSegment(int segmentIndex, int element) { if ((element == this.values[segmentIndex]) && (element == this.values[segmentIndex + 1])) { // Remove the segment if (this.values.length == 2) { this.values = null; this.size = 0; } else { final int[] newTab = new int[this....
[ "protected", "boolean", "removeElementInSegment", "(", "int", "segmentIndex", ",", "int", "element", ")", "{", "if", "(", "(", "element", "==", "this", ".", "values", "[", "segmentIndex", "]", ")", "&&", "(", "element", "==", "this", ".", "values", "[", ...
Remove the {@code element} in the segment starting at index {@code segmentIndex}. @param segmentIndex is the index of the segment from which the element must be removed. @param element is the element to remove. @return <code>true</code> if the element was removed, otherwhise <code>false</code>
[ "Remove", "the", "{", "@code", "element", "}", "in", "the", "segment", "starting", "at", "index", "{", "@code", "segmentIndex", "}", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/util/IntegerList.java#L453-L493
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java
NameNode.initializeGenericKeys
public static void initializeGenericKeys(Configuration conf, String serviceKey) { """ In federation configuration is set for a set of namenode and secondary namenode/backup/checkpointer, which are grouped under a logical nameservice ID. The configuration keys specific to them have suffix set to configured names...
java
public static void initializeGenericKeys(Configuration conf, String serviceKey) { if ((serviceKey == null) || serviceKey.isEmpty()) { return; } // adjust meta directory names by service key adjustMetaDirectoryNames(conf, serviceKey); DFSUtil.setGenericConf(conf, serviceKey, NAMESERVICE_SPECI...
[ "public", "static", "void", "initializeGenericKeys", "(", "Configuration", "conf", ",", "String", "serviceKey", ")", "{", "if", "(", "(", "serviceKey", "==", "null", ")", "||", "serviceKey", ".", "isEmpty", "(", ")", ")", "{", "return", ";", "}", "// adjus...
In federation configuration is set for a set of namenode and secondary namenode/backup/checkpointer, which are grouped under a logical nameservice ID. The configuration keys specific to them have suffix set to configured nameserviceId. This method copies the value from specific key of format key.nameserviceId to key, ...
[ "In", "federation", "configuration", "is", "set", "for", "a", "set", "of", "namenode", "and", "secondary", "namenode", "/", "backup", "/", "checkpointer", "which", "are", "grouped", "under", "a", "logical", "nameservice", "ID", ".", "The", "configuration", "ke...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/NameNode.java#L554-L563
Azure/azure-sdk-for-java
iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/implementation/AppsInner.java
AppsInner.beginCreateOrUpdateAsync
public Observable<AppInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, AppInner app) { """ Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine the...
java
public Observable<AppInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, AppInner app) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, app).map(new Func1<ServiceResponse<AppInner>, AppInner>() { @Override public AppInner ca...
[ "public", "Observable", "<", "AppInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "AppInner", "app", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "resource...
Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application. @param resourceGroupName The name of the res...
[ "Create", "or", "update", "the", "metadata", "of", "an", "IoT", "Central", "application", ".", "The", "usual", "pattern", "to", "modify", "a", "property", "is", "to", "retrieve", "the", "IoT", "Central", "application", "metadata", "and", "security", "metadata"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/implementation/AppsInner.java#L322-L329
aerospike/aerospike-helper
java/src/main/java/com/aerospike/helper/collections/LargeList.java
LargeList.findFrom
public List<?> findFrom(Value begin, int count) throws AerospikeException { """ Select values from the begin key up to a maximum count. <p> @param begin start value (inclusive) @param count maximum number of values to return @return list of entries selected """ List<byte[]> digestList = getDigestList()...
java
public List<?> findFrom(Value begin, int count) throws AerospikeException { List<byte[]> digestList = getDigestList(); Key beginKey = makeSubKey(begin); int start = digestList.indexOf(beginKey.digest); int stop = start + count; return get(digestList, start, stop); }
[ "public", "List", "<", "?", ">", "findFrom", "(", "Value", "begin", ",", "int", "count", ")", "throws", "AerospikeException", "{", "List", "<", "byte", "[", "]", ">", "digestList", "=", "getDigestList", "(", ")", ";", "Key", "beginKey", "=", "makeSubKey"...
Select values from the begin key up to a maximum count. <p> @param begin start value (inclusive) @param count maximum number of values to return @return list of entries selected
[ "Select", "values", "from", "the", "begin", "key", "up", "to", "a", "maximum", "count", ".", "<p", ">" ]
train
https://github.com/aerospike/aerospike-helper/blob/eeb4a1464bc8d9c6716c014d250c8166b5caa82d/java/src/main/java/com/aerospike/helper/collections/LargeList.java#L388-L394
autermann/yaml
src/main/java/com/github/autermann/yaml/nodes/YamlMappingNode.java
YamlMappingNode.put
public T put(YamlNode key, Short value) { """ Adds the specified {@code key}/{@code value} pair to this mapping. @param key the key @param value the value @return {@code this} """ return put(key, getNodeFactory().shortNode(value)); }
java
public T put(YamlNode key, Short value) { return put(key, getNodeFactory().shortNode(value)); }
[ "public", "T", "put", "(", "YamlNode", "key", ",", "Short", "value", ")", "{", "return", "put", "(", "key", ",", "getNodeFactory", "(", ")", ".", "shortNode", "(", "value", ")", ")", ";", "}" ]
Adds the specified {@code key}/{@code value} pair to this mapping. @param key the key @param value the value @return {@code this}
[ "Adds", "the", "specified", "{", "@code", "key", "}", "/", "{", "@code", "value", "}", "pair", "to", "this", "mapping", "." ]
train
https://github.com/autermann/yaml/blob/5f8ab03e4fec3a2abe72c03561cdaa3a3936634d/src/main/java/com/github/autermann/yaml/nodes/YamlMappingNode.java#L444-L446
Jasig/resource-server
resource-server-utils/src/main/java/org/jasig/resourceserver/utils/aggr/ResourcesElementsProviderImpl.java
ResourcesElementsProviderImpl.appendCssNode
protected void appendCssNode(HttpServletRequest request, Document document, DocumentFragment head, Css css, String relativeRoot) { """ Convert the {@link Css} argument to an HTML link tag and append it to the {@link DocumentFragment}. """ final String stylePath = getElementPath(request, css, relativeR...
java
protected void appendCssNode(HttpServletRequest request, Document document, DocumentFragment head, Css css, String relativeRoot) { final String stylePath = getElementPath(request, css, relativeRoot); if (resourcesDao.isConditional(css)) { Comment c = document.createComment(""); ...
[ "protected", "void", "appendCssNode", "(", "HttpServletRequest", "request", ",", "Document", "document", ",", "DocumentFragment", "head", ",", "Css", "css", ",", "String", "relativeRoot", ")", "{", "final", "String", "stylePath", "=", "getElementPath", "(", "reque...
Convert the {@link Css} argument to an HTML link tag and append it to the {@link DocumentFragment}.
[ "Convert", "the", "{" ]
train
https://github.com/Jasig/resource-server/blob/13375f716777ec3c99ae9917f672881d4aa32df3/resource-server-utils/src/main/java/org/jasig/resourceserver/utils/aggr/ResourcesElementsProviderImpl.java#L510-L538
asterisk-java/asterisk-java
src/main/java/org/asteriskjava/manager/internal/EventBuilderImpl.java
EventBuilderImpl.registerEventClass
public final void registerEventClass(String eventType, Class< ? extends ManagerEvent> clazz) throws IllegalArgumentException { """ Registers a new event class for the event given by eventType. @param eventType the name of the event to register the class for. For example "Join". @param clazz the ev...
java
public final void registerEventClass(String eventType, Class< ? extends ManagerEvent> clazz) throws IllegalArgumentException { Constructor< ? > defaultConstructor; if (!ManagerEvent.class.isAssignableFrom(clazz)) { throw new IllegalArgumentException(clazz + " is not ...
[ "public", "final", "void", "registerEventClass", "(", "String", "eventType", ",", "Class", "<", "?", "extends", "ManagerEvent", ">", "clazz", ")", "throws", "IllegalArgumentException", "{", "Constructor", "<", "?", ">", "defaultConstructor", ";", "if", "(", "!",...
Registers a new event class for the event given by eventType. @param eventType the name of the event to register the class for. For example "Join". @param clazz the event class to register, must extend {@link ManagerEvent}. @throws IllegalArgumentException if clazz is not a valid event class.
[ "Registers", "a", "new", "event", "class", "for", "the", "event", "given", "by", "eventType", "." ]
train
https://github.com/asterisk-java/asterisk-java/blob/cdc9849270d97ef75afa447a02c5194ed29121eb/src/main/java/org/asteriskjava/manager/internal/EventBuilderImpl.java#L104-L136
Netflix/netflix-graph
src/main/java/com/netflix/nfgraph/NFGraph.java
NFGraph.getConnection
public int getConnection(String nodeType, int ordinal, String propertyName) { """ Retrieve a single connected ordinal, given the type and ordinal of the originating node, and the property by which this node is connected. @return the connected ordinal, or -1 if there is no such ordinal """ return get...
java
public int getConnection(String nodeType, int ordinal, String propertyName) { return getConnection(0, nodeType, ordinal, propertyName); }
[ "public", "int", "getConnection", "(", "String", "nodeType", ",", "int", "ordinal", ",", "String", "propertyName", ")", "{", "return", "getConnection", "(", "0", ",", "nodeType", ",", "ordinal", ",", "propertyName", ")", ";", "}" ]
Retrieve a single connected ordinal, given the type and ordinal of the originating node, and the property by which this node is connected. @return the connected ordinal, or -1 if there is no such ordinal
[ "Retrieve", "a", "single", "connected", "ordinal", "given", "the", "type", "and", "ordinal", "of", "the", "originating", "node", "and", "the", "property", "by", "which", "this", "node", "is", "connected", "." ]
train
https://github.com/Netflix/netflix-graph/blob/ee129252a08a9f51dd296d6fca2f0b28b7be284e/src/main/java/com/netflix/nfgraph/NFGraph.java#L106-L108
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java
StringUtil.toLowerSubset
public static String toLowerSubset(String source, char substitute) { """ Returns a string with non alphanumeric chars converted to the substitute character. A digit first character is also converted. By sqlbob@users @param source string to convert @param substitute character to use @return converted string ...
java
public static String toLowerSubset(String source, char substitute) { int len = source.length(); StringBuffer sb = new StringBuffer(len); char ch; for (int i = 0; i < len; i++) { ch = source.charAt(i); if (!Character.isLetterOrDigit(ch)) { ...
[ "public", "static", "String", "toLowerSubset", "(", "String", "source", ",", "char", "substitute", ")", "{", "int", "len", "=", "source", ".", "length", "(", ")", ";", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "len", ")", ";", "char", "ch", ...
Returns a string with non alphanumeric chars converted to the substitute character. A digit first character is also converted. By sqlbob@users @param source string to convert @param substitute character to use @return converted string
[ "Returns", "a", "string", "with", "non", "alphanumeric", "chars", "converted", "to", "the", "substitute", "character", ".", "A", "digit", "first", "character", "is", "also", "converted", ".", "By", "sqlbob" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringUtil.java#L115-L134
google/closure-templates
java/src/com/google/template/soy/jssrc/internal/NullSafeAccumulator.java
NullSafeAccumulator.dotAccess
NullSafeAccumulator dotAccess(FieldAccess access, boolean nullSafe) { """ Extends the access chain with a dot access to the given value. @param nullSafe If true, code will be generated to ensure the chain is non-null before dereferencing {@code access}. """ if (access instanceof ProtoCall) { Prot...
java
NullSafeAccumulator dotAccess(FieldAccess access, boolean nullSafe) { if (access instanceof ProtoCall) { ProtoCall protoCall = (ProtoCall) access; Expression maybeUnpack = protoCall.unpackFunction(); if (maybeUnpack != null) { Preconditions.checkState( unpackFunction == null, "...
[ "NullSafeAccumulator", "dotAccess", "(", "FieldAccess", "access", ",", "boolean", "nullSafe", ")", "{", "if", "(", "access", "instanceof", "ProtoCall", ")", "{", "ProtoCall", "protoCall", "=", "(", "ProtoCall", ")", "access", ";", "Expression", "maybeUnpack", "=...
Extends the access chain with a dot access to the given value. @param nullSafe If true, code will be generated to ensure the chain is non-null before dereferencing {@code access}.
[ "Extends", "the", "access", "chain", "with", "a", "dot", "access", "to", "the", "given", "value", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jssrc/internal/NullSafeAccumulator.java#L85-L98
pravega/pravega
client/src/main/java/io/pravega/client/stream/ScalingPolicy.java
ScalingPolicy.byEventRate
public static ScalingPolicy byEventRate(int targetRate, int scaleFactor, int minNumSegments) { """ Create a scaling policy to configure a stream to scale up and down according to event rate. Pravega scales a stream segment up in the case that one of these conditions holds: - The two-minute rate is greater than ...
java
public static ScalingPolicy byEventRate(int targetRate, int scaleFactor, int minNumSegments) { Preconditions.checkArgument(targetRate > 0, "Target rate should be > 0."); Preconditions.checkArgument(scaleFactor > 0, "Scale factor should be > 0. Otherwise use fixed scaling policy."); Preconditions...
[ "public", "static", "ScalingPolicy", "byEventRate", "(", "int", "targetRate", ",", "int", "scaleFactor", ",", "int", "minNumSegments", ")", "{", "Preconditions", ".", "checkArgument", "(", "targetRate", ">", "0", ",", "\"Target rate should be > 0.\"", ")", ";", "P...
Create a scaling policy to configure a stream to scale up and down according to event rate. Pravega scales a stream segment up in the case that one of these conditions holds: - The two-minute rate is greater than 5x the target rate - The five-minute rate is greater than 2x the target rate - The ten-minute rate is great...
[ "Create", "a", "scaling", "policy", "to", "configure", "a", "stream", "to", "scale", "up", "and", "down", "according", "to", "event", "rate", ".", "Pravega", "scales", "a", "stream", "segment", "up", "in", "the", "case", "that", "one", "of", "these", "co...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/client/src/main/java/io/pravega/client/stream/ScalingPolicy.java#L100-L105
alkacon/opencms-core
src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java
CmsDefaultXmlContentHandler.addSearchField
@Deprecated protected void addSearchField(CmsXmlContentDefinition contentDefinition, CmsSearchField field) { """ Adds a Solr field for an element.<p> @param contentDefinition the XML content definition this XML content handler belongs to @param field the Solr field """ addSearchField(contentDe...
java
@Deprecated protected void addSearchField(CmsXmlContentDefinition contentDefinition, CmsSearchField field) { addSearchField(contentDefinition, field, I_CmsXmlContentHandler.MappingType.ELEMENT); }
[ "@", "Deprecated", "protected", "void", "addSearchField", "(", "CmsXmlContentDefinition", "contentDefinition", ",", "CmsSearchField", "field", ")", "{", "addSearchField", "(", "contentDefinition", ",", "field", ",", "I_CmsXmlContentHandler", ".", "MappingType", ".", "EL...
Adds a Solr field for an element.<p> @param contentDefinition the XML content definition this XML content handler belongs to @param field the Solr field
[ "Adds", "a", "Solr", "field", "for", "an", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsDefaultXmlContentHandler.java#L2058-L2062
waldheinz/fat32-lib
src/main/java/de/waldheinz/fs/fat/FatFile.java
FatFile.write
@Override public void write(long offset, ByteBuffer srcBuf) throws ReadOnlyException, IOException { """ <p> {@inheritDoc} </p><p> If the data to be written extends beyond the current {@link #getLength() length} of this file, an attempt is made to {@link #setLength(long) grow} the file so that ...
java
@Override public void write(long offset, ByteBuffer srcBuf) throws ReadOnlyException, IOException { checkWritable(); updateTimeStamps(true); final long lastByte = offset + srcBuf.remaining(); if (lastByte > getLength()) { setLength(lastByte); ...
[ "@", "Override", "public", "void", "write", "(", "long", "offset", ",", "ByteBuffer", "srcBuf", ")", "throws", "ReadOnlyException", ",", "IOException", "{", "checkWritable", "(", ")", ";", "updateTimeStamps", "(", "true", ")", ";", "final", "long", "lastByte",...
<p> {@inheritDoc} </p><p> If the data to be written extends beyond the current {@link #getLength() length} of this file, an attempt is made to {@link #setLength(long) grow} the file so that the data will fit. Additionally, this method updates the "last accessed" and "last modified" fields on the directory entry that is...
[ "<p", ">", "{", "@inheritDoc", "}", "<", "/", "p", ">", "<p", ">", "If", "the", "data", "to", "be", "written", "extends", "beyond", "the", "current", "{", "@link", "#getLength", "()", "length", "}", "of", "this", "file", "an", "attempt", "is", "made"...
train
https://github.com/waldheinz/fat32-lib/blob/3d8f1a986339573576e02eb0b6ea49bfdc9cce26/src/main/java/de/waldheinz/fs/fat/FatFile.java#L145-L160
square/okhttp
okhttp/src/main/java/okhttp3/internal/http2/Http2Connection.java
Http2Connection.newStream
public Http2Stream newStream(List<Header> requestHeaders, boolean out) throws IOException { """ Returns a new locally-initiated stream. @param out true to create an output stream that we can use to send data to the remote peer. Corresponds to {@code FLAG_FIN}. """ return newStream(0, requestHeaders, out)...
java
public Http2Stream newStream(List<Header> requestHeaders, boolean out) throws IOException { return newStream(0, requestHeaders, out); }
[ "public", "Http2Stream", "newStream", "(", "List", "<", "Header", ">", "requestHeaders", ",", "boolean", "out", ")", "throws", "IOException", "{", "return", "newStream", "(", "0", ",", "requestHeaders", ",", "out", ")", ";", "}" ]
Returns a new locally-initiated stream. @param out true to create an output stream that we can use to send data to the remote peer. Corresponds to {@code FLAG_FIN}.
[ "Returns", "a", "new", "locally", "-", "initiated", "stream", "." ]
train
https://github.com/square/okhttp/blob/a8c65a822dd6cadd2de7d115bf94adf312e67868/okhttp/src/main/java/okhttp3/internal/http2/Http2Connection.java#L225-L227
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsNewLinkFunctionTable.java
CmsNewLinkFunctionTable.setHandler
public void setHandler(String contextId, Runnable action) { """ Sets the action which should be executed if cmsCreateAndEditNewElement is called with the given collector context id.<p> @param contextId the collector context id @param action the action to execute """ if (contextId != null) { ...
java
public void setHandler(String contextId, Runnable action) { if (contextId != null) { m_createFunctions.put(contextId, action); } }
[ "public", "void", "setHandler", "(", "String", "contextId", ",", "Runnable", "action", ")", "{", "if", "(", "contextId", "!=", "null", ")", "{", "m_createFunctions", ".", "put", "(", "contextId", ",", "action", ")", ";", "}", "}" ]
Sets the action which should be executed if cmsCreateAndEditNewElement is called with the given collector context id.<p> @param contextId the collector context id @param action the action to execute
[ "Sets", "the", "action", "which", "should", "be", "executed", "if", "cmsCreateAndEditNewElement", "is", "called", "with", "the", "given", "collector", "context", "id", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsNewLinkFunctionTable.java#L109-L114
netty/netty
codec-socks/src/main/java/io/netty/handler/codec/socksx/v4/Socks4ServerDecoder.java
Socks4ServerDecoder.readString
private static String readString(String fieldName, ByteBuf in) { """ Reads a variable-length NUL-terminated string as defined in SOCKS4. """ int length = in.bytesBefore(MAX_FIELD_LENGTH + 1, (byte) 0); if (length < 0) { throw new DecoderException("field '" + fieldName + "' longer th...
java
private static String readString(String fieldName, ByteBuf in) { int length = in.bytesBefore(MAX_FIELD_LENGTH + 1, (byte) 0); if (length < 0) { throw new DecoderException("field '" + fieldName + "' longer than " + MAX_FIELD_LENGTH + " chars"); } String value = in.readSlice(l...
[ "private", "static", "String", "readString", "(", "String", "fieldName", ",", "ByteBuf", "in", ")", "{", "int", "length", "=", "in", ".", "bytesBefore", "(", "MAX_FIELD_LENGTH", "+", "1", ",", "(", "byte", ")", "0", ")", ";", "if", "(", "length", "<", ...
Reads a variable-length NUL-terminated string as defined in SOCKS4.
[ "Reads", "a", "variable", "-", "length", "NUL", "-", "terminated", "string", "as", "defined", "in", "SOCKS4", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-socks/src/main/java/io/netty/handler/codec/socksx/v4/Socks4ServerDecoder.java#L122-L132
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleAE.java
S3CryptoModuleAE.adjustToDesiredRange
protected final S3ObjectWrapper adjustToDesiredRange(S3ObjectWrapper s3object, long[] range, Map<String,String> instruction) { """ Adjusts the retrieved S3Object so that the object contents contain only the range of bytes desired by the user. Since encrypted contents can only be retrieved in CIPHER_B...
java
protected final S3ObjectWrapper adjustToDesiredRange(S3ObjectWrapper s3object, long[] range, Map<String,String> instruction) { if (range == null) return s3object; // Figure out the original encryption scheme used, which can be // different from the crypto scheme used for ...
[ "protected", "final", "S3ObjectWrapper", "adjustToDesiredRange", "(", "S3ObjectWrapper", "s3object", ",", "long", "[", "]", "range", ",", "Map", "<", "String", ",", "String", ">", "instruction", ")", "{", "if", "(", "range", "==", "null", ")", "return", "s3o...
Adjusts the retrieved S3Object so that the object contents contain only the range of bytes desired by the user. Since encrypted contents can only be retrieved in CIPHER_BLOCK_SIZE (16 bytes) chunks, the S3Object potentially contains more bytes than desired, so this method adjusts the contents range. @param s3object T...
[ "Adjusts", "the", "retrieved", "S3Object", "so", "that", "the", "object", "contents", "contain", "only", "the", "range", "of", "bytes", "desired", "by", "the", "user", ".", "Since", "encrypted", "contents", "can", "only", "be", "retrieved", "in", "CIPHER_BLOCK...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3CryptoModuleAE.java#L286-L319
Jasig/uPortal
uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java
RDBMEntityGroupStore.contains
@Override public boolean contains(IEntityGroup group, IGroupMember member) throws GroupsException { """ Answers if <code>IGroupMember</code> member is a member of <code>group</code>. @return boolean @param group IEntityGroup @param member IGroupMember """ return (member.isGroup()) ...
java
@Override public boolean contains(IEntityGroup group, IGroupMember member) throws GroupsException { return (member.isGroup()) ? containsGroup(group, (IEntityGroup) member) : containsEntity(group, member); }
[ "@", "Override", "public", "boolean", "contains", "(", "IEntityGroup", "group", ",", "IGroupMember", "member", ")", "throws", "GroupsException", "{", "return", "(", "member", ".", "isGroup", "(", ")", ")", "?", "containsGroup", "(", "group", ",", "(", "IEnti...
Answers if <code>IGroupMember</code> member is a member of <code>group</code>. @return boolean @param group IEntityGroup @param member IGroupMember
[ "Answers", "if", "<code", ">", "IGroupMember<", "/", "code", ">", "member", "is", "a", "member", "of", "<code", ">", "group<", "/", "code", ">", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L169-L174
alkacon/opencms-core
src/org/opencms/ui/login/CmsChangePasswordDialog.java
CmsChangePasswordDialog.validatePasswords
boolean validatePasswords(String password1, String password2) { """ Validates the passwords, checking if they match and fulfill the requirements of the password handler.<p> Will show the appropriate errors if necessary.<p> @param password1 password 1 @param password2 password 2 @return <code>true</code> if...
java
boolean validatePasswords(String password1, String password2) { if (!password1.equals(password2)) { showPasswordMatchError(true); return false; } showPasswordMatchError(false); try { OpenCms.getPasswordHandler().validatePassword(password1); ...
[ "boolean", "validatePasswords", "(", "String", "password1", ",", "String", "password2", ")", "{", "if", "(", "!", "password1", ".", "equals", "(", "password2", ")", ")", "{", "showPasswordMatchError", "(", "true", ")", ";", "return", "false", ";", "}", "sh...
Validates the passwords, checking if they match and fulfill the requirements of the password handler.<p> Will show the appropriate errors if necessary.<p> @param password1 password 1 @param password2 password 2 @return <code>true</code> if valid
[ "Validates", "the", "passwords", "checking", "if", "they", "match", "and", "fulfill", "the", "requirements", "of", "the", "password", "handler", ".", "<p", ">", "Will", "show", "the", "appropriate", "errors", "if", "necessary", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/login/CmsChangePasswordDialog.java#L358-L373
js-lib-com/transaction.hibernate
src/main/java/js/transaction/hibernate/HibernateAdapter.java
HibernateAdapter.createTransaction
public TransactionImpl createTransaction(boolean readOnly) { """ Create a database handler. Create a new {@link TransactionImpl} and store it on current thread so that it can be retrieved by application code. This method is invoked by {@link TransactionManagerImpl} when start a new transaction. Note that created...
java
public TransactionImpl createTransaction(boolean readOnly) { TransactionImpl transaction = transactionsCache.get(); if(transaction != null) { transaction.incrementTransactionNestingLevel(); } else { transaction = new TransactionImpl(this, transactionTimeout, readOnly); transa...
[ "public", "TransactionImpl", "createTransaction", "(", "boolean", "readOnly", ")", "{", "TransactionImpl", "transaction", "=", "transactionsCache", ".", "get", "(", ")", ";", "if", "(", "transaction", "!=", "null", ")", "{", "transaction", ".", "incrementTransacti...
Create a database handler. Create a new {@link TransactionImpl} and store it on current thread so that it can be retrieved by application code. This method is invoked by {@link TransactionManagerImpl} when start a new transaction. Note that created handler is valid only on current transaction boundaries. @param readOn...
[ "Create", "a", "database", "handler", ".", "Create", "a", "new", "{", "@link", "TransactionImpl", "}", "and", "store", "it", "on", "current", "thread", "so", "that", "it", "can", "be", "retrieved", "by", "application", "code", ".", "This", "method", "is", ...
train
https://github.com/js-lib-com/transaction.hibernate/blob/3aaafa6fa573f27733e6edaef3a4b2cf97cf67d6/src/main/java/js/transaction/hibernate/HibernateAdapter.java#L200-L211
synchronoss/cpo-api
cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java
CassandraCpoAdapter.processUpdateGroup
protected <T> long processUpdateGroup(Collection<T> coll, String groupType, String groupName, Collection<CpoWhere> wheres, Collection<CpoOrderBy> orderBy, Collection<CpoNativeFunction> nativeExpressions) throws CpoException { """ DOCUMENT ME! @param coll DOCUMENT ME! @param groupType DOCUMENT ME! @param ...
java
protected <T> long processUpdateGroup(Collection<T> coll, String groupType, String groupName, Collection<CpoWhere> wheres, Collection<CpoOrderBy> orderBy, Collection<CpoNativeFunction> nativeExpressions) throws CpoException { Session sess; long updateCount = 0; try { sess = getWriteSession(); u...
[ "protected", "<", "T", ">", "long", "processUpdateGroup", "(", "Collection", "<", "T", ">", "coll", ",", "String", "groupType", ",", "String", "groupName", ",", "Collection", "<", "CpoWhere", ">", "wheres", ",", "Collection", "<", "CpoOrderBy", ">", "orderBy...
DOCUMENT ME! @param coll DOCUMENT ME! @param groupType DOCUMENT ME! @param groupName DOCUMENT ME! @return DOCUMENT ME! @throws CpoException DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java#L2108-L2121
jbundle/jbundle
main/screen/src/main/java/org/jbundle/main/user/screen/UserLoginScreen.java
UserLoginScreen.doServletCommand
public ScreenModel doServletCommand(ScreenModel screenParent) { """ Do the special HTML command. This gives the screen a chance to change screens for special HTML commands. You have a chance to change two things: 1. The information display line (this will display on the next screen... ie., submit was successful...
java
public ScreenModel doServletCommand(ScreenModel screenParent) { ScreenModel screen = super.doServletCommand(screenParent); // Process params from previous screen String strCommand = this.getProperty(DBParams.COMMAND); BaseApplication application = (BaseApplication)this.getTask()....
[ "public", "ScreenModel", "doServletCommand", "(", "ScreenModel", "screenParent", ")", "{", "ScreenModel", "screen", "=", "super", ".", "doServletCommand", "(", "screenParent", ")", ";", "// Process params from previous screen", "String", "strCommand", "=", "this", ".", ...
Do the special HTML command. This gives the screen a chance to change screens for special HTML commands. You have a chance to change two things: 1. The information display line (this will display on the next screen... ie., submit was successful) 2. The error display line (if there was an error) @return this or the new ...
[ "Do", "the", "special", "HTML", "command", ".", "This", "gives", "the", "screen", "a", "chance", "to", "change", "screens", "for", "special", "HTML", "commands", ".", "You", "have", "a", "chance", "to", "change", "two", "things", ":", "1", ".", "The", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/screen/src/main/java/org/jbundle/main/user/screen/UserLoginScreen.java#L208-L231
michael-rapp/AndroidMaterialDialog
library/src/main/java/de/mrapp/android/dialog/adapter/RecyclerViewAdapterWrapper.java
RecyclerViewAdapterWrapper.setItemChecked
public final void setItemChecked(final int position, final boolean checked) { """ Sets, whether the list item at a specific position should be selected, or not. @param position The position of the list item, whose selection state should be changed, as an {@link Integer} value @param checked True, if the lis...
java
public final void setItemChecked(final int position, final boolean checked) { if (choiceMode.setItemChecked(position, checked)) { notifyDataSetChanged(); if (checked && itemSelectedListener != null) { itemSelectedListener.onItemSelected(position); } }...
[ "public", "final", "void", "setItemChecked", "(", "final", "int", "position", ",", "final", "boolean", "checked", ")", "{", "if", "(", "choiceMode", ".", "setItemChecked", "(", "position", ",", "checked", ")", ")", "{", "notifyDataSetChanged", "(", ")", ";",...
Sets, whether the list item at a specific position should be selected, or not. @param position The position of the list item, whose selection state should be changed, as an {@link Integer} value @param checked True, if the list item should be selected, false otherwise
[ "Sets", "whether", "the", "list", "item", "at", "a", "specific", "position", "should", "be", "selected", "or", "not", "." ]
train
https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/adapter/RecyclerViewAdapterWrapper.java#L373-L381
spring-projects/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONObject.java
JSONObject.optInt
public int optInt(String name, int fallback) { """ Returns the value mapped by {@code name} if it exists and is an int or can be coerced to an int. Returns {@code fallback} otherwise. @param name the name of the property @param fallback a fallback value @return the value or {@code fallback} """ Object ob...
java
public int optInt(String name, int fallback) { Object object = opt(name); Integer result = JSON.toInteger(object); return result != null ? result : fallback; }
[ "public", "int", "optInt", "(", "String", "name", ",", "int", "fallback", ")", "{", "Object", "object", "=", "opt", "(", "name", ")", ";", "Integer", "result", "=", "JSON", ".", "toInteger", "(", "object", ")", ";", "return", "result", "!=", "null", ...
Returns the value mapped by {@code name} if it exists and is an int or can be coerced to an int. Returns {@code fallback} otherwise. @param name the name of the property @param fallback a fallback value @return the value or {@code fallback}
[ "Returns", "the", "value", "mapped", "by", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONObject.java#L504-L508
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/StringUtil.java
StringUtil.equalsIgnoreCase
public static boolean equalsIgnoreCase(String str1, String str2) { """ Returns true if two strings are equals ignoring the letter case in {@link #LOCALE_INTERNAL} locale. @param str1 first string to compare @param str2 second string to compare @return true if the strings are equals ignoring the case """ ...
java
public static boolean equalsIgnoreCase(String str1, String str2) { return (str1 == null || str2 == null) ? false : (str1 == str2 || lowerCaseInternal(str1).equals(lowerCaseInternal(str2))); }
[ "public", "static", "boolean", "equalsIgnoreCase", "(", "String", "str1", ",", "String", "str2", ")", "{", "return", "(", "str1", "==", "null", "||", "str2", "==", "null", ")", "?", "false", ":", "(", "str1", "==", "str2", "||", "lowerCaseInternal", "(",...
Returns true if two strings are equals ignoring the letter case in {@link #LOCALE_INTERNAL} locale. @param str1 first string to compare @param str2 second string to compare @return true if the strings are equals ignoring the case
[ "Returns", "true", "if", "two", "strings", "are", "equals", "ignoring", "the", "letter", "case", "in", "{", "@link", "#LOCALE_INTERNAL", "}", "locale", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/StringUtil.java#L386-L390
dihedron/dihedron-commons
src/main/java/org/dihedron/core/zip/ZipArchive.java
ZipArchive.addFile
public void addFile(String zipEntry, String filename) throws IOException { """ Adds a file to a ZIP archive, given its path. @param zipEntry the name of the entry in the archive; if null, the name of the original file is used. @param filename The path of a file to be added to the ZIP archive. """ addF...
java
public void addFile(String zipEntry, String filename) throws IOException { addFile(zipEntry, new File(filename)); }
[ "public", "void", "addFile", "(", "String", "zipEntry", ",", "String", "filename", ")", "throws", "IOException", "{", "addFile", "(", "zipEntry", ",", "new", "File", "(", "filename", ")", ")", ";", "}" ]
Adds a file to a ZIP archive, given its path. @param zipEntry the name of the entry in the archive; if null, the name of the original file is used. @param filename The path of a file to be added to the ZIP archive.
[ "Adds", "a", "file", "to", "a", "ZIP", "archive", "given", "its", "path", "." ]
train
https://github.com/dihedron/dihedron-commons/blob/a5194cdaa0d6417ef4aade6ea407a1cad6e8458e/src/main/java/org/dihedron/core/zip/ZipArchive.java#L162-L164
amzn/ion-java
src/com/amazon/ion/impl/lite/IonDatagramLite.java
IonDatagramLite.setSymbolTableAtIndex
void setSymbolTableAtIndex(int elementid, SymbolTable symbols) { """ /* Sets the context of all elements following elementid to context, until it encounters a context different to the original context at elementid. """ assert(elementid < get_child_count()); TopLevelContext context = TopLevelC...
java
void setSymbolTableAtIndex(int elementid, SymbolTable symbols) { assert(elementid < get_child_count()); TopLevelContext context = TopLevelContext.wrap(symbols, this); TopLevelContext startContext = (TopLevelContext) _children[elementid].getContext(); while (elementid < get_child_cou...
[ "void", "setSymbolTableAtIndex", "(", "int", "elementid", ",", "SymbolTable", "symbols", ")", "{", "assert", "(", "elementid", "<", "get_child_count", "(", ")", ")", ";", "TopLevelContext", "context", "=", "TopLevelContext", ".", "wrap", "(", "symbols", ",", "...
/* Sets the context of all elements following elementid to context, until it encounters a context different to the original context at elementid.
[ "/", "*", "Sets", "the", "context", "of", "all", "elements", "following", "elementid", "to", "context", "until", "it", "encounters", "a", "context", "different", "to", "the", "original", "context", "at", "elementid", "." ]
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/lite/IonDatagramLite.java#L533-L542
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java
Dynamic.ofInvocation
public static Dynamic ofInvocation(Method method, List<?> rawArguments) { """ Represents a constant that is resolved by invoking a {@code static} factory method. @param method The method to invoke to create the represented constant value. @param rawArguments The method's constant arguments. @return A dy...
java
public static Dynamic ofInvocation(Method method, List<?> rawArguments) { return ofInvocation(new MethodDescription.ForLoadedMethod(method), rawArguments); }
[ "public", "static", "Dynamic", "ofInvocation", "(", "Method", "method", ",", "List", "<", "?", ">", "rawArguments", ")", "{", "return", "ofInvocation", "(", "new", "MethodDescription", ".", "ForLoadedMethod", "(", "method", ")", ",", "rawArguments", ")", ";", ...
Represents a constant that is resolved by invoking a {@code static} factory method. @param method The method to invoke to create the represented constant value. @param rawArguments The method's constant arguments. @return A dynamic constant that is resolved by the supplied factory method.
[ "Represents", "a", "constant", "that", "is", "resolved", "by", "invoking", "a", "{", "@code", "static", "}", "factory", "method", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java#L1531-L1533
messagebird/java-rest-api
api/src/main/java/com/messagebird/MessageBirdClient.java
MessageBirdClient.listVoiceMessages
public VoiceMessageList listVoiceMessages(final Integer offset, final Integer limit) throws UnauthorizedException, GeneralException { """ List voice messages @param offset offset for result list @param limit limit for result list @return VoiceMessageList @throws UnauthorizedException if client is unauthoriz...
java
public VoiceMessageList listVoiceMessages(final Integer offset, final Integer limit) throws UnauthorizedException, GeneralException { if (offset != null && offset < 0) { throw new IllegalArgumentException("Offset must be > 0"); } if (limit != null && limit < 0) { throw ne...
[ "public", "VoiceMessageList", "listVoiceMessages", "(", "final", "Integer", "offset", ",", "final", "Integer", "limit", ")", "throws", "UnauthorizedException", ",", "GeneralException", "{", "if", "(", "offset", "!=", "null", "&&", "offset", "<", "0", ")", "{", ...
List voice messages @param offset offset for result list @param limit limit for result list @return VoiceMessageList @throws UnauthorizedException if client is unauthorized @throws GeneralException general exception
[ "List", "voice", "messages" ]
train
https://github.com/messagebird/java-rest-api/blob/f92cd93afff413e6dc12aa6e41e69f26cbae8941/api/src/main/java/com/messagebird/MessageBirdClient.java#L332-L340
Stratio/stratio-cassandra
src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java
CQLSSTableWriter.rawAddRow
public CQLSSTableWriter rawAddRow(Map<String, ByteBuffer> values) throws InvalidRequestException, IOException { """ Adds a new row to the writer given already serialized values. <p> This is equivalent to the other rawAddRow methods, but takes a map whose keys are the names of the columns to add instead of t...
java
public CQLSSTableWriter rawAddRow(Map<String, ByteBuffer> values) throws InvalidRequestException, IOException { int size = Math.min(values.size(), boundNames.size()); List<ByteBuffer> rawValues = new ArrayList<>(size); for (int i = 0; i < size; i++) { ColumnSpecification spec...
[ "public", "CQLSSTableWriter", "rawAddRow", "(", "Map", "<", "String", ",", "ByteBuffer", ">", "values", ")", "throws", "InvalidRequestException", ",", "IOException", "{", "int", "size", "=", "Math", ".", "min", "(", "values", ".", "size", "(", ")", ",", "b...
Adds a new row to the writer given already serialized values. <p> This is equivalent to the other rawAddRow methods, but takes a map whose keys are the names of the columns to add instead of taking a list of the values in the order of the insert statement used during construction of this write. @param values a map of ...
[ "Adds", "a", "new", "row", "to", "the", "writer", "given", "already", "serialized", "values", ".", "<p", ">", "This", "is", "equivalent", "to", "the", "other", "rawAddRow", "methods", "but", "takes", "a", "map", "whose", "keys", "are", "the", "names", "o...
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/io/sstable/CQLSSTableWriter.java#L251-L261
ACRA/acra
acra-core/src/main/java/org/acra/collector/ConfigurationCollector.java
ConfigurationCollector.activeFlags
@NonNull private String activeFlags(@NonNull SparseArray<String> valueNames, int bitfield) { """ Some fields contain multiple value types which can be isolated by applying a bitmask. That method returns the concatenation of active values. @param valueNames The array containing the different values and nam...
java
@NonNull private String activeFlags(@NonNull SparseArray<String> valueNames, int bitfield) { final StringBuilder result = new StringBuilder(); // Look for masks, apply it an retrieve the masked value for (int i = 0; i < valueNames.size(); i++) { final int maskValue = valueNames....
[ "@", "NonNull", "private", "String", "activeFlags", "(", "@", "NonNull", "SparseArray", "<", "String", ">", "valueNames", ",", "int", "bitfield", ")", "{", "final", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "// Look for masks, apply ...
Some fields contain multiple value types which can be isolated by applying a bitmask. That method returns the concatenation of active values. @param valueNames The array containing the different values and names for this field. Must contain mask values too. @param bitfield The bitfield to inspect. @return The names ...
[ "Some", "fields", "contain", "multiple", "value", "types", "which", "can", "be", "isolated", "by", "applying", "a", "bitmask", ".", "That", "method", "returns", "the", "concatenation", "of", "active", "values", "." ]
train
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-core/src/main/java/org/acra/collector/ConfigurationCollector.java#L238-L256
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteTablesInner.java
RouteTablesInner.beginUpdateTags
public RouteTableInner beginUpdateTags(String resourceGroupName, String routeTableName, Map<String, String> tags) { """ Updates a route table tags. @param resourceGroupName The name of the resource group. @param routeTableName The name of the route table. @param tags Resource tags. @throws IllegalArgumentExc...
java
public RouteTableInner beginUpdateTags(String resourceGroupName, String routeTableName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).toBlocking().single().body(); }
[ "public", "RouteTableInner", "beginUpdateTags", "(", "String", "resourceGroupName", ",", "String", "routeTableName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "r...
Updates a route table tags. @param resourceGroupName The name of the resource group. @param routeTableName The name of the route table. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws Runtime...
[ "Updates", "a", "route", "table", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteTablesInner.java#L835-L837
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/MessagesApi.java
MessagesApi.getAggregatesHistogram
public AggregatesHistogramResponse getAggregatesHistogram(Long startDate, Long endDate, String sdid, String field, String interval) throws ApiException { """ Get Normalized Message Histogram Get Histogram on normalized messages. @param startDate Timestamp of earliest message (in milliseconds since epoch). (requi...
java
public AggregatesHistogramResponse getAggregatesHistogram(Long startDate, Long endDate, String sdid, String field, String interval) throws ApiException { ApiResponse<AggregatesHistogramResponse> resp = getAggregatesHistogramWithHttpInfo(startDate, endDate, sdid, field, interval); return resp.getData(); ...
[ "public", "AggregatesHistogramResponse", "getAggregatesHistogram", "(", "Long", "startDate", ",", "Long", "endDate", ",", "String", "sdid", ",", "String", "field", ",", "String", "interval", ")", "throws", "ApiException", "{", "ApiResponse", "<", "AggregatesHistogramR...
Get Normalized Message Histogram Get Histogram on normalized messages. @param startDate Timestamp of earliest message (in milliseconds since epoch). (required) @param endDate Timestamp of latest message (in milliseconds since epoch). (required) @param sdid Source device ID of the messages being searched. (optional) @pa...
[ "Get", "Normalized", "Message", "Histogram", "Get", "Histogram", "on", "normalized", "messages", "." ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/MessagesApi.java#L150-L153
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.div
public static double div(float v1, float v2, int scale, RoundingMode roundingMode) { """ 提供(相对)精确的除法运算,当发生除不尽的情况时,由scale指定精确度 @param v1 被除数 @param v2 除数 @param scale 精确度,如果为负值,取绝对值 @param roundingMode 保留小数的模式 {@link RoundingMode} @return 两个参数的商 """ return div(Float.toString(v1), Float.toString(v2), s...
java
public static double div(float v1, float v2, int scale, RoundingMode roundingMode) { return div(Float.toString(v1), Float.toString(v2), scale, roundingMode).doubleValue(); }
[ "public", "static", "double", "div", "(", "float", "v1", ",", "float", "v2", ",", "int", "scale", ",", "RoundingMode", "roundingMode", ")", "{", "return", "div", "(", "Float", ".", "toString", "(", "v1", ")", ",", "Float", ".", "toString", "(", "v2", ...
提供(相对)精确的除法运算,当发生除不尽的情况时,由scale指定精确度 @param v1 被除数 @param v2 除数 @param scale 精确度,如果为负值,取绝对值 @param roundingMode 保留小数的模式 {@link RoundingMode} @return 两个参数的商
[ "提供", "(", "相对", ")", "精确的除法运算", "当发生除不尽的情况时", "由scale指定精确度" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L648-L650
dadoonet/elasticsearch-beyonder
src/main/java/fr/pilato/elasticsearch/tools/index/IndexSettingsReader.java
IndexSettingsReader.readSettings
public static String readSettings(String root, String index, String jsonFile) { """ Read index settings @param root dir within the classpath @param index index name @param jsonFile json file to read @return Settings """ logger.trace("Reading [{}] for [{}] in [{}]...", jsonFile, index, root); String set...
java
public static String readSettings(String root, String index, String jsonFile) { logger.trace("Reading [{}] for [{}] in [{}]...", jsonFile, index, root); String settingsFile = root + "/" + index + "/" + jsonFile; return readFileFromClasspath(settingsFile); }
[ "public", "static", "String", "readSettings", "(", "String", "root", ",", "String", "index", ",", "String", "jsonFile", ")", "{", "logger", ".", "trace", "(", "\"Reading [{}] for [{}] in [{}]...\"", ",", "jsonFile", ",", "index", ",", "root", ")", ";", "String...
Read index settings @param root dir within the classpath @param index index name @param jsonFile json file to read @return Settings
[ "Read", "index", "settings" ]
train
https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/index/IndexSettingsReader.java#L44-L48
grails/grails-core
grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java
GrailsASTUtils.buildGetMapExpression
public static MethodCallExpression buildGetMapExpression(final Expression objectExpression, final String keyName) { """ Build static direct call to get entry from Map @param objectExpression @param keyName @return The method call expression """ return applyDefaultMethodTarget(new MethodCallExpress...
java
public static MethodCallExpression buildGetMapExpression(final Expression objectExpression, final String keyName) { return applyDefaultMethodTarget(new MethodCallExpression(objectExpression, "get", new ArgumentListExpression(new ConstantExpression(keyName))), Map.class); }
[ "public", "static", "MethodCallExpression", "buildGetMapExpression", "(", "final", "Expression", "objectExpression", ",", "final", "String", "keyName", ")", "{", "return", "applyDefaultMethodTarget", "(", "new", "MethodCallExpression", "(", "objectExpression", ",", "\"get...
Build static direct call to get entry from Map @param objectExpression @param keyName @return The method call expression
[ "Build", "static", "direct", "call", "to", "get", "entry", "from", "Map" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L1362-L1364
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrRequestHandler.java
JawrRequestHandler.createJawrConfig
protected JawrConfig createJawrConfig(Properties props) { """ Create the Jawr config from the properties @param props the properties @return the Jawr config """ jawrConfig = new JawrConfig(resourceType, props, configPropResolver); // Override properties which are incompatible with the build time bund...
java
protected JawrConfig createJawrConfig(Properties props) { jawrConfig = new JawrConfig(resourceType, props, configPropResolver); // Override properties which are incompatible with the build time bundle // processing if (ThreadLocalJawrContext.isBundleProcessingAtBuildTime()) { jawrConfig.setUseBundleMapping(...
[ "protected", "JawrConfig", "createJawrConfig", "(", "Properties", "props", ")", "{", "jawrConfig", "=", "new", "JawrConfig", "(", "resourceType", ",", "props", ",", "configPropResolver", ")", ";", "// Override properties which are incompatible with the build time bundle", "...
Create the Jawr config from the properties @param props the properties @return the Jawr config
[ "Create", "the", "Jawr", "config", "from", "the", "properties" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/servlet/JawrRequestHandler.java#L619-L632