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
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/remote/http/HttpRequest.java
HttpRequest.addQueryParameter
public HttpRequest addQueryParameter(String name, String value) { """ Set a query parameter, adding to existing values if present. The implementation will ensure that the name and value are properly encoded. """ queryParameters.put( Objects.requireNonNull(name, "Name must be set"), Objects...
java
public HttpRequest addQueryParameter(String name, String value) { queryParameters.put( Objects.requireNonNull(name, "Name must be set"), Objects.requireNonNull(value, "Value must be set")); return this; }
[ "public", "HttpRequest", "addQueryParameter", "(", "String", "name", ",", "String", "value", ")", "{", "queryParameters", ".", "put", "(", "Objects", ".", "requireNonNull", "(", "name", ",", "\"Name must be set\"", ")", ",", "Objects", ".", "requireNonNull", "("...
Set a query parameter, adding to existing values if present. The implementation will ensure that the name and value are properly encoded.
[ "Set", "a", "query", "parameter", "adding", "to", "existing", "values", "if", "present", ".", "The", "implementation", "will", "ensure", "that", "the", "name", "and", "value", "are", "properly", "encoded", "." ]
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/remote/http/HttpRequest.java#L61-L66
ManfredTremmel/gwt-bean-validators
mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/util/BeanPropertyReaderUtil.java
BeanPropertyReaderUtil.getNullSaveProperty
public static Object getNullSaveProperty(final Object pbean, final String pname) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { """ <p> Return the value of the specified property of the specified bean, no matter which property reference format is used, as a String. </p> ...
java
public static Object getNullSaveProperty(final Object pbean, final String pname) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { Object property; try { property = PropertyUtils.getProperty(pbean, pname); } catch (final NestedNullException pexception) { pro...
[ "public", "static", "Object", "getNullSaveProperty", "(", "final", "Object", "pbean", ",", "final", "String", "pname", ")", "throws", "IllegalAccessException", ",", "InvocationTargetException", ",", "NoSuchMethodException", "{", "Object", "property", ";", "try", "{", ...
<p> Return the value of the specified property of the specified bean, no matter which property reference format is used, as a String. </p> <p> If there is a null value in path hierarchy, exception is cached and null returned. </p> @param pbean Bean whose property is to be extracted @param pname Possibly indexed and/or...
[ "<p", ">", "Return", "the", "value", "of", "the", "specified", "property", "of", "the", "specified", "bean", "no", "matter", "which", "property", "reference", "format", "is", "used", "as", "a", "String", ".", "<", "/", "p", ">", "<p", ">", "If", "there...
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/util/BeanPropertyReaderUtil.java#L89-L98
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuDeviceComputeCapability
@Deprecated public static int cuDeviceComputeCapability(int major[], int minor[], CUdevice dev) { """ Returns the compute capability of the device. <pre> CUresult cuDeviceComputeCapability ( int* major, int* minor, CUdevice dev ) </pre> <div> <p>Returns the compute capability of the device. Deprec...
java
@Deprecated public static int cuDeviceComputeCapability(int major[], int minor[], CUdevice dev) { return checkResult(cuDeviceComputeCapabilityNative(major, minor, dev)); }
[ "@", "Deprecated", "public", "static", "int", "cuDeviceComputeCapability", "(", "int", "major", "[", "]", ",", "int", "minor", "[", "]", ",", "CUdevice", "dev", ")", "{", "return", "checkResult", "(", "cuDeviceComputeCapabilityNative", "(", "major", ",", "mino...
Returns the compute capability of the device. <pre> CUresult cuDeviceComputeCapability ( int* major, int* minor, CUdevice dev ) </pre> <div> <p>Returns the compute capability of the device. DeprecatedThis function was deprecated as of CUDA 5.0 and its functionality superceded by cuDeviceGetAttribute(). </p> <p>Returns...
[ "Returns", "the", "compute", "capability", "of", "the", "device", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L763-L767
gsi-upm/Shanks
shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/creation/CreationShanksAgentCapability.java
CreationShanksAgentCapability.removeAgent
public static void removeAgent(ShanksSimulation sim, String agentID) throws ShanksException { """ "Removes" an agent with the given name from the simulation Be careful: what this actually do is to stop the agent execution. @param sim -The Shanks Simulation @param agentID - The name of the agen...
java
public static void removeAgent(ShanksSimulation sim, String agentID) throws ShanksException { sim.logger.info("Stoppable not fount. Attempting direct stop..."); sim.unregisterShanksAgent(agentID); sim.logger.info("Agent " + agentID + " stopped."); }
[ "public", "static", "void", "removeAgent", "(", "ShanksSimulation", "sim", ",", "String", "agentID", ")", "throws", "ShanksException", "{", "sim", ".", "logger", ".", "info", "(", "\"Stoppable not fount. Attempting direct stop...\"", ")", ";", "sim", ".", "unregiste...
"Removes" an agent with the given name from the simulation Be careful: what this actually do is to stop the agent execution. @param sim -The Shanks Simulation @param agentID - The name of the agent to remove @throws ShanksException An UnkownAgentException if the Agent ID is not found on the simulation.
[ "Removes", "an", "agent", "with", "the", "given", "name", "from", "the", "simulation" ]
train
https://github.com/gsi-upm/Shanks/blob/35d87a81c22731f4f83bbd0571c9c6d466bd16be/shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/creation/CreationShanksAgentCapability.java#L73-L78
BlueBrain/bluima
modules/bluima_pdf/src/main/java/ch/epfl/bbp/uima/pdf/grobid/diff_match_patch.java
diff_match_patch.diff_linesToChars
protected LinesToCharsResult diff_linesToChars(String text1, String text2) { """ Split two texts into a list of strings. Reduce the texts to a string of hashes where each Unicode character represents one line. @param text1 First string. @param text2 Second string. @return An object containing the encoded t...
java
protected LinesToCharsResult diff_linesToChars(String text1, String text2) { List<String> lineArray = new ArrayList<String>(); Map<String, Integer> lineHash = new HashMap<String, Integer>(); // e.g. linearray[4] == "Hello\n" // e.g. linehash.get("Hello\n") == 4 // "\x00" is a va...
[ "protected", "LinesToCharsResult", "diff_linesToChars", "(", "String", "text1", ",", "String", "text2", ")", "{", "List", "<", "String", ">", "lineArray", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "Map", "<", "String", ",", "Integer", ">"...
Split two texts into a list of strings. Reduce the texts to a string of hashes where each Unicode character represents one line. @param text1 First string. @param text2 Second string. @return An object containing the encoded text1, the encoded text2 and the List of unique strings. The zeroth element of the List of uni...
[ "Split", "two", "texts", "into", "a", "list", "of", "strings", ".", "Reduce", "the", "texts", "to", "a", "string", "of", "hashes", "where", "each", "Unicode", "character", "represents", "one", "line", "." ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_pdf/src/main/java/ch/epfl/bbp/uima/pdf/grobid/diff_match_patch.java#L551-L564
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplFloat_CustomFieldSerializer.java
OWLLiteralImplFloat_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLLiteralImplFloat instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user....
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLLiteralImplFloat instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLLiteralImplFloat", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.client.rp...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLLiteralImplFloat_CustomFieldSerializer.java#L66-L69
aalmiray/Json-lib
src/main/java/net/sf/json/JSONObject.java
JSONObject.element
public JSONObject element( String key, boolean value ) { """ Put a key/boolean pair in the JSONObject. @param key A key string. @param value A boolean which is the value. @return this. @throws JSONException If the key is null. """ verifyIsNull(); return element( key, value ? Boolean.TRUE : Bo...
java
public JSONObject element( String key, boolean value ) { verifyIsNull(); return element( key, value ? Boolean.TRUE : Boolean.FALSE ); }
[ "public", "JSONObject", "element", "(", "String", "key", ",", "boolean", "value", ")", "{", "verifyIsNull", "(", ")", ";", "return", "element", "(", "key", ",", "value", "?", "Boolean", ".", "TRUE", ":", "Boolean", ".", "FALSE", ")", ";", "}" ]
Put a key/boolean pair in the JSONObject. @param key A key string. @param value A boolean which is the value. @return this. @throws JSONException If the key is null.
[ "Put", "a", "key", "/", "boolean", "pair", "in", "the", "JSONObject", "." ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JSONObject.java#L1569-L1572
katharsis-project/katharsis-framework
katharsis-core/src/main/java/io/katharsis/legacy/registry/ResourceRegistryBuilder.java
ResourceRegistryBuilder.build
public ResourceRegistry build(ResourceLookup resourceLookup, ModuleRegistry moduleRegistry, ServiceUrlProvider serviceUrl) { """ Uses a {@link ResourceLookup} to get all resources and repositories associated with found resource. @param resourceLookup Lookup for getting all resource classes. @param serviceUrl...
java
public ResourceRegistry build(ResourceLookup resourceLookup, ModuleRegistry moduleRegistry, ServiceUrlProvider serviceUrl) { Set<Class<?>> jsonApiResources = resourceLookup.getResourceClasses(); Set<ResourceInformation> resourceInformationSet = new HashSet<>(jsonApiResources.size()); for (Class<?> clazz : js...
[ "public", "ResourceRegistry", "build", "(", "ResourceLookup", "resourceLookup", ",", "ModuleRegistry", "moduleRegistry", ",", "ServiceUrlProvider", "serviceUrl", ")", "{", "Set", "<", "Class", "<", "?", ">", ">", "jsonApiResources", "=", "resourceLookup", ".", "getR...
Uses a {@link ResourceLookup} to get all resources and repositories associated with found resource. @param resourceLookup Lookup for getting all resource classes. @param serviceUrl URL to the service @return an instance of ResourceRegistry
[ "Uses", "a", "{", "@link", "ResourceLookup", "}", "to", "get", "all", "resources", "and", "repositories", "associated", "with", "found", "resource", "." ]
train
https://github.com/katharsis-project/katharsis-framework/blob/73d1a8763c49c5cf4643d43e2dbfedb647630c46/katharsis-core/src/main/java/io/katharsis/legacy/registry/ResourceRegistryBuilder.java#L69-L102
infinispan/infinispan
cdi/embedded/src/main/java/org/infinispan/cdi/embedded/InfinispanExtensionEmbedded.java
InfinispanExtensionEmbedded.createDefaultEmbeddedCacheManagerBean
private Bean<EmbeddedCacheManager> createDefaultEmbeddedCacheManagerBean(BeanManager beanManager) { """ The default cache manager is an instance of {@link DefaultCacheManager} initialized with the default configuration (either produced by {@link #createDefaultEmbeddedConfigurationBean(BeanManager)} or provided b...
java
private Bean<EmbeddedCacheManager> createDefaultEmbeddedCacheManagerBean(BeanManager beanManager) { return new BeanBuilder<EmbeddedCacheManager>(beanManager).beanClass(InfinispanExtensionEmbedded.class) .addTypes(Object.class, EmbeddedCacheManager.class) .scope(ApplicationScoped.class) ...
[ "private", "Bean", "<", "EmbeddedCacheManager", ">", "createDefaultEmbeddedCacheManagerBean", "(", "BeanManager", "beanManager", ")", "{", "return", "new", "BeanBuilder", "<", "EmbeddedCacheManager", ">", "(", "beanManager", ")", ".", "beanClass", "(", "InfinispanExtens...
The default cache manager is an instance of {@link DefaultCacheManager} initialized with the default configuration (either produced by {@link #createDefaultEmbeddedConfigurationBean(BeanManager)} or provided by user). The default cache manager can be overridden by creating a producer which produces the new default cach...
[ "The", "default", "cache", "manager", "is", "an", "instance", "of", "{", "@link", "DefaultCacheManager", "}", "initialized", "with", "the", "default", "configuration", "(", "either", "produced", "by", "{", "@link", "#createDefaultEmbeddedConfigurationBean", "(", "Be...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/cdi/embedded/src/main/java/org/infinispan/cdi/embedded/InfinispanExtensionEmbedded.java#L205-L233
google/closure-compiler
src/com/google/javascript/jscomp/PerformanceTracker.java
PerformanceTracker.recordPassStop
void recordPassStop(String passName, long runtime) { """ Collects information about a pass P after P finishes running, eg, how much time P took and what was its impact on code size. @param passName short name of the pass @param runtime execution time in milliseconds """ int allocMem = getAllocatedMega...
java
void recordPassStop(String passName, long runtime) { int allocMem = getAllocatedMegabytes(); Stats logStats = this.currentPass.pop(); checkState(passName.equals(logStats.pass)); this.log.add(logStats); // Update fields that aren't related to code size logStats.runtime = runtime; logStats.al...
[ "void", "recordPassStop", "(", "String", "passName", ",", "long", "runtime", ")", "{", "int", "allocMem", "=", "getAllocatedMegabytes", "(", ")", ";", "Stats", "logStats", "=", "this", ".", "currentPass", ".", "pop", "(", ")", ";", "checkState", "(", "pass...
Collects information about a pass P after P finishes running, eg, how much time P took and what was its impact on code size. @param passName short name of the pass @param runtime execution time in milliseconds
[ "Collects", "information", "about", "a", "pass", "P", "after", "P", "finishes", "running", "eg", "how", "much", "time", "P", "took", "and", "what", "was", "its", "impact", "on", "code", "size", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/PerformanceTracker.java#L150-L168
StanKocken/EfficientAdapter
efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/ViewHelper.java
ViewHelper.setText
public static void setText(EfficientCacheView cacheView, int viewId, CharSequence text) { """ Equivalent to calling TextView.setText @param cacheView The cache of views to get the view from @param viewId The id of the view whose text should change @param text The new text for the view """ ...
java
public static void setText(EfficientCacheView cacheView, int viewId, CharSequence text) { View view = cacheView.findViewByIdEfficient(viewId); if (view instanceof TextView) { ((TextView) view).setText(text); } }
[ "public", "static", "void", "setText", "(", "EfficientCacheView", "cacheView", ",", "int", "viewId", ",", "CharSequence", "text", ")", "{", "View", "view", "=", "cacheView", ".", "findViewByIdEfficient", "(", "viewId", ")", ";", "if", "(", "view", "instanceof"...
Equivalent to calling TextView.setText @param cacheView The cache of views to get the view from @param viewId The id of the view whose text should change @param text The new text for the view
[ "Equivalent", "to", "calling", "TextView", ".", "setText" ]
train
https://github.com/StanKocken/EfficientAdapter/blob/0bcc3a20182cbce9d7901e1e2a9104251637167d/efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/ViewHelper.java#L115-L120
twotoasters/RecyclerViewLib
library/src/main/java/com/twotoasters/anim/PendingItemAnimator.java
PendingItemAnimator.animateMoveImpl
protected ViewPropertyAnimatorCompat animateMoveImpl(final ViewHolder holder, int fromX, int fromY, int toX, int toY) { """ Preform your animation. You do not need to override this in most cases cause the default is pretty good. Listeners will be overridden * """ final View view = holder.itemView; ...
java
protected ViewPropertyAnimatorCompat animateMoveImpl(final ViewHolder holder, int fromX, int fromY, int toX, int toY) { final View view = holder.itemView; final int deltaX = toX - fromX; final int deltaY = toY - fromY; ViewCompat.animate(view).cancel(); if (deltaX != 0) { ...
[ "protected", "ViewPropertyAnimatorCompat", "animateMoveImpl", "(", "final", "ViewHolder", "holder", ",", "int", "fromX", ",", "int", "fromY", ",", "int", "toX", ",", "int", "toY", ")", "{", "final", "View", "view", "=", "holder", ".", "itemView", ";", "final...
Preform your animation. You do not need to override this in most cases cause the default is pretty good. Listeners will be overridden *
[ "Preform", "your", "animation", ".", "You", "do", "not", "need", "to", "override", "this", "in", "most", "cases", "cause", "the", "default", "is", "pretty", "good", ".", "Listeners", "will", "be", "overridden", "*" ]
train
https://github.com/twotoasters/RecyclerViewLib/blob/2379fd5bbf57d4dfc8b28046b7ace950905c75f0/library/src/main/java/com/twotoasters/anim/PendingItemAnimator.java#L276-L291
baratine/baratine
kraken/src/main/java/com/caucho/v5/kraken/table/WatchServiceImpl.java
WatchServiceImpl.notifyWatch
@Override public void notifyWatch(TableKraken table, byte []key) { """ Notify local and remote watches for the given table and key @param table the table with the updated row @param key the key for the updated row """ WatchTable watchTable = _tableMap.get(table); if (watchTable != null) { ...
java
@Override public void notifyWatch(TableKraken table, byte []key) { WatchTable watchTable = _tableMap.get(table); if (watchTable != null) { watchTable.onPut(key, TableListener.TypePut.REMOTE); } }
[ "@", "Override", "public", "void", "notifyWatch", "(", "TableKraken", "table", ",", "byte", "[", "]", "key", ")", "{", "WatchTable", "watchTable", "=", "_tableMap", ".", "get", "(", "table", ")", ";", "if", "(", "watchTable", "!=", "null", ")", "{", "w...
Notify local and remote watches for the given table and key @param table the table with the updated row @param key the key for the updated row
[ "Notify", "local", "and", "remote", "watches", "for", "the", "given", "table", "and", "key" ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kraken/table/WatchServiceImpl.java#L212-L220
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java
PreprocessorContext.setGlobalVariable
@Nonnull public PreprocessorContext setGlobalVariable(@Nonnull final String name, @Nonnull final Value value) { """ Set a global variable value @param name the variable name, it must not be null and will be normalized to the supported format @param value the variable value, it must not be null @return this...
java
@Nonnull public PreprocessorContext setGlobalVariable(@Nonnull final String name, @Nonnull final Value value) { assertNotNull("Variable name is null", name); final String normalizedName = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalizedName.isEmpty()) { throw makeExcept...
[ "@", "Nonnull", "public", "PreprocessorContext", "setGlobalVariable", "(", "@", "Nonnull", "final", "String", "name", ",", "@", "Nonnull", "final", "Value", "value", ")", "{", "assertNotNull", "(", "\"Variable name is null\"", ",", "name", ")", ";", "final", "St...
Set a global variable value @param name the variable name, it must not be null and will be normalized to the supported format @param value the variable value, it must not be null @return this preprocessor context
[ "Set", "a", "global", "variable", "value" ]
train
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/context/PreprocessorContext.java#L587-L613
davetcc/tcMenu
tcMenuJavaApi/src/main/java/com/thecoderscorner/menu/domain/state/MenuTree.java
MenuTree.removeMenuItem
public void removeMenuItem(SubMenuItem parent, MenuItem item) { """ Remove the menu item for the provided menu item in the provided sub menu. @param parent the submenu to search @param item the item to remove (Search By ID) """ SubMenuItem subMenu = (parent != null) ? parent : ROOT; synchron...
java
public void removeMenuItem(SubMenuItem parent, MenuItem item) { SubMenuItem subMenu = (parent != null) ? parent : ROOT; synchronized (subMenuItems) { ArrayList<MenuItem> subMenuChildren = subMenuItems.get(subMenu); if (subMenuChildren == null) { throw new Unsuppo...
[ "public", "void", "removeMenuItem", "(", "SubMenuItem", "parent", ",", "MenuItem", "item", ")", "{", "SubMenuItem", "subMenu", "=", "(", "parent", "!=", "null", ")", "?", "parent", ":", "ROOT", ";", "synchronized", "(", "subMenuItems", ")", "{", "ArrayList",...
Remove the menu item for the provided menu item in the provided sub menu. @param parent the submenu to search @param item the item to remove (Search By ID)
[ "Remove", "the", "menu", "item", "for", "the", "provided", "menu", "item", "in", "the", "provided", "sub", "menu", "." ]
train
https://github.com/davetcc/tcMenu/blob/61546e4b982b25ceaff384073fe9ec1fff55e64a/tcMenuJavaApi/src/main/java/com/thecoderscorner/menu/domain/state/MenuTree.java#L210-L225
undertow-io/undertow
core/src/main/java/io/undertow/websockets/core/WebSockets.java
WebSockets.sendBinary
public static <T> void sendBinary(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) { """ Sends a complete binary message, invoking the callback when complete Automatically frees the pooled byte buffer when done. @param pooledData The data to s...
java
public static <T> void sendBinary(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) { sendInternal(pooledData, WebSocketFrameType.BINARY, wsChannel, callback, context, -1); }
[ "public", "static", "<", "T", ">", "void", "sendBinary", "(", "final", "PooledByteBuffer", "pooledData", ",", "final", "WebSocketChannel", "wsChannel", ",", "final", "WebSocketCallback", "<", "T", ">", "callback", ",", "T", "context", ")", "{", "sendInternal", ...
Sends a complete binary message, invoking the callback when complete Automatically frees the pooled byte buffer when done. @param pooledData The data to send, it will be freed when done @param wsChannel The web socket channel @param callback The callback to invoke on completion @param context The context object that w...
[ "Sends", "a", "complete", "binary", "message", "invoking", "the", "callback", "when", "complete", "Automatically", "frees", "the", "pooled", "byte", "buffer", "when", "done", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/WebSockets.java#L699-L701
fabric8io/kubernetes-client
openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/BuildConfigOperationsImpl.java
BuildConfigOperationsImpl.deleteBuilds
private void deleteBuilds() { """ /* Labels are limited to 63 chars so need to first truncate the build config name (if required), retrieve builds with matching label, then check the build config name against the builds' build config annotation which have no such length restriction (but aren't usable for search...
java
private void deleteBuilds() { if (getName() == null) { return; } String buildConfigLabelValue = getName().substring(0, Math.min(getName().length(), 63)); BuildList matchingBuilds = new BuildOperationsImpl(client, (OpenShiftConfig) config).inNamespace(namespace).withLabel(BUILD_CONFIG_LABEL, buil...
[ "private", "void", "deleteBuilds", "(", ")", "{", "if", "(", "getName", "(", ")", "==", "null", ")", "{", "return", ";", "}", "String", "buildConfigLabelValue", "=", "getName", "(", ")", ".", "substring", "(", "0", ",", "Math", ".", "min", "(", "getN...
/* Labels are limited to 63 chars so need to first truncate the build config name (if required), retrieve builds with matching label, then check the build config name against the builds' build config annotation which have no such length restriction (but aren't usable for searching). Would be better if referenced build ...
[ "/", "*", "Labels", "are", "limited", "to", "63", "chars", "so", "need", "to", "first", "truncate", "the", "build", "config", "name", "(", "if", "required", ")", "retrieve", "builds", "with", "matching", "label", "then", "check", "the", "build", "config", ...
train
https://github.com/fabric8io/kubernetes-client/blob/141668a882ed8e902c045a5cd0a80f14bd17d132/openshift-client/src/main/java/io/fabric8/openshift/client/dsl/internal/BuildConfigOperationsImpl.java#L178-L200
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewayConnectionsInner.java
VirtualNetworkGatewayConnectionsInner.getByResourceGroupAsync
public Observable<VirtualNetworkGatewayConnectionInner> getByResourceGroupAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { """ Gets the specified virtual network gateway connection by resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkGate...
java
public Observable<VirtualNetworkGatewayConnectionInner> getByResourceGroupAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1<ServiceResponse<VirtualNetworkGatewayCon...
[ "public", "Observable", "<", "VirtualNetworkGatewayConnectionInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayConnectionName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName",...
Gets the specified virtual network gateway connection by resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. @throws IllegalArgumentException thrown if parameters fail the validation @return the observab...
[ "Gets", "the", "specified", "virtual", "network", "gateway", "connection", "by", "resource", "group", "." ]
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/VirtualNetworkGatewayConnectionsInner.java#L331-L338
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Utils/MapFileHelper.java
MapFileHelper.getNewSaveFileLocation
public static String getNewSaveFileLocation(boolean isTemporary) { """ Get a filename to use for creating a new Minecraft save map.<br> Ensure no duplicates. @param isTemporary mark the filename such that the file management code knows to delete this later @return a unique filename (relative to the saves folder...
java
public static String getNewSaveFileLocation(boolean isTemporary) { File dst; File savesDir = FMLClientHandler.instance().getSavesDir(); do { // We used to create filenames based on the current date/time, but this can cause problems when // multiple clients might be writin...
[ "public", "static", "String", "getNewSaveFileLocation", "(", "boolean", "isTemporary", ")", "{", "File", "dst", ";", "File", "savesDir", "=", "FMLClientHandler", ".", "instance", "(", ")", ".", "getSavesDir", "(", ")", ";", "do", "{", "// We used to create filen...
Get a filename to use for creating a new Minecraft save map.<br> Ensure no duplicates. @param isTemporary mark the filename such that the file management code knows to delete this later @return a unique filename (relative to the saves folder)
[ "Get", "a", "filename", "to", "use", "for", "creating", "a", "new", "Minecraft", "save", "map", ".", "<br", ">", "Ensure", "no", "duplicates", "." ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Utils/MapFileHelper.java#L79-L99
jenkinsci/jenkins
core/src/main/java/jenkins/util/xml/XMLUtils.java
XMLUtils._transform
private static void _transform(Source source, Result out) throws TransformerException { """ potentially unsafe XML transformation. @param source The XML input to transform. @param out The Result of transforming the <code>source</code>. """ TransformerFactory factory = TransformerFactory.newInstance()...
java
private static void _transform(Source source, Result out) throws TransformerException { TransformerFactory factory = TransformerFactory.newInstance(); factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); // this allows us to use UTF-8 for storing data, // plus it checks any...
[ "private", "static", "void", "_transform", "(", "Source", "source", ",", "Result", "out", ")", "throws", "TransformerException", "{", "TransformerFactory", "factory", "=", "TransformerFactory", ".", "newInstance", "(", ")", ";", "factory", ".", "setFeature", "(", ...
potentially unsafe XML transformation. @param source The XML input to transform. @param out The Result of transforming the <code>source</code>.
[ "potentially", "unsafe", "XML", "transformation", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/util/xml/XMLUtils.java#L203-L211
mozilla/rhino
src/org/mozilla/javascript/NativeSet.java
NativeSet.loadFromIterable
static void loadFromIterable(Context cx, Scriptable scope, ScriptableObject set, Object arg1) { """ If an "iterable" object was passed to the constructor, there are many many things to do. This is common code with NativeWeakSet. """ if ((arg1 == null) || Undefined.instance.equals(arg1)) { ...
java
static void loadFromIterable(Context cx, Scriptable scope, ScriptableObject set, Object arg1) { if ((arg1 == null) || Undefined.instance.equals(arg1)) { return; } // Call the "[Symbol.iterator]" property as a function. Object ito = ScriptRuntime.callIterator(arg1, cx, sc...
[ "static", "void", "loadFromIterable", "(", "Context", "cx", ",", "Scriptable", "scope", ",", "ScriptableObject", "set", ",", "Object", "arg1", ")", "{", "if", "(", "(", "arg1", "==", "null", ")", "||", "Undefined", ".", "instance", ".", "equals", "(", "a...
If an "iterable" object was passed to the constructor, there are many many things to do. This is common code with NativeWeakSet.
[ "If", "an", "iterable", "object", "was", "passed", "to", "the", "constructor", "there", "are", "many", "many", "things", "to", "do", ".", "This", "is", "common", "code", "with", "NativeWeakSet", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/NativeSet.java#L155-L184
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/SimpleFormatterImpl.java
SimpleFormatterImpl.formatRawPattern
public static String formatRawPattern(String pattern, int min, int max, CharSequence... values) { """ Formats the not-compiled pattern with the given values. Equivalent to compileToStringMinMaxArguments() followed by formatCompiledPattern(). The number of arguments checked against the given limits is the highes...
java
public static String formatRawPattern(String pattern, int min, int max, CharSequence... values) { StringBuilder sb = new StringBuilder(); String compiledPattern = compileToStringMinMaxArguments(pattern, sb, min, max); sb.setLength(0); return formatAndAppend(compiledPattern, sb, null, val...
[ "public", "static", "String", "formatRawPattern", "(", "String", "pattern", ",", "int", "min", ",", "int", "max", ",", "CharSequence", "...", "values", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "String", "compiledPattern", ...
Formats the not-compiled pattern with the given values. Equivalent to compileToStringMinMaxArguments() followed by formatCompiledPattern(). The number of arguments checked against the given limits is the highest argument number plus one, not the number of occurrences of arguments. @param pattern Not-compiled form of a...
[ "Formats", "the", "not", "-", "compiled", "pattern", "with", "the", "given", "values", ".", "Equivalent", "to", "compileToStringMinMaxArguments", "()", "followed", "by", "formatCompiledPattern", "()", ".", "The", "number", "of", "arguments", "checked", "against", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/SimpleFormatterImpl.java#L205-L210
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.hosting_web_serviceName_cdn_duration_POST
public OvhOrder hosting_web_serviceName_cdn_duration_POST(String serviceName, String duration, OvhCdnOfferEnum offer) throws IOException { """ Create order REST: POST /order/hosting/web/{serviceName}/cdn/{duration} @param offer [required] Cdn offers you can add to your hosting @param serviceName [required] Th...
java
public OvhOrder hosting_web_serviceName_cdn_duration_POST(String serviceName, String duration, OvhCdnOfferEnum offer) throws IOException { String qPath = "/order/hosting/web/{serviceName}/cdn/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o = new HashMap<String, Object>...
[ "public", "OvhOrder", "hosting_web_serviceName_cdn_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhCdnOfferEnum", "offer", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/hosting/web/{serviceName}/cdn/{duration}\"", ";", ...
Create order REST: POST /order/hosting/web/{serviceName}/cdn/{duration} @param offer [required] Cdn offers you can add to your hosting @param serviceName [required] The internal name of your hosting @param duration [required] Duration
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5013-L5020
duracloud/duracloud
durastore/src/main/java/org/duracloud/durastore/rest/SpaceResource.java
SpaceResource.updateSpaceACLs
public void updateSpaceACLs(String spaceID, Map<String, AclType> spaceACLs, String storeID) throws ResourceException { """ Updates the ACLs of a space. @param spaceID @param spaceACLs @param storeID """ try { StorageProvid...
java
public void updateSpaceACLs(String spaceID, Map<String, AclType> spaceACLs, String storeID) throws ResourceException { try { StorageProvider storage = storageProviderFactory.getStorageProvider( storeID); if (...
[ "public", "void", "updateSpaceACLs", "(", "String", "spaceID", ",", "Map", "<", "String", ",", "AclType", ">", "spaceACLs", ",", "String", "storeID", ")", "throws", "ResourceException", "{", "try", "{", "StorageProvider", "storage", "=", "storageProviderFactory", ...
Updates the ACLs of a space. @param spaceID @param spaceACLs @param storeID
[ "Updates", "the", "ACLs", "of", "a", "space", "." ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/durastore/src/main/java/org/duracloud/durastore/rest/SpaceResource.java#L221-L237
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/unmarshaller/json/core/JsonNullableValidator.java
JsonNullableValidator.ensureCollection
public void ensureCollection(StructuredType entityType) throws ODataException { """ Ensure that non nullable collection are present. @param entityType entityType @throws ODataException If unable to ensure collection is present """ List<String> missingCollectionPropertyName = new ArrayList<>(); ...
java
public void ensureCollection(StructuredType entityType) throws ODataException { List<String> missingCollectionPropertyName = new ArrayList<>(); entityType.getStructuralProperties().stream() .filter(property -> (property.isCollection()) && !(property instanceof Na...
[ "public", "void", "ensureCollection", "(", "StructuredType", "entityType", ")", "throws", "ODataException", "{", "List", "<", "String", ">", "missingCollectionPropertyName", "=", "new", "ArrayList", "<>", "(", ")", ";", "entityType", ".", "getStructuralProperties", ...
Ensure that non nullable collection are present. @param entityType entityType @throws ODataException If unable to ensure collection is present
[ "Ensure", "that", "non", "nullable", "collection", "are", "present", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/unmarshaller/json/core/JsonNullableValidator.java#L52-L70
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/DefaultTraceCollector.java
DefaultTraceCollector.processInContent
protected void processInContent(String location, FragmentBuilder builder, int hashCode) { """ This method processes the in content if available. @param location The instrumentation location @param builder The builder @param hashCode The hash code, or -1 to ignore the hash code """ if (builder.isIn...
java
protected void processInContent(String location, FragmentBuilder builder, int hashCode) { if (builder.isInBufferActive(hashCode)) { processIn(location, null, builder.getInData(hashCode)); } else if (log.isLoggable(Level.FINEST)) { log.finest("processInContent: location=[" + locat...
[ "protected", "void", "processInContent", "(", "String", "location", ",", "FragmentBuilder", "builder", ",", "int", "hashCode", ")", "{", "if", "(", "builder", ".", "isInBufferActive", "(", "hashCode", ")", ")", "{", "processIn", "(", "location", ",", "null", ...
This method processes the in content if available. @param location The instrumentation location @param builder The builder @param hashCode The hash code, or -1 to ignore the hash code
[ "This", "method", "processes", "the", "in", "content", "if", "available", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/DefaultTraceCollector.java#L894-L901
twilio/twilio-java
src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountryReader.java
AvailablePhoneNumberCountryReader.getPage
@Override @SuppressWarnings("checkstyle:linelength") public Page<AvailablePhoneNumberCountry> getPage(final String targetUrl, final TwilioRestClient client) { """ Retrieve the target page from the Twilio API. @param targetUrl API-generated URL for the requested results page @param client TwilioRestClie...
java
@Override @SuppressWarnings("checkstyle:linelength") public Page<AvailablePhoneNumberCountry> getPage(final String targetUrl, final TwilioRestClient client) { this.pathAccountSid = this.pathAccountSid == null ? client.getAccountSid() : this.pathAccountSid; Request request = new Request( ...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"checkstyle:linelength\"", ")", "public", "Page", "<", "AvailablePhoneNumberCountry", ">", "getPage", "(", "final", "String", "targetUrl", ",", "final", "TwilioRestClient", "client", ")", "{", "this", ".", "pathAccoun...
Retrieve the target page from the Twilio API. @param targetUrl API-generated URL for the requested results page @param client TwilioRestClient with which to make the request @return AvailablePhoneNumberCountry ResourceSet
[ "Retrieve", "the", "target", "page", "from", "the", "Twilio", "API", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/api/v2010/account/AvailablePhoneNumberCountryReader.java#L80-L90
sonyxperiadev/gerrit-events
src/main/java/com/sonymobile/tools/gerrit/gerritevents/GerritQueryHandler.java
GerritQueryHandler.queryJson
public List<String> queryJson(String queryString, boolean getPatchSets, boolean getCurrentPatchSet, boolean getFiles) throws SshException, IOException { """ Runs the query and returns the result as a list of JSON formatted strings. @param queryString the query. @param getPatchSets if all patch-sets o...
java
public List<String> queryJson(String queryString, boolean getPatchSets, boolean getCurrentPatchSet, boolean getFiles) throws SshException, IOException { return queryJson(queryString, getPatchSets, getCurrentPatchSet, getFiles, false); }
[ "public", "List", "<", "String", ">", "queryJson", "(", "String", "queryString", ",", "boolean", "getPatchSets", ",", "boolean", "getCurrentPatchSet", ",", "boolean", "getFiles", ")", "throws", "SshException", ",", "IOException", "{", "return", "queryJson", "(", ...
Runs the query and returns the result as a list of JSON formatted strings. @param queryString the query. @param getPatchSets if all patch-sets of the projects found should be included in the result. Meaning if --patch-sets should be appended to the command call. @param getCurrentPatchSet if the current patch-set for th...
[ "Runs", "the", "query", "and", "returns", "the", "result", "as", "a", "list", "of", "JSON", "formatted", "strings", "." ]
train
https://github.com/sonyxperiadev/gerrit-events/blob/9a443d13dded85cc4709136ac33989f2bbb34fe2/src/main/java/com/sonymobile/tools/gerrit/gerritevents/GerritQueryHandler.java#L290-L293
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/TransientBinaryStore.java
TransientBinaryStore.newTempDirectory
private static File newTempDirectory() { """ Obtain a new temporary directory that can be used by a transient binary store. Note that none of the directories are actually created at this time, but are instead created (if needed) during {@link #initializeStorage(File)}. @return the new directory; never null ...
java
private static File newTempDirectory() { String tempDirName = System.getProperty(JBOSS_SERVER_TMPDIR); if (tempDirName == null) { tempDirName = System.getProperty(JAVA_IO_TMPDIR); } if (tempDirName == null) { throw new SystemFailureException(JcrI18n.tempDirectoryS...
[ "private", "static", "File", "newTempDirectory", "(", ")", "{", "String", "tempDirName", "=", "System", ".", "getProperty", "(", "JBOSS_SERVER_TMPDIR", ")", ";", "if", "(", "tempDirName", "==", "null", ")", "{", "tempDirName", "=", "System", ".", "getProperty"...
Obtain a new temporary directory that can be used by a transient binary store. Note that none of the directories are actually created at this time, but are instead created (if needed) during {@link #initializeStorage(File)}. @return the new directory; never null
[ "Obtain", "a", "new", "temporary", "directory", "that", "can", "be", "used", "by", "a", "transient", "binary", "store", ".", "Note", "that", "none", "of", "the", "directories", "are", "actually", "created", "at", "this", "time", "but", "are", "instead", "c...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/value/binary/TransientBinaryStore.java#L54-L66
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java
ST_Drape.processPolygon
private static Polygon processPolygon(Polygon p, Geometry triangleLines, GeometryFactory factory) { """ Cut the lines of the polygon with the triangles @param p @param triangleLines @param factory @return """ Geometry diffExt = p.getExteriorRing().difference(triangleLines); final int nbOfHo...
java
private static Polygon processPolygon(Polygon p, Geometry triangleLines, GeometryFactory factory) { Geometry diffExt = p.getExteriorRing().difference(triangleLines); final int nbOfHoles = p.getNumInteriorRing(); final LinearRing[] holes = new LinearRing[nbOfHoles]; for (int i = 0; i < nb...
[ "private", "static", "Polygon", "processPolygon", "(", "Polygon", "p", ",", "Geometry", "triangleLines", ",", "GeometryFactory", "factory", ")", "{", "Geometry", "diffExt", "=", "p", ".", "getExteriorRing", "(", ")", ".", "difference", "(", "triangleLines", ")",...
Cut the lines of the polygon with the triangles @param p @param triangleLines @param factory @return
[ "Cut", "the", "lines", "of", "the", "polygon", "with", "the", "triangles" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java#L184-L193
JodaOrg/joda-time
src/main/java/org/joda/time/format/PeriodFormatterBuilder.java
PeriodFormatterBuilder.appendSuffix
public PeriodFormatterBuilder appendSuffix(String[] regularExpressions, String[] suffixes) { """ Append a field suffix which applies only to the last appended field. If the field is not printed, neither is the suffix. <p> The value is converted to String. During parsing, the suffix is selected based on the mat...
java
public PeriodFormatterBuilder appendSuffix(String[] regularExpressions, String[] suffixes) { if (regularExpressions == null || suffixes == null || regularExpressions.length < 1 || regularExpressions.length != suffixes.length) { throw new IllegalArgumentException(); } ...
[ "public", "PeriodFormatterBuilder", "appendSuffix", "(", "String", "[", "]", "regularExpressions", ",", "String", "[", "]", "suffixes", ")", "{", "if", "(", "regularExpressions", "==", "null", "||", "suffixes", "==", "null", "||", "regularExpressions", ".", "len...
Append a field suffix which applies only to the last appended field. If the field is not printed, neither is the suffix. <p> The value is converted to String. During parsing, the suffix is selected based on the match with the regular expression. The index of the first regular expression that matches value converted to ...
[ "Append", "a", "field", "suffix", "which", "applies", "only", "to", "the", "last", "appended", "field", ".", "If", "the", "field", "is", "not", "printed", "neither", "is", "the", "suffix", ".", "<p", ">", "The", "value", "is", "converted", "to", "String"...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/PeriodFormatterBuilder.java#L667-L673
actorapp/actor-platform
actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java
Messenger.registerApplePush
@ObjectiveCName("registerApplePushWithApnsId:withToken:") public void registerApplePush(int apnsId, String token) { """ Register apple push @param apnsId internal APNS cert key @param token APNS token """ modules.getPushesModule().registerApplePush(apnsId, token); }
java
@ObjectiveCName("registerApplePushWithApnsId:withToken:") public void registerApplePush(int apnsId, String token) { modules.getPushesModule().registerApplePush(apnsId, token); }
[ "@", "ObjectiveCName", "(", "\"registerApplePushWithApnsId:withToken:\"", ")", "public", "void", "registerApplePush", "(", "int", "apnsId", ",", "String", "token", ")", "{", "modules", ".", "getPushesModule", "(", ")", ".", "registerApplePush", "(", "apnsId", ",", ...
Register apple push @param apnsId internal APNS cert key @param token APNS token
[ "Register", "apple", "push" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java#L2688-L2691
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/KnowledgeBasesClient.java
KnowledgeBasesClient.createKnowledgeBase
public final KnowledgeBase createKnowledgeBase(ProjectName parent, KnowledgeBase knowledgeBase) { """ Creates a knowledge base. <p>Sample code: <pre><code> try (KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.create()) { ProjectName parent = ProjectName.of("[PROJECT]"); KnowledgeBase know...
java
public final KnowledgeBase createKnowledgeBase(ProjectName parent, KnowledgeBase knowledgeBase) { CreateKnowledgeBaseRequest request = CreateKnowledgeBaseRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setKnowledgeBase(knowledgeBase) .build();...
[ "public", "final", "KnowledgeBase", "createKnowledgeBase", "(", "ProjectName", "parent", ",", "KnowledgeBase", "knowledgeBase", ")", "{", "CreateKnowledgeBaseRequest", "request", "=", "CreateKnowledgeBaseRequest", ".", "newBuilder", "(", ")", ".", "setParent", "(", "par...
Creates a knowledge base. <p>Sample code: <pre><code> try (KnowledgeBasesClient knowledgeBasesClient = KnowledgeBasesClient.create()) { ProjectName parent = ProjectName.of("[PROJECT]"); KnowledgeBase knowledgeBase = KnowledgeBase.newBuilder().build(); KnowledgeBase response = knowledgeBasesClient.createKnowledgeBase(...
[ "Creates", "a", "knowledge", "base", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/KnowledgeBasesClient.java#L405-L413
OpenTSDB/opentsdb
src/tools/CliUtils.java
CliUtils.toBytes
static byte[] toBytes(final String s) { """ Invokes the reflected {@code UniqueId.toBytes()} method with the given string using the UniqueId character set. @param s The string to convert to a byte array @return The byte array @throws RuntimeException if reflection failed """ try { return (byte[]...
java
static byte[] toBytes(final String s) { try { return (byte[]) toBytes.invoke(null, s); } catch (Exception e) { throw new RuntimeException("toBytes=" + toBytes, e); } }
[ "static", "byte", "[", "]", "toBytes", "(", "final", "String", "s", ")", "{", "try", "{", "return", "(", "byte", "[", "]", ")", "toBytes", ".", "invoke", "(", "null", ",", "s", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "...
Invokes the reflected {@code UniqueId.toBytes()} method with the given string using the UniqueId character set. @param s The string to convert to a byte array @return The byte array @throws RuntimeException if reflection failed
[ "Invokes", "the", "reflected", "{" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tools/CliUtils.java#L245-L251
deeplearning4j/deeplearning4j
datavec/datavec-api/src/main/java/org/datavec/api/timeseries/util/TimeSeriesWritableUtils.java
TimeSeriesWritableUtils.convertWritablesSequence
public static Pair<INDArray, INDArray> convertWritablesSequence(List<List<List<Writable>>> timeSeriesRecord) { """ Convert the writables to a sequence (3d) data set, and also return the mask array (if necessary) @param timeSeriesRecord the input time series """ return convertWritablesSequence(timeS...
java
public static Pair<INDArray, INDArray> convertWritablesSequence(List<List<List<Writable>>> timeSeriesRecord) { return convertWritablesSequence(timeSeriesRecord,getDetails(timeSeriesRecord)); }
[ "public", "static", "Pair", "<", "INDArray", ",", "INDArray", ">", "convertWritablesSequence", "(", "List", "<", "List", "<", "List", "<", "Writable", ">", ">", ">", "timeSeriesRecord", ")", "{", "return", "convertWritablesSequence", "(", "timeSeriesRecord", ","...
Convert the writables to a sequence (3d) data set, and also return the mask array (if necessary) @param timeSeriesRecord the input time series
[ "Convert", "the", "writables", "to", "a", "sequence", "(", "3d", ")", "data", "set", "and", "also", "return", "the", "mask", "array", "(", "if", "necessary", ")", "@param", "timeSeriesRecord", "the", "input", "time", "series" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-api/src/main/java/org/datavec/api/timeseries/util/TimeSeriesWritableUtils.java#L92-L94
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java
AbstractRadial.createSection3DEffectGradient
protected RadialGradientPaint createSection3DEffectGradient(final int WIDTH, final float RADIUS_FACTOR) { """ Returns a radial gradient paint that will be used as overlay for the track or section image to achieve some kind of a 3d effect. @param WIDTH @param RADIUS_FACTOR : 0.38f for the standard radial gauge ...
java
protected RadialGradientPaint createSection3DEffectGradient(final int WIDTH, final float RADIUS_FACTOR) { final float[] FRACTIONS; final Color[] COLORS; if (isExpandedSectionsEnabled()) { FRACTIONS = new float[]{ 0.0f, 0.7f, 0.75f, ...
[ "protected", "RadialGradientPaint", "createSection3DEffectGradient", "(", "final", "int", "WIDTH", ",", "final", "float", "RADIUS_FACTOR", ")", "{", "final", "float", "[", "]", "FRACTIONS", ";", "final", "Color", "[", "]", "COLORS", ";", "if", "(", "isExpandedSe...
Returns a radial gradient paint that will be used as overlay for the track or section image to achieve some kind of a 3d effect. @param WIDTH @param RADIUS_FACTOR : 0.38f for the standard radial gauge @return a radial gradient paint that will be used as overlay for the track or section image
[ "Returns", "a", "radial", "gradient", "paint", "that", "will", "be", "used", "as", "overlay", "for", "the", "track", "or", "section", "image", "to", "achieve", "some", "kind", "of", "a", "3d", "effect", "." ]
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/AbstractRadial.java#L1189-L1229
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/LogAnalyticsInner.java
LogAnalyticsInner.exportThrottledRequestsAsync
public Observable<LogAnalyticsOperationResultInner> exportThrottledRequestsAsync(String location, ThrottledRequestsInput parameters) { """ Export logs that show total throttled Api requests for this subscription in the given time window. @param location The location upon which virtual-machine-sizes is queried. ...
java
public Observable<LogAnalyticsOperationResultInner> exportThrottledRequestsAsync(String location, ThrottledRequestsInput parameters) { return exportThrottledRequestsWithServiceResponseAsync(location, parameters).map(new Func1<ServiceResponse<LogAnalyticsOperationResultInner>, LogAnalyticsOperationResultInner>()...
[ "public", "Observable", "<", "LogAnalyticsOperationResultInner", ">", "exportThrottledRequestsAsync", "(", "String", "location", ",", "ThrottledRequestsInput", "parameters", ")", "{", "return", "exportThrottledRequestsWithServiceResponseAsync", "(", "location", ",", "parameters...
Export logs that show total throttled Api requests for this subscription in the given time window. @param location The location upon which virtual-machine-sizes is queried. @param parameters Parameters supplied to the LogAnalytics getThrottledRequests Api. @throws IllegalArgumentException thrown if parameters fail the...
[ "Export", "logs", "that", "show", "total", "throttled", "Api", "requests", "for", "this", "subscription", "in", "the", "given", "time", "window", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/LogAnalyticsInner.java#L269-L276
rythmengine/spring-rythm
src/main/java/org/rythmengine/spring/web/util/ControllerUtil.java
ControllerUtil.renderBinary
protected static void renderBinary(InputStream is, String name, boolean inline) { """ Return a 200 OK application/binary response with content-disposition attachment. @param is The stream to copy @param name Name of file user is downloading. @param inline true to set the response Content-Disposition to inline...
java
protected static void renderBinary(InputStream is, String name, boolean inline) { throw new BinaryResult(is, name, inline); }
[ "protected", "static", "void", "renderBinary", "(", "InputStream", "is", ",", "String", "name", ",", "boolean", "inline", ")", "{", "throw", "new", "BinaryResult", "(", "is", ",", "name", ",", "inline", ")", ";", "}" ]
Return a 200 OK application/binary response with content-disposition attachment. @param is The stream to copy @param name Name of file user is downloading. @param inline true to set the response Content-Disposition to inline
[ "Return", "a", "200", "OK", "application", "/", "binary", "response", "with", "content", "-", "disposition", "attachment", "." ]
train
https://github.com/rythmengine/spring-rythm/blob/a654016371c72dabaea50ac9a57626da7614d236/src/main/java/org/rythmengine/spring/web/util/ControllerUtil.java#L137-L139
xiancloud/xian
xian-zookeeper/xian-curator/xian-curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedDelayQueue.java
DistributedDelayQueue.putMulti
public boolean putMulti(MultiItem<T> items, long delayUntilEpoch, int maxWait, TimeUnit unit) throws Exception { """ Same as {@link #putMulti(MultiItem, long)} but allows a maximum wait time if an upper bound was set via {@link QueueBuilder#maxItems}. @param items items to add @param delayUntilEpoch futu...
java
public boolean putMulti(MultiItem<T> items, long delayUntilEpoch, int maxWait, TimeUnit unit) throws Exception { Preconditions.checkArgument(delayUntilEpoch > 0, "delayUntilEpoch cannot be negative"); queue.checkState(); return queue.internalPut(null, items, queue.makeItemPath() + epo...
[ "public", "boolean", "putMulti", "(", "MultiItem", "<", "T", ">", "items", ",", "long", "delayUntilEpoch", ",", "int", "maxWait", ",", "TimeUnit", "unit", ")", "throws", "Exception", "{", "Preconditions", ".", "checkArgument", "(", "delayUntilEpoch", ">", "0",...
Same as {@link #putMulti(MultiItem, long)} but allows a maximum wait time if an upper bound was set via {@link QueueBuilder#maxItems}. @param items items to add @param delayUntilEpoch future epoch (milliseconds) when this item will be available to consumers @param maxWait maximum wait @param unit wait unit @return tru...
[ "Same", "as", "{", "@link", "#putMulti", "(", "MultiItem", "long", ")", "}", "but", "allows", "a", "maximum", "wait", "time", "if", "an", "upper", "bound", "was", "set", "via", "{", "@link", "QueueBuilder#maxItems", "}", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-zookeeper/xian-curator/xian-curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedDelayQueue.java#L191-L198
gosu-lang/gosu-lang
gosu-lab/src/main/java/editor/util/TextComponentUtil.java
TextComponentUtil.getWhiteSpaceLineStartBefore
public static int getWhiteSpaceLineStartBefore( String script, int start ) { """ Returns the start of the previous line if that line is only whitespace. Returns -1 otherwise. """ int startLine = getLineStart( script, start ); if( startLine > 0 ) { int nextLineEnd = startLine - 1; int p...
java
public static int getWhiteSpaceLineStartBefore( String script, int start ) { int startLine = getLineStart( script, start ); if( startLine > 0 ) { int nextLineEnd = startLine - 1; int previousLineStart = getLineStart( script, nextLineEnd ); boolean whitespace = GosuStringUtil.isWhitespace...
[ "public", "static", "int", "getWhiteSpaceLineStartBefore", "(", "String", "script", ",", "int", "start", ")", "{", "int", "startLine", "=", "getLineStart", "(", "script", ",", "start", ")", ";", "if", "(", "startLine", ">", "0", ")", "{", "int", "nextLineE...
Returns the start of the previous line if that line is only whitespace. Returns -1 otherwise.
[ "Returns", "the", "start", "of", "the", "previous", "line", "if", "that", "line", "is", "only", "whitespace", ".", "Returns", "-", "1", "otherwise", "." ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-lab/src/main/java/editor/util/TextComponentUtil.java#L779-L793
jenkinsci/jenkins
core/src/main/java/hudson/util/ArgumentListBuilder.java
ArgumentListBuilder.addKeyValuePairsFromPropertyString
public ArgumentListBuilder addKeyValuePairsFromPropertyString(String prefix, String properties, VariableResolver<String> vr, Set<String> propsToMask) throws IOException { """ Adds key value pairs as "-Dkey=value -Dkey=value ..." by parsing a given string using {@link Properties} with masking. @param prefix The...
java
public ArgumentListBuilder addKeyValuePairsFromPropertyString(String prefix, String properties, VariableResolver<String> vr, Set<String> propsToMask) throws IOException { if(properties==null) return this; properties = Util.replaceMacro(properties, propertiesGeneratingResolver(vr)); for (Ent...
[ "public", "ArgumentListBuilder", "addKeyValuePairsFromPropertyString", "(", "String", "prefix", ",", "String", "properties", ",", "VariableResolver", "<", "String", ">", "vr", ",", "Set", "<", "String", ">", "propsToMask", ")", "throws", "IOException", "{", "if", ...
Adds key value pairs as "-Dkey=value -Dkey=value ..." by parsing a given string using {@link Properties} with masking. @param prefix The '-D' portion of the example. Defaults to -D if null. @param properties The persisted form of {@link Properties}. For example, "abc=def\nghi=jkl". Can be null, in which case this meth...
[ "Adds", "key", "value", "pairs", "as", "-", "Dkey", "=", "value", "-", "Dkey", "=", "value", "...", "by", "parsing", "a", "given", "string", "using", "{", "@link", "Properties", "}", "with", "masking", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/ArgumentListBuilder.java#L227-L236
UrielCh/ovh-java-sdk
ovh-java-sdk-router/src/main/java/net/minidev/ovh/api/ApiOvhRouter.java
ApiOvhRouter.serviceName_network_POST
public OvhTask serviceName_network_POST(String serviceName, String description, String ipNet, Long vlanTag) throws IOException { """ Add a network to your router REST: POST /router/{serviceName}/network @param ipNet [required] Gateway IP / CIDR Netmask, (e.g. 192.168.1.254/24) @param description [required] @...
java
public OvhTask serviceName_network_POST(String serviceName, String description, String ipNet, Long vlanTag) throws IOException { String qPath = "/router/{serviceName}/network"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "description", descri...
[ "public", "OvhTask", "serviceName_network_POST", "(", "String", "serviceName", ",", "String", "description", ",", "String", "ipNet", ",", "Long", "vlanTag", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/router/{serviceName}/network\"", ";", "StringBui...
Add a network to your router REST: POST /router/{serviceName}/network @param ipNet [required] Gateway IP / CIDR Netmask, (e.g. 192.168.1.254/24) @param description [required] @param vlanTag [required] Vlan tag from range 1 to 4094 or NULL for untagged traffic @param serviceName [required] The internal name of your Rou...
[ "Add", "a", "network", "to", "your", "router" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-router/src/main/java/net/minidev/ovh/api/ApiOvhRouter.java#L256-L265
jparsec/jparsec
jparsec/src/main/java/org/jparsec/Parser.java
Parser.ifelse
public final <R> Parser<R> ifelse(Parser<? extends R> consequence, Parser<? extends R> alternative) { """ A {@link Parser} that runs {@code consequence} if {@code this} succeeds, or {@code alternative} otherwise. """ return ifelse(__ -> consequence, alternative); }
java
public final <R> Parser<R> ifelse(Parser<? extends R> consequence, Parser<? extends R> alternative) { return ifelse(__ -> consequence, alternative); }
[ "public", "final", "<", "R", ">", "Parser", "<", "R", ">", "ifelse", "(", "Parser", "<", "?", "extends", "R", ">", "consequence", ",", "Parser", "<", "?", "extends", "R", ">", "alternative", ")", "{", "return", "ifelse", "(", "__", "->", "consequence...
A {@link Parser} that runs {@code consequence} if {@code this} succeeds, or {@code alternative} otherwise.
[ "A", "{" ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/Parser.java#L447-L449
EdwardRaff/JSAT
JSAT/src/jsat/linear/EigenValueDecomposition.java
EigenValueDecomposition.columnOpTransform
private static void columnOpTransform(Matrix M, int low, int high, int n, double q, double p, int shift) { """ Updates the columns of the matrix M such that <br><br> <code><br> for (int i = low; i <= high; i++)<br> {<br> &nbsp;&nbsp; z = M[i][n+shift];<br> &nbsp;&nbsp; M[i][n+shift] = q * z + p * M[i][n];<br>...
java
private static void columnOpTransform(Matrix M, int low, int high, int n, double q, double p, int shift) { double z; for (int i = low; i <= high; i++) { z = M.get(i, n+shift); M.set(i, n+shift, q * z + p * M.get(i, n)); M.set(i, n, q * M.get(i, n) ...
[ "private", "static", "void", "columnOpTransform", "(", "Matrix", "M", ",", "int", "low", ",", "int", "high", ",", "int", "n", ",", "double", "q", ",", "double", "p", ",", "int", "shift", ")", "{", "double", "z", ";", "for", "(", "int", "i", "=", ...
Updates the columns of the matrix M such that <br><br> <code><br> for (int i = low; i <= high; i++)<br> {<br> &nbsp;&nbsp; z = M[i][n+shift];<br> &nbsp;&nbsp; M[i][n+shift] = q * z + p * M[i][n];<br> &nbsp;&nbsp; M[i][n] = q * M[i][n] - p * z;<br> }<br> </code> @param M the matrix to alter @param low the starting colu...
[ "Updates", "the", "columns", "of", "the", "matrix", "M", "such", "that", "<br", ">", "<br", ">", "<code", ">", "<br", ">", "for", "(", "int", "i", "=", "low", ";", "i", "<", "=", "high", ";", "i", "++", ")", "<br", ">", "{", "<br", ">", "&nbs...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/linear/EigenValueDecomposition.java#L780-L789
aws/aws-sdk-java
aws-java-sdk-backup/src/main/java/com/amazonaws/services/backup/model/CreateBackupPlanRequest.java
CreateBackupPlanRequest.withBackupPlanTags
public CreateBackupPlanRequest withBackupPlanTags(java.util.Map<String, String> backupPlanTags) { """ <p> To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair. The specified tags are assigned to all backups created with this plan. </p> ...
java
public CreateBackupPlanRequest withBackupPlanTags(java.util.Map<String, String> backupPlanTags) { setBackupPlanTags(backupPlanTags); return this; }
[ "public", "CreateBackupPlanRequest", "withBackupPlanTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "backupPlanTags", ")", "{", "setBackupPlanTags", "(", "backupPlanTags", ")", ";", "return", "this", ";", "}" ]
<p> To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair. The specified tags are assigned to all backups created with this plan. </p> @param backupPlanTags To help organize your resources, you can assign your own metadata to the resources that...
[ "<p", ">", "To", "help", "organize", "your", "resources", "you", "can", "assign", "your", "own", "metadata", "to", "the", "resources", "that", "you", "create", ".", "Each", "tag", "is", "a", "key", "-", "value", "pair", ".", "The", "specified", "tags", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-backup/src/main/java/com/amazonaws/services/backup/model/CreateBackupPlanRequest.java#L138-L141
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringsInner.java
VirtualNetworkPeeringsInner.createOrUpdateAsync
public Observable<VirtualNetworkPeeringInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { """ Creates or updates a peering in the specified virtual network. @param resourceGroupName The n...
java
public Observable<VirtualNetworkPeeringInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetwo...
[ "public", "Observable", "<", "VirtualNetworkPeeringInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkName", ",", "String", "virtualNetworkPeeringName", ",", "VirtualNetworkPeeringInner", "virtualNetworkPeeringParameters", ")", ...
Creates or updates a peering in the specified virtual network. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @param virtualNetworkPeeringName The name of the peering. @param virtualNetworkPeeringParameters Parameters supplied to the create or update...
[ "Creates", "or", "updates", "a", "peering", "in", "the", "specified", "virtual", "network", "." ]
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/VirtualNetworkPeeringsInner.java#L391-L398
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/StorageUtil.java
StorageUtil.toBoolean
public boolean toBoolean(Element el, String attributeName) { """ reads a XML Element Attribute ans cast it to a boolean value @param el XML Element to read Attribute from it @param attributeName Name of the Attribute to read @return Attribute Value """ return Caster.toBooleanValue(el.getAttribute(attribu...
java
public boolean toBoolean(Element el, String attributeName) { return Caster.toBooleanValue(el.getAttribute(attributeName), false); }
[ "public", "boolean", "toBoolean", "(", "Element", "el", ",", "String", "attributeName", ")", "{", "return", "Caster", ".", "toBooleanValue", "(", "el", ".", "getAttribute", "(", "attributeName", ")", ",", "false", ")", ";", "}" ]
reads a XML Element Attribute ans cast it to a boolean value @param el XML Element to read Attribute from it @param attributeName Name of the Attribute to read @return Attribute Value
[ "reads", "a", "XML", "Element", "Attribute", "ans", "cast", "it", "to", "a", "boolean", "value" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L186-L188
michel-kraemer/bson4jackson
src/main/java/de/undercouch/bson4jackson/BsonFactory.java
BsonFactory.configure
public final BsonFactory configure(BsonGenerator.Feature f, boolean state) { """ Method for enabling/disabling specified generator features (check {@link BsonGenerator.Feature} for list of features) @param f the feature to enable or disable @param state true if the feature should be enabled, false otherwise @r...
java
public final BsonFactory configure(BsonGenerator.Feature f, boolean state) { if (state) { return enable(f); } return disable(f); }
[ "public", "final", "BsonFactory", "configure", "(", "BsonGenerator", ".", "Feature", "f", ",", "boolean", "state", ")", "{", "if", "(", "state", ")", "{", "return", "enable", "(", "f", ")", ";", "}", "return", "disable", "(", "f", ")", ";", "}" ]
Method for enabling/disabling specified generator features (check {@link BsonGenerator.Feature} for list of features) @param f the feature to enable or disable @param state true if the feature should be enabled, false otherwise @return this BsonFactory
[ "Method", "for", "enabling", "/", "disabling", "specified", "generator", "features", "(", "check", "{" ]
train
https://github.com/michel-kraemer/bson4jackson/blob/32d2ab3c516b3c07490fdfcf0c5e4ed0a2ee3979/src/main/java/de/undercouch/bson4jackson/BsonFactory.java#L116-L121
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java
CodeBuilderUtil.initialVersion
public static void initialVersion(CodeBuilder b, TypeDesc type, int value) throws SupportException { """ Generates code to push an initial version property value on the stack. @throws SupportException if version type is not supported """ adjustVersion(b, type, value, false); }
java
public static void initialVersion(CodeBuilder b, TypeDesc type, int value) throws SupportException { adjustVersion(b, type, value, false); }
[ "public", "static", "void", "initialVersion", "(", "CodeBuilder", "b", ",", "TypeDesc", "type", ",", "int", "value", ")", "throws", "SupportException", "{", "adjustVersion", "(", "b", ",", "type", ",", "value", ",", "false", ")", ";", "}" ]
Generates code to push an initial version property value on the stack. @throws SupportException if version type is not supported
[ "Generates", "code", "to", "push", "an", "initial", "version", "property", "value", "on", "the", "stack", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/gen/CodeBuilderUtil.java#L685-L689
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/gauges/SparkLine.java
SparkLine.create_START_STOP_INDICATOR_Image
private BufferedImage create_START_STOP_INDICATOR_Image(final int WIDTH) { """ Returns a buffered image that contains the start/stop indicator @param WIDTH @return a buffered image that contains the start/stop indicator """ if (WIDTH <= 0) { return null; } // Define the s...
java
private BufferedImage create_START_STOP_INDICATOR_Image(final int WIDTH) { if (WIDTH <= 0) { return null; } // Define the size of the indicator int indicatorSize = (int) (0.015 * WIDTH); if (indicatorSize < 4) { indicatorSize = 4; } if (in...
[ "private", "BufferedImage", "create_START_STOP_INDICATOR_Image", "(", "final", "int", "WIDTH", ")", "{", "if", "(", "WIDTH", "<=", "0", ")", "{", "return", "null", ";", "}", "// Define the size of the indicator", "int", "indicatorSize", "=", "(", "int", ")", "("...
Returns a buffered image that contains the start/stop indicator @param WIDTH @return a buffered image that contains the start/stop indicator
[ "Returns", "a", "buffered", "image", "that", "contains", "the", "start", "/", "stop", "indicator" ]
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/gauges/SparkLine.java#L1577-L1625
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java
XsdAsmInterfaces.generateSequenceMethod
private void generateSequenceMethod(ClassWriter classWriter, String className, String javaType, String addingChildName, String typeName, String nextTypeName, String apiName) { """ <xs:element name="personInfo"> <xs:complexType> <xs:sequence> <xs:element name="firstName" type="xs:string"/> (...) Generates the ...
java
private void generateSequenceMethod(ClassWriter classWriter, String className, String javaType, String addingChildName, String typeName, String nextTypeName, String apiName) { String type = getFullClassTypeName(typeName, apiName); String nextType = getFullClassTypeName(nextTypeName, apiName); St...
[ "private", "void", "generateSequenceMethod", "(", "ClassWriter", "classWriter", ",", "String", "className", ",", "String", "javaType", ",", "String", "addingChildName", ",", "String", "typeName", ",", "String", "nextTypeName", ",", "String", "apiName", ")", "{", "...
<xs:element name="personInfo"> <xs:complexType> <xs:sequence> <xs:element name="firstName" type="xs:string"/> (...) Generates the method present in the sequence interface for a sequence element. Example: PersonInfoFirstName firstName(String firstName); @param classWriter The {@link ClassWriter} of the sequence interfac...
[ "<xs", ":", "element", "name", "=", "personInfo", ">", "<xs", ":", "complexType", ">", "<xs", ":", "sequence", ">", "<xs", ":", "element", "name", "=", "firstName", "type", "=", "xs", ":", "string", "/", ">", "(", "...", ")", "Generates", "the", "met...
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java#L526-L566
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/NodeReportsInner.java
NodeReportsInner.listByNodeAsync
public Observable<Page<DscNodeReportInner>> listByNodeAsync(final String resourceGroupName, final String automationAccountName, final String nodeId) { """ Retrieve the Dsc node report list by node id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automat...
java
public Observable<Page<DscNodeReportInner>> listByNodeAsync(final String resourceGroupName, final String automationAccountName, final String nodeId) { return listByNodeWithServiceResponseAsync(resourceGroupName, automationAccountName, nodeId) .map(new Func1<ServiceResponse<Page<DscNodeReportInner>>,...
[ "public", "Observable", "<", "Page", "<", "DscNodeReportInner", ">", ">", "listByNodeAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "automationAccountName", ",", "final", "String", "nodeId", ")", "{", "return", "listByNodeWithServiceRespo...
Retrieve the Dsc node report list by node id. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param nodeId The parameters supplied to the list operation. @throws IllegalArgumentException thrown if parameters fail the validation @return the obs...
[ "Retrieve", "the", "Dsc", "node", "report", "list", "by", "node", "id", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/NodeReportsInner.java#L130-L138
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DisasterRecoveryConfigurationsInner.java
DisasterRecoveryConfigurationsInner.beginFailoverAllowDataLoss
public void beginFailoverAllowDataLoss(String resourceGroupName, String serverName, String disasterRecoveryConfigurationName) { """ Fails over from the current primary server to this server. This operation might result in data loss. @param resourceGroupName The name of the resource group that contains the resou...
java
public void beginFailoverAllowDataLoss(String resourceGroupName, String serverName, String disasterRecoveryConfigurationName) { beginFailoverAllowDataLossWithServiceResponseAsync(resourceGroupName, serverName, disasterRecoveryConfigurationName).toBlocking().single().body(); }
[ "public", "void", "beginFailoverAllowDataLoss", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "disasterRecoveryConfigurationName", ")", "{", "beginFailoverAllowDataLossWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",",...
Fails over from the current primary server to this server. This operation might result in data loss. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param disaster...
[ "Fails", "over", "from", "the", "current", "primary", "server", "to", "this", "server", ".", "This", "operation", "might", "result", "in", "data", "loss", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DisasterRecoveryConfigurationsInner.java#L877-L879
patka/cassandra-migration
cassandra-migration/src/main/java/org/cognitor/cassandra/migration/Database.java
Database.logMigration
private void logMigration(DbMigration migration, boolean wasSuccessful) { """ Inserts the result of the migration into the migration table @param migration the migration that was executed @param wasSuccessful indicates if the migration was successful or not """ BoundStatement boundStatement = l...
java
private void logMigration(DbMigration migration, boolean wasSuccessful) { BoundStatement boundStatement = logMigrationStatement.bind(wasSuccessful, migration.getVersion(), migration.getScriptName(), migration.getMigrationScript(), new Date()); session.execute(boundStatement); }
[ "private", "void", "logMigration", "(", "DbMigration", "migration", ",", "boolean", "wasSuccessful", ")", "{", "BoundStatement", "boundStatement", "=", "logMigrationStatement", ".", "bind", "(", "wasSuccessful", ",", "migration", ".", "getVersion", "(", ")", ",", ...
Inserts the result of the migration into the migration table @param migration the migration that was executed @param wasSuccessful indicates if the migration was successful or not
[ "Inserts", "the", "result", "of", "the", "migration", "into", "the", "migration", "table" ]
train
https://github.com/patka/cassandra-migration/blob/c61840c23b17a18df704d136909c26ff46bd5c77/cassandra-migration/src/main/java/org/cognitor/cassandra/migration/Database.java#L219-L223
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/RoaringBitmap.java
RoaringBitmap.andNot
@Deprecated public static RoaringBitmap andNot(final RoaringBitmap x1, final RoaringBitmap x2, final int rangeStart, final int rangeEnd) { """ Bitwise ANDNOT (difference) operation for the given range, rangeStart (inclusive) and rangeEnd (exclusive). The provided bitmaps are *not* modified. This opera...
java
@Deprecated public static RoaringBitmap andNot(final RoaringBitmap x1, final RoaringBitmap x2, final int rangeStart, final int rangeEnd) { return andNot(x1, x2, (long) rangeStart, (long) rangeEnd); }
[ "@", "Deprecated", "public", "static", "RoaringBitmap", "andNot", "(", "final", "RoaringBitmap", "x1", ",", "final", "RoaringBitmap", "x2", ",", "final", "int", "rangeStart", ",", "final", "int", "rangeEnd", ")", "{", "return", "andNot", "(", "x1", ",", "x2"...
Bitwise ANDNOT (difference) operation for the given range, rangeStart (inclusive) and rangeEnd (exclusive). The provided bitmaps are *not* modified. This operation is thread-safe as long as the provided bitmaps remain unchanged. @param x1 first bitmap @param x2 other bitmap @param rangeStart starting point of the rang...
[ "Bitwise", "ANDNOT", "(", "difference", ")", "operation", "for", "the", "given", "range", "rangeStart", "(", "inclusive", ")", "and", "rangeEnd", "(", "exclusive", ")", ".", "The", "provided", "bitmaps", "are", "*", "not", "*", "modified", ".", "This", "op...
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/RoaringBitmap.java#L1294-L1298
grails/grails-core
grails-spring/src/main/groovy/grails/spring/BeanBuilder.java
BeanBuilder.xmlns
public void xmlns(Map<String, String> definition) { """ Defines a Spring namespace definition to use. @param definition The definition """ Assert.notNull(namespaceHandlerResolver, "You cannot define a Spring namespace without a [namespaceHandlerResolver] set"); if (definition.isEmpty()) { ...
java
public void xmlns(Map<String, String> definition) { Assert.notNull(namespaceHandlerResolver, "You cannot define a Spring namespace without a [namespaceHandlerResolver] set"); if (definition.isEmpty()) { return; } for (Map.Entry<String, String> entry : definition.entrySet()) ...
[ "public", "void", "xmlns", "(", "Map", "<", "String", ",", "String", ">", "definition", ")", "{", "Assert", ".", "notNull", "(", "namespaceHandlerResolver", ",", "\"You cannot define a Spring namespace without a [namespaceHandlerResolver] set\"", ")", ";", "if", "(", ...
Defines a Spring namespace definition to use. @param definition The definition
[ "Defines", "a", "Spring", "namespace", "definition", "to", "use", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-spring/src/main/groovy/grails/spring/BeanBuilder.java#L220-L241
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/cluster/RedisClusterClient.java
RedisClusterClient.forEachCloseable
@SuppressWarnings("unchecked") protected <T extends Closeable> void forEachCloseable(Predicate<? super Closeable> selector, Consumer<T> function) { """ Apply a {@link Consumer} of {@link Closeable} to all active connections. @param <T> @param function the {@link Consumer}. """ for (Closeable c ...
java
@SuppressWarnings("unchecked") protected <T extends Closeable> void forEachCloseable(Predicate<? super Closeable> selector, Consumer<T> function) { for (Closeable c : closeableResources) { if (selector.test(c)) { function.accept((T) c); } } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "<", "T", "extends", "Closeable", ">", "void", "forEachCloseable", "(", "Predicate", "<", "?", "super", "Closeable", ">", "selector", ",", "Consumer", "<", "T", ">", "function", ")", "{", "for"...
Apply a {@link Consumer} of {@link Closeable} to all active connections. @param <T> @param function the {@link Consumer}.
[ "Apply", "a", "{", "@link", "Consumer", "}", "of", "{", "@link", "Closeable", "}", "to", "all", "active", "connections", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/cluster/RedisClusterClient.java#L1061-L1068
nostra13/Android-Universal-Image-Loader
library/src/main/java/com/nostra13/universalimageloader/core/ImageLoader.java
ImageLoader.loadImageSync
public Bitmap loadImageSync(String uri, ImageSize targetImageSize, DisplayImageOptions options) { """ Loads and decodes image synchronously.<br /> <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call @param uri Image URI (i.e. "http://site.com/image.png...
java
public Bitmap loadImageSync(String uri, ImageSize targetImageSize, DisplayImageOptions options) { if (options == null) { options = configuration.defaultDisplayImageOptions; } options = new DisplayImageOptions.Builder().cloneFrom(options).syncLoading(true).build(); SyncImageLoadingListener listener = new Syn...
[ "public", "Bitmap", "loadImageSync", "(", "String", "uri", ",", "ImageSize", "targetImageSize", ",", "DisplayImageOptions", "options", ")", "{", "if", "(", "options", "==", "null", ")", "{", "options", "=", "configuration", ".", "defaultDisplayImageOptions", ";", ...
Loads and decodes image synchronously.<br /> <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before this method call @param uri Image URI (i.e. "http://site.com/image.png", "file:///mnt/sdcard/image.png") @param targetImageSize Minimal size for {@link Bitmap} which will be return...
[ "Loads", "and", "decodes", "image", "synchronously", ".", "<br", "/", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "{", "@link", "#init", "(", "ImageLoaderConfiguration", ")", "}", "method", "must", "be", "called", "before", "this", "method", "call" ...
train
https://github.com/nostra13/Android-Universal-Image-Loader/blob/fc3c5f6779bb4f702e233653b61bd9d559e345cc/library/src/main/java/com/nostra13/universalimageloader/core/ImageLoader.java#L595-L604
xerial/snappy-java
src/main/java/org/xerial/snappy/Snappy.java
Snappy.uncompressedLength
public static int uncompressedLength(byte[] input, int offset, int length) throws IOException { """ Get the uncompressed byte size of the given compressed input. This operation takes O(1) time. @param input @param offset @param length @return uncompressed byte size of the the given input data @...
java
public static int uncompressedLength(byte[] input, int offset, int length) throws IOException { if (input == null) { throw new NullPointerException("input is null"); } return impl.uncompressedLength(input, offset, length); }
[ "public", "static", "int", "uncompressedLength", "(", "byte", "[", "]", "input", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "if", "(", "input", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"inpu...
Get the uncompressed byte size of the given compressed input. This operation takes O(1) time. @param input @param offset @param length @return uncompressed byte size of the the given input data @throws IOException when failed to uncompress the given input. The error code is {@link SnappyErrorCode#PARSING_ERROR}
[ "Get", "the", "uncompressed", "byte", "size", "of", "the", "given", "compressed", "input", ".", "This", "operation", "takes", "O", "(", "1", ")", "time", "." ]
train
https://github.com/xerial/snappy-java/blob/9df6ed7bbce88186c82f2e7cdcb7b974421b3340/src/main/java/org/xerial/snappy/Snappy.java#L627-L635
pmlopes/yoke
framework/src/main/java/com/jetdrone/vertx/yoke/middleware/BasicAuth.java
BasicAuth.handle401
private void handle401(final YokeRequest request, final Handler<Object> next) { """ Handle all forbidden errors, in this case we need to add a special header to the response @param request yoke request @param next middleware to be called next """ YokeResponse response = request.response(); ...
java
private void handle401(final YokeRequest request, final Handler<Object> next) { YokeResponse response = request.response(); response.putHeader("WWW-Authenticate", "Basic realm=\"" + getRealm(request) + "\""); response.setStatusCode(401); next.handle("No authorization token"); }
[ "private", "void", "handle401", "(", "final", "YokeRequest", "request", ",", "final", "Handler", "<", "Object", ">", "next", ")", "{", "YokeResponse", "response", "=", "request", ".", "response", "(", ")", ";", "response", ".", "putHeader", "(", "\"WWW-Authe...
Handle all forbidden errors, in this case we need to add a special header to the response @param request yoke request @param next middleware to be called next
[ "Handle", "all", "forbidden", "errors", "in", "this", "case", "we", "need", "to", "add", "a", "special", "header", "to", "the", "response" ]
train
https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/BasicAuth.java#L128-L133
joelittlejohn/jsonschema2pojo
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/TypeRule.java
TypeRule.getIntegerType
private JType getIntegerType(JCodeModel owner, JsonNode node, GenerationConfig config) { """ Returns the JType for an integer field. Handles type lookup and unboxing. """ if (config.isUseBigIntegers()) { return unboxIfNecessary(owner.ref(BigInteger.class), config); } else if (config.isUseLongInt...
java
private JType getIntegerType(JCodeModel owner, JsonNode node, GenerationConfig config) { if (config.isUseBigIntegers()) { return unboxIfNecessary(owner.ref(BigInteger.class), config); } else if (config.isUseLongIntegers() || node.has("minimum") && node.get("minimum").isLong() || node.has("maximum") && no...
[ "private", "JType", "getIntegerType", "(", "JCodeModel", "owner", ",", "JsonNode", "node", ",", "GenerationConfig", "config", ")", "{", "if", "(", "config", ".", "isUseBigIntegers", "(", ")", ")", "{", "return", "unboxIfNecessary", "(", "owner", ".", "ref", ...
Returns the JType for an integer field. Handles type lookup and unboxing.
[ "Returns", "the", "JType", "for", "an", "integer", "field", ".", "Handles", "type", "lookup", "and", "unboxing", "." ]
train
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/TypeRule.java#L146-L157
landawn/AbacusUtil
src/com/landawn/abacus/util/Matth.java
Matth.subtractExact
public static long subtractExact(long a, long b) { """ Returns the difference of {@code a} and {@code b}, provided it does not overflow. @throws ArithmeticException if {@code a - b} overflows in signed {@code long} arithmetic """ long result = a - b; checkNoOverflow((a ^ b) >= 0 | (a ^ res...
java
public static long subtractExact(long a, long b) { long result = a - b; checkNoOverflow((a ^ b) >= 0 | (a ^ result) >= 0); return result; }
[ "public", "static", "long", "subtractExact", "(", "long", "a", ",", "long", "b", ")", "{", "long", "result", "=", "a", "-", "b", ";", "checkNoOverflow", "(", "(", "a", "^", "b", ")", ">=", "0", "|", "(", "a", "^", "result", ")", ">=", "0", ")",...
Returns the difference of {@code a} and {@code b}, provided it does not overflow. @throws ArithmeticException if {@code a - b} overflows in signed {@code long} arithmetic
[ "Returns", "the", "difference", "of", "{", "@code", "a", "}", "and", "{", "@code", "b", "}", "provided", "it", "does", "not", "overflow", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Matth.java#L1404-L1408
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/util/POIUtils.java
POIUtils.buildNameArea
public static AreaReference buildNameArea(final String sheetName, final Point startPosition, final Point endPosition, SpreadsheetVersion sheetVersion) { """ 名前の範囲の形式を組み立てる。 <code>シート名!$A$1:$A:$5</code> @param sheetName シート名 @param startPosition 設定するセルの開始位置 @param endPosition 設定するセルの終了位置 @param sh...
java
public static AreaReference buildNameArea(final String sheetName, final Point startPosition, final Point endPosition, SpreadsheetVersion sheetVersion) { ArgUtils.notEmpty(sheetName, "sheetName"); ArgUtils.notNull(startPosition, "startPosition"); ArgUtils.notNull(endPosition, "e...
[ "public", "static", "AreaReference", "buildNameArea", "(", "final", "String", "sheetName", ",", "final", "Point", "startPosition", ",", "final", "Point", "endPosition", ",", "SpreadsheetVersion", "sheetVersion", ")", "{", "ArgUtils", ".", "notEmpty", "(", "sheetName...
名前の範囲の形式を組み立てる。 <code>シート名!$A$1:$A:$5</code> @param sheetName シート名 @param startPosition 設定するセルの開始位置 @param endPosition 設定するセルの終了位置 @param sheetVersion シートの形式 @return
[ "名前の範囲の形式を組み立てる。", "<code", ">", "シート名!$A$1", ":", "$A", ":", "$5<", "/", "code", ">" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/util/POIUtils.java#L847-L858
stagemonitor/stagemonitor
stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/prometheus/StagemonitorPrometheusCollector.java
StagemonitorPrometheusCollector.fromTimer
private MetricFamilySamples fromTimer(List<Map.Entry<MetricName, Timer>> histogramsWithSameName) { """ Export dropwizard Timer as a histogram. Use TIME_UNIT as time unit. """ final SummaryMetricFamily summaryMetricFamily = getSummaryMetricFamily(histogramsWithSameName, "_seconds"); for (Map.Entry<MetricNam...
java
private MetricFamilySamples fromTimer(List<Map.Entry<MetricName, Timer>> histogramsWithSameName) { final SummaryMetricFamily summaryMetricFamily = getSummaryMetricFamily(histogramsWithSameName, "_seconds"); for (Map.Entry<MetricName, Timer> entry : histogramsWithSameName) { addSummaryMetric(summaryMetricFamily, ...
[ "private", "MetricFamilySamples", "fromTimer", "(", "List", "<", "Map", ".", "Entry", "<", "MetricName", ",", "Timer", ">", ">", "histogramsWithSameName", ")", "{", "final", "SummaryMetricFamily", "summaryMetricFamily", "=", "getSummaryMetricFamily", "(", "histogramsW...
Export dropwizard Timer as a histogram. Use TIME_UNIT as time unit.
[ "Export", "dropwizard", "Timer", "as", "a", "histogram", ".", "Use", "TIME_UNIT", "as", "time", "unit", "." ]
train
https://github.com/stagemonitor/stagemonitor/blob/7a1bf6848906f816aa465983f602ea1f1e8f2b7b/stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/prometheus/StagemonitorPrometheusCollector.java#L127-L133
eurekaclinical/aiw-i2b2-etl
src/main/java/edu/emory/cci/aiw/i2b2etl/dest/I2b2QueryResultsHandler.java
I2b2QueryResultsHandler.start
@Override public void start(PropositionDefinitionCache propDefs) throws QueryResultsHandlerProcessingException { """ Builds most of the concept tree, truncates the data tables, opens a connection to the i2b2 project database, and does some other prep. This method is called before the first call to {@link #h...
java
@Override public void start(PropositionDefinitionCache propDefs) throws QueryResultsHandlerProcessingException { Logger logger = I2b2ETLUtil.logger(); try { this.conceptDimensionHandler = new ConceptDimensionHandler(dataConnectionSpec); this.modifierDimensionHandler = new Mod...
[ "@", "Override", "public", "void", "start", "(", "PropositionDefinitionCache", "propDefs", ")", "throws", "QueryResultsHandlerProcessingException", "{", "Logger", "logger", "=", "I2b2ETLUtil", ".", "logger", "(", ")", ";", "try", "{", "this", ".", "conceptDimensionH...
Builds most of the concept tree, truncates the data tables, opens a connection to the i2b2 project database, and does some other prep. This method is called before the first call to {@link #handleQueryResult(String, java.util.List, java.util.Map, java.util.Map, java.util.Map)}. @throws QueryResultsHandlerProcessingExc...
[ "Builds", "most", "of", "the", "concept", "tree", "truncates", "the", "data", "tables", "opens", "a", "connection", "to", "the", "i2b2", "project", "database", "and", "does", "some", "other", "prep", ".", "This", "method", "is", "called", "before", "the", ...
train
https://github.com/eurekaclinical/aiw-i2b2-etl/blob/3eed6bda7755919cb9466d2930723a0f4748341a/src/main/java/edu/emory/cci/aiw/i2b2etl/dest/I2b2QueryResultsHandler.java#L314-L354
facebook/fresco
drawee/src/main/java/com/facebook/drawee/drawable/RoundedDrawable.java
RoundedDrawable.setBorder
@Override public void setBorder(int color, float width) { """ Sets the border @param color of the border @param width of the border """ if (mBorderColor != color || mBorderWidth != width) { mBorderColor = color; mBorderWidth = width; mIsPathDirty = true; invalidateSelf(); } ...
java
@Override public void setBorder(int color, float width) { if (mBorderColor != color || mBorderWidth != width) { mBorderColor = color; mBorderWidth = width; mIsPathDirty = true; invalidateSelf(); } }
[ "@", "Override", "public", "void", "setBorder", "(", "int", "color", ",", "float", "width", ")", "{", "if", "(", "mBorderColor", "!=", "color", "||", "mBorderWidth", "!=", "width", ")", "{", "mBorderColor", "=", "color", ";", "mBorderWidth", "=", "width", ...
Sets the border @param color of the border @param width of the border
[ "Sets", "the", "border" ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/drawee/src/main/java/com/facebook/drawee/drawable/RoundedDrawable.java#L144-L152
legsem/legstar.avro
legstar.avro.cob2avro/src/main/java/com/legstar/avro/cob2avro/io/ZosVarRdwDatumReader.java
ZosVarRdwDatumReader.getRecordLen
private static int getRecordLen(byte[] hostData, int start, int length) { """ RDW is a 4 bytes numeric stored in Big Endian as a binary 2's complement. @param hostData the mainframe data @param start where the RDW starts @param length the total size of the mainframe data @return the size of the record (actua...
java
private static int getRecordLen(byte[] hostData, int start, int length) { int len = getRawRdw(hostData, start, length); if (len < RDW_LEN || len > hostData.length) { throw new IllegalArgumentException( "Record does not start with a Record Descriptor Word"); } ...
[ "private", "static", "int", "getRecordLen", "(", "byte", "[", "]", "hostData", ",", "int", "start", ",", "int", "length", ")", "{", "int", "len", "=", "getRawRdw", "(", "hostData", ",", "start", ",", "length", ")", ";", "if", "(", "len", "<", "RDW_LE...
RDW is a 4 bytes numeric stored in Big Endian as a binary 2's complement. @param hostData the mainframe data @param start where the RDW starts @param length the total size of the mainframe data @return the size of the record (actual data without the rdw itself)
[ "RDW", "is", "a", "4", "bytes", "numeric", "stored", "in", "Big", "Endian", "as", "a", "binary", "2", "s", "complement", "." ]
train
https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro/src/main/java/com/legstar/avro/cob2avro/io/ZosVarRdwDatumReader.java#L96-L105
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java
LambdaToMethod.makeNewClass
JCNewClass makeNewClass(Type ctype, List<JCExpression> args, Symbol cons) { """ Make an attributed class instance creation expression. @param ctype The class type. @param args The constructor arguments. @param cons The constructor symbol """ JCNewClass tree = make.NewClass(null, ...
java
JCNewClass makeNewClass(Type ctype, List<JCExpression> args, Symbol cons) { JCNewClass tree = make.NewClass(null, null, make.QualIdent(ctype.tsym), args, null); tree.constructor = cons; tree.type = ctype; return tree; }
[ "JCNewClass", "makeNewClass", "(", "Type", "ctype", ",", "List", "<", "JCExpression", ">", "args", ",", "Symbol", "cons", ")", "{", "JCNewClass", "tree", "=", "make", ".", "NewClass", "(", "null", ",", "null", ",", "make", ".", "QualIdent", "(", "ctype",...
Make an attributed class instance creation expression. @param ctype The class type. @param args The constructor arguments. @param cons The constructor symbol
[ "Make", "an", "attributed", "class", "instance", "creation", "expression", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java#L664-L670
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterpolicy_binding.java
filterpolicy_binding.get
public static filterpolicy_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch filterpolicy_binding resource of given name . """ filterpolicy_binding obj = new filterpolicy_binding(); obj.set_name(name); filterpolicy_binding response = (filterpolicy_binding) obj.g...
java
public static filterpolicy_binding get(nitro_service service, String name) throws Exception{ filterpolicy_binding obj = new filterpolicy_binding(); obj.set_name(name); filterpolicy_binding response = (filterpolicy_binding) obj.get_resource(service); return response; }
[ "public", "static", "filterpolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "filterpolicy_binding", "obj", "=", "new", "filterpolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")"...
Use this API to fetch filterpolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "filterpolicy_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/filter/filterpolicy_binding.java#L136-L141
cqframework/clinical_quality_language
Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java
ElmBaseVisitor.visitParameterDef
public T visitParameterDef(ParameterDef elm, C context) { """ Visit a ParameterDef. This method will be called for every node in the tree that is a ParameterDef. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result """ if (elm.getParameterTypeSpe...
java
public T visitParameterDef(ParameterDef elm, C context) { if (elm.getParameterTypeSpecifier() != null) { visitElement(elm.getParameterTypeSpecifier(), context); } if (elm.getDefault() != null) { visitElement(elm.getDefault(), context); } return null; ...
[ "public", "T", "visitParameterDef", "(", "ParameterDef", "elm", ",", "C", "context", ")", "{", "if", "(", "elm", ".", "getParameterTypeSpecifier", "(", ")", "!=", "null", ")", "{", "visitElement", "(", "elm", ".", "getParameterTypeSpecifier", "(", ")", ",", ...
Visit a ParameterDef. This method will be called for every node in the tree that is a ParameterDef. @param elm the ELM tree @param context the context passed to the visitor @return the visitor result
[ "Visit", "a", "ParameterDef", ".", "This", "method", "will", "be", "called", "for", "every", "node", "in", "the", "tree", "that", "is", "a", "ParameterDef", "." ]
train
https://github.com/cqframework/clinical_quality_language/blob/67459d1ef453e49db8d7c5c86e87278377ed0a0b/Src/java/elm/src/main/java/org/cqframework/cql/elm/visiting/ElmBaseVisitor.java#L372-L382
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbEpisodes.java
TmdbEpisodes.getEpisodeInfo
public TVEpisodeInfo getEpisodeInfo(int tvID, int seasonNumber, int episodeNumber, String language, String... appendToResponse) throws MovieDbException { """ Get the primary information about a TV episode by combination of a season and episode number. @param tvID @param seasonNumber @param episodeNumber @pa...
java
public TVEpisodeInfo getEpisodeInfo(int tvID, int seasonNumber, int episodeNumber, String language, String... appendToResponse) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, tvID); parameters.add(Param.SEASON_NUMBER, seasonNumber); p...
[ "public", "TVEpisodeInfo", "getEpisodeInfo", "(", "int", "tvID", ",", "int", "seasonNumber", ",", "int", "episodeNumber", ",", "String", "language", ",", "String", "...", "appendToResponse", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "="...
Get the primary information about a TV episode by combination of a season and episode number. @param tvID @param seasonNumber @param episodeNumber @param language @param appendToResponse @return @throws MovieDbException
[ "Get", "the", "primary", "information", "about", "a", "TV", "episode", "by", "combination", "of", "a", "season", "and", "episode", "number", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbEpisodes.java#L78-L94
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.cdn_dedicated_serviceName_backend_duration_GET
public OvhOrder cdn_dedicated_serviceName_backend_duration_GET(String serviceName, String duration, Long backend) throws IOException { """ Get prices and contracts information REST: GET /order/cdn/dedicated/{serviceName}/backend/{duration} @param backend [required] Backend number that will be ordered @param s...
java
public OvhOrder cdn_dedicated_serviceName_backend_duration_GET(String serviceName, String duration, Long backend) throws IOException { String qPath = "/order/cdn/dedicated/{serviceName}/backend/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); query(sb, "backend", backend); String resp = exec(...
[ "public", "OvhOrder", "cdn_dedicated_serviceName_backend_duration_GET", "(", "String", "serviceName", ",", "String", "duration", ",", "Long", "backend", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/cdn/dedicated/{serviceName}/backend/{duration}\"", ";"...
Get prices and contracts information REST: GET /order/cdn/dedicated/{serviceName}/backend/{duration} @param backend [required] Backend number that will be ordered @param serviceName [required] The internal name of your CDN offer @param duration [required] Duration
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5229-L5235
phoenixnap/springmvc-raml-plugin
src/main/java/com/phoenixnap/oss/ramlplugin/raml2code/helpers/SchemaHelper.java
SchemaHelper.extractTopItem
private static String extractTopItem(String searchString, String schema, int startIdx) { """ Extracts the value of a specified parameter in a schema @param searchString element to search for @param schema Schema as a string @return the value or null if not found """ String extracted = null; int prop...
java
private static String extractTopItem(String searchString, String schema, int startIdx) { String extracted = null; int propIdx = schema.indexOf("\"properties\"", startIdx); if (propIdx == -1) { propIdx = Integer.MAX_VALUE; } // check for second int idIdx = schema.indexOf("\"" + searchString + "\"", startI...
[ "private", "static", "String", "extractTopItem", "(", "String", "searchString", ",", "String", "schema", ",", "int", "startIdx", ")", "{", "String", "extracted", "=", "null", ";", "int", "propIdx", "=", "schema", ".", "indexOf", "(", "\"\\\"properties\\\"\"", ...
Extracts the value of a specified parameter in a schema @param searchString element to search for @param schema Schema as a string @return the value or null if not found
[ "Extracts", "the", "value", "of", "a", "specified", "parameter", "in", "a", "schema" ]
train
https://github.com/phoenixnap/springmvc-raml-plugin/blob/6387072317cd771eb7d6f30943f556ac20dd3c84/src/main/java/com/phoenixnap/oss/ramlplugin/raml2code/helpers/SchemaHelper.java#L261-L281
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/print/OneSelect.java
OneSelect.addLinkFromSelectPart
public void addLinkFromSelectPart(final String _linkFrom) throws CacheReloadException { """ Add the name of the type and attribute the link comes from, evaluated from an <code>linkTo[TYPENAME#ATTRIBUTENAME]</code> part of an select statement. @param _linkFrom name of the attribute the link comes from ...
java
public void addLinkFromSelectPart(final String _linkFrom) throws CacheReloadException { this.fromSelect = new LinkFromSelect(_linkFrom, getQuery().isCacheEnabled() ? getQuery().getKey() : null); }
[ "public", "void", "addLinkFromSelectPart", "(", "final", "String", "_linkFrom", ")", "throws", "CacheReloadException", "{", "this", ".", "fromSelect", "=", "new", "LinkFromSelect", "(", "_linkFrom", ",", "getQuery", "(", ")", ".", "isCacheEnabled", "(", ")", "?"...
Add the name of the type and attribute the link comes from, evaluated from an <code>linkTo[TYPENAME#ATTRIBUTENAME]</code> part of an select statement. @param _linkFrom name of the attribute the link comes from @throws CacheReloadException on erro
[ "Add", "the", "name", "of", "the", "type", "and", "attribute", "the", "link", "comes", "from", "evaluated", "from", "an", "<code", ">", "linkTo", "[", "TYPENAME#ATTRIBUTENAME", "]", "<", "/", "code", ">", "part", "of", "an", "select", "statement", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L390-L394
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/mapred/RemoteJTProxy.java
RemoteJTProxy.initializeClientUnprotected
void initializeClientUnprotected(String host, int port, String sessionId) throws IOException { """ Create the RPC client to the remote corona job tracker. @param host The host running the remote corona job tracker. @param port The port of the remote corona job tracker. @param sessionId The session for the r...
java
void initializeClientUnprotected(String host, int port, String sessionId) throws IOException { if (client != null) { return; } LOG.info("Creating JT client to " + host + ":" + port); long connectTimeout = RemoteJTProxy.getRemotJTTimeout(conf); int rpcTimeout = RemoteJTProxy.getRemoteJTRPCT...
[ "void", "initializeClientUnprotected", "(", "String", "host", ",", "int", "port", ",", "String", "sessionId", ")", "throws", "IOException", "{", "if", "(", "client", "!=", "null", ")", "{", "return", ";", "}", "LOG", ".", "info", "(", "\"Creating JT client t...
Create the RPC client to the remote corona job tracker. @param host The host running the remote corona job tracker. @param port The port of the remote corona job tracker. @param sessionId The session for the remote corona job tracker. @throws IOException
[ "Create", "the", "RPC", "client", "to", "the", "remote", "corona", "job", "tracker", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/mapred/RemoteJTProxy.java#L297-L322
dbracewell/hermes
hermes-core/src/main/java/com/davidbracewell/hermes/extraction/AbstractExtractor.java
AbstractExtractor.toStringFunction
public T toStringFunction(@NonNull SerializableFunction<HString, String> toStringFunction) { """ To string function t. @param toStringFunction the to string function @return the t """ this.toStringFunction = toStringFunction; return Cast.as(this); }
java
public T toStringFunction(@NonNull SerializableFunction<HString, String> toStringFunction) { this.toStringFunction = toStringFunction; return Cast.as(this); }
[ "public", "T", "toStringFunction", "(", "@", "NonNull", "SerializableFunction", "<", "HString", ",", "String", ">", "toStringFunction", ")", "{", "this", ".", "toStringFunction", "=", "toStringFunction", ";", "return", "Cast", ".", "as", "(", "this", ")", ";",...
To string function t. @param toStringFunction the to string function @return the t
[ "To", "string", "function", "t", "." ]
train
https://github.com/dbracewell/hermes/blob/9ebefe7ad5dea1b731ae6931a30771eb75325ea3/hermes-core/src/main/java/com/davidbracewell/hermes/extraction/AbstractExtractor.java#L202-L205
crowmagnumb/s6-util
src/main/java/net/crowmagnumb/util/reflect/SimpleMethodInvoker.java
SimpleMethodInvoker.invokeMethod
private static Object invokeMethod( final Object obj, final String methodName, final Object[] args, final Class<?>[] parameterTypes ) throws UtilException { ...
java
private static Object invokeMethod( final Object obj, final String methodName, final Object[] args, final Class<?>[] parameterTypes ) throws UtilException ...
[ "private", "static", "Object", "invokeMethod", "(", "final", "Object", "obj", ",", "final", "String", "methodName", ",", "final", "Object", "[", "]", "args", ",", "final", "Class", "<", "?", ">", "[", "]", "parameterTypes", ")", "throws", "UtilException", ...
We have an object and a method name, but in order to invoke a method on an object, we need the object's Class (type). Given this Class we can then check that such a method exists and throw an exception if it doesn't. @param obj to invoke method on @param methodName to invoke @param args to use @param parameterTypes t...
[ "We", "have", "an", "object", "and", "a", "method", "name", "but", "in", "order", "to", "invoke", "a", "method", "on", "an", "object", "we", "need", "the", "object", "s", "Class", "(", "type", ")", "." ]
train
https://github.com/crowmagnumb/s6-util/blob/0f9969bc0809e8a617501fa57c135e9b3984fae0/src/main/java/net/crowmagnumb/util/reflect/SimpleMethodInvoker.java#L301-L309
awslabs/jsii
packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiClient.java
JsiiClient.getPropertyValue
public JsonNode getPropertyValue(final JsiiObjectRef objRef, final String property) { """ Gets a value for a property from a remote object. @param objRef The remote object reference. @param property The property name. @return The value of the property. """ ObjectNode req = makeRequest("get", objRef)...
java
public JsonNode getPropertyValue(final JsiiObjectRef objRef, final String property) { ObjectNode req = makeRequest("get", objRef); req.put("property", property); return this.runtime.requestResponse(req).get("value"); }
[ "public", "JsonNode", "getPropertyValue", "(", "final", "JsiiObjectRef", "objRef", ",", "final", "String", "property", ")", "{", "ObjectNode", "req", "=", "makeRequest", "(", "\"get\"", ",", "objRef", ")", ";", "req", ".", "put", "(", "\"property\"", ",", "p...
Gets a value for a property from a remote object. @param objRef The remote object reference. @param property The property name. @return The value of the property.
[ "Gets", "a", "value", "for", "a", "property", "from", "a", "remote", "object", "." ]
train
https://github.com/awslabs/jsii/blob/6bbf743f5f65e98e5199ad31c93961533ffc40e5/packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiClient.java#L109-L114
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/CollectionValuedMap.java
CollectionValuedMap.addAll
public void addAll(Map<K, V> m) { """ Adds all of the mappings in m to this CollectionValuedMap. If m is a CollectionValuedMap, it will behave strangely. Use the constructor instead. """ if (m instanceof CollectionValuedMap<?, ?>) { throw new UnsupportedOperationException(); } for (Map.E...
java
public void addAll(Map<K, V> m) { if (m instanceof CollectionValuedMap<?, ?>) { throw new UnsupportedOperationException(); } for (Map.Entry<K, V> e : m.entrySet()) { add(e.getKey(), e.getValue()); } }
[ "public", "void", "addAll", "(", "Map", "<", "K", ",", "V", ">", "m", ")", "{", "if", "(", "m", "instanceof", "CollectionValuedMap", "<", "?", ",", "?", ">", ")", "{", "throw", "new", "UnsupportedOperationException", "(", ")", ";", "}", "for", "(", ...
Adds all of the mappings in m to this CollectionValuedMap. If m is a CollectionValuedMap, it will behave strangely. Use the constructor instead.
[ "Adds", "all", "of", "the", "mappings", "in", "m", "to", "this", "CollectionValuedMap", ".", "If", "m", "is", "a", "CollectionValuedMap", "it", "will", "behave", "strangely", ".", "Use", "the", "constructor", "instead", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/CollectionValuedMap.java#L100-L107
VoltDB/voltdb
third_party/java/src/org/apache/jute_voltpatches/Utils.java
Utils.bufEquals
public static boolean bufEquals(byte onearray[], byte twoarray[]) { """ equals function that actually compares two buffers. @param onearray First buffer @param twoarray Second buffer @return true if one and two contain exactly the same content, else false. """ if (onearray == twoarray) ...
java
public static boolean bufEquals(byte onearray[], byte twoarray[]) { if (onearray == twoarray) return true; boolean ret = (onearray.length == twoarray.length); if (!ret) { return ret; } for (int idx = 0; idx < onearray.length; idx++) { if (onear...
[ "public", "static", "boolean", "bufEquals", "(", "byte", "onearray", "[", "]", ",", "byte", "twoarray", "[", "]", ")", "{", "if", "(", "onearray", "==", "twoarray", ")", "return", "true", ";", "boolean", "ret", "=", "(", "onearray", ".", "length", "=="...
equals function that actually compares two buffers. @param onearray First buffer @param twoarray Second buffer @return true if one and two contain exactly the same content, else false.
[ "equals", "function", "that", "actually", "compares", "two", "buffers", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/jute_voltpatches/Utils.java#L43-L56
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/TaskClient.java
TaskClient.logMessageForTask
public void logMessageForTask(String taskId, String logMessage) { """ Log execution messages for a task. @param taskId id of the task @param logMessage the message to be logged """ Preconditions.checkArgument(StringUtils.isNotBlank(taskId), "Task id cannot be blank"); postForEntityWithR...
java
public void logMessageForTask(String taskId, String logMessage) { Preconditions.checkArgument(StringUtils.isNotBlank(taskId), "Task id cannot be blank"); postForEntityWithRequestOnly("tasks/" + taskId + "/log", logMessage); }
[ "public", "void", "logMessageForTask", "(", "String", "taskId", ",", "String", "logMessage", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "taskId", ")", ",", "\"Task id cannot be blank\"", ")", ";", "postForEntityWithR...
Log execution messages for a task. @param taskId id of the task @param logMessage the message to be logged
[ "Log", "execution", "messages", "for", "a", "task", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/TaskClient.java#L288-L291
javalite/activejdbc
javalite-common/src/main/java/org/javalite/common/Convert.java
Convert.toLong
public static Long toLong(Object value) { """ Converts value to <code>Long</code> if it can. If value is a <code>Long</code>, it is returned, if it is a <code>Number</code>, it is promoted to <code>Long</code> and then returned, if it is a <code>Date</code>, returns its getTime() value, in all other cases, it con...
java
public static Long toLong(Object value) { if (value == null) { return null; } else if (value instanceof Long) { return (Long) value; } else if (value instanceof Number) { return ((Number) value).longValue(); } else if (value instanceof java.util.Date) ...
[ "public", "static", "Long", "toLong", "(", "Object", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", "null", ";", "}", "else", "if", "(", "value", "instanceof", "Long", ")", "{", "return", "(", "Long", ")", "value", ";", "}...
Converts value to <code>Long</code> if it can. If value is a <code>Long</code>, it is returned, if it is a <code>Number</code>, it is promoted to <code>Long</code> and then returned, if it is a <code>Date</code>, returns its getTime() value, in all other cases, it converts the value to String, then tries to parse Long ...
[ "Converts", "value", "to", "<code", ">", "Long<", "/", "code", ">", "if", "it", "can", ".", "If", "value", "is", "a", "<code", ">", "Long<", "/", "code", ">", "it", "is", "returned", "if", "it", "is", "a", "<code", ">", "Number<", "/", "code", ">...
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/javalite-common/src/main/java/org/javalite/common/Convert.java#L347-L363
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.getPlacedAtomsInAtomContainer
public IAtomContainer getPlacedAtomsInAtomContainer(IAtom atom, IAtomContainer ac) { """ Gets all placed neighbouring atoms of a atom. @param atom central atom (Atom) @param ac the molecule @return all connected and placed atoms to the central atom ((AtomContainer) """ List bonds = a...
java
public IAtomContainer getPlacedAtomsInAtomContainer(IAtom atom, IAtomContainer ac) { List bonds = ac.getConnectedBondsList(atom); IAtomContainer connectedAtoms = atom.getBuilder().newInstance(IAtomContainer.class); IAtom connectedAtom = null; for (int i = 0; i < bonds.size(); i++) { ...
[ "public", "IAtomContainer", "getPlacedAtomsInAtomContainer", "(", "IAtom", "atom", ",", "IAtomContainer", "ac", ")", "{", "List", "bonds", "=", "ac", ".", "getConnectedBondsList", "(", "atom", ")", ";", "IAtomContainer", "connectedAtoms", "=", "atom", ".", "getBui...
Gets all placed neighbouring atoms of a atom. @param atom central atom (Atom) @param ac the molecule @return all connected and placed atoms to the central atom ((AtomContainer)
[ "Gets", "all", "placed", "neighbouring", "atoms", "of", "a", "atom", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L816-L828
elki-project/elki
elki-core-dbids/src/main/java/de/lmu/ifi/dbs/elki/database/datastore/DataStoreUtil.java
DataStoreUtil.makeDBIDStorage
public static WritableDBIDDataStore makeDBIDStorage(DBIDs ids, int hints) { """ Make a new storage, to associate the given ids with an object of class dataclass. @param ids DBIDs to store data for @param hints Hints for the storage manager @return new data store """ return DataStoreFactory.FACTORY.ma...
java
public static WritableDBIDDataStore makeDBIDStorage(DBIDs ids, int hints) { return DataStoreFactory.FACTORY.makeDBIDStorage(ids, hints); }
[ "public", "static", "WritableDBIDDataStore", "makeDBIDStorage", "(", "DBIDs", "ids", ",", "int", "hints", ")", "{", "return", "DataStoreFactory", ".", "FACTORY", ".", "makeDBIDStorage", "(", "ids", ",", "hints", ")", ";", "}" ]
Make a new storage, to associate the given ids with an object of class dataclass. @param ids DBIDs to store data for @param hints Hints for the storage manager @return new data store
[ "Make", "a", "new", "storage", "to", "associate", "the", "given", "ids", "with", "an", "object", "of", "class", "dataclass", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids/src/main/java/de/lmu/ifi/dbs/elki/database/datastore/DataStoreUtil.java#L75-L77
fabric8io/kubernetes-client
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/Config.java
Config.autoConfigure
public static Config autoConfigure(String context) { """ Does auto detection with some opinionated defaults. @param context if null will use current-context @return Config object """ Config config = new Config(); return autoConfigure(config, context); }
java
public static Config autoConfigure(String context) { Config config = new Config(); return autoConfigure(config, context); }
[ "public", "static", "Config", "autoConfigure", "(", "String", "context", ")", "{", "Config", "config", "=", "new", "Config", "(", ")", ";", "return", "autoConfigure", "(", "config", ",", "context", ")", ";", "}" ]
Does auto detection with some opinionated defaults. @param context if null will use current-context @return Config object
[ "Does", "auto", "detection", "with", "some", "opinionated", "defaults", "." ]
train
https://github.com/fabric8io/kubernetes-client/blob/141668a882ed8e902c045a5cd0a80f14bd17d132/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/Config.java#L209-L212
republicofgavin/PauseResumeAudioRecorder
library/src/main/java/com/github/republicofgavin/pauseresumeaudiorecorder/PauseResumeAudioRecorder.java
PauseResumeAudioRecorder.setAudioFile
public void setAudioFile(final String audioFilePath) { """ Setter for the audioFile. If the file does not contain a .wav suffix, it will be added. If the file has a suffix other than .wav, it will be removed. This API puts it in the prepared state. NOTE: The .wav file does not exist until the stop recording (and ...
java
public void setAudioFile(final String audioFilePath){ if (audioFilePath==null || audioFilePath.trim().isEmpty()){ throw new IllegalArgumentException("audioFile cannot be null, empty, blank, or directory"); } else if (currentAudioState.get()!=PREPARED_STATE && currentAudioState.get()!...
[ "public", "void", "setAudioFile", "(", "final", "String", "audioFilePath", ")", "{", "if", "(", "audioFilePath", "==", "null", "||", "audioFilePath", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", ...
Setter for the audioFile. If the file does not contain a .wav suffix, it will be added. If the file has a suffix other than .wav, it will be removed. This API puts it in the prepared state. NOTE: The .wav file does not exist until the stop recording (and subsequent conversion) is completed. Where the data is stored tem...
[ "Setter", "for", "the", "audioFile", ".", "If", "the", "file", "does", "not", "contain", "a", ".", "wav", "suffix", "it", "will", "be", "added", ".", "If", "the", "file", "has", "a", "suffix", "other", "than", ".", "wav", "it", "will", "be", "removed...
train
https://github.com/republicofgavin/PauseResumeAudioRecorder/blob/938128a6266fb5bd7b60f844b5d7e56e1899d4e2/library/src/main/java/com/github/republicofgavin/pauseresumeaudiorecorder/PauseResumeAudioRecorder.java#L159-L176
drinkjava2/jBeanBox
jbeanbox/src/main/java/com/github/drinkjava2/asm5_0_3/util/CheckClassAdapter.java
CheckClassAdapter.checkTypeRefAndPath
static void checkTypeRefAndPath(int typeRef, TypePath typePath) { """ Checks the reference to a type in a type annotation. @param typeRef a reference to an annotated type. @param typePath the path to the annotated type argument, wildcard bound, array element type, or static inner type within 'typeRef'. May ...
java
static void checkTypeRefAndPath(int typeRef, TypePath typePath) { int mask = 0; switch (typeRef >>> 24) { case TypeReference.CLASS_TYPE_PARAMETER: case TypeReference.METHOD_TYPE_PARAMETER: case TypeReference.METHOD_FORMAL_PARAMETER: mask = 0xFFFF0000; brea...
[ "static", "void", "checkTypeRefAndPath", "(", "int", "typeRef", ",", "TypePath", "typePath", ")", "{", "int", "mask", "=", "0", ";", "switch", "(", "typeRef", ">>>", "24", ")", "{", "case", "TypeReference", ".", "CLASS_TYPE_PARAMETER", ":", "case", "TypeRefe...
Checks the reference to a type in a type annotation. @param typeRef a reference to an annotated type. @param typePath the path to the annotated type argument, wildcard bound, array element type, or static inner type within 'typeRef'. May be <tt>null</tt> if the annotation targets 'typeRef' as a whole.
[ "Checks", "the", "reference", "to", "a", "type", "in", "a", "type", "annotation", "." ]
train
https://github.com/drinkjava2/jBeanBox/blob/01c216599ffa2e5f2d9c01df2adaad0f45567c04/jbeanbox/src/main/java/com/github/drinkjava2/asm5_0_3/util/CheckClassAdapter.java#L705-L764
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/factory/feature/detect/interest/FactoryDetectPoint.java
FactoryDetectPoint.createHarris
public static <T extends ImageGray<T>, D extends ImageGray<D>> GeneralFeatureDetector<T, D> createHarris( @Nullable ConfigGeneralDetector configDetector, @Nullable ConfigHarrisCorner configCorner, Class<D> derivType) { """ Detects Harris corners. @param configDetector Configuration for feature de...
java
public static <T extends ImageGray<T>, D extends ImageGray<D>> GeneralFeatureDetector<T, D> createHarris( @Nullable ConfigGeneralDetector configDetector, @Nullable ConfigHarrisCorner configCorner, Class<D> derivType) { if( configDetector == null) configDetector = new ConfigGeneralDetector(); if( c...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ",", "D", "extends", "ImageGray", "<", "D", ">", ">", "GeneralFeatureDetector", "<", "T", ",", "D", ">", "createHarris", "(", "@", "Nullable", "ConfigGeneralDetector", "configDetector", ","...
Detects Harris corners. @param configDetector Configuration for feature detector. @param configCorner Configuration for corner intensity computation. If null radius will match detector radius @param derivType Type of derivative image. @see boofcv.alg.feature.detect.intensity.HarrisCornerIntensity
[ "Detects", "Harris", "corners", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/factory/feature/detect/interest/FactoryDetectPoint.java#L62-L76
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/matrix/DiagonalMatrix.java
DiagonalMatrix.setColumn
public void setColumn(int column, DoubleVector vector) { """ {@inheritDoc} Note that any values are not on the diagonal are ignored. """ checkIndices(vector.length() - 1, column); values[column] = vector.get(column); }
java
public void setColumn(int column, DoubleVector vector) { checkIndices(vector.length() - 1, column); values[column] = vector.get(column); }
[ "public", "void", "setColumn", "(", "int", "column", ",", "DoubleVector", "vector", ")", "{", "checkIndices", "(", "vector", ".", "length", "(", ")", "-", "1", ",", "column", ")", ";", "values", "[", "column", "]", "=", "vector", ".", "get", "(", "co...
{@inheritDoc} Note that any values are not on the diagonal are ignored.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/matrix/DiagonalMatrix.java#L176-L180
inferred/FreeBuilder
src/main/java/org/inferred/freebuilder/processor/model/ModelUtils.java
ModelUtils.findAnnotationMirror
public static Optional<AnnotationMirror> findAnnotationMirror( Element element, QualifiedName annotationClass) { """ Returns an {@link AnnotationMirror} for the annotation of type {@code annotationClass} on {@code element}, or {@link Optional#empty()} if no such annotation exists. """ return findAnn...
java
public static Optional<AnnotationMirror> findAnnotationMirror( Element element, QualifiedName annotationClass) { return findAnnotationMirror(element, Shading.unshadedName(annotationClass.toString())); }
[ "public", "static", "Optional", "<", "AnnotationMirror", ">", "findAnnotationMirror", "(", "Element", "element", ",", "QualifiedName", "annotationClass", ")", "{", "return", "findAnnotationMirror", "(", "element", ",", "Shading", ".", "unshadedName", "(", "annotationC...
Returns an {@link AnnotationMirror} for the annotation of type {@code annotationClass} on {@code element}, or {@link Optional#empty()} if no such annotation exists.
[ "Returns", "an", "{" ]
train
https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/src/main/java/org/inferred/freebuilder/processor/model/ModelUtils.java#L67-L70
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslocspresponder.java
sslocspresponder.get
public static sslocspresponder get(nitro_service service, String name) throws Exception { """ Use this API to fetch sslocspresponder resource of given name . """ sslocspresponder obj = new sslocspresponder(); obj.set_name(name); sslocspresponder response = (sslocspresponder) obj.get_resource(service); ...
java
public static sslocspresponder get(nitro_service service, String name) throws Exception{ sslocspresponder obj = new sslocspresponder(); obj.set_name(name); sslocspresponder response = (sslocspresponder) obj.get_resource(service); return response; }
[ "public", "static", "sslocspresponder", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "sslocspresponder", "obj", "=", "new", "sslocspresponder", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "...
Use this API to fetch sslocspresponder resource of given name .
[ "Use", "this", "API", "to", "fetch", "sslocspresponder", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslocspresponder.java#L634-L639
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/jita/handler/impl/CudaZeroHandler.java
CudaZeroHandler.copyforward
@Override @Deprecated public void copyforward(AllocationPoint point, AllocationShape shape) { """ Copies memory from host buffer to device. Host copy is preserved as is. @param point """ /* Technically that's just a case for relocate, with source as HOST and target point.getAllo...
java
@Override @Deprecated public void copyforward(AllocationPoint point, AllocationShape shape) { /* Technically that's just a case for relocate, with source as HOST and target point.getAllocationStatus() */ log.info("copyforward() called on tp[" + point.getObjectId() + "], shap...
[ "@", "Override", "@", "Deprecated", "public", "void", "copyforward", "(", "AllocationPoint", "point", ",", "AllocationShape", "shape", ")", "{", "/*\n Technically that's just a case for relocate, with source as HOST and target point.getAllocationStatus()\n */", "lo...
Copies memory from host buffer to device. Host copy is preserved as is. @param point
[ "Copies", "memory", "from", "host", "buffer", "to", "device", ".", "Host", "copy", "is", "preserved", "as", "is", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/jita/handler/impl/CudaZeroHandler.java#L470-L479
kcthota/emoji4j
src/main/java/emoji4j/AbstractEmoji.java
AbstractEmoji.htmlifyHelper
protected static String htmlifyHelper(String text, boolean isHex, boolean isSurrogate) { """ Helper to convert emoji characters to html entities in a string @param text String to htmlify @param isHex isHex @return htmlified string """ StringBuffer sb = new StringBuffer(); for (int i = 0; i < text.le...
java
protected static String htmlifyHelper(String text, boolean isHex, boolean isSurrogate) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < text.length(); i++) { int ch = text.codePointAt(i); if (ch <= 128) { sb.appendCodePoint(ch); } else if (ch > 128 && (ch < 159 || (ch >= 55296 && ch <= 57...
[ "protected", "static", "String", "htmlifyHelper", "(", "String", "text", ",", "boolean", "isHex", ",", "boolean", "isSurrogate", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", ...
Helper to convert emoji characters to html entities in a string @param text String to htmlify @param isHex isHex @return htmlified string
[ "Helper", "to", "convert", "emoji", "characters", "to", "html", "entities", "in", "a", "string" ]
train
https://github.com/kcthota/emoji4j/blob/b8cc0c60b8d804cfd7f3369689576b9a93ea1e6f/src/main/java/emoji4j/AbstractEmoji.java#L29-L61
ksclarke/vertx-pairtree
src/main/java/info/freelibrary/pairtree/fs/FsPairtree.java
FsPairtree.checkPrefix
private void checkPrefix(final Future<Boolean> aFuture) { """ Checks whether a Pairtree prefix file exists. @param aFuture The result of an action that may, or may not, have occurred yet. """ final String prefixFilePath = getPrefixFilePath(); myFileSystem.exists(prefixFilePath, result -> { ...
java
private void checkPrefix(final Future<Boolean> aFuture) { final String prefixFilePath = getPrefixFilePath(); myFileSystem.exists(prefixFilePath, result -> { if (result.succeeded()) { if (hasPrefix()) { if (LOGGER.isDebugEnabled()) { ...
[ "private", "void", "checkPrefix", "(", "final", "Future", "<", "Boolean", ">", "aFuture", ")", "{", "final", "String", "prefixFilePath", "=", "getPrefixFilePath", "(", ")", ";", "myFileSystem", ".", "exists", "(", "prefixFilePath", ",", "result", "->", "{", ...
Checks whether a Pairtree prefix file exists. @param aFuture The result of an action that may, or may not, have occurred yet.
[ "Checks", "whether", "a", "Pairtree", "prefix", "file", "exists", "." ]
train
https://github.com/ksclarke/vertx-pairtree/blob/b2ea1e32057e5df262e9265540d346a732b718df/src/main/java/info/freelibrary/pairtree/fs/FsPairtree.java#L204-L232
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.checkRole
public void checkRole(CmsDbContext dbc, CmsRole role) throws CmsRoleViolationException { """ Checks if the user of the current database context has permissions to impersonate the given role in the given organizational unit.<p> If the organizational unit is <code>null</code>, this method will check if the give...
java
public void checkRole(CmsDbContext dbc, CmsRole role) throws CmsRoleViolationException { if (!hasRole(dbc, dbc.currentUser(), role)) { if (role.getOuFqn() != null) { throw role.createRoleViolationExceptionForOrgUnit(dbc.getRequestContext(), role.getOuFqn()); } else { ...
[ "public", "void", "checkRole", "(", "CmsDbContext", "dbc", ",", "CmsRole", "role", ")", "throws", "CmsRoleViolationException", "{", "if", "(", "!", "hasRole", "(", "dbc", ",", "dbc", ".", "currentUser", "(", ")", ",", "role", ")", ")", "{", "if", "(", ...
Checks if the user of the current database context has permissions to impersonate the given role in the given organizational unit.<p> If the organizational unit is <code>null</code>, this method will check if the given user has the given role for at least one organizational unit.<p> @param dbc the current OpenCms use...
[ "Checks", "if", "the", "user", "of", "the", "current", "database", "context", "has", "permissions", "to", "impersonate", "the", "given", "role", "in", "the", "given", "organizational", "unit", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L562-L571
jbundle/jbundle
base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XScreenField.java
XScreenField.printInputControl
public void printInputControl(PrintWriter out, String strFieldDesc, String strFieldName, String strSize, String strMaxSize, String strValue, String strControlType, String strFieldType) { """ Display this field in XML input format. @param strFieldType The field type """ out.println(" <xfm:" + strContro...
java
public void printInputControl(PrintWriter out, String strFieldDesc, String strFieldName, String strSize, String strMaxSize, String strValue, String strControlType, String strFieldType) { out.println(" <xfm:" + strControlType + " xform=\"form1\" ref=\"" + strFieldName + "\" cols=\"" + strSize + "\" type=\"" ...
[ "public", "void", "printInputControl", "(", "PrintWriter", "out", ",", "String", "strFieldDesc", ",", "String", "strFieldName", ",", "String", "strSize", ",", "String", "strMaxSize", ",", "String", "strValue", ",", "String", "strControlType", ",", "String", "strFi...
Display this field in XML input format. @param strFieldType The field type
[ "Display", "this", "field", "in", "XML", "input", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XScreenField.java#L147-L152
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxws.clientcontainer/src/com/ibm/ws/jaxws/client/injection/WebServiceRefBinding.java
WebServiceRefBinding.processExistingWSDL
private void processExistingWSDL(String wsdlLocation, Member newMember) throws InjectionException { """ This will compare the wsdlLocation attribute of the various annotations that have refer to the same service reference. If they differ we will throw an exception as the runtime will not be able to determine whic...
java
private void processExistingWSDL(String wsdlLocation, Member newMember) throws InjectionException { // if the wsdlLocation for this service reference is specified in the DD, log a debug statement and continue if (wsrInfo.getWsdlLocation() != null && !"".equals(wsrInfo.getWsdlLocation())) { i...
[ "private", "void", "processExistingWSDL", "(", "String", "wsdlLocation", ",", "Member", "newMember", ")", "throws", "InjectionException", "{", "// if the wsdlLocation for this service reference is specified in the DD, log a debug statement and continue", "if", "(", "wsrInfo", ".", ...
This will compare the wsdlLocation attribute of the various annotations that have refer to the same service reference. If they differ we will throw an exception as the runtime will not be able to determine which WSDL to use. We will only do this checking if there was not a WSDL location specified in the deployment desc...
[ "This", "will", "compare", "the", "wsdlLocation", "attribute", "of", "the", "various", "annotations", "that", "have", "refer", "to", "the", "same", "service", "reference", ".", "If", "they", "differ", "we", "will", "throw", "an", "exception", "as", "the", "r...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxws.clientcontainer/src/com/ibm/ws/jaxws/client/injection/WebServiceRefBinding.java#L343-L357
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/SpringServlet.java
SpringServlet.getFedoraHomeDir
private File getFedoraHomeDir() throws ServletException { """ Validates and returns the value of FEDORA_HOME. @return the FEDORA_HOME directory. @throws ServletException if FEDORA_HOME (or fedora.home) was not set, does not denote an existing directory, or is not writable by the current user. """ ...
java
private File getFedoraHomeDir() throws ServletException { String fedoraHome = Constants.FEDORA_HOME; if (fedoraHome == null) { failStartup("FEDORA_HOME was not configured properly. It must be " + "set via the fedora.home servlet init-param (preferred), " ...
[ "private", "File", "getFedoraHomeDir", "(", ")", "throws", "ServletException", "{", "String", "fedoraHome", "=", "Constants", ".", "FEDORA_HOME", ";", "if", "(", "fedoraHome", "==", "null", ")", "{", "failStartup", "(", "\"FEDORA_HOME was not configured properly. It ...
Validates and returns the value of FEDORA_HOME. @return the FEDORA_HOME directory. @throws ServletException if FEDORA_HOME (or fedora.home) was not set, does not denote an existing directory, or is not writable by the current user.
[ "Validates", "and", "returns", "the", "value", "of", "FEDORA_HOME", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/SpringServlet.java#L85-L115
labai/ted
ted-driver/src/main/java/ted/driver/TedDriver.java
TedDriver.createAndExecuteTask
public Long createAndExecuteTask(String taskName, String data, String key1, String key2) { """ create task and immediately execute it (will wait until execution finish) """ return tedDriverImpl.createAndExecuteTask(taskName, data, key1, key2, false); }
java
public Long createAndExecuteTask(String taskName, String data, String key1, String key2) { return tedDriverImpl.createAndExecuteTask(taskName, data, key1, key2, false); }
[ "public", "Long", "createAndExecuteTask", "(", "String", "taskName", ",", "String", "data", ",", "String", "key1", ",", "String", "key2", ")", "{", "return", "tedDriverImpl", ".", "createAndExecuteTask", "(", "taskName", ",", "data", ",", "key1", ",", "key2", ...
create task and immediately execute it (will wait until execution finish)
[ "create", "task", "and", "immediately", "execute", "it", "(", "will", "wait", "until", "execution", "finish", ")" ]
train
https://github.com/labai/ted/blob/2ee197246a78d842c18d6780c48fd903b00608a6/ted-driver/src/main/java/ted/driver/TedDriver.java#L87-L89
BlueBrain/bluima
modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/Debug.java
Debug.printStatInfo
public static void printStatInfo(String outputDirPath, File pdfFile, int pageNum, int tableNum) { """ After processing all the PDF documents, this method helps us to get the statistic information of all the PDF documents such as the total number of pages, tables, etc. @param outputDirPath the directory path w...
java
public static void printStatInfo(String outputDirPath, File pdfFile, int pageNum, int tableNum) { try { File classificationData = new File(outputDirPath, "statInfo"); if (!classificationData.exists()) { classificationData.mkdirs(); } File fileName = new File(classificationData,...
[ "public", "static", "void", "printStatInfo", "(", "String", "outputDirPath", ",", "File", "pdfFile", ",", "int", "pageNum", ",", "int", "tableNum", ")", "{", "try", "{", "File", "classificationData", "=", "new", "File", "(", "outputDirPath", ",", "\"statInfo\"...
After processing all the PDF documents, this method helps us to get the statistic information of all the PDF documents such as the total number of pages, tables, etc. @param outputDirPath the directory path where the middle-stage results will go to @param pdfFile the PDF file being processed @param pageNum the total n...
[ "After", "processing", "all", "the", "PDF", "documents", "this", "method", "helps", "us", "to", "get", "the", "statistic", "information", "of", "all", "the", "PDF", "documents", "such", "as", "the", "total", "number", "of", "pages", "tables", "etc", "." ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/Debug.java#L148-L162