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
audit4j/audit4j-core
src/main/java/org/audit4j/core/extra/scannotation/ClasspathUrlFinder.java
ClasspathUrlFinder.findClassPaths
public static URL[] findClassPaths() { """ Uses the java.class.path system property to obtain a list of URLs that represent the CLASSPATH @return """ List<URL> list = new ArrayList<URL>(); String classpath = System.getProperty("java.class.path"); StringTokenizer tokenizer = new StringToken...
java
public static URL[] findClassPaths() { List<URL> list = new ArrayList<URL>(); String classpath = System.getProperty("java.class.path"); StringTokenizer tokenizer = new StringTokenizer(classpath, File.pathSeparator); while (tokenizer.hasMoreTokens()) { String path = tokenizer.n...
[ "public", "static", "URL", "[", "]", "findClassPaths", "(", ")", "{", "List", "<", "URL", ">", "list", "=", "new", "ArrayList", "<", "URL", ">", "(", ")", ";", "String", "classpath", "=", "System", ".", "getProperty", "(", "\"java.class.path\"", ")", "...
Uses the java.class.path system property to obtain a list of URLs that represent the CLASSPATH @return
[ "Uses", "the", "java", ".", "class", ".", "path", "system", "property", "to", "obtain", "a", "list", "of", "URLs", "that", "represent", "the", "CLASSPATH" ]
train
https://github.com/audit4j/audit4j-core/blob/dc8569108851e64cb0ecc7a39048db0ad070fba2/src/main/java/org/audit4j/core/extra/scannotation/ClasspathUrlFinder.java#L126-L149
grails/grails-core
grails-core/src/main/groovy/org/grails/core/io/MockStringResourceLoader.java
MockStringResourceLoader.registerMockResource
public void registerMockResource(String location, String contents) { """ Registers a mock resource with the first argument as the location and the second as the contents of the resource. @param location The location @param contents The contents of the resource """ try { mockResources.p...
java
public void registerMockResource(String location, String contents) { try { mockResources.put(location, new GrailsByteArrayResource(contents.getBytes("UTF-8"), location)); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
[ "public", "void", "registerMockResource", "(", "String", "location", ",", "String", "contents", ")", "{", "try", "{", "mockResources", ".", "put", "(", "location", ",", "new", "GrailsByteArrayResource", "(", "contents", ".", "getBytes", "(", "\"UTF-8\"", ")", ...
Registers a mock resource with the first argument as the location and the second as the contents of the resource. @param location The location @param contents The contents of the resource
[ "Registers", "a", "mock", "resource", "with", "the", "first", "argument", "as", "the", "location", "and", "the", "second", "as", "the", "contents", "of", "the", "resource", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/core/io/MockStringResourceLoader.java#L60-L67
nguillaumin/slick2d-maven
slick2d-peditor/src/main/java/org/newdawn/slick/tools/peditor/WhiskasPanel.java
WhiskasPanel.linkToEmitter
private void linkToEmitter(String name, LinearInterpolator interpol) { """ Link this set of controls to a linear interpolater within the particle emitter @param name The name of the article emitter being linked @param interpol The interpolator being configured """ // put to value map valueMap.put(nam...
java
private void linkToEmitter(String name, LinearInterpolator interpol) { // put to value map valueMap.put(name, interpol); // now update the checkbox to represent the state of the given // interpolator boolean checked = interpol.isActive(); JCheckBox enableControl = (JCheckBox) valueNameToControl.get(...
[ "private", "void", "linkToEmitter", "(", "String", "name", ",", "LinearInterpolator", "interpol", ")", "{", "// put to value map\r", "valueMap", ".", "put", "(", "name", ",", "interpol", ")", ";", "// now update the checkbox to represent the state of the given\r", "// int...
Link this set of controls to a linear interpolater within the particle emitter @param name The name of the article emitter being linked @param interpol The interpolator being configured
[ "Link", "this", "set", "of", "controls", "to", "a", "linear", "interpolater", "within", "the", "particle", "emitter" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-peditor/src/main/java/org/newdawn/slick/tools/peditor/WhiskasPanel.java#L141-L152
apache/spark
sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/SessionManager.java
SessionManager.openSession
public SessionHandle openSession(TProtocolVersion protocol, String username, String password, String ipAddress, Map<String, String> sessionConf, boolean withImpersonation, String delegationToken) throws HiveSQLException { """ Opens a new session and creates a session handle. The username passed to...
java
public SessionHandle openSession(TProtocolVersion protocol, String username, String password, String ipAddress, Map<String, String> sessionConf, boolean withImpersonation, String delegationToken) throws HiveSQLException { HiveSession session; // If doAs is set to true for HiveServer2, we will cr...
[ "public", "SessionHandle", "openSession", "(", "TProtocolVersion", "protocol", ",", "String", "username", ",", "String", "password", ",", "String", "ipAddress", ",", "Map", "<", "String", ",", "String", ">", "sessionConf", ",", "boolean", "withImpersonation", ",",...
Opens a new session and creates a session handle. The username passed to this method is the effective username. If withImpersonation is true (==doAs true) we wrap all the calls in HiveSession within a UGI.doAs, where UGI corresponds to the effective user. Please see {@code org.apache.hive.service.cli.thrift.ThriftCLIS...
[ "Opens", "a", "new", "session", "and", "creates", "a", "session", "handle", ".", "The", "username", "passed", "to", "this", "method", "is", "the", "effective", "username", ".", "If", "withImpersonation", "is", "true", "(", "==", "doAs", "true", ")", "we", ...
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/session/SessionManager.java#L241-L273
kirgor/enklib
common/src/main/java/com/kirgor/enklib/common/NamingUtils.java
NamingUtils.camelToSnake
public static String camelToSnake(String camel, boolean upper) { """ Converts camel case string (lower or upper/Pascal) to snake case, for example 'helloWorld' or 'HelloWorld' -> 'hello_world'. @param camel Input string. @param upper True if result snake cased string should be upper cased like 'HELLO_WORLD'. ...
java
public static String camelToSnake(String camel, boolean upper) { StringBuilder stringBuilder = new StringBuilder(); for (char c : camel.toCharArray()) { char nc = upper ? Character.toUpperCase(c) : Character.toLowerCase(c); if (Character.isUpperCase(c)) { stringBu...
[ "public", "static", "String", "camelToSnake", "(", "String", "camel", ",", "boolean", "upper", ")", "{", "StringBuilder", "stringBuilder", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "char", "c", ":", "camel", ".", "toCharArray", "(", ")", ")",...
Converts camel case string (lower or upper/Pascal) to snake case, for example 'helloWorld' or 'HelloWorld' -> 'hello_world'. @param camel Input string. @param upper True if result snake cased string should be upper cased like 'HELLO_WORLD'.
[ "Converts", "camel", "case", "string", "(", "lower", "or", "upper", "/", "Pascal", ")", "to", "snake", "case", "for", "example", "helloWorld", "or", "HelloWorld", "-", ">", "hello_world", "." ]
train
https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/common/src/main/java/com/kirgor/enklib/common/NamingUtils.java#L30-L41
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/impl/modulebuilder/javascript/IdentitySourceMapGenerator.java
IdentitySourceMapGenerator.processNode
private void processNode(Node node) throws IOException { """ Recursively processes the input node, adding a mapping for the node to the source map generator. @param node the node to map @throws IOException """ for (Node cursor = node.getFirstChild(); cursor != null; cursor = cursor.getNext()) { in...
java
private void processNode(Node node) throws IOException { for (Node cursor = node.getFirstChild(); cursor != null; cursor = cursor.getNext()) { int lineno = cursor.getLineno()-1; // adjust for rhino line numbers being 1 based int charno = cursor.getCharno(); if (lineno > currentLine || lineno == currentLi...
[ "private", "void", "processNode", "(", "Node", "node", ")", "throws", "IOException", "{", "for", "(", "Node", "cursor", "=", "node", ".", "getFirstChild", "(", ")", ";", "cursor", "!=", "null", ";", "cursor", "=", "cursor", ".", "getNext", "(", ")", ")...
Recursively processes the input node, adding a mapping for the node to the source map generator. @param node the node to map @throws IOException
[ "Recursively", "processes", "the", "input", "node", "adding", "a", "mapping", "for", "the", "node", "to", "the", "source", "map", "generator", "." ]
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/modulebuilder/javascript/IdentitySourceMapGenerator.java#L106-L123
Stratio/deep-spark
deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java
Cells.getString
public String getString(String nameSpace, String cellName) { """ Returns the {@code String} value of the {@link Cell} (associated to {@code table}) whose name iscellName, or null if this Cells object contains no cell whose name is cellName. @param nameSpace the name of the owning table @param cellName the na...
java
public String getString(String nameSpace, String cellName) { return getValue(nameSpace, cellName, String.class); }
[ "public", "String", "getString", "(", "String", "nameSpace", ",", "String", "cellName", ")", "{", "return", "getValue", "(", "nameSpace", ",", "cellName", ",", "String", ".", "class", ")", ";", "}" ]
Returns the {@code String} value of the {@link Cell} (associated to {@code table}) whose name iscellName, or null if this Cells object contains no cell whose name is cellName. @param nameSpace the name of the owning table @param cellName the name of the Cell we want to retrieve from this Cells object. @return the {@c...
[ "Returns", "the", "{", "@code", "String", "}", "value", "of", "the", "{", "@link", "Cell", "}", "(", "associated", "to", "{", "@code", "table", "}", ")", "whose", "name", "iscellName", "or", "null", "if", "this", "Cells", "object", "contains", "no", "c...
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java#L739-L741
CloudSlang/cs-actions
cs-commons/src/main/java/io/cloudslang/content/utils/StringEscapeUtilities.java
StringEscapeUtilities.escapeChars
@NotNull public static String escapeChars(@NotNull final String string, final char[] toEscape) { """ Escapes all the occurrences of the <toEscape> characters from the <string> if they are not escaped already @param string the string from which to escape the characters @param toEscape the characters to es...
java
@NotNull public static String escapeChars(@NotNull final String string, final char[] toEscape) { String toReturn = string; for (char character : toEscape) { toReturn = escapeChar(toReturn, character); } return toReturn; }
[ "@", "NotNull", "public", "static", "String", "escapeChars", "(", "@", "NotNull", "final", "String", "string", ",", "final", "char", "[", "]", "toEscape", ")", "{", "String", "toReturn", "=", "string", ";", "for", "(", "char", "character", ":", "toEscape",...
Escapes all the occurrences of the <toEscape> characters from the <string> if they are not escaped already @param string the string from which to escape the characters @param toEscape the characters to escape as Array @return a new string with the escaped <toEscape> characters
[ "Escapes", "all", "the", "occurrences", "of", "the", "<toEscape", ">", "characters", "from", "the", "<string", ">", "if", "they", "are", "not", "escaped", "already" ]
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-commons/src/main/java/io/cloudslang/content/utils/StringEscapeUtilities.java#L65-L72
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java
AbstractSequenceClassifier.loadClassifierNoExceptions
public void loadClassifierNoExceptions(InputStream in, Properties props) { """ Loads a classifier from the given input stream. The JVM shuts down (System.exit(1)) if there is an exception. This does not close the InputStream. @param in The InputStream to read from """ // load the classifier try...
java
public void loadClassifierNoExceptions(InputStream in, Properties props) { // load the classifier try { loadClassifier(in, props); } catch (Exception e) { throw new RuntimeException(e); } }
[ "public", "void", "loadClassifierNoExceptions", "(", "InputStream", "in", ",", "Properties", "props", ")", "{", "// load the classifier\r", "try", "{", "loadClassifier", "(", "in", ",", "props", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw",...
Loads a classifier from the given input stream. The JVM shuts down (System.exit(1)) if there is an exception. This does not close the InputStream. @param in The InputStream to read from
[ "Loads", "a", "classifier", "from", "the", "given", "input", "stream", ".", "The", "JVM", "shuts", "down", "(", "System", ".", "exit", "(", "1", "))", "if", "there", "is", "an", "exception", ".", "This", "does", "not", "close", "the", "InputStream", "....
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ie/AbstractSequenceClassifier.java#L1493-L1501
btrplace/scheduler
api/src/main/java/org/btrplace/model/constraint/migration/Deadline.java
Deadline.newDeadline
public static List<Deadline> newDeadline(Collection<VM> vms, String deadline) { """ Instantiate discrete constraints for a collection of VMs. @param vms the VMs to integrate @param deadline the desired deadline @return the associated list of constraints """ return vms.stream().map(v -> new De...
java
public static List<Deadline> newDeadline(Collection<VM> vms, String deadline) { return vms.stream().map(v -> new Deadline(v, deadline)).collect(Collectors.toList()); }
[ "public", "static", "List", "<", "Deadline", ">", "newDeadline", "(", "Collection", "<", "VM", ">", "vms", ",", "String", "deadline", ")", "{", "return", "vms", ".", "stream", "(", ")", ".", "map", "(", "v", "->", "new", "Deadline", "(", "v", ",", ...
Instantiate discrete constraints for a collection of VMs. @param vms the VMs to integrate @param deadline the desired deadline @return the associated list of constraints
[ "Instantiate", "discrete", "constraints", "for", "a", "collection", "of", "VMs", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/model/constraint/migration/Deadline.java#L127-L129
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/liveweb/ARCCacheDirectory.java
ARCCacheDirectory.getResource
public Resource getResource(String path, long offset) throws IOException { """ transform an ARCLocation into a Resource. Be sure to call close() on it when processing is finished. @param path to ARC file @param offset within file where record begins @return the Resource for the location @throws IOException fo...
java
public Resource getResource(String path, long offset) throws IOException { File arc = new File(path); if(!arc.exists()) { String base = arc.getName(); arc = new File(arcDir,base); if(!arc.exists()) { if(base.endsWith(ArchiveFileConstants.OCCUPIED_SUFFIX)) { String newBase = base.substring(0,base.l...
[ "public", "Resource", "getResource", "(", "String", "path", ",", "long", "offset", ")", "throws", "IOException", "{", "File", "arc", "=", "new", "File", "(", "path", ")", ";", "if", "(", "!", "arc", ".", "exists", "(", ")", ")", "{", "String", "base"...
transform an ARCLocation into a Resource. Be sure to call close() on it when processing is finished. @param path to ARC file @param offset within file where record begins @return the Resource for the location @throws IOException for usual reasons
[ "transform", "an", "ARCLocation", "into", "a", "Resource", ".", "Be", "sure", "to", "call", "close", "()", "on", "it", "when", "processing", "is", "finished", "." ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/liveweb/ARCCacheDirectory.java#L111-L131
sd4324530/fastweixin
src/main/java/com/github/sd4324530/fastweixin/message/aes/SHA1.java
SHA1.getSHA1
public static String getSHA1(String token, String timestamp, String nonce, String encrypt) throws AesException { """ 用SHA1算法生成安全签名 @param token 票据 @param timestamp 时间戳 @param nonce 随机字符串 @param encrypt 密文 @return 安全签名 @throws AesException AES算法异常 """ try { String[] array =...
java
public static String getSHA1(String token, String timestamp, String nonce, String encrypt) throws AesException { try { String[] array = new String[]{token, timestamp, nonce, encrypt}; StringBuffer sb = new StringBuffer(); // 字符串排序 Arrays.sort(array); f...
[ "public", "static", "String", "getSHA1", "(", "String", "token", ",", "String", "timestamp", ",", "String", "nonce", ",", "String", "encrypt", ")", "throws", "AesException", "{", "try", "{", "String", "[", "]", "array", "=", "new", "String", "[", "]", "{...
用SHA1算法生成安全签名 @param token 票据 @param timestamp 时间戳 @param nonce 随机字符串 @param encrypt 密文 @return 安全签名 @throws AesException AES算法异常
[ "用SHA1算法生成安全签名" ]
train
https://github.com/sd4324530/fastweixin/blob/6bc0a7abfa23aad0dbad4c3123a47a7fb53f3447/src/main/java/com/github/sd4324530/fastweixin/message/aes/SHA1.java#L30-L46
gallandarakhneorg/afc
advanced/attributes/src/main/java/org/arakhne/afc/attrs/collection/AbstractAttributeCollection.java
AbstractAttributeCollection.fireAttributeRenamedEvent
protected synchronized void fireAttributeRenamedEvent(String oldName, String newName, AttributeValue attr) { """ Fire the renaming event. @param oldName is the previous name of the attribute (before renaming) @param newName is the new name of the attribute (after renaming) @param attr is the value of the attr...
java
protected synchronized void fireAttributeRenamedEvent(String oldName, String newName, AttributeValue attr) { if (this.listenerList != null && isEventFirable()) { final AttributeChangeListener[] list = new AttributeChangeListener[this.listenerList.size()]; this.listenerList.toArray(list); final AttributeChang...
[ "protected", "synchronized", "void", "fireAttributeRenamedEvent", "(", "String", "oldName", ",", "String", "newName", ",", "AttributeValue", "attr", ")", "{", "if", "(", "this", ".", "listenerList", "!=", "null", "&&", "isEventFirable", "(", ")", ")", "{", "fi...
Fire the renaming event. @param oldName is the previous name of the attribute (before renaming) @param newName is the new name of the attribute (after renaming) @param attr is the value of the attribute.
[ "Fire", "the", "renaming", "event", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/attributes/src/main/java/org/arakhne/afc/attrs/collection/AbstractAttributeCollection.java#L162-L177
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
StringGroovyMethods.getAt
public static String getAt(GString text, int index) { """ Support the subscript operator for GString. @param text a GString @param index the index of the Character to get @return the Character at the given index @since 2.3.7 """ return (String) getAt(text.toString(), index); }
java
public static String getAt(GString text, int index) { return (String) getAt(text.toString(), index); }
[ "public", "static", "String", "getAt", "(", "GString", "text", ",", "int", "index", ")", "{", "return", "(", "String", ")", "getAt", "(", "text", ".", "toString", "(", ")", ",", "index", ")", ";", "}" ]
Support the subscript operator for GString. @param text a GString @param index the index of the Character to get @return the Character at the given index @since 2.3.7
[ "Support", "the", "subscript", "operator", "for", "GString", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L1253-L1255
mbenson/uelbox
src/main/java/uelbox/ELContextWrapper.java
ELContextWrapper.getTypedContext
public final <T> T getTypedContext(Class<T> key, T defaultValue) { """ Convenience method to return a typed context object when key resolves per documented convention to an object of the same type. @param <T> @param key @param defaultValue if absent @return T @see ELContext#getContext(Class) """ ...
java
public final <T> T getTypedContext(Class<T> key, T defaultValue) { return UEL.getContext(this, key, defaultValue); }
[ "public", "final", "<", "T", ">", "T", "getTypedContext", "(", "Class", "<", "T", ">", "key", ",", "T", "defaultValue", ")", "{", "return", "UEL", ".", "getContext", "(", "this", ",", "key", ",", "defaultValue", ")", ";", "}" ]
Convenience method to return a typed context object when key resolves per documented convention to an object of the same type. @param <T> @param key @param defaultValue if absent @return T @see ELContext#getContext(Class)
[ "Convenience", "method", "to", "return", "a", "typed", "context", "object", "when", "key", "resolves", "per", "documented", "convention", "to", "an", "object", "of", "the", "same", "type", "." ]
train
https://github.com/mbenson/uelbox/blob/b0c2df2c738295bddfd3c16a916e67c9c7c512ef/src/main/java/uelbox/ELContextWrapper.java#L151-L153
glyptodon/guacamole-client
guacamole-ext/src/main/java/org/apache/guacamole/net/auth/credentials/UserCredentials.java
UserCredentials.setValue
public String setValue(String name, String value) { """ Sets the value of the field having the given name. Any existing value for that field is replaced. @param name The name of the field whose value should be assigned. @param value The value to assign to the field having the given name. @return The p...
java
public String setValue(String name, String value) { return values.put(name, value); }
[ "public", "String", "setValue", "(", "String", "name", ",", "String", "value", ")", "{", "return", "values", ".", "put", "(", "name", ",", "value", ")", ";", "}" ]
Sets the value of the field having the given name. Any existing value for that field is replaced. @param name The name of the field whose value should be assigned. @param value The value to assign to the field having the given name. @return The previous value of the field, or null if the value of the field was not p...
[ "Sets", "the", "value", "of", "the", "field", "having", "the", "given", "name", ".", "Any", "existing", "value", "for", "that", "field", "is", "replaced", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/credentials/UserCredentials.java#L164-L166
lessthanoptimal/BoofCV
examples/src/main/java/boofcv/examples/recognition/ExampleClassifySceneKnn.java
ExampleClassifySceneKnn.learnAndSave
public void learnAndSave() { """ Process all the data in the training data set to learn the classifications. See code for details. """ System.out.println("======== Learning Classifier"); // Either load pre-computed words or compute the words from the training images AssignCluster<double[]> assignment; ...
java
public void learnAndSave() { System.out.println("======== Learning Classifier"); // Either load pre-computed words or compute the words from the training images AssignCluster<double[]> assignment; if( new File(CLUSTER_FILE_NAME).exists() ) { assignment = UtilIO.load(CLUSTER_FILE_NAME); } else { System....
[ "public", "void", "learnAndSave", "(", ")", "{", "System", ".", "out", ".", "println", "(", "\"======== Learning Classifier\"", ")", ";", "// Either load pre-computed words or compute the words from the training images", "AssignCluster", "<", "double", "[", "]", ">", "ass...
Process all the data in the training data set to learn the classifications. See code for details.
[ "Process", "all", "the", "data", "in", "the", "training", "data", "set", "to", "learn", "the", "classifications", ".", "See", "code", "for", "details", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/examples/src/main/java/boofcv/examples/recognition/ExampleClassifySceneKnn.java#L107-L130
alkacon/opencms-core
src/org/opencms/module/CmsModuleManager.java
CmsModuleManager.replaceModule
public CmsReplaceModuleInfo replaceModule(CmsObject cms, String importFile, I_CmsReport report) throws CmsException { """ Replaces an existing module with the one read from an import ZIP file.<p> If there is not already a module with the same name installed, then the module will just be imported normally. ...
java
public CmsReplaceModuleInfo replaceModule(CmsObject cms, String importFile, I_CmsReport report) throws CmsException { CmsModule module = CmsModuleImportExportHandler.readModuleFromImport(importFile); boolean hasModule = hasModule(module.getName()); boolean usedNewUpdate = false; if...
[ "public", "CmsReplaceModuleInfo", "replaceModule", "(", "CmsObject", "cms", ",", "String", "importFile", ",", "I_CmsReport", "report", ")", "throws", "CmsException", "{", "CmsModule", "module", "=", "CmsModuleImportExportHandler", ".", "readModuleFromImport", "(", "impo...
Replaces an existing module with the one read from an import ZIP file.<p> If there is not already a module with the same name installed, then the module will just be imported normally. @param cms the CMS context @param importFile the import file @param report the report @return the module replacement status @throws ...
[ "Replaces", "an", "existing", "module", "with", "the", "one", "read", "from", "an", "import", "ZIP", "file", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/module/CmsModuleManager.java#L902-L925
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/DataDecoder.java
DataDecoder.decodeChar
public static char decodeChar(byte[] src, int srcOffset) throws CorruptEncodingException { """ Decodes a char from exactly 2 bytes. @param src source of encoded bytes @param srcOffset offset into source array @return char value """ try { return (char)((src[srcOffset] << 8) |...
java
public static char decodeChar(byte[] src, int srcOffset) throws CorruptEncodingException { try { return (char)((src[srcOffset] << 8) | (src[srcOffset + 1] & 0xff)); } catch (IndexOutOfBoundsException e) { throw new CorruptEncodingException(null, e); } ...
[ "public", "static", "char", "decodeChar", "(", "byte", "[", "]", "src", ",", "int", "srcOffset", ")", "throws", "CorruptEncodingException", "{", "try", "{", "return", "(", "char", ")", "(", "(", "src", "[", "srcOffset", "]", "<<", "8", ")", "|", "(", ...
Decodes a char from exactly 2 bytes. @param src source of encoded bytes @param srcOffset offset into source array @return char value
[ "Decodes", "a", "char", "from", "exactly", "2", "bytes", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/DataDecoder.java#L213-L221
JodaOrg/joda-time
src/main/java/org/joda/time/format/PeriodFormatterBuilder.java
PeriodFormatterBuilder.appendPrefix
public PeriodFormatterBuilder appendPrefix(String singularText, String pluralText) { """ Append a field prefix which applies only to the next appended field. If the field is not printed, neither is the prefix. <p> During parsing, the singular and plural versions ...
java
public PeriodFormatterBuilder appendPrefix(String singularText, String pluralText) { if (singularText == null || pluralText == null) { throw new IllegalArgumentException(); } return appendPrefix(new PluralAffix(singularText, pluralText...
[ "public", "PeriodFormatterBuilder", "appendPrefix", "(", "String", "singularText", ",", "String", "pluralText", ")", "{", "if", "(", "singularText", "==", "null", "||", "pluralText", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", "...
Append a field prefix which applies only to the next appended field. If the field is not printed, neither is the prefix. <p> During parsing, the singular and plural versions are accepted whether or not the actual value matches plurality. @param singularText text to print if field value is one @param pluralText text to...
[ "Append", "a", "field", "prefix", "which", "applies", "only", "to", "the", "next", "appended", "field", ".", "If", "the", "field", "is", "not", "printed", "neither", "is", "the", "prefix", ".", "<p", ">", "During", "parsing", "the", "singular", "and", "p...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/PeriodFormatterBuilder.java#L375-L381
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java
LocaleData.getExemplarSet
public static UnicodeSet getExemplarSet(ULocale locale, int options, int extype) { """ Returns the set of exemplar characters for a locale. Equivalent to calling new LocaleData(locale).{@link #getExemplarSet(int, int)}. @param locale Locale for which the exemplar character set is to be retrieved. @param o...
java
public static UnicodeSet getExemplarSet(ULocale locale, int options, int extype) { return LocaleData.getInstance(locale).getExemplarSet(options, extype); }
[ "public", "static", "UnicodeSet", "getExemplarSet", "(", "ULocale", "locale", ",", "int", "options", ",", "int", "extype", ")", "{", "return", "LocaleData", ".", "getInstance", "(", "locale", ")", ".", "getExemplarSet", "(", "options", ",", "extype", ")", ";...
Returns the set of exemplar characters for a locale. Equivalent to calling new LocaleData(locale).{@link #getExemplarSet(int, int)}. @param locale Locale for which the exemplar character set is to be retrieved. @param options Bitmask for options to apply to the exemplar pattern. Specify zero to retrieve the exemp...
[ "Returns", "the", "set", "of", "exemplar", "characters", "for", "a", "locale", ".", "Equivalent", "to", "calling", "new", "LocaleData", "(", "locale", ")", ".", "{", "@link", "#getExemplarSet", "(", "int", "int", ")", "}", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java#L155-L157
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/analyzer/PythonDistributionAnalyzer.java
PythonDistributionAnalyzer.prepareFileTypeAnalyzer
@Override protected void prepareFileTypeAnalyzer(Engine engine) throws InitializationException { """ Makes sure a usable temporary directory is available. @param engine a reference to the dependency-check engine @throws InitializationException an AnalyzeException is thrown when the temp directory cannot b...
java
@Override protected void prepareFileTypeAnalyzer(Engine engine) throws InitializationException { try { final File baseDir = getSettings().getTempDirectory(); tempFileLocation = File.createTempFile("check", "tmp", baseDir); if (!tempFileLocation.delete()) { ...
[ "@", "Override", "protected", "void", "prepareFileTypeAnalyzer", "(", "Engine", "engine", ")", "throws", "InitializationException", "{", "try", "{", "final", "File", "baseDir", "=", "getSettings", "(", ")", ".", "getTempDirectory", "(", ")", ";", "tempFileLocation...
Makes sure a usable temporary directory is available. @param engine a reference to the dependency-check engine @throws InitializationException an AnalyzeException is thrown when the temp directory cannot be created
[ "Makes", "sure", "a", "usable", "temporary", "directory", "is", "available", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/analyzer/PythonDistributionAnalyzer.java#L244-L267
wildfly/wildfly-core
embedded/src/main/java/org/wildfly/core/embedded/SystemPropertyContext.java
SystemPropertyContext.resolvePath
static Path resolvePath(final Path base, final String... paths) { """ Resolves a path relative to the base path. @param base the base path @param paths paths relative to the base directory @return the resolved path """ return Paths.get(base.toString(), paths); }
java
static Path resolvePath(final Path base, final String... paths) { return Paths.get(base.toString(), paths); }
[ "static", "Path", "resolvePath", "(", "final", "Path", "base", ",", "final", "String", "...", "paths", ")", "{", "return", "Paths", ".", "get", "(", "base", ".", "toString", "(", ")", ",", "paths", ")", ";", "}" ]
Resolves a path relative to the base path. @param base the base path @param paths paths relative to the base directory @return the resolved path
[ "Resolves", "a", "path", "relative", "to", "the", "base", "path", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/embedded/src/main/java/org/wildfly/core/embedded/SystemPropertyContext.java#L167-L169
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/SwipeBack.java
SwipeBack.setSwipeBackView
public SwipeBack setSwipeBackView(View view) { """ Set the swipe back view to an explicit view. @param view The swipe back view. """ setSwipeBackView(view, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); return this; }
java
public SwipeBack setSwipeBackView(View view) { setSwipeBackView(view, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); return this; }
[ "public", "SwipeBack", "setSwipeBackView", "(", "View", "view", ")", "{", "setSwipeBackView", "(", "view", ",", "new", "LayoutParams", "(", "LayoutParams", ".", "MATCH_PARENT", ",", "LayoutParams", ".", "MATCH_PARENT", ")", ")", ";", "return", "this", ";", "}"...
Set the swipe back view to an explicit view. @param view The swipe back view.
[ "Set", "the", "swipe", "back", "view", "to", "an", "explicit", "view", "." ]
train
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/SwipeBack.java#L1372-L1375
UrielCh/ovh-java-sdk
ovh-java-sdk-caasregistry/src/main/java/net/minidev/ovh/api/ApiOvhCaasregistry.java
ApiOvhCaasregistry.serviceName_namespaces_namespaceId_DELETE
public void serviceName_namespaces_namespaceId_DELETE(String serviceName, String namespaceId) throws IOException { """ Delete namespace REST: DELETE /caas/registry/{serviceName}/namespaces/{namespaceId} @param namespaceId [required] Namespace id @param serviceName [required] Service name API beta """ ...
java
public void serviceName_namespaces_namespaceId_DELETE(String serviceName, String namespaceId) throws IOException { String qPath = "/caas/registry/{serviceName}/namespaces/{namespaceId}"; StringBuilder sb = path(qPath, serviceName, namespaceId); exec(qPath, "DELETE", sb.toString(), null); }
[ "public", "void", "serviceName_namespaces_namespaceId_DELETE", "(", "String", "serviceName", ",", "String", "namespaceId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/caas/registry/{serviceName}/namespaces/{namespaceId}\"", ";", "StringBuilder", "sb", "=", ...
Delete namespace REST: DELETE /caas/registry/{serviceName}/namespaces/{namespaceId} @param namespaceId [required] Namespace id @param serviceName [required] Service name API beta
[ "Delete", "namespace" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-caasregistry/src/main/java/net/minidev/ovh/api/ApiOvhCaasregistry.java#L372-L376
radkovo/CSSBox
src/main/java/org/fit/cssbox/layout/BoxFactory.java
BoxFactory.createAnonymousBox
protected ElementBox createAnonymousBox(ElementBox parent, Box child, boolean block) { """ Creates an empty anonymous block or inline box that can be placed between an optional parent and its child. The corresponding properties of the box are taken from the child. The child is inserted NOT as the child box of the...
java
protected ElementBox createAnonymousBox(ElementBox parent, Box child, boolean block) { ElementBox anbox; if (block) { Element anelem = createAnonymousElement(child.getNode().getOwnerDocument(), "Xdiv", "block"); anbox = new BlockBox(anelem, (Graphics2D) child.getGraph...
[ "protected", "ElementBox", "createAnonymousBox", "(", "ElementBox", "parent", ",", "Box", "child", ",", "boolean", "block", ")", "{", "ElementBox", "anbox", ";", "if", "(", "block", ")", "{", "Element", "anelem", "=", "createAnonymousElement", "(", "child", "....
Creates an empty anonymous block or inline box that can be placed between an optional parent and its child. The corresponding properties of the box are taken from the child. The child is inserted NOT as the child box of the new box. The new box is NOT inserted as a subbox of the parent. @param parent an optional parent...
[ "Creates", "an", "empty", "anonymous", "block", "or", "inline", "box", "that", "can", "be", "placed", "between", "an", "optional", "parent", "and", "its", "child", ".", "The", "corresponding", "properties", "of", "the", "box", "are", "taken", "from", "the", ...
train
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/layout/BoxFactory.java#L786-L817
netty/netty
common/src/main/java/io/netty/util/internal/PlatformDependent.java
PlatformDependent.hashCodeAsciiSanitizeInt
private static int hashCodeAsciiSanitizeInt(CharSequence value, int offset) { """ Identical to {@link PlatformDependent0#hashCodeAsciiSanitize(int)} but for {@link CharSequence}. """ if (BIG_ENDIAN_NATIVE_ORDER) { // mimic a unsafe.getInt call on a big endian machine return (val...
java
private static int hashCodeAsciiSanitizeInt(CharSequence value, int offset) { if (BIG_ENDIAN_NATIVE_ORDER) { // mimic a unsafe.getInt call on a big endian machine return (value.charAt(offset + 3) & 0x1f) | (value.charAt(offset + 2) & 0x1f) << 8 | (va...
[ "private", "static", "int", "hashCodeAsciiSanitizeInt", "(", "CharSequence", "value", ",", "int", "offset", ")", "{", "if", "(", "BIG_ENDIAN_NATIVE_ORDER", ")", "{", "// mimic a unsafe.getInt call on a big endian machine", "return", "(", "value", ".", "charAt", "(", "...
Identical to {@link PlatformDependent0#hashCodeAsciiSanitize(int)} but for {@link CharSequence}.
[ "Identical", "to", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/PlatformDependent.java#L521-L533
teatrove/teatrove
tea/src/main/java/org/teatrove/tea/compiler/CompiledTemplate.java
CompiledTemplate.getParseTree
public Template getParseTree() { """ This method is called by JavaClassGenerator during the compile phase. It overrides the method in CompilationUnit and returns just the reflected template signature. """ getTemplateClass(); if (findExecuteMethod() == null) throw new IllegalArgumen...
java
public Template getParseTree() { getTemplateClass(); if (findExecuteMethod() == null) throw new IllegalArgumentException("Cannot locate compiled template entry point."); reflectParameters(); mTree = new Template(mCallerInfo, new Name(mCallerInfo, getName()), mPar...
[ "public", "Template", "getParseTree", "(", ")", "{", "getTemplateClass", "(", ")", ";", "if", "(", "findExecuteMethod", "(", ")", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"Cannot locate compiled template entry point.\"", ")", ";", "refle...
This method is called by JavaClassGenerator during the compile phase. It overrides the method in CompilationUnit and returns just the reflected template signature.
[ "This", "method", "is", "called", "by", "JavaClassGenerator", "during", "the", "compile", "phase", ".", "It", "overrides", "the", "method", "in", "CompilationUnit", "and", "returns", "just", "the", "reflected", "template", "signature", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/tea/src/main/java/org/teatrove/tea/compiler/CompiledTemplate.java#L160-L172
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/util/LeaderRetrievalUtils.java
LeaderRetrievalUtils.retrieveLeaderConnectionInfo
public static LeaderConnectionInfo retrieveLeaderConnectionInfo( LeaderRetrievalService leaderRetrievalService, Time timeout) throws LeaderRetrievalException { """ Retrieves the leader akka url and the current leader session ID. The values are stored in a {@link LeaderConnectionInfo} instance. @param lea...
java
public static LeaderConnectionInfo retrieveLeaderConnectionInfo( LeaderRetrievalService leaderRetrievalService, Time timeout) throws LeaderRetrievalException { return retrieveLeaderConnectionInfo(leaderRetrievalService, FutureUtils.toFiniteDuration(timeout)); }
[ "public", "static", "LeaderConnectionInfo", "retrieveLeaderConnectionInfo", "(", "LeaderRetrievalService", "leaderRetrievalService", ",", "Time", "timeout", ")", "throws", "LeaderRetrievalException", "{", "return", "retrieveLeaderConnectionInfo", "(", "leaderRetrievalService", ",...
Retrieves the leader akka url and the current leader session ID. The values are stored in a {@link LeaderConnectionInfo} instance. @param leaderRetrievalService Leader retrieval service to retrieve the leader connection information @param timeout Timeout when to give up looking for the leader @return LeaderConnectionI...
[ "Retrieves", "the", "leader", "akka", "url", "and", "the", "current", "leader", "session", "ID", ".", "The", "values", "are", "stored", "in", "a", "{", "@link", "LeaderConnectionInfo", "}", "instance", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/util/LeaderRetrievalUtils.java#L58-L62
weld/core
impl/src/main/java/org/jboss/weld/bean/proxy/InterceptedSubclassFactory.java
InterceptedSubclassFactory.hasAbstractPackagePrivateSuperClassWithImplementation
private boolean hasAbstractPackagePrivateSuperClassWithImplementation(Class<?> clazz, BridgeMethod bridgeMethod) { """ Returns true if super class of the parameter exists and is abstract and package private. In such case we want to omit such method. See WELD-2507 and Oracle issue - https://bugs.java.com/view_bu...
java
private boolean hasAbstractPackagePrivateSuperClassWithImplementation(Class<?> clazz, BridgeMethod bridgeMethod) { Class<?> superClass = clazz.getSuperclass(); while (superClass != null) { if (Modifier.isAbstract(superClass.getModifiers()) && Reflections.isPackagePrivate(superClass.getModifi...
[ "private", "boolean", "hasAbstractPackagePrivateSuperClassWithImplementation", "(", "Class", "<", "?", ">", "clazz", ",", "BridgeMethod", "bridgeMethod", ")", "{", "Class", "<", "?", ">", "superClass", "=", "clazz", ".", "getSuperclass", "(", ")", ";", "while", ...
Returns true if super class of the parameter exists and is abstract and package private. In such case we want to omit such method. See WELD-2507 and Oracle issue - https://bugs.java.com/view_bug.do?bug_id=6342411 @return true if the super class exists and is abstract and package private
[ "Returns", "true", "if", "super", "class", "of", "the", "parameter", "exists", "and", "is", "abstract", "and", "package", "private", ".", "In", "such", "case", "we", "want", "to", "omit", "such", "method", "." ]
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/impl/src/main/java/org/jboss/weld/bean/proxy/InterceptedSubclassFactory.java#L273-L289
joniles/mpxj
src/main/java/net/sf/mpxj/mpd/MPD9AbstractReader.java
MPD9AbstractReader.getNullOnValue
private Integer getNullOnValue(Integer value, int nullValue) { """ This method returns the value it is passed, or null if the value matches the nullValue argument. @param value value under test @param nullValue return null if value under test matches this value @return value or null """ return (Num...
java
private Integer getNullOnValue(Integer value, int nullValue) { return (NumberHelper.getInt(value) == nullValue ? null : value); }
[ "private", "Integer", "getNullOnValue", "(", "Integer", "value", ",", "int", "nullValue", ")", "{", "return", "(", "NumberHelper", ".", "getInt", "(", "value", ")", "==", "nullValue", "?", "null", ":", "value", ")", ";", "}" ]
This method returns the value it is passed, or null if the value matches the nullValue argument. @param value value under test @param nullValue return null if value under test matches this value @return value or null
[ "This", "method", "returns", "the", "value", "it", "is", "passed", "or", "null", "if", "the", "value", "matches", "the", "nullValue", "argument", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpd/MPD9AbstractReader.java#L1283-L1286
twitter/scalding
scalding-parquet-scrooge/src/main/java/com/twitter/scalding/parquet/scrooge/ScroogeReadSupport.java
ScroogeReadSupport.assertGroupsAreCompatible
public static void assertGroupsAreCompatible(GroupType fileType, GroupType projection) { """ Validates that the requested group type projection is compatible. This allows the projection schema to have extra optional fields. @param fileType the typed schema of the source @param projection requested projectio...
java
public static void assertGroupsAreCompatible(GroupType fileType, GroupType projection) { List<Type> fields = projection.getFields(); for (Type otherType : fields) { if (fileType.containsField(otherType.getName())) { Type thisType = fileType.getType(otherType.getName()); assertAreCompatible...
[ "public", "static", "void", "assertGroupsAreCompatible", "(", "GroupType", "fileType", ",", "GroupType", "projection", ")", "{", "List", "<", "Type", ">", "fields", "=", "projection", ".", "getFields", "(", ")", ";", "for", "(", "Type", "otherType", ":", "fi...
Validates that the requested group type projection is compatible. This allows the projection schema to have extra optional fields. @param fileType the typed schema of the source @param projection requested projection schema
[ "Validates", "that", "the", "requested", "group", "type", "projection", "is", "compatible", ".", "This", "allows", "the", "projection", "schema", "to", "have", "extra", "optional", "fields", "." ]
train
https://github.com/twitter/scalding/blob/428b5507279655676e507d52c669c3cbc7812dc0/scalding-parquet-scrooge/src/main/java/com/twitter/scalding/parquet/scrooge/ScroogeReadSupport.java#L160-L173
lievendoclo/Valkyrie-RCP
valkyrie-rcp-integrations/valkyrie-rcp-vldocking/src/main/java/org/valkyriercp/application/docking/VLDockingBeanPostProcessor.java
VLDockingBeanPostProcessor.postProcessAfterInitialization
@Override public Object postProcessAfterInitialization(Object bean, String beanName) { """ {@inheritDoc} <p/> Replaces those view descriptors not implementing {@link VLDockingViewDescriptor}. """ // throws BeansException { if (bean instanceof VLDockingViewDescriptor) { retur...
java
@Override public Object postProcessAfterInitialization(Object bean, String beanName) { // throws BeansException { if (bean instanceof VLDockingViewDescriptor) { return bean; } else if (bean instanceof ViewDescriptor) { final ViewDescriptor sourceViewDescriptor = (Vi...
[ "@", "Override", "public", "Object", "postProcessAfterInitialization", "(", "Object", "bean", ",", "String", "beanName", ")", "{", "// throws BeansException {", "if", "(", "bean", "instanceof", "VLDockingViewDescriptor", ")", "{", "return", "bean", ";", "}", "else",...
{@inheritDoc} <p/> Replaces those view descriptors not implementing {@link VLDockingViewDescriptor}.
[ "{" ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-integrations/valkyrie-rcp-vldocking/src/main/java/org/valkyriercp/application/docking/VLDockingBeanPostProcessor.java#L58-L76
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/storage/SparkStorageUtils.java
SparkStorageUtils.restoreSequenceFileSequences
public static JavaRDD<List<List<Writable>>> restoreSequenceFileSequences(String path, JavaSparkContext sc) { """ Restore a {@code JavaRDD<List<List<Writable>>} previously saved with {@link #saveSequenceFileSequences(String, JavaRDD)} @param path Path of the sequence file @param sc Spark context @return The ...
java
public static JavaRDD<List<List<Writable>>> restoreSequenceFileSequences(String path, JavaSparkContext sc) { return restoreMapFileSequences(path, sc).values(); }
[ "public", "static", "JavaRDD", "<", "List", "<", "List", "<", "Writable", ">", ">", ">", "restoreSequenceFileSequences", "(", "String", "path", ",", "JavaSparkContext", "sc", ")", "{", "return", "restoreMapFileSequences", "(", "path", ",", "sc", ")", ".", "v...
Restore a {@code JavaRDD<List<List<Writable>>} previously saved with {@link #saveSequenceFileSequences(String, JavaRDD)} @param path Path of the sequence file @param sc Spark context @return The restored RDD
[ "Restore", "a", "{", "@code", "JavaRDD<List<List<Writable", ">>", "}", "previously", "saved", "with", "{", "@link", "#saveSequenceFileSequences", "(", "String", "JavaRDD", ")", "}" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/storage/SparkStorageUtils.java#L165-L167
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/StreamTokenizer.java
StreamTokenizer.wordChars
public void wordChars(int low, int hi) { """ Specifies that the characters in the range from {@code low} to {@code hi} shall be treated as word characters by this tokenizer. A word consists of a word character followed by zero or more word or number characters. @param low the first character in the range of ...
java
public void wordChars(int low, int hi) { if (low < 0) { low = 0; } if (hi > tokenTypes.length) { hi = tokenTypes.length - 1; } for (int i = low; i <= hi; i++) { tokenTypes[i] |= TOKEN_WORD; } }
[ "public", "void", "wordChars", "(", "int", "low", ",", "int", "hi", ")", "{", "if", "(", "low", "<", "0", ")", "{", "low", "=", "0", ";", "}", "if", "(", "hi", ">", "tokenTypes", ".", "length", ")", "{", "hi", "=", "tokenTypes", ".", "length", ...
Specifies that the characters in the range from {@code low} to {@code hi} shall be treated as word characters by this tokenizer. A word consists of a word character followed by zero or more word or number characters. @param low the first character in the range of word characters. @param hi the last character in the ra...
[ "Specifies", "that", "the", "characters", "in", "the", "range", "from", "{", "@code", "low", "}", "to", "{", "@code", "hi", "}", "shall", "be", "treated", "as", "word", "characters", "by", "this", "tokenizer", ".", "A", "word", "consists", "of", "a", "...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/StreamTokenizer.java#L664-L674
GerdHolz/TOVAL
src/de/invation/code/toval/misc/ArrayUtils.java
ArrayUtils.arrayContainsEq
public static <T> boolean arrayContainsEq(T[] array, T value) { """ Checks if the given array contains the specified value.<br> This method works with the equals method. @param <T> Type of array elements and <code>value</code> @param array Array to examine @param value Value to search @return <code>true<...
java
public static <T> boolean arrayContainsEq(T[] array, T value) { for (int i = 0; i < array.length; i++) { if (array[i].equals(value)) { return true; } } return false; }
[ "public", "static", "<", "T", ">", "boolean", "arrayContainsEq", "(", "T", "[", "]", "array", ",", "T", "value", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "array", ".", "length", ";", "i", "++", ")", "{", "if", "(", "array", ...
Checks if the given array contains the specified value.<br> This method works with the equals method. @param <T> Type of array elements and <code>value</code> @param array Array to examine @param value Value to search @return <code>true</code> if <code>array</code> contains <code>value</code>, <code>false</code> other...
[ "Checks", "if", "the", "given", "array", "contains", "the", "specified", "value", ".", "<br", ">", "This", "method", "works", "with", "the", "equals", "method", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/misc/ArrayUtils.java#L256-L263
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Utils/MapFileHelper.java
MapFileHelper.copyMapFiles
static public File copyMapFiles(File mapFile, boolean isTemporary) { """ Attempt to copy the specified file into the Minecraft saves folder. @param mapFile full path to the map file required @param overwriteOldFiles if false, will rename copy to avoid overwriting any other saved games @return if successful, a F...
java
static public File copyMapFiles(File mapFile, boolean isTemporary) { System.out.println("Current directory: "+System.getProperty("user.dir")); // Look for the basemap file. // If it exists, copy it into the Minecraft saves folder, // and attempt to load it. File savesDir = FM...
[ "static", "public", "File", "copyMapFiles", "(", "File", "mapFile", ",", "boolean", "isTemporary", ")", "{", "System", ".", "out", ".", "println", "(", "\"Current directory: \"", "+", "System", ".", "getProperty", "(", "\"user.dir\"", ")", ")", ";", "// Look f...
Attempt to copy the specified file into the Minecraft saves folder. @param mapFile full path to the map file required @param overwriteOldFiles if false, will rename copy to avoid overwriting any other saved games @return if successful, a File object representing the new copy, which can be fed to Minecraft to load - oth...
[ "Attempt", "to", "copy", "the", "specified", "file", "into", "the", "Minecraft", "saves", "folder", "." ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Utils/MapFileHelper.java#L48-L72
threerings/narya
core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java
SpeakUtil.sendAttention
public static void sendAttention (DObject speakObj, String bundle, String message) { """ Sends a system ATTENTION message notification to the specified object with the supplied message content. A system message is one that will be rendered where the speak messages are rendered, but in a way that makes it clear t...
java
public static void sendAttention (DObject speakObj, String bundle, String message) { sendSystem(speakObj, bundle, message, SystemMessage.ATTENTION); }
[ "public", "static", "void", "sendAttention", "(", "DObject", "speakObj", ",", "String", "bundle", ",", "String", "message", ")", "{", "sendSystem", "(", "speakObj", ",", "bundle", ",", "message", ",", "SystemMessage", ".", "ATTENTION", ")", ";", "}" ]
Sends a system ATTENTION message notification to the specified object with the supplied message content. A system message is one that will be rendered where the speak messages are rendered, but in a way that makes it clear that it is a message from the server. Attention messages are sent when something requires user a...
[ "Sends", "a", "system", "ATTENTION", "message", "notification", "to", "the", "specified", "object", "with", "the", "supplied", "message", "content", ".", "A", "system", "message", "is", "one", "that", "will", "be", "rendered", "where", "the", "speak", "message...
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/server/SpeakUtil.java#L161-L164
dadoonet/elasticsearch-beyonder
src/main/java/fr/pilato/elasticsearch/tools/index/IndexElasticsearchUpdater.java
IndexElasticsearchUpdater.removeIndexInElasticsearch
private static void removeIndexInElasticsearch(RestClient client, String index) throws Exception { """ Remove a new index in Elasticsearch @param client Elasticsearch client @param index Index name @throws Exception if the elasticsearch API call is failing """ logger.trace("removeIndex([{}])", index); ...
java
private static void removeIndexInElasticsearch(RestClient client, String index) throws Exception { logger.trace("removeIndex([{}])", index); assert client != null; assert index != null; Response response = client.performRequest(new Request("DELETE", "/" + index)); if (response.getStatusLine().getStatusCode(...
[ "private", "static", "void", "removeIndexInElasticsearch", "(", "RestClient", "client", ",", "String", "index", ")", "throws", "Exception", "{", "logger", ".", "trace", "(", "\"removeIndex([{}])\"", ",", "index", ")", ";", "assert", "client", "!=", "null", ";", ...
Remove a new index in Elasticsearch @param client Elasticsearch client @param index Index name @throws Exception if the elasticsearch API call is failing
[ "Remove", "a", "new", "index", "in", "Elasticsearch" ]
train
https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/index/IndexElasticsearchUpdater.java#L254-L267
sagiegurari/fax4j
src/main/java/org/fax4j/util/ReflectionHelper.java
ReflectionHelper.getType
public static Class<?> getType(String className) { """ This function returns the class based on the class name. @param className The class name of the requested type @return The type """ ClassLoader classLoader=ReflectionHelper.getThreadContextClassLoader(); Class<?> type=null; ...
java
public static Class<?> getType(String className) { ClassLoader classLoader=ReflectionHelper.getThreadContextClassLoader(); Class<?> type=null; try { //load class definition type=classLoader.loadClass(className); } catch(ClassNotFoundException e...
[ "public", "static", "Class", "<", "?", ">", "getType", "(", "String", "className", ")", "{", "ClassLoader", "classLoader", "=", "ReflectionHelper", ".", "getThreadContextClassLoader", "(", ")", ";", "Class", "<", "?", ">", "type", "=", "null", ";", "try", ...
This function returns the class based on the class name. @param className The class name of the requested type @return The type
[ "This", "function", "returns", "the", "class", "based", "on", "the", "class", "name", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/ReflectionHelper.java#L45-L60
thinkaurelius/titan
titan-cassandra/src/main/java/com/thinkaurelius/titan/diskstorage/cassandra/thrift/thriftpool/CTConnectionFactory.java
CTConnectionFactory.makeRawConnection
public CTConnection makeRawConnection() throws TTransportException { """ Create a Cassandra-Thrift connection, but do not attempt to set a keyspace on the connection. @return A CTConnection ready to talk to a Cassandra cluster @throws TTransportException on any Thrift transport failure """ final C...
java
public CTConnection makeRawConnection() throws TTransportException { final Config cfg = cfgRef.get(); String hostname = cfg.getRandomHost(); log.debug("Creating TSocket({}, {}, {}, {}, {})", hostname, cfg.port, cfg.username, cfg.password, cfg.timeoutMS); TSocket socket; if (nu...
[ "public", "CTConnection", "makeRawConnection", "(", ")", "throws", "TTransportException", "{", "final", "Config", "cfg", "=", "cfgRef", ".", "get", "(", ")", ";", "String", "hostname", "=", "cfg", ".", "getRandomHost", "(", ")", ";", "log", ".", "debug", "...
Create a Cassandra-Thrift connection, but do not attempt to set a keyspace on the connection. @return A CTConnection ready to talk to a Cassandra cluster @throws TTransportException on any Thrift transport failure
[ "Create", "a", "Cassandra", "-", "Thrift", "connection", "but", "do", "not", "attempt", "to", "set", "a", "keyspace", "on", "the", "connection", "." ]
train
https://github.com/thinkaurelius/titan/blob/ee226e52415b8bf43b700afac75fa5b9767993a5/titan-cassandra/src/main/java/com/thinkaurelius/titan/diskstorage/cassandra/thrift/thriftpool/CTConnectionFactory.java#L66-L104
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/route/WebjarsResourceHandler.java
WebjarsResourceHandler.locatePomProperties
private List<String> locatePomProperties() { """ Locate all Webjars Maven pom.properties files on the classpath. @return a list of Maven pom.properties files on the classpath """ List<String> propertiesFiles = new ArrayList<>(); List<URL> packageUrls = ClasspathUtils.getResources(getResource...
java
private List<String> locatePomProperties() { List<String> propertiesFiles = new ArrayList<>(); List<URL> packageUrls = ClasspathUtils.getResources(getResourceBasePath()); for (URL packageUrl : packageUrls) { if (packageUrl.getProtocol().equals("jar")) { // We only car...
[ "private", "List", "<", "String", ">", "locatePomProperties", "(", ")", "{", "List", "<", "String", ">", "propertiesFiles", "=", "new", "ArrayList", "<>", "(", ")", ";", "List", "<", "URL", ">", "packageUrls", "=", "ClasspathUtils", ".", "getResources", "(...
Locate all Webjars Maven pom.properties files on the classpath. @return a list of Maven pom.properties files on the classpath
[ "Locate", "all", "Webjars", "Maven", "pom", ".", "properties", "files", "on", "the", "classpath", "." ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/route/WebjarsResourceHandler.java#L148-L173
nmdp-bioinformatics/ngs
range/src/main/java/org/nmdp/ngs/range/Ranges.java
Ranges.orderingByUpperEndpoint
public static <C extends Comparable> Ordering<Range<C>> orderingByUpperEndpoint() { """ Return an ordering by upper endpoint over ranges. @param <C> range endpoint type @return an ordering by upper endpoint over ranges """ return new Ordering<Range<C>>() { @Override public i...
java
public static <C extends Comparable> Ordering<Range<C>> orderingByUpperEndpoint() { return new Ordering<Range<C>>() { @Override public int compare(final Range<C> left, final Range<C> right) { return ComparisonChain.start() .compare(left.hasUpperBound()...
[ "public", "static", "<", "C", "extends", "Comparable", ">", "Ordering", "<", "Range", "<", "C", ">", ">", "orderingByUpperEndpoint", "(", ")", "{", "return", "new", "Ordering", "<", "Range", "<", "C", ">", ">", "(", ")", "{", "@", "Override", "public",...
Return an ordering by upper endpoint over ranges. @param <C> range endpoint type @return an ordering by upper endpoint over ranges
[ "Return", "an", "ordering", "by", "upper", "endpoint", "over", "ranges", "." ]
train
https://github.com/nmdp-bioinformatics/ngs/blob/277627e4311313a80f5dc110b3185b0d7af32bd0/range/src/main/java/org/nmdp/ngs/range/Ranges.java#L180-L190
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/render/CoreRenderer.java
CoreRenderer.getRequestParameter
public static String getRequestParameter(FacesContext context, String name) { """ Returns request parameter value for the provided parameter name. @param context Faces context. @param name Parameter name to get value for. @return Request parameter value for the provided parameter name. """ return ...
java
public static String getRequestParameter(FacesContext context, String name) { return context.getExternalContext().getRequestParameterMap().get(name); }
[ "public", "static", "String", "getRequestParameter", "(", "FacesContext", "context", ",", "String", "name", ")", "{", "return", "context", ".", "getExternalContext", "(", ")", ".", "getRequestParameterMap", "(", ")", ".", "get", "(", "name", ")", ";", "}" ]
Returns request parameter value for the provided parameter name. @param context Faces context. @param name Parameter name to get value for. @return Request parameter value for the provided parameter name.
[ "Returns", "request", "parameter", "value", "for", "the", "provided", "parameter", "name", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/render/CoreRenderer.java#L576-L578
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaEndpointActivation.java
SibRaEndpointActivation.closeConnection
protected void closeConnection(final String meUuid, boolean alreadyClosed) { """ Closes the connection for the given messaging engine if there is one open. @param meUuid the UUID for the messaging engine to close the connection for @param alreadyClosed if the connection has already been closed """ ...
java
protected void closeConnection(final String meUuid, boolean alreadyClosed) { final String methodName = "closeConnection"; if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, methodName, new Object [] { meUuid, alreadyClosed }); } f...
[ "protected", "void", "closeConnection", "(", "final", "String", "meUuid", ",", "boolean", "alreadyClosed", ")", "{", "final", "String", "methodName", "=", "\"closeConnection\"", ";", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "TRACE",...
Closes the connection for the given messaging engine if there is one open. @param meUuid the UUID for the messaging engine to close the connection for @param alreadyClosed if the connection has already been closed
[ "Closes", "the", "connection", "for", "the", "given", "messaging", "engine", "if", "there", "is", "one", "open", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/ra/inbound/impl/SibRaEndpointActivation.java#L522-L545
mabe02/lanterna
src/main/java/com/googlecode/lanterna/TextCharacter.java
TextCharacter.withCharacter
@SuppressWarnings("SameParameterValue") public TextCharacter withCharacter(char character) { """ Returns a new TextCharacter with the same colors and modifiers but a different underlying character @param character Character the copy should have @return Copy of this TextCharacter with different underlying cha...
java
@SuppressWarnings("SameParameterValue") public TextCharacter withCharacter(char character) { if(this.character == character) { return this; } return new TextCharacter(character, foregroundColor, backgroundColor, modifiers); }
[ "@", "SuppressWarnings", "(", "\"SameParameterValue\"", ")", "public", "TextCharacter", "withCharacter", "(", "char", "character", ")", "{", "if", "(", "this", ".", "character", "==", "character", ")", "{", "return", "this", ";", "}", "return", "new", "TextCha...
Returns a new TextCharacter with the same colors and modifiers but a different underlying character @param character Character the copy should have @return Copy of this TextCharacter with different underlying character
[ "Returns", "a", "new", "TextCharacter", "with", "the", "same", "colors", "and", "modifiers", "but", "a", "different", "underlying", "character" ]
train
https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/TextCharacter.java#L212-L218
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/formats/html/AbstractProfileIndexWriter.java
AbstractProfileIndexWriter.buildProfileIndexFile
protected void buildProfileIndexFile(String title, boolean includeScript) throws IOException { """ Generate and prints the contents in the profile index file. Call appropriate methods from the sub-class in order to generate Frame or Non Frame format. @param title the title of the window. @param includeScript...
java
protected void buildProfileIndexFile(String title, boolean includeScript) throws IOException { String windowOverview = configuration.getText(title); Content body = getBody(includeScript, getWindowTitle(windowOverview)); addNavigationBarHeader(body); addOverviewHeader(body); addIn...
[ "protected", "void", "buildProfileIndexFile", "(", "String", "title", ",", "boolean", "includeScript", ")", "throws", "IOException", "{", "String", "windowOverview", "=", "configuration", ".", "getText", "(", "title", ")", ";", "Content", "body", "=", "getBody", ...
Generate and prints the contents in the profile index file. Call appropriate methods from the sub-class in order to generate Frame or Non Frame format. @param title the title of the window. @param includeScript boolean set true if windowtitle script is to be included
[ "Generate", "and", "prints", "the", "contents", "in", "the", "profile", "index", "file", ".", "Call", "appropriate", "methods", "from", "the", "sub", "-", "class", "in", "order", "to", "generate", "Frame", "or", "Non", "Frame", "format", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/formats/html/AbstractProfileIndexWriter.java#L118-L128
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveDataset.java
HiveDataset.extractTokenValueFromEntity
@VisibleForTesting protected static String extractTokenValueFromEntity(String sourceEntity, String sourceTemplate, String token) { """ * Extract token value from source entity, where token value is represented by a token in the source entity. Eg. Source Entity : prod_tableName_avro Source Template: prod_$...
java
@VisibleForTesting protected static String extractTokenValueFromEntity(String sourceEntity, String sourceTemplate, String token) { Preconditions.checkArgument(StringUtils.isNotBlank(sourceEntity), "Source entity should not be blank"); Preconditions.checkArgument(StringUtils.isNotBlank(sourceTemplate), "Source...
[ "@", "VisibleForTesting", "protected", "static", "String", "extractTokenValueFromEntity", "(", "String", "sourceEntity", ",", "String", "sourceTemplate", ",", "String", "token", ")", "{", "Preconditions", ".", "checkArgument", "(", "StringUtils", ".", "isNotBlank", "(...
* Extract token value from source entity, where token value is represented by a token in the source entity. Eg. Source Entity : prod_tableName_avro Source Template: prod_$LOGICAL_TABLE_avro Token : $LOGICAL_TABLE Extracted Value: tableName @param sourceEntity Source entity (typically a table or databas...
[ "*", "Extract", "token", "value", "from", "source", "entity", "where", "token", "value", "is", "represented", "by", "a", "token", "in", "the", "source", "entity", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveDataset.java#L240-L253
openengsb/openengsb
components/ekb/common/src/main/java/org/openengsb/core/ekb/common/EDBConverter.java
EDBConverter.filterEngineeringObjectInformation
private void filterEngineeringObjectInformation(EDBObject object, Class<?> model) { """ Filters the reference prefix values added in the model to EDBObject conversion out of the EDBObject """ if (!AdvancedModelWrapper.isEngineeringObjectClass(model)) { return; } Iterator<Str...
java
private void filterEngineeringObjectInformation(EDBObject object, Class<?> model) { if (!AdvancedModelWrapper.isEngineeringObjectClass(model)) { return; } Iterator<String> keys = object.keySet().iterator(); while (keys.hasNext()) { if (keys.next().startsWith(REFER...
[ "private", "void", "filterEngineeringObjectInformation", "(", "EDBObject", "object", ",", "Class", "<", "?", ">", "model", ")", "{", "if", "(", "!", "AdvancedModelWrapper", ".", "isEngineeringObjectClass", "(", "model", ")", ")", "{", "return", ";", "}", "Iter...
Filters the reference prefix values added in the model to EDBObject conversion out of the EDBObject
[ "Filters", "the", "reference", "prefix", "values", "added", "in", "the", "model", "to", "EDBObject", "conversion", "out", "of", "the", "EDBObject" ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/common/src/main/java/org/openengsb/core/ekb/common/EDBConverter.java#L488-L498
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FacesImpl.java
FacesImpl.detectWithStreamWithServiceResponseAsync
public Observable<ServiceResponse<List<DetectedFace>>> detectWithStreamWithServiceResponseAsync(byte[] image, DetectWithStreamOptionalParameter detectWithStreamOptionalParameter) { """ Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes. @param image...
java
public Observable<ServiceResponse<List<DetectedFace>>> detectWithStreamWithServiceResponseAsync(byte[] image, DetectWithStreamOptionalParameter detectWithStreamOptionalParameter) { if (this.client.azureRegion() == null) { throw new IllegalArgumentException("Parameter this.client.azureRegion() is req...
[ "public", "Observable", "<", "ServiceResponse", "<", "List", "<", "DetectedFace", ">", ">", ">", "detectWithStreamWithServiceResponseAsync", "(", "byte", "[", "]", "image", ",", "DetectWithStreamOptionalParameter", "detectWithStreamOptionalParameter", ")", "{", "if", "(...
Detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and attributes. @param image An image stream. @param detectWithStreamOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if paramete...
[ "Detect", "human", "faces", "in", "an", "image", "and", "returns", "face", "locations", "and", "optionally", "with", "faceIds", "landmarks", "and", "attributes", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FacesImpl.java#L967-L979
deeplearning4j/deeplearning4j
datavec/datavec-arrow/src/main/java/org/datavec/arrow/ArrowConverter.java
ArrowConverter.toArrowColumnsStringTimeSeries
public static List<FieldVector> toArrowColumnsStringTimeSeries(final BufferAllocator bufferAllocator, final Schema schema, List<List<List<String>>> dataVecRecord) { """ Convert a...
java
public static List<FieldVector> toArrowColumnsStringTimeSeries(final BufferAllocator bufferAllocator, final Schema schema, List<List<List<String>>> dataVecRecord) { return toA...
[ "public", "static", "List", "<", "FieldVector", ">", "toArrowColumnsStringTimeSeries", "(", "final", "BufferAllocator", "bufferAllocator", ",", "final", "Schema", "schema", ",", "List", "<", "List", "<", "List", "<", "String", ">", ">", ">", "dataVecRecord", ")"...
Convert a set of input strings to arrow columns for a time series. @param bufferAllocator the buffer allocator to use @param schema the schema to use @param dataVecRecord the collection of input strings to process @return the created vectors
[ "Convert", "a", "set", "of", "input", "strings", "to", "arrow", "columns", "for", "a", "time", "series", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-arrow/src/main/java/org/datavec/arrow/ArrowConverter.java#L677-L682
jakenjarvis/Android-OrmLiteContentProvider
ormlite-content-provider-library/src/com/tojc/ormlite/android/OrmLiteDefaultContentProvider.java
OrmLiteDefaultContentProvider.onBulkInsert
public Uri onBulkInsert(T helper, SQLiteDatabase db, MatcherPattern target, InsertParameters parameter) { """ You implement this method. At the timing of bulkInsert() method, which calls the onBulkInsert(). Start the transaction, will be called for each record. @param helper This is a helper object. It is the s...
java
public Uri onBulkInsert(T helper, SQLiteDatabase db, MatcherPattern target, InsertParameters parameter) { return onInsert(helper, db, target, parameter); }
[ "public", "Uri", "onBulkInsert", "(", "T", "helper", ",", "SQLiteDatabase", "db", ",", "MatcherPattern", "target", ",", "InsertParameters", "parameter", ")", "{", "return", "onInsert", "(", "helper", ",", "db", ",", "target", ",", "parameter", ")", ";", "}" ...
You implement this method. At the timing of bulkInsert() method, which calls the onBulkInsert(). Start the transaction, will be called for each record. @param helper This is a helper object. It is the same as one that can be retrieved by this.getHelper(). @param db This is a SQLiteDatabase object. Return the object obt...
[ "You", "implement", "this", "method", ".", "At", "the", "timing", "of", "bulkInsert", "()", "method", "which", "calls", "the", "onBulkInsert", "()", ".", "Start", "the", "transaction", "will", "be", "called", "for", "each", "record", "." ]
train
https://github.com/jakenjarvis/Android-OrmLiteContentProvider/blob/8f102f0743b308c9f58d43639e98f832fd951985/ormlite-content-provider-library/src/com/tojc/ormlite/android/OrmLiteDefaultContentProvider.java#L398-L400
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java
AbstractPipeline.evaluateToArrayNode
@SuppressWarnings("unchecked") public final Node<E_OUT> evaluateToArrayNode(IntFunction<E_OUT[]> generator) { """ Collect the elements output from the pipeline stage. @param generator the array generator to be used to create array instances @return a flat array-backed Node that holds the collected output e...
java
@SuppressWarnings("unchecked") public final Node<E_OUT> evaluateToArrayNode(IntFunction<E_OUT[]> generator) { if (linkedOrConsumed) throw new IllegalStateException(MSG_STREAM_LINKED); linkedOrConsumed = true; // If the last intermediate operation is stateful then // eval...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "Node", "<", "E_OUT", ">", "evaluateToArrayNode", "(", "IntFunction", "<", "E_OUT", "[", "]", ">", "generator", ")", "{", "if", "(", "linkedOrConsumed", ")", "throw", "new", "IllegalStateEx...
Collect the elements output from the pipeline stage. @param generator the array generator to be used to create array instances @return a flat array-backed Node that holds the collected output elements
[ "Collect", "the", "elements", "output", "from", "the", "pipeline", "stage", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java#L247-L266
Jasig/uPortal
uPortal-spring/src/main/java/org/springframework/web/client/interceptors/ZeroLeggedOAuthInterceptor.java
ZeroLeggedOAuthInterceptor.getConsumer
private synchronized RealmOAuthConsumer getConsumer() { """ Get the OAuthConsumer. Will initialize it lazily. @return the OAuthConsumer object. """ // could just inject these, but I kinda prefer pushing this out // to the properties file... if (consumer == null) { OAuthSe...
java
private synchronized RealmOAuthConsumer getConsumer() { // could just inject these, but I kinda prefer pushing this out // to the properties file... if (consumer == null) { OAuthServiceProvider serviceProvider = new OAuthServiceProvider("", "", ""); String realm = ...
[ "private", "synchronized", "RealmOAuthConsumer", "getConsumer", "(", ")", "{", "// could just inject these, but I kinda prefer pushing this out", "// to the properties file...", "if", "(", "consumer", "==", "null", ")", "{", "OAuthServiceProvider", "serviceProvider", "=", "new"...
Get the OAuthConsumer. Will initialize it lazily. @return the OAuthConsumer object.
[ "Get", "the", "OAuthConsumer", ".", "Will", "initialize", "it", "lazily", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-spring/src/main/java/org/springframework/web/client/interceptors/ZeroLeggedOAuthInterceptor.java#L98-L128
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readCostRateTables
private void readCostRateTables(Resource resource, Rates rates) { """ Reads the cost rate tables from the file. @param resource parent resource @param rates XML cot rate tables """ if (rates == null) { CostRateTable table = new CostRateTable(); table.add(CostRateTableEntry.DEF...
java
private void readCostRateTables(Resource resource, Rates rates) { if (rates == null) { CostRateTable table = new CostRateTable(); table.add(CostRateTableEntry.DEFAULT_ENTRY); resource.setCostRateTable(0, table); table = new CostRateTable(); table.add(CostRate...
[ "private", "void", "readCostRateTables", "(", "Resource", "resource", ",", "Rates", "rates", ")", "{", "if", "(", "rates", "==", "null", ")", "{", "CostRateTable", "table", "=", "new", "CostRateTable", "(", ")", ";", "table", ".", "add", "(", "CostRateTabl...
Reads the cost rate tables from the file. @param resource parent resource @param rates XML cot rate tables
[ "Reads", "the", "cost", "rate", "tables", "from", "the", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1023-L1078
chhh/MSFTBX
MSFileToolbox/src/main/java/umich/ms/util/ZlibInflater.java
ZlibInflater.zlibUncompressBuffer
public static ByteArrayHolder zlibUncompressBuffer(byte[] bytes, int length, Integer uncompressedLen) throws IOException, DataFormatException, FileParsingException { """ Inflates zLib compressed byte[]. @param bytes zLib compressed bytes in a holder, with properly set position @param length length ...
java
public static ByteArrayHolder zlibUncompressBuffer(byte[] bytes, int length, Integer uncompressedLen) throws IOException, DataFormatException, FileParsingException { Inflater inflater = new Inflater(); inflater.setInput(bytes, 0, length); int bufSize = uncompressedLen == null ? length * 2 : unc...
[ "public", "static", "ByteArrayHolder", "zlibUncompressBuffer", "(", "byte", "[", "]", "bytes", ",", "int", "length", ",", "Integer", "uncompressedLen", ")", "throws", "IOException", ",", "DataFormatException", ",", "FileParsingException", "{", "Inflater", "inflater", ...
Inflates zLib compressed byte[]. @param bytes zLib compressed bytes in a holder, with properly set position @param length length of data in the input array to be used @param uncompressedLen length of data in bytes when uncompressed. Optional. @return inflated byte array, which is borrowed from pool ({@link #getPool() ...
[ "Inflates", "zLib", "compressed", "byte", "[]", "." ]
train
https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/util/ZlibInflater.java#L75-L112
hellosign/hellosign-java-sdk
src/main/java/com/hellosign/sdk/resource/AbstractRequest.java
AbstractRequest.addDocument
public void addDocument(Document doc, int order) throws HelloSignException { """ Adds a Document to the signature request at the specific order. @param doc Document @param order int @throws HelloSignException thrown if null is provided or there is a problem attaching the Document. """ if (doc == ...
java
public void addDocument(Document doc, int order) throws HelloSignException { if (doc == null) { throw new HelloSignException("Document cannot be null"); } try { documents.add(order, doc); } catch (Exception ex) { throw new HelloSignException(ex); ...
[ "public", "void", "addDocument", "(", "Document", "doc", ",", "int", "order", ")", "throws", "HelloSignException", "{", "if", "(", "doc", "==", "null", ")", "{", "throw", "new", "HelloSignException", "(", "\"Document cannot be null\"", ")", ";", "}", "try", ...
Adds a Document to the signature request at the specific order. @param doc Document @param order int @throws HelloSignException thrown if null is provided or there is a problem attaching the Document.
[ "Adds", "a", "Document", "to", "the", "signature", "request", "at", "the", "specific", "order", "." ]
train
https://github.com/hellosign/hellosign-java-sdk/blob/08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1/src/main/java/com/hellosign/sdk/resource/AbstractRequest.java#L287-L296
policeman-tools/forbidden-apis
src/main/java/de/thetaphi/forbiddenapis/Checker.java
Checker.parseSignaturesFile
public void parseSignaturesFile(InputStream in, String name) throws IOException,ParseException { """ Reads a list of API signatures. Closes the Reader when done (on Exception, too)! """ forbiddenSignatures.parseSignaturesStream(in, name); }
java
public void parseSignaturesFile(InputStream in, String name) throws IOException,ParseException { forbiddenSignatures.parseSignaturesStream(in, name); }
[ "public", "void", "parseSignaturesFile", "(", "InputStream", "in", ",", "String", "name", ")", "throws", "IOException", ",", "ParseException", "{", "forbiddenSignatures", ".", "parseSignaturesStream", "(", "in", ",", "name", ")", ";", "}" ]
Reads a list of API signatures. Closes the Reader when done (on Exception, too)!
[ "Reads", "a", "list", "of", "API", "signatures", ".", "Closes", "the", "Reader", "when", "done", "(", "on", "Exception", "too", ")", "!" ]
train
https://github.com/policeman-tools/forbidden-apis/blob/df5f00c6bb779875ec6bae967f7cec96670b27d9/src/main/java/de/thetaphi/forbiddenapis/Checker.java#L324-L326
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/ScrollBarButtonPainter.java
ScrollBarButtonPainter.paintBackgroundTogetherIncrease
private void paintBackgroundTogetherIncrease(Graphics2D g, int width, int height) { """ DOCUMENT ME! @param g DOCUMENT ME! @param width DOCUMENT ME! @param height DOCUMENT ME! """ Shape s = shapeGenerator.createScrollButtonTogetherIncrease(0, 0, width, height); dropShadow.fill(g, s)...
java
private void paintBackgroundTogetherIncrease(Graphics2D g, int width, int height) { Shape s = shapeGenerator.createScrollButtonTogetherIncrease(0, 0, width, height); dropShadow.fill(g, s); fillScrollBarButtonInteriorColors(g, s, isIncrease, buttonsTogether); }
[ "private", "void", "paintBackgroundTogetherIncrease", "(", "Graphics2D", "g", ",", "int", "width", ",", "int", "height", ")", "{", "Shape", "s", "=", "shapeGenerator", ".", "createScrollButtonTogetherIncrease", "(", "0", ",", "0", ",", "width", ",", "height", ...
DOCUMENT ME! @param g DOCUMENT ME! @param width DOCUMENT ME! @param height DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/ScrollBarButtonPainter.java#L283-L288
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/AppsImpl.java
AppsImpl.updateSettings
public OperationStatus updateSettings(UUID appId, UpdateSettingsOptionalParameter updateSettingsOptionalParameter) { """ Updates the application settings. @param appId The application ID. @param updateSettingsOptionalParameter the object representing the optional parameters to be set before calling this API @...
java
public OperationStatus updateSettings(UUID appId, UpdateSettingsOptionalParameter updateSettingsOptionalParameter) { return updateSettingsWithServiceResponseAsync(appId, updateSettingsOptionalParameter).toBlocking().single().body(); }
[ "public", "OperationStatus", "updateSettings", "(", "UUID", "appId", ",", "UpdateSettingsOptionalParameter", "updateSettingsOptionalParameter", ")", "{", "return", "updateSettingsWithServiceResponseAsync", "(", "appId", ",", "updateSettingsOptionalParameter", ")", ".", "toBlock...
Updates the application settings. @param appId The application ID. @param updateSettingsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is r...
[ "Updates", "the", "application", "settings", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/AppsImpl.java#L1310-L1312
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WLabel.java
WLabel.setText
public void setText(final String text, final Serializable... args) { """ Sets the label's text. @param text the label text, using {@link MessageFormat} syntax. @param args optional arguments for the message format string. """ Serializable currText = getComponentModel().text; Serializable textToBeSet = ...
java
public void setText(final String text, final Serializable... args) { Serializable currText = getComponentModel().text; Serializable textToBeSet = I18nUtilities.asMessage(text, args); if (!Objects.equals(textToBeSet, currText)) { getOrCreateComponentModel().text = textToBeSet; } }
[ "public", "void", "setText", "(", "final", "String", "text", ",", "final", "Serializable", "...", "args", ")", "{", "Serializable", "currText", "=", "getComponentModel", "(", ")", ".", "text", ";", "Serializable", "textToBeSet", "=", "I18nUtilities", ".", "asM...
Sets the label's text. @param text the label text, using {@link MessageFormat} syntax. @param args optional arguments for the message format string.
[ "Sets", "the", "label", "s", "text", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WLabel.java#L113-L120
Netflix/zuul
zuul-core/src/main/java/com/netflix/netty/common/Http2ConnectionCloseHandler.java
Http2ConnectionCloseHandler.gracefullyWithDelay
protected void gracefullyWithDelay(ChannelHandlerContext ctx, Channel channel, ChannelPromise promise) { """ WARNING: Found the OkHttp client gets confused by this behaviour (it ends up putting itself in a bad shutdown state after receiving the first goaway frame, and then dropping any inflight responses but also...
java
protected void gracefullyWithDelay(ChannelHandlerContext ctx, Channel channel, ChannelPromise promise) { // See javadoc for explanation of why this may be disabled. if (! ALLOW_GRACEFUL_DELAYED.get()) { gracefully(channel, promise); return; } if (isAlreadyClo...
[ "protected", "void", "gracefullyWithDelay", "(", "ChannelHandlerContext", "ctx", ",", "Channel", "channel", ",", "ChannelPromise", "promise", ")", "{", "// See javadoc for explanation of why this may be disabled.", "if", "(", "!", "ALLOW_GRACEFUL_DELAYED", ".", "get", "(", ...
WARNING: Found the OkHttp client gets confused by this behaviour (it ends up putting itself in a bad shutdown state after receiving the first goaway frame, and then dropping any inflight responses but also timing out waiting for them). And worried that other http/2 stacks may be similar, so for now we should NOT use t...
[ "WARNING", ":", "Found", "the", "OkHttp", "client", "gets", "confused", "by", "this", "behaviour", "(", "it", "ends", "up", "putting", "itself", "in", "a", "bad", "shutdown", "state", "after", "receiving", "the", "first", "goaway", "frame", "and", "then", ...
train
https://github.com/Netflix/zuul/blob/01bc777cf05e3522d37c9ed902ae13eb38a19692/zuul-core/src/main/java/com/netflix/netty/common/Http2ConnectionCloseHandler.java#L149-L183
wildfly/wildfly-maven-plugin
plugin/src/main/java/org/wildfly/plugin/deployment/resource/AddResourceMojo.java
AddResourceMojo.parseAddress
private ModelNode parseAddress(final String profileName, final String inputAddress) { """ Parses the comma delimited address into model nodes. @param profileName the profile name for the domain or {@code null} if not a domain @param inputAddress the address. @return a collection of the address nodes. "...
java
private ModelNode parseAddress(final String profileName, final String inputAddress) { final ModelNode result = new ModelNode(); if (profileName != null) { result.add(ServerOperations.PROFILE, profileName); } String[] parts = inputAddress.split(","); for (String part :...
[ "private", "ModelNode", "parseAddress", "(", "final", "String", "profileName", ",", "final", "String", "inputAddress", ")", "{", "final", "ModelNode", "result", "=", "new", "ModelNode", "(", ")", ";", "if", "(", "profileName", "!=", "null", ")", "{", "result...
Parses the comma delimited address into model nodes. @param profileName the profile name for the domain or {@code null} if not a domain @param inputAddress the address. @return a collection of the address nodes.
[ "Parses", "the", "comma", "delimited", "address", "into", "model", "nodes", "." ]
train
https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/deployment/resource/AddResourceMojo.java#L287-L301
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/CustomerNoteUrl.java
CustomerNoteUrl.getAccountNotesUrl
public static MozuUrl getAccountNotesUrl(Integer accountId, String filter, Integer pageSize, String responseFields, String sortBy, Integer startIndex) { """ Get Resource Url for GetAccountNotes @param accountId Unique identifier of the customer account. @param filter A set of filter expressions representing the ...
java
public static MozuUrl getAccountNotesUrl(Integer accountId, String filter, Integer pageSize, String responseFields, String sortBy, Integer startIndex) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/{accountId}/notes?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&filter={f...
[ "public", "static", "MozuUrl", "getAccountNotesUrl", "(", "Integer", "accountId", ",", "String", "filter", ",", "Integer", "pageSize", ",", "String", "responseFields", ",", "String", "sortBy", ",", "Integer", "startIndex", ")", "{", "UrlFormatter", "formatter", "=...
Get Resource Url for GetAccountNotes @param accountId Unique identifier of the customer account. @param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/api-guides/sorting-filtering.htm) for a list of su...
[ "Get", "Resource", "Url", "for", "GetAccountNotes" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/customer/accounts/CustomerNoteUrl.java#L42-L52
termsuite/termsuite-core
src/main/java/fr/univnantes/termsuite/utils/TermOccurrenceUtils.java
TermOccurrenceUtils.hasOverlappingOffsets
public static boolean hasOverlappingOffsets(TermOccurrence theOcc, Collection<TermOccurrence> theOccCollection) { """ True if an occurrence set contains any element overlapping with the param occurrence. @param theOcc @param theOccCollection @return """ for(TermOccurrence o:theOccCollection) if(areO...
java
public static boolean hasOverlappingOffsets(TermOccurrence theOcc, Collection<TermOccurrence> theOccCollection) { for(TermOccurrence o:theOccCollection) if(areOffsetsOverlapping(theOcc, o)) return true; return false; }
[ "public", "static", "boolean", "hasOverlappingOffsets", "(", "TermOccurrence", "theOcc", ",", "Collection", "<", "TermOccurrence", ">", "theOccCollection", ")", "{", "for", "(", "TermOccurrence", "o", ":", "theOccCollection", ")", "if", "(", "areOffsetsOverlapping", ...
True if an occurrence set contains any element overlapping with the param occurrence. @param theOcc @param theOccCollection @return
[ "True", "if", "an", "occurrence", "set", "contains", "any", "element", "overlapping", "with", "the", "param", "occurrence", "." ]
train
https://github.com/termsuite/termsuite-core/blob/731e5d0bc7c14180713c01a9c7dffe1925f26130/src/main/java/fr/univnantes/termsuite/utils/TermOccurrenceUtils.java#L135-L140
daimajia/AndroidImageSlider
library/src/main/java/com/daimajia/slider/library/Transformers/BaseTransformer.java
BaseTransformer.onPostTransform
protected void onPostTransform(View view, float position) { """ Called each {@link #transformPage(View, float)} call after {@link #onTransform(View, float)} is finished. @param view @param position """ if(mCustomAnimationInterface != null){ if(position == -1 || position == 1){ ...
java
protected void onPostTransform(View view, float position) { if(mCustomAnimationInterface != null){ if(position == -1 || position == 1){ mCustomAnimationInterface.onCurrentItemDisappear(view); isApp = true; }else if(position == 0){ mCustomAn...
[ "protected", "void", "onPostTransform", "(", "View", "view", ",", "float", "position", ")", "{", "if", "(", "mCustomAnimationInterface", "!=", "null", ")", "{", "if", "(", "position", "==", "-", "1", "||", "position", "==", "1", ")", "{", "mCustomAnimation...
Called each {@link #transformPage(View, float)} call after {@link #onTransform(View, float)} is finished. @param view @param position
[ "Called", "each", "{", "@link", "#transformPage", "(", "View", "float", ")", "}", "call", "after", "{", "@link", "#onTransform", "(", "View", "float", ")", "}", "is", "finished", "." ]
train
https://github.com/daimajia/AndroidImageSlider/blob/e318cabdef668de985efdcc45ca304e2ac6f58b5/library/src/main/java/com/daimajia/slider/library/Transformers/BaseTransformer.java#L129-L144
GoSimpleLLC/nbvcxz
src/main/java/me/gosimple/nbvcxz/Nbvcxz.java
Nbvcxz.isRandom
private boolean isRandom(final String password, final List<Match> matches) { """ Method to determine if the password should be considered random, and to just use brute force matches. <p> We determine a password to be random if the matches cover less than 50% of the password, or if they cover less than 80% but t...
java
private boolean isRandom(final String password, final List<Match> matches) { int matched_length = 0; int max_matched_length = 0; for (Match match : matches) { if (!(match instanceof BruteForceMatch)) { matched_length += match.getLength(); ...
[ "private", "boolean", "isRandom", "(", "final", "String", "password", ",", "final", "List", "<", "Match", ">", "matches", ")", "{", "int", "matched_length", "=", "0", ";", "int", "max_matched_length", "=", "0", ";", "for", "(", "Match", "match", ":", "ma...
Method to determine if the password should be considered random, and to just use brute force matches. <p> We determine a password to be random if the matches cover less than 50% of the password, or if they cover less than 80% but the max length for a match is no more than 25% of the total length of the password. @para...
[ "Method", "to", "determine", "if", "the", "password", "should", "be", "considered", "random", "and", "to", "just", "use", "brute", "force", "matches", ".", "<p", ">", "We", "determine", "a", "password", "to", "be", "random", "if", "the", "matches", "cover"...
train
https://github.com/GoSimpleLLC/nbvcxz/blob/a86fb24680e646efdf78d6fda9d68a5410145f56/src/main/java/me/gosimple/nbvcxz/Nbvcxz.java#L495-L523
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java
Constraints.lteProperty
public PropertyConstraint lteProperty(String propertyName, String otherPropertyName) { """ Apply a "less than or equal to" constraint to two properties. @param propertyName The first property @param otherPropertyName The other property @return The constraint """ return valueProperties(propertyName...
java
public PropertyConstraint lteProperty(String propertyName, String otherPropertyName) { return valueProperties(propertyName, LessThanEqualTo.instance(), otherPropertyName); }
[ "public", "PropertyConstraint", "lteProperty", "(", "String", "propertyName", ",", "String", "otherPropertyName", ")", "{", "return", "valueProperties", "(", "propertyName", ",", "LessThanEqualTo", ".", "instance", "(", ")", ",", "otherPropertyName", ")", ";", "}" ]
Apply a "less than or equal to" constraint to two properties. @param propertyName The first property @param otherPropertyName The other property @return The constraint
[ "Apply", "a", "less", "than", "or", "equal", "to", "constraint", "to", "two", "properties", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/rules/constraint/Constraints.java#L886-L888
spring-projects/spring-social-facebook
spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java
FqlResult.getList
public <T> List<T> getList(String fieldName, FqlResultMapper<T> mapper) { """ Returns the value of the identified field as an object mapped by a given {@link FqlResultMapper}. @param fieldName the name of the field @param mapper an {@link FqlResultMapper} used to map the object date into a specific type. @param...
java
public <T> List<T> getList(String fieldName, FqlResultMapper<T> mapper) { if (!hasValue(fieldName)) { return null; } try { List<T> response = new ArrayList<T>(); @SuppressWarnings("unchecked") List<Map<String, Object>> arrayItems = (List<Map<String, Object>>) resultMap.get(fieldName); for (Map<St...
[ "public", "<", "T", ">", "List", "<", "T", ">", "getList", "(", "String", "fieldName", ",", "FqlResultMapper", "<", "T", ">", "mapper", ")", "{", "if", "(", "!", "hasValue", "(", "fieldName", ")", ")", "{", "return", "null", ";", "}", "try", "{", ...
Returns the value of the identified field as an object mapped by a given {@link FqlResultMapper}. @param fieldName the name of the field @param mapper an {@link FqlResultMapper} used to map the object date into a specific type. @param <T> the Java type to bind the Facebook object to @return the value of the field as li...
[ "Returns", "the", "value", "of", "the", "identified", "field", "as", "an", "object", "mapped", "by", "a", "given", "{" ]
train
https://github.com/spring-projects/spring-social-facebook/blob/ae2234d94367eaa3adbba251ec7790d5ba7ffa41/spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResult.java#L157-L172
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousWaitOnConcurrentObject.java
SuspiciousWaitOnConcurrentObject.sawOpcode
@Override public void sawOpcode(int seen) { """ implements the visitor to look for calls to wait, on java.util.concurrent classes that define await. @param seen the opcode of the currently visited instruction """ try { stack.precomputation(this); if ((seen != Const.INVO...
java
@Override public void sawOpcode(int seen) { try { stack.precomputation(this); if ((seen != Const.INVOKEVIRTUAL) || !"wait".equals(getNameConstantOperand()) || stack.getStackDepth() == 0) { return; } JavaClass cls = stack.getStackItem(0).getJav...
[ "@", "Override", "public", "void", "sawOpcode", "(", "int", "seen", ")", "{", "try", "{", "stack", ".", "precomputation", "(", "this", ")", ";", "if", "(", "(", "seen", "!=", "Const", ".", "INVOKEVIRTUAL", ")", "||", "!", "\"wait\"", ".", "equals", "...
implements the visitor to look for calls to wait, on java.util.concurrent classes that define await. @param seen the opcode of the currently visited instruction
[ "implements", "the", "visitor", "to", "look", "for", "calls", "to", "wait", "on", "java", ".", "util", ".", "concurrent", "classes", "that", "define", "await", "." ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/SuspiciousWaitOnConcurrentObject.java#L93-L114
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/MappedParametrizedObjectEntry.java
MappedParametrizedObjectEntry.getParameterInteger
public Integer getParameterInteger(String name, Integer defaultValue) { """ Parse named parameter as Integer. @param name parameter name @param defaultValue default Integer value @return Integer value """ String value = getParameterValue(name, null); if (value != null) { try ...
java
public Integer getParameterInteger(String name, Integer defaultValue) { String value = getParameterValue(name, null); if (value != null) { try { return StringNumberParser.parseInt(value); } catch (NumberFormatException e) { if (L...
[ "public", "Integer", "getParameterInteger", "(", "String", "name", ",", "Integer", "defaultValue", ")", "{", "String", "value", "=", "getParameterValue", "(", "name", ",", "null", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "try", "{", "return", ...
Parse named parameter as Integer. @param name parameter name @param defaultValue default Integer value @return Integer value
[ "Parse", "named", "parameter", "as", "Integer", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/MappedParametrizedObjectEntry.java#L135-L155
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/GridLayoutExample.java
GridLayoutExample.addBoxes
private static void addBoxes(final WPanel panel, final int amount) { """ Adds a set of boxes to the given panel. @param panel the panel to add the boxes to. @param amount the number of boxes to add. """ for (int i = 1; i <= amount; i++) { panel.add(new BoxComponent(String.valueOf(i))); } }
java
private static void addBoxes(final WPanel panel, final int amount) { for (int i = 1; i <= amount; i++) { panel.add(new BoxComponent(String.valueOf(i))); } }
[ "private", "static", "void", "addBoxes", "(", "final", "WPanel", "panel", ",", "final", "int", "amount", ")", "{", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "amount", ";", "i", "++", ")", "{", "panel", ".", "add", "(", "new", "BoxComponent"...
Adds a set of boxes to the given panel. @param panel the panel to add the boxes to. @param amount the number of boxes to add.
[ "Adds", "a", "set", "of", "boxes", "to", "the", "given", "panel", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/layout/GridLayoutExample.java#L133-L137
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Getter.java
Getter.getView
public <T extends TextView> T getView(Class<T> classToFilterBy, String text, boolean onlyVisible) { """ Returns a {@code View} that shows a given text, from the list of current {@code View}s of the specified type. @param classToFilterBy which {@code View}s to choose from @param text the text that the view show...
java
public <T extends TextView> T getView(Class<T> classToFilterBy, String text, boolean onlyVisible) { T viewToReturn = (T) waiter.waitForText(classToFilterBy, text, 0, Timeout.getSmallTimeout(), false, onlyVisible, false); if(viewToReturn == null) Assert.fail(classToFilterBy.getSimpleName() + " with text: '" + t...
[ "public", "<", "T", "extends", "TextView", ">", "T", "getView", "(", "Class", "<", "T", ">", "classToFilterBy", ",", "String", "text", ",", "boolean", "onlyVisible", ")", "{", "T", "viewToReturn", "=", "(", "T", ")", "waiter", ".", "waitForText", "(", ...
Returns a {@code View} that shows a given text, from the list of current {@code View}s of the specified type. @param classToFilterBy which {@code View}s to choose from @param text the text that the view shows @param onlyVisible {@code true} if only visible texts on the screen should be returned @return a {@code View} ...
[ "Returns", "a", "{", "@code", "View", "}", "that", "shows", "a", "given", "text", "from", "the", "list", "of", "current", "{", "@code", "View", "}", "s", "of", "the", "specified", "type", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Getter.java#L63-L71
osglworks/java-mvc
src/main/java/org/osgl/mvc/result/BadGateway.java
BadGateway.of
public static BadGateway of(Throwable cause) { """ Returns a static BadGateway instance and set the {@link #payload} thread local with cause specified. When calling the instance on {@link #getMessage()} method, it will return whatever stored in the {@link #payload} thread local @param cause the cause @ret...
java
public static BadGateway of(Throwable cause) { if (_localizedErrorMsg()) { return of(cause, defaultMessage(BAD_GATEWAY)); } else { touchPayload().cause(cause); return _INSTANCE; } }
[ "public", "static", "BadGateway", "of", "(", "Throwable", "cause", ")", "{", "if", "(", "_localizedErrorMsg", "(", ")", ")", "{", "return", "of", "(", "cause", ",", "defaultMessage", "(", "BAD_GATEWAY", ")", ")", ";", "}", "else", "{", "touchPayload", "(...
Returns a static BadGateway instance and set the {@link #payload} thread local with cause specified. When calling the instance on {@link #getMessage()} method, it will return whatever stored in the {@link #payload} thread local @param cause the cause @return a static BadGateway instance as described above
[ "Returns", "a", "static", "BadGateway", "instance", "and", "set", "the", "{", "@link", "#payload", "}", "thread", "local", "with", "cause", "specified", "." ]
train
https://github.com/osglworks/java-mvc/blob/4d2b2ec40498ac6ee7040c0424377cbeacab124b/src/main/java/org/osgl/mvc/result/BadGateway.java#L123-L130
jenkinsci/support-core-plugin
src/main/java/com/cloudbees/jenkins/support/util/WordReplacer.java
WordReplacer.replaceWordsIgnoreCase
public static String replaceWordsIgnoreCase(String input, String[] words, String[] replaces) { """ Replace all words in the input by the replaces. The replacements happens only if the texts to replace are not part of a greater word, that is, if the text is a whole word, separated by non {@link Character#isLetterO...
java
public static String replaceWordsIgnoreCase(String input, String[] words, String[] replaces) { StringBuilder sb = new StringBuilder(input); replaceWordsIgnoreCase(sb, words, replaces); return sb.toString(); }
[ "public", "static", "String", "replaceWordsIgnoreCase", "(", "String", "input", ",", "String", "[", "]", "words", ",", "String", "[", "]", "replaces", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "input", ")", ";", "replaceWordsIgnoreCase...
Replace all words in the input by the replaces. The replacements happens only if the texts to replace are not part of a greater word, that is, if the text is a whole word, separated by non {@link Character#isLetterOrDigit(char)} characters. @param input the text where the replacements take place @param words the words ...
[ "Replace", "all", "words", "in", "the", "input", "by", "the", "replaces", ".", "The", "replacements", "happens", "only", "if", "the", "texts", "to", "replace", "are", "not", "part", "of", "a", "greater", "word", "that", "is", "if", "the", "text", "is", ...
train
https://github.com/jenkinsci/support-core-plugin/blob/bcbe1dfd5bf48ac89903645cd48ed897c1a04688/src/main/java/com/cloudbees/jenkins/support/util/WordReplacer.java#L28-L32
lucee/Lucee
core/src/main/java/lucee/runtime/functions/decision/IsValid.java
IsValid.call
public static boolean call(PageContext pc, String type, Object value) throws ExpressionException { """ check for many diff types @param pc @param type @param value @return @throws ExpressionException """ type = type.trim(); if ("range".equalsIgnoreCase(type)) throw new FunctionException(pc, "isValid"...
java
public static boolean call(PageContext pc, String type, Object value) throws ExpressionException { type = type.trim(); if ("range".equalsIgnoreCase(type)) throw new FunctionException(pc, "isValid", 1, "type", "for [range] you have to define a min and max value"); if ("regex".equalsIgnoreCase(type) || "regular_expr...
[ "public", "static", "boolean", "call", "(", "PageContext", "pc", ",", "String", "type", ",", "Object", "value", ")", "throws", "ExpressionException", "{", "type", "=", "type", ".", "trim", "(", ")", ";", "if", "(", "\"range\"", ".", "equalsIgnoreCase", "("...
check for many diff types @param pc @param type @param value @return @throws ExpressionException
[ "check", "for", "many", "diff", "types" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/functions/decision/IsValid.java#L46-L55
lucmoreau/ProvToolbox
prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java
ProvFactory.newEntity
public Entity newEntity(QualifiedName id, String label) { """ Creates a new {@link Entity} with provided identifier and label @param id a {@link QualifiedName} for the entity @param label a String for the label property (see {@link HasLabel#getLabel()} @return an object of type {@link Entity} """ Entity re...
java
public Entity newEntity(QualifiedName id, String label) { Entity res = newEntity(id); if (label != null) res.getLabel().add(newInternationalizedString(label)); return res; }
[ "public", "Entity", "newEntity", "(", "QualifiedName", "id", ",", "String", "label", ")", "{", "Entity", "res", "=", "newEntity", "(", "id", ")", ";", "if", "(", "label", "!=", "null", ")", "res", ".", "getLabel", "(", ")", ".", "add", "(", "newInter...
Creates a new {@link Entity} with provided identifier and label @param id a {@link QualifiedName} for the entity @param label a String for the label property (see {@link HasLabel#getLabel()} @return an object of type {@link Entity}
[ "Creates", "a", "new", "{" ]
train
https://github.com/lucmoreau/ProvToolbox/blob/f865952868ffb69432937b08728c86bebbe4678a/prov-model/src/main/java/org/openprovenance/prov/model/ProvFactory.java#L649-L654
Chorus-bdd/Chorus
interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/HandlerConfigLoader.java
HandlerConfigLoader.loadProperties
public Properties loadProperties(ConfigurationManager configurationManager, String handlerPrefix) { """ Get all properties for a simple handler which takes only properties prefixed with handler name: myHandler.property1=val myHandler.property2=val """ PropertyOperations allproperties = properties(c...
java
public Properties loadProperties(ConfigurationManager configurationManager, String handlerPrefix) { PropertyOperations allproperties = properties(configurationManager.getAllProperties()); PropertyOperations handlerProps = allproperties.filterByAndRemoveKeyPrefix(handlerPrefix + "."); return han...
[ "public", "Properties", "loadProperties", "(", "ConfigurationManager", "configurationManager", ",", "String", "handlerPrefix", ")", "{", "PropertyOperations", "allproperties", "=", "properties", "(", "configurationManager", ".", "getAllProperties", "(", ")", ")", ";", "...
Get all properties for a simple handler which takes only properties prefixed with handler name: myHandler.property1=val myHandler.property2=val
[ "Get", "all", "properties", "for", "a", "simple", "handler", "which", "takes", "only", "properties", "prefixed", "with", "handler", "name", ":" ]
train
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-handlerconfig/src/main/java/org/chorusbdd/chorus/handlerconfig/HandlerConfigLoader.java#L44-L49
bingoohuang/excel2javabeans
src/main/java/com/github/bingoohuang/excel2beans/BeansToExcelOnTemplate.java
BeansToExcelOnTemplate.emptyEndsCells
private void emptyEndsCells(Row tmplRow, int tmplCol, int rowOffset, Row row, int fieldsNum) { """ 置空写入行两端单元格。 @param tmplRow 模板行。 @param tmplCol 模板单元格所在列。 @param rowOffset 写入行偏移号。 @param row 写入行。 @param fieldsNum 写入JavaBean属性的数量。 """ if (rowOffset <= 0) return; emptyCells(tmp...
java
private void emptyEndsCells(Row tmplRow, int tmplCol, int rowOffset, Row row, int fieldsNum) { if (rowOffset <= 0) return; emptyCells(tmplRow, rowOffset, row, tmplRow.getFirstCellNum(), tmplCol - 1); emptyCells(tmplRow, rowOffset, row, tmplCol + fieldsNum, tmplRow.getLastCellNum()); }
[ "private", "void", "emptyEndsCells", "(", "Row", "tmplRow", ",", "int", "tmplCol", ",", "int", "rowOffset", ",", "Row", "row", ",", "int", "fieldsNum", ")", "{", "if", "(", "rowOffset", "<=", "0", ")", "return", ";", "emptyCells", "(", "tmplRow", ",", ...
置空写入行两端单元格。 @param tmplRow 模板行。 @param tmplCol 模板单元格所在列。 @param rowOffset 写入行偏移号。 @param row 写入行。 @param fieldsNum 写入JavaBean属性的数量。
[ "置空写入行两端单元格。" ]
train
https://github.com/bingoohuang/excel2javabeans/blob/db136d460b93b649814366c0d84a982698b96dc3/src/main/java/com/github/bingoohuang/excel2beans/BeansToExcelOnTemplate.java#L267-L272
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/FieldReSelectHandler.java
FieldReSelectHandler.syncClonedListener
public boolean syncClonedListener(BaseField field, FieldListener listener, boolean bInitCalled) { """ Set this cloned listener to the same state at this listener. @param field The field this new listener will be added to. @param The new listener to sync to this. @param Has the init method been called? @return ...
java
public boolean syncClonedListener(BaseField field, FieldListener listener, boolean bInitCalled) { if (!bInitCalled) ((FieldReSelectHandler)listener).init(null, m_gridScreen, m_sPopupBox); return super.syncClonedListener(field, listener, true); }
[ "public", "boolean", "syncClonedListener", "(", "BaseField", "field", ",", "FieldListener", "listener", ",", "boolean", "bInitCalled", ")", "{", "if", "(", "!", "bInitCalled", ")", "(", "(", "FieldReSelectHandler", ")", "listener", ")", ".", "init", "(", "null...
Set this cloned listener to the same state at this listener. @param field The field this new listener will be added to. @param The new listener to sync to this. @param Has the init method been called? @return True if I called init.
[ "Set", "this", "cloned", "listener", "to", "the", "same", "state", "at", "this", "listener", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/FieldReSelectHandler.java#L89-L94
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AbstractBuilder.java
AbstractBuilder.buildChildren
protected void buildChildren(XMLNode node, Content contentTree) throws DocletException { """ Build the documentation, as specified by the children of the given XML element. @param node the XML element that specifies which components to document. @param contentTree content tree to which the documentation will b...
java
protected void buildChildren(XMLNode node, Content contentTree) throws DocletException { for (XMLNode child : node.children) build(child, contentTree); }
[ "protected", "void", "buildChildren", "(", "XMLNode", "node", ",", "Content", "contentTree", ")", "throws", "DocletException", "{", "for", "(", "XMLNode", "child", ":", "node", ".", "children", ")", "build", "(", "child", ",", "contentTree", ")", ";", "}" ]
Build the documentation, as specified by the children of the given XML element. @param node the XML element that specifies which components to document. @param contentTree content tree to which the documentation will be added @throws DocletException if there is a problem while building the children
[ "Build", "the", "documentation", "as", "specified", "by", "the", "children", "of", "the", "given", "XML", "element", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AbstractBuilder.java#L198-L201
jaredrummler/AndroidShell
library/src/main/java/com/jaredrummler/android/shell/Shell.java
Shell.parseAvailableResult
static boolean parseAvailableResult(List<String> stdout, boolean checkForRoot) { """ See if the shell is alive, and if so, check the UID @param stdout Standard output from running AVAILABLE_TEST_COMMANDS @param checkForRoot true if we are expecting this shell to be running as root @return true on success, f...
java
static boolean parseAvailableResult(List<String> stdout, boolean checkForRoot) { if (stdout == null) { return false; } // this is only one of many ways this can be done boolean echoSeen = false; for (String line : stdout) { if (line.contains("uid=")) { // id command is working,...
[ "static", "boolean", "parseAvailableResult", "(", "List", "<", "String", ">", "stdout", ",", "boolean", "checkForRoot", ")", "{", "if", "(", "stdout", "==", "null", ")", "{", "return", "false", ";", "}", "// this is only one of many ways this can be done", "boolea...
See if the shell is alive, and if so, check the UID @param stdout Standard output from running AVAILABLE_TEST_COMMANDS @param checkForRoot true if we are expecting this shell to be running as root @return true on success, false on error
[ "See", "if", "the", "shell", "is", "alive", "and", "if", "so", "check", "the", "UID" ]
train
https://github.com/jaredrummler/AndroidShell/blob/0826b6f93c208b7bc95344dd20e2989d367a1e43/library/src/main/java/com/jaredrummler/android/shell/Shell.java#L231-L251
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.vps_serviceName_additionalDisk_duration_POST
public OvhOrder vps_serviceName_additionalDisk_duration_POST(String serviceName, String duration, OvhAdditionalDiskSizeEnum additionalDiskSize) throws IOException { """ Create order REST: POST /order/vps/{serviceName}/additionalDisk/{duration} @param additionalDiskSize [required] Size of the additional disk @...
java
public OvhOrder vps_serviceName_additionalDisk_duration_POST(String serviceName, String duration, OvhAdditionalDiskSizeEnum additionalDiskSize) throws IOException { String qPath = "/order/vps/{serviceName}/additionalDisk/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object>o ...
[ "public", "OvhOrder", "vps_serviceName_additionalDisk_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "OvhAdditionalDiskSizeEnum", "additionalDiskSize", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/vps/{serviceName}/addition...
Create order REST: POST /order/vps/{serviceName}/additionalDisk/{duration} @param additionalDiskSize [required] Size of the additional disk @param serviceName [required] The internal name of your VPS offer @param duration [required] Duration
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L3618-L3625
fernandospr/java-wns
src/main/java/ar/com/fernandospr/wns/WnsService.java
WnsService.pushRaw
public WnsNotificationResponse pushRaw(String channelUri, WnsRaw raw) throws WnsException { """ Pushes a badge to channelUri @param channelUri @param raw which should be built with {@link ar.com.fernandospr.wns.model.builders.WnsBadgeBuilder} @return WnsNotificationResponse please see response headers from <a h...
java
public WnsNotificationResponse pushRaw(String channelUri, WnsRaw raw) throws WnsException { return this.pushRaw(channelUri, null, raw); }
[ "public", "WnsNotificationResponse", "pushRaw", "(", "String", "channelUri", ",", "WnsRaw", "raw", ")", "throws", "WnsException", "{", "return", "this", ".", "pushRaw", "(", "channelUri", ",", "null", ",", "raw", ")", ";", "}" ]
Pushes a badge to channelUri @param channelUri @param raw which should be built with {@link ar.com.fernandospr.wns.model.builders.WnsBadgeBuilder} @return WnsNotificationResponse please see response headers from <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465435.aspx#send_notification_response">http...
[ "Pushes", "a", "badge", "to", "channelUri" ]
train
https://github.com/fernandospr/java-wns/blob/cd621b9c17d1e706f6284e0913531d834904a90d/src/main/java/ar/com/fernandospr/wns/WnsService.java#L214-L216
Ardesco/selenium-standalone-server-plugin
src/main/java/com/lazerycode/selenium/extract/FileExtractor.java
FileExtractor.untarFile
private String untarFile(InputStream compressedFileInputStream, String extractedToFilePath, BinaryType possibleFilenames) throws IOException, ExpectedFileNotFoundException { """ Untar a decompressed tar file (this will implicitly overwrite any existing files) @param compressedFileInputStream The expanded tar fi...
java
private String untarFile(InputStream compressedFileInputStream, String extractedToFilePath, BinaryType possibleFilenames) throws IOException, ExpectedFileNotFoundException { LOG.debug("Attempting to extract binary from a .tar file..."); ArchiveEntry currentFile; ArrayList<String> filenamesWeAreS...
[ "private", "String", "untarFile", "(", "InputStream", "compressedFileInputStream", ",", "String", "extractedToFilePath", ",", "BinaryType", "possibleFilenames", ")", "throws", "IOException", ",", "ExpectedFileNotFoundException", "{", "LOG", ".", "debug", "(", "\"Attemptin...
Untar a decompressed tar file (this will implicitly overwrite any existing files) @param compressedFileInputStream The expanded tar file @param extractedToFilePath Path to extracted file @param possibleFilenames Names of the files we want to extract @return boolean @throws IOException MojoFailureExceptio...
[ "Untar", "a", "decompressed", "tar", "file", "(", "this", "will", "implicitly", "overwrite", "any", "existing", "files", ")" ]
train
https://github.com/Ardesco/selenium-standalone-server-plugin/blob/e0ecfad426c1a28115cab60def84731d7a4d7e6f/src/main/java/com/lazerycode/selenium/extract/FileExtractor.java#L122-L148
google/closure-templates
java/src/com/google/template/soy/jssrc/dsl/SoyJsPluginUtils.java
SoyJsPluginUtils.genJsExprUsingSoySyntax
public static JsExpr genJsExprUsingSoySyntax(Operator op, List<JsExpr> operandJsExprs) { """ Generates a JS expression for the given operator and operands. """ List<Expression> operands = Lists.transform(operandJsExprs, input -> fromExpr(input, ImmutableList.<GoogRequire>of())); return Expressi...
java
public static JsExpr genJsExprUsingSoySyntax(Operator op, List<JsExpr> operandJsExprs) { List<Expression> operands = Lists.transform(operandJsExprs, input -> fromExpr(input, ImmutableList.<GoogRequire>of())); return Expression.operation(op, operands).assertExpr(); }
[ "public", "static", "JsExpr", "genJsExprUsingSoySyntax", "(", "Operator", "op", ",", "List", "<", "JsExpr", ">", "operandJsExprs", ")", "{", "List", "<", "Expression", ">", "operands", "=", "Lists", ".", "transform", "(", "operandJsExprs", ",", "input", "->", ...
Generates a JS expression for the given operator and operands.
[ "Generates", "a", "JS", "expression", "for", "the", "given", "operator", "and", "operands", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jssrc/dsl/SoyJsPluginUtils.java#L57-L61
p6spy/p6spy
src/main/java/com/p6spy/engine/common/ConnectionInformation.java
ConnectionInformation.fromDataSource
public static ConnectionInformation fromDataSource(CommonDataSource dataSource, Connection connection, long timeToGetConnectionNs) { """ Creates a new {@link ConnectionInformation} instance for a {@link Connection} which has been obtained via a {@link CommonDataSource} @param dataSource the {@link j...
java
public static ConnectionInformation fromDataSource(CommonDataSource dataSource, Connection connection, long timeToGetConnectionNs) { final ConnectionInformation connectionInformation = new ConnectionInformation(); connectionInformation.dataSource = dataSource; connectionInformation.connection = connection; ...
[ "public", "static", "ConnectionInformation", "fromDataSource", "(", "CommonDataSource", "dataSource", ",", "Connection", "connection", ",", "long", "timeToGetConnectionNs", ")", "{", "final", "ConnectionInformation", "connectionInformation", "=", "new", "ConnectionInformation...
Creates a new {@link ConnectionInformation} instance for a {@link Connection} which has been obtained via a {@link CommonDataSource} @param dataSource the {@link javax.sql.CommonDataSource} which created the {@link #connection} @param connection the {@link #connection} created by the {@link #data...
[ "Creates", "a", "new", "{", "@link", "ConnectionInformation", "}", "instance", "for", "a", "{", "@link", "Connection", "}", "which", "has", "been", "obtained", "via", "a", "{", "@link", "CommonDataSource", "}" ]
train
https://github.com/p6spy/p6spy/blob/c3c0fecd6e26156eecf90a90901c3c1c8a7dbdf2/src/main/java/com/p6spy/engine/common/ConnectionInformation.java#L72-L78
drewnoakes/metadata-extractor
Source/com/drew/metadata/eps/EpsReader.java
EpsReader.addToDirectory
private void addToDirectory(@NotNull final EpsDirectory directory, String name, String value) throws IOException { """ Default case that adds comment with keyword to directory @param directory EpsDirectory to add extracted data to @param name String that holds name of current comment @param value String that ...
java
private void addToDirectory(@NotNull final EpsDirectory directory, String name, String value) throws IOException { Integer tag = EpsDirectory._tagIntegerMap.get(name); if (tag == null) return; switch (tag) { case EpsDirectory.TAG_IMAGE_DATA: extractI...
[ "private", "void", "addToDirectory", "(", "@", "NotNull", "final", "EpsDirectory", "directory", ",", "String", "name", ",", "String", "value", ")", "throws", "IOException", "{", "Integer", "tag", "=", "EpsDirectory", ".", "_tagIntegerMap", ".", "get", "(", "na...
Default case that adds comment with keyword to directory @param directory EpsDirectory to add extracted data to @param name String that holds name of current comment @param value String that holds value of current comment
[ "Default", "case", "that", "adds", "comment", "with", "keyword", "to", "directory" ]
train
https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/eps/EpsReader.java#L165-L190
knowm/Yank
src/main/java/org/knowm/yank/Yank.java
Yank.queryBean
public static <T> T queryBean(String poolName, String sql, Class<T> beanType, Object[] params) throws YankSQLException { """ Return just one Bean given an SQL statement. If more than one row match the query, only the first row is returned. @param poolName The name of the connection pool to query against ...
java
public static <T> T queryBean(String poolName, String sql, Class<T> beanType, Object[] params) throws YankSQLException { T returnObject = null; try { BeanHandler<T> resultSetHandler = new BeanHandler<T>(beanType, new BasicRowProcessor(new YankBeanProcessor<T>(beanType))); returnO...
[ "public", "static", "<", "T", ">", "T", "queryBean", "(", "String", "poolName", ",", "String", "sql", ",", "Class", "<", "T", ">", "beanType", ",", "Object", "[", "]", "params", ")", "throws", "YankSQLException", "{", "T", "returnObject", "=", "null", ...
Return just one Bean given an SQL statement. If more than one row match the query, only the first row is returned. @param poolName The name of the connection pool to query against @param sql The SQL statement @param params The replacement parameters @param beanType The Class of the desired return Object matching the t...
[ "Return", "just", "one", "Bean", "given", "an", "SQL", "statement", ".", "If", "more", "than", "one", "row", "match", "the", "query", "only", "the", "first", "row", "is", "returned", "." ]
train
https://github.com/knowm/Yank/blob/b2071dcd94da99db6904355f9557456b8b292a6b/src/main/java/org/knowm/yank/Yank.java#L395-L414
brunocvcunha/ghostme4j
src/main/java/org/brunocvcunha/ghostme4j/GhostMe.java
GhostMe.getProxy
public static Proxy getProxy(final boolean test) throws IOException { """ Get a Proxy @param test whether to test the proxy @return used proxy @throws IOException I/O Error """ int providerIndex = MyNumberUtils.randomIntBetween(0, PROVIDERS.length - 1); IProxyProvider randomProvider = PROVIDE...
java
public static Proxy getProxy(final boolean test) throws IOException { int providerIndex = MyNumberUtils.randomIntBetween(0, PROVIDERS.length - 1); IProxyProvider randomProvider = PROVIDERS[providerIndex]; return getProxy(randomProvider, test); }
[ "public", "static", "Proxy", "getProxy", "(", "final", "boolean", "test", ")", "throws", "IOException", "{", "int", "providerIndex", "=", "MyNumberUtils", ".", "randomIntBetween", "(", "0", ",", "PROVIDERS", ".", "length", "-", "1", ")", ";", "IProxyProvider",...
Get a Proxy @param test whether to test the proxy @return used proxy @throws IOException I/O Error
[ "Get", "a", "Proxy" ]
train
https://github.com/brunocvcunha/ghostme4j/blob/c763a0d5f78ed0860e63d27afa0330b92eb0400c/src/main/java/org/brunocvcunha/ghostme4j/GhostMe.java#L63-L69
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/query/values/SubString.java
SubString.subLength
public JcString subLength(int len) { """ <div color='red' style="font-size:24px;color:red"><b><i><u>JCYPHER</u></i></b></div> <div color='red' style="font-size:18px;color:red"><i>specify the length of a substring to be extracted</i></div> <br/> """ JcNumber sub = new JcNumber(len, this.getPredecessor(), OP...
java
public JcString subLength(int len) { JcNumber sub = new JcNumber(len, this.getPredecessor(), OPERATOR.Common.COMMA_SEPARATOR); JcString ret = new JcString(null, sub, new FunctionInstance(FUNCTION.String.SUBSTRING, 3)); QueryRecorder.recordInvocationConditional(this, "subLength", ret, QueryRecorder.literal(le...
[ "public", "JcString", "subLength", "(", "int", "len", ")", "{", "JcNumber", "sub", "=", "new", "JcNumber", "(", "len", ",", "this", ".", "getPredecessor", "(", ")", ",", "OPERATOR", ".", "Common", ".", "COMMA_SEPARATOR", ")", ";", "JcString", "ret", "=",...
<div color='red' style="font-size:24px;color:red"><b><i><u>JCYPHER</u></i></b></div> <div color='red' style="font-size:18px;color:red"><i>specify the length of a substring to be extracted</i></div> <br/>
[ "<div", "color", "=", "red", "style", "=", "font", "-", "size", ":", "24px", ";", "color", ":", "red", ">", "<b", ">", "<i", ">", "<u", ">", "JCYPHER<", "/", "u", ">", "<", "/", "i", ">", "<", "/", "b", ">", "<", "/", "div", ">", "<div", ...
train
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/query/values/SubString.java#L38-L44
dkmfbk/knowledgestore
ks-server-hbase/src/main/java/eu/fbk/knowledgestore/datastore/hbase/utils/AbstractHBaseUtils.java
AbstractHBaseUtils.getResultScan
public Scan getResultScan(String tableName, String famName, ByteBuffer startKey, ByteBuffer endKey) throws IOException { """ Creates a scan @param tableName to be scan @param famName to be checked @param startKey to query the table @param endKey to query the table @param conf @return Scan inside...
java
public Scan getResultScan(String tableName, String famName, ByteBuffer startKey, ByteBuffer endKey) throws IOException { logger.debug("AbstractHBaseUtils Begin of getResultScan(" + tableName + ", " + famName + ")"); Scan scan = new Scan(); scan.addFamily(Bytes.toBytes(famName)); ...
[ "public", "Scan", "getResultScan", "(", "String", "tableName", ",", "String", "famName", ",", "ByteBuffer", "startKey", ",", "ByteBuffer", "endKey", ")", "throws", "IOException", "{", "logger", ".", "debug", "(", "\"AbstractHBaseUtils Begin of getResultScan(\"", "+", ...
Creates a scan @param tableName to be scan @param famName to be checked @param startKey to query the table @param endKey to query the table @param conf @return Scan inside the table @throws IOException
[ "Creates", "a", "scan" ]
train
https://github.com/dkmfbk/knowledgestore/blob/a548101b1dd67fcf72a1ec6f838ea7539bdbbe7a/ks-server-hbase/src/main/java/eu/fbk/knowledgestore/datastore/hbase/utils/AbstractHBaseUtils.java#L229-L240
protostuff/protostuff
protostuff-api/src/main/java/io/protostuff/UnsignedNumberUtil.java
UnsignedNumberUtil.unsignedIntToString
private static String unsignedIntToString(int x, int radix) { """ Returns a string representation of {@code x} for the given radix, where {@code x} is treated as unsigned. @param x the value to convert to a string. @param radix the radix to use while working with {@code x} @throws IllegalArgumentException ...
java
private static String unsignedIntToString(int x, int radix) { long asLong = x & INT_MASK; return Long.toString(asLong, radix); }
[ "private", "static", "String", "unsignedIntToString", "(", "int", "x", ",", "int", "radix", ")", "{", "long", "asLong", "=", "x", "&", "INT_MASK", ";", "return", "Long", ".", "toString", "(", "asLong", ",", "radix", ")", ";", "}" ]
Returns a string representation of {@code x} for the given radix, where {@code x} is treated as unsigned. @param x the value to convert to a string. @param radix the radix to use while working with {@code x} @throws IllegalArgumentException if {@code radix} is not between {@link Character#MIN_RADIX} and {@link Charact...
[ "Returns", "a", "string", "representation", "of", "{", "@code", "x", "}", "for", "the", "given", "radix", "where", "{", "@code", "x", "}", "is", "treated", "as", "unsigned", "." ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-api/src/main/java/io/protostuff/UnsignedNumberUtil.java#L170-L174
burberius/eve-esi
src/main/java/net/troja/eve/esi/auth/OAuth.java
OAuth.getJWT
public JWT getJWT() { """ Get JWT (JSON Web Token) WARNING: The JWT is unverified. Verifying the JWT is beyond the scope of this library. As ESI will verify the token when used. See the SSO documentation for JWT Token validation for details: https://github.com/esi/esi-docs/blob/master/docs/sso/validating_eve_j...
java
public JWT getJWT() { AccountData accountData = getAccountData(); // Update access token if // needed if (accountData == null) { return null; } try { String accessToken = accountData.getAccessToken(); ...
[ "public", "JWT", "getJWT", "(", ")", "{", "AccountData", "accountData", "=", "getAccountData", "(", ")", ";", "// Update access token if", "// needed", "if", "(", "accountData", "==", "null", ")", "{", "return", "null", ";", "}", "try", "{", "String", "acces...
Get JWT (JSON Web Token) WARNING: The JWT is unverified. Verifying the JWT is beyond the scope of this library. As ESI will verify the token when used. See the SSO documentation for JWT Token validation for details: https://github.com/esi/esi-docs/blob/master/docs/sso/validating_eve_jwt .md @return Unverified JWT or n...
[ "Get", "JWT", "(", "JSON", "Web", "Token", ")", "WARNING", ":", "The", "JWT", "is", "unverified", ".", "Verifying", "the", "JWT", "is", "beyond", "the", "scope", "of", "this", "library", ".", "As", "ESI", "will", "verify", "the", "token", "when", "used...
train
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/auth/OAuth.java#L113-L137
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.trimStartAndEnd
@Nullable @CheckReturnValue public static String trimStartAndEnd (@Nullable final String sSrc, final char cValueToTrim) { """ Trim the passed lead and tail from the source value. If the source value does not start with the passed trimmed value, nothing happens. @param sSrc The input source string @param ...
java
@Nullable @CheckReturnValue public static String trimStartAndEnd (@Nullable final String sSrc, final char cValueToTrim) { return trimStartAndEnd (sSrc, cValueToTrim, cValueToTrim); }
[ "@", "Nullable", "@", "CheckReturnValue", "public", "static", "String", "trimStartAndEnd", "(", "@", "Nullable", "final", "String", "sSrc", ",", "final", "char", "cValueToTrim", ")", "{", "return", "trimStartAndEnd", "(", "sSrc", ",", "cValueToTrim", ",", "cValu...
Trim the passed lead and tail from the source value. If the source value does not start with the passed trimmed value, nothing happens. @param sSrc The input source string @param cValueToTrim The char to be trimmed of the beginning and the end @return The trimmed string, or the original input string, if the value to t...
[ "Trim", "the", "passed", "lead", "and", "tail", "from", "the", "source", "value", ".", "If", "the", "source", "value", "does", "not", "start", "with", "the", "passed", "trimmed", "value", "nothing", "happens", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L3516-L3521
kaazing/gateway
resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java
URIUtils.modifyURIAuthority
public static String modifyURIAuthority(String uri, String newAuthority) { """ Helper method for modifying URI authority @param uri @param newAuthority @return """ try { URI uriObj = new URI(uri); // code below modifies new authority considering also network interface syntax ...
java
public static String modifyURIAuthority(String uri, String newAuthority) { try { URI uriObj = new URI(uri); // code below modifies new authority considering also network interface syntax Pattern pattern = Pattern.compile(NETWORK_INTERFACE_AUTHORITY); Matcher match...
[ "public", "static", "String", "modifyURIAuthority", "(", "String", "uri", ",", "String", "newAuthority", ")", "{", "try", "{", "URI", "uriObj", "=", "new", "URI", "(", "uri", ")", ";", "// code below modifies new authority considering also network interface syntax", "...
Helper method for modifying URI authority @param uri @param newAuthority @return
[ "Helper", "method", "for", "modifying", "URI", "authority" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java#L303-L327
PistoiaHELM/HELM2NotationToolkit
src/main/java/org/helm/notation2/tools/AminoAcidParser.java
AminoAcidParser.getAminoAcidList
public static List<String> getAminoAcidList(String peptideSequence, String delimiter) throws MonomerException, NotationException, MonomerLoadingException, ChemistryException { """ This method converts peptide sequence into a List of amino acid with optional delimiter @param peptideSequence inp...
java
public static List<String> getAminoAcidList(String peptideSequence, String delimiter) throws MonomerException, NotationException, MonomerLoadingException, ChemistryException { if (null == peptideSequence) { throw new NotationException("Peptide Sequence must be specified"); } i...
[ "public", "static", "List", "<", "String", ">", "getAminoAcidList", "(", "String", "peptideSequence", ",", "String", "delimiter", ")", "throws", "MonomerException", ",", "NotationException", ",", "MonomerLoadingException", ",", "ChemistryException", "{", "if", "(", ...
This method converts peptide sequence into a List of amino acid with optional delimiter @param peptideSequence input sequence @param delimiter optional delimeter in the input sequence @return list of amino acid @throws MonomerException if monomer is not valid @throws NotationException if notation is not valid @throws ...
[ "This", "method", "converts", "peptide", "sequence", "into", "a", "List", "of", "amino", "acid", "with", "optional", "delimiter" ]
train
https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/tools/AminoAcidParser.java#L111-L140
grails/grails-core
grails-core/src/main/groovy/org/grails/plugins/BasePluginFilter.java
BasePluginFilter.registerDependency
@SuppressWarnings( { """ Adds a plugin to the additional if this hasn't happened already """"unchecked", "rawtypes"}) protected void registerDependency(List additionalList, GrailsPlugin plugin) { if (!addedNames.contains(plugin.getName())) { addedNames.add(plugin.getName()); ...
java
@SuppressWarnings({"unchecked", "rawtypes"}) protected void registerDependency(List additionalList, GrailsPlugin plugin) { if (!addedNames.contains(plugin.getName())) { addedNames.add(plugin.getName()); additionalList.add(plugin); addPluginDependencies(additionalList, plu...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "protected", "void", "registerDependency", "(", "List", "additionalList", ",", "GrailsPlugin", "plugin", ")", "{", "if", "(", "!", "addedNames", ".", "contains", "(", "plugin", ...
Adds a plugin to the additional if this hasn't happened already
[ "Adds", "a", "plugin", "to", "the", "additional", "if", "this", "hasn", "t", "happened", "already" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/plugins/BasePluginFilter.java#L189-L196
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/Utils.java
Utils.createSrcFile
public static FileWriter createSrcFile(String name, String packageName, String outDir) throws IOException { """ Create source file @param name The name of the class @param packageName The package name @param outDir output directory @return The file @throws IOException Thrown if an error occurs ...
java
public static FileWriter createSrcFile(String name, String packageName, String outDir) throws IOException { String directory = "src" + File.separatorChar + "main" + File.separatorChar + "java"; return createPackageFile(name, packageName, directory, outDir); }
[ "public", "static", "FileWriter", "createSrcFile", "(", "String", "name", ",", "String", "packageName", ",", "String", "outDir", ")", "throws", "IOException", "{", "String", "directory", "=", "\"src\"", "+", "File", ".", "separatorChar", "+", "\"main\"", "+", ...
Create source file @param name The name of the class @param packageName The package name @param outDir output directory @return The file @throws IOException Thrown if an error occurs
[ "Create", "source", "file" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/Utils.java#L101-L106
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java
SerializedFormBuilder.buildClassSerializedForm
public void buildClassSerializedForm(XMLNode node, Content packageSerializedTree) throws DocletException { """ Build the class serialized form. @param node the XML element that specifies which components to document @param packageSerializedTree content tree to which the documentation will be added ...
java
public void buildClassSerializedForm(XMLNode node, Content packageSerializedTree) throws DocletException { Content classSerializedTree = writer.getClassSerializedHeader(); SortedSet<TypeElement> typeElements = utils.getAllClassesUnfiltered(currentPackage); for (TypeElement typeElemen...
[ "public", "void", "buildClassSerializedForm", "(", "XMLNode", "node", ",", "Content", "packageSerializedTree", ")", "throws", "DocletException", "{", "Content", "classSerializedTree", "=", "writer", ".", "getClassSerializedHeader", "(", ")", ";", "SortedSet", "<", "Ty...
Build the class serialized form. @param node the XML element that specifies which components to document @param packageSerializedTree content tree to which the documentation will be added @throws DocletException if there is a problem while building the documentation
[ "Build", "the", "class", "serialized", "form", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java#L227-L245