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
fcrepo4/fcrepo4
fcrepo-http-api/src/main/java/org/fcrepo/http/api/ExternalContentHandler.java
ExternalContentHandler.fetchExternalContent
public InputStream fetchExternalContent() { """ Fetch the external content @return InputStream containing the external content """ final URI uri = link.getUri(); final String scheme = uri.getScheme(); LOGGER.debug("scheme is {}", scheme); if (scheme != null) { try ...
java
public InputStream fetchExternalContent() { final URI uri = link.getUri(); final String scheme = uri.getScheme(); LOGGER.debug("scheme is {}", scheme); if (scheme != null) { try { if (scheme.equals("file")) { return new FileInputStream(uri...
[ "public", "InputStream", "fetchExternalContent", "(", ")", "{", "final", "URI", "uri", "=", "link", ".", "getUri", "(", ")", ";", "final", "String", "scheme", "=", "uri", ".", "getScheme", "(", ")", ";", "LOGGER", ".", "debug", "(", "\"scheme is {}\"", "...
Fetch the external content @return InputStream containing the external content
[ "Fetch", "the", "external", "content" ]
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-http-api/src/main/java/org/fcrepo/http/api/ExternalContentHandler.java#L140-L157
jbundle/webapp
base/src/main/java/org/jbundle/util/webapp/base/BaseOsgiServlet.java
BaseOsgiServlet.service
public void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { """ process an HTML get or post. @exception ServletException From inherited class. @exception IOException From inherited class. """ boolean fileFound = sendResourceFile(req, resp); if ...
java
public void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { boolean fileFound = sendResourceFile(req, resp); if (!fileFound) resp.sendError(HttpServletResponse.SC_NOT_FOUND, "File not found"); // super.service(req, resp); }
[ "public", "void", "service", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "resp", ")", "throws", "ServletException", ",", "IOException", "{", "boolean", "fileFound", "=", "sendResourceFile", "(", "req", ",", "resp", ")", ";", "if", "(", "!", "...
process an HTML get or post. @exception ServletException From inherited class. @exception IOException From inherited class.
[ "process", "an", "HTML", "get", "or", "post", "." ]
train
https://github.com/jbundle/webapp/blob/af2cf32bd92254073052f1f9b4bcd47c2f76ba7d/base/src/main/java/org/jbundle/util/webapp/base/BaseOsgiServlet.java#L54-L61
bmelnychuk/AndroidTreeView
library/src/main/java/com/unnamed/b/atv/view/TwoDScrollView.java
TwoDScrollView.scrollTo
public void scrollTo(int x, int y) { """ {@inheritDoc} <p/> <p>This version also clamps the scrolling to the bounds of our child. """ // we rely on the fact the View.scrollBy calls scrollTo. if (getChildCount() > 0) { View child = getChildAt(0); x = clamp(x, getWidth()...
java
public void scrollTo(int x, int y) { // we rely on the fact the View.scrollBy calls scrollTo. if (getChildCount() > 0) { View child = getChildAt(0); x = clamp(x, getWidth() - getPaddingRight() - getPaddingLeft(), child.getWidth()); y = clamp(y, getHeight() - getPaddin...
[ "public", "void", "scrollTo", "(", "int", "x", ",", "int", "y", ")", "{", "// we rely on the fact the View.scrollBy calls scrollTo.", "if", "(", "getChildCount", "(", ")", ">", "0", ")", "{", "View", "child", "=", "getChildAt", "(", "0", ")", ";", "x", "="...
{@inheritDoc} <p/> <p>This version also clamps the scrolling to the bounds of our child.
[ "{" ]
train
https://github.com/bmelnychuk/AndroidTreeView/blob/d051ce75f5c9bd5206481808f6133b51f581c8f1/library/src/main/java/com/unnamed/b/atv/view/TwoDScrollView.java#L1069-L1079
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/OperationContextImpl.java
OperationContextImpl.getServiceTarget
CapabilityServiceTarget getServiceTarget(final Step targetActiveStep) throws UnsupportedOperationException { """ Gets a service target that will ensure that any {@link org.jboss.msc.service.ServiceTarget#addService(org.jboss.msc.service.ServiceName, org.jboss.msc.service.Service) added services} will be tracked ...
java
CapabilityServiceTarget getServiceTarget(final Step targetActiveStep) throws UnsupportedOperationException { readOnly = false; assert isControllingThread(); if (!isRuntimeChangeAllowed()) { throw ControllerLogger.ROOT_LOGGER.serviceTargetRuntimeOperationsOnly(); } ...
[ "CapabilityServiceTarget", "getServiceTarget", "(", "final", "Step", "targetActiveStep", ")", "throws", "UnsupportedOperationException", "{", "readOnly", "=", "false", ";", "assert", "isControllingThread", "(", ")", ";", "if", "(", "!", "isRuntimeChangeAllowed", "(", ...
Gets a service target that will ensure that any {@link org.jboss.msc.service.ServiceTarget#addService(org.jboss.msc.service.ServiceName, org.jboss.msc.service.Service) added services} will be tracked for subsequent verification of service stability. @param targetActiveStep the {@link org.jboss.as.controller.AbstractOp...
[ "Gets", "a", "service", "target", "that", "will", "ensure", "that", "any", "{", "@link", "org", ".", "jboss", ".", "msc", ".", "service", ".", "ServiceTarget#addService", "(", "org", ".", "jboss", ".", "msc", ".", "service", ".", "ServiceName", "org", "....
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/OperationContextImpl.java#L743-L777
TheHortonMachine/hortonmachine
gears/src/main/java/oms3/ngmf/util/Validation.java
Validation.hexDigest
public static String hexDigest(String algorithm, File[] files) { """ Creates a hex encoded sha-256 hash of all files. @param algorithm the algorithm to be used. @param files the files to include for this hash. @return the hexadecimal digest (length 64byte for sha-256). """ try { Messag...
java
public static String hexDigest(String algorithm, File[] files) { try { MessageDigest md = MessageDigest.getInstance(algorithm); byte[] buf = new byte[4096]; for (File f : files) { FileInputStream in = new FileInputStream(f); int nread = in.read...
[ "public", "static", "String", "hexDigest", "(", "String", "algorithm", ",", "File", "[", "]", "files", ")", "{", "try", "{", "MessageDigest", "md", "=", "MessageDigest", ".", "getInstance", "(", "algorithm", ")", ";", "byte", "[", "]", "buf", "=", "new",...
Creates a hex encoded sha-256 hash of all files. @param algorithm the algorithm to be used. @param files the files to include for this hash. @return the hexadecimal digest (length 64byte for sha-256).
[ "Creates", "a", "hex", "encoded", "sha", "-", "256", "hash", "of", "all", "files", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/oms3/ngmf/util/Validation.java#L24-L42
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/common/util/UrlUtils.java
UrlUtils.urlDecode
public static String urlDecode(String value, String enc) { """ Decodes using URLDecoder - use when queries or form post values are decoded @param value value to decode @param enc encoding """ return urlDecode(value, enc, false); }
java
public static String urlDecode(String value, String enc) { return urlDecode(value, enc, false); }
[ "public", "static", "String", "urlDecode", "(", "String", "value", ",", "String", "enc", ")", "{", "return", "urlDecode", "(", "value", ",", "enc", ",", "false", ")", ";", "}" ]
Decodes using URLDecoder - use when queries or form post values are decoded @param value value to decode @param enc encoding
[ "Decodes", "using", "URLDecoder", "-", "use", "when", "queries", "or", "form", "post", "values", "are", "decoded" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxrs.2.0.common/src/org/apache/cxf/common/util/UrlUtils.java#L73-L75
twitter/hraven
hraven-etl/src/main/java/com/twitter/hraven/mapreduce/JobFileTableMapper.java
JobFileTableMapper.loadCostProperties
Properties loadCostProperties(Path cachePath, String machineType) { """ looks for cost file in distributed cache @param cachePath of the cost properties file @param machineType of the node the job ran on @throws IOException """ Properties prop = new Properties(); InputStream inp = null; try { ...
java
Properties loadCostProperties(Path cachePath, String machineType) { Properties prop = new Properties(); InputStream inp = null; try { inp = new FileInputStream(cachePath.toString()); prop.load(inp); return prop; } catch (FileNotFoundException fnf) { LOG.error("cost properties doe...
[ "Properties", "loadCostProperties", "(", "Path", "cachePath", ",", "String", "machineType", ")", "{", "Properties", "prop", "=", "new", "Properties", "(", ")", ";", "InputStream", "inp", "=", "null", ";", "try", "{", "inp", "=", "new", "FileInputStream", "("...
looks for cost file in distributed cache @param cachePath of the cost properties file @param machineType of the node the job ran on @throws IOException
[ "looks", "for", "cost", "file", "in", "distributed", "cache" ]
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-etl/src/main/java/com/twitter/hraven/mapreduce/JobFileTableMapper.java#L444-L466
threerings/nenya
core/src/main/java/com/threerings/resource/ResourceManager.java
ResourceManager.getImageResource
public BufferedImage getImageResource (String rset, String path) throws IOException { """ Fetches and decodes the specified resource into a {@link BufferedImage}. @exception FileNotFoundException thrown if the resource could not be located in any of the bundles in the specified set, or if the specified...
java
public BufferedImage getImageResource (String rset, String path) throws IOException { // grab the resource bundles in the specified resource set ResourceBundle[] bundles = getResourceSet(rset); if (bundles == null) { throw new FileNotFoundException( "Unabl...
[ "public", "BufferedImage", "getImageResource", "(", "String", "rset", ",", "String", "path", ")", "throws", "IOException", "{", "// grab the resource bundles in the specified resource set", "ResourceBundle", "[", "]", "bundles", "=", "getResourceSet", "(", "rset", ")", ...
Fetches and decodes the specified resource into a {@link BufferedImage}. @exception FileNotFoundException thrown if the resource could not be located in any of the bundles in the specified set, or if the specified set does not exist. @exception IOException thrown if a problem occurs locating or reading the resource.
[ "Fetches", "and", "decodes", "the", "specified", "resource", "into", "a", "{", "@link", "BufferedImage", "}", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/resource/ResourceManager.java#L680-L710
spockframework/spock
spock-core/src/main/java/org/spockframework/gentyref/GenericTypeReflector.java
GenericTypeReflector.addWildcardParameters
public static Type addWildcardParameters(Class<?> clazz) { """ Returns a type representing the class, with all type parameters the unbound wildcard ("?"). For example, <tt>addWildcardParameters(Map.class)</tt> returns a type representing <tt>Map&lt;?,?&gt;</tt>. @return <ul> <li>If clazz is a class or interface...
java
public static Type addWildcardParameters(Class<?> clazz) { if (clazz.isArray()) { return GenericArrayTypeImpl.createArrayType(addWildcardParameters(clazz.getComponentType())); } else if (isMissingTypeParameters(clazz)) { TypeVariable<?>[] vars = clazz.getTypeParameters(); Type[] arguments = new Type[vars.l...
[ "public", "static", "Type", "addWildcardParameters", "(", "Class", "<", "?", ">", "clazz", ")", "{", "if", "(", "clazz", ".", "isArray", "(", ")", ")", "{", "return", "GenericArrayTypeImpl", ".", "createArrayType", "(", "addWildcardParameters", "(", "clazz", ...
Returns a type representing the class, with all type parameters the unbound wildcard ("?"). For example, <tt>addWildcardParameters(Map.class)</tt> returns a type representing <tt>Map&lt;?,?&gt;</tt>. @return <ul> <li>If clazz is a class or interface without type parameters, clazz itself is returned.</li> <li>If clazz i...
[ "Returns", "a", "type", "representing", "the", "class", "with", "all", "type", "parameters", "the", "unbound", "wildcard", "(", "?", ")", ".", "For", "example", "<tt", ">", "addWildcardParameters", "(", "Map", ".", "class", ")", "<", "/", "tt", ">", "ret...
train
https://github.com/spockframework/spock/blob/d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9/spock-core/src/main/java/org/spockframework/gentyref/GenericTypeReflector.java#L86-L98
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.addScope
protected static void addScope(String name, String criteria) { """ Use in a static block of a model definotion to add a scope. @param name name of scope @param criteria SQL criteria for the scope filter """ ModelDelegate.addScope(modelClass().getName(), name, criteria); }
java
protected static void addScope(String name, String criteria) { ModelDelegate.addScope(modelClass().getName(), name, criteria); }
[ "protected", "static", "void", "addScope", "(", "String", "name", ",", "String", "criteria", ")", "{", "ModelDelegate", ".", "addScope", "(", "modelClass", "(", ")", ".", "getName", "(", ")", ",", "name", ",", "criteria", ")", ";", "}" ]
Use in a static block of a model definotion to add a scope. @param name name of scope @param criteria SQL criteria for the scope filter
[ "Use", "in", "a", "static", "block", "of", "a", "model", "definotion", "to", "add", "a", "scope", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L1970-L1972
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/jboss/logging/Messages.java
Messages.getBundle
public static <T> T getBundle(Class<T> type) { """ Get a message bundle of the given type. Equivalent to <code>{@link #getBundle(Class, java.util.Locale) getBundle}(type, Locale.getDefault())</code>. @param type the bundle type class @param <T> the bundle type @return the bundle """ return getBun...
java
public static <T> T getBundle(Class<T> type) { return getBundle(type, Locale.getDefault()); }
[ "public", "static", "<", "T", ">", "T", "getBundle", "(", "Class", "<", "T", ">", "type", ")", "{", "return", "getBundle", "(", "type", ",", "Locale", ".", "getDefault", "(", ")", ")", ";", "}" ]
Get a message bundle of the given type. Equivalent to <code>{@link #getBundle(Class, java.util.Locale) getBundle}(type, Locale.getDefault())</code>. @param type the bundle type class @param <T> the bundle type @return the bundle
[ "Get", "a", "message", "bundle", "of", "the", "given", "type", ".", "Equivalent", "to", "<code", ">", "{", "@link", "#getBundle", "(", "Class", "java", ".", "util", ".", "Locale", ")", "getBundle", "}", "(", "type", "Locale", ".", "getDefault", "()", "...
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/jboss/logging/Messages.java#L45-L47
lagom/lagom
service/javadsl/client/src/main/java/com/lightbend/lagom/javadsl/client/CircuitBreakingServiceLocator.java
CircuitBreakingServiceLocator.doWithServiceImpl
protected <T> CompletionStage<Optional<T>> doWithServiceImpl(String name, Descriptor.Call<?, ?> serviceCall, Function<URI, CompletionStage<T>> block) { """ Do the given block with the given service looked up. This is invoked by {@link #doWithService(String, Descriptor.Call, Function)}, after wrapping the passed...
java
protected <T> CompletionStage<Optional<T>> doWithServiceImpl(String name, Descriptor.Call<?, ?> serviceCall, Function<URI, CompletionStage<T>> block) { return locate(name, serviceCall).thenCompose(uri -> { return uri .map(u -> block.apply(u).thenApply(Optional::of)) ...
[ "protected", "<", "T", ">", "CompletionStage", "<", "Optional", "<", "T", ">", ">", "doWithServiceImpl", "(", "String", "name", ",", "Descriptor", ".", "Call", "<", "?", ",", "?", ">", "serviceCall", ",", "Function", "<", "URI", ",", "CompletionStage", "...
Do the given block with the given service looked up. This is invoked by {@link #doWithService(String, Descriptor.Call, Function)}, after wrapping the passed in block in a circuit breaker if configured to do so. The default implementation just delegates to the {@link #locate(String, Descriptor.Call)} method, but this ...
[ "Do", "the", "given", "block", "with", "the", "given", "service", "looked", "up", "." ]
train
https://github.com/lagom/lagom/blob/3763055a9d1aace793a5d970f4e688aea61b1a5a/service/javadsl/client/src/main/java/com/lightbend/lagom/javadsl/client/CircuitBreakingServiceLocator.java#L59-L65
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-data/deeplearning4j-datavec-iterators/src/main/java/org/deeplearning4j/datasets/datavec/RecordReaderDataSetIterator.java
RecordReaderDataSetIterator.loadFromMetaData
public DataSet loadFromMetaData(List<RecordMetaData> list) throws IOException { """ Load a multiple examples to a DataSet, using the provided RecordMetaData instances. @param list List of RecordMetaData instances to load from. Should have been produced by the record reader provided to the RecordReaderDataSetIt...
java
public DataSet loadFromMetaData(List<RecordMetaData> list) throws IOException { if (underlying == null) { Record r = recordReader.loadFromMetaData(list.get(0)); initializeUnderlying(r); } //Convert back to composable: List<RecordMetaData> l = new ArrayList<>(list...
[ "public", "DataSet", "loadFromMetaData", "(", "List", "<", "RecordMetaData", ">", "list", ")", "throws", "IOException", "{", "if", "(", "underlying", "==", "null", ")", "{", "Record", "r", "=", "recordReader", ".", "loadFromMetaData", "(", "list", ".", "get"...
Load a multiple examples to a DataSet, using the provided RecordMetaData instances. @param list List of RecordMetaData instances to load from. Should have been produced by the record reader provided to the RecordReaderDataSetIterator constructor @return DataSet with the specified examples @throws IOException If an err...
[ "Load", "a", "multiple", "examples", "to", "a", "DataSet", "using", "the", "provided", "RecordMetaData", "instances", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-data/deeplearning4j-datavec-iterators/src/main/java/org/deeplearning4j/datasets/datavec/RecordReaderDataSetIterator.java#L480-L494
dodie/scott
scott/src/main/java/hu/advancedweb/scott/instrumentation/transformation/ScottClassTransformer.java
ScottClassTransformer.transform
public byte[] transform(byte[] classfileBuffer, Configuration configuration) { """ Instrument the given class based on the configuration. @param classfileBuffer class to be instrumented @param configuration configuration settings @return instrumented class """ InstrumentationActions instrumentationActions...
java
public byte[] transform(byte[] classfileBuffer, Configuration configuration) { InstrumentationActions instrumentationActions = calculateTransformationParameters(classfileBuffer, configuration); if (!instrumentationActions.includeClass) { return classfileBuffer; } return transform(classfileBuffer, instrumenta...
[ "public", "byte", "[", "]", "transform", "(", "byte", "[", "]", "classfileBuffer", ",", "Configuration", "configuration", ")", "{", "InstrumentationActions", "instrumentationActions", "=", "calculateTransformationParameters", "(", "classfileBuffer", ",", "configuration", ...
Instrument the given class based on the configuration. @param classfileBuffer class to be instrumented @param configuration configuration settings @return instrumented class
[ "Instrument", "the", "given", "class", "based", "on", "the", "configuration", "." ]
train
https://github.com/dodie/scott/blob/fd6b492584d3ae7e072871ff2b094cce6041fc99/scott/src/main/java/hu/advancedweb/scott/instrumentation/transformation/ScottClassTransformer.java#L25-L31
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/TypeAdapterUtils.java
TypeAdapterUtils.generateAdapter
@SuppressWarnings("rawtypes") static <D extends TypeAdapter> D generateAdapter(HashMap<Class<? extends TypeAdapter>, TypeAdapter> cache, ReentrantLock lock, Class<D> clazz) { """ Generate adapter. @param <D> the generic type @param cache the cache @param lock the lock @param clazz the clazz @return the d ...
java
@SuppressWarnings("rawtypes") static <D extends TypeAdapter> D generateAdapter(HashMap<Class<? extends TypeAdapter>, TypeAdapter> cache, ReentrantLock lock, Class<D> clazz) { D adapter = null; try { lock.lock(); adapter = clazz.newInstance(); cache.put(clazz, adapter); } catch (Throwable e) { throw (...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "static", "<", "D", "extends", "TypeAdapter", ">", "D", "generateAdapter", "(", "HashMap", "<", "Class", "<", "?", "extends", "TypeAdapter", ">", ",", "TypeAdapter", ">", "cache", ",", "ReentrantLock", "lock",...
Generate adapter. @param <D> the generic type @param cache the cache @param lock the lock @param clazz the clazz @return the d
[ "Generate", "adapter", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/TypeAdapterUtils.java#L86-L99
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/JobSchedulesInner.java
JobSchedulesInner.getAsync
public Observable<JobScheduleInner> getAsync(String resourceGroupName, String automationAccountName, UUID jobScheduleId) { """ Retrieve the job schedule identified by job schedule name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @...
java
public Observable<JobScheduleInner> getAsync(String resourceGroupName, String automationAccountName, UUID jobScheduleId) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, jobScheduleId).map(new Func1<ServiceResponse<JobScheduleInner>, JobScheduleInner>() { @Override ...
[ "public", "Observable", "<", "JobScheduleInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "UUID", "jobScheduleId", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccount...
Retrieve the job schedule identified by job schedule name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param jobScheduleId The job schedule name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observa...
[ "Retrieve", "the", "job", "schedule", "identified", "by", "job", "schedule", "name", "." ]
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/JobSchedulesInner.java#L216-L223
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/CmsValidationHandler.java
CmsValidationHandler.addHandler
protected <H extends EventHandler> HandlerRegistration addHandler(final H handler, GwtEvent.Type<H> type) { """ Adds this handler to the widget. @param <H> the type of handler to add @param type the event type @param handler the handler @return {@link HandlerRegistration} used to remove the handler """ ...
java
protected <H extends EventHandler> HandlerRegistration addHandler(final H handler, GwtEvent.Type<H> type) { return ensureHandlers().addHandlerToSource(type, this, handler); }
[ "protected", "<", "H", "extends", "EventHandler", ">", "HandlerRegistration", "addHandler", "(", "final", "H", "handler", ",", "GwtEvent", ".", "Type", "<", "H", ">", "type", ")", "{", "return", "ensureHandlers", "(", ")", ".", "addHandlerToSource", "(", "ty...
Adds this handler to the widget. @param <H> the type of handler to add @param type the event type @param handler the handler @return {@link HandlerRegistration} used to remove the handler
[ "Adds", "this", "handler", "to", "the", "widget", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/CmsValidationHandler.java#L308-L311
ugli/jocote
src/main/java/se/ugli/jocote/lpr/Printer.java
Printer.printStream
public void printStream(final ByteArrayOutputStream stream, final String hostName, final String printerName, final String documentName) throws IOException { """ /* Print a file to a network host or printer fileName The path to the file to be printed hostName The host name or IP address of the print ...
java
public void printStream(final ByteArrayOutputStream stream, final String hostName, final String printerName, final String documentName) throws IOException { String controlFile = ""; byte buffer[] = new byte[1000]; String s; String strJobNumber; strJobNumber = "" + jo...
[ "public", "void", "printStream", "(", "final", "ByteArrayOutputStream", "stream", ",", "final", "String", "hostName", ",", "final", "String", "printerName", ",", "final", "String", "documentName", ")", "throws", "IOException", "{", "String", "controlFile", "=", "\...
/* Print a file to a network host or printer fileName The path to the file to be printed hostName The host name or IP address of the print server printerName The name of the remote queue or the port on the print server documentName The name of the document as displayed in the spooler of the host
[ "/", "*", "Print", "a", "file", "to", "a", "network", "host", "or", "printer", "fileName", "The", "path", "to", "the", "file", "to", "be", "printed", "hostName", "The", "host", "name", "or", "IP", "address", "of", "the", "print", "server", "printerName",...
train
https://github.com/ugli/jocote/blob/28c34eb5aadbca6597bf006bb92d4fc340c71b41/src/main/java/se/ugli/jocote/lpr/Printer.java#L42-L101
GwtMaterialDesign/gwt-material
gwt-material/src/main/java/gwt/material/design/client/ui/MaterialListValueBox.java
MaterialListValueBox.setValue
public void setValue(int index, String value) { """ Sets the value associated with the item at a given index. This value can be used for any purpose, but is also what is passed to the server when the list box is submitted as part of a {@link FormPanel}. @param index the index of the item to be set @param val...
java
public void setValue(int index, String value) { index += getIndexOffset(); listBox.setValue(index, value); reload(); }
[ "public", "void", "setValue", "(", "int", "index", ",", "String", "value", ")", "{", "index", "+=", "getIndexOffset", "(", ")", ";", "listBox", ".", "setValue", "(", "index", ",", "value", ")", ";", "reload", "(", ")", ";", "}" ]
Sets the value associated with the item at a given index. This value can be used for any purpose, but is also what is passed to the server when the list box is submitted as part of a {@link FormPanel}. @param index the index of the item to be set @param value the item's new value; cannot be <code>null</code> @throws I...
[ "Sets", "the", "value", "associated", "with", "the", "item", "at", "a", "given", "index", ".", "This", "value", "can", "be", "used", "for", "any", "purpose", "but", "is", "also", "what", "is", "passed", "to", "the", "server", "when", "the", "list", "bo...
train
https://github.com/GwtMaterialDesign/gwt-material/blob/86feefb282b007c0a44784c09e651a50f257138e/gwt-material/src/main/java/gwt/material/design/client/ui/MaterialListValueBox.java#L683-L687
GerdHolz/TOVAL
src/de/invation/code/toval/graphic/util/GraphicUtils.java
GraphicUtils.drawCircle
public static void drawCircle(Graphics g, Point center, int diameter) { """ Draws a circle with the specified diameter using the given point as center. @param g Graphics context @param center Circle center @param diameter Circle diameter """ drawCircle(g, (int) center.getX(), (int) center.getY(), diameter...
java
public static void drawCircle(Graphics g, Point center, int diameter){ drawCircle(g, (int) center.getX(), (int) center.getY(), diameter); }
[ "public", "static", "void", "drawCircle", "(", "Graphics", "g", ",", "Point", "center", ",", "int", "diameter", ")", "{", "drawCircle", "(", "g", ",", "(", "int", ")", "center", ".", "getX", "(", ")", ",", "(", "int", ")", "center", ".", "getY", "(...
Draws a circle with the specified diameter using the given point as center. @param g Graphics context @param center Circle center @param diameter Circle diameter
[ "Draws", "a", "circle", "with", "the", "specified", "diameter", "using", "the", "given", "point", "as", "center", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/graphic/util/GraphicUtils.java#L19-L21
petergeneric/stdlib
guice/common/src/main/java/com/peterphi/std/guice/common/serviceprops/jaxbref/JAXBResourceFactory.java
JAXBResourceFactory.get
public <T> T get(Class<T> clazz, final String name) { """ Resolve the JAXB resource, permitting caching behind the scenes @param clazz the jaxb resource to read @param name the name of the property @param <T> @return """ JAXBNamedResourceFactory<T> cached = cachedReferences.get(name); if (cached...
java
public <T> T get(Class<T> clazz, final String name) { JAXBNamedResourceFactory<T> cached = cachedReferences.get(name); if (cached == null) { cached = new JAXBNamedResourceFactory<T>(this.config, this.factory, name, clazz); cachedReferences.put(name, cached); } return cached.get(); }
[ "public", "<", "T", ">", "T", "get", "(", "Class", "<", "T", ">", "clazz", ",", "final", "String", "name", ")", "{", "JAXBNamedResourceFactory", "<", "T", ">", "cached", "=", "cachedReferences", ".", "get", "(", "name", ")", ";", "if", "(", "cached",...
Resolve the JAXB resource, permitting caching behind the scenes @param clazz the jaxb resource to read @param name the name of the property @param <T> @return
[ "Resolve", "the", "JAXB", "resource", "permitting", "caching", "behind", "the", "scenes" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/guice/common/src/main/java/com/peterphi/std/guice/common/serviceprops/jaxbref/JAXBResourceFactory.java#L39-L50
alkacon/opencms-core
src/org/opencms/ugc/CmsUgcSession.java
CmsUgcSession.loadXmlContent
public CmsResource loadXmlContent(String fileName) throws CmsUgcException { """ Loads the existing edit resource.<p> @param fileName the resource file name @return the edit resource @throws CmsUgcException if reading the resource fails """ checkNotFinished(); checkEditResourceNotSet()...
java
public CmsResource loadXmlContent(String fileName) throws CmsUgcException { checkNotFinished(); checkEditResourceNotSet(); if (fileName.contains("/")) { String message = Messages.get().container(Messages.ERR_INVALID_FILE_NAME_TO_LOAD_1, fileName).key( getCmsObject()....
[ "public", "CmsResource", "loadXmlContent", "(", "String", "fileName", ")", "throws", "CmsUgcException", "{", "checkNotFinished", "(", ")", ";", "checkEditResourceNotSet", "(", ")", ";", "if", "(", "fileName", ".", "contains", "(", "\"/\"", ")", ")", "{", "Stri...
Loads the existing edit resource.<p> @param fileName the resource file name @return the edit resource @throws CmsUgcException if reading the resource fails
[ "Loads", "the", "existing", "edit", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ugc/CmsUgcSession.java#L454-L476
hawkular/hawkular-commons
hawkular-bus/hawkular-bus-rest-client/src/main/java/org/hawkular/bus/restclient/RestClient.java
RestClient.postTopicMessage
public HttpResponse postTopicMessage(String topicName, String jsonPayload, Map<String, String> headers) throws RestClientException { """ Sends a message to the REST endpoint in order to put a message on the given topic. @param topicName name of the topic @param jsonPayload the actual message (as a ...
java
public HttpResponse postTopicMessage(String topicName, String jsonPayload, Map<String, String> headers) throws RestClientException { return postMessage(Type.TOPIC, topicName, jsonPayload, headers); }
[ "public", "HttpResponse", "postTopicMessage", "(", "String", "topicName", ",", "String", "jsonPayload", ",", "Map", "<", "String", ",", "String", ">", "headers", ")", "throws", "RestClientException", "{", "return", "postMessage", "(", "Type", ".", "TOPIC", ",", ...
Sends a message to the REST endpoint in order to put a message on the given topic. @param topicName name of the topic @param jsonPayload the actual message (as a JSON string) to put on the bus @param headers any headers to send with the message (can be null or empty) @return the response @throws RestClientException if...
[ "Sends", "a", "message", "to", "the", "REST", "endpoint", "in", "order", "to", "put", "a", "message", "on", "the", "given", "topic", "." ]
train
https://github.com/hawkular/hawkular-commons/blob/e4a832862b3446d7f4d629bb05790f2df578e035/hawkular-bus/hawkular-bus-rest-client/src/main/java/org/hawkular/bus/restclient/RestClient.java#L129-L132
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/StringUtil.java
StringUtil.bytesToString
public static String bytesToString(byte[] bytes, int offset, int length) { """ Creates a UTF8_CHARSET string from a byte array. @param bytes the byte array. @param offset the index of the first byte to decode @param length the number of bytes to decode @return the string created from the byte array. """...
java
public static String bytesToString(byte[] bytes, int offset, int length) { return new String(bytes, offset, length, UTF8_CHARSET); }
[ "public", "static", "String", "bytesToString", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "int", "length", ")", "{", "return", "new", "String", "(", "bytes", ",", "offset", ",", "length", ",", "UTF8_CHARSET", ")", ";", "}" ]
Creates a UTF8_CHARSET string from a byte array. @param bytes the byte array. @param offset the index of the first byte to decode @param length the number of bytes to decode @return the string created from the byte array.
[ "Creates", "a", "UTF8_CHARSET", "string", "from", "a", "byte", "array", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/StringUtil.java#L75-L77
lesaint/damapping
core-parent/core/src/main/java/fr/javatronic/damapping/processor/sourcegenerator/MapperFactoryImplSourceGenerator.java
MapperFactoryImplSourceGenerator.appendProperties
private void appendProperties(List<DAParameter> mapperDependencyParameters, DAClassWriter<DAFileWriter> classWriter) throws IOException { """ Creates a property for each DAParameter in the list of parameters identified as dependencies of the MapperFactoryImpl class (same name, same type and same annotations...
java
private void appendProperties(List<DAParameter> mapperDependencyParameters, DAClassWriter<DAFileWriter> classWriter) throws IOException { for (DAParameter parameter : mapperDependencyParameters) { classWriter.newProperty(parameter.getName().getName(), parameter.getType()) .withModifiers...
[ "private", "void", "appendProperties", "(", "List", "<", "DAParameter", ">", "mapperDependencyParameters", ",", "DAClassWriter", "<", "DAFileWriter", ">", "classWriter", ")", "throws", "IOException", "{", "for", "(", "DAParameter", "parameter", ":", "mapperDependencyP...
Creates a property for each DAParameter in the list of parameters identified as dependencies of the MapperFactoryImpl class (same name, same type and same annotations except {@code MapperDependency}). <p> Dependencies of the MapperFactory interface are identified by the {@link fr.javatronic.damapping.annotation.MapperD...
[ "Creates", "a", "property", "for", "each", "DAParameter", "in", "the", "list", "of", "parameters", "identified", "as", "dependencies", "of", "the", "MapperFactoryImpl", "class", "(", "same", "name", "same", "type", "and", "same", "annotations", "except", "{" ]
train
https://github.com/lesaint/damapping/blob/357afa5866939fd2a18c09213975ffef4836f328/core-parent/core/src/main/java/fr/javatronic/damapping/processor/sourcegenerator/MapperFactoryImplSourceGenerator.java#L160-L171
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/ops/executioner/CudaGridExecutioner.java
CudaGridExecutioner.isMatchingZX
protected boolean isMatchingZX(Op opA, Op opB) { """ This method checks, if opA and opB are sharing the same operands @param opA @param opB @return """ if (opA.x() == opB.x() && opA.z() == opB.z() && opA.x() == opB.z()) return true; return false; }
java
protected boolean isMatchingZX(Op opA, Op opB) { if (opA.x() == opB.x() && opA.z() == opB.z() && opA.x() == opB.z()) return true; return false; }
[ "protected", "boolean", "isMatchingZX", "(", "Op", "opA", ",", "Op", "opB", ")", "{", "if", "(", "opA", ".", "x", "(", ")", "==", "opB", ".", "x", "(", ")", "&&", "opA", ".", "z", "(", ")", "==", "opB", ".", "z", "(", ")", "&&", "opA", ".",...
This method checks, if opA and opB are sharing the same operands @param opA @param opB @return
[ "This", "method", "checks", "if", "opA", "and", "opB", "are", "sharing", "the", "same", "operands" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/ops/executioner/CudaGridExecutioner.java#L473-L478
jbundle/jbundle
thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java
BaseMessageFilter.init
public void init(String strQueueName, String strQueueType, Object source, Map<String,Object> properties) { """ Constructor. @param strQueueName Name of the queue. @param strQueueType Type of queue - remote or local. @param source usually the object sending or listening for the message, to reduce echos. """ ...
java
public void init(String strQueueName, String strQueueType, Object source, Map<String,Object> properties) { m_messageReceiver = null; m_vListenerList = null; m_bCreateRemoteFilter = true; m_bUpdateRemoteFilter = true; m_bThinTarget = false; super.init(strQueueName, str...
[ "public", "void", "init", "(", "String", "strQueueName", ",", "String", "strQueueType", ",", "Object", "source", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "m_messageReceiver", "=", "null", ";", "m_vListenerList", "=", "null", ";"...
Constructor. @param strQueueName Name of the queue. @param strQueueType Type of queue - remote or local. @param source usually the object sending or listening for the message, to reduce echos.
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L112-L120
Harium/keel
src/main/java/com/harium/keel/catalano/math/ComplexNumber.java
ComplexNumber.Divide
public static ComplexNumber Divide(ComplexNumber z1, ComplexNumber z2) { """ Divide two complex numbers. @param z1 Complex Number. @param z2 Complex Number. @return Returns new ComplexNumber instance containing the divide of specified complex numbers. """ ComplexNumber conj = ComplexNumber.Conj...
java
public static ComplexNumber Divide(ComplexNumber z1, ComplexNumber z2) { ComplexNumber conj = ComplexNumber.Conjugate(z2); double a = z1.real * conj.real + ((z1.imaginary * conj.imaginary) * -1); double b = z1.real * conj.imaginary + (z1.imaginary * conj.real); double c = z2.re...
[ "public", "static", "ComplexNumber", "Divide", "(", "ComplexNumber", "z1", ",", "ComplexNumber", "z2", ")", "{", "ComplexNumber", "conj", "=", "ComplexNumber", ".", "Conjugate", "(", "z2", ")", ";", "double", "a", "=", "z1", ".", "real", "*", "conj", ".", ...
Divide two complex numbers. @param z1 Complex Number. @param z2 Complex Number. @return Returns new ComplexNumber instance containing the divide of specified complex numbers.
[ "Divide", "two", "complex", "numbers", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/ComplexNumber.java#L348-L358
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveTask.java
HiveTask.addSetupQuery
public static void addSetupQuery(State state, String query) { """ Run the specified setup query on the Hive session before running the task. """ state.setProp(SETUP_QUERIES, state.getProp(SETUP_QUERIES, "") + ";" + query); }
java
public static void addSetupQuery(State state, String query) { state.setProp(SETUP_QUERIES, state.getProp(SETUP_QUERIES, "") + ";" + query); }
[ "public", "static", "void", "addSetupQuery", "(", "State", "state", ",", "String", "query", ")", "{", "state", ".", "setProp", "(", "SETUP_QUERIES", ",", "state", ".", "getProp", "(", "SETUP_QUERIES", ",", "\"\"", ")", "+", "\";\"", "+", "query", ")", ";...
Run the specified setup query on the Hive session before running the task.
[ "Run", "the", "specified", "setup", "query", "on", "the", "Hive", "session", "before", "running", "the", "task", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/task/HiveTask.java#L87-L89
datumbox/datumbox-framework
datumbox-framework-common/src/main/java/com/datumbox/framework/common/storage/abstracts/AbstractFileStorageEngine.java
AbstractFileStorageEngine.deleteDirectory
protected boolean deleteDirectory(Path path, boolean cleanParent) throws IOException { """ Deletes a directory and optionally removes the parent directory if it becomes empty. @param path @param cleanParent @return @throws IOException """ boolean pathExists = deleteIfExistsRecursively(path); ...
java
protected boolean deleteDirectory(Path path, boolean cleanParent) throws IOException { boolean pathExists = deleteIfExistsRecursively(path); if(pathExists && cleanParent) { cleanEmptyParentDirectory(path.getParent()); return true; } return false; }
[ "protected", "boolean", "deleteDirectory", "(", "Path", "path", ",", "boolean", "cleanParent", ")", "throws", "IOException", "{", "boolean", "pathExists", "=", "deleteIfExistsRecursively", "(", "path", ")", ";", "if", "(", "pathExists", "&&", "cleanParent", ")", ...
Deletes a directory and optionally removes the parent directory if it becomes empty. @param path @param cleanParent @return @throws IOException
[ "Deletes", "a", "directory", "and", "optionally", "removes", "the", "parent", "directory", "if", "it", "becomes", "empty", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-common/src/main/java/com/datumbox/framework/common/storage/abstracts/AbstractFileStorageEngine.java#L106-L113
thelinmichael/spotify-web-api-java
src/main/java/com/wrapper/spotify/SpotifyApi.java
SpotifyApi.changePlaylistsDetails
@Deprecated public ChangePlaylistsDetailsRequest.Builder changePlaylistsDetails(String user_id, String playlist_id) { """ Update a playlists properties. @deprecated Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-...
java
@Deprecated public ChangePlaylistsDetailsRequest.Builder changePlaylistsDetails(String user_id, String playlist_id) { return new ChangePlaylistsDetailsRequest.Builder(accessToken) .setDefaults(httpManager, scheme, host, port) .user_id(user_id) .playlist_id(playlist_id); }
[ "@", "Deprecated", "public", "ChangePlaylistsDetailsRequest", ".", "Builder", "changePlaylistsDetails", "(", "String", "user_id", ",", "String", "playlist_id", ")", "{", "return", "new", "ChangePlaylistsDetailsRequest", ".", "Builder", "(", "accessToken", ")", ".", "s...
Update a playlists properties. @deprecated Playlist IDs are unique for themselves. This parameter is thus no longer used. (https://developer.spotify.com/community/news/2018/06/12/changes-to-playlist-uris/) @param user_id The owners username. @param playlist_id The playlists ID. @return A {@link ChangePlaylistsDeta...
[ "Update", "a", "playlists", "properties", "." ]
train
https://github.com/thelinmichael/spotify-web-api-java/blob/c06b8512344c0310d0c1df362fa267879021da2e/src/main/java/com/wrapper/spotify/SpotifyApi.java#L1129-L1135
atomix/atomix
protocols/raft/src/main/java/io/atomix/protocols/raft/session/impl/MemberSelectorManager.java
MemberSelectorManager.createSelector
public MemberSelector createSelector(CommunicationStrategy selectionStrategy) { """ Creates a new address selector. @param selectionStrategy The server selection strategy. @return A new address selector. """ MemberSelector selector = new MemberSelector(leader, members, selectionStrategy, this); sel...
java
public MemberSelector createSelector(CommunicationStrategy selectionStrategy) { MemberSelector selector = new MemberSelector(leader, members, selectionStrategy, this); selectors.add(selector); return selector; }
[ "public", "MemberSelector", "createSelector", "(", "CommunicationStrategy", "selectionStrategy", ")", "{", "MemberSelector", "selector", "=", "new", "MemberSelector", "(", "leader", ",", "members", ",", "selectionStrategy", ",", "this", ")", ";", "selectors", ".", "...
Creates a new address selector. @param selectionStrategy The server selection strategy. @return A new address selector.
[ "Creates", "a", "new", "address", "selector", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/session/impl/MemberSelectorManager.java#L80-L84
UrielCh/ovh-java-sdk
ovh-java-sdk-clusterhadoop/src/main/java/net/minidev/ovh/api/ApiOvhClusterhadoop.java
ApiOvhClusterhadoop.serviceName_nodeConsumptions_GET
public ArrayList<OvhNodeConsumption> serviceName_nodeConsumptions_GET(String serviceName) throws IOException { """ Get the current node consumptions that you will billed for on the next bill REST: GET /cluster/hadoop/{serviceName}/nodeConsumptions @param serviceName [required] The internal name of your cluster...
java
public ArrayList<OvhNodeConsumption> serviceName_nodeConsumptions_GET(String serviceName) throws IOException { String qPath = "/cluster/hadoop/{serviceName}/nodeConsumptions"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t4); }
[ "public", "ArrayList", "<", "OvhNodeConsumption", ">", "serviceName_nodeConsumptions_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cluster/hadoop/{serviceName}/nodeConsumptions\"", ";", "StringBuilder", "sb", "=", "path",...
Get the current node consumptions that you will billed for on the next bill REST: GET /cluster/hadoop/{serviceName}/nodeConsumptions @param serviceName [required] The internal name of your cluster
[ "Get", "the", "current", "node", "consumptions", "that", "you", "will", "billed", "for", "on", "the", "next", "bill" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-clusterhadoop/src/main/java/net/minidev/ovh/api/ApiOvhClusterhadoop.java#L478-L483
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java
DataStream.partitionCustom
public <K> DataStream<T> partitionCustom(Partitioner<K> partitioner, int field) { """ Partitions a tuple DataStream on the specified key fields using a custom partitioner. This method takes the key position to partition on, and a partitioner that accepts the key type. <p>Note: This method works only on single ...
java
public <K> DataStream<T> partitionCustom(Partitioner<K> partitioner, int field) { Keys.ExpressionKeys<T> outExpressionKeys = new Keys.ExpressionKeys<>(new int[]{field}, getType()); return partitionCustom(partitioner, outExpressionKeys); }
[ "public", "<", "K", ">", "DataStream", "<", "T", ">", "partitionCustom", "(", "Partitioner", "<", "K", ">", "partitioner", ",", "int", "field", ")", "{", "Keys", ".", "ExpressionKeys", "<", "T", ">", "outExpressionKeys", "=", "new", "Keys", ".", "Express...
Partitions a tuple DataStream on the specified key fields using a custom partitioner. This method takes the key position to partition on, and a partitioner that accepts the key type. <p>Note: This method works only on single field keys. @param partitioner The partitioner to assign partitions to keys. @param field The...
[ "Partitions", "a", "tuple", "DataStream", "on", "the", "specified", "key", "fields", "using", "a", "custom", "partitioner", ".", "This", "method", "takes", "the", "key", "position", "to", "partition", "on", "and", "a", "partitioner", "that", "accepts", "the", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStream.java#L355-L358
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableKeysAndAttributes.java
TableKeysAndAttributes.addHashOnlyPrimaryKey
public TableKeysAndAttributes addHashOnlyPrimaryKey( String hashKeyName, Object hashKeyValue) { """ Adds a hash-only primary key to be included in the batch get-item operation. @param hashKeyName name of the hash key attribute name @param hashKeyValue name of the hash key value @return the curren...
java
public TableKeysAndAttributes addHashOnlyPrimaryKey( String hashKeyName, Object hashKeyValue) { this.addPrimaryKey(new PrimaryKey(hashKeyName, hashKeyValue)); return this; }
[ "public", "TableKeysAndAttributes", "addHashOnlyPrimaryKey", "(", "String", "hashKeyName", ",", "Object", "hashKeyValue", ")", "{", "this", ".", "addPrimaryKey", "(", "new", "PrimaryKey", "(", "hashKeyName", ",", "hashKeyValue", ")", ")", ";", "return", "this", ";...
Adds a hash-only primary key to be included in the batch get-item operation. @param hashKeyName name of the hash key attribute name @param hashKeyValue name of the hash key value @return the current instance for method chaining purposes
[ "Adds", "a", "hash", "-", "only", "primary", "key", "to", "be", "included", "in", "the", "batch", "get", "-", "item", "operation", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableKeysAndAttributes.java#L155-L159
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/BundleUtil.java
BundleUtil.resolveBundleDependencies
public static IBundleDependencies resolveBundleDependencies(Bundle bundle, BundleURLMappings javadocURLs, String... directDependencies) { """ Replies the dependencies for the given bundle. @param bundle the bundle. @param javadocURLs the mapping from bundles to the corresponding Javadoc URLs. @param directDep...
java
public static IBundleDependencies resolveBundleDependencies(Bundle bundle, BundleURLMappings javadocURLs, String... directDependencies) { final BundleURLMappings docMapping = javadocURLs == null ? new Utilities.SARLBundleJavadocURLMappings() : javadocURLs; final Collection<String> deps = directDependencies == null ...
[ "public", "static", "IBundleDependencies", "resolveBundleDependencies", "(", "Bundle", "bundle", ",", "BundleURLMappings", "javadocURLs", ",", "String", "...", "directDependencies", ")", "{", "final", "BundleURLMappings", "docMapping", "=", "javadocURLs", "==", "null", ...
Replies the dependencies for the given bundle. @param bundle the bundle. @param javadocURLs the mapping from bundles to the corresponding Javadoc URLs. @param directDependencies the list of the bundle symbolic names that are the direct dependencies of the bundle to be considered. If the given bundle has other dependen...
[ "Replies", "the", "dependencies", "for", "the", "given", "bundle", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/BundleUtil.java#L255-L259
nextreports/nextreports-engine
src/ro/nextreports/engine/util/ReportUtil.java
ReportUtil.readAsString
public static String readAsString(InputStream is) throws IOException { """ Read data from input stream @param is input stream @return string content read from input stream @throws IOException if cannot read from input stream """ try { // Scanner iterates over tokens in the stream, and in this case ...
java
public static String readAsString(InputStream is) throws IOException { try { // Scanner iterates over tokens in the stream, and in this case // we separate tokens using "beginning of the input boundary" (\A) // thus giving us only one token for the entire contents of the // stream return new Scanner(is...
[ "public", "static", "String", "readAsString", "(", "InputStream", "is", ")", "throws", "IOException", "{", "try", "{", "// Scanner iterates over tokens in the stream, and in this case", "// we separate tokens using \"beginning of the input boundary\" (\\A)", "// thus giving us only one...
Read data from input stream @param is input stream @return string content read from input stream @throws IOException if cannot read from input stream
[ "Read", "data", "from", "input", "stream" ]
train
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/util/ReportUtil.java#L487-L497
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/util/StringUtil.java
StringUtil.ifNotBlank
public static boolean ifNotBlank(final String text, final Consumer<String> consumer) { """ If the string is not blank call the consumer (depends on JDK8+) @param text @param consumer @return true if consumed @since 1.4.0 """ if (StringUtils.isNotBlank(text)) { consumer.accept(text); ...
java
public static boolean ifNotBlank(final String text, final Consumer<String> consumer) { if (StringUtils.isNotBlank(text)) { consumer.accept(text); return true; } return false; }
[ "public", "static", "boolean", "ifNotBlank", "(", "final", "String", "text", ",", "final", "Consumer", "<", "String", ">", "consumer", ")", "{", "if", "(", "StringUtils", ".", "isNotBlank", "(", "text", ")", ")", "{", "consumer", ".", "accept", "(", "tex...
If the string is not blank call the consumer (depends on JDK8+) @param text @param consumer @return true if consumed @since 1.4.0
[ "If", "the", "string", "is", "not", "blank", "call", "the", "consumer", "(", "depends", "on", "JDK8", "+", ")" ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/util/StringUtil.java#L325-L331
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ObjectUtils.java
ObjectUtils.getPropertyValue
public static <Q> Object getPropertyValue(Q bean, String propertyName) { """ Gets the value of a given property into a given bean. @param <Q> the bean type. @param bean the bean itself. @param propertyName the property name. @return the property value. @see #getPropertyValue(Object, String, Class) ...
java
public static <Q> Object getPropertyValue(Q bean, String propertyName) { return ObjectUtils.getPropertyValue(bean, propertyName, Object.class); }
[ "public", "static", "<", "Q", ">", "Object", "getPropertyValue", "(", "Q", "bean", ",", "String", "propertyName", ")", "{", "return", "ObjectUtils", ".", "getPropertyValue", "(", "bean", ",", "propertyName", ",", "Object", ".", "class", ")", ";", "}" ]
Gets the value of a given property into a given bean. @param <Q> the bean type. @param bean the bean itself. @param propertyName the property name. @return the property value. @see #getPropertyValue(Object, String, Class)
[ "Gets", "the", "value", "of", "a", "given", "property", "into", "a", "given", "bean", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/ObjectUtils.java#L66-L69
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java
ConditionalCheck.positionIndex
@Throws(IllegalPositionIndexException.class) public static void positionIndex(final boolean condition, final int index, final int size) { """ Ensures that a given position index is valid within the size of an array, list or string ... @param condition condition must be {@code true}^ so that the check will be ...
java
@Throws(IllegalPositionIndexException.class) public static void positionIndex(final boolean condition, final int index, final int size) { if (condition) { Check.positionIndex(index, size); } }
[ "@", "Throws", "(", "IllegalPositionIndexException", ".", "class", ")", "public", "static", "void", "positionIndex", "(", "final", "boolean", "condition", ",", "final", "int", "index", ",", "final", "int", "size", ")", "{", "if", "(", "condition", ")", "{", ...
Ensures that a given position index is valid within the size of an array, list or string ... @param condition condition must be {@code true}^ so that the check will be performed @param index index of an array, list or string @param size size of an array list or string @throws IllegalPositionIndexException if the inde...
[ "Ensures", "that", "a", "given", "position", "index", "is", "valid", "within", "the", "size", "of", "an", "array", "list", "or", "string", "..." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java#L2084-L2089
mapbox/mapbox-java
services-geojson/src/main/java/com/mapbox/geojson/LineString.java
LineString.fromLngLats
public static LineString fromLngLats(@NonNull List<Point> points, @Nullable BoundingBox bbox) { """ Create a new instance of this class by defining a list of {@link Point}s which follow the correct specifications described in the Point documentation. Note that there should not be any duplicate points inside the ...
java
public static LineString fromLngLats(@NonNull List<Point> points, @Nullable BoundingBox bbox) { return new LineString(TYPE, bbox, points); }
[ "public", "static", "LineString", "fromLngLats", "(", "@", "NonNull", "List", "<", "Point", ">", "points", ",", "@", "Nullable", "BoundingBox", "bbox", ")", "{", "return", "new", "LineString", "(", "TYPE", ",", "bbox", ",", "points", ")", ";", "}" ]
Create a new instance of this class by defining a list of {@link Point}s which follow the correct specifications described in the Point documentation. Note that there should not be any duplicate points inside the list and the points combined should create a LineString with a distance greater than 0. <p> Note that if le...
[ "Create", "a", "new", "instance", "of", "this", "class", "by", "defining", "a", "list", "of", "{", "@link", "Point", "}", "s", "which", "follow", "the", "correct", "specifications", "described", "in", "the", "Point", "documentation", ".", "Note", "that", "...
train
https://github.com/mapbox/mapbox-java/blob/c0be138f462f91441388584c668f3760ba0e18e2/services-geojson/src/main/java/com/mapbox/geojson/LineString.java#L127-L129
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QuerySnapshot.java
QuerySnapshot.withDocuments
public static QuerySnapshot withDocuments( final Query query, Timestamp readTime, final List<QueryDocumentSnapshot> documents) { """ Creates a new QuerySnapshot representing the results of a Query with added documents. """ return new QuerySnapshot(query, readTime) { volatile List<DocumentChange...
java
public static QuerySnapshot withDocuments( final Query query, Timestamp readTime, final List<QueryDocumentSnapshot> documents) { return new QuerySnapshot(query, readTime) { volatile List<DocumentChange> documentChanges; @Nonnull @Override public List<QueryDocumentSnapshot> getDocument...
[ "public", "static", "QuerySnapshot", "withDocuments", "(", "final", "Query", "query", ",", "Timestamp", "readTime", ",", "final", "List", "<", "QueryDocumentSnapshot", ">", "documents", ")", "{", "return", "new", "QuerySnapshot", "(", "query", ",", "readTime", "...
Creates a new QuerySnapshot representing the results of a Query with added documents.
[ "Creates", "a", "new", "QuerySnapshot", "representing", "the", "results", "of", "a", "Query", "with", "added", "documents", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/QuerySnapshot.java#L43-L94
JOML-CI/JOML
src/org/joml/Matrix4x3d.java
Matrix4x3d.setOrthoSymmetric
public Matrix4x3d setOrthoSymmetric(double width, double height, double zNear, double zFar) { """ Set this matrix to be a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code>. <p> This method is equivalent to calling {@link #se...
java
public Matrix4x3d setOrthoSymmetric(double width, double height, double zNear, double zFar) { return setOrthoSymmetric(width, height, zNear, zFar, false); }
[ "public", "Matrix4x3d", "setOrthoSymmetric", "(", "double", "width", ",", "double", "height", ",", "double", "zNear", ",", "double", "zFar", ")", "{", "return", "setOrthoSymmetric", "(", "width", ",", "height", ",", "zNear", ",", "zFar", ",", "false", ")", ...
Set this matrix to be a symmetric orthographic projection transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code>. <p> This method is equivalent to calling {@link #setOrtho(double, double, double, double, double, double) setOrtho()} with <code>left=-width/2</code>, <code>...
[ "Set", "this", "matrix", "to", "be", "a", "symmetric", "orthographic", "projection", "transformation", "for", "a", "right", "-", "handed", "coordinate", "system", "using", "OpenGL", "s", "NDC", "z", "range", "of", "<code", ">", "[", "-", "1", "..", "+", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3d.java#L7432-L7434
MorphiaOrg/morphia
morphia/src/main/java/dev/morphia/mapping/MappedField.java
MappedField.addAnnotation
public void addAnnotation(final Class<? extends Annotation> clazz, final Annotation ann) { """ Adds the annotation, if it exists on the field. @param clazz type of the annotation @param ann the annotation """ foundAnnotations.put(clazz, ann); discoverNames(); }
java
public void addAnnotation(final Class<? extends Annotation> clazz, final Annotation ann) { foundAnnotations.put(clazz, ann); discoverNames(); }
[ "public", "void", "addAnnotation", "(", "final", "Class", "<", "?", "extends", "Annotation", ">", "clazz", ",", "final", "Annotation", "ann", ")", "{", "foundAnnotations", ".", "put", "(", "clazz", ",", "ann", ")", ";", "discoverNames", "(", ")", ";", "}...
Adds the annotation, if it exists on the field. @param clazz type of the annotation @param ann the annotation
[ "Adds", "the", "annotation", "if", "it", "exists", "on", "the", "field", "." ]
train
https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/mapping/MappedField.java#L164-L167
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/transform/EnumPrefsTransform.java
EnumPrefsTransform.generateReadProperty
@Override public void generateReadProperty(Builder methodBuilder, String preferenceName, TypeName beanClass, String beanName, PrefsProperty property, boolean readAll, ReadType readType) { """ /* (non-Javadoc) @see com.abubusoft.kripton.processor.sharedprefs.transform.PrefsTransform#generateReadProperty(com.squar...
java
@Override public void generateReadProperty(Builder methodBuilder, String preferenceName, TypeName beanClass, String beanName, PrefsProperty property, boolean readAll, ReadType readType) { if (readAll) { methodBuilder.beginControlFlow(""); } methodBuilder.addStatement("String temp=$L.getString($S, null)", pre...
[ "@", "Override", "public", "void", "generateReadProperty", "(", "Builder", "methodBuilder", ",", "String", "preferenceName", ",", "TypeName", "beanClass", ",", "String", "beanName", ",", "PrefsProperty", "property", ",", "boolean", "readAll", ",", "ReadType", "readT...
/* (non-Javadoc) @see com.abubusoft.kripton.processor.sharedprefs.transform.PrefsTransform#generateReadProperty(com.squareup.javapoet.MethodSpec.Builder, java.lang.String, com.squareup.javapoet.TypeName, java.lang.String, com.abubusoft.kripton.processor.sharedprefs.model.PrefsProperty, boolean)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sharedprefs/transform/EnumPrefsTransform.java#L53-L89
rzwitserloot/lombok
src/utils/lombok/core/SpiLoadUtil.java
SpiLoadUtil.findServices
public static <C> Iterable<C> findServices(Class<C> target) throws IOException { """ Returns an iterator of instances that, at least according to the spi discovery file, are implementations of the stated class. Like ServiceLoader, each listed class is turned into an instance by calling the public no-args const...
java
public static <C> Iterable<C> findServices(Class<C> target) throws IOException { return findServices(target, Thread.currentThread().getContextClassLoader()); }
[ "public", "static", "<", "C", ">", "Iterable", "<", "C", ">", "findServices", "(", "Class", "<", "C", ">", "target", ")", "throws", "IOException", "{", "return", "findServices", "(", "target", ",", "Thread", ".", "currentThread", "(", ")", ".", "getConte...
Returns an iterator of instances that, at least according to the spi discovery file, are implementations of the stated class. Like ServiceLoader, each listed class is turned into an instance by calling the public no-args constructor. Convenience method that calls the more elaborate {@link #findServices(Class, ClassLo...
[ "Returns", "an", "iterator", "of", "instances", "that", "at", "least", "according", "to", "the", "spi", "discovery", "file", "are", "implementations", "of", "the", "stated", "class", "." ]
train
https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/utils/lombok/core/SpiLoadUtil.java#L77-L79
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/categories/string.java
string.wordWrapToTwoLines
public static String wordWrapToTwoLines(String text, int minLength) { """ This method word wrap a text to two lines if the text has multiple words and its length is greater than the specified minLength. To do the word wrap, the white space closest to the middle of the string is replaced by a "\n" character @p...
java
public static String wordWrapToTwoLines(String text, int minLength) { String wordWrapText = text != null ? text.trim() : null; if ((wordWrapText != null) && (wordWrapText.length() > minLength)) { int middle = wordWrapText.length() / 2; int leftSpaceIndex = wordWrapText.substring(...
[ "public", "static", "String", "wordWrapToTwoLines", "(", "String", "text", ",", "int", "minLength", ")", "{", "String", "wordWrapText", "=", "text", "!=", "null", "?", "text", ".", "trim", "(", ")", ":", "null", ";", "if", "(", "(", "wordWrapText", "!=",...
This method word wrap a text to two lines if the text has multiple words and its length is greater than the specified minLength. To do the word wrap, the white space closest to the middle of the string is replaced by a "\n" character @param text A Sting, the text to word wrap to two lines. @param minLength The mi...
[ "This", "method", "word", "wrap", "a", "text", "to", "two", "lines", "if", "the", "text", "has", "multiple", "words", "and", "its", "length", "is", "greater", "than", "the", "specified", "minLength", ".", "To", "do", "the", "word", "wrap", "the", "white"...
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/categories/string.java#L392-L410
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/core/future/DefaultWriteFuture.java
DefaultWriteFuture.newNotWrittenFuture
public static WriteFuture newNotWrittenFuture(IoSession session, Throwable cause) { """ Returns a new {@link DefaultWriteFuture} which is already marked as 'not written'. """ DefaultWriteFuture unwrittenFuture = new DefaultWriteFuture(session); unwrittenFuture.setException(cause); retur...
java
public static WriteFuture newNotWrittenFuture(IoSession session, Throwable cause) { DefaultWriteFuture unwrittenFuture = new DefaultWriteFuture(session); unwrittenFuture.setException(cause); return unwrittenFuture; }
[ "public", "static", "WriteFuture", "newNotWrittenFuture", "(", "IoSession", "session", ",", "Throwable", "cause", ")", "{", "DefaultWriteFuture", "unwrittenFuture", "=", "new", "DefaultWriteFuture", "(", "session", ")", ";", "unwrittenFuture", ".", "setException", "("...
Returns a new {@link DefaultWriteFuture} which is already marked as 'not written'.
[ "Returns", "a", "new", "{" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/core/future/DefaultWriteFuture.java#L39-L43
fuinorg/srcgen4j-commons
src/main/java/org/fuin/srcgen4j/commons/SrcGen4JConfig.java
SrcGen4JConfig.findTargetFolder
public final Folder findTargetFolder(@NotNull final String generatorName, @NotNull final String artifactName) throws ProjectNameNotDefinedException, ArtifactNotFoundException, FolderNameNotDefinedException, GeneratorNotFoundException, ProjectNotFoundException, FolderNotFoundException { """...
java
public final Folder findTargetFolder(@NotNull final String generatorName, @NotNull final String artifactName) throws ProjectNameNotDefinedException, ArtifactNotFoundException, FolderNameNotDefinedException, GeneratorNotFoundException, ProjectNotFoundException, FolderNotFoundException { ...
[ "public", "final", "Folder", "findTargetFolder", "(", "@", "NotNull", "final", "String", "generatorName", ",", "@", "NotNull", "final", "String", "artifactName", ")", "throws", "ProjectNameNotDefinedException", ",", "ArtifactNotFoundException", ",", "FolderNameNotDefinedE...
Returns a target directory for a given combination of generator name and artifact name. @param generatorName Name of the generator. @param artifactName Name of the artifact. @return Target file based on the configuration. @throws GeneratorNotFoundException The given generator name was not found in the configuration....
[ "Returns", "a", "target", "directory", "for", "a", "given", "combination", "of", "generator", "name", "and", "artifact", "name", "." ]
train
https://github.com/fuinorg/srcgen4j-commons/blob/bce26fd3167ea91fb2f3ad3fc9a1836d3d9fb14b/src/main/java/org/fuin/srcgen4j/commons/SrcGen4JConfig.java#L308-L317
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
XpathUtils.asBoolean
public static Boolean asBoolean(String expression, Node node, XPath xpath) throws XPathExpressionException { """ Same as {@link #asBoolean(String, Node)} but allows an xpath to be passed in explicitly for reuse. """ String booleanString = evaluateAsString(expression, node, xpath); ...
java
public static Boolean asBoolean(String expression, Node node, XPath xpath) throws XPathExpressionException { String booleanString = evaluateAsString(expression, node, xpath); return (isEmptyString(booleanString)) ? null : Boolean.parseBoolean(booleanString); }
[ "public", "static", "Boolean", "asBoolean", "(", "String", "expression", ",", "Node", "node", ",", "XPath", "xpath", ")", "throws", "XPathExpressionException", "{", "String", "booleanString", "=", "evaluateAsString", "(", "expression", ",", "node", ",", "xpath", ...
Same as {@link #asBoolean(String, Node)} but allows an xpath to be passed in explicitly for reuse.
[ "Same", "as", "{" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L321-L325
graknlabs/grakn
server/src/server/kb/structure/AbstractElement.java
AbstractElement.propertyImmutable
public <X> void propertyImmutable(P property, X newValue, @Nullable X foundValue, Function<X, Object> converter) { """ Sets a property which cannot be mutated @param property The key of the immutable property to mutate @param newValue The new value to put on the property (if the property is not set) @para...
java
public <X> void propertyImmutable(P property, X newValue, @Nullable X foundValue, Function<X, Object> converter) { Objects.requireNonNull(property); if (foundValue == null) { property(property, converter.apply(newValue)); } else if (!foundValue.equals(newValue)) { throw...
[ "public", "<", "X", ">", "void", "propertyImmutable", "(", "P", "property", ",", "X", "newValue", ",", "@", "Nullable", "X", "foundValue", ",", "Function", "<", "X", ",", "Object", ">", "converter", ")", "{", "Objects", ".", "requireNonNull", "(", "prope...
Sets a property which cannot be mutated @param property The key of the immutable property to mutate @param newValue The new value to put on the property (if the property is not set) @param foundValue The current value of the property @param converter Helper method to ensure data is persisted in the correct format
[ "Sets", "a", "property", "which", "cannot", "be", "mutated" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/server/kb/structure/AbstractElement.java#L153-L162
datacleaner/DataCleaner
desktop/ui/src/main/java/org/datacleaner/panels/result/ProgressInformationPanel.java
ProgressInformationPanel.updateProgress
public void updateProgress(final Table table, final int currentRow) { """ Informs the panel that the progress for a table is updated @param table @param currentRow """ final TableProgressInformationPanel tableProgressInformationPanel = getTableProgressInformationPanel(table, -1); final bool...
java
public void updateProgress(final Table table, final int currentRow) { final TableProgressInformationPanel tableProgressInformationPanel = getTableProgressInformationPanel(table, -1); final boolean greater = tableProgressInformationPanel.setProgress(currentRow); if (!greater) { // th...
[ "public", "void", "updateProgress", "(", "final", "Table", "table", ",", "final", "int", "currentRow", ")", "{", "final", "TableProgressInformationPanel", "tableProgressInformationPanel", "=", "getTableProgressInformationPanel", "(", "table", ",", "-", "1", ")", ";", ...
Informs the panel that the progress for a table is updated @param table @param currentRow
[ "Informs", "the", "panel", "that", "the", "progress", "for", "a", "table", "is", "updated" ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/desktop/ui/src/main/java/org/datacleaner/panels/result/ProgressInformationPanel.java#L227-L257
talenguyen/PrettySharedPreferences
prettysharedpreferences/src/main/java/com/tale/prettysharedpreferences/PrettySharedPreferences.java
PrettySharedPreferences.getLongEditor
protected LongEditor getLongEditor(String key) { """ Call to get a {@link com.tale.prettysharedpreferences.LongEditor} object for the specific key. <code>NOTE:</code> There is a unique {@link com.tale.prettysharedpreferences.TypeEditor} object for a unique key. @param key The name of the preference. @return {@...
java
protected LongEditor getLongEditor(String key) { TypeEditor typeEditor = TYPE_EDITOR_MAP.get(key); if (typeEditor == null) { typeEditor = new LongEditor(this, sharedPreferences, key); TYPE_EDITOR_MAP.put(key, typeEditor); } else if (!(typeEditor instanceof LongEditor)) { ...
[ "protected", "LongEditor", "getLongEditor", "(", "String", "key", ")", "{", "TypeEditor", "typeEditor", "=", "TYPE_EDITOR_MAP", ".", "get", "(", "key", ")", ";", "if", "(", "typeEditor", "==", "null", ")", "{", "typeEditor", "=", "new", "LongEditor", "(", ...
Call to get a {@link com.tale.prettysharedpreferences.LongEditor} object for the specific key. <code>NOTE:</code> There is a unique {@link com.tale.prettysharedpreferences.TypeEditor} object for a unique key. @param key The name of the preference. @return {@link com.tale.prettysharedpreferences.LongEditor} object to be...
[ "Call", "to", "get", "a", "{" ]
train
https://github.com/talenguyen/PrettySharedPreferences/blob/b97edf86c8fa65be2165f2cd790545c78c971c22/prettysharedpreferences/src/main/java/com/tale/prettysharedpreferences/PrettySharedPreferences.java#L91-L100
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Counters.java
Counters.L2Normalize
public static <E, C extends Counter<E>> C L2Normalize(C c) { """ L2 normalize a counter. @param c The {@link Counter} to be L2 normalized. This counter is not modified. @return A new l2-normalized Counter based on c. """ return scale(c, 1.0 / L2Norm(c)); }
java
public static <E, C extends Counter<E>> C L2Normalize(C c) { return scale(c, 1.0 / L2Norm(c)); }
[ "public", "static", "<", "E", ",", "C", "extends", "Counter", "<", "E", ">", ">", "C", "L2Normalize", "(", "C", "c", ")", "{", "return", "scale", "(", "c", ",", "1.0", "/", "L2Norm", "(", "c", ")", ")", ";", "}" ]
L2 normalize a counter. @param c The {@link Counter} to be L2 normalized. This counter is not modified. @return A new l2-normalized Counter based on c.
[ "L2", "normalize", "a", "counter", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Counters.java#L1301-L1303
cdapio/tephra
tephra-core/src/main/java/co/cask/tephra/util/TxUtils.java
TxUtils.getMaxTTL
private static long getMaxTTL(Map<byte[], Long> ttlByFamily) { """ Returns the max TTL for the given TTL values. Returns Long.MAX_VALUE if any of the column families has no TTL set. """ long maxTTL = 0; for (Long familyTTL : ttlByFamily.values()) { maxTTL = Math.max(familyTTL <= 0 ? Long.MAX_VALU...
java
private static long getMaxTTL(Map<byte[], Long> ttlByFamily) { long maxTTL = 0; for (Long familyTTL : ttlByFamily.values()) { maxTTL = Math.max(familyTTL <= 0 ? Long.MAX_VALUE : familyTTL, maxTTL); } return maxTTL == 0 ? Long.MAX_VALUE : maxTTL; }
[ "private", "static", "long", "getMaxTTL", "(", "Map", "<", "byte", "[", "]", ",", "Long", ">", "ttlByFamily", ")", "{", "long", "maxTTL", "=", "0", ";", "for", "(", "Long", "familyTTL", ":", "ttlByFamily", ".", "values", "(", ")", ")", "{", "maxTTL",...
Returns the max TTL for the given TTL values. Returns Long.MAX_VALUE if any of the column families has no TTL set.
[ "Returns", "the", "max", "TTL", "for", "the", "given", "TTL", "values", ".", "Returns", "Long", ".", "MAX_VALUE", "if", "any", "of", "the", "column", "families", "has", "no", "TTL", "set", "." ]
train
https://github.com/cdapio/tephra/blob/082c56c15c6ece15002631ff6f89206a00d8915c/tephra-core/src/main/java/co/cask/tephra/util/TxUtils.java#L136-L142
google/closure-templates
java/src/com/google/template/soy/pysrc/internal/GenPyCallExprVisitor.java
GenPyCallExprVisitor.exec
PyExpr exec(CallNode callNode, LocalVariableStack localVarStack, ErrorReporter errorReporter) { """ Generates the Python expression for a given call. <p>Important: If there are CallParamContentNode children whose contents are not computable as Python expressions, then this function assumes that, elsewhere, cod...
java
PyExpr exec(CallNode callNode, LocalVariableStack localVarStack, ErrorReporter errorReporter) { this.localVarStack = localVarStack; this.errorReporter = errorReporter; PyExpr callExpr = visit(callNode); this.localVarStack = null; this.errorReporter = null; return callExpr; }
[ "PyExpr", "exec", "(", "CallNode", "callNode", ",", "LocalVariableStack", "localVarStack", ",", "ErrorReporter", "errorReporter", ")", "{", "this", ".", "localVarStack", "=", "localVarStack", ";", "this", ".", "errorReporter", "=", "errorReporter", ";", "PyExpr", ...
Generates the Python expression for a given call. <p>Important: If there are CallParamContentNode children whose contents are not computable as Python expressions, then this function assumes that, elsewhere, code has been generated to define their respective {@code param<n>} temporary variables. <p>Here are five exam...
[ "Generates", "the", "Python", "expression", "for", "a", "given", "call", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/pysrc/internal/GenPyCallExprVisitor.java#L114-L121
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java
DocumentSubscriptions.getSubscriptionState
public SubscriptionState getSubscriptionState(String subscriptionName, String database) { """ Returns subscription definition and it's current state @param subscriptionName Subscription name as received from the server @param database Database to use @return Subscription states """ if (StringUtils.i...
java
public SubscriptionState getSubscriptionState(String subscriptionName, String database) { if (StringUtils.isEmpty(subscriptionName)) { throw new IllegalArgumentException("SubscriptionName cannot be null"); } RequestExecutor requestExecutor = _store.getRequestExecutor(ObjectUtils.fir...
[ "public", "SubscriptionState", "getSubscriptionState", "(", "String", "subscriptionName", ",", "String", "database", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "subscriptionName", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Subsc...
Returns subscription definition and it's current state @param subscriptionName Subscription name as received from the server @param database Database to use @return Subscription states
[ "Returns", "subscription", "definition", "and", "it", "s", "current", "state" ]
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/subscriptions/DocumentSubscriptions.java#L400-L410
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/platforms/Oracle9iLobHandler.java
Oracle9iLobHandler.freeTempLOB
private static void freeTempLOB(ClobWrapper clob, BlobWrapper blob) { """ Frees the temporary LOBs when an exception is raised in the application or when the LOBs are no longer needed. If the LOBs are not freed, the space used by these LOBs are not reclaimed. @param clob CLOB-wrapper to free or null @param blo...
java
private static void freeTempLOB(ClobWrapper clob, BlobWrapper blob) { try { if (clob != null) { // If the CLOB is open, close it if (clob.isOpen()) { clob.close(); } // Free the memory used by this CLOB clob.freeTemporary(); } if (blob != null) { ...
[ "private", "static", "void", "freeTempLOB", "(", "ClobWrapper", "clob", ",", "BlobWrapper", "blob", ")", "{", "try", "{", "if", "(", "clob", "!=", "null", ")", "{", "// If the CLOB is open, close it\r", "if", "(", "clob", ".", "isOpen", "(", ")", ")", "{",...
Frees the temporary LOBs when an exception is raised in the application or when the LOBs are no longer needed. If the LOBs are not freed, the space used by these LOBs are not reclaimed. @param clob CLOB-wrapper to free or null @param blob BLOB-wrapper to free or null
[ "Frees", "the", "temporary", "LOBs", "when", "an", "exception", "is", "raised", "in", "the", "application", "or", "when", "the", "LOBs", "are", "no", "longer", "needed", ".", "If", "the", "LOBs", "are", "not", "freed", "the", "space", "used", "by", "thes...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/platforms/Oracle9iLobHandler.java#L347-L379
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/index/CassandraIndexHelper.java
CassandraIndexHelper.isInvertedIndexingApplicable
public static boolean isInvertedIndexingApplicable(EntityMetadata m, boolean useSecondryIndex) { """ Checks whether Inverted indexing is applicable for a given entity whose metadata is passed as parameter @param m @return """ boolean invertedIndexingApplicable = useSecondryIndex &&...
java
public static boolean isInvertedIndexingApplicable(EntityMetadata m, boolean useSecondryIndex) { boolean invertedIndexingApplicable = useSecondryIndex && CassandraPropertyReader.csmd.isInvertedIndexingEnabled(m.getSchema()) && m.getType().isSuperColumnFamilyMetadata() && !m.i...
[ "public", "static", "boolean", "isInvertedIndexingApplicable", "(", "EntityMetadata", "m", ",", "boolean", "useSecondryIndex", ")", "{", "boolean", "invertedIndexingApplicable", "=", "useSecondryIndex", "&&", "CassandraPropertyReader", ".", "csmd", ".", "isInvertedIndexingE...
Checks whether Inverted indexing is applicable for a given entity whose metadata is passed as parameter @param m @return
[ "Checks", "whether", "Inverted", "indexing", "is", "applicable", "for", "a", "given", "entity", "whose", "metadata", "is", "passed", "as", "parameter" ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/index/CassandraIndexHelper.java#L49-L56
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java
TimeZoneGenericNames.setFormatPattern
public TimeZoneGenericNames setFormatPattern(Pattern patType, String patStr) { """ Sets the pattern string for the pattern type. Note: This method is designed for CLDR ST - not for common use. @param patType the pattern type @param patStr the pattern string @return this object. """ if (isFrozen()) ...
java
public TimeZoneGenericNames setFormatPattern(Pattern patType, String patStr) { if (isFrozen()) { throw new UnsupportedOperationException("Attempt to modify frozen object"); } // Changing pattern will invalidates cached names if (!_genericLocationNamesMap.isEmpty()) { ...
[ "public", "TimeZoneGenericNames", "setFormatPattern", "(", "Pattern", "patType", ",", "String", "patStr", ")", "{", "if", "(", "isFrozen", "(", ")", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"Attempt to modify frozen object\"", ")", ";", "}",...
Sets the pattern string for the pattern type. Note: This method is designed for CLDR ST - not for common use. @param patType the pattern type @param patStr the pattern string @return this object.
[ "Sets", "the", "pattern", "string", "for", "the", "pattern", "type", ".", "Note", ":", "This", "method", "is", "designed", "for", "CLDR", "ST", "-", "not", "for", "common", "use", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java#L283-L303
lucee/Lucee
core/src/main/java/lucee/runtime/reflection/Reflector.java
Reflector.getField
public static Object getField(Object obj, String prop) throws PageException { """ to get a visible Field of a object @param obj Object to invoke @param prop property to call @return property value @throws PageException """ try { return getFieldsIgnoreCase(obj.getClass(), prop)[0].get(obj); } catc...
java
public static Object getField(Object obj, String prop) throws PageException { try { return getFieldsIgnoreCase(obj.getClass(), prop)[0].get(obj); } catch (Throwable e) { ExceptionUtil.rethrowIfNecessary(e); throw Caster.toPageException(e); } }
[ "public", "static", "Object", "getField", "(", "Object", "obj", ",", "String", "prop", ")", "throws", "PageException", "{", "try", "{", "return", "getFieldsIgnoreCase", "(", "obj", ".", "getClass", "(", ")", ",", "prop", ")", "[", "0", "]", ".", "get", ...
to get a visible Field of a object @param obj Object to invoke @param prop property to call @return property value @throws PageException
[ "to", "get", "a", "visible", "Field", "of", "a", "object" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/reflection/Reflector.java#L1119-L1127
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java
HttpHeaders.getIntHeader
@Deprecated public static int getIntHeader(HttpMessage message, CharSequence name) { """ @deprecated Use {@link #getInt(CharSequence)} instead. Returns the integer header value with the specified header name. If there are more than one header value for the specified header name, the first value is return...
java
@Deprecated public static int getIntHeader(HttpMessage message, CharSequence name) { String value = message.headers().get(name); if (value == null) { throw new NumberFormatException("header not found: " + name); } return Integer.parseInt(value); }
[ "@", "Deprecated", "public", "static", "int", "getIntHeader", "(", "HttpMessage", "message", ",", "CharSequence", "name", ")", "{", "String", "value", "=", "message", ".", "headers", "(", ")", ".", "get", "(", "name", ")", ";", "if", "(", "value", "==", ...
@deprecated Use {@link #getInt(CharSequence)} instead. Returns the integer header value with the specified header name. If there are more than one header value for the specified header name, the first value is returned. @return the header value @throws NumberFormatException if there is no such header or the header v...
[ "@deprecated", "Use", "{", "@link", "#getInt", "(", "CharSequence", ")", "}", "instead", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java#L725-L732
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/ThriftUtils.java
ThriftUtils.fromBytes
public static <T extends TBase<?, ?>> T fromBytes(byte[] data, Class<T> clazz) throws TException { """ Deserializes a thrift object from byte array. @param data @param clazz @return @throws TException """ if (data == null) { return null; } ByteArrayInputStr...
java
public static <T extends TBase<?, ?>> T fromBytes(byte[] data, Class<T> clazz) throws TException { if (data == null) { return null; } ByteArrayInputStream bais = new ByteArrayInputStream(data); try { TTransport transport = new TIOStreamTransport(bais, ...
[ "public", "static", "<", "T", "extends", "TBase", "<", "?", ",", "?", ">", ">", "T", "fromBytes", "(", "byte", "[", "]", "data", ",", "Class", "<", "T", ">", "clazz", ")", "throws", "TException", "{", "if", "(", "data", "==", "null", ")", "{", ...
Deserializes a thrift object from byte array. @param data @param clazz @return @throws TException
[ "Deserializes", "a", "thrift", "object", "from", "byte", "array", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/ThriftUtils.java#L65-L81
mozilla/rhino
src/org/mozilla/javascript/Context.java
Context.setDebugger
public final void setDebugger(Debugger debugger, Object contextData) { """ Set the associated debugger. @param debugger the debugger to be used on callbacks from the engine. @param contextData arbitrary object that debugger can use to store per Context data. """ if (sealed) onSealedMutation(); ...
java
public final void setDebugger(Debugger debugger, Object contextData) { if (sealed) onSealedMutation(); this.debugger = debugger; debuggerData = contextData; }
[ "public", "final", "void", "setDebugger", "(", "Debugger", "debugger", ",", "Object", "contextData", ")", "{", "if", "(", "sealed", ")", "onSealedMutation", "(", ")", ";", "this", ".", "debugger", "=", "debugger", ";", "debuggerData", "=", "contextData", ";"...
Set the associated debugger. @param debugger the debugger to be used on callbacks from the engine. @param contextData arbitrary object that debugger can use to store per Context data.
[ "Set", "the", "associated", "debugger", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/Context.java#L2277-L2282
Metatavu/edelphi
edelphi/src/main/java/fi/metatavu/edelphi/pages/panel/admin/report/thesis/ThesisScale1DQueryReportPage.java
ThesisScale1DQueryReportPage.appendQueryPageComments
private void appendQueryPageComments(RequestContext requestContext, final QueryPage queryPage) { """ Appends query page comment to request. @param requestContext request contract @param queryPage query page """ PanelStamp panelStamp = RequestUtils.getActiveStamp(requestContext); Map<Long, Map<Strin...
java
private void appendQueryPageComments(RequestContext requestContext, final QueryPage queryPage) { PanelStamp panelStamp = RequestUtils.getActiveStamp(requestContext); Map<Long, Map<String, String>> answers = getRequestAnswerMap(requestContext); ReportPageCommentProcessor sorter = new Scale1DReportPageComment...
[ "private", "void", "appendQueryPageComments", "(", "RequestContext", "requestContext", ",", "final", "QueryPage", "queryPage", ")", "{", "PanelStamp", "panelStamp", "=", "RequestUtils", ".", "getActiveStamp", "(", "requestContext", ")", ";", "Map", "<", "Long", ",",...
Appends query page comment to request. @param requestContext request contract @param queryPage query page
[ "Appends", "query", "page", "comment", "to", "request", "." ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/pages/panel/admin/report/thesis/ThesisScale1DQueryReportPage.java#L113-L118
groupby/api-java
src/main/java/com/groupbyinc/api/Query.java
Query.setPinnedRefinements
public Query setPinnedRefinements(String navigationName, String... values) { """ <code> Add pinned value refinement. Takes a refinement name and a set of values. </code> @param navigationName The name of the navigation @param values The refinement values @return """ Navigation navigation = navi...
java
public Query setPinnedRefinements(String navigationName, String... values) { Navigation navigation = navigations.get(navigationName); if (navigation == null) { navigation = new Navigation().setName(navigationName); navigations.put(navigationName, navigation); } navigation.setPinnedRefinement...
[ "public", "Query", "setPinnedRefinements", "(", "String", "navigationName", ",", "String", "...", "values", ")", "{", "Navigation", "navigation", "=", "navigations", ".", "get", "(", "navigationName", ")", ";", "if", "(", "navigation", "==", "null", ")", "{", ...
<code> Add pinned value refinement. Takes a refinement name and a set of values. </code> @param navigationName The name of the navigation @param values The refinement values @return
[ "<code", ">", "Add", "pinned", "value", "refinement", ".", "Takes", "a", "refinement", "name", "and", "a", "set", "of", "values", ".", "<", "/", "code", ">" ]
train
https://github.com/groupby/api-java/blob/257c4ed0777221e5e4ade3b29b9921300fac4e2e/src/main/java/com/groupbyinc/api/Query.java#L803-L811
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/command/InputProvider.java
InputProvider.bindCommand
public void bindCommand(Control control, Command command) { """ Bind an command to a control. @param command The command to bind to @param control The control that is pressed/released to represent the command """ commands.put(control, command); if (commandState.get(command) == null) { commandStat...
java
public void bindCommand(Control control, Command command) { commands.put(control, command); if (commandState.get(command) == null) { commandState.put(command, new CommandState()); } }
[ "public", "void", "bindCommand", "(", "Control", "control", ",", "Command", "command", ")", "{", "commands", ".", "put", "(", "control", ",", "command", ")", ";", "if", "(", "commandState", ".", "get", "(", "command", ")", "==", "null", ")", "{", "comm...
Bind an command to a control. @param command The command to bind to @param control The control that is pressed/released to represent the command
[ "Bind", "an", "command", "to", "a", "control", "." ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/command/InputProvider.java#L143-L149
twitter/scalding
scalding-parquet-scrooge/src/main/java/com/twitter/scalding/parquet/scrooge/ScroogeReadSupport.java
ScroogeReadSupport.assertAreCompatible
public static void assertAreCompatible(Type fileType, Type projection) { """ Validates that the requested projection is compatible. This makes it possible to project a required field using optional since it is less restrictive. @param fileType the typed schema of the source @param projection requested proj...
java
public static void assertAreCompatible(Type fileType, Type projection) { if (!fileType.getName().equals(projection.getName()) || (fileType.getRepetition() != projection.getRepetition() && !fileType.getRepetition().isMoreRestrictiveThan(projection.getRepetition()))) { throw new InvalidRecordException(pro...
[ "public", "static", "void", "assertAreCompatible", "(", "Type", "fileType", ",", "Type", "projection", ")", "{", "if", "(", "!", "fileType", ".", "getName", "(", ")", ".", "equals", "(", "projection", ".", "getName", "(", ")", ")", "||", "(", "fileType",...
Validates that the requested projection is compatible. This makes it possible to project a required field using optional since it is less restrictive. @param fileType the typed schema of the source @param projection requested projection schema
[ "Validates", "that", "the", "requested", "projection", "is", "compatible", ".", "This", "makes", "it", "possible", "to", "project", "a", "required", "field", "using", "optional", "since", "it", "is", "less", "restrictive", "." ]
train
https://github.com/twitter/scalding/blob/428b5507279655676e507d52c669c3cbc7812dc0/scalding-parquet-scrooge/src/main/java/com/twitter/scalding/parquet/scrooge/ScroogeReadSupport.java#L183-L188
tupilabs/tap4j
tap4j-ext/src/main/java/org/tap4j/ext/junit/util/TapJUnitYamlUtil.java
TapJUnitYamlUtil.createJUnitYAMLishData
public static void createJUnitYAMLishData(TestResult testResult, String message, String severity, String source, String datetime, String file, String line, String name, String error, String backtrace) { """ <p> Inserts JUnit YAMLish diagnostic information into a TAP TestResu...
java
public static void createJUnitYAMLishData(TestResult testResult, String message, String severity, String source, String datetime, String file, String line, String name, String error, String backtrace) { final Map<String, Object> yamlish = testResult.getDiagnostic(); ...
[ "public", "static", "void", "createJUnitYAMLishData", "(", "TestResult", "testResult", ",", "String", "message", ",", "String", "severity", ",", "String", "source", ",", "String", "datetime", ",", "String", "file", ",", "String", "line", ",", "String", "name", ...
<p> Inserts JUnit YAMLish diagnostic information into a TAP TestResult. </p> <p> For more about TAP YAMLish diagnostic read this <a href="http://testanything.org/wiki/index.php/YAMLish">Wiki</a>. </p> @param testResult TAP TestResult @param message @param severity @param source @param datetime @param file @param line ...
[ "<p", ">", "Inserts", "JUnit", "YAMLish", "diagnostic", "information", "into", "a", "TAP", "TestResult", ".", "<", "/", "p", ">", "<p", ">", "For", "more", "about", "TAP", "YAMLish", "diagnostic", "read", "this", "<a", "href", "=", "http", ":", "//", "...
train
https://github.com/tupilabs/tap4j/blob/1793b653ce7f3a06a7b5c9557cdf601e28dd1f55/tap4j-ext/src/main/java/org/tap4j/ext/junit/util/TapJUnitYamlUtil.java#L65-L82
samskivert/samskivert
src/main/java/com/samskivert/velocity/DispatcherServlet.java
DispatcherServlet.methodException
@SuppressWarnings("rawtypes") // our super class declares a bare Class public Object methodException (Class clazz, String method, Exception e) throws Exception { """ Called when a method throws an exception during template evaluation. """ log.warning("Exception", "class", clazz.getName(), "...
java
@SuppressWarnings("rawtypes") // our super class declares a bare Class public Object methodException (Class clazz, String method, Exception e) throws Exception { log.warning("Exception", "class", clazz.getName(), "method", method, e); return ""; }
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "// our super class declares a bare Class", "public", "Object", "methodException", "(", "Class", "clazz", ",", "String", "method", ",", "Exception", "e", ")", "throws", "Exception", "{", "log", ".", "warning", "(", ...
Called when a method throws an exception during template evaluation.
[ "Called", "when", "a", "method", "throws", "an", "exception", "during", "template", "evaluation", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/velocity/DispatcherServlet.java#L417-L423
OpenBEL/openbel-framework
org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/NamespaceGroup.java
NamespaceGroup.getAllNamespaces
public List<Namespace> getAllNamespaces() { """ Returns all the group's namespaces. <p> This is equivalent to {@link #getNamespaces()} with the addition of the namespace representing the {@link #getDefaultResourceLocation() default resource location}, if present. </p> @return {@link List} of {@link Namespa...
java
public List<Namespace> getAllNamespaces() { List<Namespace> ret = new ArrayList<Namespace>(); if (namespaces != null) { ret.addAll(namespaces); } if (defaultResourceLocation != null) { String prefix = DEFAULT_NAMESPACE_PREFIX; String drl = defaultResou...
[ "public", "List", "<", "Namespace", ">", "getAllNamespaces", "(", ")", "{", "List", "<", "Namespace", ">", "ret", "=", "new", "ArrayList", "<", "Namespace", ">", "(", ")", ";", "if", "(", "namespaces", "!=", "null", ")", "{", "ret", ".", "addAll", "(...
Returns all the group's namespaces. <p> This is equivalent to {@link #getNamespaces()} with the addition of the namespace representing the {@link #getDefaultResourceLocation() default resource location}, if present. </p> @return {@link List} of {@link Namespace namespaces}; which may be empty @see #getNamespaces()
[ "Returns", "all", "the", "group", "s", "namespaces", ".", "<p", ">", "This", "is", "equivalent", "to", "{", "@link", "#getNamespaces", "()", "}", "with", "the", "addition", "of", "the", "namespace", "representing", "the", "{", "@link", "#getDefaultResourceLoca...
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.common/src/main/java/org/openbel/framework/common/model/NamespaceGroup.java#L117-L129
dwdyer/watchmaker
swing/src/java/main/org/uncommons/watchmaker/swing/evolutionmonitor/IslandsView.java
IslandsView.createControls
private JComponent createControls() { """ Creates the GUI controls for toggling graph display options. @return A component that can be added to the main panel. """ JPanel controls = new JPanel(new FlowLayout(FlowLayout.RIGHT)); final JCheckBox meanCheckBox = new JCheckBox("Show Mean and Stand...
java
private JComponent createControls() { JPanel controls = new JPanel(new FlowLayout(FlowLayout.RIGHT)); final JCheckBox meanCheckBox = new JCheckBox("Show Mean and Standard Deviation", false); meanCheckBox.addItemListener(new ItemListener() { public void itemStateChanged(I...
[ "private", "JComponent", "createControls", "(", ")", "{", "JPanel", "controls", "=", "new", "JPanel", "(", "new", "FlowLayout", "(", "FlowLayout", ".", "RIGHT", ")", ")", ";", "final", "JCheckBox", "meanCheckBox", "=", "new", "JCheckBox", "(", "\"Show Mean and...
Creates the GUI controls for toggling graph display options. @return A component that can be added to the main panel.
[ "Creates", "the", "GUI", "controls", "for", "toggling", "graph", "display", "options", "." ]
train
https://github.com/dwdyer/watchmaker/blob/33d942350e6bf7d9a17b9262a4f898158530247e/swing/src/java/main/org/uncommons/watchmaker/swing/evolutionmonitor/IslandsView.java#L104-L131
aws/aws-sdk-java
aws-java-sdk-lambda/src/main/java/com/amazonaws/services/lambda/model/CreateFunctionRequest.java
CreateFunctionRequest.withTags
public CreateFunctionRequest withTags(java.util.Map<String, String> tags) { """ <p> A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function. </p> @param tags A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply...
java
public CreateFunctionRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateFunctionRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function. </p> @param tags A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a> to apply to the function. @return Returns a reference to this object so that method calls can be c...
[ "<p", ">", "A", "list", "of", "<a", "href", "=", "https", ":", "//", "docs", ".", "aws", ".", "amazon", ".", "com", "/", "lambda", "/", "latest", "/", "dg", "/", "tagging", ".", "html", ">", "tags<", "/", "a", ">", "to", "apply", "to", "the", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-lambda/src/main/java/com/amazonaws/services/lambda/model/CreateFunctionRequest.java#L1020-L1023
googleapis/google-cloud-java
google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/AlertPolicyServiceClient.java
AlertPolicyServiceClient.createAlertPolicy
public final AlertPolicy createAlertPolicy(ProjectName name, AlertPolicy alertPolicy) { """ Creates a new alerting policy. <p>Sample code: <pre><code> try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { ProjectName name = ProjectName.of("[PROJECT]"); AlertPolicy a...
java
public final AlertPolicy createAlertPolicy(ProjectName name, AlertPolicy alertPolicy) { CreateAlertPolicyRequest request = CreateAlertPolicyRequest.newBuilder() .setName(name == null ? null : name.toString()) .setAlertPolicy(alertPolicy) .build(); return createAlertP...
[ "public", "final", "AlertPolicy", "createAlertPolicy", "(", "ProjectName", "name", ",", "AlertPolicy", "alertPolicy", ")", "{", "CreateAlertPolicyRequest", "request", "=", "CreateAlertPolicyRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "name", "==", "n...
Creates a new alerting policy. <p>Sample code: <pre><code> try (AlertPolicyServiceClient alertPolicyServiceClient = AlertPolicyServiceClient.create()) { ProjectName name = ProjectName.of("[PROJECT]"); AlertPolicy alertPolicy = AlertPolicy.newBuilder().build(); AlertPolicy response = alertPolicyServiceClient.createAle...
[ "Creates", "a", "new", "alerting", "policy", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/AlertPolicyServiceClient.java#L430-L438
audit4j/audit4j-core
src/main/java/org/audit4j/core/util/EncryptionUtil.java
EncryptionUtil.generateKeyIfNotAvailable
private static void generateKeyIfNotAvailable(String key, String salt) throws NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeySpecException { """ Generate key. @param key the key @param salt the salt @return the key @throws NoSuchAlgorithmException the no such algorithm excep...
java
private static void generateKeyIfNotAvailable(String key, String salt) throws NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeySpecException { if (null == cryptKey) { LOG.debug("Generating Key..."); SecretKeyFactory factory = SecretKeyFactory.getInstance("PBK...
[ "private", "static", "void", "generateKeyIfNotAvailable", "(", "String", "key", ",", "String", "salt", ")", "throws", "NoSuchAlgorithmException", ",", "UnsupportedEncodingException", ",", "InvalidKeySpecException", "{", "if", "(", "null", "==", "cryptKey", ")", "{", ...
Generate key. @param key the key @param salt the salt @return the key @throws NoSuchAlgorithmException the no such algorithm exception @throws UnsupportedEncodingException the unsupported encoding exception @throws InvalidKeySpecException the invalid key spec exception
[ "Generate", "key", "." ]
train
https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/util/EncryptionUtil.java#L148-L161
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java
KeyVaultClientCustomImpl.getKeyAsync
public ServiceFuture<KeyBundle> getKeyAsync(String vaultBaseUrl, String keyName, final ServiceCallback<KeyBundle> serviceCallback) { """ Gets the public part of a stored key. The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in t...
java
public ServiceFuture<KeyBundle> getKeyAsync(String vaultBaseUrl, String keyName, final ServiceCallback<KeyBundle> serviceCallback) { return getKeyAsync(vaultBaseUrl, keyName, "", serviceCallback); }
[ "public", "ServiceFuture", "<", "KeyBundle", ">", "getKeyAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "final", "ServiceCallback", "<", "KeyBundle", ">", "serviceCallback", ")", "{", "return", "getKeyAsync", "(", "vaultBaseUrl", ",", "keyNa...
Gets the public part of a stored key. The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response. Authorization: Requires the keys/get permission. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param keyName The n...
[ "Gets", "the", "public", "part", "of", "a", "stored", "key", ".", "The", "get", "key", "operation", "is", "applicable", "to", "all", "key", "types", ".", "If", "the", "requested", "key", "is", "symmetric", "then", "no", "key", "material", "is", "released...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java#L671-L674
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java
JBBPDslBuilder.CustomArray
public JBBPDslBuilder CustomArray(final String type, final String name, final String sizeExpression, final String param) { """ Create named custom type array which size calculated by expression. @param type custom type, must not be null @param name name of the array, can be null for anonymo...
java
public JBBPDslBuilder CustomArray(final String type, final String name, final String sizeExpression, final String param) { final ItemCustom item = new ItemCustom(type, name, this.byteOrder); item.array = true; item.bitLenExpression = param == null ? null : assertExpressionChars(param); item.sizeExpressi...
[ "public", "JBBPDslBuilder", "CustomArray", "(", "final", "String", "type", ",", "final", "String", "name", ",", "final", "String", "sizeExpression", ",", "final", "String", "param", ")", "{", "final", "ItemCustom", "item", "=", "new", "ItemCustom", "(", "type"...
Create named custom type array which size calculated by expression. @param type custom type, must not be null @param name name of the array, can be null for anonymous one @param sizeExpression expression to calculate array length, must not be null. @param param optional parameter for the f...
[ "Create", "named", "custom", "type", "array", "which", "size", "calculated", "by", "expression", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java#L546-L553
jcuda/jcusolver
JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java
JCusolverSp.cusolverSpXcsrsymamdHost
public static int cusolverSpXcsrsymamdHost( cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer p) { """ <pre> --------- CPU symmdq Symmetric Approximate minimum degree algorithm by...
java
public static int cusolverSpXcsrsymamdHost( cusolverSpHandle handle, int n, int nnzA, cusparseMatDescr descrA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer p) { return checkResult(cusolverSpXcsrsymamdHostNative(handle, n, nnzA, descrA...
[ "public", "static", "int", "cusolverSpXcsrsymamdHost", "(", "cusolverSpHandle", "handle", ",", "int", "n", ",", "int", "nnzA", ",", "cusparseMatDescr", "descrA", ",", "Pointer", "csrRowPtrA", ",", "Pointer", "csrColIndA", ",", "Pointer", "p", ")", "{", "return",...
<pre> --------- CPU symmdq Symmetric Approximate minimum degree algorithm by quotient graph </pre>
[ "<pre", ">", "---------", "CPU", "symmdq", "Symmetric", "Approximate", "minimum", "degree", "algorithm", "by", "quotient", "graph" ]
train
https://github.com/jcuda/jcusolver/blob/2600c7eca36a92a60ebcc78cae6e028e0c1d00b9/JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java#L1410-L1420
OpenTSDB/opentsdb
src/meta/TSUIDQuery.java
TSUIDQuery.getLastPoint
public static Deferred<IncomingDataPoint> getLastPoint(final TSDB tsdb, final byte[] tsuid, final boolean resolve_names, final int max_lookups, final long last_timestamp) { """ Attempts to retrieve the last data point for the given TSUID. This operates by checking the meta table for the {@code COUNT...
java
public static Deferred<IncomingDataPoint> getLastPoint(final TSDB tsdb, final byte[] tsuid, final boolean resolve_names, final int max_lookups, final long last_timestamp) { final TSUIDQuery query = new TSUIDQuery(tsdb, tsuid); query.last_timestamp = last_timestamp; return query.getLastPoint(re...
[ "public", "static", "Deferred", "<", "IncomingDataPoint", ">", "getLastPoint", "(", "final", "TSDB", "tsdb", ",", "final", "byte", "[", "]", "tsuid", ",", "final", "boolean", "resolve_names", ",", "final", "int", "max_lookups", ",", "final", "long", "last_time...
Attempts to retrieve the last data point for the given TSUID. This operates by checking the meta table for the {@code COUNTER_QUALIFIER} and if found, parses the HBase timestamp for the counter (i.e. the time when the counter was written) and tries to load the row in the data table for the hour where that timestamp wou...
[ "Attempts", "to", "retrieve", "the", "last", "data", "point", "for", "the", "given", "TSUID", ".", "This", "operates", "by", "checking", "the", "meta", "table", "for", "the", "{" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/meta/TSUIDQuery.java#L551-L557
box/box-java-sdk
src/main/java/com/box/sdk/BoxMetadataCascadePolicy.java
BoxMetadataCascadePolicy.getAll
public static Iterable<BoxMetadataCascadePolicy.Info> getAll(final BoxAPIConnection api, String folderID, String ... fields) { """ Retrieves list of Box Metadata Cascade Policies that belong to your Enterprise as an Iterable. @param api the A...
java
public static Iterable<BoxMetadataCascadePolicy.Info> getAll(final BoxAPIConnection api, String folderID, String ... fields) { return getAll(api, folderID, null, DEFAULT_LIMIT, fields); }
[ "public", "static", "Iterable", "<", "BoxMetadataCascadePolicy", ".", "Info", ">", "getAll", "(", "final", "BoxAPIConnection", "api", ",", "String", "folderID", ",", "String", "...", "fields", ")", "{", "return", "getAll", "(", "api", ",", "folderID", ",", "...
Retrieves list of Box Metadata Cascade Policies that belong to your Enterprise as an Iterable. @param api the API connection to be used by the resource. @param folderID the ID of the folder to retrieve cascade policies for. @param fields optional fields to retrieve for cascade policies. @return the Iterable of ...
[ "Retrieves", "list", "of", "Box", "Metadata", "Cascade", "Policies", "that", "belong", "to", "your", "Enterprise", "as", "an", "Iterable", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxMetadataCascadePolicy.java#L52-L55
petergeneric/stdlib
stdlib/src/main/java/com/peterphi/std/types/SampleCount.java
SampleCount.subtractPrecise
public SampleCount subtractPrecise(SampleCount that) throws ResamplingException { """ @param that the sample count to subtract @return @throws ResamplingException if the delta cannot be expressed without losing accuracy """ final long thatSamples = that.getSamplesPrecise(this.rate); if (thatSample...
java
public SampleCount subtractPrecise(SampleCount that) throws ResamplingException { final long thatSamples = that.getSamplesPrecise(this.rate); if (thatSamples != 0) { return new SampleCount(this.samples - thatSamples, this.rate); } else { return this; } }
[ "public", "SampleCount", "subtractPrecise", "(", "SampleCount", "that", ")", "throws", "ResamplingException", "{", "final", "long", "thatSamples", "=", "that", ".", "getSamplesPrecise", "(", "this", ".", "rate", ")", ";", "if", "(", "thatSamples", "!=", "0", "...
@param that the sample count to subtract @return @throws ResamplingException if the delta cannot be expressed without losing accuracy
[ "@param", "that", "the", "sample", "count", "to", "subtract" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/stdlib/src/main/java/com/peterphi/std/types/SampleCount.java#L87-L99
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbservice_binding.java
gslbservice_binding.get
public static gslbservice_binding get(nitro_service service, String servicename) throws Exception { """ Use this API to fetch gslbservice_binding resource of given name . """ gslbservice_binding obj = new gslbservice_binding(); obj.set_servicename(servicename); gslbservice_binding response = (gslbservice...
java
public static gslbservice_binding get(nitro_service service, String servicename) throws Exception{ gslbservice_binding obj = new gslbservice_binding(); obj.set_servicename(servicename); gslbservice_binding response = (gslbservice_binding) obj.get_resource(service); return response; }
[ "public", "static", "gslbservice_binding", "get", "(", "nitro_service", "service", ",", "String", "servicename", ")", "throws", "Exception", "{", "gslbservice_binding", "obj", "=", "new", "gslbservice_binding", "(", ")", ";", "obj", ".", "set_servicename", "(", "s...
Use this API to fetch gslbservice_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "gslbservice_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/gslb/gslbservice_binding.java#L114-L119
cloudant/java-cloudant
cloudant-client/src/main/java/com/cloudant/client/api/Database.java
Database.listIndices
@Deprecated public List<Index> listIndices() { """ List all indices <P>Example usage:</P> <pre> {@code List <Index> indices = db.listIndices(); } </pre> @return List of Index objects @see Database#listIndexes() """ InputStream response = null; try { URI uri = new Datab...
java
@Deprecated public List<Index> listIndices() { InputStream response = null; try { URI uri = new DatabaseURIHelper(db.getDBUri()).path("_index").build(); response = client.couchDbClient.get(uri); return getResponseList(response, client.getGson(), DeserializationTyp...
[ "@", "Deprecated", "public", "List", "<", "Index", ">", "listIndices", "(", ")", "{", "InputStream", "response", "=", "null", ";", "try", "{", "URI", "uri", "=", "new", "DatabaseURIHelper", "(", "db", ".", "getDBUri", "(", ")", ")", ".", "path", "(", ...
List all indices <P>Example usage:</P> <pre> {@code List <Index> indices = db.listIndices(); } </pre> @return List of Index objects @see Database#listIndexes()
[ "List", "all", "indices", "<P", ">", "Example", "usage", ":", "<", "/", "P", ">", "<pre", ">", "{", "@code", "List", "<Index", ">", "indices", "=", "db", ".", "listIndices", "()", ";", "}", "<", "/", "pre", ">" ]
train
https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/api/Database.java#L565-L575
OpenLiberty/open-liberty
dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/security/csiv2/CommonCfg.java
CommonCfg.printTrace
@Trivial public static void printTrace(String key, Object value, int tabLevel) { """ printTrace: This method print the messages to the trace file. @param key @param value @param tabLevel """ if (tc.isDebugEnabled()) { StringBuilder msg = new StringBuilder(); for (int co...
java
@Trivial public static void printTrace(String key, Object value, int tabLevel) { if (tc.isDebugEnabled()) { StringBuilder msg = new StringBuilder(); for (int count = 0; count < tabLevel; count++) { msg.append("\t"); } if (value != null) { ...
[ "@", "Trivial", "public", "static", "void", "printTrace", "(", "String", "key", ",", "Object", "value", ",", "int", "tabLevel", ")", "{", "if", "(", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "StringBuilder", "msg", "=", "new", "StringBuilder", "("...
printTrace: This method print the messages to the trace file. @param key @param value @param tabLevel
[ "printTrace", ":", "This", "method", "print", "the", "messages", "to", "the", "trace", "file", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/security/csiv2/CommonCfg.java#L269-L285
reapzor/FiloFirmata
src/main/java/com/bortbort/arduino/FiloFirmata/Firmata.java
Firmata.dispatchMessage
@SuppressWarnings("unchecked") private void dispatchMessage(ArrayListMultimap<Integer, MessageListener> listenerMap, Message message) { """ Dispatch a message to the corresponding listener arrays in the listener map @param listenerMap ArrayListMultimap of listener arrays to dispatch the message to @param mes...
java
@SuppressWarnings("unchecked") private void dispatchMessage(ArrayListMultimap<Integer, MessageListener> listenerMap, Message message) { List<MessageListener> messageListeners; // If the message is a Channel Message, hit the channel based listeners first. if (message instanceof ChannelMessag...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "dispatchMessage", "(", "ArrayListMultimap", "<", "Integer", ",", "MessageListener", ">", "listenerMap", ",", "Message", "message", ")", "{", "List", "<", "MessageListener", ">", "messageListener...
Dispatch a message to the corresponding listener arrays in the listener map @param listenerMap ArrayListMultimap of listener arrays to dispatch the message to @param message Message to be dispatched to the listeners
[ "Dispatch", "a", "message", "to", "the", "corresponding", "listener", "arrays", "in", "the", "listener", "map" ]
train
https://github.com/reapzor/FiloFirmata/blob/39c26c1a577b8fff8690245e105cb62e02284f16/src/main/java/com/bortbort/arduino/FiloFirmata/Firmata.java#L615-L637
optimatika/ojAlgo-finance
src/main/java/org/ojalgo/finance/portfolio/MarketEquilibrium.java
MarketEquilibrium.calibrate
public void calibrate(final PrimitiveMatrix assetWeights, final PrimitiveMatrix assetReturns) { """ Will set the risk aversion factor to the best fit for an observed pair of market portfolio asset weights and equilibrium/historical excess returns. """ final Scalar<?> tmpImpliedRiskAversion = this.cal...
java
public void calibrate(final PrimitiveMatrix assetWeights, final PrimitiveMatrix assetReturns) { final Scalar<?> tmpImpliedRiskAversion = this.calculateImpliedRiskAversion(assetWeights, assetReturns); this.setRiskAversion(tmpImpliedRiskAversion.get()); }
[ "public", "void", "calibrate", "(", "final", "PrimitiveMatrix", "assetWeights", ",", "final", "PrimitiveMatrix", "assetReturns", ")", "{", "final", "Scalar", "<", "?", ">", "tmpImpliedRiskAversion", "=", "this", ".", "calculateImpliedRiskAversion", "(", "assetWeights"...
Will set the risk aversion factor to the best fit for an observed pair of market portfolio asset weights and equilibrium/historical excess returns.
[ "Will", "set", "the", "risk", "aversion", "factor", "to", "the", "best", "fit", "for", "an", "observed", "pair", "of", "market", "portfolio", "asset", "weights", "and", "equilibrium", "/", "historical", "excess", "returns", "." ]
train
https://github.com/optimatika/ojAlgo-finance/blob/c8d3f7e1894d4263b7334bca3f4c060e466f8b15/src/main/java/org/ojalgo/finance/portfolio/MarketEquilibrium.java#L168-L173
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java
StringConverter.writeHexBytes
public static void writeHexBytes(byte[] o, int from, byte[] b) { """ Converts a byte array into hexadecimal characters which are written as ASCII to the given output stream. @param o output array @param from offset into output array @param b input array """ int len = b.length; for (int ...
java
public static void writeHexBytes(byte[] o, int from, byte[] b) { int len = b.length; for (int i = 0; i < len; i++) { int c = ((int) b[i]) & 0xff; o[from++] = HEXBYTES[c >> 4 & 0xf]; o[from++] = HEXBYTES[c & 0xf]; } }
[ "public", "static", "void", "writeHexBytes", "(", "byte", "[", "]", "o", ",", "int", "from", ",", "byte", "[", "]", "b", ")", "{", "int", "len", "=", "b", ".", "length", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "len", ";", "i", ...
Converts a byte array into hexadecimal characters which are written as ASCII to the given output stream. @param o output array @param from offset into output array @param b input array
[ "Converts", "a", "byte", "array", "into", "hexadecimal", "characters", "which", "are", "written", "as", "ASCII", "to", "the", "given", "output", "stream", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java#L321-L331
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuGLCtxCreate
@Deprecated public static int cuGLCtxCreate( CUcontext pCtx, int Flags, CUdevice device ) { """ Create a CUDA context for interoperability with OpenGL. <pre> CUresult cuGLCtxCreate ( CUcontext* pCtx, unsigned int Flags, CUdevice device ) </pre> <div> <p>Create a CUDA context for interoperability w...
java
@Deprecated public static int cuGLCtxCreate( CUcontext pCtx, int Flags, CUdevice device ) { return checkResult(cuGLCtxCreateNative(pCtx, Flags, device)); }
[ "@", "Deprecated", "public", "static", "int", "cuGLCtxCreate", "(", "CUcontext", "pCtx", ",", "int", "Flags", ",", "CUdevice", "device", ")", "{", "return", "checkResult", "(", "cuGLCtxCreateNative", "(", "pCtx", ",", "Flags", ",", "device", ")", ")", ";", ...
Create a CUDA context for interoperability with OpenGL. <pre> CUresult cuGLCtxCreate ( CUcontext* pCtx, unsigned int Flags, CUdevice device ) </pre> <div> <p>Create a CUDA context for interoperability with OpenGL. Deprecated<span>This function is deprecated as of Cuda 5.0.</span>This function is deprecated and should...
[ "Create", "a", "CUDA", "context", "for", "interoperability", "with", "OpenGL", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L15116-L15120
andygibson/datafactory
src/main/java/org/fluttercode/datafactory/impl/DataFactory.java
DataFactory.getItem
public <T> T getItem(final List<T> items, final int probability) { """ Returns a random item from a list of items or the null depending on the probability parameter. The probability determines the chance (in %) of returning an item off the list versus null. @param <T> Item type in the list and to return @para...
java
public <T> T getItem(final List<T> items, final int probability) { return getItem(items, probability, null); }
[ "public", "<", "T", ">", "T", "getItem", "(", "final", "List", "<", "T", ">", "items", ",", "final", "int", "probability", ")", "{", "return", "getItem", "(", "items", ",", "probability", ",", "null", ")", ";", "}" ]
Returns a random item from a list of items or the null depending on the probability parameter. The probability determines the chance (in %) of returning an item off the list versus null. @param <T> Item type in the list and to return @param items List of items to choose from @param probability chance (in %, 100 being ...
[ "Returns", "a", "random", "item", "from", "a", "list", "of", "items", "or", "the", "null", "depending", "on", "the", "probability", "parameter", ".", "The", "probability", "determines", "the", "chance", "(", "in", "%", ")", "of", "returning", "an", "item",...
train
https://github.com/andygibson/datafactory/blob/f748beb93844dea2ad6174715be3b70df0448a9c/src/main/java/org/fluttercode/datafactory/impl/DataFactory.java#L123-L125
js-lib-com/commons
src/main/java/js/util/Strings.java
Strings.injectVariables
public static String injectVariables(String template, Map<String, String> variables) { """ Inject string values into variables from a given template string. Template uses de facto standard variable notation, <code>${variable-name}</code>, where name is the key from given variables hash. It is legal for a variabl...
java
public static String injectVariables(String template, Map<String, String> variables) { VariablesWriter writer = new VariablesWriter(variables); try { Files.copy(new StringReader(template), writer); } catch(IOException e) { log.error(e); } return writer.toString(); }
[ "public", "static", "String", "injectVariables", "(", "String", "template", ",", "Map", "<", "String", ",", "String", ">", "variables", ")", "{", "VariablesWriter", "writer", "=", "new", "VariablesWriter", "(", "variables", ")", ";", "try", "{", "Files", "."...
Inject string values into variables from a given template string. Template uses de facto standard variable notation, <code>${variable-name}</code>, where name is the key from given variables hash. It is legal for a variable to be declared into template but be missing from variables hash, in which case variable from tem...
[ "Inject", "string", "values", "into", "variables", "from", "a", "given", "template", "string", ".", "Template", "uses", "de", "facto", "standard", "variable", "notation", "<code", ">", "$", "{", "variable", "-", "name", "}", "<", "/", "code", ">", "where",...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Strings.java#L1235-L1245
RestComm/Restcomm-Connect
restcomm/restcomm.telephony/src/main/java/org/restcomm/connect/telephony/ua/UserAgentManager.java
UserAgentManager.isWebRTC
private boolean isWebRTC(String transport, String userAgent) { """ Checks whether the client is WebRTC or not. <p> A client is considered WebRTC if one of the following statements is true:<br> 1. The chosen transport is WebSockets (transport=ws).<br> 2. The chosen transport is WebSockets Secured (transport=w...
java
private boolean isWebRTC(String transport, String userAgent) { return "ws".equalsIgnoreCase(transport) || "wss".equalsIgnoreCase(transport) || userAgent.toLowerCase().contains("restcomm"); }
[ "private", "boolean", "isWebRTC", "(", "String", "transport", ",", "String", "userAgent", ")", "{", "return", "\"ws\"", ".", "equalsIgnoreCase", "(", "transport", ")", "||", "\"wss\"", ".", "equalsIgnoreCase", "(", "transport", ")", "||", "userAgent", ".", "to...
Checks whether the client is WebRTC or not. <p> A client is considered WebRTC if one of the following statements is true:<br> 1. The chosen transport is WebSockets (transport=ws).<br> 2. The chosen transport is WebSockets Secured (transport=wss).<br> 3. The User-Agent corresponds to one of TeleStax mobile clients. </p...
[ "Checks", "whether", "the", "client", "is", "WebRTC", "or", "not", "." ]
train
https://github.com/RestComm/Restcomm-Connect/blob/2194dee4fc524cdfd0af77a218ba5f212f97f7c5/restcomm/restcomm.telephony/src/main/java/org/restcomm/connect/telephony/ua/UserAgentManager.java#L746-L748
alkacon/opencms-core
src-modules/org/opencms/workplace/comparison/CmsAttributeComparisonList.java
CmsAttributeComparisonList.readFile
protected static CmsFile readFile(CmsObject cms, CmsUUID structureId, String version) throws CmsException { """ Returns either the historical file or the offline file, depending on the version number.<p> @param cms the CmsObject to use @param structureId the structure id of the file @param version the histori...
java
protected static CmsFile readFile(CmsObject cms, CmsUUID structureId, String version) throws CmsException { if (Integer.parseInt(version) == CmsHistoryResourceHandler.PROJECT_OFFLINE_VERSION) { // offline CmsResource resource = cms.readResource(structureId, CmsResourceFilter.IGNORE_EXPI...
[ "protected", "static", "CmsFile", "readFile", "(", "CmsObject", "cms", ",", "CmsUUID", "structureId", ",", "String", "version", ")", "throws", "CmsException", "{", "if", "(", "Integer", ".", "parseInt", "(", "version", ")", "==", "CmsHistoryResourceHandler", "."...
Returns either the historical file or the offline file, depending on the version number.<p> @param cms the CmsObject to use @param structureId the structure id of the file @param version the historical version number @return either the historical file or the offline file, depending on the version number @throws CmsE...
[ "Returns", "either", "the", "historical", "file", "or", "the", "offline", "file", "depending", "on", "the", "version", "number", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/comparison/CmsAttributeComparisonList.java#L124-L146
osmdroid/osmdroid
OpenStreetMapViewer/src/main/java/org/osmdroid/samplefragments/data/IISTrackerBase.java
IISTrackerBase.getLocation
private GeoPoint getLocation() { """ HTTP callout to get a JSON document that represents the IIS's current location @return """ //sample data //{"timestamp": 1483742439, "iss_position": {"latitude": "-50.8416", "longitude": "-41.2701"}, "message": "success"} NetworkInfo activeNetwo...
java
private GeoPoint getLocation() { //sample data //{"timestamp": 1483742439, "iss_position": {"latitude": "-50.8416", "longitude": "-41.2701"}, "message": "success"} NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); boolean isConnected = activeNetwork != null && activeNetwork.isConn...
[ "private", "GeoPoint", "getLocation", "(", ")", "{", "//sample data", "//{\"timestamp\": 1483742439, \"iss_position\": {\"latitude\": \"-50.8416\", \"longitude\": \"-41.2701\"}, \"message\": \"success\"}", "NetworkInfo", "activeNetwork", "=", "cm", ".", "getActiveNetworkInfo", "(", ")"...
HTTP callout to get a JSON document that represents the IIS's current location @return
[ "HTTP", "callout", "to", "get", "a", "JSON", "document", "that", "represents", "the", "IIS", "s", "current", "location" ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/OpenStreetMapViewer/src/main/java/org/osmdroid/samplefragments/data/IISTrackerBase.java#L169-L194
udoprog/ffwd-client-java
src/main/java/com/google/protobuf250/CodedOutputStream.java
CodedOutputStream.writeEnum
public void writeEnum(final int fieldNumber, final int value) throws IOException { """ Write an enum field, including tag, to the stream. Caller is responsible for converting the enum value to its numeric value. """ writeTag(fieldNumber, WireFormat.WIRETYPE_VARINT); writeEnumN...
java
public void writeEnum(final int fieldNumber, final int value) throws IOException { writeTag(fieldNumber, WireFormat.WIRETYPE_VARINT); writeEnumNoTag(value); }
[ "public", "void", "writeEnum", "(", "final", "int", "fieldNumber", ",", "final", "int", "value", ")", "throws", "IOException", "{", "writeTag", "(", "fieldNumber", ",", "WireFormat", ".", "WIRETYPE_VARINT", ")", ";", "writeEnumNoTag", "(", "value", ")", ";", ...
Write an enum field, including tag, to the stream. Caller is responsible for converting the enum value to its numeric value.
[ "Write", "an", "enum", "field", "including", "tag", "to", "the", "stream", ".", "Caller", "is", "responsible", "for", "converting", "the", "enum", "value", "to", "its", "numeric", "value", "." ]
train
https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/CodedOutputStream.java#L243-L247
dihedron/dihedron-commons
src/main/java/org/dihedron/patterns/activities/TypedVector.java
TypedVector.addAll
@Override public boolean addAll(int index, Collection<? extends E> collection) { """ Inserts all of the elements in the specified Collection into this Vector at the specified position. @param index the index can be a positive number, or a negative number that is smaller than the size of the vector; see {@li...
java
@Override public boolean addAll(int index, Collection<? extends E> collection) { int idx = getRealIndex(index); return super.addAll(idx, collection); }
[ "@", "Override", "public", "boolean", "addAll", "(", "int", "index", ",", "Collection", "<", "?", "extends", "E", ">", "collection", ")", "{", "int", "idx", "=", "getRealIndex", "(", "index", ")", ";", "return", "super", ".", "addAll", "(", "idx", ",",...
Inserts all of the elements in the specified Collection into this Vector at the specified position. @param index the index can be a positive number, or a negative number that is smaller than the size of the vector; see {@link #getRealIndex(int)}. @return {@code true} if this vector changed as a result of the call. @se...
[ "Inserts", "all", "of", "the", "elements", "in", "the", "specified", "Collection", "into", "this", "Vector", "at", "the", "specified", "position", "." ]
train
https://github.com/dihedron/dihedron-commons/blob/a5194cdaa0d6417ef4aade6ea407a1cad6e8458e/src/main/java/org/dihedron/patterns/activities/TypedVector.java#L99-L103
Alluxio/alluxio
core/server/proxy/src/main/java/alluxio/proxy/s3/S3RestUtils.java
S3RestUtils.createResponse
private static Response createResponse(Object object) { """ Creates a response using the given object. @param object the object to respond with @return the response """ if (object == null) { return Response.ok().build(); } if (object instanceof Response) { return (Response) object;...
java
private static Response createResponse(Object object) { if (object == null) { return Response.ok().build(); } if (object instanceof Response) { return (Response) object; } if (object instanceof Response.Status) { Response.Status s = (Response.Status) object; switch (s) { ...
[ "private", "static", "Response", "createResponse", "(", "Object", "object", ")", "{", "if", "(", "object", "==", "null", ")", "{", "return", "Response", ".", "ok", "(", ")", ".", "build", "(", ")", ";", "}", "if", "(", "object", "instanceof", "Response...
Creates a response using the given object. @param object the object to respond with @return the response
[ "Creates", "a", "response", "using", "the", "given", "object", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/proxy/src/main/java/alluxio/proxy/s3/S3RestUtils.java#L87-L119
finmath/finmath-lib
src/main/java6/net/finmath/functions/AnalyticFormulas.java
AnalyticFormulas.sabrNormalVolatilitySkewApproximation
public static double sabrNormalVolatilitySkewApproximation(double alpha, double beta, double rho, double nu, double displacement, double underlying, double maturity) { """ Return the skew of the implied normal volatility (Bachelier volatility) under a SABR model using the approximation of Berestycki. The skew is ...
java
public static double sabrNormalVolatilitySkewApproximation(double alpha, double beta, double rho, double nu, double displacement, double underlying, double maturity) { double sigma = sabrBerestyckiNormalVolatilityApproximation(alpha, beta, rho, nu, displacement, underlying, underlying, maturity); // Apply displac...
[ "public", "static", "double", "sabrNormalVolatilitySkewApproximation", "(", "double", "alpha", ",", "double", "beta", ",", "double", "rho", ",", "double", "nu", ",", "double", "displacement", ",", "double", "underlying", ",", "double", "maturity", ")", "{", "dou...
Return the skew of the implied normal volatility (Bachelier volatility) under a SABR model using the approximation of Berestycki. The skew is the first derivative of the implied vol w.r.t. the strike, evaluated at the money. @param alpha initial value of the stochastic volatility process of the SABR model. @param beta...
[ "Return", "the", "skew", "of", "the", "implied", "normal", "volatility", "(", "Bachelier", "volatility", ")", "under", "a", "SABR", "model", "using", "the", "approximation", "of", "Berestycki", ".", "The", "skew", "is", "the", "first", "derivative", "of", "t...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/functions/AnalyticFormulas.java#L1216-L1240
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/string/Strs.java
Strs.isBlank
public static boolean isBlank(String target, String... specialValueAsEmpty) { """ Checks if a String is whitespace, multi whitespace, empty ("") or null or special value. @param target @param specialValueAsEmpty @return """ if (Strings.isNullOrEmpty(target)) { return true; } return isEmpty(WHI...
java
public static boolean isBlank(String target, String... specialValueAsEmpty) { if (Strings.isNullOrEmpty(target)) { return true; } return isEmpty(WHITESPACE.removeFrom(target), specialValueAsEmpty); }
[ "public", "static", "boolean", "isBlank", "(", "String", "target", ",", "String", "...", "specialValueAsEmpty", ")", "{", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "target", ")", ")", "{", "return", "true", ";", "}", "return", "isEmpty", "(", "WHITE...
Checks if a String is whitespace, multi whitespace, empty ("") or null or special value. @param target @param specialValueAsEmpty @return
[ "Checks", "if", "a", "String", "is", "whitespace", "multi", "whitespace", "empty", "(", ")", "or", "null", "or", "special", "value", "." ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/string/Strs.java#L196-L202
kirgor/enklib
sql/src/main/java/com/kirgor/enklib/sql/Session.java
Session.createPreparedStatement
private PreparedStatement createPreparedStatement(String query, int fetchSize, Object... params) throws SQLException { """ Creates {@link PreparedStatement} instance from supplied query string and parameters. """ PreparedStatement stat = connection.prepareStatement(query); stat.setFetchSize(fet...
java
private PreparedStatement createPreparedStatement(String query, int fetchSize, Object... params) throws SQLException { PreparedStatement stat = connection.prepareStatement(query); stat.setFetchSize(fetchSize); for (int i = 0; i < params.length; i++) { stat.setObject(i + 1, params[i])...
[ "private", "PreparedStatement", "createPreparedStatement", "(", "String", "query", ",", "int", "fetchSize", ",", "Object", "...", "params", ")", "throws", "SQLException", "{", "PreparedStatement", "stat", "=", "connection", ".", "prepareStatement", "(", "query", ")"...
Creates {@link PreparedStatement} instance from supplied query string and parameters.
[ "Creates", "{" ]
train
https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/sql/src/main/java/com/kirgor/enklib/sql/Session.java#L222-L229
liferay/com-liferay-commerce
commerce-product-type-virtual-api/src/main/java/com/liferay/commerce/product/type/virtual/model/CPDefinitionVirtualSettingWrapper.java
CPDefinitionVirtualSettingWrapper.getTermsOfUseContent
@Override public String getTermsOfUseContent(String languageId, boolean useDefault) { """ Returns the localized terms of use content of this cp definition virtual setting in the language, optionally using the default language if no localization exists for the requested language. @param languageId the ID of the...
java
@Override public String getTermsOfUseContent(String languageId, boolean useDefault) { return _cpDefinitionVirtualSetting.getTermsOfUseContent(languageId, useDefault); }
[ "@", "Override", "public", "String", "getTermsOfUseContent", "(", "String", "languageId", ",", "boolean", "useDefault", ")", "{", "return", "_cpDefinitionVirtualSetting", ".", "getTermsOfUseContent", "(", "languageId", ",", "useDefault", ")", ";", "}" ]
Returns the localized terms of use content of this cp definition virtual setting in the language, optionally using the default language if no localization exists for the requested language. @param languageId the ID of the language @param useDefault whether to use the default language if no localization exists for the ...
[ "Returns", "the", "localized", "terms", "of", "use", "content", "of", "this", "cp", "definition", "virtual", "setting", "in", "the", "language", "optionally", "using", "the", "default", "language", "if", "no", "localization", "exists", "for", "the", "requested",...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-type-virtual-api/src/main/java/com/liferay/commerce/product/type/virtual/model/CPDefinitionVirtualSettingWrapper.java#L503-L507