repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
201
func_name
stringlengths
4
126
whole_func_string
stringlengths
75
3.57k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.57k
func_code_tokens
listlengths
21
599
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
478
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
mikepenz/MaterialDrawer
library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java
DrawerBuilder.buildView
public Drawer buildView() { // get the slider view mSliderLayout = (ScrimInsetsRelativeLayout) mActivity.getLayoutInflater().inflate(R.layout.material_drawer_slider, mDrawerLayout, false); mSliderLayout.setBackgroundColor(UIUtils.getThemeColorFromAttrOrRes(mActivity, R.attr.material_drawer_backg...
java
public Drawer buildView() { // get the slider view mSliderLayout = (ScrimInsetsRelativeLayout) mActivity.getLayoutInflater().inflate(R.layout.material_drawer_slider, mDrawerLayout, false); mSliderLayout.setBackgroundColor(UIUtils.getThemeColorFromAttrOrRes(mActivity, R.attr.material_drawer_backg...
[ "public", "Drawer", "buildView", "(", ")", "{", "// get the slider view", "mSliderLayout", "=", "(", "ScrimInsetsRelativeLayout", ")", "mActivity", ".", "getLayoutInflater", "(", ")", ".", "inflate", "(", "R", ".", "layout", ".", "material_drawer_slider", ",", "mD...
build the drawers content only. This will still return a Result object, but only with the content set. No inflating of a DrawerLayout. @return Result object with only the content set
[ "build", "the", "drawers", "content", "only", ".", "This", "will", "still", "return", "a", "Result", "object", "but", "only", "with", "the", "content", "set", ".", "No", "inflating", "of", "a", "DrawerLayout", "." ]
train
https://github.com/mikepenz/MaterialDrawer/blob/f4fb31635767edead0a01cee7b7588942b89d8d9/library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java#L1537-L1580
alkacon/opencms-core
src/org/opencms/xml/containerpage/CmsXmlContainerPage.java
CmsXmlContainerPage.saveContainerPage
protected void saveContainerPage(CmsObject cms, Element parent, CmsContainerPageBean cntPage) throws CmsException { parent.clearContent(); // save containers in a defined order List<String> containerNames = new ArrayList<String>(cntPage.getNames()); Collections.sort(containerNames); ...
java
protected void saveContainerPage(CmsObject cms, Element parent, CmsContainerPageBean cntPage) throws CmsException { parent.clearContent(); // save containers in a defined order List<String> containerNames = new ArrayList<String>(cntPage.getNames()); Collections.sort(containerNames); ...
[ "protected", "void", "saveContainerPage", "(", "CmsObject", "cms", ",", "Element", "parent", ",", "CmsContainerPageBean", "cntPage", ")", "throws", "CmsException", "{", "parent", ".", "clearContent", "(", ")", ";", "// save containers in a defined order", "List", "<",...
Adds the given container page to the given element.<p> @param cms the current CMS object @param parent the element to add it @param cntPage the container page to add @throws CmsException if something goes wrong
[ "Adds", "the", "given", "container", "page", "to", "the", "given", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsXmlContainerPage.java#L641-L685
spotify/async-google-pubsub-client
src/main/java/com/spotify/google/cloud/pubsub/client/Pubsub.java
Pubsub.createTopic
private PubsubFuture<Topic> createTopic(final String canonicalTopic) { validateCanonicalTopic(canonicalTopic); return put("create topic", canonicalTopic, NO_PAYLOAD, readJson(Topic.class)); }
java
private PubsubFuture<Topic> createTopic(final String canonicalTopic) { validateCanonicalTopic(canonicalTopic); return put("create topic", canonicalTopic, NO_PAYLOAD, readJson(Topic.class)); }
[ "private", "PubsubFuture", "<", "Topic", ">", "createTopic", "(", "final", "String", "canonicalTopic", ")", "{", "validateCanonicalTopic", "(", "canonicalTopic", ")", ";", "return", "put", "(", "\"create topic\"", ",", "canonicalTopic", ",", "NO_PAYLOAD", ",", "re...
Create a Pub/Sub topic. @param canonicalTopic The canonical (including project) name of the topic to create. @return A future that is completed when this request is completed.
[ "Create", "a", "Pub", "/", "Sub", "topic", "." ]
train
https://github.com/spotify/async-google-pubsub-client/blob/7d021528fa5bc29be458e6f210fa62f59b71d004/src/main/java/com/spotify/google/cloud/pubsub/client/Pubsub.java#L293-L296
jboss/jboss-jacc-api_spec
src/main/java/javax/security/jacc/PolicyContext.java
PolicyContext.registerHandler
public static void registerHandler(String key, PolicyContextHandler handler, boolean replace) throws PolicyContextException { if (key == null) throw new IllegalArgumentException("The key may not be null"); if (handler == null) throw new IllegalArgumentException("The handler may...
java
public static void registerHandler(String key, PolicyContextHandler handler, boolean replace) throws PolicyContextException { if (key == null) throw new IllegalArgumentException("The key may not be null"); if (handler == null) throw new IllegalArgumentException("The handler may...
[ "public", "static", "void", "registerHandler", "(", "String", "key", ",", "PolicyContextHandler", "handler", ",", "boolean", "replace", ")", "throws", "PolicyContextException", "{", "if", "(", "key", "==", "null", ")", "throw", "new", "IllegalArgumentException", "...
<p> Authorization protected method used to register a container specific {@code PolicyContext} handler. A handler may be registered to handle multiple keys, but at any time, at most one handler may be registered for a key. </p> @param key - a (case-sensitive) {@code String} that identifies the context object handled b...
[ "<p", ">", "Authorization", "protected", "method", "used", "to", "register", "a", "container", "specific", "{", "@code", "PolicyContext", "}", "handler", ".", "A", "handler", "may", "be", "registered", "to", "handle", "multiple", "keys", "but", "at", "any", ...
train
https://github.com/jboss/jboss-jacc-api_spec/blob/cc97802b6d368cd98a1d30f075689a7fef225582/src/main/java/javax/security/jacc/PolicyContext.java#L172-L188
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/daemon/nimbus/StatusTransition.java
StatusTransition.transitionLock
public <T> void transitionLock(String topologyId, boolean errorOnNoTransition, StatusType changeStatus, T... args) throws Exception { // get ZK's topology node's data, which is StormBase StormBase stormbase = data.getStormClusterState().storm_base(topologyId, null); if (stormbase == ...
java
public <T> void transitionLock(String topologyId, boolean errorOnNoTransition, StatusType changeStatus, T... args) throws Exception { // get ZK's topology node's data, which is StormBase StormBase stormbase = data.getStormClusterState().storm_base(topologyId, null); if (stormbase == ...
[ "public", "<", "T", ">", "void", "transitionLock", "(", "String", "topologyId", ",", "boolean", "errorOnNoTransition", ",", "StatusType", "changeStatus", ",", "T", "...", "args", ")", "throws", "Exception", "{", "// get ZK's topology node's data, which is StormBase", ...
Changing status @param args -- will be used in the status changing callback
[ "Changing", "status" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/nimbus/StatusTransition.java#L72-L117
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.processTusFile
protected void processTusFile(File file, String fieldName, String assemblyUrl) throws IOException { TusUpload upload = getTusUploadInstance(file); Map<String, String> metadata = new HashMap<String, String>(); metadata.put("filename", file.getName()); metadata.put("assembly_url", assembl...
java
protected void processTusFile(File file, String fieldName, String assemblyUrl) throws IOException { TusUpload upload = getTusUploadInstance(file); Map<String, String> metadata = new HashMap<String, String>(); metadata.put("filename", file.getName()); metadata.put("assembly_url", assembl...
[ "protected", "void", "processTusFile", "(", "File", "file", ",", "String", "fieldName", ",", "String", "assemblyUrl", ")", "throws", "IOException", "{", "TusUpload", "upload", "=", "getTusUploadInstance", "(", "file", ")", ";", "Map", "<", "String", ",", "Stri...
Prepares a file for tus upload. @param file {@link File} @param fieldName the form field name assigned to the file. @param assemblyUrl the assembly url affiliated with the tus upload. @throws IOException when there's a failure with file retrieval.
[ "Prepares", "a", "file", "for", "tus", "upload", "." ]
train
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L251-L262
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneMenuButtonPainter.java
TitlePaneMenuButtonPainter.paintEnabled
private void paintEnabled(Graphics2D g, JComponent c, int width, int height) { paintMenu(g, c, width, height, enabled); }
java
private void paintEnabled(Graphics2D g, JComponent c, int width, int height) { paintMenu(g, c, width, height, enabled); }
[ "private", "void", "paintEnabled", "(", "Graphics2D", "g", ",", "JComponent", "c", ",", "int", "width", ",", "int", "height", ")", "{", "paintMenu", "(", "g", ",", "c", ",", "width", ",", "height", ",", "enabled", ")", ";", "}" ]
Paint the background enabled state. @param g the Graphics2D context to paint with. @param c the component. @param width the width of the component. @param height the height of the component.
[ "Paint", "the", "background", "enabled", "state", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneMenuButtonPainter.java#L110-L112
killme2008/Metamorphosis
metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/ResourceUtils.java
ResourceUtils.getResourceAsFile
public static File getResourceAsFile(ClassLoader loader, String resource) throws IOException { return new File(getResourceURL(loader, resource).getFile()); }
java
public static File getResourceAsFile(ClassLoader loader, String resource) throws IOException { return new File(getResourceURL(loader, resource).getFile()); }
[ "public", "static", "File", "getResourceAsFile", "(", "ClassLoader", "loader", ",", "String", "resource", ")", "throws", "IOException", "{", "return", "new", "File", "(", "getResourceURL", "(", "loader", ",", "resource", ")", ".", "getFile", "(", ")", ")", "...
Returns a resource on the classpath as a File object @param loader The classloader used to load the resource @param resource The resource to find @throws IOException If the resource cannot be found or read @return The resource
[ "Returns", "a", "resource", "on", "the", "classpath", "as", "a", "File", "object" ]
train
https://github.com/killme2008/Metamorphosis/blob/1884b10620dbd640aaf85102243ca295703fbb4a/metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/ResourceUtils.java#L245-L247
UrielCh/ovh-java-sdk
ovh-java-sdk-emailmxplan/src/main/java/net/minidev/ovh/api/ApiOvhEmailmxplan.java
ApiOvhEmailmxplan.service_externalContact_externalEmailAddress_DELETE
public OvhTask service_externalContact_externalEmailAddress_DELETE(String service, String externalEmailAddress) throws IOException { String qPath = "/email/mxplan/{service}/externalContact/{externalEmailAddress}"; StringBuilder sb = path(qPath, service, externalEmailAddress); String resp = exec(qPath, "DELETE", s...
java
public OvhTask service_externalContact_externalEmailAddress_DELETE(String service, String externalEmailAddress) throws IOException { String qPath = "/email/mxplan/{service}/externalContact/{externalEmailAddress}"; StringBuilder sb = path(qPath, service, externalEmailAddress); String resp = exec(qPath, "DELETE", s...
[ "public", "OvhTask", "service_externalContact_externalEmailAddress_DELETE", "(", "String", "service", ",", "String", "externalEmailAddress", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/mxplan/{service}/externalContact/{externalEmailAddress}\"", ";", "Stri...
delete external contact REST: DELETE /email/mxplan/{service}/externalContact/{externalEmailAddress} @param service [required] The internal name of your mxplan organization @param externalEmailAddress [required] Contact email API beta
[ "delete", "external", "contact" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailmxplan/src/main/java/net/minidev/ovh/api/ApiOvhEmailmxplan.java#L550-L555
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getGeneralGuildInfo
public void getGeneralGuildInfo(String id, Callback<Guild> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.GUILD, id)); gw2API.getGeneralGuildInfo(id).enqueue(callback); }
java
public void getGeneralGuildInfo(String id, Callback<Guild> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.GUILD, id)); gw2API.getGeneralGuildInfo(id).enqueue(callback); }
[ "public", "void", "getGeneralGuildInfo", "(", "String", "id", ",", "Callback", "<", "Guild", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(", "ParamType", ".", "GUILD", ",", ...
For more info on guild upgrades API go <a href="https://wiki.guildwars2.com/wiki/API:2/guild/upgrades">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param id guild id @param callback callback that...
[ "For", "more", "info", "on", "guild", "upgrades", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "guild", "/", "upgrades", ">", "here<", "/", "a", ">", "<br", "/"...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L1435-L1438
apache/incubator-heron
heron/api/src/java/org/apache/heron/api/HeronSubmitter.java
HeronSubmitter.submitTopology
public static void submitTopology(String name, Config heronConfig, HeronTopology topology) throws AlreadyAliveException, InvalidTopologyException { Map<String, String> heronCmdOptions = getHeronCmdOptions(); // We would read the topology initial state from arguments from heron-cli TopologyAPI.Topolo...
java
public static void submitTopology(String name, Config heronConfig, HeronTopology topology) throws AlreadyAliveException, InvalidTopologyException { Map<String, String> heronCmdOptions = getHeronCmdOptions(); // We would read the topology initial state from arguments from heron-cli TopologyAPI.Topolo...
[ "public", "static", "void", "submitTopology", "(", "String", "name", ",", "Config", "heronConfig", ",", "HeronTopology", "topology", ")", "throws", "AlreadyAliveException", ",", "InvalidTopologyException", "{", "Map", "<", "String", ",", "String", ">", "heronCmdOpti...
Submits a topology to run on the cluster. A topology runs forever or until explicitly killed. @param name the name of the topology. @param heronConfig the topology-specific configuration. See {@link Config}. @param topology the processing to execute. @throws AlreadyAliveException if a topology with this name is alread...
[ "Submits", "a", "topology", "to", "run", "on", "the", "cluster", ".", "A", "topology", "runs", "forever", "or", "until", "explicitly", "killed", "." ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/api/src/java/org/apache/heron/api/HeronSubmitter.java#L66-L102
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/stream/ByteBufferOutputStream.java
ByteBufferOutputStream.writeTo
public void writeTo (@Nonnull final ByteBuffer aDestBuffer, final boolean bCompactBuffer) { ValueEnforcer.notNull (aDestBuffer, "DestBuffer"); m_aBuffer.flip (); aDestBuffer.put (m_aBuffer); if (bCompactBuffer) m_aBuffer.compact (); }
java
public void writeTo (@Nonnull final ByteBuffer aDestBuffer, final boolean bCompactBuffer) { ValueEnforcer.notNull (aDestBuffer, "DestBuffer"); m_aBuffer.flip (); aDestBuffer.put (m_aBuffer); if (bCompactBuffer) m_aBuffer.compact (); }
[ "public", "void", "writeTo", "(", "@", "Nonnull", "final", "ByteBuffer", "aDestBuffer", ",", "final", "boolean", "bCompactBuffer", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aDestBuffer", ",", "\"DestBuffer\"", ")", ";", "m_aBuffer", ".", "flip", "(", ")...
Write everything currently contained to the specified buffer. If the passed buffer is too small, a {@link java.nio.BufferOverflowException} is thrown. The copied elements are removed from this streams buffer. @param aDestBuffer The destination buffer to write to. May not be <code>null</code>. @param bCompactBuffer <co...
[ "Write", "everything", "currently", "contained", "to", "the", "specified", "buffer", ".", "If", "the", "passed", "buffer", "is", "too", "small", "a", "{", "@link", "java", ".", "nio", ".", "BufferOverflowException", "}", "is", "thrown", ".", "The", "copied",...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/stream/ByteBufferOutputStream.java#L229-L237
icoloma/simpleds
src/main/java/org/simpleds/CursorList.java
CursorList.loadRelatedEntities
public Map<Key, Object> loadRelatedEntities(String... propertyName) { EntityManager entityManager = EntityManagerFactory.getEntityManager(); Class<J> persistentClass = (Class<J>) query.getClassMetadata().getPersistentClass(); Set<Key> keys = Sets.newHashSet(); for (String p : propertyName) { keys.addAll(Coll...
java
public Map<Key, Object> loadRelatedEntities(String... propertyName) { EntityManager entityManager = EntityManagerFactory.getEntityManager(); Class<J> persistentClass = (Class<J>) query.getClassMetadata().getPersistentClass(); Set<Key> keys = Sets.newHashSet(); for (String p : propertyName) { keys.addAll(Coll...
[ "public", "Map", "<", "Key", ",", "Object", ">", "loadRelatedEntities", "(", "String", "...", "propertyName", ")", "{", "EntityManager", "entityManager", "=", "EntityManagerFactory", ".", "getEntityManager", "(", ")", ";", "Class", "<", "J", ">", "persistentClas...
Load the list of related entities. @param propertyName the name of the properties to be used as Key @return the list of retrieved entities
[ "Load", "the", "list", "of", "related", "entities", "." ]
train
https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/CursorList.java#L51-L59
wso2/transport-http
components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/listener/http2/Http2SourceHandler.java
Http2SourceHandler.userEventTriggered
@Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt) { if (evt instanceof HttpServerUpgradeHandler.UpgradeEvent) { FullHttpRequest upgradedRequest = ((HttpServerUpgradeHandler.UpgradeEvent) evt).upgradeRequest(); // Construct new HTTP Request H...
java
@Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt) { if (evt instanceof HttpServerUpgradeHandler.UpgradeEvent) { FullHttpRequest upgradedRequest = ((HttpServerUpgradeHandler.UpgradeEvent) evt).upgradeRequest(); // Construct new HTTP Request H...
[ "@", "Override", "public", "void", "userEventTriggered", "(", "ChannelHandlerContext", "ctx", ",", "Object", "evt", ")", "{", "if", "(", "evt", "instanceof", "HttpServerUpgradeHandler", ".", "UpgradeEvent", ")", "{", "FullHttpRequest", "upgradedRequest", "=", "(", ...
Handles the cleartext HTTP upgrade event. <p> If an upgrade occurred, message needs to be dispatched to the correct service/resource and response should be delivered over stream 1 (the stream specifically reserved for cleartext HTTP upgrade).
[ "Handles", "the", "cleartext", "HTTP", "upgrade", "event", ".", "<p", ">", "If", "an", "upgrade", "occurred", "message", "needs", "to", "be", "dispatched", "to", "the", "correct", "service", "/", "resource", "and", "response", "should", "be", "delivered", "o...
train
https://github.com/wso2/transport-http/blob/c51aa715b473db6c1b82a7d7b22f6e65f74df4c9/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/listener/http2/Http2SourceHandler.java#L107-L121
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_ns_savedconfig.java
ns_ns_savedconfig.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { ns_ns_savedconfig_responses result = (ns_ns_savedconfig_responses) service.get_payload_formatter().string_to_resource(ns_ns_savedconfig_responses.class, response); if(result.errorcode != 0) { if (...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { ns_ns_savedconfig_responses result = (ns_ns_savedconfig_responses) service.get_payload_formatter().string_to_resource(ns_ns_savedconfig_responses.class, response); if(result.errorcode != 0) { if (...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "ns_ns_savedconfig_responses", "result", "=", "(", "ns_ns_savedconfig_responses", ")", "service", ".", "get_pa...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/ns/ns_ns_savedconfig.java#L203-L220
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.createOrUpdateCertificate
public AppServiceCertificateResourceInner createOrUpdateCertificate(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateResourceInner keyVaultCertificate) { return createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertif...
java
public AppServiceCertificateResourceInner createOrUpdateCertificate(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateResourceInner keyVaultCertificate) { return createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertif...
[ "public", "AppServiceCertificateResourceInner", "createOrUpdateCertificate", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ",", "String", "name", ",", "AppServiceCertificateResourceInner", "keyVaultCertificate", ")", "{", "return", "createOrUpdateCert...
Creates or updates a certificate and associates with key vault secret. Creates or updates a certificate and associates with key vault secret. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @param name Name of the certificate...
[ "Creates", "or", "updates", "a", "certificate", "and", "associates", "with", "key", "vault", "secret", ".", "Creates", "or", "updates", "a", "certificate", "and", "associates", "with", "key", "vault", "secret", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L1189-L1191
iobeam/iobeam-client-java
src/main/java/com/iobeam/api/resource/Import.java
Import.addDataPointSet
public void addDataPointSet(String series, Set<DataPoint> dataPoints) { DataSet set = store.get(series); if (set == null) { set = new DataSet(dataPoints); store.put(series, set); } else { set.addAll(dataPoints); } }
java
public void addDataPointSet(String series, Set<DataPoint> dataPoints) { DataSet set = store.get(series); if (set == null) { set = new DataSet(dataPoints); store.put(series, set); } else { set.addAll(dataPoints); } }
[ "public", "void", "addDataPointSet", "(", "String", "series", ",", "Set", "<", "DataPoint", ">", "dataPoints", ")", "{", "DataSet", "set", "=", "store", ".", "get", "(", "series", ")", ";", "if", "(", "set", "==", "null", ")", "{", "set", "=", "new",...
Adds a set of `DataPoint`s to a series. @param series The series the DataPoints should be added to. If the series doesn't exist, it will be created. @param dataPoints Data to be added.
[ "Adds", "a", "set", "of", "DataPoint", "s", "to", "a", "series", "." ]
train
https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/resource/Import.java#L135-L143
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WCheckBoxSelectRenderer.java
WCheckBoxSelectRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WCheckBoxSelect select = (WCheckBoxSelect) component; XmlStringBuilder xml = renderContext.getWriter(); int cols = select.getButtonColumns(); boolean readOnly = select.isReadOnly(); xml.appendTagOpen("ui:ch...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WCheckBoxSelect select = (WCheckBoxSelect) component; XmlStringBuilder xml = renderContext.getWriter(); int cols = select.getButtonColumns(); boolean readOnly = select.isReadOnly(); xml.appendTagOpen("ui:ch...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WCheckBoxSelect", "select", "=", "(", "WCheckBoxSelect", ")", "component", ";", "XmlStringBuilder", "xml", "=", ...
Paints the given WCheckBoxSelect. @param component the WCheckBoxSelect to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WCheckBoxSelect", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WCheckBoxSelectRenderer.java#L26-L92
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfReaderInstance.java
PdfReaderInstance.getFormXObject
PdfStream getFormXObject(int pageNumber, int compressionLevel) throws IOException { PdfDictionary page = reader.getPageNRelease(pageNumber); PdfObject contents = PdfReader.getPdfObjectRelease(page.get(PdfName.CONTENTS)); PdfDictionary dic = new PdfDictionary(); byte bout[] = null; ...
java
PdfStream getFormXObject(int pageNumber, int compressionLevel) throws IOException { PdfDictionary page = reader.getPageNRelease(pageNumber); PdfObject contents = PdfReader.getPdfObjectRelease(page.get(PdfName.CONTENTS)); PdfDictionary dic = new PdfDictionary(); byte bout[] = null; ...
[ "PdfStream", "getFormXObject", "(", "int", "pageNumber", ",", "int", "compressionLevel", ")", "throws", "IOException", "{", "PdfDictionary", "page", "=", "reader", ".", "getPageNRelease", "(", "pageNumber", ")", ";", "PdfObject", "contents", "=", "PdfReader", ".",...
Gets the content stream of a page as a PdfStream object. @param pageNumber the page of which you want the stream @param compressionLevel the compression level you want to apply to the stream @return a PdfStream object @since 2.1.3 (the method already existed without param compressionLevel)
[ "Gets", "the", "content", "stream", "of", "a", "page", "as", "a", "PdfStream", "object", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfReaderInstance.java#L120-L153
alkacon/opencms-core
src/org/opencms/util/CmsXsltUtil.java
CmsXsltUtil.transformXmlContent
public static String transformXmlContent(CmsObject cms, String xsltFile, String xmlContent) throws CmsException, CmsXmlException { // JAXP reads data Source xmlSource = new StreamSource(new StringReader(xmlContent)); String xsltString = new String(cms.readFile(xsltFile).getContents()); ...
java
public static String transformXmlContent(CmsObject cms, String xsltFile, String xmlContent) throws CmsException, CmsXmlException { // JAXP reads data Source xmlSource = new StreamSource(new StringReader(xmlContent)); String xsltString = new String(cms.readFile(xsltFile).getContents()); ...
[ "public", "static", "String", "transformXmlContent", "(", "CmsObject", "cms", ",", "String", "xsltFile", ",", "String", "xmlContent", ")", "throws", "CmsException", ",", "CmsXmlException", "{", "// JAXP reads data", "Source", "xmlSource", "=", "new", "StreamSource", ...
Applies a XSLT Transformation to the content.<p> The method does not use DOM4J, because iso-8859-1 code ist not transformed correctly. @param cms the cms object @param xsltFile the XSLT transformation file @param xmlContent the XML content to transform @return the transformed xml @throws CmsXmlException if somethin...
[ "Applies", "a", "XSLT", "Transformation", "to", "the", "content", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsXsltUtil.java#L145-L171
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
CommitLogSegment.markClean
public synchronized void markClean(UUID cfId, ReplayPosition context) { if (!cfDirty.containsKey(cfId)) return; if (context.segment == id) markClean(cfId, context.position); else if (context.segment > id) markClean(cfId, Integer.MAX_VALUE); }
java
public synchronized void markClean(UUID cfId, ReplayPosition context) { if (!cfDirty.containsKey(cfId)) return; if (context.segment == id) markClean(cfId, context.position); else if (context.segment > id) markClean(cfId, Integer.MAX_VALUE); }
[ "public", "synchronized", "void", "markClean", "(", "UUID", "cfId", ",", "ReplayPosition", "context", ")", "{", "if", "(", "!", "cfDirty", ".", "containsKey", "(", "cfId", ")", ")", "return", ";", "if", "(", "context", ".", "segment", "==", "id", ")", ...
Marks the ColumnFamily specified by cfId as clean for this log segment. If the given context argument is contained in this file, it will only mark the CF as clean if no newer writes have taken place. @param cfId the column family ID that is now clean @param context the optional clean offset
[ "Marks", "the", "ColumnFamily", "specified", "by", "cfId", "as", "clean", "for", "this", "log", "segment", ".", "If", "the", "given", "context", "argument", "is", "contained", "in", "this", "file", "it", "will", "only", "mark", "the", "CF", "as", "clean", ...
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java#L455-L463
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/termofuse/TermOfUsePanel.java
TermOfUsePanel.newCopyrightPanel
protected Component newCopyrightPanel(final String id, final IModel<HeaderContentListModelBean> model) { return new CopyrightPanel(id, Model.of(model.getObject())); }
java
protected Component newCopyrightPanel(final String id, final IModel<HeaderContentListModelBean> model) { return new CopyrightPanel(id, Model.of(model.getObject())); }
[ "protected", "Component", "newCopyrightPanel", "(", "final", "String", "id", ",", "final", "IModel", "<", "HeaderContentListModelBean", ">", "model", ")", "{", "return", "new", "CopyrightPanel", "(", "id", ",", "Model", ".", "of", "(", "model", ".", "getObject...
Factory method for creating the new {@link Component} for the copyright. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new {@link Component} for the copyright. @param id the id @param model the model @return the new {@link Component...
[ "Factory", "method", "for", "creating", "the", "new", "{", "@link", "Component", "}", "for", "the", "copyright", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "can", "be", "overridden", "so", ...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/termofuse/TermOfUsePanel.java#L208-L212
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.changeLock
public void changeLock(CmsRequestContext context, CmsResource resource) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); checkOfflineProject(dbc); try { m_driverManager.changeLock(dbc, resource, CmsLockType.EXCLUSIVE); } catch (Exception e) ...
java
public void changeLock(CmsRequestContext context, CmsResource resource) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); checkOfflineProject(dbc); try { m_driverManager.changeLock(dbc, resource, CmsLockType.EXCLUSIVE); } catch (Exception e) ...
[ "public", "void", "changeLock", "(", "CmsRequestContext", "context", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", "checkOfflineProject", "(", "dbc...
Changes the lock of a resource to the current user, that is "steals" the lock from another user.<p> @param context the current request context @param resource the resource to change the lock for @throws CmsException if something goes wrong @see org.opencms.file.types.I_CmsResourceType#changeLock(CmsObject, CmsSecuri...
[ "Changes", "the", "lock", "of", "a", "resource", "to", "the", "current", "user", "that", "is", "steals", "the", "lock", "from", "another", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L307-L324
btrplace/scheduler
choco/src/main/java/org/btrplace/scheduler/choco/extensions/TaskMonitor.java
TaskMonitor.build
public static TaskMonitor build(IntVar start, IntVar duration, IntVar end) { return new TaskMonitor(start, duration, end); }
java
public static TaskMonitor build(IntVar start, IntVar duration, IntVar end) { return new TaskMonitor(start, duration, end); }
[ "public", "static", "TaskMonitor", "build", "(", "IntVar", "start", ",", "IntVar", "duration", ",", "IntVar", "end", ")", "{", "return", "new", "TaskMonitor", "(", "start", ",", "duration", ",", "end", ")", ";", "}" ]
Make a new Monitor @param start the task start moment @param duration the task duration @param end the task end @return the resulting task.
[ "Make", "a", "new", "Monitor" ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/extensions/TaskMonitor.java#L65-L67
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPPrefixesInner.java
PublicIPPrefixesInner.beginUpdateTagsAsync
public Observable<PublicIPPrefixInner> beginUpdateTagsAsync(String resourceGroupName, String publicIpPrefixName) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpPrefixName).map(new Func1<ServiceResponse<PublicIPPrefixInner>, PublicIPPrefixInner>() { @Override ...
java
public Observable<PublicIPPrefixInner> beginUpdateTagsAsync(String resourceGroupName, String publicIpPrefixName) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpPrefixName).map(new Func1<ServiceResponse<PublicIPPrefixInner>, PublicIPPrefixInner>() { @Override ...
[ "public", "Observable", "<", "PublicIPPrefixInner", ">", "beginUpdateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "publicIpPrefixName", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "publicIpPrefixName", ")", ...
Updates public IP prefix tags. @param resourceGroupName The name of the resource group. @param publicIpPrefixName The name of the public IP prefix. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PublicIPPrefixInner object
[ "Updates", "public", "IP", "prefix", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/PublicIPPrefixesInner.java#L779-L786
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java
ST_Drape.drapeLineString
public static Geometry drapeLineString(LineString line, Geometry triangles, STRtree sTRtree) { GeometryFactory factory = line.getFactory(); //Split the triangles in lines to perform all intersections Geometry triangleLines = LinearComponentExtracter.getGeometry(triangles, true); Geometry...
java
public static Geometry drapeLineString(LineString line, Geometry triangles, STRtree sTRtree) { GeometryFactory factory = line.getFactory(); //Split the triangles in lines to perform all intersections Geometry triangleLines = LinearComponentExtracter.getGeometry(triangles, true); Geometry...
[ "public", "static", "Geometry", "drapeLineString", "(", "LineString", "line", ",", "Geometry", "triangles", ",", "STRtree", "sTRtree", ")", "{", "GeometryFactory", "factory", "=", "line", ".", "getFactory", "(", ")", ";", "//Split the triangles in lines to perform all...
Drape a linestring to a set of triangles @param line @param triangles @param sTRtree @return
[ "Drape", "a", "linestring", "to", "a", "set", "of", "triangles" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java#L150-L158
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/util/UrlEncoded.java
UrlEncoded.decodeString
public static String decodeString(String encoded) { return decodeString(encoded,0,encoded.length(),StringUtil.__ISO_8859_1); }
java
public static String decodeString(String encoded) { return decodeString(encoded,0,encoded.length(),StringUtil.__ISO_8859_1); }
[ "public", "static", "String", "decodeString", "(", "String", "encoded", ")", "{", "return", "decodeString", "(", "encoded", ",", "0", ",", "encoded", ".", "length", "(", ")", ",", "StringUtil", ".", "__ISO_8859_1", ")", ";", "}" ]
Decode String with % encoding. This method makes the assumption that the majority of calls will need no decoding and uses the 8859 encoding.
[ "Decode", "String", "with", "%", "encoding", ".", "This", "method", "makes", "the", "assumption", "that", "the", "majority", "of", "calls", "will", "need", "no", "decoding", "and", "uses", "the", "8859", "encoding", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/UrlEncoded.java#L311-L314
apache/incubator-shardingsphere
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/StatementExecutor.java
StatementExecutor.executeQuery
public List<QueryResult> executeQuery() throws SQLException { final boolean isExceptionThrown = ExecutorExceptionHandler.isExceptionThrown(); SQLExecuteCallback<QueryResult> executeCallback = new SQLExecuteCallback<QueryResult>(getDatabaseType(), isExceptionThrown) { @Override ...
java
public List<QueryResult> executeQuery() throws SQLException { final boolean isExceptionThrown = ExecutorExceptionHandler.isExceptionThrown(); SQLExecuteCallback<QueryResult> executeCallback = new SQLExecuteCallback<QueryResult>(getDatabaseType(), isExceptionThrown) { @Override ...
[ "public", "List", "<", "QueryResult", ">", "executeQuery", "(", ")", "throws", "SQLException", "{", "final", "boolean", "isExceptionThrown", "=", "ExecutorExceptionHandler", ".", "isExceptionThrown", "(", ")", ";", "SQLExecuteCallback", "<", "QueryResult", ">", "exe...
Execute query. @return result set list @throws SQLException SQL exception
[ "Execute", "query", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/StatementExecutor.java#L90-L100
james-hu/jabb-core
src/main/java/net/sf/jabb/util/text/word/Dictionary.java
Dictionary.addWord
public void addWord(Word newWord, boolean makeCopy){ synchronized(words){ Word existingWord = words.get(newWord.getWord()); if (existingWord != null){ existingWord.setType(newWord.getTypes()); existingWord.setKeywordAttachment(newWord.getKeywordAttachment()); }else{ if (makeCopy){ ne...
java
public void addWord(Word newWord, boolean makeCopy){ synchronized(words){ Word existingWord = words.get(newWord.getWord()); if (existingWord != null){ existingWord.setType(newWord.getTypes()); existingWord.setKeywordAttachment(newWord.getKeywordAttachment()); }else{ if (makeCopy){ ne...
[ "public", "void", "addWord", "(", "Word", "newWord", ",", "boolean", "makeCopy", ")", "{", "synchronized", "(", "words", ")", "{", "Word", "existingWord", "=", "words", ".", "get", "(", "newWord", ".", "getWord", "(", ")", ")", ";", "if", "(", "existin...
加入一个新词条,如果这个词条在词典中已经存在,则合并。 <p> Add a new word, if this word already exists in the dictionary then the new definition will be merged into existing one. @param newWord @param makeCopy 是否复制词条对象,而非引用 <br>Whether or not to copy the Word object, rather than to refer it.
[ "加入一个新词条,如果这个词条在词典中已经存在,则合并。", "<p", ">", "Add", "a", "new", "word", "if", "this", "word", "already", "exists", "in", "the", "dictionary", "then", "the", "new", "definition", "will", "be", "merged", "into", "existing", "one", "." ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/text/word/Dictionary.java#L79-L92
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java
SARLOperationHelper.hasSideEffects
protected Boolean hasSideEffects(XExpression expr, ISideEffectContext context) { if (expr != null && !expr.eIsProxy()) { return this.hasSideEffectsDispatcher.invoke(expr, context); } return false; }
java
protected Boolean hasSideEffects(XExpression expr, ISideEffectContext context) { if (expr != null && !expr.eIsProxy()) { return this.hasSideEffectsDispatcher.invoke(expr, context); } return false; }
[ "protected", "Boolean", "hasSideEffects", "(", "XExpression", "expr", ",", "ISideEffectContext", "context", ")", "{", "if", "(", "expr", "!=", "null", "&&", "!", "expr", ".", "eIsProxy", "(", ")", ")", "{", "return", "this", ".", "hasSideEffectsDispatcher", ...
Determine if the given expression has a side effect. @param expr the expression. @param context the context. @return {@code true} if the expression has a side effect.
[ "Determine", "if", "the", "given", "expression", "has", "a", "side", "effect", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java#L251-L256
lionsoul2014/jcseg
jcseg-core/src/main/java/org/lionsoul/jcseg/util/Sort.java
Sort.insertionSort
public static <T extends Comparable<? super T>> void insertionSort( T[] arr, int start, int end ) { int i; for ( int j = start + 1; j <= end; j++ ) { T tmp = arr[j]; for ( i = j; i > start && tmp.compareTo( arr[i - 1] ) < 0; i-- ) { arr[ i ] = arr[ i - 1 ...
java
public static <T extends Comparable<? super T>> void insertionSort( T[] arr, int start, int end ) { int i; for ( int j = start + 1; j <= end; j++ ) { T tmp = arr[j]; for ( i = j; i > start && tmp.compareTo( arr[i - 1] ) < 0; i-- ) { arr[ i ] = arr[ i - 1 ...
[ "public", "static", "<", "T", "extends", "Comparable", "<", "?", "super", "T", ">", ">", "void", "insertionSort", "(", "T", "[", "]", "arr", ",", "int", "start", ",", "int", "end", ")", "{", "int", "i", ";", "for", "(", "int", "j", "=", "start", ...
method to sort an subarray from start to end with insertion sort algorithm @param arr an array of Comparable items @param start the begining position @param end the end position
[ "method", "to", "sort", "an", "subarray", "from", "start", "to", "end", "with", "insertion", "sort", "algorithm" ]
train
https://github.com/lionsoul2014/jcseg/blob/7c8a912e3bbcaf4f8de701180b9c24e2e444a94b/jcseg-core/src/main/java/org/lionsoul/jcseg/util/Sort.java#L246-L257
libgdx/box2dlights
src/box2dLight/RayHandler.java
RayHandler.pointAtLight
public boolean pointAtLight(float x, float y) { for (Light light : lightList) { if (light.contains(x, y)) return true; } return false; }
java
public boolean pointAtLight(float x, float y) { for (Light light : lightList) { if (light.contains(x, y)) return true; } return false; }
[ "public", "boolean", "pointAtLight", "(", "float", "x", ",", "float", "y", ")", "{", "for", "(", "Light", "light", ":", "lightList", ")", "{", "if", "(", "light", ".", "contains", "(", "x", ",", "y", ")", ")", "return", "true", ";", "}", "return", ...
Checks whether the given point is inside of any light volume @return true if point is inside of any light volume
[ "Checks", "whether", "the", "given", "point", "is", "inside", "of", "any", "light", "volume" ]
train
https://github.com/libgdx/box2dlights/blob/08cf93a41464f71d32475aaa2fe280dc6af78ff3/src/box2dLight/RayHandler.java#L400-L405
morimekta/utils
io-util/src/main/java/net/morimekta/util/FileWatcher.java
FileWatcher.addWatcher
@Deprecated public void addWatcher(File file, Watcher watcher) { addWatcher(file.toPath(), watcher); }
java
@Deprecated public void addWatcher(File file, Watcher watcher) { addWatcher(file.toPath(), watcher); }
[ "@", "Deprecated", "public", "void", "addWatcher", "(", "File", "file", ",", "Watcher", "watcher", ")", "{", "addWatcher", "(", "file", ".", "toPath", "(", ")", ",", "watcher", ")", ";", "}" ]
Start watching file path and notify watcher for updates on that file. @param file The file path to watch. @param watcher The watcher to be notified. @deprecated Use {@link #addWatcher(Path, Listener)}
[ "Start", "watching", "file", "path", "and", "notify", "watcher", "for", "updates", "on", "that", "file", "." ]
train
https://github.com/morimekta/utils/blob/dc987485902f1a7d58169c89c61db97425a6226d/io-util/src/main/java/net/morimekta/util/FileWatcher.java#L164-L167
UrielCh/ovh-java-sdk
ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java
ApiOvhDbaaslogs.serviceName_role_roleId_member_POST
public OvhOperation serviceName_role_roleId_member_POST(String serviceName, String roleId, String note, String username) throws IOException { String qPath = "/dbaas/logs/{serviceName}/role/{roleId}/member"; StringBuilder sb = path(qPath, serviceName, roleId); HashMap<String, Object>o = new HashMap<String, Object>...
java
public OvhOperation serviceName_role_roleId_member_POST(String serviceName, String roleId, String note, String username) throws IOException { String qPath = "/dbaas/logs/{serviceName}/role/{roleId}/member"; StringBuilder sb = path(qPath, serviceName, roleId); HashMap<String, Object>o = new HashMap<String, Object>...
[ "public", "OvhOperation", "serviceName_role_roleId_member_POST", "(", "String", "serviceName", ",", "String", "roleId", ",", "String", "note", ",", "String", "username", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dbaas/logs/{serviceName}/role/{roleId}/...
Append user into the member list of specified role REST: POST /dbaas/logs/{serviceName}/role/{roleId}/member @param serviceName [required] Service name @param roleId [required] Role ID @param username [required] Username @param note [required] Custom note
[ "Append", "user", "into", "the", "member", "list", "of", "specified", "role" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L897-L905
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DataMaskingPoliciesInner.java
DataMaskingPoliciesInner.createOrUpdateAsync
public Observable<DataMaskingPolicyInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1<ServiceResponse<DataMaskingPol...
java
public Observable<DataMaskingPolicyInner> createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DataMaskingPolicyInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1<ServiceResponse<DataMaskingPol...
[ "public", "Observable", "<", "DataMaskingPolicyInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "DataMaskingPolicyInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResp...
Creates or updates a database data masking policy. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database. @param parameters P...
[ "Creates", "or", "updates", "a", "database", "data", "masking", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DataMaskingPoliciesInner.java#L108-L115
alkacon/opencms-core
src/org/opencms/gwt/CmsCoreService.java
CmsCoreService.internalGetLinkForReturnCode
public static CmsReturnLinkInfo internalGetLinkForReturnCode(CmsObject cms, String returnCode) throws CmsException { if (CmsUUID.isValidUUID(returnCode)) { try { CmsResource pageRes = cms.readResource(new CmsUUID(returnCode), CmsResourceFilter.IGNORE_EXPIRATION); ret...
java
public static CmsReturnLinkInfo internalGetLinkForReturnCode(CmsObject cms, String returnCode) throws CmsException { if (CmsUUID.isValidUUID(returnCode)) { try { CmsResource pageRes = cms.readResource(new CmsUUID(returnCode), CmsResourceFilter.IGNORE_EXPIRATION); ret...
[ "public", "static", "CmsReturnLinkInfo", "internalGetLinkForReturnCode", "(", "CmsObject", "cms", ",", "String", "returnCode", ")", "throws", "CmsException", "{", "if", "(", "CmsUUID", ".", "isValidUUID", "(", "returnCode", ")", ")", "{", "try", "{", "CmsResource"...
Implementation method for getting the link for a given return code.<p> @param cms the CMS context @param returnCode the return code @return the link for the return code @throws CmsException if something goes wrong
[ "Implementation", "method", "for", "getting", "the", "link", "for", "a", "given", "return", "code", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsCoreService.java#L568-L611
OpenLiberty/open-liberty
dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannelProvider.java
SSLChannelProvider.updatedSslSupport
protected void updatedSslSupport(SSLSupport service, Map<String, Object> props) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "updatedSslSupport", props); } sslSupport = service; // If the default pid has changed.. we need to go hunting f...
java
protected void updatedSslSupport(SSLSupport service, Map<String, Object> props) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "updatedSslSupport", props); } sslSupport = service; // If the default pid has changed.. we need to go hunting f...
[ "protected", "void", "updatedSslSupport", "(", "SSLSupport", "service", ",", "Map", "<", "String", ",", "Object", ">", "props", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "...
This is called if the service is updated. @param ref reference to the service
[ "This", "is", "called", "if", "the", "service", "is", "updated", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLChannelProvider.java#L216-L235
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Signature.java
Signature.getInstance
public static Signature getInstance(String algorithm) throws NoSuchAlgorithmException { List<Service> list; if (algorithm.equalsIgnoreCase(RSA_SIGNATURE)) { list = GetInstance.getServices(rsaIds); } else { list = GetInstance.getServices("Signature", algorithm)...
java
public static Signature getInstance(String algorithm) throws NoSuchAlgorithmException { List<Service> list; if (algorithm.equalsIgnoreCase(RSA_SIGNATURE)) { list = GetInstance.getServices(rsaIds); } else { list = GetInstance.getServices("Signature", algorithm)...
[ "public", "static", "Signature", "getInstance", "(", "String", "algorithm", ")", "throws", "NoSuchAlgorithmException", "{", "List", "<", "Service", ">", "list", ";", "if", "(", "algorithm", ".", "equalsIgnoreCase", "(", "RSA_SIGNATURE", ")", ")", "{", "list", ...
Returns a Signature object that implements the specified signature algorithm. <p> This method traverses the list of registered security Providers, starting with the most preferred Provider. A new Signature object encapsulating the SignatureSpi implementation from the first Provider that supports the specified algorith...
[ "Returns", "a", "Signature", "object", "that", "implements", "the", "specified", "signature", "algorithm", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Signature.java#L353-L384
att/AAF
cadi/core/src/main/java/com/att/cadi/Symm.java
Symm.depass
public long depass(final String password, final OutputStream os) throws IOException { int offset = password.startsWith(ENC)?4:0; final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ByteArrayInputStream bais = new ByteArrayInputStream(password.getBytes(),offset,password.length()-offset); e...
java
public long depass(final String password, final OutputStream os) throws IOException { int offset = password.startsWith(ENC)?4:0; final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ByteArrayInputStream bais = new ByteArrayInputStream(password.getBytes(),offset,password.length()-offset); e...
[ "public", "long", "depass", "(", "final", "String", "password", ",", "final", "OutputStream", "os", ")", "throws", "IOException", "{", "int", "offset", "=", "password", ".", "startsWith", "(", "ENC", ")", "?", "4", ":", "0", ";", "final", "ByteArrayOutputS...
Decrypt a password Skip Symm.ENC @param password @param os @return @throws IOException
[ "Decrypt", "a", "password" ]
train
https://github.com/att/AAF/blob/090562e956c0035db972aafba844dc6d3fc948ee/cadi/core/src/main/java/com/att/cadi/Symm.java#L682-L723
opengeospatial/teamengine
teamengine-core/src/main/java/com/occamlab/te/Engine.java
Engine.preload
public void preload(Index index, String sourcesName) throws Exception { for (String key : index.getTestKeys()) { TestEntry te = index.getTest(key); loadExecutable(te, sourcesName); } for (String key : index.getFunctionKeys()) { List<FunctionEntry> functi...
java
public void preload(Index index, String sourcesName) throws Exception { for (String key : index.getTestKeys()) { TestEntry te = index.getTest(key); loadExecutable(te, sourcesName); } for (String key : index.getFunctionKeys()) { List<FunctionEntry> functi...
[ "public", "void", "preload", "(", "Index", "index", ",", "String", "sourcesName", ")", "throws", "Exception", "{", "for", "(", "String", "key", ":", "index", ".", "getTestKeys", "(", ")", ")", "{", "TestEntry", "te", "=", "index", ".", "getTest", "(", ...
Loads all of the XSL executables. This is a time consuming operation. @param index @param sourcesName A stylesheet reference. @throws Exception If the stylesheet fail to compile.
[ "Loads", "all", "of", "the", "XSL", "executables", ".", "This", "is", "a", "time", "consuming", "operation", "." ]
train
https://github.com/opengeospatial/teamengine/blob/b6b890214b6784bbe19460bf753bdf28a9514bee/teamengine-core/src/main/java/com/occamlab/te/Engine.java#L136-L149
ganglia/jmxetric
src/main/java/info/ganglia/jmxetric/GangliaXmlConfigurationService.java
GangliaXmlConfigurationService.getGangliaConfig
private String getGangliaConfig(String cmdLine, Node ganglia, String attributeName, String defaultValue) { if (cmdLine == null) { return selectParameterFromNode(ganglia, attributeName, defaultValue); } else { return cmdLine; } }
java
private String getGangliaConfig(String cmdLine, Node ganglia, String attributeName, String defaultValue) { if (cmdLine == null) { return selectParameterFromNode(ganglia, attributeName, defaultValue); } else { return cmdLine; } }
[ "private", "String", "getGangliaConfig", "(", "String", "cmdLine", ",", "Node", "ganglia", ",", "String", "attributeName", ",", "String", "defaultValue", ")", "{", "if", "(", "cmdLine", "==", "null", ")", "{", "return", "selectParameterFromNode", "(", "ganglia",...
Gets a configuration parameter for Ganglia. First checks if it was given on the command line arguments. If it is not available, it looks for the value in the XML node. @param cmdLine command line value for this attribute @param ganglia the XML node @param attributeName name of the attribute @param defaultValue default...
[ "Gets", "a", "configuration", "parameter", "for", "Ganglia", ".", "First", "checks", "if", "it", "was", "given", "on", "the", "command", "line", "arguments", ".", "If", "it", "is", "not", "available", "it", "looks", "for", "the", "value", "in", "the", "X...
train
https://github.com/ganglia/jmxetric/blob/0b21edb9bd75e0b2df8370ad1c77a1ea47f502ca/src/main/java/info/ganglia/jmxetric/GangliaXmlConfigurationService.java#L178-L185
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getExploded
@Nonnull @ReturnsMutableCopy public static ICommonsList <String> getExploded (final char cSep, @Nullable final String sElements) { return getExploded (cSep, sElements, -1); }
java
@Nonnull @ReturnsMutableCopy public static ICommonsList <String> getExploded (final char cSep, @Nullable final String sElements) { return getExploded (cSep, sElements, -1); }
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "ICommonsList", "<", "String", ">", "getExploded", "(", "final", "char", "cSep", ",", "@", "Nullable", "final", "String", "sElements", ")", "{", "return", "getExploded", "(", "cSep", ",", "sElement...
Take a concatenated String and return a {@link ICommonsList} of all elements in the passed string, using specified separator string. @param cSep The separator character to use. @param sElements The concatenated String to convert. May be <code>null</code> or empty. @return The {@link ICommonsList} represented by the pa...
[ "Take", "a", "concatenated", "String", "and", "return", "a", "{", "@link", "ICommonsList", "}", "of", "all", "elements", "in", "the", "passed", "string", "using", "specified", "separator", "string", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L2083-L2088
bazaarvoice/emodb
web/src/main/java/com/bazaarvoice/emodb/web/report/db/EmoTableAllTablesReportDAO.java
EmoTableAllTablesReportDAO.convertToTableReportEntry
@Nullable private TableReportEntry convertToTableReportEntry(Map<String, Object> map, Predicate<String> placementFilter, Predicate<Boolean> droppedFilter, Predicate<Boolean> facadeFilter) { if (Intrinsic.isDeleted(map)) { return null; ...
java
@Nullable private TableReportEntry convertToTableReportEntry(Map<String, Object> map, Predicate<String> placementFilter, Predicate<Boolean> droppedFilter, Predicate<Boolean> facadeFilter) { if (Intrinsic.isDeleted(map)) { return null; ...
[ "@", "Nullable", "private", "TableReportEntry", "convertToTableReportEntry", "(", "Map", "<", "String", ",", "Object", ">", "map", ",", "Predicate", "<", "String", ">", "placementFilter", ",", "Predicate", "<", "Boolean", ">", "droppedFilter", ",", "Predicate", ...
Accepts a row from the table report and returns it converted into a TableReportEntry. If the row is deleted or if it doesn't match all of the configured filters then null is returned.
[ "Accepts", "a", "row", "from", "the", "table", "report", "and", "returns", "it", "converted", "into", "a", "TableReportEntry", ".", "If", "the", "row", "is", "deleted", "or", "if", "it", "doesn", "t", "match", "all", "of", "the", "configured", "filters", ...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/web/src/main/java/com/bazaarvoice/emodb/web/report/db/EmoTableAllTablesReportDAO.java#L306-L332
structurizr/java
structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java
DocumentationTemplate.addSection
public Section addSection(Container container, String title, Format format, String content) { return add(container, title, format, content); }
java
public Section addSection(Container container, String title, Format format, String content) { return add(container, title, format, content); }
[ "public", "Section", "addSection", "(", "Container", "container", ",", "String", "title", ",", "Format", "format", ",", "String", "content", ")", "{", "return", "add", "(", "container", ",", "title", ",", "format", ",", "content", ")", ";", "}" ]
Adds a section relating to a {@link Container}. @param container the {@link Container} the documentation content relates to @param title the section title @param format the {@link Format} of the documentation content @param content a String containing the documentation content @return ...
[ "Adds", "a", "section", "relating", "to", "a", "{", "@link", "Container", "}", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java#L113-L115
wisdom-framework/wisdom
core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/DependencyFinder.java
DependencyFinder.getArtifactFileFromPluginDependencies
public static File getArtifactFileFromPluginDependencies(AbstractWisdomMojo mojo, String artifactId, String type) { Preconditions.checkNotNull(mojo); Preconditions.checkNotNull(artifactId); Preconditions.checkNotNull(type); for (Artifact artifact : mojo.pluginDependencies) { ...
java
public static File getArtifactFileFromPluginDependencies(AbstractWisdomMojo mojo, String artifactId, String type) { Preconditions.checkNotNull(mojo); Preconditions.checkNotNull(artifactId); Preconditions.checkNotNull(type); for (Artifact artifact : mojo.pluginDependencies) { ...
[ "public", "static", "File", "getArtifactFileFromPluginDependencies", "(", "AbstractWisdomMojo", "mojo", ",", "String", "artifactId", ",", "String", "type", ")", "{", "Preconditions", ".", "checkNotNull", "(", "mojo", ")", ";", "Preconditions", ".", "checkNotNull", "...
Gets the file of the dependency with the given artifact id from the plugin dependencies (i.e. from the dependencies of the wisdom-maven-plugin itself, and not from the current 'under-build' project). @param mojo the mojo, cannot be {@code null} @param artifactId the name of the artifact to find, cannot be {@code...
[ "Gets", "the", "file", "of", "the", "dependency", "with", "the", "given", "artifact", "id", "from", "the", "plugin", "dependencies", "(", "i", ".", "e", ".", "from", "the", "dependencies", "of", "the", "wisdom", "-", "maven", "-", "plugin", "itself", "an...
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/utils/DependencyFinder.java#L51-L63
rhuss/jolokia
agent/core/src/main/java/org/jolokia/converter/json/TabularDataExtractor.java
TabularDataExtractor.setObjectValue
public Object setObjectValue(StringToObjectConverter pConverter, Object pInner, String pAttribute, Object pValue) throws IllegalAccessException, InvocationTargetException { throw new IllegalArgumentException("TabularData cannot be written to"); }
java
public Object setObjectValue(StringToObjectConverter pConverter, Object pInner, String pAttribute, Object pValue) throws IllegalAccessException, InvocationTargetException { throw new IllegalArgumentException("TabularData cannot be written to"); }
[ "public", "Object", "setObjectValue", "(", "StringToObjectConverter", "pConverter", ",", "Object", "pInner", ",", "String", "pAttribute", ",", "Object", "pValue", ")", "throws", "IllegalAccessException", ",", "InvocationTargetException", "{", "throw", "new", "IllegalArg...
Throws always {@link IllegalArgumentException} since tabular data is immutable
[ "Throws", "always", "{" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/converter/json/TabularDataExtractor.java#L334-L337
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/MappedParametrizedObjectEntry.java
MappedParametrizedObjectEntry.getParameterValue
public String getParameterValue(String name, String defaultValue) { String value = defaultValue; SimpleParameterEntry p = parameters.get(name); if (p != null) { value = p.getValue(); } return value; }
java
public String getParameterValue(String name, String defaultValue) { String value = defaultValue; SimpleParameterEntry p = parameters.get(name); if (p != null) { value = p.getValue(); } return value; }
[ "public", "String", "getParameterValue", "(", "String", "name", ",", "String", "defaultValue", ")", "{", "String", "value", "=", "defaultValue", ";", "SimpleParameterEntry", "p", "=", "parameters", ".", "get", "(", "name", ")", ";", "if", "(", "p", "!=", "...
Parse named parameter. @param name parameter name @param defaultValue default value @return String
[ "Parse", "named", "parameter", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/MappedParametrizedObjectEntry.java#L103-L112
alkacon/opencms-core
src/org/opencms/file/CmsObject.java
CmsObject.copyResource
public void copyResource(String source, String destination) throws CmsException, CmsIllegalArgumentException { copyResource(source, destination, CmsResource.COPY_PRESERVE_SIBLING); }
java
public void copyResource(String source, String destination) throws CmsException, CmsIllegalArgumentException { copyResource(source, destination, CmsResource.COPY_PRESERVE_SIBLING); }
[ "public", "void", "copyResource", "(", "String", "source", ",", "String", "destination", ")", "throws", "CmsException", ",", "CmsIllegalArgumentException", "{", "copyResource", "(", "source", ",", "destination", ",", "CmsResource", ".", "COPY_PRESERVE_SIBLING", ")", ...
Copies a resource.<p> The copied resource will always be locked to the current user after the copy operation.<p> Siblings will be treated according to the <code>{@link org.opencms.file.CmsResource#COPY_PRESERVE_SIBLING}</code> mode.<p> @param source the name of the resource to copy (full current site relative path) ...
[ "Copies", "a", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsObject.java#L546-L549
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java
AccountsImpl.listNodeAgentSkusNext
public PagedList<NodeAgentSku> listNodeAgentSkusNext(final String nextPageLink, final AccountListNodeAgentSkusNextOptions accountListNodeAgentSkusNextOptions) { ServiceResponseWithHeaders<Page<NodeAgentSku>, AccountListNodeAgentSkusHeaders> response = listNodeAgentSkusNextSinglePageAsync(nextPageLink, accountLi...
java
public PagedList<NodeAgentSku> listNodeAgentSkusNext(final String nextPageLink, final AccountListNodeAgentSkusNextOptions accountListNodeAgentSkusNextOptions) { ServiceResponseWithHeaders<Page<NodeAgentSku>, AccountListNodeAgentSkusHeaders> response = listNodeAgentSkusNextSinglePageAsync(nextPageLink, accountLi...
[ "public", "PagedList", "<", "NodeAgentSku", ">", "listNodeAgentSkusNext", "(", "final", "String", "nextPageLink", ",", "final", "AccountListNodeAgentSkusNextOptions", "accountListNodeAgentSkusNextOptions", ")", "{", "ServiceResponseWithHeaders", "<", "Page", "<", "NodeAgentSk...
Lists all node agent SKUs supported by the Azure Batch service. @param nextPageLink The NextLink from the previous successful call to List operation. @param accountListNodeAgentSkusNextOptions Additional parameters for the operation @throws IllegalArgumentException thrown if parameters fail the validation @throws Batc...
[ "Lists", "all", "node", "agent", "SKUs", "supported", "by", "the", "Azure", "Batch", "service", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/AccountsImpl.java#L759-L767
JOML-CI/JOML
src/org/joml/Quaterniond.java
Quaterniond.setAngleAxis
public Quaterniond setAngleAxis(double angle, Vector3dc axis) { return setAngleAxis(angle, axis.x(), axis.y(), axis.z()); }
java
public Quaterniond setAngleAxis(double angle, Vector3dc axis) { return setAngleAxis(angle, axis.x(), axis.y(), axis.z()); }
[ "public", "Quaterniond", "setAngleAxis", "(", "double", "angle", ",", "Vector3dc", "axis", ")", "{", "return", "setAngleAxis", "(", "angle", ",", "axis", ".", "x", "(", ")", ",", "axis", ".", "y", "(", ")", ",", "axis", ".", "z", "(", ")", ")", ";"...
Set this quaternion to be a representation of the supplied axis and angle (in radians). @param angle the angle in radians @param axis the rotation axis @return this
[ "Set", "this", "quaternion", "to", "be", "a", "representation", "of", "the", "supplied", "axis", "and", "angle", "(", "in", "radians", ")", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Quaterniond.java#L418-L420
Jasig/uPortal
uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java
RDBMEntityGroupStore.primUpdate
private void primUpdate(IEntityGroup group, Connection conn) throws SQLException, GroupsException { try { PreparedStatement ps = conn.prepareStatement(getUpdateGroupSql()); try { Integer typeID = EntityTypesLocator.getEntityTypes() ...
java
private void primUpdate(IEntityGroup group, Connection conn) throws SQLException, GroupsException { try { PreparedStatement ps = conn.prepareStatement(getUpdateGroupSql()); try { Integer typeID = EntityTypesLocator.getEntityTypes() ...
[ "private", "void", "primUpdate", "(", "IEntityGroup", "group", ",", "Connection", "conn", ")", "throws", "SQLException", ",", "GroupsException", "{", "try", "{", "PreparedStatement", "ps", "=", "conn", ".", "prepareStatement", "(", "getUpdateGroupSql", "(", ")", ...
Update the entity in the database. @param group IEntityGroup @param conn the database connection
[ "Update", "the", "entity", "in", "the", "database", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/RDBMEntityGroupStore.java#L1155-L1201
OpenLiberty/open-liberty
dev/com.ibm.ws.webserver.plugin.utility/src/com/ibm/ws/webserver/plugin/utility/utils/CommonMBeanConnection.java
CommonMBeanConnection.getJMXConnector
public JMXConnector getJMXConnector(String controllerHost, int controllerPort, String user, String password) throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, IOException { HashMap<String, Object> environment = createJMXEnvironment(user, password, setUpSSLContext()); JMXCon...
java
public JMXConnector getJMXConnector(String controllerHost, int controllerPort, String user, String password) throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, IOException { HashMap<String, Object> environment = createJMXEnvironment(user, password, setUpSSLContext()); JMXCon...
[ "public", "JMXConnector", "getJMXConnector", "(", "String", "controllerHost", ",", "int", "controllerPort", ",", "String", "user", ",", "String", "password", ")", "throws", "NoSuchAlgorithmException", ",", "KeyManagementException", ",", "MalformedURLException", ",", "IO...
Returns a connected JMXConnector. @param controllerHost @param controllerPort @param user @param password @return @throws NoSuchAlgorithmException @throws KeyManagementException @throws MalformedURLException @throws IOException
[ "Returns", "a", "connected", "JMXConnector", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webserver.plugin.utility/src/com/ibm/ws/webserver/plugin/utility/utils/CommonMBeanConnection.java#L132-L137
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/containers/MetadataStore.java
MetadataStore.deleteSegment
CompletableFuture<Boolean> deleteSegment(String segmentName, Duration timeout) { long traceId = LoggerHelpers.traceEnterWithContext(log, traceObjectId, "deleteSegment", segmentName); TimeoutTimer timer = new TimeoutTimer(timeout); // Find the Segment's Id. long segmentId = this.connecto...
java
CompletableFuture<Boolean> deleteSegment(String segmentName, Duration timeout) { long traceId = LoggerHelpers.traceEnterWithContext(log, traceObjectId, "deleteSegment", segmentName); TimeoutTimer timer = new TimeoutTimer(timeout); // Find the Segment's Id. long segmentId = this.connecto...
[ "CompletableFuture", "<", "Boolean", ">", "deleteSegment", "(", "String", "segmentName", ",", "Duration", "timeout", ")", "{", "long", "traceId", "=", "LoggerHelpers", ".", "traceEnterWithContext", "(", "log", ",", "traceObjectId", ",", "\"deleteSegment\"", ",", "...
Deletes a Segment and any associated information from the Metadata Store. Notes: - This method removes both the Segment and its Metadata Store entries. - {@link #clearSegmentInfo} only removes Metadata Store entries. This operation is made of multiple steps and is restart-able. If it was only able to execute partially...
[ "Deletes", "a", "Segment", "and", "any", "associated", "information", "from", "the", "Metadata", "Store", ".", "Notes", ":", "-", "This", "method", "removes", "both", "the", "Segment", "and", "its", "Metadata", "Store", "entries", ".", "-", "{", "@link", "...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/containers/MetadataStore.java#L163-L195
zaproxy/zaproxy
src/org/parosproxy/paros/db/DbUtils.java
DbUtils.hasTable
public static boolean hasTable(final Connection connection, final String tableName) throws SQLException { boolean hasTable = false; ResultSet rs = null; try { rs = connection.getMetaData().getTables(null, null, tableName, null); if (rs.next()) { ...
java
public static boolean hasTable(final Connection connection, final String tableName) throws SQLException { boolean hasTable = false; ResultSet rs = null; try { rs = connection.getMetaData().getTables(null, null, tableName, null); if (rs.next()) { ...
[ "public", "static", "boolean", "hasTable", "(", "final", "Connection", "connection", ",", "final", "String", "tableName", ")", "throws", "SQLException", "{", "boolean", "hasTable", "=", "false", ";", "ResultSet", "rs", "=", "null", ";", "try", "{", "rs", "="...
Tells whether the table {@code tableName} exists in the database, or not. @param connection the connection to the database @param tableName the name of the table that will be checked @return {@code true} if the table {@code tableName} exists in the database, {@code false} otherwise. @throws SQLException if an error oc...
[ "Tells", "whether", "the", "table", "{", "@code", "tableName", "}", "exists", "in", "the", "database", "or", "not", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/db/DbUtils.java#L48-L70
eclipse/xtext-core
org.eclipse.xtext.util/src/org/eclipse/xtext/util/concurrent/AbstractReadWriteAcces.java
AbstractReadWriteAcces.process
public <Result> Result process(IUnitOfWork<Result, State> work) { releaseReadLock(); acquireWriteLock(); try { if (log.isTraceEnabled()) log.trace("process - " + Thread.currentThread().getName()); return modify(work); } finally { if (log.isTraceEnabled()) log.trace("Downgrading from write lock ...
java
public <Result> Result process(IUnitOfWork<Result, State> work) { releaseReadLock(); acquireWriteLock(); try { if (log.isTraceEnabled()) log.trace("process - " + Thread.currentThread().getName()); return modify(work); } finally { if (log.isTraceEnabled()) log.trace("Downgrading from write lock ...
[ "public", "<", "Result", ">", "Result", "process", "(", "IUnitOfWork", "<", "Result", ",", "State", ">", "work", ")", "{", "releaseReadLock", "(", ")", ";", "acquireWriteLock", "(", ")", ";", "try", "{", "if", "(", "log", ".", "isTraceEnabled", "(", ")...
Upgrades a read transaction to a write transaction, executes the work then downgrades to a read transaction again. @since 2.4 @noreference
[ "Upgrades", "a", "read", "transaction", "to", "a", "write", "transaction", "executes", "the", "work", "then", "downgrades", "to", "a", "read", "transaction", "again", "." ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext.util/src/org/eclipse/xtext/util/concurrent/AbstractReadWriteAcces.java#L107-L120
softindex/datakernel
core-http/src/main/java/io/datakernel/http/HttpUtils.java
HttpUtils.renderQueryString
public static String renderQueryString(Map<String, String> q, String enc) { StringBuilder sb = new StringBuilder(); for (Map.Entry<String, String> e : q.entrySet()) { String name = urlEncode(e.getKey(), enc); sb.append(name); if (e.getValue() != null) { sb.append('='); sb.append(urlEncode(e.getValu...
java
public static String renderQueryString(Map<String, String> q, String enc) { StringBuilder sb = new StringBuilder(); for (Map.Entry<String, String> e : q.entrySet()) { String name = urlEncode(e.getKey(), enc); sb.append(name); if (e.getValue() != null) { sb.append('='); sb.append(urlEncode(e.getValu...
[ "public", "static", "String", "renderQueryString", "(", "Map", "<", "String", ",", "String", ">", "q", ",", "String", "enc", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",...
Method which creates string with parameters and its value in format URL @param q map in which keys if name of parameters, value - value of parameters. @param enc encoding of this string @return string with parameters and its value in format URL
[ "Method", "which", "creates", "string", "with", "parameters", "and", "its", "value", "in", "format", "URL" ]
train
https://github.com/softindex/datakernel/blob/090ca1116416c14d463d49d275cb1daaafa69c56/core-http/src/main/java/io/datakernel/http/HttpUtils.java#L190-L204
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java
PolicyStatesInner.summarizeForSubscriptionLevelPolicyAssignmentAsync
public Observable<SummarizeResultsInner> summarizeForSubscriptionLevelPolicyAssignmentAsync(String subscriptionId, String policyAssignmentName) { return summarizeForSubscriptionLevelPolicyAssignmentWithServiceResponseAsync(subscriptionId, policyAssignmentName).map(new Func1<ServiceResponse<SummarizeResultsInner...
java
public Observable<SummarizeResultsInner> summarizeForSubscriptionLevelPolicyAssignmentAsync(String subscriptionId, String policyAssignmentName) { return summarizeForSubscriptionLevelPolicyAssignmentWithServiceResponseAsync(subscriptionId, policyAssignmentName).map(new Func1<ServiceResponse<SummarizeResultsInner...
[ "public", "Observable", "<", "SummarizeResultsInner", ">", "summarizeForSubscriptionLevelPolicyAssignmentAsync", "(", "String", "subscriptionId", ",", "String", "policyAssignmentName", ")", "{", "return", "summarizeForSubscriptionLevelPolicyAssignmentWithServiceResponseAsync", "(", ...
Summarizes policy states for the subscription level policy assignment. @param subscriptionId Microsoft Azure subscription ID. @param policyAssignmentName Policy assignment name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the SummarizeResultsInner object
[ "Summarizes", "policy", "states", "for", "the", "subscription", "level", "policy", "assignment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L2714-L2721
greatman/GreatmancodeTools
src/main/java/com/greatmancode/tools/utils/Vector.java
Vector.isInAABB
public boolean isInAABB(Vector min, Vector max) { return x >= min.x && x <= max.x && y >= min.y && y <= max.y && z >= min.z && z <= max.z; }
java
public boolean isInAABB(Vector min, Vector max) { return x >= min.x && x <= max.x && y >= min.y && y <= max.y && z >= min.z && z <= max.z; }
[ "public", "boolean", "isInAABB", "(", "Vector", "min", ",", "Vector", "max", ")", "{", "return", "x", ">=", "min", ".", "x", "&&", "x", "<=", "max", ".", "x", "&&", "y", ">=", "min", ".", "y", "&&", "y", "<=", "max", ".", "y", "&&", "z", ">="...
Returns whether this vector is in an axis-aligned bounding box. <p> The minimum and maximum vectors given must be truly the minimum and maximum X, Y and Z components. @param min Minimum vector @param max Maximum vector @return whether this vector is in the AABB
[ "Returns", "whether", "this", "vector", "is", "in", "an", "axis", "-", "aligned", "bounding", "box", ".", "<p", ">", "The", "minimum", "and", "maximum", "vectors", "given", "must", "be", "truly", "the", "minimum", "and", "maximum", "X", "Y", "and", "Z", ...
train
https://github.com/greatman/GreatmancodeTools/blob/4c9d2656c5c8298ff9e1f235c9be8b148e43c9f1/src/main/java/com/greatmancode/tools/utils/Vector.java#L357-L359
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java
PerspectiveOps.convertPixelToNorm
public static Point2D_F64 convertPixelToNorm( DMatrixRMaj K , Point2D_F64 pixel , Point2D_F64 norm ) { return ImplPerspectiveOps_F64.convertPixelToNorm(K, pixel, norm); }
java
public static Point2D_F64 convertPixelToNorm( DMatrixRMaj K , Point2D_F64 pixel , Point2D_F64 norm ) { return ImplPerspectiveOps_F64.convertPixelToNorm(K, pixel, norm); }
[ "public", "static", "Point2D_F64", "convertPixelToNorm", "(", "DMatrixRMaj", "K", ",", "Point2D_F64", "pixel", ",", "Point2D_F64", "norm", ")", "{", "return", "ImplPerspectiveOps_F64", ".", "convertPixelToNorm", "(", "K", ",", "pixel", ",", "norm", ")", ";", "}"...
<p> Convenient function for converting from original image pixel coordinate to normalized< image coordinates. If speed is a concern then {@link PinholePtoN_F64} should be used instead. </p> NOTE: norm and pixel can be the same instance. @param K Intrinsic camera calibration matrix @param pixel Pixel coordinate. @para...
[ "<p", ">", "Convenient", "function", "for", "converting", "from", "original", "image", "pixel", "coordinate", "to", "normalized<", "image", "coordinates", ".", "If", "speed", "is", "a", "concern", "then", "{", "@link", "PinholePtoN_F64", "}", "should", "be", "...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/PerspectiveOps.java#L479-L481
RestComm/jdiameter
core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/helpers/IPConverter.java
IPConverter.InetAddressByIPv4
public static InetAddress InetAddressByIPv4(String address) { StringTokenizer addressTokens = new StringTokenizer(address, "."); byte[] bytes; if (addressTokens.countTokens() == 4) { bytes = new byte[]{ getByBytes(addressTokens), getByBytes(addressTokens), getByByt...
java
public static InetAddress InetAddressByIPv4(String address) { StringTokenizer addressTokens = new StringTokenizer(address, "."); byte[] bytes; if (addressTokens.countTokens() == 4) { bytes = new byte[]{ getByBytes(addressTokens), getByBytes(addressTokens), getByByt...
[ "public", "static", "InetAddress", "InetAddressByIPv4", "(", "String", "address", ")", "{", "StringTokenizer", "addressTokens", "=", "new", "StringTokenizer", "(", "address", ",", "\".\"", ")", ";", "byte", "[", "]", "bytes", ";", "if", "(", "addressTokens", "...
Convert defined string to IPv4 object instance @param address string representation of ip address @return IPv4 object instance
[ "Convert", "defined", "string", "to", "IPv4", "object", "instance" ]
train
https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/helpers/IPConverter.java#L63-L83
apereo/cas
support/cas-server-support-aws/src/main/java/org/apereo/cas/aws/ChainingAWSCredentialsProvider.java
ChainingAWSCredentialsProvider.getInstance
public static AWSCredentialsProvider getInstance(final String credentialAccessKey, final String credentialSecretKey) { return getInstance(credentialAccessKey, credentialSecretKey, null, null, null); }
java
public static AWSCredentialsProvider getInstance(final String credentialAccessKey, final String credentialSecretKey) { return getInstance(credentialAccessKey, credentialSecretKey, null, null, null); }
[ "public", "static", "AWSCredentialsProvider", "getInstance", "(", "final", "String", "credentialAccessKey", ",", "final", "String", "credentialSecretKey", ")", "{", "return", "getInstance", "(", "credentialAccessKey", ",", "credentialSecretKey", ",", "null", ",", "null"...
Gets instance. @param credentialAccessKey the credential access key @param credentialSecretKey the credential secret key @return the instance
[ "Gets", "instance", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-aws/src/main/java/org/apereo/cas/aws/ChainingAWSCredentialsProvider.java#L53-L55
dustin/java-memcached-client
src/main/java/net/spy/memcached/protocol/ascii/OperationImpl.java
OperationImpl.setArguments
protected final void setArguments(ByteBuffer bb, Object... args) { boolean wasFirst = true; for (Object o : args) { if (wasFirst) { wasFirst = false; } else { bb.put((byte) ' '); } bb.put(KeyUtil.getKeyBytes(String.valueOf(o))); } bb.put(CRLF); }
java
protected final void setArguments(ByteBuffer bb, Object... args) { boolean wasFirst = true; for (Object o : args) { if (wasFirst) { wasFirst = false; } else { bb.put((byte) ' '); } bb.put(KeyUtil.getKeyBytes(String.valueOf(o))); } bb.put(CRLF); }
[ "protected", "final", "void", "setArguments", "(", "ByteBuffer", "bb", ",", "Object", "...", "args", ")", "{", "boolean", "wasFirst", "=", "true", ";", "for", "(", "Object", "o", ":", "args", ")", "{", "if", "(", "wasFirst", ")", "{", "wasFirst", "=", ...
Set some arguments for an operation into the given byte buffer.
[ "Set", "some", "arguments", "for", "an", "operation", "into", "the", "given", "byte", "buffer", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/protocol/ascii/OperationImpl.java#L99-L110
onepf/OpenIAB
library/src/main/java/org/onepf/oms/OpenIabHelper.java
OpenIabHelper.getSku
@NotNull public static String getSku(@NotNull final String appStoreName, @NotNull String storeSku) { return SkuManager.getInstance().getSku(appStoreName, storeSku); }
java
@NotNull public static String getSku(@NotNull final String appStoreName, @NotNull String storeSku) { return SkuManager.getInstance().getSku(appStoreName, storeSku); }
[ "@", "NotNull", "public", "static", "String", "getSku", "(", "@", "NotNull", "final", "String", "appStoreName", ",", "@", "NotNull", "String", "storeSku", ")", "{", "return", "SkuManager", ".", "getInstance", "(", ")", ".", "getSku", "(", "appStoreName", ","...
Returns a mapped application internal SKU using the store name and a store SKU. @see org.onepf.oms.SkuManager#mapSku(String, String, String) @deprecated Use {@link org.onepf.oms.SkuManager#getSku(String, String)}
[ "Returns", "a", "mapped", "application", "internal", "SKU", "using", "the", "store", "name", "and", "a", "store", "SKU", "." ]
train
https://github.com/onepf/OpenIAB/blob/90552d53c5303b322940d96a0c4b7cb797d78760/library/src/main/java/org/onepf/oms/OpenIabHelper.java#L378-L381
leancloud/java-sdk-all
realtime/src/main/java/cn/leancloud/session/AVDefaultConnectionListener.java
AVDefaultConnectionListener.processConversationDeliveredAt
private void processConversationDeliveredAt(String conversationId, int convType, long timestamp) { AVConversationHolder conversation = session.getConversationHolder(conversationId, convType); conversation.onConversationDeliveredAtEvent(timestamp); }
java
private void processConversationDeliveredAt(String conversationId, int convType, long timestamp) { AVConversationHolder conversation = session.getConversationHolder(conversationId, convType); conversation.onConversationDeliveredAtEvent(timestamp); }
[ "private", "void", "processConversationDeliveredAt", "(", "String", "conversationId", ",", "int", "convType", ",", "long", "timestamp", ")", "{", "AVConversationHolder", "conversation", "=", "session", ".", "getConversationHolder", "(", "conversationId", ",", "convType"...
处理 v2 版本中 conversation 的 deliveredAt 事件 @param conversationId @param timestamp
[ "处理", "v2", "版本中", "conversation", "的", "deliveredAt", "事件" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/realtime/src/main/java/cn/leancloud/session/AVDefaultConnectionListener.java#L539-L542
KyoriPowered/text
api/src/main/java/net/kyori/text/event/ClickEvent.java
ClickEvent.suggestCommand
public static @NonNull ClickEvent suggestCommand(final @NonNull String command) { return new ClickEvent(Action.SUGGEST_COMMAND, command); }
java
public static @NonNull ClickEvent suggestCommand(final @NonNull String command) { return new ClickEvent(Action.SUGGEST_COMMAND, command); }
[ "public", "static", "@", "NonNull", "ClickEvent", "suggestCommand", "(", "final", "@", "NonNull", "String", "command", ")", "{", "return", "new", "ClickEvent", "(", "Action", ".", "SUGGEST_COMMAND", ",", "command", ")", ";", "}" ]
Creates a click event that suggests a command. @param command the command to suggest @return a click event
[ "Creates", "a", "click", "event", "that", "suggests", "a", "command", "." ]
train
https://github.com/KyoriPowered/text/blob/4496c593bf89e8fb036dd6efe26f8ac60f7655c9/api/src/main/java/net/kyori/text/event/ClickEvent.java#L86-L88
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.xmlConversionTypeIncorrect
public static void xmlConversionTypeIncorrect(String conversionName,String xmlPath,String className,String type){ throw new XmlConversionTypeException(MSG.INSTANCE.message(xmlConversionTypeException,conversionName,xmlPath,className,type)); }
java
public static void xmlConversionTypeIncorrect(String conversionName,String xmlPath,String className,String type){ throw new XmlConversionTypeException(MSG.INSTANCE.message(xmlConversionTypeException,conversionName,xmlPath,className,type)); }
[ "public", "static", "void", "xmlConversionTypeIncorrect", "(", "String", "conversionName", ",", "String", "xmlPath", ",", "String", "className", ",", "String", "type", ")", "{", "throw", "new", "XmlConversionTypeException", "(", "MSG", ".", "INSTANCE", ".", "messa...
Thrown if conversion type is wrong. @param conversionName conversion name @param xmlPath xml path @param className class name @param type type
[ "Thrown", "if", "conversion", "type", "is", "wrong", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L338-L340
undertow-io/undertow
core/src/main/java/io/undertow/util/FlexBase64.java
FlexBase64.encodeStringURL
public static String encodeStringURL(byte[] source, int pos, int limit, boolean wrap) { return Encoder.encodeString(source, pos, limit, wrap, true); }
java
public static String encodeStringURL(byte[] source, int pos, int limit, boolean wrap) { return Encoder.encodeString(source, pos, limit, wrap, true); }
[ "public", "static", "String", "encodeStringURL", "(", "byte", "[", "]", "source", ",", "int", "pos", ",", "int", "limit", ",", "boolean", "wrap", ")", "{", "return", "Encoder", ".", "encodeString", "(", "source", ",", "pos", ",", "limit", ",", "wrap", ...
Encodes a fixed and complete byte array into a Base64url String. <p>This method is only useful for applications which require a String and have all data to be encoded up-front. Note that byte arrays or buffers are almost always a better storage choice. They consume half the memory and can be reused (modified). In othe...
[ "Encodes", "a", "fixed", "and", "complete", "byte", "array", "into", "a", "Base64url", "String", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/FlexBase64.java#L212-L214
hazelcast/hazelcast
hazelcast-client/src/main/java/com/hazelcast/client/config/ClientConfigXmlGenerator.java
ClientConfigXmlGenerator.generate
public static String generate(ClientConfig clientConfig, int indent) { Preconditions.isNotNull(clientConfig, "ClientConfig"); StringBuilder xml = new StringBuilder(); xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"); XmlGenerator gen = new XmlGenerator(xml); gen.open("...
java
public static String generate(ClientConfig clientConfig, int indent) { Preconditions.isNotNull(clientConfig, "ClientConfig"); StringBuilder xml = new StringBuilder(); xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"); XmlGenerator gen = new XmlGenerator(xml); gen.open("...
[ "public", "static", "String", "generate", "(", "ClientConfig", "clientConfig", ",", "int", "indent", ")", "{", "Preconditions", ".", "isNotNull", "(", "clientConfig", ",", "\"ClientConfig\"", ")", ";", "StringBuilder", "xml", "=", "new", "StringBuilder", "(", ")...
Transforms the given {@link ClientConfig} to xml string formatting the output with given {@code indent}, -1 means no formatting.
[ "Transforms", "the", "given", "{" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/config/ClientConfigXmlGenerator.java#L86-L141
casmi/casmi
src/main/java/casmi/graphics/element/Quad.java
Quad.getConer
public Vector3D getConer(int index) { Vector3D v = new Vector3D(0, 0, 0); if (index <= 0) { v.set(this.x1, this.y1); } else if (index == 1) { v.set(this.x2, this.y2); } else if (index == 2) { v.set(this.x3, this.y3); } else if (3 <= index) { ...
java
public Vector3D getConer(int index) { Vector3D v = new Vector3D(0, 0, 0); if (index <= 0) { v.set(this.x1, this.y1); } else if (index == 1) { v.set(this.x2, this.y2); } else if (index == 2) { v.set(this.x3, this.y3); } else if (3 <= index) { ...
[ "public", "Vector3D", "getConer", "(", "int", "index", ")", "{", "Vector3D", "v", "=", "new", "Vector3D", "(", "0", ",", "0", ",", "0", ")", ";", "if", "(", "index", "<=", "0", ")", "{", "v", ".", "set", "(", "this", ".", "x1", ",", "this", "...
Gets coordinates of a corner. @param index The index of a corner.
[ "Gets", "coordinates", "of", "a", "corner", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Quad.java#L221-L234
facebookarchive/hadoop-20
src/contrib/failmon/src/java/org/apache/hadoop/contrib/failmon/SMARTParser.java
SMARTParser.readColumns
private EventRecord readColumns(EventRecord er, StringBuffer sb) { Pattern pattern = Pattern.compile("^\\s{0,2}(\\d{1,3}\\s+.*)$", Pattern.MULTILINE); Matcher matcher = pattern.matcher(sb); while (matcher.find()) { String[] tokens = matcher.group(1).split("\\s+"); boolean failed = fals...
java
private EventRecord readColumns(EventRecord er, StringBuffer sb) { Pattern pattern = Pattern.compile("^\\s{0,2}(\\d{1,3}\\s+.*)$", Pattern.MULTILINE); Matcher matcher = pattern.matcher(sb); while (matcher.find()) { String[] tokens = matcher.group(1).split("\\s+"); boolean failed = fals...
[ "private", "EventRecord", "readColumns", "(", "EventRecord", "er", ",", "StringBuffer", "sb", ")", "{", "Pattern", "pattern", "=", "Pattern", ".", "compile", "(", "\"^\\\\s{0,2}(\\\\d{1,3}\\\\s+.*)$\"", ",", "Pattern", ".", "MULTILINE", ")", ";", "Matcher", "match...
Reads attributes in the following format: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 3 Spin_Up_Time 0x0027 180 177 063 Pre-fail Always - 10265 4 Start_Stop_Count 0x0032 253 253 000 Old_age Always - 34...
[ "Reads", "attributes", "in", "the", "following", "format", ":" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/failmon/src/java/org/apache/hadoop/contrib/failmon/SMARTParser.java#L153-L169
spring-projects/spring-data-solr
src/main/java/org/springframework/data/solr/core/query/Criteria.java
Criteria.between
public Criteria between(@Nullable Object lowerBound, @Nullable Object upperBound, boolean includeLowerBound, boolean includeUppderBound) { predicates.add(new Predicate(OperationKey.BETWEEN, new Object[] { lowerBound, upperBound, includeLowerBound, includeUppderBound })); return this; }
java
public Criteria between(@Nullable Object lowerBound, @Nullable Object upperBound, boolean includeLowerBound, boolean includeUppderBound) { predicates.add(new Predicate(OperationKey.BETWEEN, new Object[] { lowerBound, upperBound, includeLowerBound, includeUppderBound })); return this; }
[ "public", "Criteria", "between", "(", "@", "Nullable", "Object", "lowerBound", ",", "@", "Nullable", "Object", "upperBound", ",", "boolean", "includeLowerBound", ",", "boolean", "includeUppderBound", ")", "{", "predicates", ".", "add", "(", "new", "Predicate", "...
Crates new {@link Predicate} for {@code RANGE [lowerBound TO upperBound]} @param lowerBound @param upperBound @param includeLowerBound @param includeUppderBound @return
[ "Crates", "new", "{", "@link", "Predicate", "}", "for", "{", "@code", "RANGE", "[", "lowerBound", "TO", "upperBound", "]", "}" ]
train
https://github.com/spring-projects/spring-data-solr/blob/20be5cb82498b70134dfda6c1a91ad21f8e657e0/src/main/java/org/springframework/data/solr/core/query/Criteria.java#L414-L418
FasterXML/woodstox
src/main/java/com/ctc/wstx/stax/WstxInputFactory.java
WstxInputFactory.createSR
public XMLStreamReader2 createSR(ReaderConfig cfg, String systemId, InputBootstrapper bs, boolean forER, boolean autoCloseInput) throws XMLStreamException { // 16-Aug-2004, TSa: Maybe we have a context? URL src = cfg.getBaseURL(); // If not, maybe we can derive it from system ...
java
public XMLStreamReader2 createSR(ReaderConfig cfg, String systemId, InputBootstrapper bs, boolean forER, boolean autoCloseInput) throws XMLStreamException { // 16-Aug-2004, TSa: Maybe we have a context? URL src = cfg.getBaseURL(); // If not, maybe we can derive it from system ...
[ "public", "XMLStreamReader2", "createSR", "(", "ReaderConfig", "cfg", ",", "String", "systemId", ",", "InputBootstrapper", "bs", ",", "boolean", "forER", ",", "boolean", "autoCloseInput", ")", "throws", "XMLStreamException", "{", "// 16-Aug-2004, TSa: Maybe we have a cont...
Method that is eventually called to create a (full) stream read instance. <p> Note: defined as public method because it needs to be called by SAX implementation. @param systemId System id used for this reader (if any) @param bs Bootstrapper to use for creating actual underlying physical reader @param forER Flag to ind...
[ "Method", "that", "is", "eventually", "called", "to", "create", "a", "(", "full", ")", "stream", "read", "instance", ".", "<p", ">", "Note", ":", "defined", "as", "public", "method", "because", "it", "needs", "to", "be", "called", "by", "SAX", "implement...
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/stax/WstxInputFactory.java#L611-L627
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java
MercatorProjection.pixelYToLatitudeWithScaleFactor
public static double pixelYToLatitudeWithScaleFactor(double pixelY, double scaleFactor, int tileSize) { long mapSize = getMapSizeWithScaleFactor(scaleFactor, tileSize); if (pixelY < 0 || pixelY > mapSize) { throw new IllegalArgumentException("invalid pixelY coordinate at scale " + scaleFacto...
java
public static double pixelYToLatitudeWithScaleFactor(double pixelY, double scaleFactor, int tileSize) { long mapSize = getMapSizeWithScaleFactor(scaleFactor, tileSize); if (pixelY < 0 || pixelY > mapSize) { throw new IllegalArgumentException("invalid pixelY coordinate at scale " + scaleFacto...
[ "public", "static", "double", "pixelYToLatitudeWithScaleFactor", "(", "double", "pixelY", ",", "double", "scaleFactor", ",", "int", "tileSize", ")", "{", "long", "mapSize", "=", "getMapSizeWithScaleFactor", "(", "scaleFactor", ",", "tileSize", ")", ";", "if", "(",...
Converts a pixel Y coordinate at a certain scale to a latitude coordinate. @param pixelY the pixel Y coordinate that should be converted. @param scaleFactor the scale factor at which the coordinate should be converted. @return the latitude value of the pixel Y coordinate. @throws IllegalArgumentException if the g...
[ "Converts", "a", "pixel", "Y", "coordinate", "at", "a", "certain", "scale", "to", "a", "latitude", "coordinate", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/util/MercatorProjection.java#L390-L397
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java
PAbstractObject.getBool
@Override public final boolean getBool(final String key) { Boolean result = optBool(key); if (result == null) { throw new ObjectMissingException(this, key); } return result; }
java
@Override public final boolean getBool(final String key) { Boolean result = optBool(key); if (result == null) { throw new ObjectMissingException(this, key); } return result; }
[ "@", "Override", "public", "final", "boolean", "getBool", "(", "final", "String", "key", ")", "{", "Boolean", "result", "=", "optBool", "(", "key", ")", ";", "if", "(", "result", "==", "null", ")", "{", "throw", "new", "ObjectMissingException", "(", "thi...
Get a property as a boolean or throw exception. @param key the property name
[ "Get", "a", "property", "as", "a", "boolean", "or", "throw", "exception", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java#L154-L161
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.identity_user_user_GET
public OvhUser identity_user_user_GET(String user) throws IOException { String qPath = "/me/identity/user/{user}"; StringBuilder sb = path(qPath, user); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhUser.class); }
java
public OvhUser identity_user_user_GET(String user) throws IOException { String qPath = "/me/identity/user/{user}"; StringBuilder sb = path(qPath, user); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhUser.class); }
[ "public", "OvhUser", "identity_user_user_GET", "(", "String", "user", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/identity/user/{user}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "user", ")", ";", "String", "resp", "=", ...
Get this object properties REST: GET /me/identity/user/{user} @param user [required] User's login
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L204-L209
UrielCh/ovh-java-sdk
ovh-java-sdk-caasregistry/src/main/java/net/minidev/ovh/api/ApiOvhCaasregistry.java
ApiOvhCaasregistry.serviceName_users_POST
public OvhUser serviceName_users_POST(String serviceName, OvhInputUser body) throws IOException { String qPath = "/caas/registry/{serviceName}/users"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "POST", sb.toString(), body); return convertTo(resp, OvhUser.class); }
java
public OvhUser serviceName_users_POST(String serviceName, OvhInputUser body) throws IOException { String qPath = "/caas/registry/{serviceName}/users"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "POST", sb.toString(), body); return convertTo(resp, OvhUser.class); }
[ "public", "OvhUser", "serviceName_users_POST", "(", "String", "serviceName", ",", "OvhInputUser", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/caas/registry/{serviceName}/users\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", ...
Create user REST: POST /caas/registry/{serviceName}/users @param body [required] A registry user account @param serviceName [required] Service name API beta
[ "Create", "user" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-caasregistry/src/main/java/net/minidev/ovh/api/ApiOvhCaasregistry.java#L92-L97
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformpolicylabel.java
transformpolicylabel.get
public static transformpolicylabel get(nitro_service service, String labelname) throws Exception{ transformpolicylabel obj = new transformpolicylabel(); obj.set_labelname(labelname); transformpolicylabel response = (transformpolicylabel) obj.get_resource(service); return response; }
java
public static transformpolicylabel get(nitro_service service, String labelname) throws Exception{ transformpolicylabel obj = new transformpolicylabel(); obj.set_labelname(labelname); transformpolicylabel response = (transformpolicylabel) obj.get_resource(service); return response; }
[ "public", "static", "transformpolicylabel", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "transformpolicylabel", "obj", "=", "new", "transformpolicylabel", "(", ")", ";", "obj", ".", "set_labelname", "(", "la...
Use this API to fetch transformpolicylabel resource of given name .
[ "Use", "this", "API", "to", "fetch", "transformpolicylabel", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformpolicylabel.java#L331-L336
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/mult/VectorVectorMult_DDRM.java
VectorVectorMult_DDRM.addOuterProd
public static void addOuterProd(double gamma , DMatrixD1 x, DMatrixD1 y, DMatrix1Row A ) { int m = A.numRows; int n = A.numCols; int index = 0; if( gamma == 1.0 ) { for( int i = 0; i < m; i++ ) { double xdat = x.get(i); for( int j = 0; j < n; ...
java
public static void addOuterProd(double gamma , DMatrixD1 x, DMatrixD1 y, DMatrix1Row A ) { int m = A.numRows; int n = A.numCols; int index = 0; if( gamma == 1.0 ) { for( int i = 0; i < m; i++ ) { double xdat = x.get(i); for( int j = 0; j < n; ...
[ "public", "static", "void", "addOuterProd", "(", "double", "gamma", ",", "DMatrixD1", "x", ",", "DMatrixD1", "y", ",", "DMatrix1Row", "A", ")", "{", "int", "m", "=", "A", ".", "numRows", ";", "int", "n", "=", "A", ".", "numCols", ";", "int", "index",...
<p> Adds to A &isin; &real; <sup>m &times; n</sup> the results of an outer product multiplication of the two vectors. This is also known as a rank 1 update.<br> <br> A = A + &gamma; x * y<sup>T</sup> where x &isin; &real; <sup>m</sup> and y &isin; &real; <sup>n</sup> are vectors. </p> <p> Which is equivalent to: A<sub...
[ "<p", ">", "Adds", "to", "A", "&isin", ";", "&real", ";", "<sup", ">", "m", "&times", ";", "n<", "/", "sup", ">", "the", "results", "of", "an", "outer", "product", "multiplication", "of", "the", "two", "vectors", ".", "This", "is", "also", "known", ...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/mult/VectorVectorMult_DDRM.java#L192-L212
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/classify/LinearClassifier.java
LinearClassifier.scoreOf
@Deprecated public double scoreOf(RVFDatum<L, F> example, L label) { int iLabel = labelIndex.indexOf(label); double score = 0.0; Counter<F> features = example.asFeaturesCounter(); for (F f : features.keySet()) { score += weight(f, iLabel) * features.getCount(f); } return score + ...
java
@Deprecated public double scoreOf(RVFDatum<L, F> example, L label) { int iLabel = labelIndex.indexOf(label); double score = 0.0; Counter<F> features = example.asFeaturesCounter(); for (F f : features.keySet()) { score += weight(f, iLabel) * features.getCount(f); } return score + ...
[ "@", "Deprecated", "public", "double", "scoreOf", "(", "RVFDatum", "<", "L", ",", "F", ">", "example", ",", "L", "label", ")", "{", "int", "iLabel", "=", "labelIndex", ".", "indexOf", "(", "label", ")", ";", "double", "score", "=", "0.0", ";", "Count...
Returns the score of the RVFDatum for the specified label. Ignores the true label of the RVFDatum.
[ "Returns", "the", "score", "of", "the", "RVFDatum", "for", "the", "specified", "label", ".", "Ignores", "the", "true", "label", "of", "the", "RVFDatum", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/classify/LinearClassifier.java#L205-L214
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/SeqRes2AtomAligner.java
SeqRes2AtomAligner.alignProteinChains
private boolean alignProteinChains(List<Group> seqRes, List<Group> atomRes) { Map<Integer,Integer> seqresIndexPosition = new HashMap<Integer, Integer>(); Map<Integer,Integer> atomIndexPosition = new HashMap<Integer, Integer>(); String seq1 = getFullAtomSequence(seqRes, seqresIndexPosition, false); // Stri...
java
private boolean alignProteinChains(List<Group> seqRes, List<Group> atomRes) { Map<Integer,Integer> seqresIndexPosition = new HashMap<Integer, Integer>(); Map<Integer,Integer> atomIndexPosition = new HashMap<Integer, Integer>(); String seq1 = getFullAtomSequence(seqRes, seqresIndexPosition, false); // Stri...
[ "private", "boolean", "alignProteinChains", "(", "List", "<", "Group", ">", "seqRes", ",", "List", "<", "Group", ">", "atomRes", ")", "{", "Map", "<", "Integer", ",", "Integer", ">", "seqresIndexPosition", "=", "new", "HashMap", "<", "Integer", ",", "Integ...
Aligns two chains of groups, where the first parent is representing the list of amino acids as obtained from the SEQRES records, and the second parent represents the groups obtained from the ATOM records (and containing the actual ATOM information). This does the actual alignment and if a group can be mapped to a posit...
[ "Aligns", "two", "chains", "of", "groups", "where", "the", "first", "parent", "is", "representing", "the", "list", "of", "amino", "acids", "as", "obtained", "from", "the", "SEQRES", "records", "and", "the", "second", "parent", "represents", "the", "groups", ...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/SeqRes2AtomAligner.java#L574-L628
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/com/read/Buffer.java
Buffer.writeBytes
public void writeBytes(byte header, byte[] bytes) { int length = bytes.length; while (remaining() < length + 10) { grow(); } writeLength(length + 1); buf[position++] = header; System.arraycopy(bytes, 0, buf, position, length); position += length; }
java
public void writeBytes(byte header, byte[] bytes) { int length = bytes.length; while (remaining() < length + 10) { grow(); } writeLength(length + 1); buf[position++] = header; System.arraycopy(bytes, 0, buf, position, length); position += length; }
[ "public", "void", "writeBytes", "(", "byte", "header", ",", "byte", "[", "]", "bytes", ")", "{", "int", "length", "=", "bytes", ".", "length", ";", "while", "(", "remaining", "(", ")", "<", "length", "+", "10", ")", "{", "grow", "(", ")", ";", "}...
Write bytes. @param header header byte @param bytes command bytes
[ "Write", "bytes", "." ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/com/read/Buffer.java#L379-L388
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/RecommendationsInner.java
RecommendationsInner.disableAllForWebAppAsync
public Observable<Void> disableAllForWebAppAsync(String resourceGroupName, String siteName) { return disableAllForWebAppWithServiceResponseAsync(resourceGroupName, siteName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { ...
java
public Observable<Void> disableAllForWebAppAsync(String resourceGroupName, String siteName) { return disableAllForWebAppWithServiceResponseAsync(resourceGroupName, siteName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { ...
[ "public", "Observable", "<", "Void", ">", "disableAllForWebAppAsync", "(", "String", "resourceGroupName", ",", "String", "siteName", ")", "{", "return", "disableAllForWebAppWithServiceResponseAsync", "(", "resourceGroupName", ",", "siteName", ")", ".", "map", "(", "ne...
Disable all recommendations for an app. Disable all recommendations for an app. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Name of the app. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if suc...
[ "Disable", "all", "recommendations", "for", "an", "app", ".", "Disable", "all", "recommendations", "for", "an", "app", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/RecommendationsInner.java#L1057-L1064
wisdom-framework/wisdom
framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/impl/WisdomTemplateEngine.java
WisdomTemplateEngine.process
public RenderableString process(Template template, Controller controller, Router router, Assets assets, Map<String, Object> variables) { Context ctx = new Context(); // Add session final org.wisdom.api.http.Context http = org.wisdom.api.http.Context.CONTEXT.get(); ctx.setVari...
java
public RenderableString process(Template template, Controller controller, Router router, Assets assets, Map<String, Object> variables) { Context ctx = new Context(); // Add session final org.wisdom.api.http.Context http = org.wisdom.api.http.Context.CONTEXT.get(); ctx.setVari...
[ "public", "RenderableString", "process", "(", "Template", "template", ",", "Controller", "controller", ",", "Router", "router", ",", "Assets", "assets", ",", "Map", "<", "String", ",", "Object", ">", "variables", ")", "{", "Context", "ctx", "=", "new", "Cont...
Renders the given template. <p> Variables from the session, flash and request parameters are added to the given parameters. @param template the template @param controller the template asking for the rendering @param router the router service @param variables the template parameters @return the rendered HTML pag...
[ "Renders", "the", "given", "template", ".", "<p", ">", "Variables", "from", "the", "session", "flash", "and", "request", "parameters", "are", "added", "to", "the", "given", "parameters", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/framework/thymeleaf-template-engine/src/main/java/org/wisdom/template/thymeleaf/impl/WisdomTemplateEngine.java#L69-L115
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/updater/UpdaterBlock.java
UpdaterBlock.applyRegularization
protected void applyRegularization(Regularization.ApplyStep step, Trainable layer, String paramName, INDArray gradientView, INDArray paramsView, int iter, int epoch, double lr) { //TODO: do this for multiple contiguous params/layers (fewer, larger ops) List<Regularization> l = layer.getConfig().getRegu...
java
protected void applyRegularization(Regularization.ApplyStep step, Trainable layer, String paramName, INDArray gradientView, INDArray paramsView, int iter, int epoch, double lr) { //TODO: do this for multiple contiguous params/layers (fewer, larger ops) List<Regularization> l = layer.getConfig().getRegu...
[ "protected", "void", "applyRegularization", "(", "Regularization", ".", "ApplyStep", "step", ",", "Trainable", "layer", ",", "String", "paramName", ",", "INDArray", "gradientView", ",", "INDArray", "paramsView", ",", "int", "iter", ",", "int", "epoch", ",", "dou...
Apply L1 and L2 regularization, if necessary. Note that L1/L2 may differ for different layers in the same block @param layer The layer to apply L1/L2 to @param paramName Parameter name in the given layer @param gradientView Gradient view array for the layer + param @param paramsView Parameter view array fo...
[ "Apply", "L1", "and", "L2", "regularization", "if", "necessary", ".", "Note", "that", "L1", "/", "L2", "may", "differ", "for", "different", "layers", "in", "the", "same", "block" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/updater/UpdaterBlock.java#L199-L210
sirthias/parboiled
parboiled-java/src/main/java/org/parboiled/transform/AsmUtils.java
AsmUtils.isAssignableTo
public static boolean isAssignableTo(String classInternalName, Class<?> type) { checkArgNotNull(classInternalName, "classInternalName"); checkArgNotNull(type, "type"); return type.isAssignableFrom(getClassForInternalName(classInternalName)); }
java
public static boolean isAssignableTo(String classInternalName, Class<?> type) { checkArgNotNull(classInternalName, "classInternalName"); checkArgNotNull(type, "type"); return type.isAssignableFrom(getClassForInternalName(classInternalName)); }
[ "public", "static", "boolean", "isAssignableTo", "(", "String", "classInternalName", ",", "Class", "<", "?", ">", "type", ")", "{", "checkArgNotNull", "(", "classInternalName", ",", "\"classInternalName\"", ")", ";", "checkArgNotNull", "(", "type", ",", "\"type\""...
Determines whether the class with the given descriptor is assignable to the given type. @param classInternalName the class descriptor @param type the type @return true if the class with the given descriptor is assignable to the given type
[ "Determines", "whether", "the", "class", "with", "the", "given", "descriptor", "is", "assignable", "to", "the", "given", "type", "." ]
train
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-java/src/main/java/org/parboiled/transform/AsmUtils.java#L295-L299
pushbit/sprockets
src/main/java/net/sf/sprockets/util/Elements.java
Elements.addAll
public static boolean addAll(LongCollection collection, long[] array) { boolean changed = false; for (long element : array) { changed |= collection.add(element); } return changed; }
java
public static boolean addAll(LongCollection collection, long[] array) { boolean changed = false; for (long element : array) { changed |= collection.add(element); } return changed; }
[ "public", "static", "boolean", "addAll", "(", "LongCollection", "collection", ",", "long", "[", "]", "array", ")", "{", "boolean", "changed", "=", "false", ";", "for", "(", "long", "element", ":", "array", ")", "{", "changed", "|=", "collection", ".", "a...
Add all elements in the array to the collection. @return true if the collection was changed @since 2.6.0
[ "Add", "all", "elements", "in", "the", "array", "to", "the", "collection", "." ]
train
https://github.com/pushbit/sprockets/blob/5d967317cbb2374c69d33271d3c7b7311e1ea4ac/src/main/java/net/sf/sprockets/util/Elements.java#L44-L50
casmi/casmi
src/main/java/casmi/graphics/element/Lines.java
Lines.setVertex
public void setVertex(int i, double x, double y) { this.x.set(i, x); this.y.set(i, y); this.z.set(i, 0d); calcG(); }
java
public void setVertex(int i, double x, double y) { this.x.set(i, x); this.y.set(i, y); this.z.set(i, 0d); calcG(); }
[ "public", "void", "setVertex", "(", "int", "i", ",", "double", "x", ",", "double", "y", ")", "{", "this", ".", "x", ".", "set", "(", "i", ",", "x", ")", ";", "this", ".", "y", ".", "set", "(", "i", ",", "y", ")", ";", "this", ".", "z", "....
Sets the coordinates of the point. @param i The index number of the point. @param x The x-coordinate of the point. @param y The y-coordinate of the point.
[ "Sets", "the", "coordinates", "of", "the", "point", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Lines.java#L151-L156
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/InverseGaussianDistribution.java
InverseGaussianDistribution.logpdf
public static double logpdf(double x, double mu, double shape) { if(!(x > 0) || x == Double.POSITIVE_INFINITY) { return x == x ? Double.NEGATIVE_INFINITY : Double.NaN; } final double v = (x - mu) / mu; return v < Double.MAX_VALUE ? 0.5 * FastMath.log(shape / (MathUtil.TWOPI * x * x * x)) - shape *...
java
public static double logpdf(double x, double mu, double shape) { if(!(x > 0) || x == Double.POSITIVE_INFINITY) { return x == x ? Double.NEGATIVE_INFINITY : Double.NaN; } final double v = (x - mu) / mu; return v < Double.MAX_VALUE ? 0.5 * FastMath.log(shape / (MathUtil.TWOPI * x * x * x)) - shape *...
[ "public", "static", "double", "logpdf", "(", "double", "x", ",", "double", "mu", ",", "double", "shape", ")", "{", "if", "(", "!", "(", "x", ">", "0", ")", "||", "x", "==", "Double", ".", "POSITIVE_INFINITY", ")", "{", "return", "x", "==", "x", "...
Probability density function of the Wald distribution. @param x The value. @param mu The mean. @param shape Shape parameter @return log PDF of the given Wald distribution at x.
[ "Probability", "density", "function", "of", "the", "Wald", "distribution", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/InverseGaussianDistribution.java#L181-L187
mbenson/therian
core/src/main/java/therian/operator/copy/BeanToMapCopier.java
BeanToMapCopier.supports
@Override public boolean supports(TherianContext context, Copy<? extends Object, ? extends Map> copy) { if (!super.supports(context, copy)) { return false; } final Type targetKeyType = getKeyType(copy.getTargetPosition()); final Position.ReadWrite<?> targetKey = Pos...
java
@Override public boolean supports(TherianContext context, Copy<? extends Object, ? extends Map> copy) { if (!super.supports(context, copy)) { return false; } final Type targetKeyType = getKeyType(copy.getTargetPosition()); final Position.ReadWrite<?> targetKey = Pos...
[ "@", "Override", "public", "boolean", "supports", "(", "TherianContext", "context", ",", "Copy", "<", "?", "extends", "Object", ",", "?", "extends", "Map", ">", "copy", ")", "{", "if", "(", "!", "super", ".", "supports", "(", "context", ",", "copy", ")...
If at least one property name can be converted to an assignable key, say the operation is supported and we'll give it a shot.
[ "If", "at", "least", "one", "property", "name", "can", "be", "converted", "to", "an", "assignable", "key", "say", "the", "operation", "is", "supported", "and", "we", "ll", "give", "it", "a", "shot", "." ]
train
https://github.com/mbenson/therian/blob/0653505f73e2a6f5b0abc394ea6d83af03408254/core/src/main/java/therian/operator/copy/BeanToMapCopier.java#L84-L94
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/cmp/cmppolicylabel_stats.java
cmppolicylabel_stats.get
public static cmppolicylabel_stats get(nitro_service service, String labelname) throws Exception{ cmppolicylabel_stats obj = new cmppolicylabel_stats(); obj.set_labelname(labelname); cmppolicylabel_stats response = (cmppolicylabel_stats) obj.stat_resource(service); return response; }
java
public static cmppolicylabel_stats get(nitro_service service, String labelname) throws Exception{ cmppolicylabel_stats obj = new cmppolicylabel_stats(); obj.set_labelname(labelname); cmppolicylabel_stats response = (cmppolicylabel_stats) obj.stat_resource(service); return response; }
[ "public", "static", "cmppolicylabel_stats", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "cmppolicylabel_stats", "obj", "=", "new", "cmppolicylabel_stats", "(", ")", ";", "obj", ".", "set_labelname", "(", "la...
Use this API to fetch statistics of cmppolicylabel_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "cmppolicylabel_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/cmp/cmppolicylabel_stats.java#L149-L154
bullhorn/sdk-rest
src/main/java/com/bullhornsdk/data/api/helper/RestUriVariablesFactory.java
RestUriVariablesFactory.addModifyingUriVariables
private void addModifyingUriVariables(Map<String, String> uriVariables, BullhornEntityInfo entityInfo) { String bhRestToken = bullhornApiRest.getBhRestToken(); uriVariables.put(BH_REST_TOKEN, bhRestToken); uriVariables.put(ENTITY_TYPE, entityInfo.getName()); uriVariables.put(EXECUTE_FORM...
java
private void addModifyingUriVariables(Map<String, String> uriVariables, BullhornEntityInfo entityInfo) { String bhRestToken = bullhornApiRest.getBhRestToken(); uriVariables.put(BH_REST_TOKEN, bhRestToken); uriVariables.put(ENTITY_TYPE, entityInfo.getName()); uriVariables.put(EXECUTE_FORM...
[ "private", "void", "addModifyingUriVariables", "(", "Map", "<", "String", ",", "String", ">", "uriVariables", ",", "BullhornEntityInfo", "entityInfo", ")", "{", "String", "bhRestToken", "=", "bullhornApiRest", ".", "getBhRestToken", "(", ")", ";", "uriVariables", ...
Adds common URI Variables for calls that are creating, updating, or deleting data. Adds the execute form triggers url parameter if it has been configured. @param uriVariables The variables map to add the flag to @param entityInfo The bullhorn entity that is being modified by this call
[ "Adds", "common", "URI", "Variables", "for", "calls", "that", "are", "creating", "updating", "or", "deleting", "data", "." ]
train
https://github.com/bullhorn/sdk-rest/blob/0c75a141c768bb31510afc3a412c11bd101eca06/src/main/java/com/bullhornsdk/data/api/helper/RestUriVariablesFactory.java#L490-L495
wildfly/wildfly-core
cli/src/main/java/org/jboss/as/cli/parsing/ParserUtil.java
ParserUtil.parseCommandArgs
public static String parseCommandArgs(String commandLine, final CommandLineParser.CallbackHandler handler) throws CommandFormatException { if(commandLine == null) { return null; } final ParsingStateCallbackHandler callbackHandler = getCallbackHandler(handler); return StatePar...
java
public static String parseCommandArgs(String commandLine, final CommandLineParser.CallbackHandler handler) throws CommandFormatException { if(commandLine == null) { return null; } final ParsingStateCallbackHandler callbackHandler = getCallbackHandler(handler); return StatePar...
[ "public", "static", "String", "parseCommandArgs", "(", "String", "commandLine", ",", "final", "CommandLineParser", ".", "CallbackHandler", "handler", ")", "throws", "CommandFormatException", "{", "if", "(", "commandLine", "==", "null", ")", "{", "return", "null", ...
Returns the string which was actually parsed with all the substitutions performed
[ "Returns", "the", "string", "which", "was", "actually", "parsed", "with", "all", "the", "substitutions", "performed" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/parsing/ParserUtil.java#L170-L176
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/PushbackReader.java
PushbackReader.unread
public void unread(char cbuf[], int off, int len) throws IOException { synchronized (lock) { ensureOpen(); if (len > pos) throw new IOException("Pushback buffer overflow"); pos -= len; System.arraycopy(cbuf, off, buf, pos, len); } }
java
public void unread(char cbuf[], int off, int len) throws IOException { synchronized (lock) { ensureOpen(); if (len > pos) throw new IOException("Pushback buffer overflow"); pos -= len; System.arraycopy(cbuf, off, buf, pos, len); } }
[ "public", "void", "unread", "(", "char", "cbuf", "[", "]", ",", "int", "off", ",", "int", "len", ")", "throws", "IOException", "{", "synchronized", "(", "lock", ")", "{", "ensureOpen", "(", ")", ";", "if", "(", "len", ">", "pos", ")", "throw", "new...
Pushes back a portion of an array of characters by copying it to the front of the pushback buffer. After this method returns, the next character to be read will have the value <code>cbuf[off]</code>, the character after that will have the value <code>cbuf[off+1]</code>, and so forth. @param cbuf Character array @pa...
[ "Pushes", "back", "a", "portion", "of", "an", "array", "of", "characters", "by", "copying", "it", "to", "the", "front", "of", "the", "pushback", "buffer", ".", "After", "this", "method", "returns", "the", "next", "character", "to", "be", "read", "will", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/PushbackReader.java#L174-L182
Erudika/para
para-core/src/main/java/com/erudika/para/utils/RegistryUtils.java
RegistryUtils.putValue
public static void putValue(String registryName, String key, Object value) { if (StringUtils.isBlank(registryName) || StringUtils.isBlank(key) || value == null) { return; } Sysprop registryObject = readRegistryObject(registryName); if (registryObject == null) { registryObject = new Sysprop(getRegistryID(r...
java
public static void putValue(String registryName, String key, Object value) { if (StringUtils.isBlank(registryName) || StringUtils.isBlank(key) || value == null) { return; } Sysprop registryObject = readRegistryObject(registryName); if (registryObject == null) { registryObject = new Sysprop(getRegistryID(r...
[ "public", "static", "void", "putValue", "(", "String", "registryName", ",", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "registryName", ")", "||", "StringUtils", ".", "isBlank", "(", "key", ")", "||", ...
Add a specific value to a registry. If the registry doesn't exist yet, create it. @param registryName the name of the registry. @param key the unique key corresponding to the value to insert (typically an appid). @param value the value to add to the registry.
[ "Add", "a", "specific", "value", "to", "a", "registry", ".", "If", "the", "registry", "doesn", "t", "exist", "yet", "create", "it", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-core/src/main/java/com/erudika/para/utils/RegistryUtils.java#L44-L57
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/SARLEclipsePlugin.java
SARLEclipsePlugin.openError
public void openError(Shell shell, String title, String message, Throwable exception) { final Throwable ex = (exception != null) ? Throwables.getRootCause(exception) : null; if (ex != null) { log(ex); final IStatus status = createStatus(IStatus.ERROR, message, ex); ErrorDialog.openError(shell, title, messa...
java
public void openError(Shell shell, String title, String message, Throwable exception) { final Throwable ex = (exception != null) ? Throwables.getRootCause(exception) : null; if (ex != null) { log(ex); final IStatus status = createStatus(IStatus.ERROR, message, ex); ErrorDialog.openError(shell, title, messa...
[ "public", "void", "openError", "(", "Shell", "shell", ",", "String", "title", ",", "String", "message", ",", "Throwable", "exception", ")", "{", "final", "Throwable", "ex", "=", "(", "exception", "!=", "null", ")", "?", "Throwables", ".", "getRootCause", "...
Display an error dialog and log the error. @param shell the parent container. @param title the title of the dialog box. @param message the message to display into the dialog box. @param exception the exception to be logged. @since 0.6 @see #log(Throwable)
[ "Display", "an", "error", "dialog", "and", "log", "the", "error", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/SARLEclipsePlugin.java#L375-L384
phax/ph-javacc-maven-plugin
src/main/java/org/codehaus/mojo/javacc/UrlUtils.java
UrlUtils.getResourceRoot
public static File getResourceRoot (final URL url, final String resource) { String path = null; if (url != null) { final String spec = url.toExternalForm (); if ((JAR_FILE).regionMatches (true, 0, spec, 0, JAR_FILE.length ())) { URL jar; try { jar = new ...
java
public static File getResourceRoot (final URL url, final String resource) { String path = null; if (url != null) { final String spec = url.toExternalForm (); if ((JAR_FILE).regionMatches (true, 0, spec, 0, JAR_FILE.length ())) { URL jar; try { jar = new ...
[ "public", "static", "File", "getResourceRoot", "(", "final", "URL", "url", ",", "final", "String", "resource", ")", "{", "String", "path", "=", "null", ";", "if", "(", "url", "!=", "null", ")", "{", "final", "String", "spec", "=", "url", ".", "toExtern...
Gets the absolute filesystem path to the class path root for the specified resource. The root is either a JAR file or a directory with loose class files. If the URL does not use a supported protocol, an exception will be thrown. @param url The URL to the resource, may be <code>null</code>. @param resource The name of ...
[ "Gets", "the", "absolute", "filesystem", "path", "to", "the", "class", "path", "root", "for", "the", "specified", "resource", ".", "The", "root", "is", "either", "a", "JAR", "file", "or", "a", "directory", "with", "loose", "class", "files", ".", "If", "t...
train
https://github.com/phax/ph-javacc-maven-plugin/blob/99497a971fe59ab2289258ca7ddcfa40e651f19f/src/main/java/org/codehaus/mojo/javacc/UrlUtils.java#L70-L101
apache/flink
flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/QueryableStateClient.java
QueryableStateClient.getKvState
private CompletableFuture<KvStateResponse> getKvState( final JobID jobId, final String queryableStateName, final int keyHashCode, final byte[] serializedKeyAndNamespace) { LOG.debug("Sending State Request to {}.", remoteAddress); try { KvStateRequest request = new KvStateRequest(jobId, queryableState...
java
private CompletableFuture<KvStateResponse> getKvState( final JobID jobId, final String queryableStateName, final int keyHashCode, final byte[] serializedKeyAndNamespace) { LOG.debug("Sending State Request to {}.", remoteAddress); try { KvStateRequest request = new KvStateRequest(jobId, queryableState...
[ "private", "CompletableFuture", "<", "KvStateResponse", ">", "getKvState", "(", "final", "JobID", "jobId", ",", "final", "String", "queryableStateName", ",", "final", "int", "keyHashCode", ",", "final", "byte", "[", "]", "serializedKeyAndNamespace", ")", "{", "LOG...
Returns a future holding the serialized request result. @param jobId JobID of the job the queryable state belongs to @param queryableStateName Name under which the state is queryable @param keyHashCode Integer hash code of the key (result of a call to {@link Object#hashCode()} ...
[ "Returns", "a", "future", "holding", "the", "serialized", "request", "result", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-queryable-state/flink-queryable-state-client-java/src/main/java/org/apache/flink/queryablestate/client/QueryableStateClient.java#L305-L318
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/NodeImpl.java
NodeImpl.validatePrefix
static String validatePrefix(String prefix, boolean namespaceAware, String namespaceURI) { if (!namespaceAware) { throw new DOMException(DOMException.NAMESPACE_ERR, prefix); } if (prefix != null) { if (namespaceURI == null || !DocumentImpl.isXMLIdenti...
java
static String validatePrefix(String prefix, boolean namespaceAware, String namespaceURI) { if (!namespaceAware) { throw new DOMException(DOMException.NAMESPACE_ERR, prefix); } if (prefix != null) { if (namespaceURI == null || !DocumentImpl.isXMLIdenti...
[ "static", "String", "validatePrefix", "(", "String", "prefix", ",", "boolean", "namespaceAware", ",", "String", "namespaceURI", ")", "{", "if", "(", "!", "namespaceAware", ")", "{", "throw", "new", "DOMException", "(", "DOMException", ".", "NAMESPACE_ERR", ",", ...
Validates the element or attribute namespace prefix on this node. @param namespaceAware whether this node is namespace aware @param namespaceURI this node's namespace URI
[ "Validates", "the", "element", "or", "attribute", "namespace", "prefix", "on", "this", "node", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/NodeImpl.java#L205-L220
orhanobut/dialogplus
dialogplus/src/main/java/com/orhanobut/dialogplus/DialogPlusBuilder.java
DialogPlusBuilder.setFooter
public DialogPlusBuilder setFooter(@NonNull View view, boolean fixed) { this.footerView = view; this.fixedFooter = fixed; return this; }
java
public DialogPlusBuilder setFooter(@NonNull View view, boolean fixed) { this.footerView = view; this.fixedFooter = fixed; return this; }
[ "public", "DialogPlusBuilder", "setFooter", "(", "@", "NonNull", "View", "view", ",", "boolean", "fixed", ")", "{", "this", ".", "footerView", "=", "view", ";", "this", ".", "fixedFooter", "=", "fixed", ";", "return", "this", ";", "}" ]
Sets the given view as footer. @param fixed is used to determine whether footer should be fixed or not. Fixed if true, scrollable otherwise
[ "Sets", "the", "given", "view", "as", "footer", "." ]
train
https://github.com/orhanobut/dialogplus/blob/291bf4daaa3c81bf5537125f547913beb8ee2c17/dialogplus/src/main/java/com/orhanobut/dialogplus/DialogPlusBuilder.java#L101-L105
crowmagnumb/s6-util
src/main/java/net/crowmagnumb/util/net/AbstractMultipartUtility.java
AbstractMultipartUtility.addFilePart
public void addFilePart(final String fieldName, final InputStream stream, final String fileName, final String contentType) throws IOException { writer.append("--").append(boundary).append(LINE_FEED); writer.append("Content-Disposition: form-data; name=\"").append(fieldName).append("\""); ...
java
public void addFilePart(final String fieldName, final InputStream stream, final String fileName, final String contentType) throws IOException { writer.append("--").append(boundary).append(LINE_FEED); writer.append("Content-Disposition: form-data; name=\"").append(fieldName).append("\""); ...
[ "public", "void", "addFilePart", "(", "final", "String", "fieldName", ",", "final", "InputStream", "stream", ",", "final", "String", "fileName", ",", "final", "String", "contentType", ")", "throws", "IOException", "{", "writer", ".", "append", "(", "\"--\"", "...
Adds a upload file section to the request @param fieldName name attribute in &lt;input type="file" name="..." /&gt; @param stream input stream of data to upload @param fileName name of file represented by this input stream @param contentType content type of data @throws IOException if problems
[ "Adds", "a", "upload", "file", "section", "to", "the", "request" ]
train
https://github.com/crowmagnumb/s6-util/blob/0f9969bc0809e8a617501fa57c135e9b3984fae0/src/main/java/net/crowmagnumb/util/net/AbstractMultipartUtility.java#L105-L127