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
powermock/powermock
powermock-api/powermock-api-support/src/main/java/org/powermock/api/support/SuppressCode.java
SuppressCode.suppressMethod
public static synchronized void suppressMethod(Class<?> clazz, boolean excludePrivateMethods) { """ suSuppress all methods for this class. @param clazz The class which methods will be suppressed. @param excludePrivateMethods optionally not suppress private methods """ Method[] methods = null; if (ex...
java
public static synchronized void suppressMethod(Class<?> clazz, boolean excludePrivateMethods) { Method[] methods = null; if (excludePrivateMethods) { methods = clazz.getMethods(); } else { methods = clazz.getDeclaredMethods(); } for (Method method : methods) { MockRepository.addMethodToSuppress(met...
[ "public", "static", "synchronized", "void", "suppressMethod", "(", "Class", "<", "?", ">", "clazz", ",", "boolean", "excludePrivateMethods", ")", "{", "Method", "[", "]", "methods", "=", "null", ";", "if", "(", "excludePrivateMethods", ")", "{", "methods", "...
suSuppress all methods for this class. @param clazz The class which methods will be suppressed. @param excludePrivateMethods optionally not suppress private methods
[ "suSuppress", "all", "methods", "for", "this", "class", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-support/src/main/java/org/powermock/api/support/SuppressCode.java#L218-L230
jamesdbloom/mockserver
mockserver-core/src/main/java/org/mockserver/model/HttpRequest.java
HttpRequest.withCookie
public HttpRequest withCookie(String name, String value) { """ Adds one cookie to match on, which can specified using either plain strings or regular expressions (for more details of the supported regex syntax see http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html) @param name the cookies n...
java
public HttpRequest withCookie(String name, String value) { this.cookies.withEntry(name, value); return this; }
[ "public", "HttpRequest", "withCookie", "(", "String", "name", ",", "String", "value", ")", "{", "this", ".", "cookies", ".", "withEntry", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds one cookie to match on, which can specified using either plain strings or regular expressions (for more details of the supported regex syntax see http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html) @param name the cookies name @param value the cookies value
[ "Adds", "one", "cookie", "to", "match", "on", "which", "can", "specified", "using", "either", "plain", "strings", "or", "regular", "expressions", "(", "for", "more", "details", "of", "the", "supported", "regex", "syntax", "see", "http", ":", "//", "docs", ...
train
https://github.com/jamesdbloom/mockserver/blob/8b84fdd877e57b4eb780c9f8c8b1d65bcb448025/mockserver-core/src/main/java/org/mockserver/model/HttpRequest.java#L522-L525
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_consumption_GET
public OvhProjectUsage project_serviceName_consumption_GET(String serviceName, Date from, Date to) throws IOException { """ Get your project consumption REST: GET /cloud/project/{serviceName}/consumption @param to [required] Get usage to @param from [required] Get usage from @param serviceName [required] The...
java
public OvhProjectUsage project_serviceName_consumption_GET(String serviceName, Date from, Date to) throws IOException { String qPath = "/cloud/project/{serviceName}/consumption"; StringBuilder sb = path(qPath, serviceName); query(sb, "from", from); query(sb, "to", to); String resp = exec(qPath, "GET", sb.toSt...
[ "public", "OvhProjectUsage", "project_serviceName_consumption_GET", "(", "String", "serviceName", ",", "Date", "from", ",", "Date", "to", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/consumption\"", ";", "StringBuilder", "sb",...
Get your project consumption REST: GET /cloud/project/{serviceName}/consumption @param to [required] Get usage to @param from [required] Get usage from @param serviceName [required] The project id
[ "Get", "your", "project", "consumption" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L946-L953
looly/hutool
hutool-core/src/main/java/cn/hutool/core/text/StrBuilder.java
StrBuilder.getChars
public StrBuilder getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) { """ 将指定段的字符列表写出到目标字符数组中 @param srcBegin 起始位置(包括) @param srcEnd 结束位置(不包括) @param dst 目标数组 @param dstBegin 目标起始位置(包括) @return this """ if (srcBegin < 0) { srcBegin = 0; } if (srcEnd < 0) { srcEnd = 0; } else if ...
java
public StrBuilder getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) { if (srcBegin < 0) { srcBegin = 0; } if (srcEnd < 0) { srcEnd = 0; } else if (srcEnd > this.position) { srcEnd = this.position; } if (srcBegin > srcEnd) { throw new StringIndexOutOfBoundsException("srcBegin > srcEnd"...
[ "public", "StrBuilder", "getChars", "(", "int", "srcBegin", ",", "int", "srcEnd", ",", "char", "[", "]", "dst", ",", "int", "dstBegin", ")", "{", "if", "(", "srcBegin", "<", "0", ")", "{", "srcBegin", "=", "0", ";", "}", "if", "(", "srcEnd", "<", ...
将指定段的字符列表写出到目标字符数组中 @param srcBegin 起始位置(包括) @param srcEnd 结束位置(不包括) @param dst 目标数组 @param dstBegin 目标起始位置(包括) @return this
[ "将指定段的字符列表写出到目标字符数组中" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/text/StrBuilder.java#L301-L315
playn/playn
core/src/playn/core/Graphics.java
Graphics.createTexture
public Texture createTexture (float width, float height, Texture.Config config) { """ Creates an empty texture into which one can render. The supplied width and height are in display units and will be converted to pixels based on the current scale factor. """ int texWidth = config.toTexWidth(scale.scaledC...
java
public Texture createTexture (float width, float height, Texture.Config config) { int texWidth = config.toTexWidth(scale.scaledCeil(width)); int texHeight = config.toTexHeight(scale.scaledCeil(height)); if (texWidth <= 0 || texHeight <= 0) throw new IllegalArgumentException( "Invalid texture size: " +...
[ "public", "Texture", "createTexture", "(", "float", "width", ",", "float", "height", ",", "Texture", ".", "Config", "config", ")", "{", "int", "texWidth", "=", "config", ".", "toTexWidth", "(", "scale", ".", "scaledCeil", "(", "width", ")", ")", ";", "in...
Creates an empty texture into which one can render. The supplied width and height are in display units and will be converted to pixels based on the current scale factor.
[ "Creates", "an", "empty", "texture", "into", "which", "one", "can", "render", ".", "The", "supplied", "width", "and", "height", "are", "in", "display", "units", "and", "will", "be", "converted", "to", "pixels", "based", "on", "the", "current", "scale", "fa...
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/Graphics.java#L124-L134
victims/victims-lib-java
src/main/java/com/redhat/victims/fingerprint/JarFile.java
JarFile.submitJob
protected void submitJob(ExecutorService executor, Content file) { """ Helper method to sumit a new threaded tast to a given executor. @param executor @param file """ // lifted from http://stackoverflow.com/a/5853198/1874604 class OneShotTask implements Runnable { Content file; ...
java
protected void submitJob(ExecutorService executor, Content file) { // lifted from http://stackoverflow.com/a/5853198/1874604 class OneShotTask implements Runnable { Content file; OneShotTask(Content file) { this.file = file; } public void...
[ "protected", "void", "submitJob", "(", "ExecutorService", "executor", ",", "Content", "file", ")", "{", "// lifted from http://stackoverflow.com/a/5853198/1874604", "class", "OneShotTask", "implements", "Runnable", "{", "Content", "file", ";", "OneShotTask", "(", "Content...
Helper method to sumit a new threaded tast to a given executor. @param executor @param file
[ "Helper", "method", "to", "sumit", "a", "new", "threaded", "tast", "to", "a", "given", "executor", "." ]
train
https://github.com/victims/victims-lib-java/blob/ccd0e2fcc409bb6cdfc5de411c3bb202c9095f8b/src/main/java/com/redhat/victims/fingerprint/JarFile.java#L114-L129
awslabs/amazon-sqs-java-messaging-lib
src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java
AmazonSQSMessagingClientWrapper.changeMessageVisibilityBatch
public ChangeMessageVisibilityBatchResult changeMessageVisibilityBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest) throws JMSException { """ Calls <code>changeMessageVisibilityBatch</code> and wraps <code>AmazonClientException</code>. This is used to for negative acknowled...
java
public ChangeMessageVisibilityBatchResult changeMessageVisibilityBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest) throws JMSException { try { prepareRequest(changeMessageVisibilityBatchRequest); return amazonSQSClient.changeMessageVisibilityBatch...
[ "public", "ChangeMessageVisibilityBatchResult", "changeMessageVisibilityBatch", "(", "ChangeMessageVisibilityBatchRequest", "changeMessageVisibilityBatchRequest", ")", "throws", "JMSException", "{", "try", "{", "prepareRequest", "(", "changeMessageVisibilityBatchRequest", ")", ";", ...
Calls <code>changeMessageVisibilityBatch</code> and wraps <code>AmazonClientException</code>. This is used to for negative acknowledge of messages in batch, so that messages can be received again without any delay. @param changeMessageVisibilityBatchRequest Container for the necessary parameters to execute the changeM...
[ "Calls", "<code", ">", "changeMessageVisibilityBatch<", "/", "code", ">", "and", "wraps", "<code", ">", "AmazonClientException<", "/", "code", ">", ".", "This", "is", "used", "to", "for", "negative", "acknowledge", "of", "messages", "in", "batch", "so", "that"...
train
https://github.com/awslabs/amazon-sqs-java-messaging-lib/blob/efa716d34d51ef1c5572790626cdb795419cb342/src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java#L387-L395
dashorst/wicket-stuff-markup-validator
jing/src/main/java/com/thaiopensource/validate/nvdl/SchemaImpl.java
SchemaImpl.installHandlers
SchemaFuture installHandlers(XMLReader in, SchemaReceiverImpl sr) { """ Installs the schema handler on the reader. @param in The reader. @param sr The schema receiver. @return The installed handler that implements also SchemaFuture. """ Handler h = new Handler(sr); in.setContentHandler(h); ret...
java
SchemaFuture installHandlers(XMLReader in, SchemaReceiverImpl sr) { Handler h = new Handler(sr); in.setContentHandler(h); return h; }
[ "SchemaFuture", "installHandlers", "(", "XMLReader", "in", ",", "SchemaReceiverImpl", "sr", ")", "{", "Handler", "h", "=", "new", "Handler", "(", "sr", ")", ";", "in", ".", "setContentHandler", "(", "h", ")", ";", "return", "h", ";", "}" ]
Installs the schema handler on the reader. @param in The reader. @param sr The schema receiver. @return The installed handler that implements also SchemaFuture.
[ "Installs", "the", "schema", "handler", "on", "the", "reader", "." ]
train
https://github.com/dashorst/wicket-stuff-markup-validator/blob/9e529a4dc8bfdbbe4c794f3132ef400a006560a1/jing/src/main/java/com/thaiopensource/validate/nvdl/SchemaImpl.java#L1211-L1215
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/ListFixture.java
ListFixture.valueAtIn
public Object valueAtIn(int index, List aList) { """ Retrieves element at index (0-based). @param index 0-based index of element to retrieve value of. @param aList list to get element value from. @return element at specified index. @throws SlimFixtureException if the list does not have at least index elements....
java
public Object valueAtIn(int index, List aList) { if (aList.size() > index) { return aList.get(index); } else { throw new SlimFixtureException(false, "list only has " + aList.size() + " elements"); } }
[ "public", "Object", "valueAtIn", "(", "int", "index", ",", "List", "aList", ")", "{", "if", "(", "aList", ".", "size", "(", ")", ">", "index", ")", "{", "return", "aList", ".", "get", "(", "index", ")", ";", "}", "else", "{", "throw", "new", "Sli...
Retrieves element at index (0-based). @param index 0-based index of element to retrieve value of. @param aList list to get element value from. @return element at specified index. @throws SlimFixtureException if the list does not have at least index elements.
[ "Retrieves", "element", "at", "index", "(", "0", "-", "based", ")", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/ListFixture.java#L133-L139
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/transform/wavelet/UtilWavelet.java
UtilWavelet.checkShape
public static void checkShape(ImageGray original , ImageGray transformed ) { """ The original image can have an even or odd number of width/height. While the transformed image must have an even number of pixels. If the original image is even then the sames are the same, otherwise the transformed image's shape ...
java
public static void checkShape(ImageGray original , ImageGray transformed ) { if( transformed.width % 2 == 1 || transformed.height % 2 == 1 ) throw new IllegalArgumentException("Image containing the wavelet transform must have an even width and height."); int w = original.width + original.width%2; int h = ori...
[ "public", "static", "void", "checkShape", "(", "ImageGray", "original", ",", "ImageGray", "transformed", ")", "{", "if", "(", "transformed", ".", "width", "%", "2", "==", "1", "||", "transformed", ".", "height", "%", "2", "==", "1", ")", "throw", "new", ...
The original image can have an even or odd number of width/height. While the transformed image must have an even number of pixels. If the original image is even then the sames are the same, otherwise the transformed image's shape is rounded up. @param original Original input image. @param transformed Image which has...
[ "The", "original", "image", "can", "have", "an", "even", "or", "odd", "number", "of", "width", "/", "height", ".", "While", "the", "transformed", "image", "must", "have", "an", "even", "number", "of", "pixels", ".", "If", "the", "original", "image", "is"...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/wavelet/UtilWavelet.java#L45-L56
aws/aws-sdk-java
aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/GetCredentialsForIdentityRequest.java
GetCredentialsForIdentityRequest.withLogins
public GetCredentialsForIdentityRequest withLogins(java.util.Map<String, String> logins) { """ <p> A set of optional name-value pairs that map provider names to provider tokens. The name-value pair will follow the syntax "provider_name": "provider_user_identifier". </p> <p> Logins should not be specified when...
java
public GetCredentialsForIdentityRequest withLogins(java.util.Map<String, String> logins) { setLogins(logins); return this; }
[ "public", "GetCredentialsForIdentityRequest", "withLogins", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "logins", ")", "{", "setLogins", "(", "logins", ")", ";", "return", "this", ";", "}" ]
<p> A set of optional name-value pairs that map provider names to provider tokens. The name-value pair will follow the syntax "provider_name": "provider_user_identifier". </p> <p> Logins should not be specified when trying to get credentials for an unauthenticated identity. </p> <p> The Logins parameter is required whe...
[ "<p", ">", "A", "set", "of", "optional", "name", "-", "value", "pairs", "that", "map", "provider", "names", "to", "provider", "tokens", ".", "The", "name", "-", "value", "pair", "will", "follow", "the", "syntax", "provider_name", ":", "provider_user_identifi...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/GetCredentialsForIdentityRequest.java#L194-L197
lucee/Lucee
core/src/main/java/lucee/commons/lang/ClassUtil.java
ClassUtil.loadInstance
public static Object loadInstance(Class clazz, Object defaultValue) { """ loads a class from a String classname @param clazz class to load @return matching Class """ try { return clazz.newInstance(); } catch (Throwable t) { ExceptionUtil.rethrowIfNecessary(t); return defaultValue; } ...
java
public static Object loadInstance(Class clazz, Object defaultValue) { try { return clazz.newInstance(); } catch (Throwable t) { ExceptionUtil.rethrowIfNecessary(t); return defaultValue; } }
[ "public", "static", "Object", "loadInstance", "(", "Class", "clazz", ",", "Object", "defaultValue", ")", "{", "try", "{", "return", "clazz", ".", "newInstance", "(", ")", ";", "}", "catch", "(", "Throwable", "t", ")", "{", "ExceptionUtil", ".", "rethrowIfN...
loads a class from a String classname @param clazz class to load @return matching Class
[ "loads", "a", "class", "from", "a", "String", "classname" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/lang/ClassUtil.java#L398-L406
hibernate/hibernate-ogm
core/src/main/java/org/hibernate/ogm/model/spi/Association.java
Association.put
public void put(RowKey key, Tuple value) { """ Adds the given row to this association, using the given row key. The row must not be null, use the {@link org.hibernate.ogm.model.spi.Association#remove(org.hibernate.ogm.model.key.spi.RowKey)} operation instead. @param key the key to store the row under @param ...
java
public void put(RowKey key, Tuple value) { // instead of setting it to null, core must use remove Contracts.assertNotNull( value, "association.put value" ); currentState.put( key, new AssociationOperation( key, value, PUT ) ); }
[ "public", "void", "put", "(", "RowKey", "key", ",", "Tuple", "value", ")", "{", "// instead of setting it to null, core must use remove", "Contracts", ".", "assertNotNull", "(", "value", ",", "\"association.put value\"", ")", ";", "currentState", ".", "put", "(", "k...
Adds the given row to this association, using the given row key. The row must not be null, use the {@link org.hibernate.ogm.model.spi.Association#remove(org.hibernate.ogm.model.key.spi.RowKey)} operation instead. @param key the key to store the row under @param value the association row to store
[ "Adds", "the", "given", "row", "to", "this", "association", "using", "the", "given", "row", "key", ".", "The", "row", "must", "not", "be", "null", "use", "the", "{", "@link", "org", ".", "hibernate", ".", "ogm", ".", "model", ".", "spi", ".", "Associ...
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/model/spi/Association.java#L85-L89
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/MutableArray.java
MutableArray.insertString
@NonNull @Override public MutableArray insertString(int index, String value) { """ Inserts a String object at the given index. @param index the index. This value must not exceed the bounds of the array. @param value the String object @return The self object """ return insertValue(index, va...
java
@NonNull @Override public MutableArray insertString(int index, String value) { return insertValue(index, value); }
[ "@", "NonNull", "@", "Override", "public", "MutableArray", "insertString", "(", "int", "index", ",", "String", "value", ")", "{", "return", "insertValue", "(", "index", ",", "value", ")", ";", "}" ]
Inserts a String object at the given index. @param index the index. This value must not exceed the bounds of the array. @param value the String object @return The self object
[ "Inserts", "a", "String", "object", "at", "the", "given", "index", "." ]
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/MutableArray.java#L423-L427
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/util/BuildRetentionFactory.java
BuildRetentionFactory.createBuildRetention
public static BuildRetention createBuildRetention(Run build, boolean discardOldArtifacts) { """ Create a Build retention object out of the build @param build The build to create the build retention out of @param discardOldArtifacts Flag whether to discard artifacts of those builds that are to be ...
java
public static BuildRetention createBuildRetention(Run build, boolean discardOldArtifacts) { BuildRetention buildRetention = new BuildRetention(discardOldArtifacts); LogRotator rotator = null; BuildDiscarder buildDiscarder = build.getParent().getBuildDiscarder(); if (buildDiscarder != nul...
[ "public", "static", "BuildRetention", "createBuildRetention", "(", "Run", "build", ",", "boolean", "discardOldArtifacts", ")", "{", "BuildRetention", "buildRetention", "=", "new", "BuildRetention", "(", "discardOldArtifacts", ")", ";", "LogRotator", "rotator", "=", "n...
Create a Build retention object out of the build @param build The build to create the build retention out of @param discardOldArtifacts Flag whether to discard artifacts of those builds that are to be discarded. @return a new Build retention
[ "Create", "a", "Build", "retention", "object", "out", "of", "the", "build" ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/BuildRetentionFactory.java#L24-L45
undera/jmeter-plugins
plugins/jmxmon/src/main/java/kg/apc/jmeter/jmxmon/JMXMonConnectionPool.java
JMXMonConnectionPool.getConnection
public MBeanServerConnection getConnection(String jmxUrl, Hashtable attributes) { """ Try to get a connection to the specified jmx url @param jmxUrl the jmx url @param attributes jmx connection attributes @return a jmx connection """ return getConnection(jmxUrl, attributes, false); }
java
public MBeanServerConnection getConnection(String jmxUrl, Hashtable attributes) { return getConnection(jmxUrl, attributes, false); }
[ "public", "MBeanServerConnection", "getConnection", "(", "String", "jmxUrl", ",", "Hashtable", "attributes", ")", "{", "return", "getConnection", "(", "jmxUrl", ",", "attributes", ",", "false", ")", ";", "}" ]
Try to get a connection to the specified jmx url @param jmxUrl the jmx url @param attributes jmx connection attributes @return a jmx connection
[ "Try", "to", "get", "a", "connection", "to", "the", "specified", "jmx", "url" ]
train
https://github.com/undera/jmeter-plugins/blob/416d2a77249ab921c7e4134c3e6a9639901ef7e8/plugins/jmxmon/src/main/java/kg/apc/jmeter/jmxmon/JMXMonConnectionPool.java#L49-L52
SonarSource/sonarqube
sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/FileMetadata.java
FileMetadata.readMetadata
public Metadata readMetadata(InputStream stream, Charset encoding, String filePath, @Nullable CharHandler otherHandler) { """ Compute hash of a file ignoring line ends differences. Maximum performance is needed. """ LineCounter lineCounter = new LineCounter(filePath, encoding); FileHashComputer fileHa...
java
public Metadata readMetadata(InputStream stream, Charset encoding, String filePath, @Nullable CharHandler otherHandler) { LineCounter lineCounter = new LineCounter(filePath, encoding); FileHashComputer fileHashComputer = new FileHashComputer(filePath); LineOffsetCounter lineOffsetCounter = new LineOffsetCou...
[ "public", "Metadata", "readMetadata", "(", "InputStream", "stream", ",", "Charset", "encoding", ",", "String", "filePath", ",", "@", "Nullable", "CharHandler", "otherHandler", ")", "{", "LineCounter", "lineCounter", "=", "new", "LineCounter", "(", "filePath", ",",...
Compute hash of a file ignoring line ends differences. Maximum performance is needed.
[ "Compute", "hash", "of", "a", "file", "ignoring", "line", "ends", "differences", ".", "Maximum", "performance", "is", "needed", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/FileMetadata.java#L51-L66
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.setShort
public <T extends Model> T setShort(String attributeName, Object value) { """ Sets attribute value as <code>Short</code>. If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class <code>java.lang.Short</code>, given the value is an instance of <code>S</code>, t...
java
public <T extends Model> T setShort(String attributeName, Object value) { Converter<Object, Short> converter = modelRegistryLocal.converterForValue(attributeName, value, Short.class); return setRaw(attributeName, converter != null ? converter.convert(value) : Convert.toShort(value)); }
[ "public", "<", "T", "extends", "Model", ">", "T", "setShort", "(", "String", "attributeName", ",", "Object", "value", ")", "{", "Converter", "<", "Object", ",", "Short", ">", "converter", "=", "modelRegistryLocal", ".", "converterForValue", "(", "attributeName...
Sets attribute value as <code>Short</code>. If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class <code>java.lang.Short</code>, given the value is an instance of <code>S</code>, then it will be used, otherwise performs a conversion using {@link Convert#toShort(Obj...
[ "Sets", "attribute", "value", "as", "<code", ">", "Short<", "/", "code", ">", ".", "If", "there", "is", "a", "{", "@link", "Converter", "}", "registered", "for", "the", "attribute", "that", "converts", "from", "Class", "<code", ">", "S<", "/", "code", ...
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L1741-L1744
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/fork/Fork.java
Fork.getForkMetricsName
private static String getForkMetricsName(TaskMetrics taskMetrics, State state, int index) { """ Creates a {@link String} that is a concatenation of the {@link TaskMetrics#getName()} and {@link #getForkMetricsId(State, int)}. """ return taskMetrics.getName() + "." + getForkMetricsId(state, index); }
java
private static String getForkMetricsName(TaskMetrics taskMetrics, State state, int index) { return taskMetrics.getName() + "." + getForkMetricsId(state, index); }
[ "private", "static", "String", "getForkMetricsName", "(", "TaskMetrics", "taskMetrics", ",", "State", "state", ",", "int", "index", ")", "{", "return", "taskMetrics", ".", "getName", "(", ")", "+", "\".\"", "+", "getForkMetricsId", "(", "state", ",", "index", ...
Creates a {@link String} that is a concatenation of the {@link TaskMetrics#getName()} and {@link #getForkMetricsId(State, int)}.
[ "Creates", "a", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/fork/Fork.java#L654-L656
beangle/beangle3
commons/model/src/main/java/org/beangle/commons/transfer/importer/MultiEntityImporter.java
MultiEntityImporter.addEntity
public void addEntity(String alias, String entityName) { """ <p> addEntity. </p> @param alias a {@link java.lang.String} object. @param entityName a {@link java.lang.String} object. """ EntityType entityType = Model.getType(entityName); if (null == entityType) { throw new RuntimeException("cannot...
java
public void addEntity(String alias, String entityName) { EntityType entityType = Model.getType(entityName); if (null == entityType) { throw new RuntimeException("cannot find entity type for " + entityName); } entityTypes.put(alias, entityType); }
[ "public", "void", "addEntity", "(", "String", "alias", ",", "String", "entityName", ")", "{", "EntityType", "entityType", "=", "Model", ".", "getType", "(", "entityName", ")", ";", "if", "(", "null", "==", "entityType", ")", "{", "throw", "new", "RuntimeEx...
<p> addEntity. </p> @param alias a {@link java.lang.String} object. @param entityName a {@link java.lang.String} object.
[ "<p", ">", "addEntity", ".", "<", "/", "p", ">" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/model/src/main/java/org/beangle/commons/transfer/importer/MultiEntityImporter.java#L183-L187
mapsforge/mapsforge
mapsforge-map/src/main/java/org/mapsforge/map/layer/renderer/RendererUtils.java
RendererUtils.parallelPath
static Point[] parallelPath(Point[] p, double dy) { """ Computes a polyline with distance dy parallel to given coordinates. http://objectmix.com/graphics/132987-draw-parallel-polyline-algorithm-needed.html """ int n = p.length - 1; Point[] u = new Point[n]; Point[] h = new Point[p.leng...
java
static Point[] parallelPath(Point[] p, double dy) { int n = p.length - 1; Point[] u = new Point[n]; Point[] h = new Point[p.length]; // Generate an array u[] of unity vectors of each direction for (int k = 0; k < n; ++k) { double c = p[k + 1].x - p[k].x; ...
[ "static", "Point", "[", "]", "parallelPath", "(", "Point", "[", "]", "p", ",", "double", "dy", ")", "{", "int", "n", "=", "p", ".", "length", "-", "1", ";", "Point", "[", "]", "u", "=", "new", "Point", "[", "n", "]", ";", "Point", "[", "]", ...
Computes a polyline with distance dy parallel to given coordinates. http://objectmix.com/graphics/132987-draw-parallel-polyline-algorithm-needed.html
[ "Computes", "a", "polyline", "with", "distance", "dy", "parallel", "to", "given", "coordinates", ".", "http", ":", "//", "objectmix", ".", "com", "/", "graphics", "/", "132987", "-", "draw", "-", "parallel", "-", "polyline", "-", "algorithm", "-", "needed"...
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map/src/main/java/org/mapsforge/map/layer/renderer/RendererUtils.java#L26-L56
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/form/binding/swing/SwingBindingFactory.java
SwingBindingFactory.createBoundShuttleList
public Binding createBoundShuttleList( String selectionFormProperty, ValueModel selectableItemsHolder, String renderedProperty ) { """ Binds the values specified in the collection contained within <code>selectableItemsHolder</code> to a {@link ShuttleList}, with any user selection being placed in the...
java
public Binding createBoundShuttleList( String selectionFormProperty, ValueModel selectableItemsHolder, String renderedProperty ) { Map context = ShuttleListBinder.createBindingContext(getFormModel(), selectionFormProperty, selectableItemsHolder, renderedProperty); return crea...
[ "public", "Binding", "createBoundShuttleList", "(", "String", "selectionFormProperty", ",", "ValueModel", "selectableItemsHolder", ",", "String", "renderedProperty", ")", "{", "Map", "context", "=", "ShuttleListBinder", ".", "createBindingContext", "(", "getFormModel", "(...
Binds the values specified in the collection contained within <code>selectableItemsHolder</code> to a {@link ShuttleList}, with any user selection being placed in the form property referred to by <code>selectionFormProperty</code>. Each item in the list will be rendered by looking up a property on the item by the name ...
[ "Binds", "the", "values", "specified", "in", "the", "collection", "contained", "within", "<code", ">", "selectableItemsHolder<", "/", "code", ">", "to", "a", "{", "@link", "ShuttleList", "}", "with", "any", "user", "selection", "being", "placed", "in", "the", ...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/binding/swing/SwingBindingFactory.java#L351-L356
optimaize/anythingworks
client/common/src/main/java/com/optimaize/anythingworks/client/common/host/PriorityHostProvider.java
PriorityHostProvider.addHost
public synchronized boolean addHost(@NotNull Host host, int priority) throws UnsupportedOperationException { """ Adds the host with the given priority. <p>If the host is here already but with another priority then the prio will be changed, and true is returned.</p> <p>Multiple hosts may have the same priority, a...
java
public synchronized boolean addHost(@NotNull Host host, int priority) throws UnsupportedOperationException { ProviderWithPrio provider = getProviderContainingHost(host); if (provider!=null) { if (provider.prio == priority) { return false; //already have it } else ...
[ "public", "synchronized", "boolean", "addHost", "(", "@", "NotNull", "Host", "host", ",", "int", "priority", ")", "throws", "UnsupportedOperationException", "{", "ProviderWithPrio", "provider", "=", "getProviderContainingHost", "(", "host", ")", ";", "if", "(", "p...
Adds the host with the given priority. <p>If the host is here already but with another priority then the prio will be changed, and true is returned.</p> <p>Multiple hosts may have the same priority, and are used alternately.</p> @param priority The higher the more important.
[ "Adds", "the", "host", "with", "the", "given", "priority", ".", "<p", ">", "If", "the", "host", "is", "here", "already", "but", "with", "another", "priority", "then", "the", "prio", "will", "be", "changed", "and", "true", "is", "returned", ".", "<", "/...
train
https://github.com/optimaize/anythingworks/blob/23e5f1c63cd56d935afaac4ad033c7996b32a1f2/client/common/src/main/java/com/optimaize/anythingworks/client/common/host/PriorityHostProvider.java#L91-L108
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/Transform2D.java
Transform2D.transform
public void transform(Tuple2D<?> tuple, Tuple2D<?> result) { """ Multiply this matrix by the tuple t and and place the result into the tuple "result". <p>This function is equivalent to: <pre> result = this * [ t.x ] [ t.y ] [ 1 ] </pre> @param tuple the tuple to be multiplied by this ma...
java
public void transform(Tuple2D<?> tuple, Tuple2D<?> result) { assert tuple != null : AssertMessages.notNullParameter(0); assert result != null : AssertMessages.notNullParameter(1); result.set( this.m00 * tuple.getX() + this.m01 * tuple.getY() + this.m02, this.m10 * tuple.getX() + this.m11 * tuple.getY() + ...
[ "public", "void", "transform", "(", "Tuple2D", "<", "?", ">", "tuple", ",", "Tuple2D", "<", "?", ">", "result", ")", "{", "assert", "tuple", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ")", ";", "assert", "result", "!=", "nu...
Multiply this matrix by the tuple t and and place the result into the tuple "result". <p>This function is equivalent to: <pre> result = this * [ t.x ] [ t.y ] [ 1 ] </pre> @param tuple the tuple to be multiplied by this matrix @param result the tuple into which the product is placed
[ "Multiply", "this", "matrix", "by", "the", "tuple", "t", "and", "and", "place", "the", "result", "into", "the", "tuple", "result", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/Transform2D.java#L683-L689
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/WaveformDetailComponent.java
WaveformDetailComponent.setWaveform
public void setWaveform(WaveformDetail waveform, CueList cueList, BeatGrid beatGrid) { """ Change the waveform preview being drawn. This will be quickly overruled if a player is being monitored, but can be used in other contexts. @param waveform the waveform detail to display @param cueList used to draw cue a...
java
public void setWaveform(WaveformDetail waveform, CueList cueList, BeatGrid beatGrid) { this.waveform.set(waveform); this.cueList.set(cueList); this.beatGrid.set(beatGrid); clearPlaybackState(); repaint(); if (!autoScroll.get()) { invalidate(); } }
[ "public", "void", "setWaveform", "(", "WaveformDetail", "waveform", ",", "CueList", "cueList", ",", "BeatGrid", "beatGrid", ")", "{", "this", ".", "waveform", ".", "set", "(", "waveform", ")", ";", "this", ".", "cueList", ".", "set", "(", "cueList", ")", ...
Change the waveform preview being drawn. This will be quickly overruled if a player is being monitored, but can be used in other contexts. @param waveform the waveform detail to display @param cueList used to draw cue and memory points @param beatGrid the locations of the beats, so they can be drawn
[ "Change", "the", "waveform", "preview", "being", "drawn", ".", "This", "will", "be", "quickly", "overruled", "if", "a", "player", "is", "being", "monitored", "but", "can", "be", "used", "in", "other", "contexts", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/WaveformDetailComponent.java#L364-L373
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindClass
public void bindClass(PersistentEntity entity, InFlightMetadataCollector mappings, String sessionFactoryBeanName) throws MappingException { """ Binds a Grails domain class to the Hibernate runtime meta model @param entity The domain class to bind @param mappings The existing mappings @param ses...
java
public void bindClass(PersistentEntity entity, InFlightMetadataCollector mappings, String sessionFactoryBeanName) throws MappingException { //if (domainClass.getClazz().getSuperclass() == Object.class) { if (entity.isRoot()) { bindRoot((HibernatePersistentEntity) entity, mappings...
[ "public", "void", "bindClass", "(", "PersistentEntity", "entity", ",", "InFlightMetadataCollector", "mappings", ",", "String", "sessionFactoryBeanName", ")", "throws", "MappingException", "{", "//if (domainClass.getClazz().getSuperclass() == Object.class) {", "if", "(", "entity...
Binds a Grails domain class to the Hibernate runtime meta model @param entity The domain class to bind @param mappings The existing mappings @param sessionFactoryBeanName the session factory bean name @throws MappingException Thrown if the domain class uses inheritance which is not supported
[ "Binds", "a", "Grails", "domain", "class", "to", "the", "Hibernate", "runtime", "meta", "model" ]
train
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L1235-L1241
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/stereo/StereoTool.java
StereoTool.allCoplanar
public static boolean allCoplanar(Vector3d planeNormal, Point3d pointInPlane, Point3d... points) { """ Check that all the points in the list are coplanar (in the same plane) as the plane defined by the planeNormal and the pointInPlane. @param planeNormal the normal to the plane @param pointInPlane any point k...
java
public static boolean allCoplanar(Vector3d planeNormal, Point3d pointInPlane, Point3d... points) { for (Point3d point : points) { double distance = StereoTool.signedDistanceToPlane(planeNormal, pointInPlane, point); if (distance < PLANE_TOLERANCE) { continue; ...
[ "public", "static", "boolean", "allCoplanar", "(", "Vector3d", "planeNormal", ",", "Point3d", "pointInPlane", ",", "Point3d", "...", "points", ")", "{", "for", "(", "Point3d", "point", ":", "points", ")", "{", "double", "distance", "=", "StereoTool", ".", "s...
Check that all the points in the list are coplanar (in the same plane) as the plane defined by the planeNormal and the pointInPlane. @param planeNormal the normal to the plane @param pointInPlane any point know to be in the plane @param points an array of points to test @return false if any of the points is not in the...
[ "Check", "that", "all", "the", "points", "in", "the", "list", "are", "coplanar", "(", "in", "the", "same", "plane", ")", "as", "the", "plane", "defined", "by", "the", "planeNormal", "and", "the", "pointInPlane", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/StereoTool.java#L181-L191
ModeShape/modeshape
index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/client/EsClient.java
EsClient.deleteIndex
public boolean deleteIndex(String name) throws IOException { """ Deletes index. @param name the name of the index to be deleted. @return true if index was deleted. @throws IOException """ CloseableHttpClient client = HttpClients.createDefault(); HttpDelete delete = new HttpDelete(String.fo...
java
public boolean deleteIndex(String name) throws IOException { CloseableHttpClient client = HttpClients.createDefault(); HttpDelete delete = new HttpDelete(String.format("http://%s:%d/%s", host, port, name)); try { CloseableHttpResponse resp = client.execute(delete); return...
[ "public", "boolean", "deleteIndex", "(", "String", "name", ")", "throws", "IOException", "{", "CloseableHttpClient", "client", "=", "HttpClients", ".", "createDefault", "(", ")", ";", "HttpDelete", "delete", "=", "new", "HttpDelete", "(", "String", ".", "format"...
Deletes index. @param name the name of the index to be deleted. @return true if index was deleted. @throws IOException
[ "Deletes", "index", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/client/EsClient.java#L104-L113
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/cli/Main.java
Main.runMain
@VisibleForTesting public static void runMain(final String[] args) throws Exception { """ Runs the print. @param args the cli arguments @throws Exception """ final CliHelpDefinition helpCli = new CliHelpDefinition(); try { Args.parse(helpCli, args); if (helpCli....
java
@VisibleForTesting public static void runMain(final String[] args) throws Exception { final CliHelpDefinition helpCli = new CliHelpDefinition(); try { Args.parse(helpCli, args); if (helpCli.help) { printUsage(0); return; } ...
[ "@", "VisibleForTesting", "public", "static", "void", "runMain", "(", "final", "String", "[", "]", "args", ")", "throws", "Exception", "{", "final", "CliHelpDefinition", "helpCli", "=", "new", "CliHelpDefinition", "(", ")", ";", "try", "{", "Args", ".", "par...
Runs the print. @param args the cli arguments @throws Exception
[ "Runs", "the", "print", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/cli/Main.java#L75-L115
IBM/ibm-cos-sdk-java
ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/aspera/transfer/AsperaLibraryLoader.java
AsperaLibraryLoader.extractJar
public static void extractJar(JarFile jar, File extractedLocation) throws IOException { """ Creates a 1:1 copy of all contents from a jar file to the specified location on the local filesystem @param jar The source jar to extract contents from @param extractedLocation The target location for extracted jar conten...
java
public static void extractJar(JarFile jar, File extractedLocation) throws IOException { Enumeration<JarEntry> entries = jar.entries(); while(entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); File destPath = new File(extractedLocation, SEPARATOR + entry.getName()); // is Directory ...
[ "public", "static", "void", "extractJar", "(", "JarFile", "jar", ",", "File", "extractedLocation", ")", "throws", "IOException", "{", "Enumeration", "<", "JarEntry", ">", "entries", "=", "jar", ".", "entries", "(", ")", ";", "while", "(", "entries", ".", "...
Creates a 1:1 copy of all contents from a jar file to the specified location on the local filesystem @param jar The source jar to extract contents from @param extractedLocation The target location for extracted jar contents @throws IOException if jar extraction fails IO
[ "Creates", "a", "1", ":", "1", "copy", "of", "all", "contents", "from", "a", "jar", "file", "to", "the", "specified", "location", "on", "the", "local", "filesystem" ]
train
https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/aspera/transfer/AsperaLibraryLoader.java#L121-L140
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/BaseListener.java
BaseListener.doRecordChange
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { """ Called when a change is the record status is about to happen/has happened. Note: This is a FileListener method, but I put it down here so this message will be propagated. @param field If this file change is due to a field, ...
java
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Return an error to stop the change int iErrorCode = DBConstants.NORMAL_RETURN; if (iChangeType == DBConstants.BEFORE_FREE_TYPE) { // This is the only type that I would pass on (So dependent knows it ...
[ "public", "int", "doRecordChange", "(", "FieldInfo", "field", ",", "int", "iChangeType", ",", "boolean", "bDisplayOption", ")", "{", "// Return an error to stop the change", "int", "iErrorCode", "=", "DBConstants", ".", "NORMAL_RETURN", ";", "if", "(", "iChangeType", ...
Called when a change is the record status is about to happen/has happened. Note: This is a FileListener method, but I put it down here so this message will be propagated. @param field If this file change is due to a field, this is the field. @param iChangeType The type of change that occurred. @param bDisplayOption If ...
[ "Called", "when", "a", "change", "is", "the", "record", "status", "is", "about", "to", "happen", "/", "has", "happened", ".", "Note", ":", "This", "is", "a", "FileListener", "method", "but", "I", "put", "it", "down", "here", "so", "this", "message", "w...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BaseListener.java#L362-L377
mp911de/visualizr
visualizr-metrics/src/main/java/biz/paluch/visualizr/metrics/VisualizrReporter.java
VisualizrReporter.reportMeter
private void reportMeter(String name, Meter meter) { """ Report a meter using fields events/m1_rate/m5_rate/m15_rate/mean_rate @param name @param meter """ String prefixedName = prefix(name); if (!snapshots.hasDescriptor(prefixedName)) { MetricItem.Builder builder = MetricItem....
java
private void reportMeter(String name, Meter meter) { String prefixedName = prefix(name); if (!snapshots.hasDescriptor(prefixedName)) { MetricItem.Builder builder = MetricItem.Builder.create(); builder.events("events"); builder.events("m1_rate", 1, rateUnit); ...
[ "private", "void", "reportMeter", "(", "String", "name", ",", "Meter", "meter", ")", "{", "String", "prefixedName", "=", "prefix", "(", "name", ")", ";", "if", "(", "!", "snapshots", ".", "hasDescriptor", "(", "prefixedName", ")", ")", "{", "MetricItem", ...
Report a meter using fields events/m1_rate/m5_rate/m15_rate/mean_rate @param name @param meter
[ "Report", "a", "meter", "using", "fields", "events", "/", "m1_rate", "/", "m5_rate", "/", "m15_rate", "/", "mean_rate" ]
train
https://github.com/mp911de/visualizr/blob/57206391692e88b2c59d52d4f18faa4cdfd32a98/visualizr-metrics/src/main/java/biz/paluch/visualizr/metrics/VisualizrReporter.java#L142-L162
apollographql/apollo-android
apollo-api/src/main/java/com/apollographql/apollo/api/ResponseField.java
ResponseField.forFragment
public static ResponseField forFragment(String responseName, String fieldName, List<String> typeConditions) { """ Factory method for creating a Field instance representing {@link Type#FRAGMENT}. @param responseName alias for the result of a field @param fieldName name of the field in the GraphQL operati...
java
public static ResponseField forFragment(String responseName, String fieldName, List<String> typeConditions) { List<Condition> conditions = new ArrayList<>(typeConditions.size()); for (String typeCondition : typeConditions) { conditions.add(Condition.typeCondition(typeCondition)); } return new Resp...
[ "public", "static", "ResponseField", "forFragment", "(", "String", "responseName", ",", "String", "fieldName", ",", "List", "<", "String", ">", "typeConditions", ")", "{", "List", "<", "Condition", ">", "conditions", "=", "new", "ArrayList", "<>", "(", "typeCo...
Factory method for creating a Field instance representing {@link Type#FRAGMENT}. @param responseName alias for the result of a field @param fieldName name of the field in the GraphQL operation @param typeConditions conditional GraphQL types @return Field instance representing {@link Type#FRAGMENT}
[ "Factory", "method", "for", "creating", "a", "Field", "instance", "representing", "{", "@link", "Type#FRAGMENT", "}", "." ]
train
https://github.com/apollographql/apollo-android/blob/a78869a76e17f77e42c7a88f0099914fe7ffa5b6/apollo-api/src/main/java/com/apollographql/apollo/api/ResponseField.java#L174-L181
mapsforge/mapsforge
mapsforge-map-android/src/main/java/org/mapsforge/map/android/util/AndroidUtil.java
AndroidUtil.createTileCache
public static TileCache createTileCache(Context c, String id, int tileSize, int width, int height, double overdraw) { """ Utility function to create a two-level tile cache with the right size, using the size of the map view. This is the compatibility version that by default creates a non-persistent cache. @par...
java
public static TileCache createTileCache(Context c, String id, int tileSize, int width, int height, double overdraw) { return createTileCache(c, id, tileSize, width, height, overdraw, false); }
[ "public", "static", "TileCache", "createTileCache", "(", "Context", "c", ",", "String", "id", ",", "int", "tileSize", ",", "int", "width", ",", "int", "height", ",", "double", "overdraw", ")", "{", "return", "createTileCache", "(", "c", ",", "id", ",", "...
Utility function to create a two-level tile cache with the right size, using the size of the map view. This is the compatibility version that by default creates a non-persistent cache. @param c the Android context @param id name for the storage directory @param tileSize tile size @param width the width...
[ "Utility", "function", "to", "create", "a", "two", "-", "level", "tile", "cache", "with", "the", "right", "size", "using", "the", "size", "of", "the", "map", "view", ".", "This", "is", "the", "compatibility", "version", "that", "by", "default", "creates", ...
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map-android/src/main/java/org/mapsforge/map/android/util/AndroidUtil.java#L222-L224
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/SRTServletResponse.java
SRTServletResponse.setInternalHeader
public void setInternalHeader(String name, String s) { """ Adds a header field with the specified string value. Does not check to see if this is an include. If this is called more than once, the current value will replace the previous value. @param name The header field name. @param s The field's string val...
java
public void setInternalHeader(String name, String s) { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"setInternalHeader", " name --> " + name + " value --> " + s,"["+this+"]"); } setHeader(n...
[ "public", "void", "setInternalHeader", "(", "String", "name", ",", "String", "s", ")", "{", "if", "(", "com", ".", "ibm", ".", "ejs", ".", "ras", ".", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "logger", ".", "isLoggable", "(", "Level"...
Adds a header field with the specified string value. Does not check to see if this is an include. If this is called more than once, the current value will replace the previous value. @param name The header field name. @param s The field's string value.
[ "Adds", "a", "header", "field", "with", "the", "specified", "string", "value", ".", "Does", "not", "check", "to", "see", "if", "this", "is", "an", "include", ".", "If", "this", "is", "called", "more", "than", "once", "the", "current", "value", "will", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/SRTServletResponse.java#L1846-L1851
Harium/keel
src/main/java/com/harium/keel/catalano/math/TaylorSeries.java
TaylorSeries.Sinh
public static double Sinh(double x, int nTerms) { """ compute Sinh using Taylor Series. @param x An angle, in radians. @param nTerms Number of terms. @return Result. """ if (nTerms < 2) return x; if (nTerms == 2) { return x + (x * x * x) / 6D; } else { ...
java
public static double Sinh(double x, int nTerms) { if (nTerms < 2) return x; if (nTerms == 2) { return x + (x * x * x) / 6D; } else { double mult = x * x * x; double fact = 6; int factS = 5; double result = x + mult / fact; ...
[ "public", "static", "double", "Sinh", "(", "double", "x", ",", "int", "nTerms", ")", "{", "if", "(", "nTerms", "<", "2", ")", "return", "x", ";", "if", "(", "nTerms", "==", "2", ")", "{", "return", "x", "+", "(", "x", "*", "x", "*", "x", ")",...
compute Sinh using Taylor Series. @param x An angle, in radians. @param nTerms Number of terms. @return Result.
[ "compute", "Sinh", "using", "Taylor", "Series", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/TaylorSeries.java#L107-L126
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/factory/LinearSolverFactory_DDRM.java
LinearSolverFactory_DDRM.leastSquaresQrPivot
public static LinearSolverDense<DMatrixRMaj> leastSquaresQrPivot(boolean computeNorm2 , boolean computeQ ) { """ <p> Linear solver which uses QR pivot decomposition. These solvers can handle singular systems and should never fail. For singular systems, the solution might not be as accurate as a pseudo inverse...
java
public static LinearSolverDense<DMatrixRMaj> leastSquaresQrPivot(boolean computeNorm2 , boolean computeQ ) { QRColPivDecompositionHouseholderColumn_DDRM decomposition = new QRColPivDecompositionHouseholderColumn_DDRM(); if( computeQ ) return new SolvePseudoInverseQrp_DDRM(de...
[ "public", "static", "LinearSolverDense", "<", "DMatrixRMaj", ">", "leastSquaresQrPivot", "(", "boolean", "computeNorm2", ",", "boolean", "computeQ", ")", "{", "QRColPivDecompositionHouseholderColumn_DDRM", "decomposition", "=", "new", "QRColPivDecompositionHouseholderColumn_DDR...
<p> Linear solver which uses QR pivot decomposition. These solvers can handle singular systems and should never fail. For singular systems, the solution might not be as accurate as a pseudo inverse that uses SVD. </p> <p> For singular systems there are multiple correct solutions. The optimal 2-norm solution is the ...
[ "<p", ">", "Linear", "solver", "which", "uses", "QR", "pivot", "decomposition", ".", "These", "solvers", "can", "handle", "singular", "systems", "and", "should", "never", "fail", ".", "For", "singular", "systems", "the", "solution", "might", "not", "be", "as...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/factory/LinearSolverFactory_DDRM.java#L156-L164
kamcpp/avicenna
src/avicenna/src/main/java/org/labcrypto/avicenna/Avicenna.java
Avicenna.defineDependency
public static <T> void defineDependency(Class<T> clazz, Collection<String> qualifiers, T dependency) { """ Adds a direct mapping between a type and an object. @param clazz Class type which should be injected. @param qualifiers Qualifiers to distinguish between similar types. @param dependency Dependency ...
java
public static <T> void defineDependency(Class<T> clazz, Collection<String> qualifiers, T dependency) { SortedSet<String> qs = new TreeSet<String>(); if (qualifiers != null) { qs.addAll(qualifiers); } dependencyContainer.add(DependencyIdentifier .getDep...
[ "public", "static", "<", "T", ">", "void", "defineDependency", "(", "Class", "<", "T", ">", "clazz", ",", "Collection", "<", "String", ">", "qualifiers", ",", "T", "dependency", ")", "{", "SortedSet", "<", "String", ">", "qs", "=", "new", "TreeSet", "<...
Adds a direct mapping between a type and an object. @param clazz Class type which should be injected. @param qualifiers Qualifiers to distinguish between similar types. @param dependency Dependency reference which should be copied to injection targets.
[ "Adds", "a", "direct", "mapping", "between", "a", "type", "and", "an", "object", "." ]
train
https://github.com/kamcpp/avicenna/blob/0fc4eff447761140cd3799287427d99c63ea6e6e/src/avicenna/src/main/java/org/labcrypto/avicenna/Avicenna.java#L156-L164
liferay/com-liferay-commerce
commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountUserRelPersistenceImpl.java
CommerceAccountUserRelPersistenceImpl.findAll
@Override public List<CommerceAccountUserRel> findAll(int start, int end) { """ Returns a range of all the commerce account user rels. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in ...
java
@Override public List<CommerceAccountUserRel> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceAccountUserRel", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce account user rels. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both ...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "account", "user", "rels", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountUserRelPersistenceImpl.java#L1634-L1637
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/RouteFilterRulesInner.java
RouteFilterRulesInner.createOrUpdate
public RouteFilterRuleInner createOrUpdate(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters) { """ Creates or updates a route in the specified route filter. @param resourceGroupName The name of the resource group. @param routeFilterName The name ...
java
public RouteFilterRuleInner createOrUpdate(String resourceGroupName, String routeFilterName, String ruleName, RouteFilterRuleInner routeFilterRuleParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters).toBlocking().last().body(); }
[ "public", "RouteFilterRuleInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "routeFilterName", ",", "String", "ruleName", ",", "RouteFilterRuleInner", "routeFilterRuleParameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "r...
Creates or updates a route in the specified route filter. @param resourceGroupName The name of the resource group. @param routeFilterName The name of the route filter. @param ruleName The name of the route filter rule. @param routeFilterRuleParameters Parameters supplied to the create or update route filter rule opera...
[ "Creates", "or", "updates", "a", "route", "in", "the", "specified", "route", "filter", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/RouteFilterRulesInner.java#L372-L374
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/servlet/ServletUtil.java
ServletUtil.write
public static void write(HttpServletResponse response, InputStream in, String contentType) { """ 返回数据给客户端 @param response 响应对象{@link HttpServletResponse} @param in 需要返回客户端的内容 @param contentType 返回的类型 """ response.setContentType(contentType); write(response, in); }
java
public static void write(HttpServletResponse response, InputStream in, String contentType) { response.setContentType(contentType); write(response, in); }
[ "public", "static", "void", "write", "(", "HttpServletResponse", "response", ",", "InputStream", "in", ",", "String", "contentType", ")", "{", "response", ".", "setContentType", "(", "contentType", ")", ";", "write", "(", "response", ",", "in", ")", ";", "}"...
返回数据给客户端 @param response 响应对象{@link HttpServletResponse} @param in 需要返回客户端的内容 @param contentType 返回的类型
[ "返回数据给客户端" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/servlet/ServletUtil.java#L536-L539
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CPDefinitionInventoryPersistenceImpl.java
CPDefinitionInventoryPersistenceImpl.fetchByUUID_G
@Override public CPDefinitionInventory fetchByUUID_G(String uuid, long groupId) { """ Returns the cp definition inventory where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching ...
java
@Override public CPDefinitionInventory fetchByUUID_G(String uuid, long groupId) { return fetchByUUID_G(uuid, groupId, true); }
[ "@", "Override", "public", "CPDefinitionInventory", "fetchByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "{", "return", "fetchByUUID_G", "(", "uuid", ",", "groupId", ",", "true", ")", ";", "}" ]
Returns the cp definition inventory where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param uuid the uuid @param groupId the group ID @return the matching cp definition inventory, or <code>null</code> if a matching cp definition inventory could not be...
[ "Returns", "the", "cp", "definition", "inventory", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "the", "finder",...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CPDefinitionInventoryPersistenceImpl.java#L705-L708
dain/leveldb
leveldb/src/main/java/org/iq80/leveldb/util/Slice.java
Slice.setInt
public void setInt(int index, int value) { """ Sets the specified 32-bit integer at the specified absolute {@code index} in this buffer. @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 4} is greater than {@code this.capacity} """ checkPosit...
java
public void setInt(int index, int value) { checkPositionIndexes(index, index + SIZE_OF_INT, this.length); index += offset; data[index] = (byte) (value); data[index + 1] = (byte) (value >>> 8); data[index + 2] = (byte) (value >>> 16); data[index + 3] = (byte) (value >>...
[ "public", "void", "setInt", "(", "int", "index", ",", "int", "value", ")", "{", "checkPositionIndexes", "(", "index", ",", "index", "+", "SIZE_OF_INT", ",", "this", ".", "length", ")", ";", "index", "+=", "offset", ";", "data", "[", "index", "]", "=", ...
Sets the specified 32-bit integer at the specified absolute {@code index} in this buffer. @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 4} is greater than {@code this.capacity}
[ "Sets", "the", "specified", "32", "-", "bit", "integer", "at", "the", "specified", "absolute", "{", "@code", "index", "}", "in", "this", "buffer", "." ]
train
https://github.com/dain/leveldb/blob/7994065b48eada2ef29e7fefd172c2ad1e0110eb/leveldb/src/main/java/org/iq80/leveldb/util/Slice.java#L309-L317
JOML-CI/JOML
src/org/joml/Matrix3f.java
Matrix3f.rotationTowards
public Matrix3f rotationTowards(Vector3fc dir, Vector3fc up) { """ Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local <code>-z</code> axis with <code>center - eye</code>. <p> In order to apply the rotation transformation to a previous existing transformation, ...
java
public Matrix3f rotationTowards(Vector3fc dir, Vector3fc up) { return rotationTowards(dir.x(), dir.y(), dir.z(), up.x(), up.y(), up.z()); }
[ "public", "Matrix3f", "rotationTowards", "(", "Vector3fc", "dir", ",", "Vector3fc", "up", ")", "{", "return", "rotationTowards", "(", "dir", ".", "x", "(", ")", ",", "dir", ".", "y", "(", ")", ",", "dir", ".", "z", "(", ")", ",", "up", ".", "x", ...
Set this matrix to a model transformation for a right-handed coordinate system, that aligns the local <code>-z</code> axis with <code>center - eye</code>. <p> In order to apply the rotation transformation to a previous existing transformation, use {@link #rotateTowards(float, float, float, float, float, float) rotateTo...
[ "Set", "this", "matrix", "to", "a", "model", "transformation", "for", "a", "right", "-", "handed", "coordinate", "system", "that", "aligns", "the", "local", "<code", ">", "-", "z<", "/", "code", ">", "axis", "with", "<code", ">", "center", "-", "eye<", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3f.java#L4025-L4027
beangle/beangle3
ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java
BeanDefinitionParser.parsePropertyElements
public void parsePropertyElements(Element beanEle, BeanDefinition bd) { """ Parse property sub-elements of the given bean element. @param beanEle a {@link org.w3c.dom.Element} object. @param bd a {@link org.springframework.beans.factory.config.BeanDefinition} object. """ NodeList nl = beanEle.getChildN...
java
public void parsePropertyElements(Element beanEle, BeanDefinition bd) { NodeList nl = beanEle.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node node = nl.item(i); if (node instanceof Element && nodeNameEquals(node, PROPERTY_ELEMENT)) parsePropertyElement((Element) node, bd); ...
[ "public", "void", "parsePropertyElements", "(", "Element", "beanEle", ",", "BeanDefinition", "bd", ")", "{", "NodeList", "nl", "=", "beanEle", ".", "getChildNodes", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nl", ".", "getLength", ...
Parse property sub-elements of the given bean element. @param beanEle a {@link org.w3c.dom.Element} object. @param bd a {@link org.springframework.beans.factory.config.BeanDefinition} object.
[ "Parse", "property", "sub", "-", "elements", "of", "the", "given", "bean", "element", "." ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L392-L399
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmsessionpolicy_binding.java
tmsessionpolicy_binding.get
public static tmsessionpolicy_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch tmsessionpolicy_binding resource of given name . """ tmsessionpolicy_binding obj = new tmsessionpolicy_binding(); obj.set_name(name); tmsessionpolicy_binding response = (tmsessionpol...
java
public static tmsessionpolicy_binding get(nitro_service service, String name) throws Exception{ tmsessionpolicy_binding obj = new tmsessionpolicy_binding(); obj.set_name(name); tmsessionpolicy_binding response = (tmsessionpolicy_binding) obj.get_resource(service); return response; }
[ "public", "static", "tmsessionpolicy_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "tmsessionpolicy_binding", "obj", "=", "new", "tmsessionpolicy_binding", "(", ")", ";", "obj", ".", "set_name", "(", "nam...
Use this API to fetch tmsessionpolicy_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "tmsessionpolicy_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/tm/tmsessionpolicy_binding.java#L136-L141
Mangopay/mangopay2-java-sdk
src/main/java/com/mangopay/core/APIs/ApiBase.java
ApiBase.getObject
protected <T extends Dto> T getObject(Class<T> classOfT, String methodKey, String entityId) throws Exception { """ Gets the Dto instance from API. @param <T> Type on behalf of which the request is being called. @param classOfT Type on behalf of which the request is being called. @param methodKey ...
java
protected <T extends Dto> T getObject(Class<T> classOfT, String methodKey, String entityId) throws Exception { return getObject(classOfT, methodKey, entityId, ""); }
[ "protected", "<", "T", "extends", "Dto", ">", "T", "getObject", "(", "Class", "<", "T", ">", "classOfT", ",", "String", "methodKey", ",", "String", "entityId", ")", "throws", "Exception", "{", "return", "getObject", "(", "classOfT", ",", "methodKey", ",", ...
Gets the Dto instance from API. @param <T> Type on behalf of which the request is being called. @param classOfT Type on behalf of which the request is being called. @param methodKey Relevant method key. @param entityId Entity identifier. @return The Dto instance returned from API. @...
[ "Gets", "the", "Dto", "instance", "from", "API", "." ]
train
https://github.com/Mangopay/mangopay2-java-sdk/blob/037cecb44ea62def63b507817fd9961649151157/src/main/java/com/mangopay/core/APIs/ApiBase.java#L306-L308
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/network/netty/InboundEnvelopeDecoder.java
InboundEnvelopeDecoder.skipBytes
private int skipBytes(ByteBuf in, int toSkip) { """ Skips over min(in.readableBytes(), toSkip) bytes in the Netty ByteBuf and returns how many bytes remain to be skipped. @return remaining bytes to be skipped """ if (toSkip <= in.readableBytes()) { in.readBytes(toSkip); return 0; } int remaini...
java
private int skipBytes(ByteBuf in, int toSkip) { if (toSkip <= in.readableBytes()) { in.readBytes(toSkip); return 0; } int remainingToSkip = toSkip - in.readableBytes(); in.readerIndex(in.readerIndex() + in.readableBytes()); return remainingToSkip; }
[ "private", "int", "skipBytes", "(", "ByteBuf", "in", ",", "int", "toSkip", ")", "{", "if", "(", "toSkip", "<=", "in", ".", "readableBytes", "(", ")", ")", "{", "in", ".", "readBytes", "(", "toSkip", ")", ";", "return", "0", ";", "}", "int", "remain...
Skips over min(in.readableBytes(), toSkip) bytes in the Netty ByteBuf and returns how many bytes remain to be skipped. @return remaining bytes to be skipped
[ "Skips", "over", "min", "(", "in", ".", "readableBytes", "()", "toSkip", ")", "bytes", "in", "the", "Netty", "ByteBuf", "and", "returns", "how", "many", "bytes", "remain", "to", "be", "skipped", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/runtime/io/network/netty/InboundEnvelopeDecoder.java#L344-L354
pravega/pravega
common/src/main/java/io/pravega/common/util/btree/BTreePage.java
BTreePage.setValueAtPosition
private void setValueAtPosition(int pos, ByteArraySegment value) { """ Sets the Value at the given position. @param pos The Position to set the value at. @param value A ByteArraySegment representing the value to set. """ Preconditions.checkElementIndex(pos, getCount(), "pos must be non-negative a...
java
private void setValueAtPosition(int pos, ByteArraySegment value) { Preconditions.checkElementIndex(pos, getCount(), "pos must be non-negative and smaller than the number of items."); Preconditions.checkArgument(value.getLength() == this.config.valueLength, "Given value has incorrect length."); t...
[ "private", "void", "setValueAtPosition", "(", "int", "pos", ",", "ByteArraySegment", "value", ")", "{", "Preconditions", ".", "checkElementIndex", "(", "pos", ",", "getCount", "(", ")", ",", "\"pos must be non-negative and smaller than the number of items.\"", ")", ";",...
Sets the Value at the given position. @param pos The Position to set the value at. @param value A ByteArraySegment representing the value to set.
[ "Sets", "the", "Value", "at", "the", "given", "position", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/util/btree/BTreePage.java#L573-L577
geomajas/geomajas-project-server
api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java
ManyToOneAttribute.setBooleanAttribute
public void setBooleanAttribute(String name, Boolean value) { """ Sets the specified boolean attribute to the specified value. @param name name of the attribute @param value value of the attribute @since 1.9.0 """ ensureValue(); Attribute attribute = new BooleanAttribute(value); attribute.setEditabl...
java
public void setBooleanAttribute(String name, Boolean value) { ensureValue(); Attribute attribute = new BooleanAttribute(value); attribute.setEditable(isEditable(name)); getValue().getAllAttributes().put(name, attribute); }
[ "public", "void", "setBooleanAttribute", "(", "String", "name", ",", "Boolean", "value", ")", "{", "ensureValue", "(", ")", ";", "Attribute", "attribute", "=", "new", "BooleanAttribute", "(", "value", ")", ";", "attribute", ".", "setEditable", "(", "isEditable...
Sets the specified boolean attribute to the specified value. @param name name of the attribute @param value value of the attribute @since 1.9.0
[ "Sets", "the", "specified", "boolean", "attribute", "to", "the", "specified", "value", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/layer/feature/attribute/ManyToOneAttribute.java#L118-L123
Jasig/uPortal
uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/ChannelListController.java
ChannelListController.getPortletRegistry
@RequestMapping(value = "/v4-3/dlm/portletRegistry.json", method = RequestMethod.GET) public ModelAndView getPortletRegistry( WebRequest webRequest, HttpServletRequest request, @RequestParam(value = "categoryId", required = false) String categoryId, @RequestParam(valu...
java
@RequestMapping(value = "/v4-3/dlm/portletRegistry.json", method = RequestMethod.GET) public ModelAndView getPortletRegistry( WebRequest webRequest, HttpServletRequest request, @RequestParam(value = "categoryId", required = false) String categoryId, @RequestParam(valu...
[ "@", "RequestMapping", "(", "value", "=", "\"/v4-3/dlm/portletRegistry.json\"", ",", "method", "=", "RequestMethod", ".", "GET", ")", "public", "ModelAndView", "getPortletRegistry", "(", "WebRequest", "webRequest", ",", "HttpServletRequest", "request", ",", "@", "Requ...
Updated version of this API. Supports an optional 'categoryId' parameter. If provided, this URL will return the portlet registry beginning with the specified category, including all descendants, and <em>excluding</em> uncategorized portlets. If no 'categoryId' is provided, this method returns the portlet registry begin...
[ "Updated", "version", "of", "this", "API", ".", "Supports", "an", "optional", "categoryId", "parameter", ".", "If", "provided", "this", "URL", "will", "return", "the", "portlet", "registry", "beginning", "with", "the", "specified", "category", "including", "all"...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/ChannelListController.java#L192-L247
demidenko05/beigesoft-webcrud-jar
src/main/java/org/beigesoft/web/service/SrvAddTheFirstUser.java
SrvAddTheFirstUser.addUser
@Override public final void addUser(final String pUserName, final String pPassw, final String pRole) throws Exception { """ <p>Add only user/password/role.</p> @param pUserName User Name @param pPassw User password @param pRole User role @throws Exception - an exception """ String query = "select...
java
@Override public final void addUser(final String pUserName, final String pPassw, final String pRole) throws Exception { String query = "select USERTOMCAT.ITSUSER as ITSUSER, ITSROLE" + " from USERTOMCAT join USERROLETOMCAT" + " on USERROLETOMCAT.ITSUSER = USERTOMCAT.ITSUSER;"; IRecordSet<RS>...
[ "@", "Override", "public", "final", "void", "addUser", "(", "final", "String", "pUserName", ",", "final", "String", "pPassw", ",", "final", "String", "pRole", ")", "throws", "Exception", "{", "String", "query", "=", "\"select USERTOMCAT.ITSUSER as ITSUSER, ITSROLE\"...
<p>Add only user/password/role.</p> @param pUserName User Name @param pPassw User password @param pRole User role @throws Exception - an exception
[ "<p", ">", "Add", "only", "user", "/", "password", "/", "role", ".", "<", "/", "p", ">" ]
train
https://github.com/demidenko05/beigesoft-webcrud-jar/blob/e973170f8fc1f164f0b67af9bb6a52b04579b64a/src/main/java/org/beigesoft/web/service/SrvAddTheFirstUser.java#L85-L120
Swagger2Markup/swagger2markup
src/main/java/io/github/swagger2markup/internal/component/PathOperationComponent.java
PathOperationComponent.addInlineDefinitionTitle
private void addInlineDefinitionTitle(MarkupDocBuilder markupDocBuilder, String title, String anchor) { """ Builds the title of an inline schema. Inline definitions should never been referenced in TOC because they have no real existence, so they are just text. @param title inline schema title @param anchor i...
java
private void addInlineDefinitionTitle(MarkupDocBuilder markupDocBuilder, String title, String anchor) { markupDocBuilder.anchor(anchor); markupDocBuilder.newLine(); markupDocBuilder.boldTextLine(title); }
[ "private", "void", "addInlineDefinitionTitle", "(", "MarkupDocBuilder", "markupDocBuilder", ",", "String", "title", ",", "String", "anchor", ")", "{", "markupDocBuilder", ".", "anchor", "(", "anchor", ")", ";", "markupDocBuilder", ".", "newLine", "(", ")", ";", ...
Builds the title of an inline schema. Inline definitions should never been referenced in TOC because they have no real existence, so they are just text. @param title inline schema title @param anchor inline schema anchor
[ "Builds", "the", "title", "of", "an", "inline", "schema", ".", "Inline", "definitions", "should", "never", "been", "referenced", "in", "TOC", "because", "they", "have", "no", "real", "existence", "so", "they", "are", "just", "text", "." ]
train
https://github.com/Swagger2Markup/swagger2markup/blob/da83465f19a2f8a0f1fba873b5762bca8587896b/src/main/java/io/github/swagger2markup/internal/component/PathOperationComponent.java#L257-L261
kaichunlin/android-transition
core/src/main/java/com/kaichunlin/transition/MenuItemTransitionBuilder.java
MenuItemTransitionBuilder.invalidateOptionOnStopTransition
public MenuItemTransitionBuilder invalidateOptionOnStopTransition(@NonNull Activity activity, boolean invalidate) { """ See {@link MenuItemTransition#setInvalidateOptionOnStopTransition(Activity, boolean)}}. @param activity Activity that should have its invalidateOptionsMenu() method called, or null if invalid...
java
public MenuItemTransitionBuilder invalidateOptionOnStopTransition(@NonNull Activity activity, boolean invalidate) { mActivity = activity; mInvalidateOptionOnStopAnimation = invalidate; return self(); }
[ "public", "MenuItemTransitionBuilder", "invalidateOptionOnStopTransition", "(", "@", "NonNull", "Activity", "activity", ",", "boolean", "invalidate", ")", "{", "mActivity", "=", "activity", ";", "mInvalidateOptionOnStopAnimation", "=", "invalidate", ";", "return", "self",...
See {@link MenuItemTransition#setInvalidateOptionOnStopTransition(Activity, boolean)}}. @param activity Activity that should have its invalidateOptionsMenu() method called, or null if invalidate parameter is false @param invalidate @return
[ "See", "{", "@link", "MenuItemTransition#setInvalidateOptionOnStopTransition", "(", "Activity", "boolean", ")", "}}", "." ]
train
https://github.com/kaichunlin/android-transition/blob/7b53074206622f5cf5d82091d891a7ed8b9f06cd/core/src/main/java/com/kaichunlin/transition/MenuItemTransitionBuilder.java#L180-L184
bwkimmel/jdcp
jdcp-core/src/main/java/ca/eandb/jdcp/job/ParallelizableJobRunner.java
ParallelizableJobRunner.submitResults
private void submitResults(Object task, Object results) throws JobExecutionException { """ Submits results for a task. @param task An <code>Object</code> describing the task for which results are being submitted. @param results An <code>Object</code> describing the results. @throws JobExecutionException ""...
java
private void submitResults(Object task, Object results) throws JobExecutionException { synchronized (monitor) { this.job.submitTaskResults(task, results, monitor); } }
[ "private", "void", "submitResults", "(", "Object", "task", ",", "Object", "results", ")", "throws", "JobExecutionException", "{", "synchronized", "(", "monitor", ")", "{", "this", ".", "job", ".", "submitTaskResults", "(", "task", ",", "results", ",", "monitor...
Submits results for a task. @param task An <code>Object</code> describing the task for which results are being submitted. @param results An <code>Object</code> describing the results. @throws JobExecutionException
[ "Submits", "results", "for", "a", "task", "." ]
train
https://github.com/bwkimmel/jdcp/blob/630c5150c245054e2556ff370f4bad2ec793dfb7/jdcp-core/src/main/java/ca/eandb/jdcp/job/ParallelizableJobRunner.java#L367-L371
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/console/ConsoleMenu.java
ConsoleMenu.selectOne
public static String selectOne(final String title, final String[] optionNames, final String[] optionValues, final int defaultOption) { """ Generates a menu with a list of options and return the value selected. @param title for the command line @param optionNames name for each option @param optionValues val...
java
public static String selectOne(final String title, final String[] optionNames, final String[] optionValues, final int defaultOption) { if (optionNames.length != optionValues.length) { throw new IllegalArgumentException("option names and values must have same length"); } Console...
[ "public", "static", "String", "selectOne", "(", "final", "String", "title", ",", "final", "String", "[", "]", "optionNames", ",", "final", "String", "[", "]", "optionValues", ",", "final", "int", "defaultOption", ")", "{", "if", "(", "optionNames", ".", "l...
Generates a menu with a list of options and return the value selected. @param title for the command line @param optionNames name for each option @param optionValues value for each option @return String as selected by the user of the console app
[ "Generates", "a", "menu", "with", "a", "list", "of", "options", "and", "return", "the", "value", "selected", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/console/ConsoleMenu.java#L351-L369
apache/groovy
subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroCallTransformingVisitor.java
MacroCallTransformingVisitor.tryMacroMethod
private boolean tryMacroMethod(MethodCallExpression call, ExtensionMethodNode macroMethod, Object[] macroArguments) { """ Attempts to call given macroMethod @param call MethodCallExpression before the transformation @param macroMethod a macro method candidate @param macroArguments arguments to pass to @return ...
java
private boolean tryMacroMethod(MethodCallExpression call, ExtensionMethodNode macroMethod, Object[] macroArguments) { Expression result = (Expression) InvokerHelper.invokeStaticMethod( macroMethod.getExtensionMethodNode().getDeclaringClass().getTypeClass(), macroMethod.getName(), ...
[ "private", "boolean", "tryMacroMethod", "(", "MethodCallExpression", "call", ",", "ExtensionMethodNode", "macroMethod", ",", "Object", "[", "]", "macroArguments", ")", "{", "Expression", "result", "=", "(", "Expression", ")", "InvokerHelper", ".", "invokeStaticMethod"...
Attempts to call given macroMethod @param call MethodCallExpression before the transformation @param macroMethod a macro method candidate @param macroArguments arguments to pass to @return true if call succeeded and current call was transformed
[ "Attempts", "to", "call", "given", "macroMethod" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-macro/src/main/groovy/org/codehaus/groovy/macro/transform/MacroCallTransformingVisitor.java#L140-L163
JodaOrg/joda-money
src/main/java/org/joda/money/BigMoney.java
BigMoney.ofScale
public static BigMoney ofScale(CurrencyUnit currency, long unscaledAmount, int scale) { """ Obtains an instance of {@code BigMoney} from a scaled amount. <p> This allows you to create an instance with a specific currency, amount and scale. The amount is defined in terms of the specified scale. The result will ...
java
public static BigMoney ofScale(CurrencyUnit currency, long unscaledAmount, int scale) { MoneyUtils.checkNotNull(currency, "Currency must not be null"); return BigMoney.of(currency, BigDecimal.valueOf(unscaledAmount, scale)); }
[ "public", "static", "BigMoney", "ofScale", "(", "CurrencyUnit", "currency", ",", "long", "unscaledAmount", ",", "int", "scale", ")", "{", "MoneyUtils", ".", "checkNotNull", "(", "currency", ",", "\"Currency must not be null\"", ")", ";", "return", "BigMoney", ".",...
Obtains an instance of {@code BigMoney} from a scaled amount. <p> This allows you to create an instance with a specific currency, amount and scale. The amount is defined in terms of the specified scale. The result will have a minimum scale of zero. <p> For example, {@code ofScale(USD, 234, 2)} creates the instance {@co...
[ "Obtains", "an", "instance", "of", "{", "@code", "BigMoney", "}", "from", "a", "scaled", "amount", ".", "<p", ">", "This", "allows", "you", "to", "create", "an", "instance", "with", "a", "specific", "currency", "amount", "and", "scale", ".", "The", "amou...
train
https://github.com/JodaOrg/joda-money/blob/e1f2de75aa36610a695358696c8a88a18ca66cde/src/main/java/org/joda/money/BigMoney.java#L173-L176
Sciss/abc4j
abc/src/main/java/abc/ui/swing/ScoreTemplate.java
ScoreTemplate.setTextFontFamilyName
public void setTextFontFamilyName(byte[] fields, String[] fontFamilies) { """ Sets the font family of several fields @param fields one of {@link ScoreElements} constants @param fontFamilies array of font names, e.g. {"Georgia", "Verdana"} """ if (fontFamilies == null) fontFamilies = new String[0];...
java
public void setTextFontFamilyName(byte[] fields, String[] fontFamilies) { if (fontFamilies == null) fontFamilies = new String[0]; for (byte field : fields) { getFieldInfos(field).m_fontFamilyNames = fontFamilies; } notifyListeners(); }
[ "public", "void", "setTextFontFamilyName", "(", "byte", "[", "]", "fields", ",", "String", "[", "]", "fontFamilies", ")", "{", "if", "(", "fontFamilies", "==", "null", ")", "fontFamilies", "=", "new", "String", "[", "0", "]", ";", "for", "(", "byte", "...
Sets the font family of several fields @param fields one of {@link ScoreElements} constants @param fontFamilies array of font names, e.g. {"Georgia", "Verdana"}
[ "Sets", "the", "font", "family", "of", "several", "fields" ]
train
https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/ui/swing/ScoreTemplate.java#L911-L918
trellis-ldp/trellis
core/http/src/main/java/org/trellisldp/http/TrellisHttpResource.java
TrellisHttpResource.deleteResource
@DELETE @Timed public void deleteResource(@Suspended final AsyncResponse response, @Context final Request request, @Context final UriInfo uriInfo, @Context final HttpHeaders headers, @Context final SecurityContext secContext) { """ Perform a DELETE operation on an LDP Resource. @...
java
@DELETE @Timed public void deleteResource(@Suspended final AsyncResponse response, @Context final Request request, @Context final UriInfo uriInfo, @Context final HttpHeaders headers, @Context final SecurityContext secContext) { final TrellisRequest req = new TrellisRequest(reques...
[ "@", "DELETE", "@", "Timed", "public", "void", "deleteResource", "(", "@", "Suspended", "final", "AsyncResponse", "response", ",", "@", "Context", "final", "Request", "request", ",", "@", "Context", "final", "UriInfo", "uriInfo", ",", "@", "Context", "final", ...
Perform a DELETE operation on an LDP Resource. @param response the async response @param uriInfo the URI info @param secContext the security context @param headers the HTTP headers @param request the request
[ "Perform", "a", "DELETE", "operation", "on", "an", "LDP", "Resource", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/core/http/src/main/java/org/trellisldp/http/TrellisHttpResource.java#L285-L298
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/utils/SignatureUtils.java
SignatureUtils.getParameterSignatures
public static List<String> getParameterSignatures(String methodSignature) { """ returns a List of parameter signatures @param methodSignature the signature of the method to parse @return a list of parameter signatures """ int start = methodSignature.indexOf('(') + 1; int limit = methodSig...
java
public static List<String> getParameterSignatures(String methodSignature) { int start = methodSignature.indexOf('(') + 1; int limit = methodSignature.lastIndexOf(')'); if ((limit - start) == 0) { return Collections.emptyList(); } List<String> parmSignatures = new A...
[ "public", "static", "List", "<", "String", ">", "getParameterSignatures", "(", "String", "methodSignature", ")", "{", "int", "start", "=", "methodSignature", ".", "indexOf", "(", "'", "'", ")", "+", "1", ";", "int", "limit", "=", "methodSignature", ".", "l...
returns a List of parameter signatures @param methodSignature the signature of the method to parse @return a list of parameter signatures
[ "returns", "a", "List", "of", "parameter", "signatures" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/utils/SignatureUtils.java#L221-L246
Alluxio/alluxio
core/common/src/main/java/alluxio/util/io/FileUtils.java
FileUtils.deletePathRecursively
public static void deletePathRecursively(String path) throws IOException { """ Deletes a file or a directory, recursively if it is a directory. If the path does not exist, nothing happens. @param path pathname to be deleted """ if (!exists(path)) { return; } Path root = Paths.get(path);...
java
public static void deletePathRecursively(String path) throws IOException { if (!exists(path)) { return; } Path root = Paths.get(path); Files.walkFileTree(root, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOExce...
[ "public", "static", "void", "deletePathRecursively", "(", "String", "path", ")", "throws", "IOException", "{", "if", "(", "!", "exists", "(", "path", ")", ")", "{", "return", ";", "}", "Path", "root", "=", "Paths", ".", "get", "(", "path", ")", ";", ...
Deletes a file or a directory, recursively if it is a directory. If the path does not exist, nothing happens. @param path pathname to be deleted
[ "Deletes", "a", "file", "or", "a", "directory", "recursively", "if", "it", "is", "a", "directory", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/io/FileUtils.java#L228-L250
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java
DiagnosticsInner.getSiteDetectorResponseSlot
public DetectorResponseInner getSiteDetectorResponseSlot(String resourceGroupName, String siteName, String detectorName, String slot) { """ Get site detector response. Get site detector response. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @par...
java
public DetectorResponseInner getSiteDetectorResponseSlot(String resourceGroupName, String siteName, String detectorName, String slot) { return getSiteDetectorResponseSlotWithServiceResponseAsync(resourceGroupName, siteName, detectorName, slot).toBlocking().single().body(); }
[ "public", "DetectorResponseInner", "getSiteDetectorResponseSlot", "(", "String", "resourceGroupName", ",", "String", "siteName", ",", "String", "detectorName", ",", "String", "slot", ")", "{", "return", "getSiteDetectorResponseSlotWithServiceResponseAsync", "(", "resourceGrou...
Get site detector response. Get site detector response. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @param detectorName Detector Resource Name @param slot Slot Name @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudEx...
[ "Get", "site", "detector", "response", ".", "Get", "site", "detector", "response", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java#L2182-L2184
mediathekview/MServer
src/main/java/mServer/crawler/sender/br/BrFilmDeserializer.java
BrFilmDeserializer.deserialize
@Override public Optional<DatenFilm> deserialize(final JsonElement aElement, final Type aType, final JsonDeserializationContext aContext) { """ Resolves the Film details which and creates a Film of it.<br> The data has this structure: <code>data -> viewer -> clip -> videoFiles -> edges[] -> node -> id</c...
java
@Override public Optional<DatenFilm> deserialize(final JsonElement aElement, final Type aType, final JsonDeserializationContext aContext) { try { final Optional<JsonObject> viewer = getViewer(aElement.getAsJsonObject()); if (viewer.isPresent()) { final Optional<JsonObject> detailClip = ...
[ "@", "Override", "public", "Optional", "<", "DatenFilm", ">", "deserialize", "(", "final", "JsonElement", "aElement", ",", "final", "Type", "aType", ",", "final", "JsonDeserializationContext", "aContext", ")", "{", "try", "{", "final", "Optional", "<", "JsonObje...
Resolves the Film details which and creates a Film of it.<br> The data has this structure: <code>data -> viewer -> clip -> videoFiles -> edges[] -> node -> id</code><br> <code>data -> viewer -> detailClip -> title</code><br> <code>data -> viewer -> detailClip -> kicker</code><br> <code>data -> viewer -> detailClip -> d...
[ "Resolves", "the", "Film", "details", "which", "and", "creates", "a", "Film", "of", "it", ".", "<br", ">", "The", "data", "has", "this", "structure", ":", "<code", ">", "data", "-", ">", "viewer", "-", ">", "clip", "-", ">", "videoFiles", "-", ">", ...
train
https://github.com/mediathekview/MServer/blob/ba8d03e6a1a303db3807a1327f553f1decd30388/src/main/java/mServer/crawler/sender/br/BrFilmDeserializer.java#L89-L111
yavijava/yavijava
src/main/java/com/vmware/vim25/mo/SearchIndex.java
SearchIndex.findByIp
public ManagedEntity findByIp(Datacenter datacenter, String ip, boolean vmOnly) throws RuntimeFault, RemoteException { """ Find a Virtual Machine or Host System by its IP address. @param datacenter The datacenter within which it searches. If null is passed, all inventory is searched. @param ip The IP a...
java
public ManagedEntity findByIp(Datacenter datacenter, String ip, boolean vmOnly) throws RuntimeFault, RemoteException { ManagedObjectReference mor = getVimService().findByIp(getMOR(), datacenter == null ? null : datacenter.getMOR(), ip, vmOnly); return MorUtil.createExactManagedEntity(getServerConnecti...
[ "public", "ManagedEntity", "findByIp", "(", "Datacenter", "datacenter", ",", "String", "ip", ",", "boolean", "vmOnly", ")", "throws", "RuntimeFault", ",", "RemoteException", "{", "ManagedObjectReference", "mor", "=", "getVimService", "(", ")", ".", "findByIp", "("...
Find a Virtual Machine or Host System by its IP address. @param datacenter The datacenter within which it searches. If null is passed, all inventory is searched. @param ip The IP address of the VM or Host. @param vmOnly When set true only searches for VM; otherwise only for Host. @return A ManagedEntity to...
[ "Find", "a", "Virtual", "Machine", "or", "Host", "System", "by", "its", "IP", "address", "." ]
train
https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/SearchIndex.java#L74-L77
JodaOrg/joda-time
src/main/java/org/joda/time/Minutes.java
Minutes.minutesBetween
public static Minutes minutesBetween(ReadablePartial start, ReadablePartial end) { """ Creates a <code>Minutes</code> representing the number of whole minutes between the two specified partial datetimes. <p> The two partials must contain the same fields, for example you can specify two <code>LocalTime</code> o...
java
public static Minutes minutesBetween(ReadablePartial start, ReadablePartial end) { if (start instanceof LocalTime && end instanceof LocalTime) { Chronology chrono = DateTimeUtils.getChronology(start.getChronology()); int minutes = chrono.minutes().getDifference( ((L...
[ "public", "static", "Minutes", "minutesBetween", "(", "ReadablePartial", "start", ",", "ReadablePartial", "end", ")", "{", "if", "(", "start", "instanceof", "LocalTime", "&&", "end", "instanceof", "LocalTime", ")", "{", "Chronology", "chrono", "=", "DateTimeUtils"...
Creates a <code>Minutes</code> representing the number of whole minutes between the two specified partial datetimes. <p> The two partials must contain the same fields, for example you can specify two <code>LocalTime</code> objects. @param start the start partial date, must not be null @param end the end partial date...
[ "Creates", "a", "<code", ">", "Minutes<", "/", "code", ">", "representing", "the", "number", "of", "whole", "minutes", "between", "the", "two", "specified", "partial", "datetimes", ".", "<p", ">", "The", "two", "partials", "must", "contain", "the", "same", ...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Minutes.java#L117-L126
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/DefaultElementProducer.java
DefaultElementProducer.getIndex
@Override public Section getIndex(String title, int nesting, List<? extends BaseStyler> stylers) throws VectorPrintException, InstantiationException, IllegalAccessException { """ create the Section, style the title, style the section and return the styled section. @param title @param nesting @param stylers...
java
@Override public Section getIndex(String title, int nesting, List<? extends BaseStyler> stylers) throws VectorPrintException, InstantiationException, IllegalAccessException { if (nesting < 1) { throw new VectorPrintException("chapter numbering starts with 1, wrong number: " + nesting); } i...
[ "@", "Override", "public", "Section", "getIndex", "(", "String", "title", ",", "int", "nesting", ",", "List", "<", "?", "extends", "BaseStyler", ">", "stylers", ")", "throws", "VectorPrintException", ",", "InstantiationException", ",", "IllegalAccessException", "{...
create the Section, style the title, style the section and return the styled section. @param title @param nesting @param stylers @return @throws VectorPrintException @throws InstantiationException @throws IllegalAccessException
[ "create", "the", "Section", "style", "the", "title", "style", "the", "section", "and", "return", "the", "styled", "section", "." ]
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/DefaultElementProducer.java#L592-L612
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/AlertsInner.java
AlertsInner.listByDataBoxEdgeDeviceAsync
public Observable<Page<AlertInner>> listByDataBoxEdgeDeviceAsync(final String deviceName, final String resourceGroupName) { """ Gets all the alerts for a data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown i...
java
public Observable<Page<AlertInner>> listByDataBoxEdgeDeviceAsync(final String deviceName, final String resourceGroupName) { return listByDataBoxEdgeDeviceWithServiceResponseAsync(deviceName, resourceGroupName) .map(new Func1<ServiceResponse<Page<AlertInner>>, Page<AlertInner>>() { @O...
[ "public", "Observable", "<", "Page", "<", "AlertInner", ">", ">", "listByDataBoxEdgeDeviceAsync", "(", "final", "String", "deviceName", ",", "final", "String", "resourceGroupName", ")", "{", "return", "listByDataBoxEdgeDeviceWithServiceResponseAsync", "(", "deviceName", ...
Gets all the alerts for a data box edge/gateway device. @param deviceName The device name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;AlertInner&gt; object
[ "Gets", "all", "the", "alerts", "for", "a", "data", "box", "edge", "/", "gateway", "device", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/AlertsInner.java#L123-L131
zeromq/jeromq
src/main/java/org/zeromq/ZMsg.java
ZMsg.recvMsg
public static ZMsg recvMsg(Socket socket, boolean wait) { """ Receives message from socket, returns ZMsg object or null if the recv was interrupted. @param socket @param wait true to wait for next message, false to do a non-blocking recv. @return ZMsg object, null if interrupted """ return rec...
java
public static ZMsg recvMsg(Socket socket, boolean wait) { return recvMsg(socket, wait ? 0 : ZMQ.DONTWAIT); }
[ "public", "static", "ZMsg", "recvMsg", "(", "Socket", "socket", ",", "boolean", "wait", ")", "{", "return", "recvMsg", "(", "socket", ",", "wait", "?", "0", ":", "ZMQ", ".", "DONTWAIT", ")", ";", "}" ]
Receives message from socket, returns ZMsg object or null if the recv was interrupted. @param socket @param wait true to wait for next message, false to do a non-blocking recv. @return ZMsg object, null if interrupted
[ "Receives", "message", "from", "socket", "returns", "ZMsg", "object", "or", "null", "if", "the", "recv", "was", "interrupted", "." ]
train
https://github.com/zeromq/jeromq/blob/8b4a2960b468d08b7aebb0d40bfb947e08fed040/src/main/java/org/zeromq/ZMsg.java#L219-L222
TrueNight/Utils
android-utils/src/main/java/xyz/truenight/utils/PermissionRequest.java
PermissionRequest.getPermission
public static void getPermission(@NonNull Fragment context, String permissions, @NonNull Response response) { """ Request Android Permissions. @param context The Context of the Activity or the Fragment. @param permissions The Permission you are need. @param response Result callback. """ get...
java
public static void getPermission(@NonNull Fragment context, String permissions, @NonNull Response response) { getPermission(context, new String[]{permissions}, response); }
[ "public", "static", "void", "getPermission", "(", "@", "NonNull", "Fragment", "context", ",", "String", "permissions", ",", "@", "NonNull", "Response", "response", ")", "{", "getPermission", "(", "context", ",", "new", "String", "[", "]", "{", "permissions", ...
Request Android Permissions. @param context The Context of the Activity or the Fragment. @param permissions The Permission you are need. @param response Result callback.
[ "Request", "Android", "Permissions", "." ]
train
https://github.com/TrueNight/Utils/blob/78a11faa16258b09f08826797370310ab650530c/android-utils/src/main/java/xyz/truenight/utils/PermissionRequest.java#L86-L88
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/memory/MemorySize.java
MemorySize.toPrettyString
public static String toPrettyString(long size, MemoryUnit unit) { """ Utility method to create a pretty format representation of given value in given unit. @param size memory size @param unit memory unit @return pretty format representation of given value """ if (unit.toGigaBytes(size) >= PRETTY_F...
java
public static String toPrettyString(long size, MemoryUnit unit) { if (unit.toGigaBytes(size) >= PRETTY_FORMAT_LIMIT) { return unit.toGigaBytes(size) + " GB"; } if (unit.toMegaBytes(size) >= PRETTY_FORMAT_LIMIT) { return unit.toMegaBytes(size) + " MB"; } if...
[ "public", "static", "String", "toPrettyString", "(", "long", "size", ",", "MemoryUnit", "unit", ")", "{", "if", "(", "unit", ".", "toGigaBytes", "(", "size", ")", ">=", "PRETTY_FORMAT_LIMIT", ")", "{", "return", "unit", ".", "toGigaBytes", "(", "size", ")"...
Utility method to create a pretty format representation of given value in given unit. @param size memory size @param unit memory unit @return pretty format representation of given value
[ "Utility", "method", "to", "create", "a", "pretty", "format", "representation", "of", "given", "value", "in", "given", "unit", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/memory/MemorySize.java#L197-L211
jenkinsci/gmaven
gmaven-runtime/gmaven-runtime-loader/src/main/java/org/codehaus/gmaven/runtime/loader/realm/DefaultRealmManager.java
DefaultRealmManager.setStrategy
private void setStrategy(final ClassRealm realm, final Strategy strategy) { """ There is no public API to set/change a realms strategy, so we use some reflection muck to set the private field. """ assert realm != null; assert strategy != null; try { Field field = realm.getC...
java
private void setStrategy(final ClassRealm realm, final Strategy strategy) { assert realm != null; assert strategy != null; try { Field field = realm.getClass().getDeclaredField("strategy"); try { field.set(realm, strategy); } catc...
[ "private", "void", "setStrategy", "(", "final", "ClassRealm", "realm", ",", "final", "Strategy", "strategy", ")", "{", "assert", "realm", "!=", "null", ";", "assert", "strategy", "!=", "null", ";", "try", "{", "Field", "field", "=", "realm", ".", "getClass...
There is no public API to set/change a realms strategy, so we use some reflection muck to set the private field.
[ "There", "is", "no", "public", "API", "to", "set", "/", "change", "a", "realms", "strategy", "so", "we", "use", "some", "reflection", "muck", "to", "set", "the", "private", "field", "." ]
train
https://github.com/jenkinsci/gmaven/blob/80d5f6657e15b3e05ffbb82128ed8bb280836e10/gmaven-runtime/gmaven-runtime-loader/src/main/java/org/codehaus/gmaven/runtime/loader/realm/DefaultRealmManager.java#L129-L154
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.multAdd
public static void multAdd(double alpha , DMatrix1Row a , DMatrix1Row b , DMatrix1Row c ) { """ <p> Performs the following operation:<br> <br> c = c + &alpha; * a * b<br> c<sub>ij</sub> = c<sub>ij</sub> + &alpha; * &sum;<sub>k=1:n</sub> { a<sub>ik</sub> * b<sub>kj</sub>} </p> @param alpha scaling factor. ...
java
public static void multAdd(double alpha , DMatrix1Row a , DMatrix1Row b , DMatrix1Row c ) { // TODO add a matrix vectory multiply here if( b.numCols >= EjmlParameters.MULT_COLUMN_SWITCH ) { MatrixMatrixMult_DDRM.multAdd_reorder(alpha, a, b, c); } else { MatrixMatrixMu...
[ "public", "static", "void", "multAdd", "(", "double", "alpha", ",", "DMatrix1Row", "a", ",", "DMatrix1Row", "b", ",", "DMatrix1Row", "c", ")", "{", "// TODO add a matrix vectory multiply here", "if", "(", "b", ".", "numCols", ">=", "EjmlParameters", ".", "MULT_C...
<p> Performs the following operation:<br> <br> c = c + &alpha; * a * b<br> c<sub>ij</sub> = c<sub>ij</sub> + &alpha; * &sum;<sub>k=1:n</sub> { a<sub>ik</sub> * b<sub>kj</sub>} </p> @param alpha scaling factor. @param a The left matrix in the multiplication operation. Not modified. @param b The right matrix in the mul...
[ "<p", ">", "Performs", "the", "following", "operation", ":", "<br", ">", "<br", ">", "c", "=", "c", "+", "&alpha", ";", "*", "a", "*", "b<br", ">", "c<sub", ">", "ij<", "/", "sub", ">", "=", "c<sub", ">", "ij<", "/", "sub", ">", "+", "&alpha", ...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L359-L367
jiaqi/caff
src/main/java/org/cyclopsgroup/caff/util/ByteUtils.java
ByteUtils.writeLong
public static void writeLong(long value, byte[] dest, int offset) throws IllegalArgumentException { """ Write long value to given byte array @param value Value to write, it can be any long value @param dest Destination byte array value is written to @param offset The starting point of where the value is...
java
public static void writeLong(long value, byte[] dest, int offset) throws IllegalArgumentException { if (dest.length < offset + 8) { throw new IllegalArgumentException( "Destination byte array does not have enough space to write long from offset " + offset); } long t = value; for (i...
[ "public", "static", "void", "writeLong", "(", "long", "value", ",", "byte", "[", "]", "dest", ",", "int", "offset", ")", "throws", "IllegalArgumentException", "{", "if", "(", "dest", ".", "length", "<", "offset", "+", "8", ")", "{", "throw", "new", "Il...
Write long value to given byte array @param value Value to write, it can be any long value @param dest Destination byte array value is written to @param offset The starting point of where the value is written @throws IllegalArgumentException When input byte array doesn't have enough space to write a long
[ "Write", "long", "value", "to", "given", "byte", "array" ]
train
https://github.com/jiaqi/caff/blob/dba4b937a0afc844eb37ccf74dd04dd78f0c1314/src/main/java/org/cyclopsgroup/caff/util/ByteUtils.java#L20-L31
PureSolTechnologies/commons
osgi/src/main/java/com/puresoltechnologies/commons/osgi/AbstractActivator.java
AbstractActivator.registerService
public final <T> ServiceRegistration<?> registerService(Class<T> iface, T instance) { """ This method should be used to register services. Services registered with this method auto deregistered during bundle stop. @param iface is the interface of the service to be used for later retrieval. @param instance i...
java
public final <T> ServiceRegistration<?> registerService(Class<T> iface, T instance) { Hashtable<String, String> properties = new Hashtable<String, String>(); return registerService(iface, instance, properties); }
[ "public", "final", "<", "T", ">", "ServiceRegistration", "<", "?", ">", "registerService", "(", "Class", "<", "T", ">", "iface", ",", "T", "instance", ")", "{", "Hashtable", "<", "String", ",", "String", ">", "properties", "=", "new", "Hashtable", "<", ...
This method should be used to register services. Services registered with this method auto deregistered during bundle stop. @param iface is the interface of the service to be used for later retrieval. @param instance is an instance of the object to be registered as service for interface iface. @param <T> is the servic...
[ "This", "method", "should", "be", "used", "to", "register", "services", ".", "Services", "registered", "with", "this", "method", "auto", "deregistered", "during", "bundle", "stop", "." ]
train
https://github.com/PureSolTechnologies/commons/blob/f98c23d8841a1ff61632ff17fe7d24f99dbc1d44/osgi/src/main/java/com/puresoltechnologies/commons/osgi/AbstractActivator.java#L112-L115
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/tag/ComponentTagDeclarationLibrary.java
ComponentTagDeclarationLibrary.addComponent
public final void addComponent(String namespace, String name, String componentType, String rendererType) { """ Add a ComponentHandler with the specified componentType and rendererType, aliased by the tag name. @see ComponentHandler @see javax.faces.application.Application#createComponent(java.lang.String) @pa...
java
public final void addComponent(String namespace, String name, String componentType, String rendererType) { Map<String, TagHandlerFactory> map = _factories.get(namespace); if (map == null) { map = new HashMap<String, TagHandlerFactory>(); _factories.put(namespace, map)...
[ "public", "final", "void", "addComponent", "(", "String", "namespace", ",", "String", "name", ",", "String", "componentType", ",", "String", "rendererType", ")", "{", "Map", "<", "String", ",", "TagHandlerFactory", ">", "map", "=", "_factories", ".", "get", ...
Add a ComponentHandler with the specified componentType and rendererType, aliased by the tag name. @see ComponentHandler @see javax.faces.application.Application#createComponent(java.lang.String) @param name name to use, "foo" would be &lt;my:foo /> @param componentType componentType to use @param rendererType rendere...
[ "Add", "a", "ComponentHandler", "with", "the", "specified", "componentType", "and", "rendererType", "aliased", "by", "the", "tag", "name", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/view/facelets/tag/ComponentTagDeclarationLibrary.java#L144-L153
rapidpro/expressions
java/src/main/java/io/rapidpro/expressions/functions/ExcelFunctions.java
ExcelFunctions.weekday
public static int weekday(EvaluationContext ctx, Object date) { """ Returns the day of the week of a date (1 for Sunday to 7 for Saturday) """ int iso = Conversions.toDateOrDateTime(date, ctx).get(ChronoField.DAY_OF_WEEK); return iso < 7 ? iso + 1 : 1; }
java
public static int weekday(EvaluationContext ctx, Object date) { int iso = Conversions.toDateOrDateTime(date, ctx).get(ChronoField.DAY_OF_WEEK); return iso < 7 ? iso + 1 : 1; }
[ "public", "static", "int", "weekday", "(", "EvaluationContext", "ctx", ",", "Object", "date", ")", "{", "int", "iso", "=", "Conversions", ".", "toDateOrDateTime", "(", "date", ",", "ctx", ")", ".", "get", "(", "ChronoField", ".", "DAY_OF_WEEK", ")", ";", ...
Returns the day of the week of a date (1 for Sunday to 7 for Saturday)
[ "Returns", "the", "day", "of", "the", "week", "of", "a", "date", "(", "1", "for", "Sunday", "to", "7", "for", "Saturday", ")" ]
train
https://github.com/rapidpro/expressions/blob/b03d91ec58fc328960bce90ecb5fa49dcf467627/java/src/main/java/io/rapidpro/expressions/functions/ExcelFunctions.java#L333-L336
bekkopen/NoCommons
src/main/java/no/bekk/bekkopen/person/FodselsnummerCalculator.java
FodselsnummerCalculator.getManyFodselsnummerForDate
public static List<Fodselsnummer> getManyFodselsnummerForDate(Date date) { """ Returns a List with with VALID Fodselsnummer instances for a given Date. @param date The Date instance @return A List with Fodelsnummer instances """ if (date == null) { throw new IllegalArgumentException(); } DateForma...
java
public static List<Fodselsnummer> getManyFodselsnummerForDate(Date date) { if (date == null) { throw new IllegalArgumentException(); } DateFormat df = new SimpleDateFormat("ddMMyy"); String centuryString = getCentury(date); String dateString = df.format(date); return generateFodselsnummerForDate(dateStri...
[ "public", "static", "List", "<", "Fodselsnummer", ">", "getManyFodselsnummerForDate", "(", "Date", "date", ")", "{", "if", "(", "date", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "DateFormat", "df", "=", "new", ...
Returns a List with with VALID Fodselsnummer instances for a given Date. @param date The Date instance @return A List with Fodelsnummer instances
[ "Returns", "a", "List", "with", "with", "VALID", "Fodselsnummer", "instances", "for", "a", "given", "Date", "." ]
train
https://github.com/bekkopen/NoCommons/blob/5a576696390cecaac111fa97fde581e0c1afb9b8/src/main/java/no/bekk/bekkopen/person/FodselsnummerCalculator.java#L62-L70
hal/core
gui/src/main/java/org/jboss/as/console/mbui/behaviour/ModelNodeAdapter.java
ModelNodeAdapter.fromChangeset
public ModelNode fromChangeset(Map<String, Object> changeSet, ModelNode address, ModelNode... extraSteps) { """ Turns a changeset into a composite write attribute operation. @param changeSet @param address the entity address @return composite operation """ ModelNode define = new ModelNode(); ...
java
public ModelNode fromChangeset(Map<String, Object> changeSet, ModelNode address, ModelNode... extraSteps) { ModelNode define = new ModelNode(); ModelNode actualAddress = address.hasDefined(ADDRESS) ? address.get(ADDRESS) : address; define.get(ADDRESS).set(actualAddress); define.g...
[ "public", "ModelNode", "fromChangeset", "(", "Map", "<", "String", ",", "Object", ">", "changeSet", ",", "ModelNode", "address", ",", "ModelNode", "...", "extraSteps", ")", "{", "ModelNode", "define", "=", "new", "ModelNode", "(", ")", ";", "ModelNode", "act...
Turns a changeset into a composite write attribute operation. @param changeSet @param address the entity address @return composite operation
[ "Turns", "a", "changeset", "into", "a", "composite", "write", "attribute", "operation", "." ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/mbui/behaviour/ModelNodeAdapter.java#L34-L84
molgenis/molgenis
molgenis-data/src/main/java/org/molgenis/data/util/EntityTypeUtils.java
EntityTypeUtils.buildFullName
public static String buildFullName(Package aPackage, String simpleName) { """ Builds and returns an entity full name based on a package and a simpleName @return String entity full name """ String fullName; if (aPackage != null) { fullName = aPackage.getId() + PACKAGE_SEPARATOR + simpleName; ...
java
public static String buildFullName(Package aPackage, String simpleName) { String fullName; if (aPackage != null) { fullName = aPackage.getId() + PACKAGE_SEPARATOR + simpleName; } else { fullName = simpleName; } return fullName; }
[ "public", "static", "String", "buildFullName", "(", "Package", "aPackage", ",", "String", "simpleName", ")", "{", "String", "fullName", ";", "if", "(", "aPackage", "!=", "null", ")", "{", "fullName", "=", "aPackage", ".", "getId", "(", ")", "+", "PACKAGE_S...
Builds and returns an entity full name based on a package and a simpleName @return String entity full name
[ "Builds", "and", "returns", "an", "entity", "full", "name", "based", "on", "a", "package", "and", "a", "simpleName" ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data/src/main/java/org/molgenis/data/util/EntityTypeUtils.java#L299-L307
apiman/apiman
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/audit/AuditUtils.java
AuditUtils.planCreated
public static AuditEntryBean planCreated(PlanBean bean, ISecurityContext securityContext) { """ Creates an audit entry for the 'plan created' event. @param bean the bean @param securityContext the security context @return the audit entry """ AuditEntryBean entry = newEntry(bean.getOrganization().get...
java
public static AuditEntryBean planCreated(PlanBean bean, ISecurityContext securityContext) { AuditEntryBean entry = newEntry(bean.getOrganization().getId(), AuditEntityType.Plan, securityContext); entry.setEntityId(bean.getId()); entry.setEntityVersion(null); entry.setData(null); ...
[ "public", "static", "AuditEntryBean", "planCreated", "(", "PlanBean", "bean", ",", "ISecurityContext", "securityContext", ")", "{", "AuditEntryBean", "entry", "=", "newEntry", "(", "bean", ".", "getOrganization", "(", ")", ".", "getId", "(", ")", ",", "AuditEnti...
Creates an audit entry for the 'plan created' event. @param bean the bean @param securityContext the security context @return the audit entry
[ "Creates", "an", "audit", "entry", "for", "the", "plan", "created", "event", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/audit/AuditUtils.java#L595-L602
http-builder-ng/http-builder-ng
http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java
HttpBuilder.headAsync
public <T> CompletableFuture<T> headAsync(final Class<T> type, final Consumer<HttpConfig> configuration) { """ Executes an asynchronous HEAD request on the configured URI (asynchronous alias to `head(Class,Consumer)`), with additional configuration provided by the configuration function. The result will be cast t...
java
public <T> CompletableFuture<T> headAsync(final Class<T> type, final Consumer<HttpConfig> configuration) { return CompletableFuture.supplyAsync(() -> head(type, configuration), getExecutor()); }
[ "public", "<", "T", ">", "CompletableFuture", "<", "T", ">", "headAsync", "(", "final", "Class", "<", "T", ">", "type", ",", "final", "Consumer", "<", "HttpConfig", ">", "configuration", ")", "{", "return", "CompletableFuture", ".", "supplyAsync", "(", "("...
Executes an asynchronous HEAD request on the configured URI (asynchronous alias to `head(Class,Consumer)`), with additional configuration provided by the configuration function. The result will be cast to the specified `type`. This method is generally used for Java-specific configuration. [source,groovy] ---- HttpBui...
[ "Executes", "an", "asynchronous", "HEAD", "request", "on", "the", "configured", "URI", "(", "asynchronous", "alias", "to", "head", "(", "Class", "Consumer", ")", ")", "with", "additional", "configuration", "provided", "by", "the", "configuration", "function", "....
train
https://github.com/http-builder-ng/http-builder-ng/blob/865f37732c102c748d3db8b905199dac9222a525/http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java#L685-L687
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.replaceEntry
public static boolean replaceEntry(final File zip, final String path, final File file) { """ Changes an existing ZIP file: replaces a given entry in it. @param zip an existing ZIP file. @param path new ZIP entry path. @param file new entry. @return <code>true</code> if the entry was replaced. """ ...
java
public static boolean replaceEntry(final File zip, final String path, final File file) { return operateInPlace(zip, new InPlaceAction() { public boolean act(File tmpFile) { return replaceEntry(zip, new FileSource(path, file), tmpFile); } }); }
[ "public", "static", "boolean", "replaceEntry", "(", "final", "File", "zip", ",", "final", "String", "path", ",", "final", "File", "file", ")", "{", "return", "operateInPlace", "(", "zip", ",", "new", "InPlaceAction", "(", ")", "{", "public", "boolean", "ac...
Changes an existing ZIP file: replaces a given entry in it. @param zip an existing ZIP file. @param path new ZIP entry path. @param file new entry. @return <code>true</code> if the entry was replaced.
[ "Changes", "an", "existing", "ZIP", "file", ":", "replaces", "a", "given", "entry", "in", "it", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L2517-L2523
jmeetsma/Iglu-Util
src/main/java/org/ijsberg/iglu/util/collection/CollectionPart.java
CollectionPart.calculateCollectionPartDescriptions
private void calculateCollectionPartDescriptions() { """ Calculates offsets and sizes of all collection parts the complete collection is divided in. """ collectionPartIds = new CollectionPartDescription[this.getNrofParts()]; int displayOffset = 0; int count = 0; for (count = 0; count < getNrofParts() ...
java
private void calculateCollectionPartDescriptions() { collectionPartIds = new CollectionPartDescription[this.getNrofParts()]; int displayOffset = 0; int count = 0; for (count = 0; count < getNrofParts() - 1; count++) { displayOffset = count * maxPartSize; if (displayOffset != offset) { collectionPartI...
[ "private", "void", "calculateCollectionPartDescriptions", "(", ")", "{", "collectionPartIds", "=", "new", "CollectionPartDescription", "[", "this", ".", "getNrofParts", "(", ")", "]", ";", "int", "displayOffset", "=", "0", ";", "int", "count", "=", "0", ";", "...
Calculates offsets and sizes of all collection parts the complete collection is divided in.
[ "Calculates", "offsets", "and", "sizes", "of", "all", "collection", "parts", "the", "complete", "collection", "is", "divided", "in", "." ]
train
https://github.com/jmeetsma/Iglu-Util/blob/971eb022115247b1e34dc26dd02e7e621e29e910/src/main/java/org/ijsberg/iglu/util/collection/CollectionPart.java#L251-L274
kmbulebu/dsc-it100-java
src/main/java/com/github/kmbulebu/dsc/it100/ConfigurationBuilder.java
ConfigurationBuilder.withSerialPort
public ConfigurationBuilder withSerialPort(String serialPort, int baudRate) { """ Use a local serial port for communicating with the IT-100. @param serialPort The serial port name. (/dev/ttyUSB0, COM1:, etc). @param baudRate The baud rate to use while communicating with the IT-100. IT-100 default is 19200. @ret...
java
public ConfigurationBuilder withSerialPort(String serialPort, int baudRate) { configuration.connector = new SerialConnector(); configuration.address = new SerialAddress(serialPort, baudRate, DataBits.DATABITS_8, StopBits.BITS_1, Parity.NONE, FlowControl.NONE ); return this; }
[ "public", "ConfigurationBuilder", "withSerialPort", "(", "String", "serialPort", ",", "int", "baudRate", ")", "{", "configuration", ".", "connector", "=", "new", "SerialConnector", "(", ")", ";", "configuration", ".", "address", "=", "new", "SerialAddress", "(", ...
Use a local serial port for communicating with the IT-100. @param serialPort The serial port name. (/dev/ttyUSB0, COM1:, etc). @param baudRate The baud rate to use while communicating with the IT-100. IT-100 default is 19200. @return This builder instance.
[ "Use", "a", "local", "serial", "port", "for", "communicating", "with", "the", "IT", "-", "100", "." ]
train
https://github.com/kmbulebu/dsc-it100-java/blob/69c170ba50c870cce6dbbe04b488c6b1c6a0e10f/src/main/java/com/github/kmbulebu/dsc/it100/ConfigurationBuilder.java#L50-L54
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.findResult
public static <S, T> T findResult(S[] self, @ClosureParams(FirstParam.Component.class) Closure<T> condition) { """ Iterates through the Array calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. If all results are null, null is returned....
java
public static <S, T> T findResult(S[] self, @ClosureParams(FirstParam.Component.class) Closure<T> condition) { return findResult(new ArrayIterator<S>(self), condition); }
[ "public", "static", "<", "S", ",", "T", ">", "T", "findResult", "(", "S", "[", "]", "self", ",", "@", "ClosureParams", "(", "FirstParam", ".", "Component", ".", "class", ")", "Closure", "<", "T", ">", "condition", ")", "{", "return", "findResult", "(...
Iterates through the Array calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. If all results are null, null is returned. @param self an Array @param condition a closure that returns a non-null value to indicate that processing should s...
[ "Iterates", "through", "the", "Array", "calling", "the", "given", "closure", "condition", "for", "each", "item", "but", "stopping", "once", "the", "first", "non", "-", "null", "result", "is", "found", "and", "returning", "that", "result", ".", "If", "all", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L4574-L4576
citiususc/hipster
hipster-core/src/main/java/es/usc/citius/hipster/model/function/impl/ADStarNodeExpander.java
ADStarNodeExpander.makeNode
public N makeNode(N from, Transition<A, S> transition) { """ Creates a new node from the parent and a transition, calling the node factory. @param from parent node @param transition transition between the parent and the new node @return new node created by the node factory """ return nodeFactory.m...
java
public N makeNode(N from, Transition<A, S> transition){ return nodeFactory.makeNode(from, transition); }
[ "public", "N", "makeNode", "(", "N", "from", ",", "Transition", "<", "A", ",", "S", ">", "transition", ")", "{", "return", "nodeFactory", ".", "makeNode", "(", "from", ",", "transition", ")", ";", "}" ]
Creates a new node from the parent and a transition, calling the node factory. @param from parent node @param transition transition between the parent and the new node @return new node created by the node factory
[ "Creates", "a", "new", "node", "from", "the", "parent", "and", "a", "transition", "calling", "the", "node", "factory", "." ]
train
https://github.com/citiususc/hipster/blob/9ab1236abb833a27641ae73ba9ca890d5c17598e/hipster-core/src/main/java/es/usc/citius/hipster/model/function/impl/ADStarNodeExpander.java#L287-L289
hellosign/hellosign-java-sdk
src/main/java/com/hellosign/sdk/resource/TemplateDraft.java
TemplateDraft.addMergeField
public void addMergeField(String name, FieldType type) throws HelloSignException { """ Add merge fields to the template draft. These are fields that your app can pre-populate whenever the *finished* template is used to send a signature request. @param name String name of the merge field that will be displayed...
java
public void addMergeField(String name, FieldType type) throws HelloSignException { if (!FieldType.checkbox.equals(type) && !FieldType.text.equals(type)) { throw new HelloSignException("Only 'text' or 'checkbox' types allowed for merge fields."); } mergeFields.put(name, type); }
[ "public", "void", "addMergeField", "(", "String", "name", ",", "FieldType", "type", ")", "throws", "HelloSignException", "{", "if", "(", "!", "FieldType", ".", "checkbox", ".", "equals", "(", "type", ")", "&&", "!", "FieldType", ".", "text", ".", "equals",...
Add merge fields to the template draft. These are fields that your app can pre-populate whenever the *finished* template is used to send a signature request. @param name String name of the merge field that will be displayed to the user and used to key off the custom field when populating the value. @param type FieldTy...
[ "Add", "merge", "fields", "to", "the", "template", "draft", ".", "These", "are", "fields", "that", "your", "app", "can", "pre", "-", "populate", "whenever", "the", "*", "finished", "*", "template", "is", "used", "to", "send", "a", "signature", "request", ...
train
https://github.com/hellosign/hellosign-java-sdk/blob/08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1/src/main/java/com/hellosign/sdk/resource/TemplateDraft.java#L172-L177
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/websphere/pmi/stat/WSStatsHelper.java
WSStatsHelper.setTextInfoTranslationEnabled
public static void setTextInfoTranslationEnabled(boolean textInfoTranslationEnabled, Locale locale) { """ This method allows translation of the textual information. By default translation is enabled using the default Locale. @param textInfoTranslationEnabled enable/disable @param locale Locale to use for tran...
java
public static void setTextInfoTranslationEnabled(boolean textInfoTranslationEnabled, Locale locale) { com.ibm.ws.pmi.stat.StatsImpl.setEnableNLS(textInfoTranslationEnabled, locale); }
[ "public", "static", "void", "setTextInfoTranslationEnabled", "(", "boolean", "textInfoTranslationEnabled", ",", "Locale", "locale", ")", "{", "com", ".", "ibm", ".", "ws", ".", "pmi", ".", "stat", ".", "StatsImpl", ".", "setEnableNLS", "(", "textInfoTranslationEna...
This method allows translation of the textual information. By default translation is enabled using the default Locale. @param textInfoTranslationEnabled enable/disable @param locale Locale to use for translation
[ "This", "method", "allows", "translation", "of", "the", "textual", "information", ".", "By", "default", "translation", "is", "enabled", "using", "the", "default", "Locale", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/websphere/pmi/stat/WSStatsHelper.java#L61-L63
dihedron/dihedron-commons
src/main/java/org/dihedron/patterns/functional/Functional.java
Functional.forEach
public static final <S, K, V> S forEach(Map<K, V> map, S state, Fx<S, Entry<K, V>> functor) { """ Applies the given functor to all entries in the input map. @param map the map to which the functor will be applied. @param state an state variable, that will be used as the return vale for the iteration. @param...
java
public static final <S, K, V> S forEach(Map<K, V> map, S state, Fx<S, Entry<K, V>> functor) { return new FunctionalMap<S, K, V>(map).forEach(state, functor); }
[ "public", "static", "final", "<", "S", ",", "K", ",", "V", ">", "S", "forEach", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "S", "state", ",", "Fx", "<", "S", ",", "Entry", "<", "K", ",", "V", ">", ">", "functor", ")", "{", "return", ...
Applies the given functor to all entries in the input map. @param map the map to which the functor will be applied. @param state an state variable, that will be used as the return vale for the iteration. @param functor a function to be applied to all entries in the map. @return the state object after the processing.
[ "Applies", "the", "given", "functor", "to", "all", "entries", "in", "the", "input", "map", "." ]
train
https://github.com/dihedron/dihedron-commons/blob/a5194cdaa0d6417ef4aade6ea407a1cad6e8458e/src/main/java/org/dihedron/patterns/functional/Functional.java#L103-L105
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/JavaBean.java
JavaBean.newBean
public static <T> T newBean(Map<?,?> aValues, Class<?> aClass, PropertyConverter<Object,Object> convert) throws InstantiationException, IllegalAccessException { """ Create new instance of the object @param aValues the map value @param aClass the class to create @param <T> the type class @param convert the c...
java
public static <T> T newBean(Map<?,?> aValues, Class<?> aClass, PropertyConverter<Object,Object> convert) throws InstantiationException, IllegalAccessException { T obj = ClassPath.newInstance(aClass); populate(aValues,obj,convert); return obj; }
[ "public", "static", "<", "T", ">", "T", "newBean", "(", "Map", "<", "?", ",", "?", ">", "aValues", ",", "Class", "<", "?", ">", "aClass", ",", "PropertyConverter", "<", "Object", ",", "Object", ">", "convert", ")", "throws", "InstantiationException", "...
Create new instance of the object @param aValues the map value @param aClass the class to create @param <T> the type class @param convert the conversion implementation @return the create object instance @throws InstantiationException @throws IllegalAccessException
[ "Create", "new", "instance", "of", "the", "object" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/JavaBean.java#L66-L75
Azure/azure-sdk-for-java
streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/StreamingJobsInner.java
StreamingJobsInner.updateAsync
public Observable<StreamingJobInner> updateAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch) { """ Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. ...
java
public Observable<StreamingJobInner> updateAsync(String resourceGroupName, String jobName, StreamingJobInner streamingJob, String ifMatch) { return updateWithServiceResponseAsync(resourceGroupName, jobName, streamingJob, ifMatch).map(new Func1<ServiceResponseWithHeaders<StreamingJobInner, StreamingJobsUpdateHea...
[ "public", "Observable", "<", "StreamingJobInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "jobName", ",", "StreamingJobInner", "streamingJob", ",", "String", "ifMatch", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGr...
Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or ...
[ "Updates", "an", "existing", "streaming", "job", ".", "This", "can", "be", "used", "to", "partially", "update", "(", "ie", ".", "update", "one", "or", "two", "properties", ")", "a", "streaming", "job", "without", "affecting", "the", "rest", "the", "job", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/StreamingJobsInner.java#L616-L623
lightblueseas/jcommons-lang
src/main/java/de/alpharogroup/lang/thread/ThreadExtensions.java
ThreadExtensions.runAsyncSupplierWithCpuCores
public static <T> T runAsyncSupplierWithCpuCores(Supplier<T> supplier, int cpuCores) throws ExecutionException, InterruptedException { """ Creates a custom thread pool that are executed in parallel processes with the will run with the given number of the cpu cores @param supplier the {@link Supplier} task t...
java
public static <T> T runAsyncSupplierWithCpuCores(Supplier<T> supplier, int cpuCores) throws ExecutionException, InterruptedException { ForkJoinPool forkJoinPool = new ForkJoinPool(cpuCores); CompletableFuture<T> future = CompletableFuture.supplyAsync(supplier, forkJoinPool); return future.get(); }
[ "public", "static", "<", "T", ">", "T", "runAsyncSupplierWithCpuCores", "(", "Supplier", "<", "T", ">", "supplier", ",", "int", "cpuCores", ")", "throws", "ExecutionException", ",", "InterruptedException", "{", "ForkJoinPool", "forkJoinPool", "=", "new", "ForkJoin...
Creates a custom thread pool that are executed in parallel processes with the will run with the given number of the cpu cores @param supplier the {@link Supplier} task to execute @param cpuCores the number of the cpu cores to run with @param <T> the generic type of the result @return the result of the given task @thro...
[ "Creates", "a", "custom", "thread", "pool", "that", "are", "executed", "in", "parallel", "processes", "with", "the", "will", "run", "with", "the", "given", "number", "of", "the", "cpu", "cores" ]
train
https://github.com/lightblueseas/jcommons-lang/blob/000e1f198e949ec3e721fd0fc3f5946e945232a3/src/main/java/de/alpharogroup/lang/thread/ThreadExtensions.java#L86-L92
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.createBranch
public void createBranch(GitlabProject project, String branchName, String ref) throws IOException { """ Create Branch. <a href="http://doc.gitlab.com/ce/api/branches.html#create-repository-branch"> Create Repository Branch Documentation </a> @param project The gitlab project @param branchName The name of...
java
public void createBranch(GitlabProject project, String branchName, String ref) throws IOException { createBranch(project.getId(), branchName, ref); }
[ "public", "void", "createBranch", "(", "GitlabProject", "project", ",", "String", "branchName", ",", "String", "ref", ")", "throws", "IOException", "{", "createBranch", "(", "project", ".", "getId", "(", ")", ",", "branchName", ",", "ref", ")", ";", "}" ]
Create Branch. <a href="http://doc.gitlab.com/ce/api/branches.html#create-repository-branch"> Create Repository Branch Documentation </a> @param project The gitlab project @param branchName The name of the branch to create @param ref The branch name or commit SHA to create branch from @throws IOException on ...
[ "Create", "Branch", ".", "<a", "href", "=", "http", ":", "//", "doc", ".", "gitlab", ".", "com", "/", "ce", "/", "api", "/", "branches", ".", "html#create", "-", "repository", "-", "branch", ">", "Create", "Repository", "Branch", "Documentation", "<", ...
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L2318-L2320
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java
WikipediaInfo.getArticlesWithOverlappingCategories
private int getArticlesWithOverlappingCategories(Wikipedia pWiki, CategoryGraph pGraph) throws WikiPageNotFoundException { """ Articles in wikipedia may be tagged with multiple categories. It may be interesting to know how many articles have at least one category in common. Such articles would have a very high s...
java
private int getArticlesWithOverlappingCategories(Wikipedia pWiki, CategoryGraph pGraph) throws WikiPageNotFoundException { Set<Integer> overlappingArticles = new HashSet<Integer>(); // iterate over all node pairs Set<Integer> nodes = pGraph.getGraph().vertexSet(); Map<Integer,Set<Integ...
[ "private", "int", "getArticlesWithOverlappingCategories", "(", "Wikipedia", "pWiki", ",", "CategoryGraph", "pGraph", ")", "throws", "WikiPageNotFoundException", "{", "Set", "<", "Integer", ">", "overlappingArticles", "=", "new", "HashSet", "<", "Integer", ">", "(", ...
Articles in wikipedia may be tagged with multiple categories. It may be interesting to know how many articles have at least one category in common. Such articles would have a very high semantic relatedness even if they share a quite secondary category. @param pWiki The wikipedia object. @param pGraph The category graph...
[ "Articles", "in", "wikipedia", "may", "be", "tagged", "with", "multiple", "categories", ".", "It", "may", "be", "interesting", "to", "know", "how", "many", "articles", "have", "at", "least", "one", "category", "in", "common", ".", "Such", "articles", "would"...
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/WikipediaInfo.java#L216-L254
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/mcgregor/McGregorChecks.java
McGregorChecks.removeRedundantArcs
protected static void removeRedundantArcs(int row, int column, List<Integer> marcs, McgregorHelper mcGregorHelper) { """ The function is called in function partsearch. The function is given a temporary matrix and a position (row/column) within this matrix. First the function sets all entries to zero, which can be...
java
protected static void removeRedundantArcs(int row, int column, List<Integer> marcs, McgregorHelper mcGregorHelper) { int neighborBondNumA = mcGregorHelper.getNeighborBondNumA(); int neighborBondNumB = mcGregorHelper.getNeighborBondNumB(); List<Integer> iBondNeighborAtomsA = mcGregorHelper.getiBo...
[ "protected", "static", "void", "removeRedundantArcs", "(", "int", "row", ",", "int", "column", ",", "List", "<", "Integer", ">", "marcs", ",", "McgregorHelper", "mcGregorHelper", ")", "{", "int", "neighborBondNumA", "=", "mcGregorHelper", ".", "getNeighborBondNumA...
The function is called in function partsearch. The function is given a temporary matrix and a position (row/column) within this matrix. First the function sets all entries to zero, which can be exlcuded in respect to the current atom by atom matching. After this the function replaces all entries in the same row and col...
[ "The", "function", "is", "called", "in", "function", "partsearch", ".", "The", "function", "is", "given", "a", "temporary", "matrix", "and", "a", "position", "(", "row", "/", "column", ")", "within", "this", "matrix", ".", "First", "the", "function", "sets...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/mcgregor/McGregorChecks.java#L249-L284
roboconf/roboconf-platform
core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/RandomMngrImpl.java
RandomMngrImpl.findAgentContext
private InstanceContext findAgentContext( Application application, Instance instance ) { """ Builds an instance context corresponding to an agent. @param application an application @param instance an instance @return an instance context made up of the application and the right scoped instance """ Instanc...
java
private InstanceContext findAgentContext( Application application, Instance instance ) { Instance scopedInstance = InstanceHelpers.findScopedInstance( instance ); return new InstanceContext( application, scopedInstance ); }
[ "private", "InstanceContext", "findAgentContext", "(", "Application", "application", ",", "Instance", "instance", ")", "{", "Instance", "scopedInstance", "=", "InstanceHelpers", ".", "findScopedInstance", "(", "instance", ")", ";", "return", "new", "InstanceContext", ...
Builds an instance context corresponding to an agent. @param application an application @param instance an instance @return an instance context made up of the application and the right scoped instance
[ "Builds", "an", "instance", "context", "corresponding", "to", "an", "agent", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/RandomMngrImpl.java#L306-L310
facebookarchive/hadoop-20
src/core/org/apache/hadoop/filecache/DistributedCache.java
DistributedCache.addArchiveToClassPath
public static void addArchiveToClassPath(Path archive, Configuration conf) throws IOException { """ Add an archive path to the current set of classpath entries. It adds the archive to cache as well. @param archive Path of the archive to be added @param conf Configuration that contains the classpath settin...
java
public static void addArchiveToClassPath(Path archive, Configuration conf) throws IOException { URI uri = addArchiveToClassPathHelper(archive, conf); addCacheArchive(uri, conf); }
[ "public", "static", "void", "addArchiveToClassPath", "(", "Path", "archive", ",", "Configuration", "conf", ")", "throws", "IOException", "{", "URI", "uri", "=", "addArchiveToClassPathHelper", "(", "archive", ",", "conf", ")", ";", "addCacheArchive", "(", "uri", ...
Add an archive path to the current set of classpath entries. It adds the archive to cache as well. @param archive Path of the archive to be added @param conf Configuration that contains the classpath setting
[ "Add", "an", "archive", "path", "to", "the", "current", "set", "of", "classpath", "entries", ".", "It", "adds", "the", "archive", "to", "cache", "as", "well", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/filecache/DistributedCache.java#L1020-L1024
box/box-java-sdk
src/main/java/com/box/sdk/BoxFile.java
BoxFile.getRepresentationContent
public void getRepresentationContent(String representationHint, String assetPath, OutputStream output) { """ Fetches the contents of a file representation with asset path and writes them to the provided output stream. @see <a href=https://developer.box.com/reference#section-x-rep-hints-header>X-Rep-Hints Header</...
java
public void getRepresentationContent(String representationHint, String assetPath, OutputStream output) { List<Representation> reps = this.getInfoWithRepresentations(representationHint).getRepresentations(); if (reps.size() < 1) { throw new BoxAPIException("No matching representations found"...
[ "public", "void", "getRepresentationContent", "(", "String", "representationHint", ",", "String", "assetPath", ",", "OutputStream", "output", ")", "{", "List", "<", "Representation", ">", "reps", "=", "this", ".", "getInfoWithRepresentations", "(", "representationHint...
Fetches the contents of a file representation with asset path and writes them to the provided output stream. @see <a href=https://developer.box.com/reference#section-x-rep-hints-header>X-Rep-Hints Header</a> @param representationHint the X-Rep-Hints query for the representation to fetch. @param assetPath the path of th...
[ "Fetches", "the", "contents", "of", "a", "file", "representation", "with", "asset", "path", "and", "writes", "them", "to", "the", "provided", "output", "stream", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFile.java#L511-L543
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataMinCardinalityImpl_CustomFieldSerializer.java
OWLDataMinCardinalityImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDataMinCardinalityImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.g...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDataMinCardinalityImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLDataMinCardinalityImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataMinCardinalityImpl_CustomFieldSerializer.java#L74-L77