repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
lightblueseas/email-tails
src/main/java/de/alpharogroup/email/utils/EmailExtensions.java
EmailExtensions.newAddress
public static Address newAddress(final String emailAddress, final String personal) throws AddressException, UnsupportedEncodingException { """ Creates from the given the address and personal name an Adress-object. @param emailAddress The address in RFC822 format. @param personal The personal name. @retu...
java
public static Address newAddress(final String emailAddress, final String personal) throws AddressException, UnsupportedEncodingException { return newAddress(emailAddress, personal, null); }
[ "public", "static", "Address", "newAddress", "(", "final", "String", "emailAddress", ",", "final", "String", "personal", ")", "throws", "AddressException", ",", "UnsupportedEncodingException", "{", "return", "newAddress", "(", "emailAddress", ",", "personal", ",", "...
Creates from the given the address and personal name an Adress-object. @param emailAddress The address in RFC822 format. @param personal The personal name. @return The created Adress-object from the given address and personal name. @throws UnsupportedEncodingException is thrown if the encoding not supported @throws ...
[ "Creates", "from", "the", "given", "the", "address", "and", "personal", "name", "an", "Adress", "-", "object", "." ]
train
https://github.com/lightblueseas/email-tails/blob/7be6fee3548e61e697cc8e64e90603cb1f505be2/src/main/java/de/alpharogroup/email/utils/EmailExtensions.java#L196-L200
aws/aws-sdk-java
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/ContainerDefinition.java
ContainerDefinition.withDockerLabels
public ContainerDefinition withDockerLabels(java.util.Map<String, String> dockerLabels) { """ <p> A key/value map of labels to add to the container. This parameter maps to <code>Labels</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of th...
java
public ContainerDefinition withDockerLabels(java.util.Map<String, String> dockerLabels) { setDockerLabels(dockerLabels); return this; }
[ "public", "ContainerDefinition", "withDockerLabels", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "dockerLabels", ")", "{", "setDockerLabels", "(", "dockerLabels", ")", ";", "return", "this", ";", "}" ]
<p> A key/value map of labels to add to the container. This parameter maps to <code>Labels</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--label</co...
[ "<p", ">", "A", "key", "/", "value", "map", "of", "labels", "to", "add", "to", "the", "container", ".", "This", "parameter", "maps", "to", "<code", ">", "Labels<", "/", "code", ">", "in", "the", "<a", "href", "=", "https", ":", "//", "docs", ".", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/ContainerDefinition.java#L5546-L5549
shrinkwrap/shrinkwrap
impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/io/tar/TarHeader.java
TarHeader.getNameBytes
public static int getNameBytes(StringBuffer name, byte[] buf, int offset, int length) { """ Move the bytes from the name StringBuffer into the header's buffer. @param header The header buffer into which to copy the name. @param offset The offset into the buffer at which to store. @param length The number o...
java
public static int getNameBytes(StringBuffer name, byte[] buf, int offset, int length) { int i; for (i = 0; i < length && i < name.length(); ++i) { buf[offset + i] = (byte) name.charAt(i); } for (; i < length; ++i) { buf[offset + i] = 0; } ...
[ "public", "static", "int", "getNameBytes", "(", "StringBuffer", "name", ",", "byte", "[", "]", "buf", ",", "int", "offset", ",", "int", "length", ")", "{", "int", "i", ";", "for", "(", "i", "=", "0", ";", "i", "<", "length", "&&", "i", "<", "name...
Move the bytes from the name StringBuffer into the header's buffer. @param header The header buffer into which to copy the name. @param offset The offset into the buffer at which to store. @param length The number of header bytes to store. @return The new offset (offset + length).
[ "Move", "the", "bytes", "from", "the", "name", "StringBuffer", "into", "the", "header", "s", "buffer", "." ]
train
https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/io/tar/TarHeader.java#L400-L412
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/util/concurrent/Monitor.java
Monitor.enterIfInterruptibly
public boolean enterIfInterruptibly(Guard guard, long time, TimeUnit unit) throws InterruptedException { """ Enters this monitor if the guard is satisfied. Blocks at most the given time acquiring the lock, but does not wait for the guard to be satisfied, and may be interrupted. @return whether the monito...
java
public boolean enterIfInterruptibly(Guard guard, long time, TimeUnit unit) throws InterruptedException { if (guard.monitor != this) { throw new IllegalMonitorStateException(); } final ReentrantLock lock = this.lock; if (!lock.tryLock(time, unit)) { return false; } boolean sati...
[ "public", "boolean", "enterIfInterruptibly", "(", "Guard", "guard", ",", "long", "time", ",", "TimeUnit", "unit", ")", "throws", "InterruptedException", "{", "if", "(", "guard", ".", "monitor", "!=", "this", ")", "{", "throw", "new", "IllegalMonitorStateExceptio...
Enters this monitor if the guard is satisfied. Blocks at most the given time acquiring the lock, but does not wait for the guard to be satisfied, and may be interrupted. @return whether the monitor was entered, which guarantees that the guard is now satisfied
[ "Enters", "this", "monitor", "if", "the", "guard", "is", "satisfied", ".", "Blocks", "at", "most", "the", "given", "time", "acquiring", "the", "lock", "but", "does", "not", "wait", "for", "the", "guard", "to", "be", "satisfied", "and", "may", "be", "inte...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/util/concurrent/Monitor.java#L680-L698
xvik/dropwizard-guicey
src/main/java/ru/vyarus/dropwizard/guice/module/context/debug/report/tree/ContextTreeRenderer.java
ContextTreeRenderer.isHidden
@SuppressWarnings("checkstyle:BooleanExpressionComplexity") private boolean isHidden(final ContextTreeConfig config, final ItemInfo info, final Class<?> scope) { """ Checks element visibility according to config. Universal place to check visibility for either simple config items or bundles and special scopes....
java
@SuppressWarnings("checkstyle:BooleanExpressionComplexity") private boolean isHidden(final ContextTreeConfig config, final ItemInfo info, final Class<?> scope) { // item explicitly hidden final boolean hidden = config.getHiddenItems().contains(info.getItemType()); // installer disabled ...
[ "@", "SuppressWarnings", "(", "\"checkstyle:BooleanExpressionComplexity\"", ")", "private", "boolean", "isHidden", "(", "final", "ContextTreeConfig", "config", ",", "final", "ItemInfo", "info", ",", "final", "Class", "<", "?", ">", "scope", ")", "{", "// item explic...
Checks element visibility according to config. Universal place to check visibility for either simple config items or bundles and special scopes. @param config tree configuration @param info current item info @param scope current item rendering scope @return true if item is hidden, false otherwise
[ "Checks", "element", "visibility", "according", "to", "config", ".", "Universal", "place", "to", "check", "visibility", "for", "either", "simple", "config", "items", "or", "bundles", "and", "special", "scopes", "." ]
train
https://github.com/xvik/dropwizard-guicey/blob/dd39ad77283555be21f606d5ebf0f11207a733d4/src/main/java/ru/vyarus/dropwizard/guice/module/context/debug/report/tree/ContextTreeRenderer.java#L203-L220
google/closure-compiler
src/com/google/javascript/rhino/jstype/JSTypeRegistry.java
JSTypeRegistry.createTypeFromCommentNode
@SuppressWarnings("unchecked") public JSType createTypeFromCommentNode(Node n, String sourceName, StaticTypedScope scope) { """ Creates a JSType from the nodes representing a type. @param n The node with type info. @param sourceName The source file name. @param scope A scope for doing type name lookups. ...
java
@SuppressWarnings("unchecked") public JSType createTypeFromCommentNode(Node n, String sourceName, StaticTypedScope scope) { return createFromTypeNodesInternal(n, sourceName, scope, true); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "JSType", "createTypeFromCommentNode", "(", "Node", "n", ",", "String", "sourceName", ",", "StaticTypedScope", "scope", ")", "{", "return", "createFromTypeNodesInternal", "(", "n", ",", "sourceName", ",",...
Creates a JSType from the nodes representing a type. @param n The node with type info. @param sourceName The source file name. @param scope A scope for doing type name lookups.
[ "Creates", "a", "JSType", "from", "the", "nodes", "representing", "a", "type", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/JSTypeRegistry.java#L1971-L1974
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/DatabaseUtils.java
DatabaseUtils.dumpCursor
public static void dumpCursor(Cursor cursor, StringBuilder sb) { """ Prints the contents of a Cursor to a StringBuilder. The position is restored after printing. @param cursor the cursor to print @param sb the StringBuilder to print to """ sb.append(">>>>> Dumping cursor " + cursor + "\n"); ...
java
public static void dumpCursor(Cursor cursor, StringBuilder sb) { sb.append(">>>>> Dumping cursor " + cursor + "\n"); if (cursor != null) { int startPos = cursor.getPosition(); cursor.moveToPosition(-1); while (cursor.moveToNext()) { dumpCurrentRow(cur...
[ "public", "static", "void", "dumpCursor", "(", "Cursor", "cursor", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\">>>>> Dumping cursor \"", "+", "cursor", "+", "\"\\n\"", ")", ";", "if", "(", "cursor", "!=", "null", ")", "{", "int", "...
Prints the contents of a Cursor to a StringBuilder. The position is restored after printing. @param cursor the cursor to print @param sb the StringBuilder to print to
[ "Prints", "the", "contents", "of", "a", "Cursor", "to", "a", "StringBuilder", ".", "The", "position", "is", "restored", "after", "printing", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/DatabaseUtils.java#L505-L517
alrocar/POIProxy
es.alrocar.poiproxy/src/main/java/es/alrocar/poiproxy/proxy/POIProxy.java
POIProxy.onResponseReceived
public String onResponseReceived(String json, DescribeService service, LocalFilter localFilter, POIProxyEvent tempEvent) throws NoParserRegisteredException { """ Called after {@link #doRequest(String)} succesfully downlaods the data. This method gets the {@link JPEParser} implementation given the {@link Des...
java
public String onResponseReceived(String json, DescribeService service, LocalFilter localFilter, POIProxyEvent tempEvent) throws NoParserRegisteredException { final JPEParser jpeParser = JPEParserManager.getInstance().getJPEParser(service.getFormat()); ArrayList<JTSFeature> features = jpeParser.parse(json, servic...
[ "public", "String", "onResponseReceived", "(", "String", "json", ",", "DescribeService", "service", ",", "LocalFilter", "localFilter", ",", "POIProxyEvent", "tempEvent", ")", "throws", "NoParserRegisteredException", "{", "final", "JPEParser", "jpeParser", "=", "JPEParse...
Called after {@link #doRequest(String)} succesfully downlaods the data. This method gets the {@link JPEParser} implementation given the {@link DescribeService#getFormat()} and calls {@link JPEParser#parse(String, DescribeService)} Once the response is parsed succesfully returns the GeoJSON response @param json The j...
[ "Called", "after", "{", "@link", "#doRequest", "(", "String", ")", "}", "succesfully", "downlaods", "the", "data", "." ]
train
https://github.com/alrocar/POIProxy/blob/e1dabe738a862478b2580e90d5fc4209a2997868/es.alrocar.poiproxy/src/main/java/es/alrocar/poiproxy/proxy/POIProxy.java#L693-L716
jenkinsci/java-client-api
jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java
JenkinsServer.getJob
public JobWithDetails getJob(String jobName) throws IOException { """ Get a single Job from the server. @param jobName name of the job to get details of. @return A single Job, null if not present @throws IOException in case of an error. """ return getJob(null, UrlUtils.toFullJobPath(jobName)); ...
java
public JobWithDetails getJob(String jobName) throws IOException { return getJob(null, UrlUtils.toFullJobPath(jobName)); }
[ "public", "JobWithDetails", "getJob", "(", "String", "jobName", ")", "throws", "IOException", "{", "return", "getJob", "(", "null", ",", "UrlUtils", ".", "toFullJobPath", "(", "jobName", ")", ")", ";", "}" ]
Get a single Job from the server. @param jobName name of the job to get details of. @return A single Job, null if not present @throws IOException in case of an error.
[ "Get", "a", "single", "Job", "from", "the", "server", "." ]
train
https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java#L270-L272
alkacon/opencms-core
src/org/opencms/ui/components/CmsInfoButton.java
CmsInfoButton.getLayout
protected VerticalLayout getLayout(final List<String> htmlLines, final List<InfoElementBean> additionalElements) { """ The layout which is shown in window by triggering onclick event of button.<p> @param htmlLines to be shown @param additionalElements further vaadin elements @return vertical layout """ ...
java
protected VerticalLayout getLayout(final List<String> htmlLines, final List<InfoElementBean> additionalElements) { VerticalLayout layout = new VerticalLayout(); Label label = new Label(); label.setWidthUndefined(); layout.setMargin(true); label.setContentMode(ContentMode.HTML); ...
[ "protected", "VerticalLayout", "getLayout", "(", "final", "List", "<", "String", ">", "htmlLines", ",", "final", "List", "<", "InfoElementBean", ">", "additionalElements", ")", "{", "VerticalLayout", "layout", "=", "new", "VerticalLayout", "(", ")", ";", "Label"...
The layout which is shown in window by triggering onclick event of button.<p> @param htmlLines to be shown @param additionalElements further vaadin elements @return vertical layout
[ "The", "layout", "which", "is", "shown", "in", "window", "by", "triggering", "onclick", "event", "of", "button", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/CmsInfoButton.java#L221-L241
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/search/FileSearchExtensions.java
FileSearchExtensions.containsFileRecursive
public static boolean containsFileRecursive(final File parent, final File search) { """ Checks if the given file contains only in the parent file recursively. @param parent The parent directory to search. @param search The file to search. @return 's true if the file exists in the parent directory otherwise ...
java
public static boolean containsFileRecursive(final File parent, final File search) { final File toSearch = search.getAbsoluteFile(); boolean exists = false; final File[] children = parent.getAbsoluteFile().listFiles(); if (children == null) { return false; } final List<File> fileList = Arrays.asList(ch...
[ "public", "static", "boolean", "containsFileRecursive", "(", "final", "File", "parent", ",", "final", "File", "search", ")", "{", "final", "File", "toSearch", "=", "search", ".", "getAbsoluteFile", "(", ")", ";", "boolean", "exists", "=", "false", ";", "fina...
Checks if the given file contains only in the parent file recursively. @param parent The parent directory to search. @param search The file to search. @return 's true if the file exists in the parent directory otherwise false.
[ "Checks", "if", "the", "given", "file", "contains", "only", "in", "the", "parent", "file", "recursively", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/search/FileSearchExtensions.java#L100-L126
bmwcarit/joynr
java/messaging/channel-service/src/main/java/io/joynr/messaging/service/ChannelServiceRestAdapter.java
ChannelServiceRestAdapter.createChannel
@POST @Produces( { """ HTTP POST to create a channel, returns location to new resource which can then be long polled. Since the channel id may later change to be a UUID, not using a PUT but rather POST with used id being returned @param ccid cluster controller id @param atmosphereTrackingId tracking id for...
java
@POST @Produces({ MediaType.TEXT_PLAIN }) public Response createChannel(@QueryParam("ccid") String ccid, @HeaderParam(ChannelServiceConstants.X_ATMOSPHERE_TRACKING_ID) String atmosphereTrackingId) { try { log.info("CREATE channel for channel ID: {}", ccid);...
[ "@", "POST", "@", "Produces", "(", "{", "MediaType", ".", "TEXT_PLAIN", "}", ")", "public", "Response", "createChannel", "(", "@", "QueryParam", "(", "\"ccid\"", ")", "String", "ccid", ",", "@", "HeaderParam", "(", "ChannelServiceConstants", ".", "X_ATMOSPHERE...
HTTP POST to create a channel, returns location to new resource which can then be long polled. Since the channel id may later change to be a UUID, not using a PUT but rather POST with used id being returned @param ccid cluster controller id @param atmosphereTrackingId tracking id for atmosphere @return location to new ...
[ "HTTP", "POST", "to", "create", "a", "channel", "returns", "location", "to", "new", "resource", "which", "can", "then", "be", "long", "polled", ".", "Since", "the", "channel", "id", "may", "later", "change", "to", "be", "a", "UUID", "not", "using", "a", ...
train
https://github.com/bmwcarit/joynr/blob/b7a92bad1cf2f093de080facd2c803560f4c6c26/java/messaging/channel-service/src/main/java/io/joynr/messaging/service/ChannelServiceRestAdapter.java#L130-L168
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractBaseController.java
AbstractBaseController.isEventType
private boolean isEventType(final EventType<? extends Event> testEventType, final EventType<? extends Event> anyEventType) { """ Check the event type given and check the super level if necessary to always return the ANy event type. @param testEventType the sub event type or any instance @param anyEventType the...
java
private boolean isEventType(final EventType<? extends Event> testEventType, final EventType<? extends Event> anyEventType) { return testEventType.equals(anyEventType) || testEventType.getSuperType().equals(anyEventType); }
[ "private", "boolean", "isEventType", "(", "final", "EventType", "<", "?", "extends", "Event", ">", "testEventType", ",", "final", "EventType", "<", "?", "extends", "Event", ">", "anyEventType", ")", "{", "return", "testEventType", ".", "equals", "(", "anyEvent...
Check the event type given and check the super level if necessary to always return the ANy event type. @param testEventType the sub event type or any instance @param anyEventType the eventype.ANY instance @return true if the ANY event type is the same for both objects
[ "Check", "the", "event", "type", "given", "and", "check", "the", "super", "level", "if", "necessary", "to", "always", "return", "the", "ANy", "event", "type", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractBaseController.java#L275-L277
alkacon/opencms-core
src/org/opencms/publish/CmsPublishManager.java
CmsPublishManager.publishProject
public CmsUUID publishProject( CmsObject cms, I_CmsReport report, CmsResource directPublishResource, boolean directPublishSiblings) throws CmsException { """ Direct publishes a specified resource.<p> @param cms the cms request context @param report an instance of <code>{@link I_...
java
public CmsUUID publishProject( CmsObject cms, I_CmsReport report, CmsResource directPublishResource, boolean directPublishSiblings) throws CmsException { return publishProject(cms, report, getPublishList(cms, directPublishResource, directPublishSiblings)); }
[ "public", "CmsUUID", "publishProject", "(", "CmsObject", "cms", ",", "I_CmsReport", "report", ",", "CmsResource", "directPublishResource", ",", "boolean", "directPublishSiblings", ")", "throws", "CmsException", "{", "return", "publishProject", "(", "cms", ",", "report...
Direct publishes a specified resource.<p> @param cms the cms request context @param report an instance of <code>{@link I_CmsReport}</code> to print messages @param directPublishResource a <code>{@link CmsResource}</code> that gets directly published; or <code>null</code> if an entire project gets published. @param dir...
[ "Direct", "publishes", "a", "specified", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/publish/CmsPublishManager.java#L580-L587
auth0/auth0-java
src/main/java/com/auth0/json/mgmt/guardian/TwilioFactorProvider.java
TwilioFactorProvider.setFrom
@Deprecated @JsonProperty("from") public void setFrom(String from) throws IllegalArgumentException { """ Setter for the Twilio From number. @param from the from number to set. @throws IllegalArgumentException when both `from` and `messagingServiceSID` are set @deprecated use the constructor instead ...
java
@Deprecated @JsonProperty("from") public void setFrom(String from) throws IllegalArgumentException { if (messagingServiceSID != null) { throw new IllegalArgumentException("You must specify either `from` or `messagingServiceSID`, but not both"); } this.from = from; }
[ "@", "Deprecated", "@", "JsonProperty", "(", "\"from\"", ")", "public", "void", "setFrom", "(", "String", "from", ")", "throws", "IllegalArgumentException", "{", "if", "(", "messagingServiceSID", "!=", "null", ")", "{", "throw", "new", "IllegalArgumentException", ...
Setter for the Twilio From number. @param from the from number to set. @throws IllegalArgumentException when both `from` and `messagingServiceSID` are set @deprecated use the constructor instead
[ "Setter", "for", "the", "Twilio", "From", "number", "." ]
train
https://github.com/auth0/auth0-java/blob/b7bc099ee9c6cde5a87c4ecfebc6d811aeb1027c/src/main/java/com/auth0/json/mgmt/guardian/TwilioFactorProvider.java#L75-L82
RestComm/Restcomm-Connect
restcomm/restcomm.http/src/main/java/org/restcomm/connect/http/security/SecurityFilter.java
SecurityFilter.filterClosedAccounts
protected void filterClosedAccounts(UserIdentityContext userIdentityContext, String path) { """ filter out accounts that are not active @param userIdentityContext """ if (userIdentityContext.getEffectiveAccount() != null && !userIdentityContext.getEffectiveAccount().getStatus().equals(Account.Status...
java
protected void filterClosedAccounts(UserIdentityContext userIdentityContext, String path) { if (userIdentityContext.getEffectiveAccount() != null && !userIdentityContext.getEffectiveAccount().getStatus().equals(Account.Status.ACTIVE)) { if (userIdentityContext.getEffectiveAccount().getStatus().equal...
[ "protected", "void", "filterClosedAccounts", "(", "UserIdentityContext", "userIdentityContext", ",", "String", "path", ")", "{", "if", "(", "userIdentityContext", ".", "getEffectiveAccount", "(", ")", "!=", "null", "&&", "!", "userIdentityContext", ".", "getEffectiveA...
filter out accounts that are not active @param userIdentityContext
[ "filter", "out", "accounts", "that", "are", "not", "active" ]
train
https://github.com/RestComm/Restcomm-Connect/blob/2194dee4fc524cdfd0af77a218ba5f212f97f7c5/restcomm/restcomm.http/src/main/java/org/restcomm/connect/http/security/SecurityFilter.java#L105-L112
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/StreamingLocatorsInner.java
StreamingLocatorsInner.listPathsAsync
public Observable<ListPathsResponseInner> listPathsAsync(String resourceGroupName, String accountName, String streamingLocatorName) { """ List Paths. List Paths supported by this Streaming Locator. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Me...
java
public Observable<ListPathsResponseInner> listPathsAsync(String resourceGroupName, String accountName, String streamingLocatorName) { return listPathsWithServiceResponseAsync(resourceGroupName, accountName, streamingLocatorName).map(new Func1<ServiceResponse<ListPathsResponseInner>, ListPathsResponseInner>() { ...
[ "public", "Observable", "<", "ListPathsResponseInner", ">", "listPathsAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "streamingLocatorName", ")", "{", "return", "listPathsWithServiceResponseAsync", "(", "resourceGroupName", ",", "...
List Paths. List Paths supported by this Streaming Locator. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param streamingLocatorName The Streaming Locator name. @throws IllegalArgumentException thrown if parameters fail the v...
[ "List", "Paths", ".", "List", "Paths", "supported", "by", "this", "Streaming", "Locator", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/StreamingLocatorsInner.java#L800-L807
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/conversion/smile/SmileConverter.java
SmileConverter.nominalDataset
public AttributeDataset nominalDataset(String responseColName, String... variablesColNames) { """ Returns a dataset where the response column is nominal. E.g. to be used for a classification """ return dataset(table.numberColumn(responseColName), AttributeType.NOMINAL, table.columns(variablesColNames))...
java
public AttributeDataset nominalDataset(String responseColName, String... variablesColNames) { return dataset(table.numberColumn(responseColName), AttributeType.NOMINAL, table.columns(variablesColNames)); }
[ "public", "AttributeDataset", "nominalDataset", "(", "String", "responseColName", ",", "String", "...", "variablesColNames", ")", "{", "return", "dataset", "(", "table", ".", "numberColumn", "(", "responseColName", ")", ",", "AttributeType", ".", "NOMINAL", ",", "...
Returns a dataset where the response column is nominal. E.g. to be used for a classification
[ "Returns", "a", "dataset", "where", "the", "response", "column", "is", "nominal", ".", "E", ".", "g", ".", "to", "be", "used", "for", "a", "classification" ]
train
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/conversion/smile/SmileConverter.java#L70-L72
Swagger2Markup/swagger2markup
src/main/java/io/github/swagger2markup/Swagger2MarkupProperties.java
Swagger2MarkupProperties.getString
public String getString(String key, String defaultValue) { """ Return the String property value associated with the given key, or {@code defaultValue} if the key cannot be resolved. @param key the property name to resolve @param defaultValue the default value to return if no value is found @return T...
java
public String getString(String key, String defaultValue) { return configuration.getString(key, defaultValue); }
[ "public", "String", "getString", "(", "String", "key", ",", "String", "defaultValue", ")", "{", "return", "configuration", ".", "getString", "(", "key", ",", "defaultValue", ")", ";", "}" ]
Return the String property value associated with the given key, or {@code defaultValue} if the key cannot be resolved. @param key the property name to resolve @param defaultValue the default value to return if no value is found @return The string property
[ "Return", "the", "String", "property", "value", "associated", "with", "the", "given", "key", "or", "{", "@code", "defaultValue", "}", "if", "the", "key", "cannot", "be", "resolved", "." ]
train
https://github.com/Swagger2Markup/swagger2markup/blob/da83465f19a2f8a0f1fba873b5762bca8587896b/src/main/java/io/github/swagger2markup/Swagger2MarkupProperties.java#L111-L113
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsModelPageHelper.java
CmsModelPageHelper.disableModelPage
public void disableModelPage(CmsResource sitemapConfig, CmsUUID structureId, boolean disabled) throws CmsException { """ Disables the given model page.<p> @param sitemapConfig the configuration resource @param structureId the model page id @param disabled <code>true</code> to disabe the entry @throws CmsEx...
java
public void disableModelPage(CmsResource sitemapConfig, CmsUUID structureId, boolean disabled) throws CmsException { CmsFile sitemapConfigFile = m_cms.readFile(sitemapConfig); CmsXmlContent content = CmsXmlContentFactory.unmarshal(m_cms, sitemapConfigFile); CmsConfigurationReader reader = new C...
[ "public", "void", "disableModelPage", "(", "CmsResource", "sitemapConfig", ",", "CmsUUID", "structureId", ",", "boolean", "disabled", ")", "throws", "CmsException", "{", "CmsFile", "sitemapConfigFile", "=", "m_cms", ".", "readFile", "(", "sitemapConfig", ")", ";", ...
Disables the given model page.<p> @param sitemapConfig the configuration resource @param structureId the model page id @param disabled <code>true</code> to disabe the entry @throws CmsException if something goes wrong
[ "Disables", "the", "given", "model", "page", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsModelPageHelper.java#L245-L278
igniterealtime/Smack
smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java
OmemoService.createRatchetUpdateElement
OmemoElement createRatchetUpdateElement(OmemoManager.LoggedInOmemoManager managerGuard, OmemoDevice contactsDevice) throws InterruptedException, SmackException.NoResponseException, CorruptedOmemoKeyException, SmackException.NotConnectedException, Canno...
java
OmemoElement createRatchetUpdateElement(OmemoManager.LoggedInOmemoManager managerGuard, OmemoDevice contactsDevice) throws InterruptedException, SmackException.NoResponseException, CorruptedOmemoKeyException, SmackException.NotConnectedException, Canno...
[ "OmemoElement", "createRatchetUpdateElement", "(", "OmemoManager", ".", "LoggedInOmemoManager", "managerGuard", ",", "OmemoDevice", "contactsDevice", ")", "throws", "InterruptedException", ",", "SmackException", ".", "NoResponseException", ",", "CorruptedOmemoKeyException", ","...
Create an empty OMEMO message, which is used to forward the ratchet of the recipient. This message type is typically used to create stable sessions. Note that trust decisions are ignored for the creation of this message. @param managerGuard Logged in OmemoManager @param contactsDevice OmemoDevice of the contact @retur...
[ "Create", "an", "empty", "OMEMO", "message", "which", "is", "used", "to", "forward", "the", "ratchet", "of", "the", "recipient", ".", "This", "message", "type", "is", "typically", "used", "to", "create", "stable", "sessions", ".", "Note", "that", "trust", ...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/OmemoService.java#L283-L327
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/AccountsInner.java
AccountsInner.beginCreate
public DataLakeAnalyticsAccountInner beginCreate(String resourceGroupName, String accountName, CreateDataLakeAnalyticsAccountParameters parameters) { """ Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. @param resourceGroupNam...
java
public DataLakeAnalyticsAccountInner beginCreate(String resourceGroupName, String accountName, CreateDataLakeAnalyticsAccountParameters parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().body(); }
[ "public", "DataLakeAnalyticsAccountInner", "beginCreate", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "CreateDataLakeAnalyticsAccountParameters", "parameters", ")", "{", "return", "beginCreateWithServiceResponseAsync", "(", "resourceGroupName", ",", "...
Creates the specified Data Lake Analytics account. This supplies the user with computation services for Data Lake Analytics workloads. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Analytics account. @param parameters Parameters supplied to create a new Dat...
[ "Creates", "the", "specified", "Data", "Lake", "Analytics", "account", ".", "This", "supplies", "the", "user", "with", "computation", "services", "for", "Data", "Lake", "Analytics", "workloads", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/AccountsInner.java#L712-L714
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/BugInstance.java
BugInstance.addSourceLineRange
@Nonnull public BugInstance addSourceLineRange(ClassContext classContext, PreorderVisitor visitor, int startPC, int endPC) { """ Add a source line annotation describing the source line numbers for a range of instructions in the method being visited by the given visitor. Note that if the method does not have ...
java
@Nonnull public BugInstance addSourceLineRange(ClassContext classContext, PreorderVisitor visitor, int startPC, int endPC) { SourceLineAnnotation sourceLineAnnotation = SourceLineAnnotation.fromVisitedInstructionRange(classContext, visitor, startPC, endPC); requireNonNull(sourceLineA...
[ "@", "Nonnull", "public", "BugInstance", "addSourceLineRange", "(", "ClassContext", "classContext", ",", "PreorderVisitor", "visitor", ",", "int", "startPC", ",", "int", "endPC", ")", "{", "SourceLineAnnotation", "sourceLineAnnotation", "=", "SourceLineAnnotation", ".",...
Add a source line annotation describing the source line numbers for a range of instructions in the method being visited by the given visitor. Note that if the method does not have line number information, then no source line annotation will be added. @param classContext the ClassContext @param visitor a BetterVisitor ...
[ "Add", "a", "source", "line", "annotation", "describing", "the", "source", "line", "numbers", "for", "a", "range", "of", "instructions", "in", "the", "method", "being", "visited", "by", "the", "given", "visitor", ".", "Note", "that", "if", "the", "method", ...
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/BugInstance.java#L1796-L1803
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.Taneja
public static double Taneja(double[] p, double[] q) { """ Gets the Taneja divergence. @param p P vector. @param q Q vector. @return The Taneja divergence between p and q. """ double r = 0; for (int i = 0; i < p.length; i++) { if (p[i] != 0 && q[i] != 0) { double...
java
public static double Taneja(double[] p, double[] q) { double r = 0; for (int i = 0; i < p.length; i++) { if (p[i] != 0 && q[i] != 0) { double pq = p[i] + q[i]; r += (pq / 2) * Math.log(pq / (2 * Math.sqrt(p[i] * q[i]))); } } return ...
[ "public", "static", "double", "Taneja", "(", "double", "[", "]", "p", ",", "double", "[", "]", "q", ")", "{", "double", "r", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "p", ".", "length", ";", "i", "++", ")", "{", "if",...
Gets the Taneja divergence. @param p P vector. @param q Q vector. @return The Taneja divergence between p and q.
[ "Gets", "the", "Taneja", "divergence", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L889-L898
cloudfoundry/cf-java-client
cloudfoundry-util/src/main/java/org/cloudfoundry/util/JobUtils.java
JobUtils.waitForCompletion
public static Mono<Void> waitForCompletion(CloudFoundryClient cloudFoundryClient, Duration completionTimeout, String jobId) { """ Waits for a job V3 to complete @param cloudFoundryClient the client to use to request job status @param completionTimeout the amount of time to wait for the job to complete. @para...
java
public static Mono<Void> waitForCompletion(CloudFoundryClient cloudFoundryClient, Duration completionTimeout, String jobId) { return requestJobV3(cloudFoundryClient, jobId) .filter(job -> JobState.PROCESSING != job.getState()) .repeatWhenEmpty(exponentialBackOff(Duration.ofSeconds(1), Du...
[ "public", "static", "Mono", "<", "Void", ">", "waitForCompletion", "(", "CloudFoundryClient", "cloudFoundryClient", ",", "Duration", "completionTimeout", ",", "String", "jobId", ")", "{", "return", "requestJobV3", "(", "cloudFoundryClient", ",", "jobId", ")", ".", ...
Waits for a job V3 to complete @param cloudFoundryClient the client to use to request job status @param completionTimeout the amount of time to wait for the job to complete. @param jobId the id of the job @return {@code onComplete} once job has completed
[ "Waits", "for", "a", "job", "V3", "to", "complete" ]
train
https://github.com/cloudfoundry/cf-java-client/blob/caa1cb889cfe8717614c071703d833a1540784df/cloudfoundry-util/src/main/java/org/cloudfoundry/util/JobUtils.java#L93-L99
telly/groundy
library/src/main/java/com/telly/groundy/TaskResult.java
TaskResult.add
public TaskResult add(String key, Parcelable value) { """ Inserts a Parcelable value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a Parcelable object, or null """ mBundle.putParcelable(key, ...
java
public TaskResult add(String key, Parcelable value) { mBundle.putParcelable(key, value); return this; }
[ "public", "TaskResult", "add", "(", "String", "key", ",", "Parcelable", "value", ")", "{", "mBundle", ".", "putParcelable", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a Parcelable value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a Parcelable object, or null
[ "Inserts", "a", "Parcelable", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/TaskResult.java#L179-L182
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java
WaybackRequest.createCaptureQueryRequet
public static WaybackRequest createCaptureQueryRequet(String url, String replay, String start, String end) { """ create WaybackRequest for Capture-Query request. @param url target URL @param replay highlight date @param start start timestamp (14-digit) @param end end timestamp (14-digit) @return WaybackReques...
java
public static WaybackRequest createCaptureQueryRequet(String url, String replay, String start, String end) { WaybackRequest r = new WaybackRequest(); r.setCaptureQueryRequest(); r.setRequestUrl(url); r.setReplayTimestamp(replay); r.setStartTimestamp(start); r.setEndTimestamp(end); return r; }
[ "public", "static", "WaybackRequest", "createCaptureQueryRequet", "(", "String", "url", ",", "String", "replay", ",", "String", "start", ",", "String", "end", ")", "{", "WaybackRequest", "r", "=", "new", "WaybackRequest", "(", ")", ";", "r", ".", "setCaptureQu...
create WaybackRequest for Capture-Query request. @param url target URL @param replay highlight date @param start start timestamp (14-digit) @param end end timestamp (14-digit) @return WaybackRequest
[ "create", "WaybackRequest", "for", "Capture", "-", "Query", "request", "." ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java#L486-L494
JadiraOrg/jadira
cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java
UnsafeOperations.putFloat
public final void putFloat(Object parent, long offset, float value) { """ Puts the value at the given offset of the supplied parent object @param parent The Object's parent @param offset The offset @param value float to be put """ THE_UNSAFE.putFloat(parent, offset, value); }
java
public final void putFloat(Object parent, long offset, float value) { THE_UNSAFE.putFloat(parent, offset, value); }
[ "public", "final", "void", "putFloat", "(", "Object", "parent", ",", "long", "offset", ",", "float", "value", ")", "{", "THE_UNSAFE", ".", "putFloat", "(", "parent", ",", "offset", ",", "value", ")", ";", "}" ]
Puts the value at the given offset of the supplied parent object @param parent The Object's parent @param offset The offset @param value float to be put
[ "Puts", "the", "value", "at", "the", "given", "offset", "of", "the", "supplied", "parent", "object" ]
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java#L1003-L1005
overturetool/overture
ide/ui/src/main/java/org/overture/ide/ui/templates/VdmCompletionContext.java
VdmCompletionContext.consQuoteContext
private void consQuoteContext(int index) { """ Constructs the completion context for quotes @param index The index of the '<' character """ processedScan = new StringBuffer(proposalPrefix.subSequence(index, proposalPrefix.length())); proposalPrefix = processedScan.substring(processedScan.lastIndexOf("<...
java
private void consQuoteContext(int index) { processedScan = new StringBuffer(proposalPrefix.subSequence(index, proposalPrefix.length())); proposalPrefix = processedScan.substring(processedScan.lastIndexOf("<")); type = SearchType.Quote; }
[ "private", "void", "consQuoteContext", "(", "int", "index", ")", "{", "processedScan", "=", "new", "StringBuffer", "(", "proposalPrefix", ".", "subSequence", "(", "index", ",", "proposalPrefix", ".", "length", "(", ")", ")", ")", ";", "proposalPrefix", "=", ...
Constructs the completion context for quotes @param index The index of the '<' character
[ "Constructs", "the", "completion", "context", "for", "quotes" ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/ide/ui/src/main/java/org/overture/ide/ui/templates/VdmCompletionContext.java#L162-L167
whitesource/fs-agent
src/main/java/org/whitesource/fs/FSAConfiguration.java
FSAConfiguration.checkAppPathsForVia
private boolean checkAppPathsForVia(Set<String> keySet, List<String> errors) { """ check validation for appPath property, first check if the path is exist and then if this path is not a directory """ for (String key : keySet) { if (!key.equals("defaultKey")) { File file = ne...
java
private boolean checkAppPathsForVia(Set<String> keySet, List<String> errors) { for (String key : keySet) { if (!key.equals("defaultKey")) { File file = new File(key); if (!file.exists()) { errors.add("Effective Usage Analysis will not run if the -a...
[ "private", "boolean", "checkAppPathsForVia", "(", "Set", "<", "String", ">", "keySet", ",", "List", "<", "String", ">", "errors", ")", "{", "for", "(", "String", "key", ":", "keySet", ")", "{", "if", "(", "!", "key", ".", "equals", "(", "\"defaultKey\"...
check validation for appPath property, first check if the path is exist and then if this path is not a directory
[ "check", "validation", "for", "appPath", "property", "first", "check", "if", "the", "path", "is", "exist", "and", "then", "if", "this", "path", "is", "not", "a", "directory" ]
train
https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/fs/FSAConfiguration.java#L407-L423
graknlabs/grakn
server/src/server/ServerFactory.java
ServerFactory.createServer
public static Server createServer( ServerID serverID, io.grpc.Server rpcServer, LockManager lockManager, AttributeDeduplicatorDaemon attributeDeduplicatorDaemon, KeyspaceManager keyspaceStore) { """ Allows the creation of a Server instance with various configurations @return a Server ins...
java
public static Server createServer( ServerID serverID, io.grpc.Server rpcServer, LockManager lockManager, AttributeDeduplicatorDaemon attributeDeduplicatorDaemon, KeyspaceManager keyspaceStore) { Server server = new Server(serverID, lockManager, rpcServer, attributeDeduplicatorDaemon, ke...
[ "public", "static", "Server", "createServer", "(", "ServerID", "serverID", ",", "io", ".", "grpc", ".", "Server", "rpcServer", ",", "LockManager", "lockManager", ",", "AttributeDeduplicatorDaemon", "attributeDeduplicatorDaemon", ",", "KeyspaceManager", "keyspaceStore", ...
Allows the creation of a Server instance with various configurations @return a Server instance
[ "Allows", "the", "creation", "of", "a", "Server", "instance", "with", "various", "configurations" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/server/ServerFactory.java#L81-L90
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/UriEscaper.java
UriEscaper.escapePath
public static String escapePath(final String path, final boolean strict) { """ Escapes a string as a URI path @param path the path to escape @param strict whether or not to do strict escaping @return the escaped string """ return (strict ? STRICT_ESCAPER : ESCAPER).escapePath(path); }
java
public static String escapePath(final String path, final boolean strict) { return (strict ? STRICT_ESCAPER : ESCAPER).escapePath(path); }
[ "public", "static", "String", "escapePath", "(", "final", "String", "path", ",", "final", "boolean", "strict", ")", "{", "return", "(", "strict", "?", "STRICT_ESCAPER", ":", "ESCAPER", ")", ".", "escapePath", "(", "path", ")", ";", "}" ]
Escapes a string as a URI path @param path the path to escape @param strict whether or not to do strict escaping @return the escaped string
[ "Escapes", "a", "string", "as", "a", "URI", "path" ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/UriEscaper.java#L239-L241
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/BaseApplet.java
BaseApplet.setScreenProperties
public void setScreenProperties(PropertyOwner propertyOwner, Map<String,Object> properties) { """ Change the screen properties to these properties. @param propertyOwner The properties to change to. """ Frame frame = ScreenUtil.getFrame(this); ScreenUtil.updateLookAndFeel((Frame)frame, property...
java
public void setScreenProperties(PropertyOwner propertyOwner, Map<String,Object> properties) { Frame frame = ScreenUtil.getFrame(this); ScreenUtil.updateLookAndFeel((Frame)frame, propertyOwner, properties); Color colorBackgroundNew = ScreenUtil.getColor(ScreenUtil.BACKGROUND_COLOR, propertyOw...
[ "public", "void", "setScreenProperties", "(", "PropertyOwner", "propertyOwner", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "Frame", "frame", "=", "ScreenUtil", ".", "getFrame", "(", "this", ")", ";", "ScreenUtil", ".", "updateLookAn...
Change the screen properties to these properties. @param propertyOwner The properties to change to.
[ "Change", "the", "screen", "properties", "to", "these", "properties", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/BaseApplet.java#L1665-L1672
OpenTSDB/opentsdb
src/tsd/HttpJsonSerializer.java
HttpJsonSerializer.parseUidMetaV1
public UIDMeta parseUidMetaV1() { """ Parses a single UIDMeta object @throws JSONException if parsing failed @throws BadRequestException if the content was missing or parsing failed """ final String json = query.getContent(); if (json == null || json.isEmpty()) { throw new BadRequestException(H...
java
public UIDMeta parseUidMetaV1() { final String json = query.getContent(); if (json == null || json.isEmpty()) { throw new BadRequestException(HttpResponseStatus.BAD_REQUEST, "Missing message content", "Supply valid JSON formatted data in the body of your request"); } try { ...
[ "public", "UIDMeta", "parseUidMetaV1", "(", ")", "{", "final", "String", "json", "=", "query", ".", "getContent", "(", ")", ";", "if", "(", "json", "==", "null", "||", "json", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "BadRequestException", "...
Parses a single UIDMeta object @throws JSONException if parsing failed @throws BadRequestException if the content was missing or parsing failed
[ "Parses", "a", "single", "UIDMeta", "object" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/HttpJsonSerializer.java#L308-L320
apache/incubator-druid
sql/src/main/java/org/apache/druid/sql/calcite/table/RowSignature.java
RowSignature.getRelDataType
public RelDataType getRelDataType(final RelDataTypeFactory typeFactory) { """ Returns a Calcite RelDataType corresponding to this row signature. @param typeFactory factory for type construction @return Calcite row type """ final RelDataTypeFactory.Builder builder = typeFactory.builder(); for (fin...
java
public RelDataType getRelDataType(final RelDataTypeFactory typeFactory) { final RelDataTypeFactory.Builder builder = typeFactory.builder(); for (final String columnName : columnNames) { final ValueType columnType = getColumnType(columnName); final RelDataType type; if (ColumnHolder.TIME_COL...
[ "public", "RelDataType", "getRelDataType", "(", "final", "RelDataTypeFactory", "typeFactory", ")", "{", "final", "RelDataTypeFactory", ".", "Builder", "builder", "=", "typeFactory", ".", "builder", "(", ")", ";", "for", "(", "final", "String", "columnName", ":", ...
Returns a Calcite RelDataType corresponding to this row signature. @param typeFactory factory for type construction @return Calcite row type
[ "Returns", "a", "Calcite", "RelDataType", "corresponding", "to", "this", "row", "signature", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/sql/src/main/java/org/apache/druid/sql/calcite/table/RowSignature.java#L146-L183
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/CsvFiles.java
CsvFiles.getCsvDataByColumn
public static List<String> getCsvDataByColumn(String fileName, final int column, boolean headerPresent) throws IOException { """ Returns a {@code List<String>} representing a single 0-indexed column. @param fileName the CSV file to load @param column the 0-indexed column to return @param headerPresent {...
java
public static List<String> getCsvDataByColumn(String fileName, final int column, boolean headerPresent) throws IOException { final List<String> result = Lists.newArrayList(); new CsvReader(fileName, headerPresent) .processReader((headers, line, lineNumber) -> result.add(line[column])); return ...
[ "public", "static", "List", "<", "String", ">", "getCsvDataByColumn", "(", "String", "fileName", ",", "final", "int", "column", ",", "boolean", "headerPresent", ")", "throws", "IOException", "{", "final", "List", "<", "String", ">", "result", "=", "Lists", "...
Returns a {@code List<String>} representing a single 0-indexed column. @param fileName the CSV file to load @param column the 0-indexed column to return @param headerPresent {@code true} if the first line is the header @return a {@code List<String>} representing a single column @throws IOException if there was an exce...
[ "Returns", "a", "{", "@code", "List<String", ">", "}", "representing", "a", "single", "0", "-", "indexed", "column", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/CsvFiles.java#L151-L157
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java
WordVectorSerializer.writeWordVectors
public static <T extends SequenceElement> void writeWordVectors(WeightLookupTable<T> lookupTable, String path) throws IOException { """ This method writes word vectors to the given path. Please note: this method doesn't load whole vocab/lookupTable into memory, so it's able to process large vocabulari...
java
public static <T extends SequenceElement> void writeWordVectors(WeightLookupTable<T> lookupTable, String path) throws IOException { try (BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(path))) { writeWordVectors(lookupTable, bos); } catch (Exception e) { ...
[ "public", "static", "<", "T", "extends", "SequenceElement", ">", "void", "writeWordVectors", "(", "WeightLookupTable", "<", "T", ">", "lookupTable", ",", "String", "path", ")", "throws", "IOException", "{", "try", "(", "BufferedOutputStream", "bos", "=", "new", ...
This method writes word vectors to the given path. Please note: this method doesn't load whole vocab/lookupTable into memory, so it's able to process large vocabularies served over network. @param lookupTable @param path @param <T>
[ "This", "method", "writes", "word", "vectors", "to", "the", "given", "path", ".", "Please", "note", ":", "this", "method", "doesn", "t", "load", "whole", "vocab", "/", "lookupTable", "into", "memory", "so", "it", "s", "able", "to", "process", "large", "v...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java#L304-L311
dnsjava/dnsjava
org/xbill/DNS/Message.java
Message.removeRecord
public boolean removeRecord(Record r, int section) { """ Removes a record from a section of the Message, and adjusts the header. @see Record @see Section """ if (sections[section] != null && sections[section].remove(r)) { header.decCount(section); return true; } else return false; }
java
public boolean removeRecord(Record r, int section) { if (sections[section] != null && sections[section].remove(r)) { header.decCount(section); return true; } else return false; }
[ "public", "boolean", "removeRecord", "(", "Record", "r", ",", "int", "section", ")", "{", "if", "(", "sections", "[", "section", "]", "!=", "null", "&&", "sections", "[", "section", "]", ".", "remove", "(", "r", ")", ")", "{", "header", ".", "decCoun...
Removes a record from a section of the Message, and adjusts the header. @see Record @see Section
[ "Removes", "a", "record", "from", "a", "section", "of", "the", "Message", "and", "adjusts", "the", "header", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/Message.java#L184-L192
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/security/certgen/TLSCertificateBuilder.java
TLSCertificateBuilder.clientCert
public TLSCertificateKeyPair clientCert() { """ * Creates a TLS client certificate key pair @return a TLSCertificateKeyPair """ try { return createCert(CertType.CLIENT, null); } catch (Exception e) { throw new RuntimeException(e); } }
java
public TLSCertificateKeyPair clientCert() { try { return createCert(CertType.CLIENT, null); } catch (Exception e) { throw new RuntimeException(e); } }
[ "public", "TLSCertificateKeyPair", "clientCert", "(", ")", "{", "try", "{", "return", "createCert", "(", "CertType", ".", "CLIENT", ",", "null", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "RuntimeException", "(", "e", ")", "...
* Creates a TLS client certificate key pair @return a TLSCertificateKeyPair
[ "*", "Creates", "a", "TLS", "client", "certificate", "key", "pair" ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/security/certgen/TLSCertificateBuilder.java#L76-L82
brettwooldridge/SansOrm
src/main/java/com/zaxxer/sansorm/OrmElf.java
OrmElf.deleteObject
public static <T> int deleteObject(Connection connection, T target) throws SQLException { """ Delete a database row using the specified annotated object, the @Id field(s) is used in the WHERE clause of the generated DELETE statement. @param connection a SQL connection @param target the annotated object to use...
java
public static <T> int deleteObject(Connection connection, T target) throws SQLException { return OrmWriter.deleteObject(connection, target); }
[ "public", "static", "<", "T", ">", "int", "deleteObject", "(", "Connection", "connection", ",", "T", "target", ")", "throws", "SQLException", "{", "return", "OrmWriter", ".", "deleteObject", "(", "connection", ",", "target", ")", ";", "}" ]
Delete a database row using the specified annotated object, the @Id field(s) is used in the WHERE clause of the generated DELETE statement. @param connection a SQL connection @param target the annotated object to use to delete a row in the database @param <T> the class template @return 0 if no row was deleted, 1 if th...
[ "Delete", "a", "database", "row", "using", "the", "specified", "annotated", "object", "the", "@Id", "field", "(", "s", ")", "is", "used", "in", "the", "WHERE", "clause", "of", "the", "generated", "DELETE", "statement", "." ]
train
https://github.com/brettwooldridge/SansOrm/blob/ab22721db79c5f20c0e8483f09eda2844d596557/src/main/java/com/zaxxer/sansorm/OrmElf.java#L284-L287
buschmais/jqa-core-framework
scanner/src/main/java/com/buschmais/jqassistant/core/scanner/api/ScopeHelper.java
ScopeHelper.printScopes
public void printScopes(Map<String, Scope> scopes) { """ Print a list of available scopes to the console. @param scopes The available scopes. """ logger.info("Scopes [" + scopes.size() + "]"); for (String scopeName : scopes.keySet()) { logger.info("\t" + scopeName); } ...
java
public void printScopes(Map<String, Scope> scopes) { logger.info("Scopes [" + scopes.size() + "]"); for (String scopeName : scopes.keySet()) { logger.info("\t" + scopeName); } }
[ "public", "void", "printScopes", "(", "Map", "<", "String", ",", "Scope", ">", "scopes", ")", "{", "logger", ".", "info", "(", "\"Scopes [\"", "+", "scopes", ".", "size", "(", ")", "+", "\"]\"", ")", ";", "for", "(", "String", "scopeName", ":", "scop...
Print a list of available scopes to the console. @param scopes The available scopes.
[ "Print", "a", "list", "of", "available", "scopes", "to", "the", "console", "." ]
train
https://github.com/buschmais/jqa-core-framework/blob/0e63ff509cfe52f9063539a23d5f9f183b2ea4a5/scanner/src/main/java/com/buschmais/jqassistant/core/scanner/api/ScopeHelper.java#L30-L35
Harium/keel
src/main/java/com/harium/keel/catalano/math/function/PerlinNoise.java
PerlinNoise.SmoothedNoise
private double SmoothedNoise(double x, double y) { """ Smoothed noise. @param x X Value. @param y Y Value. @return Value. """ int xInt = (int) x; int yInt = (int) y; double xFrac = x - xInt; double yFrac = y - yInt; // get four noise values double x0y0 = No...
java
private double SmoothedNoise(double x, double y) { int xInt = (int) x; int yInt = (int) y; double xFrac = x - xInt; double yFrac = y - yInt; // get four noise values double x0y0 = Noise(xInt, yInt); double x1y0 = Noise(xInt + 1, yInt); double x0y1 = Noise...
[ "private", "double", "SmoothedNoise", "(", "double", "x", ",", "double", "y", ")", "{", "int", "xInt", "=", "(", "int", ")", "x", ";", "int", "yInt", "=", "(", "int", ")", "y", ";", "double", "xFrac", "=", "x", "-", "xInt", ";", "double", "yFrac"...
Smoothed noise. @param x X Value. @param y Y Value. @return Value.
[ "Smoothed", "noise", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/function/PerlinNoise.java#L231-L248
pmwmedia/tinylog
tinylog-impl/src/main/java/org/tinylog/writers/JdbcWriter.java
JdbcWriter.getUrl
private static String getUrl(final Map<String, String> properties) { """ Extracts the URL to database or data source from configuration. @param properties Configuration for writer @return Connection URL @throws IllegalArgumentException URL is not defined in configuration """ String url = properties....
java
private static String getUrl(final Map<String, String> properties) { String url = properties.get("url"); if (url == null) { throw new IllegalArgumentException("URL is missing for JDBC writer"); } else { return url; } }
[ "private", "static", "String", "getUrl", "(", "final", "Map", "<", "String", ",", "String", ">", "properties", ")", "{", "String", "url", "=", "properties", ".", "get", "(", "\"url\"", ")", ";", "if", "(", "url", "==", "null", ")", "{", "throw", "new...
Extracts the URL to database or data source from configuration. @param properties Configuration for writer @return Connection URL @throws IllegalArgumentException URL is not defined in configuration
[ "Extracts", "the", "URL", "to", "database", "or", "data", "source", "from", "configuration", "." ]
train
https://github.com/pmwmedia/tinylog/blob/d03d4ef84a1310155037e08ca8822a91697d1086/tinylog-impl/src/main/java/org/tinylog/writers/JdbcWriter.java#L322-L329
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/image/ShowImages.java
ShowImages.setupWindow
public static JFrame setupWindow( final JComponent component , String title, final boolean closeOnExit ) { """ Sets up the window but doesn't show it. Must be called in a GUI thread """ BoofSwingUtil.checkGuiThread(); final JFrame frame = new JFrame(title); frame.add(component, BorderLayout.CENTER); ...
java
public static JFrame setupWindow( final JComponent component , String title, final boolean closeOnExit ) { BoofSwingUtil.checkGuiThread(); final JFrame frame = new JFrame(title); frame.add(component, BorderLayout.CENTER); frame.pack(); frame.setLocationRelativeTo(null); // centers window in the monitor if...
[ "public", "static", "JFrame", "setupWindow", "(", "final", "JComponent", "component", ",", "String", "title", ",", "final", "boolean", "closeOnExit", ")", "{", "BoofSwingUtil", ".", "checkGuiThread", "(", ")", ";", "final", "JFrame", "frame", "=", "new", "JFra...
Sets up the window but doesn't show it. Must be called in a GUI thread
[ "Sets", "up", "the", "window", "but", "doesn", "t", "show", "it", ".", "Must", "be", "called", "in", "a", "GUI", "thread" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/image/ShowImages.java#L145-L157
drinkjava2/jDialects
core/src/main/java/com/github/drinkjava2/jdialects/StrUtils.java
StrUtils.lastIndexOfIgnoreCase
public static int lastIndexOfIgnoreCase(String str, String searchStr) { """ Return last sub-String position ignore case, return -1 if not found """ if (searchStr.isEmpty() || str.isEmpty()) return -1; return str.toLowerCase().lastIndexOf(searchStr.toLowerCase()); }
java
public static int lastIndexOfIgnoreCase(String str, String searchStr) { if (searchStr.isEmpty() || str.isEmpty()) return -1; return str.toLowerCase().lastIndexOf(searchStr.toLowerCase()); }
[ "public", "static", "int", "lastIndexOfIgnoreCase", "(", "String", "str", ",", "String", "searchStr", ")", "{", "if", "(", "searchStr", ".", "isEmpty", "(", ")", "||", "str", ".", "isEmpty", "(", ")", ")", "return", "-", "1", ";", "return", "str", ".",...
Return last sub-String position ignore case, return -1 if not found
[ "Return", "last", "sub", "-", "String", "position", "ignore", "case", "return", "-", "1", "if", "not", "found" ]
train
https://github.com/drinkjava2/jDialects/blob/1c165f09c6042a599b681c279024abcc1b848b88/core/src/main/java/com/github/drinkjava2/jdialects/StrUtils.java#L394-L398
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java
BusItinerary.addBusHalt
public final BusItineraryHalt addBusHalt(String name, BusItineraryHaltType type) { """ Add a bus halt inside the bus itinerary. @param name is the name of the bus halt @param type is the type of the bus halt. @return the added bus halt, otherwise <code>null</code> """ return addBusHalt(null, name, type)...
java
public final BusItineraryHalt addBusHalt(String name, BusItineraryHaltType type) { return addBusHalt(null, name, type); }
[ "public", "final", "BusItineraryHalt", "addBusHalt", "(", "String", "name", ",", "BusItineraryHaltType", "type", ")", "{", "return", "addBusHalt", "(", "null", ",", "name", ",", "type", ")", ";", "}" ]
Add a bus halt inside the bus itinerary. @param name is the name of the bus halt @param type is the type of the bus halt. @return the added bus halt, otherwise <code>null</code>
[ "Add", "a", "bus", "halt", "inside", "the", "bus", "itinerary", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusItinerary.java#L1053-L1055
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/snmp_alarm_config.java
snmp_alarm_config.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ snmp_alarm_config_responses result = (snmp_alarm_config_responses) serv...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { snmp_alarm_config_responses result = (snmp_alarm_config_responses) service.get_payload_formatter().string_to_resource(snmp_alarm_config_responses.class, response); if(result.errorcode != 0) { if (...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "snmp_alarm_config_responses", "result", "=", "(", "snmp_alarm_config_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/mps/snmp_alarm_config.java#L283-L300
Netflix/conductor
client/src/main/java/com/netflix/conductor/client/http/TaskClient.java
TaskClient.getTaskLogs
public List<TaskExecLog> getTaskLogs(String taskId) { """ Fetch execution logs for a task. @param taskId id of the task. """ Preconditions.checkArgument(StringUtils.isNotBlank(taskId), "Task id cannot be blank"); return getForEntity("tasks/{taskId}/log", null, taskExecLogList, taskId); }
java
public List<TaskExecLog> getTaskLogs(String taskId) { Preconditions.checkArgument(StringUtils.isNotBlank(taskId), "Task id cannot be blank"); return getForEntity("tasks/{taskId}/log", null, taskExecLogList, taskId); }
[ "public", "List", "<", "TaskExecLog", ">", "getTaskLogs", "(", "String", "taskId", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(", "taskId", ")", ",", "\"Task id cannot be blank\"", ")", ";", "return", "getForEntity", ...
Fetch execution logs for a task. @param taskId id of the task.
[ "Fetch", "execution", "logs", "for", "a", "task", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/client/src/main/java/com/netflix/conductor/client/http/TaskClient.java#L298-L301
cloudiator/flexiant-client
src/main/java/de/uniulm/omi/cloudiator/flexiant/client/compute/FlexiantComputeClient.java
FlexiantComputeClient.getHardware
@Nullable public Hardware getHardware(final String hardwareUUID, final String locationUUID) throws FlexiantException { """ Retrieves the hardware identified by the given uuid. @param hardwareUUID the id of the hardware @param locationUUID the id of the location @return information about the hardware i...
java
@Nullable public Hardware getHardware(final String hardwareUUID, final String locationUUID) throws FlexiantException { checkNotNull(hardwareUUID); String[] parts = hardwareUUID.split(":"); checkArgument(parts.length == 2, "Expected hardwareUUID to contain :"); final ProductOf...
[ "@", "Nullable", "public", "Hardware", "getHardware", "(", "final", "String", "hardwareUUID", ",", "final", "String", "locationUUID", ")", "throws", "FlexiantException", "{", "checkNotNull", "(", "hardwareUUID", ")", ";", "String", "[", "]", "parts", "=", "hardw...
Retrieves the hardware identified by the given uuid. @param hardwareUUID the id of the hardware @param locationUUID the id of the location @return information about the hardware if any, otherwise null. @throws FlexiantException
[ "Retrieves", "the", "hardware", "identified", "by", "the", "given", "uuid", "." ]
train
https://github.com/cloudiator/flexiant-client/blob/30024501a6ae034ea3646f71ec0761c8bc5daa69/src/main/java/de/uniulm/omi/cloudiator/flexiant/client/compute/FlexiantComputeClient.java#L432-L451
lucee/Lucee
core/src/main/java/lucee/runtime/image/ImageUtil.java
ImageUtil.isCastableToImage
public static boolean isCastableToImage(PageContext pc, Object obj) { """ /* public static Type getImageType() { return Type.getType("Lorg/lucee/extension/image/Image;"); } """ try { Class clazz = ImageUtil.getImageClass(); if (clazz != null) { Method m = clazz.getMethod("isCastableToImage", new ...
java
public static boolean isCastableToImage(PageContext pc, Object obj) { try { Class clazz = ImageUtil.getImageClass(); if (clazz != null) { Method m = clazz.getMethod("isCastableToImage", new Class[] { PageContext.class, Object.class }); return (boolean) m.invoke(null, new Object[] { pc, obj }); } } ...
[ "public", "static", "boolean", "isCastableToImage", "(", "PageContext", "pc", ",", "Object", "obj", ")", "{", "try", "{", "Class", "clazz", "=", "ImageUtil", ".", "getImageClass", "(", ")", ";", "if", "(", "clazz", "!=", "null", ")", "{", "Method", "m", ...
/* public static Type getImageType() { return Type.getType("Lorg/lucee/extension/image/Image;"); }
[ "/", "*", "public", "static", "Type", "getImageType", "()", "{", "return", "Type", ".", "getType", "(", "Lorg", "/", "lucee", "/", "extension", "/", "image", "/", "Image", ";", ")", ";", "}" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/image/ImageUtil.java#L109-L119
Activiti/Activiti
activiti-engine/src/main/java/org/activiti/engine/impl/util/json/CDL.java
CDL.toJSONArray
public static JSONArray toJSONArray(JSONArray names, JSONTokener x) throws JSONException { """ Produce a JSONArray of JSONObjects from a comma delimited text string using a supplied JSONArray as the source of element names. @param names A JSONArray of strings. @param x A JSONTokener of the source text. @ret...
java
public static JSONArray toJSONArray(JSONArray names, JSONTokener x) throws JSONException { if (names == null || names.length() == 0) { return null; } JSONArray ja = new JSONArray(); for (;;) { JSONObject jo = rowToJSONObject(names, x); if (jo == null) { break; } ja....
[ "public", "static", "JSONArray", "toJSONArray", "(", "JSONArray", "names", ",", "JSONTokener", "x", ")", "throws", "JSONException", "{", "if", "(", "names", "==", "null", "||", "names", ".", "length", "(", ")", "==", "0", ")", "{", "return", "null", ";",...
Produce a JSONArray of JSONObjects from a comma delimited text string using a supplied JSONArray as the source of element names. @param names A JSONArray of strings. @param x A JSONTokener of the source text. @return A JSONArray of JSONObjects. @throws JSONException
[ "Produce", "a", "JSONArray", "of", "JSONObjects", "from", "a", "comma", "delimited", "text", "string", "using", "a", "supplied", "JSONArray", "as", "the", "source", "of", "element", "names", "." ]
train
https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/json/CDL.java#L181-L197
Stratio/stratio-cassandra
src/java/org/apache/cassandra/hadoop/ConfigHelper.java
ConfigHelper.setInputRange
public static void setInputRange(Configuration conf, List<IndexExpression> filter) { """ Set the KeyRange to limit the rows. @param conf Job configuration you are about to run """ KeyRange range = new KeyRange().setRow_filter(filter); conf.set(INPUT_KEYRANGE_CONFIG, thriftToString(range)); ...
java
public static void setInputRange(Configuration conf, List<IndexExpression> filter) { KeyRange range = new KeyRange().setRow_filter(filter); conf.set(INPUT_KEYRANGE_CONFIG, thriftToString(range)); }
[ "public", "static", "void", "setInputRange", "(", "Configuration", "conf", ",", "List", "<", "IndexExpression", ">", "filter", ")", "{", "KeyRange", "range", "=", "new", "KeyRange", "(", ")", ".", "setRow_filter", "(", "filter", ")", ";", "conf", ".", "set...
Set the KeyRange to limit the rows. @param conf Job configuration you are about to run
[ "Set", "the", "KeyRange", "to", "limit", "the", "rows", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/hadoop/ConfigHelper.java#L264-L268
btc-ag/redg
redg-generator/src/main/java/com/btc/redg/generator/extractor/MetadataExtractor.java
MetadataExtractor.processJoinTables
private static void processJoinTables(final List<TableModel> result, final Map<String, Map<Table, List<String>>> joinTableMetadata) { """ Processes the information about the join tables that were collected during table model extraction. @param result The already processed tables @param joinTableMetadata The me...
java
private static void processJoinTables(final List<TableModel> result, final Map<String, Map<Table, List<String>>> joinTableMetadata) { joinTableMetadata.entrySet().forEach(entry -> { LOG.debug("Processing join tables for {}. Found {} join tables to process", entry.getKey(), entry.getValue().size())...
[ "private", "static", "void", "processJoinTables", "(", "final", "List", "<", "TableModel", ">", "result", ",", "final", "Map", "<", "String", ",", "Map", "<", "Table", ",", "List", "<", "String", ">", ">", ">", "joinTableMetadata", ")", "{", "joinTableMeta...
Processes the information about the join tables that were collected during table model extraction. @param result The already processed tables @param joinTableMetadata The metadata about the join tables
[ "Processes", "the", "information", "about", "the", "join", "tables", "that", "were", "collected", "during", "table", "model", "extraction", "." ]
train
https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-generator/src/main/java/com/btc/redg/generator/extractor/MetadataExtractor.java#L84-L113
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
FieldUtils.readField
public static Object readField(final Field field, final Object target, final boolean forceAccess) throws IllegalAccessException { """ Reads a {@link Field}. @param field the field to use @param target the object to call on, may be {@code null} for {@code static} fields @param forceAccess whether to break s...
java
public static Object readField(final Field field, final Object target, final boolean forceAccess) throws IllegalAccessException { Validate.isTrue(field != null, "The field must not be null"); if (forceAccess && !field.isAccessible()) { field.setAccessible(true); } else { ...
[ "public", "static", "Object", "readField", "(", "final", "Field", "field", ",", "final", "Object", "target", ",", "final", "boolean", "forceAccess", ")", "throws", "IllegalAccessException", "{", "Validate", ".", "isTrue", "(", "field", "!=", "null", ",", "\"Th...
Reads a {@link Field}. @param field the field to use @param target the object to call on, may be {@code null} for {@code static} fields @param forceAccess whether to break scope restrictions using the {@link java.lang.reflect.AccessibleObject#setAccessible(boolean)} method. @return the field value @throws IllegalArgum...
[ "Reads", "a", "{", "@link", "Field", "}", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java#L422-L430
intuit/QuickBooks-V3-Java-SDK
oauth2-platform-api/src/main/java/com/intuit/oauth2/http/HttpRequestClient.java
HttpRequestClient.makeJsonRequest
public Response makeJsonRequest(Request request, OAuthMigrationRequest migrationRequest) throws InvalidRequestException { """ Method to make the HTTP POST request using the request attributes supplied @param request @return @throws InvalidRequestException """ logger.debug("Enter HttpRequestClient::make...
java
public Response makeJsonRequest(Request request, OAuthMigrationRequest migrationRequest) throws InvalidRequestException { logger.debug("Enter HttpRequestClient::makeJsonRequest"); //create oauth consumer using tokens OAuthConsumer consumer = new CommonsHttpOAuthConsumer(migrationRequest.getConsumerKey(), migrati...
[ "public", "Response", "makeJsonRequest", "(", "Request", "request", ",", "OAuthMigrationRequest", "migrationRequest", ")", "throws", "InvalidRequestException", "{", "logger", ".", "debug", "(", "\"Enter HttpRequestClient::makeJsonRequest\"", ")", ";", "//create oauth consumer...
Method to make the HTTP POST request using the request attributes supplied @param request @return @throws InvalidRequestException
[ "Method", "to", "make", "the", "HTTP", "POST", "request", "using", "the", "request", "attributes", "supplied" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/oauth2-platform-api/src/main/java/com/intuit/oauth2/http/HttpRequestClient.java#L215-L262
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Clicker.java
Clicker.getViewOnAbsListLine
private View getViewOnAbsListLine(AbsListView absListView, int index, int lineIndex) { """ Returns the view in the specified list line @param absListView the ListView to use @param index the index of the list. E.g. Index 1 if two lists are available @param lineIndex the line index of the View @return the Vie...
java
private View getViewOnAbsListLine(AbsListView absListView, int index, int lineIndex){ final long endTime = SystemClock.uptimeMillis() + Timeout.getSmallTimeout(); View view = absListView.getChildAt(lineIndex); while(view == null){ final boolean timedOut = SystemClock.uptimeMillis() > endTime; if (timedOut)...
[ "private", "View", "getViewOnAbsListLine", "(", "AbsListView", "absListView", ",", "int", "index", ",", "int", "lineIndex", ")", "{", "final", "long", "endTime", "=", "SystemClock", ".", "uptimeMillis", "(", ")", "+", "Timeout", ".", "getSmallTimeout", "(", ")...
Returns the view in the specified list line @param absListView the ListView to use @param index the index of the list. E.g. Index 1 if two lists are available @param lineIndex the line index of the View @return the View located at a specified list line
[ "Returns", "the", "view", "in", "the", "specified", "list", "line" ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Clicker.java#L659-L679
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java
FileWriter.append
public File append(byte[] data, int off, int len) throws IORuntimeException { """ 追加数据到文件 @param data 数据 @param off 数据开始位置 @param len 数据长度 @return 目标文件 @throws IORuntimeException IO异常 """ return write(data, off, len, true); }
java
public File append(byte[] data, int off, int len) throws IORuntimeException { return write(data, off, len, true); }
[ "public", "File", "append", "(", "byte", "[", "]", "data", ",", "int", "off", ",", "int", "len", ")", "throws", "IORuntimeException", "{", "return", "write", "(", "data", ",", "off", ",", "len", ",", "true", ")", ";", "}" ]
追加数据到文件 @param data 数据 @param off 数据开始位置 @param len 数据长度 @return 目标文件 @throws IORuntimeException IO异常
[ "追加数据到文件" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java#L273-L275
OpenLiberty/open-liberty
dev/com.ibm.ws.logging/src/com/ibm/ws/logging/internal/impl/BaseFFDCService.java
BaseFFDCService.processException
@Override public void processException(Throwable th, String sourceId, String probeId, Object callerThis, Object[] objectArray) { """ Process an exception @param th The exception to be processed @param sourceId The source id of the reporting code @param probeId The probe of the reporting code @param ca...
java
@Override public void processException(Throwable th, String sourceId, String probeId, Object callerThis, Object[] objectArray) { log(sourceId, probeId, th, callerThis, objectArray); }
[ "@", "Override", "public", "void", "processException", "(", "Throwable", "th", ",", "String", "sourceId", ",", "String", "probeId", ",", "Object", "callerThis", ",", "Object", "[", "]", "objectArray", ")", "{", "log", "(", "sourceId", ",", "probeId", ",", ...
Process an exception @param th The exception to be processed @param sourceId The source id of the reporting code @param probeId The probe of the reporting code @param callerThis The instance of the reporting code @param objectArray An array of additional interesting objects
[ "Process", "an", "exception" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging/src/com/ibm/ws/logging/internal/impl/BaseFFDCService.java#L214-L217
canoo/dolphin-platform
platform/dolphin-platform-remoting-client-javafx/src/main/java/com/canoo/platform/remoting/client/javafx/window/DolphinWindowUtils.java
DolphinWindowUtils.destroyOnClose
public static <M> Subscription destroyOnClose(final Window window, final AbstractViewController<M> viewBinder) { """ The method will register an event handler to the window that will automatically call the {@link AbstractViewController#destroy()} method when the windows becomes hidden. @param window the window ...
java
public static <M> Subscription destroyOnClose(final Window window, final AbstractViewController<M> viewBinder) { Assert.requireNonNull(window, "window"); Assert.requireNonNull(viewBinder, "viewBinder"); final EventHandler<WindowEvent> handler = e -> viewBinder.destroy(); window.addEventF...
[ "public", "static", "<", "M", ">", "Subscription", "destroyOnClose", "(", "final", "Window", "window", ",", "final", "AbstractViewController", "<", "M", ">", "viewBinder", ")", "{", "Assert", ".", "requireNonNull", "(", "window", ",", "\"window\"", ")", ";", ...
The method will register an event handler to the window that will automatically call the {@link AbstractViewController#destroy()} method when the windows becomes hidden. @param window the window @param viewBinder the view binder @param <M> the model type @return a subscription to unsubsribe / deregister the handler.
[ "The", "method", "will", "register", "an", "event", "handler", "to", "the", "window", "that", "will", "automatically", "call", "the", "{" ]
train
https://github.com/canoo/dolphin-platform/blob/fb99c1fab24df80d2fa094d8688b546140146874/platform/dolphin-platform-remoting-client-javafx/src/main/java/com/canoo/platform/remoting/client/javafx/window/DolphinWindowUtils.java#L83-L89
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/proxy/transport/AjaxProxyTask.java
AjaxProxyTask.mapToJsonObject
public static JSONObject mapToJsonObject(Map<String, Object> map) { """ Utility to convert a map to a JSON object. @param map @return """ JSONObject jsonObj = new JSONObject(); try { for (String key : map.keySet()) { Object value = map.get(key)...
java
public static JSONObject mapToJsonObject(Map<String, Object> map) { JSONObject jsonObj = new JSONObject(); try { for (String key : map.keySet()) { Object value = map.get(key); if (value instanceof Map) jsonObj.put(k...
[ "public", "static", "JSONObject", "mapToJsonObject", "(", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "JSONObject", "jsonObj", "=", "new", "JSONObject", "(", ")", ";", "try", "{", "for", "(", "String", "key", ":", "map", ".", "keySet", "...
Utility to convert a map to a JSON object. @param map @return
[ "Utility", "to", "convert", "a", "map", "to", "a", "JSON", "object", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/proxy/transport/AjaxProxyTask.java#L73-L91
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectIntersectionOfImpl_CustomFieldSerializer.java
OWLObjectIntersectionOfImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectIntersectionOfImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.go...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectIntersectionOfImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLObjectIntersectionOfImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectIntersectionOfImpl_CustomFieldSerializer.java#L90-L93
camunda/camunda-bpm-platform
engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/util/EngineUtil.java
EngineUtil.lookupProcessEngine
public static ProcessEngine lookupProcessEngine(String engineName) { """ Look up the process engine from the {@link ProcessEngineProvider}. If engineName is null, the default engine is returned. @param engineName @return """ ServiceLoader<ProcessEngineProvider> serviceLoader = ServiceLoader.load(Process...
java
public static ProcessEngine lookupProcessEngine(String engineName) { ServiceLoader<ProcessEngineProvider> serviceLoader = ServiceLoader.load(ProcessEngineProvider.class); Iterator<ProcessEngineProvider> iterator = serviceLoader.iterator(); if(iterator.hasNext()) { ProcessEngineProvider provider = it...
[ "public", "static", "ProcessEngine", "lookupProcessEngine", "(", "String", "engineName", ")", "{", "ServiceLoader", "<", "ProcessEngineProvider", ">", "serviceLoader", "=", "ServiceLoader", ".", "load", "(", "ProcessEngineProvider", ".", "class", ")", ";", "Iterator",...
Look up the process engine from the {@link ProcessEngineProvider}. If engineName is null, the default engine is returned. @param engineName @return
[ "Look", "up", "the", "process", "engine", "from", "the", "{" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/util/EngineUtil.java#L34-L49
bozaro/git-lfs-java
gitlfs-pointer/src/main/java/ru/bozaro/gitlfs/pointer/Pointer.java
Pointer.parsePointer
@Nullable public static Map<String, String> parsePointer(@NotNull InputStream stream) throws IOException { """ Read pointer data. @param stream Input stream. @return Return pointer info or null if blob is not a pointer data. """ byte[] buffer = new byte[Constants.POINTER_MAX_SIZE]; int size = 0; ...
java
@Nullable public static Map<String, String> parsePointer(@NotNull InputStream stream) throws IOException { byte[] buffer = new byte[Constants.POINTER_MAX_SIZE]; int size = 0; while (size < buffer.length) { int len = stream.read(buffer, size, buffer.length - size); if (len <= 0) { retur...
[ "@", "Nullable", "public", "static", "Map", "<", "String", ",", "String", ">", "parsePointer", "(", "@", "NotNull", "InputStream", "stream", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "Constants", ".", "POINTER_...
Read pointer data. @param stream Input stream. @return Return pointer info or null if blob is not a pointer data.
[ "Read", "pointer", "data", "." ]
train
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-pointer/src/main/java/ru/bozaro/gitlfs/pointer/Pointer.java#L91-L103
wg/lettuce
src/main/java/com/lambdaworks/redis/RedisClient.java
RedisClient.connectAsync
public <K, V> RedisAsyncConnection<K, V> connectAsync(RedisCodec<K, V> codec) { """ Open a new asynchronous connection to the redis server. Use the supplied {@link RedisCodec codec} to encode/decode keys and values. @param codec Use this codec to encode/decode keys and values. @return A new connection. ...
java
public <K, V> RedisAsyncConnection<K, V> connectAsync(RedisCodec<K, V> codec) { BlockingQueue<Command<K, V, ?>> queue = new LinkedBlockingQueue<Command<K, V, ?>>(); CommandHandler<K, V> handler = new CommandHandler<K, V>(queue); RedisAsyncConnection<K, V> connection = new RedisAsyncConnection<K...
[ "public", "<", "K", ",", "V", ">", "RedisAsyncConnection", "<", "K", ",", "V", ">", "connectAsync", "(", "RedisCodec", "<", "K", ",", "V", ">", "codec", ")", "{", "BlockingQueue", "<", "Command", "<", "K", ",", "V", ",", "?", ">", ">", "queue", "...
Open a new asynchronous connection to the redis server. Use the supplied {@link RedisCodec codec} to encode/decode keys and values. @param codec Use this codec to encode/decode keys and values. @return A new connection.
[ "Open", "a", "new", "asynchronous", "connection", "to", "the", "redis", "server", ".", "Use", "the", "supplied", "{", "@link", "RedisCodec", "codec", "}", "to", "encode", "/", "decode", "keys", "and", "values", "." ]
train
https://github.com/wg/lettuce/blob/5141640dc8289ff3af07b44a87020cef719c5f4a/src/main/java/com/lambdaworks/redis/RedisClient.java#L133-L140
RKumsher/utils
src/main/java/com/github/rkumsher/number/RandomNumberUtils.java
RandomNumberUtils.randomLongLessThan
public static long randomLongLessThan(long maxExclusive) { """ Returns a random long that is less than the given long. @param maxExclusive the value that returned long must be less than @return the random long @throws IllegalArgumentException if maxExclusive is less than or equal to {@link Long#MIN_VALUE} ...
java
public static long randomLongLessThan(long maxExclusive) { checkArgument( maxExclusive > Long.MIN_VALUE, "Cannot produce long less than %s", Long.MIN_VALUE); return randomLong(Long.MIN_VALUE, maxExclusive); }
[ "public", "static", "long", "randomLongLessThan", "(", "long", "maxExclusive", ")", "{", "checkArgument", "(", "maxExclusive", ">", "Long", ".", "MIN_VALUE", ",", "\"Cannot produce long less than %s\"", ",", "Long", ".", "MIN_VALUE", ")", ";", "return", "randomLong"...
Returns a random long that is less than the given long. @param maxExclusive the value that returned long must be less than @return the random long @throws IllegalArgumentException if maxExclusive is less than or equal to {@link Long#MIN_VALUE}
[ "Returns", "a", "random", "long", "that", "is", "less", "than", "the", "given", "long", "." ]
train
https://github.com/RKumsher/utils/blob/fcdb190569cd0288249bf4b46fd418f8c01d1caf/src/main/java/com/github/rkumsher/number/RandomNumberUtils.java#L153-L157
zerodhatech/javakiteconnect
kiteconnect/src/com/zerodhatech/kiteconnect/KiteConnect.java
KiteConnect.getHistoricalData
public HistoricalData getHistoricalData(Date from, Date to, String token, String interval, boolean continuous) throws KiteException, IOException, JSONException { """ Retrieves historical data for an instrument. @param from "yyyy-mm-dd" for fetching candles between days and "yyyy-mm-dd hh:mm:ss" for fetching candl...
java
public HistoricalData getHistoricalData(Date from, Date to, String token, String interval, boolean continuous) throws KiteException, IOException, JSONException { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Map<String, Object> params = new HashMap<>(); params.put("from"...
[ "public", "HistoricalData", "getHistoricalData", "(", "Date", "from", ",", "Date", "to", ",", "String", "token", ",", "String", "interval", ",", "boolean", "continuous", ")", "throws", "KiteException", ",", "IOException", ",", "JSONException", "{", "SimpleDateForm...
Retrieves historical data for an instrument. @param from "yyyy-mm-dd" for fetching candles between days and "yyyy-mm-dd hh:mm:ss" for fetching candles between timestamps. @param to "yyyy-mm-dd" for fetching candles between days and "yyyy-mm-dd hh:mm:ss" for fetching candles between timestamps. @param continuous set to ...
[ "Retrieves", "historical", "data", "for", "an", "instrument", "." ]
train
https://github.com/zerodhatech/javakiteconnect/blob/4a3f15ff2c8a1b3b6ec61799f8bb047e4dfeb92d/kiteconnect/src/com/zerodhatech/kiteconnect/KiteConnect.java#L595-L606
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java
DatabaseAccountsInner.listConnectionStringsAsync
public Observable<DatabaseAccountListConnectionStringsResultInner> listConnectionStringsAsync(String resourceGroupName, String accountName) { """ Lists the connection strings for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos ...
java
public Observable<DatabaseAccountListConnectionStringsResultInner> listConnectionStringsAsync(String resourceGroupName, String accountName) { return listConnectionStringsWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<DatabaseAccountListConnectionStringsResultInner>, Datab...
[ "public", "Observable", "<", "DatabaseAccountListConnectionStringsResultInner", ">", "listConnectionStringsAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ")", "{", "return", "listConnectionStringsWithServiceResponseAsync", "(", "resourceGroupName", ",",...
Lists the connection strings for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the DatabaseAccountListConne...
[ "Lists", "the", "connection", "strings", "for", "the", "specified", "Azure", "Cosmos", "DB", "database", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java#L1223-L1230
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/PathImpl.java
PathImpl.openReadWrite
public void openReadWrite(ReadStreamOld is, WriteStreamOld os) throws IOException { """ Opens a ReadWritePair for reading and writing. <p>A chat channel, for example, would open its socket using this interface. @param is pre-allocated ReadStream to be initialized @param os pre-allocated WriteStream to be i...
java
public void openReadWrite(ReadStreamOld is, WriteStreamOld os) throws IOException { clearStatusCache(); StreamImpl impl = openReadWriteImpl(); //impl.setPath(this); os.init(impl); is.init(impl); }
[ "public", "void", "openReadWrite", "(", "ReadStreamOld", "is", ",", "WriteStreamOld", "os", ")", "throws", "IOException", "{", "clearStatusCache", "(", ")", ";", "StreamImpl", "impl", "=", "openReadWriteImpl", "(", ")", ";", "//impl.setPath(this);", "os", ".", "...
Opens a ReadWritePair for reading and writing. <p>A chat channel, for example, would open its socket using this interface. @param is pre-allocated ReadStream to be initialized @param os pre-allocated WriteStream to be initialized
[ "Opens", "a", "ReadWritePair", "for", "reading", "and", "writing", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/PathImpl.java#L1246-L1255
HeidelTime/heideltime
src/jvnsensegmenter/FeatureGenerator.java
FeatureGenerator.readAbbrList
public static void readAbbrList(String dataFile, Map map) throws IOException { """ Read abbr list. @param dataFile the data file @param map the map @throws IOException Signals that an I/O exception has occurred. """ BufferedReader fin = new BufferedReader(new FileReader(dataFile)); String line; ...
java
public static void readAbbrList(String dataFile, Map map) throws IOException { BufferedReader fin = new BufferedReader(new FileReader(dataFile)); String line; while ((line = fin.readLine()) != null) { StringTokenizer strTok = new StringTokenizer(line, " \t\r\n"); if (strTok.countToken...
[ "public", "static", "void", "readAbbrList", "(", "String", "dataFile", ",", "Map", "map", ")", "throws", "IOException", "{", "BufferedReader", "fin", "=", "new", "BufferedReader", "(", "new", "FileReader", "(", "dataFile", ")", ")", ";", "String", "line", ";...
Read abbr list. @param dataFile the data file @param map the map @throws IOException Signals that an I/O exception has occurred.
[ "Read", "abbr", "list", "." ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/jvnsensegmenter/FeatureGenerator.java#L159-L174
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/DateTimeField.java
DateTimeField.getSQLFromField
public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { """ Move the physical binary data to this SQL parameter row. This method used the setTimestamp statement method. @param statement The SQL prepare statement. @param iType the type of SQL statement. @param...
java
public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { if (this.isNull()) { if ((!this.isNullable()) || (iType == DBConstants.SQL_SELECT_TYPE) || (DBConstants.FALSE.equals(this.getRecord().getTable().get...
[ "public", "void", "getSQLFromField", "(", "PreparedStatement", "statement", ",", "int", "iType", ",", "int", "iParamColumn", ")", "throws", "SQLException", "{", "if", "(", "this", ".", "isNull", "(", ")", ")", "{", "if", "(", "(", "!", "this", ".", "isNu...
Move the physical binary data to this SQL parameter row. This method used the setTimestamp statement method. @param statement The SQL prepare statement. @param iType the type of SQL statement. @param iParamColumn The column in the prepared statement to set the data. @exception SQLException From SQL calls.
[ "Move", "the", "physical", "binary", "data", "to", "this", "SQL", "parameter", "row", ".", "This", "method", "used", "the", "setTimestamp", "statement", "method", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateTimeField.java#L166-L190
alkacon/opencms-core
src/org/opencms/ui/login/CmsPasswordForm.java
CmsPasswordForm.setErrorPassword1
public void setErrorPassword1(UserError error, String style) { """ Sets the password 1 error.<p> @param error the error @param style the style class """ m_passwordField1.setComponentError(error); m_password1Style.setStyle(style); }
java
public void setErrorPassword1(UserError error, String style) { m_passwordField1.setComponentError(error); m_password1Style.setStyle(style); }
[ "public", "void", "setErrorPassword1", "(", "UserError", "error", ",", "String", "style", ")", "{", "m_passwordField1", ".", "setComponentError", "(", "error", ")", ";", "m_password1Style", ".", "setStyle", "(", "style", ")", ";", "}" ]
Sets the password 1 error.<p> @param error the error @param style the style class
[ "Sets", "the", "password", "1", "error", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/login/CmsPasswordForm.java#L218-L222
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/crdt/pncounter/PNCounterProxy.java
PNCounterProxy.invokeInternal
private long invokeInternal(Operation operation, List<Address> excludedAddresses, HazelcastException lastException) { """ Invokes the {@code operation} recursively on viable replica addresses until successful or the list of viable replicas is exhausted. Replicas with addresses con...
java
private long invokeInternal(Operation operation, List<Address> excludedAddresses, HazelcastException lastException) { final Address target = getCRDTOperationTarget(excludedAddresses); if (target == null) { throw lastException != null ? last...
[ "private", "long", "invokeInternal", "(", "Operation", "operation", ",", "List", "<", "Address", ">", "excludedAddresses", ",", "HazelcastException", "lastException", ")", "{", "final", "Address", "target", "=", "getCRDTOperationTarget", "(", "excludedAddresses", ")",...
Invokes the {@code operation} recursively on viable replica addresses until successful or the list of viable replicas is exhausted. Replicas with addresses contained in the {@code excludedAddresses} are skipped. If there are no viable replicas, this method will throw the {@code lastException} if not {@code null} or a {...
[ "Invokes", "the", "{", "@code", "operation", "}", "recursively", "on", "viable", "replica", "addresses", "until", "successful", "or", "the", "list", "of", "viable", "replicas", "is", "exhausted", ".", "Replicas", "with", "addresses", "contained", "in", "the", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/crdt/pncounter/PNCounterProxy.java#L184-L211
diirt/util
src/main/java/org/epics/util/stats/Ranges.java
Ranges.contains
public static boolean contains(Range range, Range subrange) { """ Determines whether the subrange is contained in the range or not. @param range a range @param subrange a possible subrange @return true if subrange is contained in range """ return range.getMinimum().doubleValue() <= subrange.getMin...
java
public static boolean contains(Range range, Range subrange) { return range.getMinimum().doubleValue() <= subrange.getMinimum().doubleValue() && range.getMaximum().doubleValue() >= subrange.getMaximum().doubleValue(); }
[ "public", "static", "boolean", "contains", "(", "Range", "range", ",", "Range", "subrange", ")", "{", "return", "range", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")", "<=", "subrange", ".", "getMinimum", "(", ")", ".", "doubleValue", "(", ")...
Determines whether the subrange is contained in the range or not. @param range a range @param subrange a possible subrange @return true if subrange is contained in range
[ "Determines", "whether", "the", "subrange", "is", "contained", "in", "the", "range", "or", "not", "." ]
train
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/stats/Ranges.java#L70-L74
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/WriteChannelConfiguration.java
WriteChannelConfiguration.newBuilder
public static Builder newBuilder(TableId destinationTable, FormatOptions format) { """ Creates a builder for a BigQuery Load Configuration given the destination table and format. """ return newBuilder(destinationTable).setFormatOptions(format); }
java
public static Builder newBuilder(TableId destinationTable, FormatOptions format) { return newBuilder(destinationTable).setFormatOptions(format); }
[ "public", "static", "Builder", "newBuilder", "(", "TableId", "destinationTable", ",", "FormatOptions", "format", ")", "{", "return", "newBuilder", "(", "destinationTable", ")", ".", "setFormatOptions", "(", "format", ")", ";", "}" ]
Creates a builder for a BigQuery Load Configuration given the destination table and format.
[ "Creates", "a", "builder", "for", "a", "BigQuery", "Load", "Configuration", "given", "the", "destination", "table", "and", "format", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/WriteChannelConfiguration.java#L489-L491
crnk-project/crnk-framework
crnk-core/src/main/java/io/crnk/core/engine/internal/utils/PropertyUtils.java
PropertyUtils.getProperty
public static Object getProperty(Object bean, List<String> propertyPath) { """ Similar to {@link PropertyUtils#getProperty(Object, String)} but returns the property value for the tail of the given property path. @param bean bean to be accessed @param propertyPath property path @return value """ ...
java
public static Object getProperty(Object bean, List<String> propertyPath) { Object current = bean; for (String propertyName : propertyPath) { if (current == null) { return null; } if (current instanceof Iterable) { // follow multi-valued property List<Object> result = new ArrayList<>(); Iter...
[ "public", "static", "Object", "getProperty", "(", "Object", "bean", ",", "List", "<", "String", ">", "propertyPath", ")", "{", "Object", "current", "=", "bean", ";", "for", "(", "String", "propertyName", ":", "propertyPath", ")", "{", "if", "(", "current",...
Similar to {@link PropertyUtils#getProperty(Object, String)} but returns the property value for the tail of the given property path. @param bean bean to be accessed @param propertyPath property path @return value
[ "Similar", "to", "{", "@link", "PropertyUtils#getProperty", "(", "Object", "String", ")", "}", "but", "returns", "the", "property", "value", "for", "the", "tail", "of", "the", "given", "property", "path", "." ]
train
https://github.com/crnk-project/crnk-framework/blob/2fd3ef9a991788d46fd2e83b43c8ea37cbaf8681/crnk-core/src/main/java/io/crnk/core/engine/internal/utils/PropertyUtils.java#L87-L107
alkacon/opencms-core
src/org/opencms/main/OpenCmsUrlServletFilter.java
OpenCmsUrlServletFilter.doFilter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { """ Adjusts the requested URIs by prepending the name of the {@link org.opencms.main.OpenCmsServlet}, if the request should be handled by that servlet. @see javax.servlet.Filter#...
java
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (m_isInitialized || tryToInitialize()) { if (request instanceof HttpServletRequest) { HttpServletRequest req = (HttpServletRequest)request; ...
[ "public", "void", "doFilter", "(", "ServletRequest", "request", ",", "ServletResponse", "response", ",", "FilterChain", "chain", ")", "throws", "IOException", ",", "ServletException", "{", "if", "(", "m_isInitialized", "||", "tryToInitialize", "(", ")", ")", "{", ...
Adjusts the requested URIs by prepending the name of the {@link org.opencms.main.OpenCmsServlet}, if the request should be handled by that servlet. @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
[ "Adjusts", "the", "requested", "URIs", "by", "prepending", "the", "name", "of", "the", "{", "@link", "org", ".", "opencms", ".", "main", ".", "OpenCmsServlet", "}", "if", "the", "request", "should", "be", "handled", "by", "that", "servlet", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/OpenCmsUrlServletFilter.java#L118-L133
att/AAF
authz/authz-core/src/main/java/com/att/cssa/rserv/TypedCode.java
TypedCode.relatedTo
public StringBuilder relatedTo(HttpCode<TRANS, ?> code, StringBuilder sb) { """ Print on String Builder content related to specific Code This is for Reporting and Debugging purposes, so the content is not cached. If code is "null", then all content is matched @param code @return """ boolean first ...
java
public StringBuilder relatedTo(HttpCode<TRANS, ?> code, StringBuilder sb) { boolean first = true; for(Pair<String, Pair<HttpCode<TRANS, ?>, List<Pair<String, Object>>>> pair : types) { if(code==null || pair.y.x == code) { if(first) { first = false; } else { sb.append(','); } sb...
[ "public", "StringBuilder", "relatedTo", "(", "HttpCode", "<", "TRANS", ",", "?", ">", "code", ",", "StringBuilder", "sb", ")", "{", "boolean", "first", "=", "true", ";", "for", "(", "Pair", "<", "String", ",", "Pair", "<", "HttpCode", "<", "TRANS", ","...
Print on String Builder content related to specific Code This is for Reporting and Debugging purposes, so the content is not cached. If code is "null", then all content is matched @param code @return
[ "Print", "on", "String", "Builder", "content", "related", "to", "specific", "Code" ]
train
https://github.com/att/AAF/blob/090562e956c0035db972aafba844dc6d3fc948ee/authz/authz-core/src/main/java/com/att/cssa/rserv/TypedCode.java#L171-L193
jbundle/jbundle
thin/base/screen/cal/grid/src/main/java/org/jbundle/thin/base/screen/cal/grid/CalendarThinTableModel.java
CalendarThinTableModel.fireTableRowSelected
public void fireTableRowSelected(Object source, int iRowIndex, int iSelectionType) { """ Notify listeners this row is selected; pass a -1 to de-select all rows. """ this.fireMySelectionChanged(new MyListSelectionEvent(source, this, iRowIndex, iSelectionType)); }
java
public void fireTableRowSelected(Object source, int iRowIndex, int iSelectionType) { this.fireMySelectionChanged(new MyListSelectionEvent(source, this, iRowIndex, iSelectionType)); }
[ "public", "void", "fireTableRowSelected", "(", "Object", "source", ",", "int", "iRowIndex", ",", "int", "iSelectionType", ")", "{", "this", ".", "fireMySelectionChanged", "(", "new", "MyListSelectionEvent", "(", "source", ",", "this", ",", "iRowIndex", ",", "iSe...
Notify listeners this row is selected; pass a -1 to de-select all rows.
[ "Notify", "listeners", "this", "row", "is", "selected", ";", "pass", "a", "-", "1", "to", "de", "-", "select", "all", "rows", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/cal/grid/src/main/java/org/jbundle/thin/base/screen/cal/grid/CalendarThinTableModel.java#L136-L139
nextreports/nextreports-engine
src/ro/nextreports/engine/queryexec/util/StringUtil.java
StringUtil.replaceTabsWithSpaces
public static String replaceTabsWithSpaces(String text, int tabSize) { """ Replaces all instances of the tab character in <code>text</code> with the spaces. @param text The <code>java.lang.String</code> in which to replace tabs with spaces. @return A <code>java.lang.String</code> just like <code>text</code>,...
java
public static String replaceTabsWithSpaces(String text, int tabSize) { String tabText = ""; for (int i = 0; i < tabSize; i++) { tabText += " "; } return text.replaceAll("\t", " "); }
[ "public", "static", "String", "replaceTabsWithSpaces", "(", "String", "text", ",", "int", "tabSize", ")", "{", "String", "tabText", "=", "\"\"", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tabSize", ";", "i", "++", ")", "{", "tabText", "+=...
Replaces all instances of the tab character in <code>text</code> with the spaces. @param text The <code>java.lang.String</code> in which to replace tabs with spaces. @return A <code>java.lang.String</code> just like <code>text</code>, but with spaces instead of tabs.
[ "Replaces", "all", "instances", "of", "the", "tab", "character", "in", "<code", ">", "text<", "/", "code", ">", "with", "the", "spaces", "." ]
train
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/queryexec/util/StringUtil.java#L257-L264
qos-ch/slf4j
osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/LogServiceImpl.java
LogServiceImpl.createMessage
private String createMessage(ServiceReference sr, String message) { """ Formats the log message to indicate the service sending it, if known. @param sr the ServiceReference sending the message. @param message The message to log. @return The formatted log message. """ StringBuilder output = new St...
java
private String createMessage(ServiceReference sr, String message) { StringBuilder output = new StringBuilder(); if (sr != null) { output.append('[').append(sr.toString()).append(']'); } else { output.append(UNKNOWN); } output.append(message); ret...
[ "private", "String", "createMessage", "(", "ServiceReference", "sr", ",", "String", "message", ")", "{", "StringBuilder", "output", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "sr", "!=", "null", ")", "{", "output", ".", "append", "(", "'", "'...
Formats the log message to indicate the service sending it, if known. @param sr the ServiceReference sending the message. @param message The message to log. @return The formatted log message.
[ "Formats", "the", "log", "message", "to", "indicate", "the", "service", "sending", "it", "if", "known", "." ]
train
https://github.com/qos-ch/slf4j/blob/905443f39fadd88a8dd2c467e44affd8cb072a4d/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/LogServiceImpl.java#L160-L171
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/painter/TextPainter.java
TextPainter.deleteShape
public void deleteShape(Paintable paintable, Object group, MapContext context) { """ Delete a {@link Paintable} object from the given {@link MapContext}. It the object does not exist, nothing will be done. @param paintable The object to be painted. @param group The group where the object resides in (optiona...
java
public void deleteShape(Paintable paintable, Object group, MapContext context) { Text text = (Text) paintable; context.getVectorContext().deleteElement(group, text.getId()); }
[ "public", "void", "deleteShape", "(", "Paintable", "paintable", ",", "Object", "group", ",", "MapContext", "context", ")", "{", "Text", "text", "=", "(", "Text", ")", "paintable", ";", "context", ".", "getVectorContext", "(", ")", ".", "deleteElement", "(", ...
Delete a {@link Paintable} object from the given {@link MapContext}. It the object does not exist, nothing will be done. @param paintable The object to be painted. @param group The group where the object resides in (optional). @param graphics The context to paint on.
[ "Delete", "a", "{", "@link", "Paintable", "}", "object", "from", "the", "given", "{", "@link", "MapContext", "}", ".", "It", "the", "object", "does", "not", "exist", "nothing", "will", "be", "done", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/painter/TextPainter.java#L65-L68
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/maplayer/MultiMapLayer.java
MultiMapLayer.fireLayerMovedDownEvent
protected void fireLayerMovedDownEvent(MapLayer layer, int newIndex) { """ Fire the event that indicates a layer was moved down. @param layer is the moved layer. @param newIndex is the new index of the layer. """ fireLayerHierarchyChangedEvent(new MapLayerHierarchyEvent(this, layer, Type.MOVE_CHILD_D...
java
protected void fireLayerMovedDownEvent(MapLayer layer, int newIndex) { fireLayerHierarchyChangedEvent(new MapLayerHierarchyEvent(this, layer, Type.MOVE_CHILD_DOWN, newIndex, layer.isTemporaryLayer())); }
[ "protected", "void", "fireLayerMovedDownEvent", "(", "MapLayer", "layer", ",", "int", "newIndex", ")", "{", "fireLayerHierarchyChangedEvent", "(", "new", "MapLayerHierarchyEvent", "(", "this", ",", "layer", ",", "Type", ".", "MOVE_CHILD_DOWN", ",", "newIndex", ",", ...
Fire the event that indicates a layer was moved down. @param layer is the moved layer. @param newIndex is the new index of the layer.
[ "Fire", "the", "event", "that", "indicates", "a", "layer", "was", "moved", "down", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/maplayer/MultiMapLayer.java#L472-L475
apache/incubator-atlas
client/src/main/java/org/apache/atlas/AtlasClient.java
AtlasClient.searchByFullText
public JSONObject searchByFullText(final String query, final int limit, final int offset) throws AtlasServiceException { """ Search given full text search @param query Query @param limit number of rows to be returned in the result, used for pagination. maxlimit > limit > 0. -1 maps to atlas.search.defaultlimit p...
java
public JSONObject searchByFullText(final String query, final int limit, final int offset) throws AtlasServiceException { return callAPIWithRetries(API.SEARCH_FULL_TEXT, null, new ResourceCreator() { @Override public WebResource createResource() { WebResource resource = ge...
[ "public", "JSONObject", "searchByFullText", "(", "final", "String", "query", ",", "final", "int", "limit", ",", "final", "int", "offset", ")", "throws", "AtlasServiceException", "{", "return", "callAPIWithRetries", "(", "API", ".", "SEARCH_FULL_TEXT", ",", "null",...
Search given full text search @param query Query @param limit number of rows to be returned in the result, used for pagination. maxlimit > limit > 0. -1 maps to atlas.search.defaultlimit property value @param offset offset to the results returned, used for pagination. offset >= 0. -1 maps to offset 0 @return result jso...
[ "Search", "given", "full", "text", "search" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/client/src/main/java/org/apache/atlas/AtlasClient.java#L867-L878
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/util/Util.java
Util.bindBidirectional
public static <L, R> void bindBidirectional(Property<L> leftProperty, Property<R> rightProperty, Converter<L, R> converter) { """ Creates a bidirectional binding between the two given properties of different types via the help of a {@link Converter}. @param leftProperty the left property @param rightProperty...
java
public static <L, R> void bindBidirectional(Property<L> leftProperty, Property<R> rightProperty, Converter<L, R> converter) { BidirectionalConversionBinding<L, R> binding = new BidirectionalConversionBinding<>(leftProperty, rightProperty, converter); leftProperty.addListener(binding); rightPrope...
[ "public", "static", "<", "L", ",", "R", ">", "void", "bindBidirectional", "(", "Property", "<", "L", ">", "leftProperty", ",", "Property", "<", "R", ">", "rightProperty", ",", "Converter", "<", "L", ",", "R", ">", "converter", ")", "{", "BidirectionalCon...
Creates a bidirectional binding between the two given properties of different types via the help of a {@link Converter}. @param leftProperty the left property @param rightProperty the right property @param converter the converter @param <L> the type of the left property @param <R> the type of ...
[ "Creates", "a", "bidirectional", "binding", "between", "the", "two", "given", "properties", "of", "different", "types", "via", "the", "help", "of", "a", "{", "@link", "Converter", "}", "." ]
train
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/util/Util.java#L309-L314
line/armeria
saml/src/main/java/com/linecorp/armeria/server/saml/SamlEndpoint.java
SamlEndpoint.ofHttpRedirect
public static SamlEndpoint ofHttpRedirect(URI uri) { """ Creates a {@link SamlEndpoint} of the specified {@code uri} and the HTTP Redirect binding protocol. """ requireNonNull(uri, "uri"); return new SamlEndpoint(uri, SamlBindingProtocol.HTTP_REDIRECT); }
java
public static SamlEndpoint ofHttpRedirect(URI uri) { requireNonNull(uri, "uri"); return new SamlEndpoint(uri, SamlBindingProtocol.HTTP_REDIRECT); }
[ "public", "static", "SamlEndpoint", "ofHttpRedirect", "(", "URI", "uri", ")", "{", "requireNonNull", "(", "uri", ",", "\"uri\"", ")", ";", "return", "new", "SamlEndpoint", "(", "uri", ",", "SamlBindingProtocol", ".", "HTTP_REDIRECT", ")", ";", "}" ]
Creates a {@link SamlEndpoint} of the specified {@code uri} and the HTTP Redirect binding protocol.
[ "Creates", "a", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/saml/src/main/java/com/linecorp/armeria/server/saml/SamlEndpoint.java#L48-L51
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WeightedHighlighter.java
WeightedHighlighter.startFragment
private static int startFragment(StringBuilder sb, String text, int offset, int limit) { """ Writes the start of a fragment to the string buffer <code>sb</code>. The first occurrence of a matching term is indicated by the <code>offset</code> into the <code>text</code>. @param sb where to append the start ...
java
private static int startFragment(StringBuilder sb, String text, int offset, int limit) { if (limit == 0) { // append all sb.append(text.substring(0, offset)); return offset; } String intro = "... "; int start = offset; for (int i = offset - 1; i >= limit...
[ "private", "static", "int", "startFragment", "(", "StringBuilder", "sb", ",", "String", "text", ",", "int", "offset", ",", "int", "limit", ")", "{", "if", "(", "limit", "==", "0", ")", "{", "// append all", "sb", ".", "append", "(", "text", ".", "subst...
Writes the start of a fragment to the string buffer <code>sb</code>. The first occurrence of a matching term is indicated by the <code>offset</code> into the <code>text</code>. @param sb where to append the start of the fragment. @param text the original text. @param offset the start offset of the first matching...
[ "Writes", "the", "start", "of", "a", "fragment", "to", "the", "string", "buffer", "<code", ">", "sb<", "/", "code", ">", ".", "The", "first", "occurrence", "of", "a", "matching", "term", "is", "indicated", "by", "the", "<code", ">", "offset<", "/", "co...
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/WeightedHighlighter.java#L228-L254
apereo/cas
support/cas-server-support-digest-authentication/src/main/java/org/apereo/cas/digest/util/DigestAuthenticationUtils.java
DigestAuthenticationUtils.createOpaque
public static String createOpaque(final String domain, final String nonce) { """ Create opaque. @param domain the domain @param nonce the nonce @return the opaque """ return DigestUtils.md5Hex(domain + nonce); }
java
public static String createOpaque(final String domain, final String nonce) { return DigestUtils.md5Hex(domain + nonce); }
[ "public", "static", "String", "createOpaque", "(", "final", "String", "domain", ",", "final", "String", "nonce", ")", "{", "return", "DigestUtils", ".", "md5Hex", "(", "domain", "+", "nonce", ")", ";", "}" ]
Create opaque. @param domain the domain @param nonce the nonce @return the opaque
[ "Create", "opaque", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-digest-authentication/src/main/java/org/apereo/cas/digest/util/DigestAuthenticationUtils.java#L51-L53
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/uploader/Uploader.java
Uploader.getResponseString
private String getResponseString(boolean async, UploaderResponse response) { """ Get the photo or ticket id from the response. @param async @param response @return """ return async ? response.getTicketId() : response.getPhotoId(); }
java
private String getResponseString(boolean async, UploaderResponse response) { return async ? response.getTicketId() : response.getPhotoId(); }
[ "private", "String", "getResponseString", "(", "boolean", "async", ",", "UploaderResponse", "response", ")", "{", "return", "async", "?", "response", ".", "getTicketId", "(", ")", ":", "response", ".", "getPhotoId", "(", ")", ";", "}" ]
Get the photo or ticket id from the response. @param async @param response @return
[ "Get", "the", "photo", "or", "ticket", "id", "from", "the", "response", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/uploader/Uploader.java#L178-L180
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/interest/FastHessianFeatureDetector.java
FastHessianFeatureDetector.checkMax
protected static boolean checkMax(ImageBorder_F32 inten, float bestScore, int c_x, int c_y) { """ Sees if the best score in the current layer is greater than all the scores in a 3x3 neighborhood in another layer. """ for( int y = c_y -1; y <= c_y+1; y++ ) { for( int x = c_x-1; x <= c_x+1; x++ ) { if(...
java
protected static boolean checkMax(ImageBorder_F32 inten, float bestScore, int c_x, int c_y) { for( int y = c_y -1; y <= c_y+1; y++ ) { for( int x = c_x-1; x <= c_x+1; x++ ) { if( inten.get(x,y) >= bestScore ) { return false; } } } return true; }
[ "protected", "static", "boolean", "checkMax", "(", "ImageBorder_F32", "inten", ",", "float", "bestScore", ",", "int", "c_x", ",", "int", "c_y", ")", "{", "for", "(", "int", "y", "=", "c_y", "-", "1", ";", "y", "<=", "c_y", "+", "1", ";", "y", "++",...
Sees if the best score in the current layer is greater than all the scores in a 3x3 neighborhood in another layer.
[ "Sees", "if", "the", "best", "score", "in", "the", "current", "layer", "is", "greater", "than", "all", "the", "scores", "in", "a", "3x3", "neighborhood", "in", "another", "layer", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/interest/FastHessianFeatureDetector.java#L304-L313
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/util/ScriptUtil.java
ScriptUtil.isDynamicScriptExpression
public static boolean isDynamicScriptExpression(String language, String value) { """ Checks if the value is an expression for a dynamic script source or resource. @param language the language of the script @param value the value to check @return true if the value is an expression for a dynamic script source/r...
java
public static boolean isDynamicScriptExpression(String language, String value) { return StringUtil.isExpression(value) && (language != null && !JuelScriptEngineFactory.names.contains(language.toLowerCase())); }
[ "public", "static", "boolean", "isDynamicScriptExpression", "(", "String", "language", ",", "String", "value", ")", "{", "return", "StringUtil", ".", "isExpression", "(", "value", ")", "&&", "(", "language", "!=", "null", "&&", "!", "JuelScriptEngineFactory", "....
Checks if the value is an expression for a dynamic script source or resource. @param language the language of the script @param value the value to check @return true if the value is an expression for a dynamic script source/resource, otherwise false
[ "Checks", "if", "the", "value", "is", "an", "expression", "for", "a", "dynamic", "script", "source", "or", "resource", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/util/ScriptUtil.java#L192-L194
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/Kickflip.java
Kickflip.getApiClient
public static KickflipApiClient getApiClient(Context context, KickflipCallback callback) { """ Create a new instance of the KickflipApiClient if one hasn't yet been created, or the provided API keys don't match the existing client. @param context the context of the host application @param callback an option...
java
public static KickflipApiClient getApiClient(Context context, KickflipCallback callback) { checkNotNull(sClientKey); checkNotNull(sClientSecret); if (sKickflip == null || !sKickflip.getConfig().getClientId().equals(sClientKey)) { sKickflip = new KickflipApiClient(context, sClientKey,...
[ "public", "static", "KickflipApiClient", "getApiClient", "(", "Context", "context", ",", "KickflipCallback", "callback", ")", "{", "checkNotNull", "(", "sClientKey", ")", ";", "checkNotNull", "(", "sClientSecret", ")", ";", "if", "(", "sKickflip", "==", "null", ...
Create a new instance of the KickflipApiClient if one hasn't yet been created, or the provided API keys don't match the existing client. @param context the context of the host application @param callback an optional callback to be notified with the Kickflip user corresponding to the provided API keys. @return
[ "Create", "a", "new", "instance", "of", "the", "KickflipApiClient", "if", "one", "hasn", "t", "yet", "been", "created", "or", "the", "provided", "API", "keys", "don", "t", "match", "the", "existing", "client", "." ]
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/Kickflip.java#L336-L345
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.concatCTM
public void concatCTM(float a, float b, float c, float d, float e, float f) { """ Concatenate a matrix to the current transformation matrix. @param a an element of the transformation matrix @param b an element of the transformation matrix @param c an element of the transformation matrix @param d an element of ...
java
public void concatCTM(float a, float b, float c, float d, float e, float f) { content.append(a).append(' ').append(b).append(' ').append(c).append(' '); content.append(d).append(' ').append(e).append(' ').append(f).append(" cm").append_i(separator); }
[ "public", "void", "concatCTM", "(", "float", "a", ",", "float", "b", ",", "float", "c", ",", "float", "d", ",", "float", "e", ",", "float", "f", ")", "{", "content", ".", "append", "(", "a", ")", ".", "append", "(", "'", "'", ")", ".", "append"...
Concatenate a matrix to the current transformation matrix. @param a an element of the transformation matrix @param b an element of the transformation matrix @param c an element of the transformation matrix @param d an element of the transformation matrix @param e an element of the transformation matrix @param f an elem...
[ "Concatenate", "a", "matrix", "to", "the", "current", "transformation", "matrix", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L1781-L1784
Netflix/conductor
es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java
ElasticSearchRestDAOV5.initIndex
private void initIndex() throws Exception { """ Initializes the index with the required templates and mappings. """ //0. Add the tasklog template if (doesResourceNotExist("/_template/tasklog_template")) { logger.info("Creating the index template 'tasklog_template'"); In...
java
private void initIndex() throws Exception { //0. Add the tasklog template if (doesResourceNotExist("/_template/tasklog_template")) { logger.info("Creating the index template 'tasklog_template'"); InputStream stream = ElasticSearchDAOV5.class.getResourceAsStream("/template_tasklo...
[ "private", "void", "initIndex", "(", ")", "throws", "Exception", "{", "//0. Add the tasklog template", "if", "(", "doesResourceNotExist", "(", "\"/_template/tasklog_template\"", ")", ")", "{", "logger", ".", "info", "(", "\"Creating the index template 'tasklog_template'\"",...
Initializes the index with the required templates and mappings.
[ "Initializes", "the", "index", "with", "the", "required", "templates", "and", "mappings", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/es5-persistence/src/main/java/com/netflix/conductor/dao/es5/index/ElasticSearchRestDAOV5.java#L197-L212
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/watch/WatchUtil.java
WatchUtil.createAll
public static WatchMonitor createAll(URI uri, int maxDepth, Watcher watcher) { """ 创建并初始化监听,监听所有事件 @param uri URI @param maxDepth 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录 @param watcher {@link Watcher} @return {@link WatchMonitor} """ return createAll(Paths.get(uri), maxDepth, watcher); }
java
public static WatchMonitor createAll(URI uri, int maxDepth, Watcher watcher) { return createAll(Paths.get(uri), maxDepth, watcher); }
[ "public", "static", "WatchMonitor", "createAll", "(", "URI", "uri", ",", "int", "maxDepth", ",", "Watcher", "watcher", ")", "{", "return", "createAll", "(", "Paths", ".", "get", "(", "uri", ")", ",", "maxDepth", ",", "watcher", ")", ";", "}" ]
创建并初始化监听,监听所有事件 @param uri URI @param maxDepth 当监听目录时,监听目录的最大深度,当设置值为1(或小于1)时,表示不递归监听子目录 @param watcher {@link Watcher} @return {@link WatchMonitor}
[ "创建并初始化监听,监听所有事件" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/watch/WatchUtil.java#L178-L180
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/UNode.java
UNode.addXMLAttributes
private void addXMLAttributes(Map<String, String> attrMap) { """ Get the child nodes of this UNode that are VALUE nodes marked as attributes. """ if (m_children != null) { for (UNode childNode : m_children) { // A child node must not contain a tag name to be considered an...
java
private void addXMLAttributes(Map<String, String> attrMap) { if (m_children != null) { for (UNode childNode : m_children) { // A child node must not contain a tag name to be considered an attribute. if (childNode.m_type == NodeType.VALUE && childNode.m_bAttribute ...
[ "private", "void", "addXMLAttributes", "(", "Map", "<", "String", ",", "String", ">", "attrMap", ")", "{", "if", "(", "m_children", "!=", "null", ")", "{", "for", "(", "UNode", "childNode", ":", "m_children", ")", "{", "// A child node must not contain a tag n...
Get the child nodes of this UNode that are VALUE nodes marked as attributes.
[ "Get", "the", "child", "nodes", "of", "this", "UNode", "that", "are", "VALUE", "nodes", "marked", "as", "attributes", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/UNode.java#L1232-L1242
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/TopicsInner.java
TopicsInner.regenerateKeyAsync
public Observable<TopicSharedAccessKeysInner> regenerateKeyAsync(String resourceGroupName, String topicName, String keyName) { """ Regenerate key for a topic. Regenerate a shared access key for a topic. @param resourceGroupName The name of the resource group within the user's subscription. @param topicName Na...
java
public Observable<TopicSharedAccessKeysInner> regenerateKeyAsync(String resourceGroupName, String topicName, String keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, topicName, keyName).map(new Func1<ServiceResponse<TopicSharedAccessKeysInner>, TopicSharedAccessKeysInner>() { ...
[ "public", "Observable", "<", "TopicSharedAccessKeysInner", ">", "regenerateKeyAsync", "(", "String", "resourceGroupName", ",", "String", "topicName", ",", "String", "keyName", ")", "{", "return", "regenerateKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "top...
Regenerate key for a topic. Regenerate a shared access key for a topic. @param resourceGroupName The name of the resource group within the user's subscription. @param topicName Name of the topic @param keyName Key name to regenerate key1 or key2 @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Regenerate", "key", "for", "a", "topic", ".", "Regenerate", "a", "shared", "access", "key", "for", "a", "topic", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2019_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2019_01_01/implementation/TopicsInner.java#L1196-L1203
mapbox/mapbox-plugins-android
plugin-building/src/main/java/com/mapbox/mapboxsdk/plugins/building/BuildingPlugin.java
BuildingPlugin.setOpacity
public void setOpacity(@FloatRange(from = 0.0f, to = 1.0f) float opacity) { """ Change the building opacity. Calls into changing the fill extrusion fill opacity. @param opacity {@code float} value between 0 (invisible) and 1 (solid) @since 0.1.0 """ this.opacity = opacity; if (!style.isFullyLoaded(...
java
public void setOpacity(@FloatRange(from = 0.0f, to = 1.0f) float opacity) { this.opacity = opacity; if (!style.isFullyLoaded()) { // We are in progress of loading a new style return; } fillExtrusionLayer.setProperties(fillExtrusionOpacity(opacity)); }
[ "public", "void", "setOpacity", "(", "@", "FloatRange", "(", "from", "=", "0.0f", ",", "to", "=", "1.0f", ")", "float", "opacity", ")", "{", "this", ".", "opacity", "=", "opacity", ";", "if", "(", "!", "style", ".", "isFullyLoaded", "(", ")", ")", ...
Change the building opacity. Calls into changing the fill extrusion fill opacity. @param opacity {@code float} value between 0 (invisible) and 1 (solid) @since 0.1.0
[ "Change", "the", "building", "opacity", ".", "Calls", "into", "changing", "the", "fill", "extrusion", "fill", "opacity", "." ]
train
https://github.com/mapbox/mapbox-plugins-android/blob/c683cad4d8306945d71838d96fae73b8cbe2e6c9/plugin-building/src/main/java/com/mapbox/mapboxsdk/plugins/building/BuildingPlugin.java#L162-L170
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/AbstractValueModel.java
AbstractValueModel.fireValueChangeEvent
protected void fireValueChangeEvent(Object oldValue, Object newValue) { """ Notifies all listeners that have registered interest for notification on this event type. This method does not check if there is any change between the old and new value unlike the various fireValueChanged() methods. """ if (...
java
protected void fireValueChangeEvent(Object oldValue, Object newValue) { if (logger.isDebugEnabled()) { logger.debug("Firing value changed event. Old value='" + oldValue + "' new value='" + newValue + "'"); } final PropertyChangeListener[] propertyChangeListeners = getPropertyChangeLi...
[ "protected", "void", "fireValueChangeEvent", "(", "Object", "oldValue", ",", "Object", "newValue", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"Firing value changed event. Old value='\"", "+", "oldValue"...
Notifies all listeners that have registered interest for notification on this event type. This method does not check if there is any change between the old and new value unlike the various fireValueChanged() methods.
[ "Notifies", "all", "listeners", "that", "have", "registered", "interest", "for", "notification", "on", "this", "event", "type", ".", "This", "method", "does", "not", "check", "if", "there", "is", "any", "change", "between", "the", "old", "and", "new", "value...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/AbstractValueModel.java#L161-L176
Netflix/zuul
zuul-core/src/main/java/com/netflix/zuul/message/Headers.java
Headers.getFirst
public String getFirst(String name, String defaultValue) { """ Get the first value found for this key even if there are multiple. If none, then return the specified defaultValue. @param name @return """ String value = getFirst(name); if (value == null) { value = defaultValue; ...
java
public String getFirst(String name, String defaultValue) { String value = getFirst(name); if (value == null) { value = defaultValue; } return value; }
[ "public", "String", "getFirst", "(", "String", "name", ",", "String", "defaultValue", ")", "{", "String", "value", "=", "getFirst", "(", "name", ")", ";", "if", "(", "value", "==", "null", ")", "{", "value", "=", "defaultValue", ";", "}", "return", "va...
Get the first value found for this key even if there are multiple. If none, then return the specified defaultValue. @param name @return
[ "Get", "the", "first", "value", "found", "for", "this", "key", "even", "if", "there", "are", "multiple", ".", "If", "none", "then", "return", "the", "specified", "defaultValue", "." ]
train
https://github.com/Netflix/zuul/blob/01bc777cf05e3522d37c9ed902ae13eb38a19692/zuul-core/src/main/java/com/netflix/zuul/message/Headers.java#L111-L118
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.scaleAround
public Matrix4f scaleAround(float factor, float ox, float oy, float oz, Matrix4f dest) { """ /* (non-Javadoc) @see org.joml.Matrix4fc#scaleAround(float, float, float, float, org.joml.Matrix4f) """ return scaleAround(factor, factor, factor, ox, oy, oz, dest); }
java
public Matrix4f scaleAround(float factor, float ox, float oy, float oz, Matrix4f dest) { return scaleAround(factor, factor, factor, ox, oy, oz, dest); }
[ "public", "Matrix4f", "scaleAround", "(", "float", "factor", ",", "float", "ox", ",", "float", "oy", ",", "float", "oz", ",", "Matrix4f", "dest", ")", "{", "return", "scaleAround", "(", "factor", ",", "factor", ",", "factor", ",", "ox", ",", "oy", ",",...
/* (non-Javadoc) @see org.joml.Matrix4fc#scaleAround(float, float, float, float, org.joml.Matrix4f)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L4873-L4875