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
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/IgnoredFiles.java
IgnoredFiles.shouldIgnore
public boolean shouldIgnore(MaterialConfig materialConfig, String name) { """ our algorithom is replace the ** with ([^/]*/)* and replace the * with [^/]* """ return materialConfig.matches(FilenameUtils.separatorsToUnix(name), processedPattern()); }
java
public boolean shouldIgnore(MaterialConfig materialConfig, String name) { return materialConfig.matches(FilenameUtils.separatorsToUnix(name), processedPattern()); }
[ "public", "boolean", "shouldIgnore", "(", "MaterialConfig", "materialConfig", ",", "String", "name", ")", "{", "return", "materialConfig", ".", "matches", "(", "FilenameUtils", ".", "separatorsToUnix", "(", "name", ")", ",", "processedPattern", "(", ")", ")", ";...
our algorithom is replace the ** with ([^/]*/)* and replace the * with [^/]*
[ "our", "algorithom", "is", "replace", "the", "**", "with", "(", "[", "^", "/", "]", "*", "/", ")", "*", "and", "replace", "the", "*", "with", "[", "^", "/", "]", "*" ]
train
https://github.com/gocd/gocd/blob/59a8480e23d6c06de39127635108dff57603cb71/config/config-api/src/main/java/com/thoughtworks/go/config/materials/IgnoredFiles.java#L63-L65
GCRC/nunaliit
nunaliit2-utils/src/main/java/ca/carleton/gcrc/utils/Files.java
Files.emptyDirectory
static public void emptyDirectory(File dir) throws Exception { """ Given a directory, removes all the content found in the directory. @param dir The directory to be emptied @throws Exception """ String[] fileNames = dir.list(); if( null != fileNames ) { for(String fileName : fileNames){ File file ...
java
static public void emptyDirectory(File dir) throws Exception { String[] fileNames = dir.list(); if( null != fileNames ) { for(String fileName : fileNames){ File file = new File(dir,fileName); if( file.isDirectory() ) { emptyDirectory(file); } boolean deleted = false; try { deleted =...
[ "static", "public", "void", "emptyDirectory", "(", "File", "dir", ")", "throws", "Exception", "{", "String", "[", "]", "fileNames", "=", "dir", ".", "list", "(", ")", ";", "if", "(", "null", "!=", "fileNames", ")", "{", "for", "(", "String", "fileName"...
Given a directory, removes all the content found in the directory. @param dir The directory to be emptied @throws Exception
[ "Given", "a", "directory", "removes", "all", "the", "content", "found", "in", "the", "directory", "." ]
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-utils/src/main/java/ca/carleton/gcrc/utils/Files.java#L157-L176
hypercube1024/firefly
firefly-wechat/src/main/java/com/firefly/wechat/utils/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 """ try { String[] array = new Str...
java
public static String getSHA1(String token, String timestamp, String nonce, String encrypt) throws AesException { try { String[] array = new String[]{token, timestamp, nonce, encrypt}; StringBuilder sb = new StringBuilder(); // 字符串排序 Arrays.sort(array); ...
[ "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
[ "用SHA1算法生成安全签名" ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-wechat/src/main/java/com/firefly/wechat/utils/SHA1.java#L25-L53
RoaringBitmap/RoaringBitmap
roaringbitmap/src/main/java/org/roaringbitmap/buffer/BufferUtil.java
BufferUtil.flipBitmapRangeAndCardinalityChange
@Deprecated public static int flipBitmapRangeAndCardinalityChange(LongBuffer bitmap, int start, int end) { """ flip bits at start, start+1,..., end-1 and report the cardinality change @param bitmap array of words to be modified @param start first index to be modified (inclusive) @param end last index to be ...
java
@Deprecated public static int flipBitmapRangeAndCardinalityChange(LongBuffer bitmap, int start, int end) { if (BufferUtil.isBackedBySimpleArray(bitmap)) { return Util.flipBitmapRangeAndCardinalityChange(bitmap.array(), start, end); } int cardbefore = cardinalityInBitmapWordRange(bitmap, start, end);...
[ "@", "Deprecated", "public", "static", "int", "flipBitmapRangeAndCardinalityChange", "(", "LongBuffer", "bitmap", ",", "int", "start", ",", "int", "end", ")", "{", "if", "(", "BufferUtil", ".", "isBackedBySimpleArray", "(", "bitmap", ")", ")", "{", "return", "...
flip bits at start, start+1,..., end-1 and report the cardinality change @param bitmap array of words to be modified @param start first index to be modified (inclusive) @param end last index to be modified (exclusive) @return cardinality change
[ "flip", "bits", "at", "start", "start", "+", "1", "...", "end", "-", "1", "and", "report", "the", "cardinality", "change" ]
train
https://github.com/RoaringBitmap/RoaringBitmap/blob/b26fd0a1330fd4d2877f4d74feb69ceb812e9efa/roaringbitmap/src/main/java/org/roaringbitmap/buffer/BufferUtil.java#L451-L460
johncarl81/transfuse
transfuse-api/src/main/java/org/androidtransfuse/util/ExtraUtil.java
ExtraUtil.getExtra
public static <T> T getExtra(Bundle extras, String name, boolean nullable) { """ Returns the extras in the given bundle by name. If no extra is found and the extra is considered not nullable, this method will throw a TransfuseInjectionException. If no extra is found and the extra is considered nullable, this m...
java
public static <T> T getExtra(Bundle extras, String name, boolean nullable) { T value = null; if (extras != null && extras.containsKey(name)) { value = (T)extras.get(name); } if (!nullable && value == null) { throw new TransfuseInjectionException("Unable to access ...
[ "public", "static", "<", "T", ">", "T", "getExtra", "(", "Bundle", "extras", ",", "String", "name", ",", "boolean", "nullable", ")", "{", "T", "value", "=", "null", ";", "if", "(", "extras", "!=", "null", "&&", "extras", ".", "containsKey", "(", "nam...
Returns the extras in the given bundle by name. If no extra is found and the extra is considered not nullable, this method will throw a TransfuseInjectionException. If no extra is found and the extra is considered nullable, this method will, of course, return null. @throws TransfuseInjectionException @param extras b...
[ "Returns", "the", "extras", "in", "the", "given", "bundle", "by", "name", ".", "If", "no", "extra", "is", "found", "and", "the", "extra", "is", "considered", "not", "nullable", "this", "method", "will", "throw", "a", "TransfuseInjectionException", ".", "If",...
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-api/src/main/java/org/androidtransfuse/util/ExtraUtil.java#L44-L53
zafarkhaja/jsemver
src/main/java/com/github/zafarkhaja/semver/MetadataVersion.java
MetadataVersion.compareIdentifiers
private int compareIdentifiers(String ident1, String ident2) { """ Compares two identifiers. @param ident1 the first identifier @param ident2 the second identifier @return integer result of comparison compatible with the {@code Comparable.compareTo} method """ if (isInt(ident1) && isInt(ident2)) ...
java
private int compareIdentifiers(String ident1, String ident2) { if (isInt(ident1) && isInt(ident2)) { return Integer.parseInt(ident1) - Integer.parseInt(ident2); } else { return ident1.compareTo(ident2); } }
[ "private", "int", "compareIdentifiers", "(", "String", "ident1", ",", "String", "ident2", ")", "{", "if", "(", "isInt", "(", "ident1", ")", "&&", "isInt", "(", "ident2", ")", ")", "{", "return", "Integer", ".", "parseInt", "(", "ident1", ")", "-", "Int...
Compares two identifiers. @param ident1 the first identifier @param ident2 the second identifier @return integer result of comparison compatible with the {@code Comparable.compareTo} method
[ "Compares", "two", "identifiers", "." ]
train
https://github.com/zafarkhaja/jsemver/blob/1f4996ea3dab06193c378fd66fd4f8fdc8334cc6/src/main/java/com/github/zafarkhaja/semver/MetadataVersion.java#L229-L235
mygreen/super-csv-annotation
src/main/java/com/github/mygreen/supercsv/builder/AbstractProcessorBuilder.java
AbstractProcessorBuilder.registerForConstraint
public <A extends Annotation> void registerForConstraint(final Class<A> anno, final ConstraintProcessorFactory<A> factory) { """ 制約のCellProcessorを作成するクラスを登録する。読み込み時と書き込み時は共通です。 @param <A> アノテーションのクラス @param anno 関連づけるアノテーション @param factory アノテーションを処理する{@link ConstraintProcessorFactory}の実装。 """ th...
java
public <A extends Annotation> void registerForConstraint(final Class<A> anno, final ConstraintProcessorFactory<A> factory) { this.constraintHandler.register(anno, factory); }
[ "public", "<", "A", "extends", "Annotation", ">", "void", "registerForConstraint", "(", "final", "Class", "<", "A", ">", "anno", ",", "final", "ConstraintProcessorFactory", "<", "A", ">", "factory", ")", "{", "this", ".", "constraintHandler", ".", "register", ...
制約のCellProcessorを作成するクラスを登録する。読み込み時と書き込み時は共通です。 @param <A> アノテーションのクラス @param anno 関連づけるアノテーション @param factory アノテーションを処理する{@link ConstraintProcessorFactory}の実装。
[ "制約のCellProcessorを作成するクラスを登録する。読み込み時と書き込み時は共通です。" ]
train
https://github.com/mygreen/super-csv-annotation/blob/9910320cb6dc143be972c7d10d9ab5ffb09c3b84/src/main/java/com/github/mygreen/supercsv/builder/AbstractProcessorBuilder.java#L215-L217
sawano/java-commons
src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java
AbstractValidate.validIndex
public <T extends CharSequence> T validIndex(final T chars, final int index, final String message, final Object... values) { """ <p>Validates that the index is within the bounds of the argument character sequence; otherwise throwing an exception with the specified message.</p> <pre>Validate.validIndex(myStr, 2, "...
java
public <T extends CharSequence> T validIndex(final T chars, final int index, final String message, final Object... values) { notNull(chars); if (index < 0 || index >= chars.length()) { failIndexOutOfBounds(String.format(message, values)); } return chars; }
[ "public", "<", "T", "extends", "CharSequence", ">", "T", "validIndex", "(", "final", "T", "chars", ",", "final", "int", "index", ",", "final", "String", "message", ",", "final", "Object", "...", "values", ")", "{", "notNull", "(", "chars", ")", ";", "i...
<p>Validates that the index is within the bounds of the argument character sequence; otherwise throwing an exception with the specified message.</p> <pre>Validate.validIndex(myStr, 2, "The string index is invalid: ");</pre> <p>If the character sequence is {@code null}, then the message of the exception is &quot;The val...
[ "<p", ">", "Validates", "that", "the", "index", "is", "within", "the", "bounds", "of", "the", "argument", "character", "sequence", ";", "otherwise", "throwing", "an", "exception", "with", "the", "specified", "message", ".", "<", "/", "p", ">", "<pre", ">",...
train
https://github.com/sawano/java-commons/blob/6f219c9e8dec4401dbe528d17ae6ec1ef9c0d284/src/main/java/se/sawano/java/commons/lang/validate/AbstractValidate.java#L1071-L1077
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/model/ProcessedInput.java
ProcessedInput.addParameter
public void addParameter(String parameterName, int parameterStart, int parameterEnd, String parameterType, String parameterDirection) { """ Adds parameter into list of input SQL parameters @param parameterName parameter name @param parameterStart character position at which parameter starts @param pa...
java
public void addParameter(String parameterName, int parameterStart, int parameterEnd, String parameterType, String parameterDirection) { if (this.sqlParameterNames == null) { this.sqlParameterNames = new ArrayList<String>(); this.sqlParameterBoundaries = new ArrayList<int[]>(); ...
[ "public", "void", "addParameter", "(", "String", "parameterName", ",", "int", "parameterStart", ",", "int", "parameterEnd", ",", "String", "parameterType", ",", "String", "parameterDirection", ")", "{", "if", "(", "this", ".", "sqlParameterNames", "==", "null", ...
Adds parameter into list of input SQL parameters @param parameterName parameter name @param parameterStart character position at which parameter starts @param parameterEnd character position at which parameter ends @param parameterType parameter type @param parameterDirection parameter direction
[ "Adds", "parameter", "into", "list", "of", "input", "SQL", "parameters" ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/model/ProcessedInput.java#L144-L154
jayantk/jklol
src/com/jayantkrish/jklol/inference/FactorMaxMarginalSet.java
FactorMaxMarginalSet.getBestAssignment
private Assignment getBestAssignment(Assignment portion, CliqueTree cliqueTree, int initialFactor) { """ Searches for the best assignment to {@code cliqueTree} consistent with {@code portion}. This method merges together assignments from possibly disjoint subgraphs of {@code cliqueTree}, using {@link #getBestAs...
java
private Assignment getBestAssignment(Assignment portion, CliqueTree cliqueTree, int initialFactor) { if (cliqueTree.getMarginals().size() == 0) { // Special case where the factor graph has no factors in it. return conditionedValues; } else { // General case SortedSet<Integer> unvisited =...
[ "private", "Assignment", "getBestAssignment", "(", "Assignment", "portion", ",", "CliqueTree", "cliqueTree", ",", "int", "initialFactor", ")", "{", "if", "(", "cliqueTree", ".", "getMarginals", "(", ")", ".", "size", "(", ")", "==", "0", ")", "{", "// Specia...
Searches for the best assignment to {@code cliqueTree} consistent with {@code portion}. This method merges together assignments from possibly disjoint subgraphs of {@code cliqueTree}, using {@link #getBestAssignment(Assignment, CliqueTree, int)} for each subgraph. @param portion @param cliqueTree @param initialFactor ...
[ "Searches", "for", "the", "best", "assignment", "to", "{", "@code", "cliqueTree", "}", "consistent", "with", "{", "@code", "portion", "}", ".", "This", "method", "merges", "together", "assignments", "from", "possibly", "disjoint", "subgraphs", "of", "{", "@cod...
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/inference/FactorMaxMarginalSet.java#L79-L103
alkacon/opencms-core
src/org/opencms/security/CmsRoleManager.java
CmsRoleManager.hasRoleForResource
public boolean hasRoleForResource(CmsObject cms, CmsRole role, CmsResource resource) { """ Checks if the given context user has the given role for the given resource.<p> @param cms the opencms context @param role the role to check @param resource the resource to check @return <code>true</code> if the given...
java
public boolean hasRoleForResource(CmsObject cms, CmsRole role, CmsResource resource) { return m_securityManager.hasRoleForResource( cms.getRequestContext(), cms.getRequestContext().getCurrentUser(), role, resource); }
[ "public", "boolean", "hasRoleForResource", "(", "CmsObject", "cms", ",", "CmsRole", "role", ",", "CmsResource", "resource", ")", "{", "return", "m_securityManager", ".", "hasRoleForResource", "(", "cms", ".", "getRequestContext", "(", ")", ",", "cms", ".", "getR...
Checks if the given context user has the given role for the given resource.<p> @param cms the opencms context @param role the role to check @param resource the resource to check @return <code>true</code> if the given context user has the given role for the given resource
[ "Checks", "if", "the", "given", "context", "user", "has", "the", "given", "role", "for", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/security/CmsRoleManager.java#L461-L468
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/block/decomposition/hessenberg/TridiagonalHelper_DDRB.java
TridiagonalHelper_DDRB.tridiagUpperRow
public static void tridiagUpperRow( final int blockLength , final DSubmatrixD1 A , final double gammas[] , final DSubmatrixD1 V ) { """ <p> Performs a tridiagonal decomposition on the upper row ...
java
public static void tridiagUpperRow( final int blockLength , final DSubmatrixD1 A , final double gammas[] , final DSubmatrixD1 V ) { int blockHeight = Math.min(blockLength,A.row1-A.row0); ...
[ "public", "static", "void", "tridiagUpperRow", "(", "final", "int", "blockLength", ",", "final", "DSubmatrixD1", "A", ",", "final", "double", "gammas", "[", "]", ",", "final", "DSubmatrixD1", "V", ")", "{", "int", "blockHeight", "=", "Math", ".", "min", "(...
<p> Performs a tridiagonal decomposition on the upper row only. </p> <p> For each row 'a' in 'A': Compute 'u' the householder reflector. y(:) = A*u v(i) = y - (1/2)*(y^T*u)*u a(i+1) = a(i) - u*&gamma;*v^T - v*u^t </p> @param blockLength Size of a block @param A is the row block being decomposed. Modified. @param gam...
[ "<p", ">", "Performs", "a", "tridiagonal", "decomposition", "on", "the", "upper", "row", "only", ".", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/block/decomposition/hessenberg/TridiagonalHelper_DDRB.java#L52-L81
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/PropertyService.java
PropertyService.parsePasswordProperties
public static final void parsePasswordProperties(Map<String, Object> vendorProps) { """ Parse and convert password properties to SerializableProtectedString. @param vendorProps """ for (String propName : PASSWORD_PROPS) { String propValue = (String) vendorProps.remove(propName); ...
java
public static final void parsePasswordProperties(Map<String, Object> vendorProps) { for (String propName : PASSWORD_PROPS) { String propValue = (String) vendorProps.remove(propName); if (propValue != null) vendorProps.put(propName, new SerializableProtectedString(propVal...
[ "public", "static", "final", "void", "parsePasswordProperties", "(", "Map", "<", "String", ",", "Object", ">", "vendorProps", ")", "{", "for", "(", "String", "propName", ":", "PASSWORD_PROPS", ")", "{", "String", "propValue", "=", "(", "String", ")", "vendor...
Parse and convert password properties to SerializableProtectedString. @param vendorProps
[ "Parse", "and", "convert", "password", "properties", "to", "SerializableProtectedString", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/jdbc/internal/PropertyService.java#L281-L288
DDTH/ddth-commons
ddth-commons-core/src/main/java/com/github/ddth/commons/utils/IdGenerator.java
IdGenerator.extractTimestamp64Ascii
public static long extractTimestamp64Ascii(String id64ascii) throws NumberFormatException { """ Extracts the (UNIX) timestamp from a 64-bit ASCII id (radix {@link Character#MAX_RADIX}). @param id64ascii @return the UNIX timestamp (milliseconds) @throws NumberFormatException """ return extractTime...
java
public static long extractTimestamp64Ascii(String id64ascii) throws NumberFormatException { return extractTimestamp64(Long.parseLong(id64ascii, Character.MAX_RADIX)); }
[ "public", "static", "long", "extractTimestamp64Ascii", "(", "String", "id64ascii", ")", "throws", "NumberFormatException", "{", "return", "extractTimestamp64", "(", "Long", ".", "parseLong", "(", "id64ascii", ",", "Character", ".", "MAX_RADIX", ")", ")", ";", "}" ...
Extracts the (UNIX) timestamp from a 64-bit ASCII id (radix {@link Character#MAX_RADIX}). @param id64ascii @return the UNIX timestamp (milliseconds) @throws NumberFormatException
[ "Extracts", "the", "(", "UNIX", ")", "timestamp", "from", "a", "64", "-", "bit", "ASCII", "id", "(", "radix", "{", "@link", "Character#MAX_RADIX", "}", ")", "." ]
train
https://github.com/DDTH/ddth-commons/blob/734f0e77321d41eeca78a557be9884df9874e46e/ddth-commons-core/src/main/java/com/github/ddth/commons/utils/IdGenerator.java#L530-L532
apache/incubator-gobblin
gobblin-config-management/gobblin-config-core/src/main/java/org/apache/gobblin/config/store/hdfs/SimpleHadoopFilesystemConfigStoreFactory.java
SimpleHadoopFilesystemConfigStoreFactory.createFileSystem
private FileSystem createFileSystem(URI configKey) throws ConfigStoreCreationException { """ Creates a {@link FileSystem} given a user specified configKey. """ try { return FileSystem.get(createFileSystemURI(configKey), new Configuration()); } catch (IOException | URISyntaxException e) { th...
java
private FileSystem createFileSystem(URI configKey) throws ConfigStoreCreationException { try { return FileSystem.get(createFileSystemURI(configKey), new Configuration()); } catch (IOException | URISyntaxException e) { throw new ConfigStoreCreationException(configKey, e); } }
[ "private", "FileSystem", "createFileSystem", "(", "URI", "configKey", ")", "throws", "ConfigStoreCreationException", "{", "try", "{", "return", "FileSystem", ".", "get", "(", "createFileSystemURI", "(", "configKey", ")", ",", "new", "Configuration", "(", ")", ")",...
Creates a {@link FileSystem} given a user specified configKey.
[ "Creates", "a", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-config-management/gobblin-config-core/src/main/java/org/apache/gobblin/config/store/hdfs/SimpleHadoopFilesystemConfigStoreFactory.java#L196-L202
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/string/Indexer.java
Indexer.between
public String between(int leftIndex, int rightIndex) { """ Returns a new string that is a substring of delegate string @param leftIndex @param rightIndex @return """ String result = this.target4Sub.substring(reviseL(leftIndex), reviseR(rightIndex)); return isResetMode ? result : (this.target4Sub = res...
java
public String between(int leftIndex, int rightIndex) { String result = this.target4Sub.substring(reviseL(leftIndex), reviseR(rightIndex)); return isResetMode ? result : (this.target4Sub = result); }
[ "public", "String", "between", "(", "int", "leftIndex", ",", "int", "rightIndex", ")", "{", "String", "result", "=", "this", ".", "target4Sub", ".", "substring", "(", "reviseL", "(", "leftIndex", ")", ",", "reviseR", "(", "rightIndex", ")", ")", ";", "re...
Returns a new string that is a substring of delegate string @param leftIndex @param rightIndex @return
[ "Returns", "a", "new", "string", "that", "is", "a", "substring", "of", "delegate", "string" ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/string/Indexer.java#L30-L33
FasterXML/woodstox
src/main/java/com/ctc/wstx/dtd/DTDAttribute.java
DTDAttribute.reportValidationProblem
protected String reportValidationProblem(InputProblemReporter rep, String msg) throws XMLStreamException { """ Method called during parsing of DTD schema, to report a problem. Note that unlike during actual validation, we have no option of just gracefully listing problems and ignoring them; an exception ...
java
protected String reportValidationProblem(InputProblemReporter rep, String msg) throws XMLStreamException { rep.reportValidationProblem("Attribute definition '"+mName+"': "+msg); return null; }
[ "protected", "String", "reportValidationProblem", "(", "InputProblemReporter", "rep", ",", "String", "msg", ")", "throws", "XMLStreamException", "{", "rep", ".", "reportValidationProblem", "(", "\"Attribute definition '\"", "+", "mName", "+", "\"': \"", "+", "msg", ")...
Method called during parsing of DTD schema, to report a problem. Note that unlike during actual validation, we have no option of just gracefully listing problems and ignoring them; an exception is always thrown.
[ "Method", "called", "during", "parsing", "of", "DTD", "schema", "to", "report", "a", "problem", ".", "Note", "that", "unlike", "during", "actual", "validation", "we", "have", "no", "option", "of", "just", "gracefully", "listing", "problems", "and", "ignoring",...
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/dtd/DTDAttribute.java#L505-L510
JOML-CI/JOML
src/org/joml/Planef.java
Planef.equationFromPoints
public static Vector4f equationFromPoints( Vector3f v0, Vector3f v1, Vector3f v2, Vector4f dest) { """ Compute the factors <code>a</code>, <code>b</code>, <code>c</code> and <code>d</code> in the plane equation <code>a*x + b*y + c*z + d = 0</code> from the given three points on the plane, ...
java
public static Vector4f equationFromPoints( Vector3f v0, Vector3f v1, Vector3f v2, Vector4f dest) { return equationFromPoints(v0.x, v0.y, v0.z, v1.x, v1.y, v1.z, v2.x, v2.y, v2.z, dest); }
[ "public", "static", "Vector4f", "equationFromPoints", "(", "Vector3f", "v0", ",", "Vector3f", "v1", ",", "Vector3f", "v2", ",", "Vector4f", "dest", ")", "{", "return", "equationFromPoints", "(", "v0", ".", "x", ",", "v0", ".", "y", ",", "v0", ".", "z", ...
Compute the factors <code>a</code>, <code>b</code>, <code>c</code> and <code>d</code> in the plane equation <code>a*x + b*y + c*z + d = 0</code> from the given three points on the plane, and write the values to the <code>x</code>, <code>y</code>, <code>z</code> and <code>w</code> components, respectively, of the given ...
[ "Compute", "the", "factors", "<code", ">", "a<", "/", "code", ">", "<code", ">", "b<", "/", "code", ">", "<code", ">", "c<", "/", "code", ">", "and", "<code", ">", "d<", "/", "code", ">", "in", "the", "plane", "equation", "<code", ">", "a", "*", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Planef.java#L156-L160
h2oai/h2o-2
src/main/java/water/Value.java
Value.startRemotePut
void startRemotePut() { """ Block this thread until all prior remote PUTs complete - to force remote-PUT ordering on the home node. """ assert !_key.home(); int x = 0; // assert I am waiting on threads with higher priority? while( (x=_rwlock.get()) != -1 ) // Spin until rwlock==-1 if( x ...
java
void startRemotePut() { assert !_key.home(); int x = 0; // assert I am waiting on threads with higher priority? while( (x=_rwlock.get()) != -1 ) // Spin until rwlock==-1 if( x == 1 || RW_CAS(0,1,"remote_need_notify") ) try { ForkJoinPool.managedBlock(this); } catch( InterruptedException e ...
[ "void", "startRemotePut", "(", ")", "{", "assert", "!", "_key", ".", "home", "(", ")", ";", "int", "x", "=", "0", ";", "// assert I am waiting on threads with higher priority?", "while", "(", "(", "x", "=", "_rwlock", ".", "get", "(", ")", ")", "!=", "-"...
Block this thread until all prior remote PUTs complete - to force remote-PUT ordering on the home node.
[ "Block", "this", "thread", "until", "all", "prior", "remote", "PUTs", "complete", "-", "to", "force", "remote", "-", "PUT", "ordering", "on", "the", "home", "node", "." ]
train
https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/src/main/java/water/Value.java#L564-L571
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/RepositoryCache.java
RepositoryCache.createSession
public SessionCache createSession(ExecutionContext context, String workspaceName, boolean readOnly) { """ Create a session for the workspace with the given name, using the supplied ExecutionContext for the session. @param context the context for the new session; may not be null @param w...
java
public SessionCache createSession(ExecutionContext context, String workspaceName, boolean readOnly) { WorkspaceCache workspaceCache = workspace(workspaceName); if (readOnly) { return new ReadOnlySessionCache(context, workspaceCache); } return new Writa...
[ "public", "SessionCache", "createSession", "(", "ExecutionContext", "context", ",", "String", "workspaceName", ",", "boolean", "readOnly", ")", "{", "WorkspaceCache", "workspaceCache", "=", "workspace", "(", "workspaceName", ")", ";", "if", "(", "readOnly", ")", "...
Create a session for the workspace with the given name, using the supplied ExecutionContext for the session. @param context the context for the new session; may not be null @param workspaceName the name of the workspace; may not be null @param readOnly true if the session is to be read-only @return the new session tha...
[ "Create", "a", "session", "for", "the", "workspace", "with", "the", "given", "name", "using", "the", "supplied", "ExecutionContext", "for", "the", "session", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/RepositoryCache.java#L938-L946
puniverse/galaxy
src/main/java/co/paralleluniverse/galaxy/Grid.java
Grid.getInstance
public static Grid getInstance(URL configFile, URL propertiesFile) throws InterruptedException { """ Retrieves the grid instance, as defined in the given configuration file. @param configFile The name of the configuration file containing the grid definition. @param propertiesFile The name of the properties fil...
java
public static Grid getInstance(URL configFile, URL propertiesFile) throws InterruptedException { return getInstance(new UrlResource(configFile), propertiesFile); }
[ "public", "static", "Grid", "getInstance", "(", "URL", "configFile", ",", "URL", "propertiesFile", ")", "throws", "InterruptedException", "{", "return", "getInstance", "(", "new", "UrlResource", "(", "configFile", ")", ",", "propertiesFile", ")", ";", "}" ]
Retrieves the grid instance, as defined in the given configuration file. @param configFile The name of the configuration file containing the grid definition. @param propertiesFile The name of the properties file containing the grid's properties. You may, of course use Spring's {@code <context:property-placeholder loca...
[ "Retrieves", "the", "grid", "instance", "as", "defined", "in", "the", "given", "configuration", "file", "." ]
train
https://github.com/puniverse/galaxy/blob/1d077532c4a5bcd6c52ff670770c31e98420ff63/src/main/java/co/paralleluniverse/galaxy/Grid.java#L86-L88
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/security/servletfilters/Cache.java
Cache.getCacheElement
private final synchronized CacheElement getCacheElement(String userid) { """ /* synchronize so that each access gets the same item instance (protect against overlapping calls) note that expiration logic of cache element changes the element's state -- elements are never removed from cache or replaced """ ...
java
private final synchronized CacheElement getCacheElement(String userid) { String m = getCacheAbbrev() + " getCacheElement() "; CacheElement cacheElement = null; String key = getKey(userid); logger.debug(m + "key==" + key); if (cache.containsKey(key)) { logger.debug(m +...
[ "private", "final", "synchronized", "CacheElement", "getCacheElement", "(", "String", "userid", ")", "{", "String", "m", "=", "getCacheAbbrev", "(", ")", "+", "\" getCacheElement() \"", ";", "CacheElement", "cacheElement", "=", "null", ";", "String", "key", "=", ...
/* synchronize so that each access gets the same item instance (protect against overlapping calls) note that expiration logic of cache element changes the element's state -- elements are never removed from cache or replaced
[ "/", "*", "synchronize", "so", "that", "each", "access", "gets", "the", "same", "item", "instance", "(", "protect", "against", "overlapping", "calls", ")", "note", "that", "expiration", "logic", "of", "cache", "element", "changes", "the", "element", "s", "st...
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/security/servletfilters/Cache.java#L132-L152
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readAvailabilityTable
private void readAvailabilityTable(Resource resource, AvailabilityPeriods periods) { """ Reads the availability table from the file. @param resource MPXJ resource instance @param periods MSPDI availability periods """ if (periods != null) { AvailabilityTable table = resource.getAvailab...
java
private void readAvailabilityTable(Resource resource, AvailabilityPeriods periods) { if (periods != null) { AvailabilityTable table = resource.getAvailability(); List<AvailabilityPeriod> list = periods.getAvailabilityPeriod(); for (AvailabilityPeriod period : list) { ...
[ "private", "void", "readAvailabilityTable", "(", "Resource", "resource", ",", "AvailabilityPeriods", "periods", ")", "{", "if", "(", "periods", "!=", "null", ")", "{", "AvailabilityTable", "table", "=", "resource", ".", "getAvailability", "(", ")", ";", "List", ...
Reads the availability table from the file. @param resource MPXJ resource instance @param periods MSPDI availability periods
[ "Reads", "the", "availability", "table", "from", "the", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L1086-L1102
VoltDB/voltdb
src/frontend/org/voltdb/VoltZK.java
VoltZK.parseMailboxContents
public static List<MailboxNodeContent> parseMailboxContents(List<String> jsons) throws JSONException { """ Helper method for parsing mailbox node contents into Java objects. @throws JSONException """ ArrayList<MailboxNodeContent> objects = new ArrayList<MailboxNodeContent>(jsons.size()); for (...
java
public static List<MailboxNodeContent> parseMailboxContents(List<String> jsons) throws JSONException { ArrayList<MailboxNodeContent> objects = new ArrayList<MailboxNodeContent>(jsons.size()); for (String json : jsons) { MailboxNodeContent content = null; JSONObject jsObj = new JS...
[ "public", "static", "List", "<", "MailboxNodeContent", ">", "parseMailboxContents", "(", "List", "<", "String", ">", "jsons", ")", "throws", "JSONException", "{", "ArrayList", "<", "MailboxNodeContent", ">", "objects", "=", "new", "ArrayList", "<", "MailboxNodeCon...
Helper method for parsing mailbox node contents into Java objects. @throws JSONException
[ "Helper", "method", "for", "parsing", "mailbox", "node", "contents", "into", "Java", "objects", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltZK.java#L263-L277
haraldk/TwelveMonkeys
servlet/src/main/java/com/twelvemonkeys/servlet/fileupload/FileUploadFilter.java
FileUploadFilter.doFilterImpl
public void doFilterImpl(ServletRequest pRequest, ServletResponse pResponse, FilterChain pChain) throws IOException, ServletException { """ Examines the request content type, and if it is a {@code multipart/*} request, wraps the request with a {@code HttpFileUploadRequest}. @param pRequest The servlet request...
java
public void doFilterImpl(ServletRequest pRequest, ServletResponse pResponse, FilterChain pChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) pRequest; // Get the content type from the request String contentType = request.getContentType(); ...
[ "public", "void", "doFilterImpl", "(", "ServletRequest", "pRequest", ",", "ServletResponse", "pResponse", ",", "FilterChain", "pChain", ")", "throws", "IOException", ",", "ServletException", "{", "HttpServletRequest", "request", "=", "(", "HttpServletRequest", ")", "p...
Examines the request content type, and if it is a {@code multipart/*} request, wraps the request with a {@code HttpFileUploadRequest}. @param pRequest The servlet request @param pResponse The servlet response @param pChain The filter chain @throws ServletException @throws IOException
[ "Examines", "the", "request", "content", "type", "and", "if", "it", "is", "a", "{", "@code", "multipart", "/", "*", "}", "request", "wraps", "the", "request", "with", "a", "{", "@code", "HttpFileUploadRequest", "}", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/servlet/src/main/java/com/twelvemonkeys/servlet/fileupload/FileUploadFilter.java#L110-L122
ben-manes/caffeine
simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/climbing/HillClimberWindowTinyLfuPolicy.java
HillClimberWindowTinyLfuPolicy.onMiss
private void onMiss(long key) { """ Adds the entry to the admission window, evicting if necessary. """ Node node = new Node(key, WINDOW); node.appendToTail(headWindow); data.put(key, node); windowSize++; evict(); }
java
private void onMiss(long key) { Node node = new Node(key, WINDOW); node.appendToTail(headWindow); data.put(key, node); windowSize++; evict(); }
[ "private", "void", "onMiss", "(", "long", "key", ")", "{", "Node", "node", "=", "new", "Node", "(", "key", ",", "WINDOW", ")", ";", "node", ".", "appendToTail", "(", "headWindow", ")", ";", "data", ".", "put", "(", "key", ",", "node", ")", ";", "...
Adds the entry to the admission window, evicting if necessary.
[ "Adds", "the", "entry", "to", "the", "admission", "window", "evicting", "if", "necessary", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/climbing/HillClimberWindowTinyLfuPolicy.java#L149-L155
eclipse/xtext-core
org.eclipse.xtext/src/org/eclipse/xtext/generator/trace/internal/AbstractTrace.java
AbstractTrace.createLocationInResourceFor
protected ILocationInResource createLocationInResourceFor(ILocationData location, AbstractTraceRegion traceRegion) { """ Creates a new location for a target resource that matches the given {@code location}. @param location the location @return the location in resource, <code>null</code> detecting a path fails. ...
java
protected ILocationInResource createLocationInResourceFor(ILocationData location, AbstractTraceRegion traceRegion) { SourceRelativeURI path = location.getSrcRelativePath(); if (path == null) path = traceRegion.getAssociatedSrcRelativePath(); if (path == null) return null; return createLocationInResource(l...
[ "protected", "ILocationInResource", "createLocationInResourceFor", "(", "ILocationData", "location", ",", "AbstractTraceRegion", "traceRegion", ")", "{", "SourceRelativeURI", "path", "=", "location", ".", "getSrcRelativePath", "(", ")", ";", "if", "(", "path", "==", "...
Creates a new location for a target resource that matches the given {@code location}. @param location the location @return the location in resource, <code>null</code> detecting a path fails.
[ "Creates", "a", "new", "location", "for", "a", "target", "resource", "that", "matches", "the", "given", "{" ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/generator/trace/internal/AbstractTrace.java#L221-L228
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/payments/PublicTokenUrl.java
PublicTokenUrl.executeUrl
public static MozuUrl executeUrl(String cardType, String responseFields) { """ Get Resource Url for Execute @param cardType @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data....
java
public static MozuUrl executeUrl(String cardType, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/payments/tokens/{cardType}/execute?responseFields={responseFields}"); formatter.formatUrl("cardType", cardType); formatter.formatUrl("responseFields", responseFields); return new ...
[ "public", "static", "MozuUrl", "executeUrl", "(", "String", "cardType", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/payments/tokens/{cardType}/execute?responseFields={responseFields}\"", ")", ";", ...
Get Resource Url for Execute @param cardType @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss. @return String ...
[ "Get", "Resource", "Url", "for", "Execute" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/payments/PublicTokenUrl.java#L34-L40
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java
LogViewer.collectAllKids
private long collectAllKids(ArrayList<DisplayInstance> result, ServerInstanceLogRecordList list) { """ collects all descendant instances into an array and calculates largest timestamp of their first records. @param result array to add all descendant instances to. @param list the root instance result. @return...
java
private long collectAllKids(ArrayList<DisplayInstance> result, ServerInstanceLogRecordList list) { long timestamp = -1; RepositoryLogRecord first = list.iterator().next(); if (first != null) { timestamp = first.getMillis(); } for (Entry<String, ServerInstanceLogReco...
[ "private", "long", "collectAllKids", "(", "ArrayList", "<", "DisplayInstance", ">", "result", ",", "ServerInstanceLogRecordList", "list", ")", "{", "long", "timestamp", "=", "-", "1", ";", "RepositoryLogRecord", "first", "=", "list", ".", "iterator", "(", ")", ...
collects all descendant instances into an array and calculates largest timestamp of their first records. @param result array to add all descendant instances to. @param list the root instance result. @return largest timestamp among first record timestamps.
[ "collects", "all", "descendant", "instances", "into", "an", "array", "and", "calculates", "largest", "timestamp", "of", "their", "first", "records", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/viewer/LogViewer.java#L1022-L1043
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/util/GosuStringUtil.java
GosuStringUtil.lastIndexOfAny
public static int lastIndexOfAny(String str, String[] searchStrs) { """ <p>Find the latest index of any of a set of potential substrings.</p> <p>A <code>null</code> String will return <code>-1</code>. A <code>null</code> search array will return <code>-1</code>. A <code>null</code> or zero length search array...
java
public static int lastIndexOfAny(String str, String[] searchStrs) { if ((str == null) || (searchStrs == null)) { return -1; } int sz = searchStrs.length; int ret = -1; int tmp = 0; for (int i = 0; i < sz; i++) { String search = searchStrs[i]; if (search ...
[ "public", "static", "int", "lastIndexOfAny", "(", "String", "str", ",", "String", "[", "]", "searchStrs", ")", "{", "if", "(", "(", "str", "==", "null", ")", "||", "(", "searchStrs", "==", "null", ")", ")", "{", "return", "-", "1", ";", "}", "int",...
<p>Find the latest index of any of a set of potential substrings.</p> <p>A <code>null</code> String will return <code>-1</code>. A <code>null</code> search array will return <code>-1</code>. A <code>null</code> or zero length search array entry will be ignored, but a search array containing "" will return the length o...
[ "<p", ">", "Find", "the", "latest", "index", "of", "any", "of", "a", "set", "of", "potential", "substrings", ".", "<", "/", "p", ">" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/util/GosuStringUtil.java#L1476-L1494
ksclarke/vertx-pairtree
src/main/java/info/freelibrary/pairtree/PairtreeUtils.java
PairtreeUtils.removeBasePath
public static String removeBasePath(final String aBasePath, final String aPtPath) { """ Removes the base path from the supplied Pairtree path. @param aBasePath A base path for a Pairtree path @param aPtPath A Pairtree path @return The Pairtree path without the base path @throws PairtreeRuntimeException If th...
java
public static String removeBasePath(final String aBasePath, final String aPtPath) { Objects.requireNonNull(aBasePath, LOGGER.getMessage(MessageCodes.PT_007)); Objects.requireNonNull(aPtPath, LOGGER.getMessage(MessageCodes.PT_003)); String newPath = aPtPath; if (aPtPath.startsWith(aBase...
[ "public", "static", "String", "removeBasePath", "(", "final", "String", "aBasePath", ",", "final", "String", "aPtPath", ")", "{", "Objects", ".", "requireNonNull", "(", "aBasePath", ",", "LOGGER", ".", "getMessage", "(", "MessageCodes", ".", "PT_007", ")", ")"...
Removes the base path from the supplied Pairtree path. @param aBasePath A base path for a Pairtree path @param aPtPath A Pairtree path @return The Pairtree path without the base path @throws PairtreeRuntimeException If the supplied base path or Pairtree path are null
[ "Removes", "the", "base", "path", "from", "the", "supplied", "Pairtree", "path", "." ]
train
https://github.com/ksclarke/vertx-pairtree/blob/b2ea1e32057e5df262e9265540d346a732b718df/src/main/java/info/freelibrary/pairtree/PairtreeUtils.java#L366-L381
haifengl/smile
core/src/main/java/smile/util/SmileUtils.java
SmileUtils.learnGaussianRadialBasis
public static <T> GaussianRadialBasis learnGaussianRadialBasis(T[] x, T[] centers, Metric<T> distance) { """ Learns Gaussian RBF function and centers from data. The centers are chosen as the medoids of CLARANS. Let d<sub>max</sub> be the maximum distance between the chosen centers, the standard deviation (i.e. w...
java
public static <T> GaussianRadialBasis learnGaussianRadialBasis(T[] x, T[] centers, Metric<T> distance) { int k = centers.length; CLARANS<T> clarans = new CLARANS<>(x, distance, k, Math.min(100, (int) Math.round(0.01 * k * (x.length - k)))); System.arraycopy(clarans.medoids(), 0, centers, 0, k); ...
[ "public", "static", "<", "T", ">", "GaussianRadialBasis", "learnGaussianRadialBasis", "(", "T", "[", "]", "x", ",", "T", "[", "]", "centers", ",", "Metric", "<", "T", ">", "distance", ")", "{", "int", "k", "=", "centers", ".", "length", ";", "CLARANS",...
Learns Gaussian RBF function and centers from data. The centers are chosen as the medoids of CLARANS. Let d<sub>max</sub> be the maximum distance between the chosen centers, the standard deviation (i.e. width) of Gaussian radial basis function is d<sub>max</sub> / sqrt(2*k), where k is number of centers. In this way, t...
[ "Learns", "Gaussian", "RBF", "function", "and", "centers", "from", "data", ".", "The", "centers", "are", "chosen", "as", "the", "medoids", "of", "CLARANS", ".", "Let", "d<sub", ">", "max<", "/", "sub", ">", "be", "the", "maximum", "distance", "between", ...
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/util/SmileUtils.java#L204-L221
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/selenium/SeleniumHelper.java
SeleniumHelper.html5DragAndDrop
public void html5DragAndDrop(WebElement source, WebElement target) throws IOException { """ Simulates a drag from source element and drop to target element. HTML5 draggable-compatible Workaround for https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/3604 Uses https://github.com/Photonios/JS-...
java
public void html5DragAndDrop(WebElement source, WebElement target) throws IOException { URL url = Resources.getResource(DRAG_AND_DROP_SIM_JS_RESOURCE); String js = Resources.toString(url, Charsets.UTF_8); executeJavascript(js + " DndSimulator.simulate(arguments[0], arguments[1]);" , source, targ...
[ "public", "void", "html5DragAndDrop", "(", "WebElement", "source", ",", "WebElement", "target", ")", "throws", "IOException", "{", "URL", "url", "=", "Resources", ".", "getResource", "(", "DRAG_AND_DROP_SIM_JS_RESOURCE", ")", ";", "String", "js", "=", "Resources",...
Simulates a drag from source element and drop to target element. HTML5 draggable-compatible Workaround for https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/3604 Uses https://github.com/Photonios/JS-DragAndDrop-Simulator for maximum compatibility @param source element to start the drag @param targ...
[ "Simulates", "a", "drag", "from", "source", "element", "and", "drop", "to", "target", "element", ".", "HTML5", "draggable", "-", "compatible", "Workaround", "for", "https", ":", "//", "github", ".", "com", "/", "seleniumhq", "/", "selenium", "-", "google", ...
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/selenium/SeleniumHelper.java#L594-L598
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.ip_mitigationProfiles_POST
public OvhMitigationProfile ip_mitigationProfiles_POST(String ip, OvhMitigationProfileAutoMitigationTimeOutEnum autoMitigationTimeOut, String ipMitigationProfile) throws IOException { """ Create new profile for one of your ip REST: POST /ip/{ip}/mitigationProfiles @param ipMitigationProfile [required] @param ...
java
public OvhMitigationProfile ip_mitigationProfiles_POST(String ip, OvhMitigationProfileAutoMitigationTimeOutEnum autoMitigationTimeOut, String ipMitigationProfile) throws IOException { String qPath = "/ip/{ip}/mitigationProfiles"; StringBuilder sb = path(qPath, ip); HashMap<String, Object>o = new HashMap<String, O...
[ "public", "OvhMitigationProfile", "ip_mitigationProfiles_POST", "(", "String", "ip", ",", "OvhMitigationProfileAutoMitigationTimeOutEnum", "autoMitigationTimeOut", ",", "String", "ipMitigationProfile", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/{ip}/mitig...
Create new profile for one of your ip REST: POST /ip/{ip}/mitigationProfiles @param ipMitigationProfile [required] @param autoMitigationTimeOut [required] Delay to wait before remove ip from auto mitigation after an attack @param ip [required]
[ "Create", "new", "profile", "for", "one", "of", "your", "ip" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L955-L963
neo4j/neo4j-java-driver
driver/src/main/java/org/neo4j/driver/internal/security/TrustOnFirstUseTrustManager.java
TrustOnFirstUseTrustManager.saveTrustedHost
private void saveTrustedHost( String fingerprint ) throws IOException { """ Save a new (server_ip, cert) pair into knownHosts file @param fingerprint the SHA-512 fingerprint of the host certificate """ this.fingerprint = fingerprint; logger.info( "Adding %s as known and trusted certificate ...
java
private void saveTrustedHost( String fingerprint ) throws IOException { this.fingerprint = fingerprint; logger.info( "Adding %s as known and trusted certificate for %s.", fingerprint, serverId ); createKnownCertFileIfNotExists(); assertKnownHostFileWritable(); try ( Buffere...
[ "private", "void", "saveTrustedHost", "(", "String", "fingerprint", ")", "throws", "IOException", "{", "this", ".", "fingerprint", "=", "fingerprint", ";", "logger", ".", "info", "(", "\"Adding %s as known and trusted certificate for %s.\"", ",", "fingerprint", ",", "...
Save a new (server_ip, cert) pair into knownHosts file @param fingerprint the SHA-512 fingerprint of the host certificate
[ "Save", "a", "new", "(", "server_ip", "cert", ")", "pair", "into", "knownHosts", "file" ]
train
https://github.com/neo4j/neo4j-java-driver/blob/8dad6c48251fa1ab7017e72d9998a24fa2337a22/driver/src/main/java/org/neo4j/driver/internal/security/TrustOnFirstUseTrustManager.java#L109-L122
davetcc/tcMenu
tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/controller/OSXAdapter.java
OSXAdapter.setPreferencesHandler
public static void setPreferencesHandler(Object target, Method prefsHandler) { """ They will be called when the Preferences menu item is selected from the application menu """ boolean enablePrefsMenu = (target != null && prefsHandler != null); if (enablePrefsMenu) { setHandler(new O...
java
public static void setPreferencesHandler(Object target, Method prefsHandler) { boolean enablePrefsMenu = (target != null && prefsHandler != null); if (enablePrefsMenu) { setHandler(new OSXAdapter("handlePreferences", target, prefsHandler)); } // If we're setting a handler, en...
[ "public", "static", "void", "setPreferencesHandler", "(", "Object", "target", ",", "Method", "prefsHandler", ")", "{", "boolean", "enablePrefsMenu", "=", "(", "target", "!=", "null", "&&", "prefsHandler", "!=", "null", ")", ";", "if", "(", "enablePrefsMenu", "...
They will be called when the Preferences menu item is selected from the application menu
[ "They", "will", "be", "called", "when", "the", "Preferences", "menu", "item", "is", "selected", "from", "the", "application", "menu" ]
train
https://github.com/davetcc/tcMenu/blob/61546e4b982b25ceaff384073fe9ec1fff55e64a/tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/controller/OSXAdapter.java#L109-L123
wcm-io/wcm-io-wcm
commons/src/main/java/io/wcm/wcm/commons/caching/CacheHeader.java
CacheHeader.setExpires
public static void setExpires(@NotNull HttpServletResponse response, @Nullable Date date) { """ Set expires header to given date. @param response Response @param date Expires date """ if (date == null) { response.setHeader(HEADER_EXPIRES, "-1"); } else { response.setHeader(HEADER_EXPI...
java
public static void setExpires(@NotNull HttpServletResponse response, @Nullable Date date) { if (date == null) { response.setHeader(HEADER_EXPIRES, "-1"); } else { response.setHeader(HEADER_EXPIRES, formatDate(date)); } }
[ "public", "static", "void", "setExpires", "(", "@", "NotNull", "HttpServletResponse", "response", ",", "@", "Nullable", "Date", "date", ")", "{", "if", "(", "date", "==", "null", ")", "{", "response", ".", "setHeader", "(", "HEADER_EXPIRES", ",", "\"-1\"", ...
Set expires header to given date. @param response Response @param date Expires date
[ "Set", "expires", "header", "to", "given", "date", "." ]
train
https://github.com/wcm-io/wcm-io-wcm/blob/8eff9434f2f4b6462fdb718f8769ad793c55b8d7/commons/src/main/java/io/wcm/wcm/commons/caching/CacheHeader.java#L218-L225
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultExternalContentManager.java
DefaultExternalContentManager.getFromWeb
private MIMETypedStream getFromWeb(ContentManagerParams params) throws ModuleInitializationException, GeneralException, RangeNotSatisfiableException { """ Retrieves external content via http or https. @return A MIMETypedStream @throws ModuleInitializationException @throws GeneralException @throws...
java
private MIMETypedStream getFromWeb(ContentManagerParams params) throws ModuleInitializationException, GeneralException, RangeNotSatisfiableException { String username = params.getUsername(); String password = params.getPassword(); boolean backendSSL = false; String url = p...
[ "private", "MIMETypedStream", "getFromWeb", "(", "ContentManagerParams", "params", ")", "throws", "ModuleInitializationException", ",", "GeneralException", ",", "RangeNotSatisfiableException", "{", "String", "username", "=", "params", ".", "getUsername", "(", ")", ";", ...
Retrieves external content via http or https. @return A MIMETypedStream @throws ModuleInitializationException @throws GeneralException @throws RangeNotSatisfiableException
[ "Retrieves", "external", "content", "via", "http", "or", "https", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/storage/DefaultExternalContentManager.java#L352-L397
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/selenium/SeleniumHelper.java
SeleniumHelper.setWebDriver
public void setWebDriver(WebDriver aWebDriver, int defaultTimeout) { """ Sets up webDriver to be used. @param aWebDriver web driver to use. @param defaultTimeout default timeout to wait, in seconds. """ if (webDriver != null && !webDriver.equals(aWebDriver)) { webDriver.quit(); } ...
java
public void setWebDriver(WebDriver aWebDriver, int defaultTimeout) { if (webDriver != null && !webDriver.equals(aWebDriver)) { webDriver.quit(); } webDriver = aWebDriver; if (webDriver == null) { webDriverWait = null; } else { webDriverWait = ...
[ "public", "void", "setWebDriver", "(", "WebDriver", "aWebDriver", ",", "int", "defaultTimeout", ")", "{", "if", "(", "webDriver", "!=", "null", "&&", "!", "webDriver", ".", "equals", "(", "aWebDriver", ")", ")", "{", "webDriver", ".", "quit", "(", ")", "...
Sets up webDriver to be used. @param aWebDriver web driver to use. @param defaultTimeout default timeout to wait, in seconds.
[ "Sets", "up", "webDriver", "to", "be", "used", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/selenium/SeleniumHelper.java#L101-L112
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/circulant/CirculantTracker.java
CirculantTracker.setTrackLocation
public void setTrackLocation( int x0 , int y0 , int regionWidth , int regionHeight ) { """ Used to change the track's location. If this method is used it is assumed that tracking is active and that the appearance of the target has not changed @param x0 top-left corner of region @param y0 top-left corner of regi...
java
public void setTrackLocation( int x0 , int y0 , int regionWidth , int regionHeight ) { if( imageWidth < regionWidth || imageHeight < regionHeight) throw new IllegalArgumentException("Track region is larger than input image: "+regionWidth+" "+regionHeight); regionOut.width = regionWidth; regionOut.height = reg...
[ "public", "void", "setTrackLocation", "(", "int", "x0", ",", "int", "y0", ",", "int", "regionWidth", ",", "int", "regionHeight", ")", "{", "if", "(", "imageWidth", "<", "regionWidth", "||", "imageHeight", "<", "regionHeight", ")", "throw", "new", "IllegalArg...
Used to change the track's location. If this method is used it is assumed that tracking is active and that the appearance of the target has not changed @param x0 top-left corner of region @param y0 top-left corner of region @param regionWidth region's width @param regionHeight region's height
[ "Used", "to", "change", "the", "track", "s", "location", ".", "If", "this", "method", "is", "used", "it", "is", "assumed", "that", "tracking", "is", "active", "and", "that", "the", "appearance", "of", "the", "target", "has", "not", "changed" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/circulant/CirculantTracker.java#L207-L230
alkacon/opencms-core
src/org/opencms/main/OpenCmsServlet.java
OpenCmsServlet.openErrorHandler
protected void openErrorHandler(HttpServletRequest req, HttpServletResponse res, int errorCode) throws IOException, ServletException { """ Displays an error code handler loaded from the OpenCms VFS, or if such a page does not exist, displays the default servlet container error code.<p> @param req the curr...
java
protected void openErrorHandler(HttpServletRequest req, HttpServletResponse res, int errorCode) throws IOException, ServletException { String handlerUri = (new StringBuffer(64)).append(HANDLE_VFS_PATH).append(errorCode).append( HANDLE_VFS_SUFFIX).toString(); // provide the original erro...
[ "protected", "void", "openErrorHandler", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ",", "int", "errorCode", ")", "throws", "IOException", ",", "ServletException", "{", "String", "handlerUri", "=", "(", "new", "StringBuffer", "(", "64", "...
Displays an error code handler loaded from the OpenCms VFS, or if such a page does not exist, displays the default servlet container error code.<p> @param req the current request @param res the current response @param errorCode the error code to display @throws IOException if something goes wrong @throws ServletExcept...
[ "Displays", "an", "error", "code", "handler", "loaded", "from", "the", "OpenCms", "VFS", "or", "if", "such", "a", "page", "does", "not", "exist", "displays", "the", "default", "servlet", "container", "error", "code", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/main/OpenCmsServlet.java#L309-L354
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/ace/Event.java
Event.setMentions
public void setMentions(int i, EventMention v) { """ indexed setter for mentions - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array """ if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_mentions == null) jcasType.jcas.throwFeatMis...
java
public void setMentions(int i, EventMention v) { if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_mentions == null) jcasType.jcas.throwFeatMissing("mentions", "de.julielab.jules.types.ace.Event"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Event_Type)jcasType).casFeat...
[ "public", "void", "setMentions", "(", "int", "i", ",", "EventMention", "v", ")", "{", "if", "(", "Event_Type", ".", "featOkTst", "&&", "(", "(", "Event_Type", ")", "jcasType", ")", ".", "casFeat_mentions", "==", "null", ")", "jcasType", ".", "jcas", ".",...
indexed setter for mentions - sets an indexed value - @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "mentions", "-", "sets", "an", "indexed", "value", "-" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/ace/Event.java#L292-L296
intuit/QuickBooks-V3-Java-SDK
oauth2-platform-api/src/main/java/com/intuit/oauth2/client/OAuth2PlatformClient.java
OAuth2PlatformClient.getUserInfo
public UserInfoResponse getUserInfo(String accessToken) throws OpenIdException { """ Method to retrieve UserInfo data associated with the accessToken generated The response depends on the Scope supplied during openId @param accessToken @return @throws OpenIdException """ logger.debug("Enter OAut...
java
public UserInfoResponse getUserInfo(String accessToken) throws OpenIdException { logger.debug("Enter OAuth2PlatformClient::getUserInfo"); try { HttpRequestClient client = new HttpRequestClient(oauth2Config.getProxyConfig()); Request request = new Request.RequestBuilder(...
[ "public", "UserInfoResponse", "getUserInfo", "(", "String", "accessToken", ")", "throws", "OpenIdException", "{", "logger", ".", "debug", "(", "\"Enter OAuth2PlatformClient::getUserInfo\"", ")", ";", "try", "{", "HttpRequestClient", "client", "=", "new", "HttpRequestCli...
Method to retrieve UserInfo data associated with the accessToken generated The response depends on the Scope supplied during openId @param accessToken @return @throws OpenIdException
[ "Method", "to", "retrieve", "UserInfo", "data", "associated", "with", "the", "accessToken", "generated", "The", "response", "depends", "on", "the", "Scope", "supplied", "during", "openId" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/oauth2-platform-api/src/main/java/com/intuit/oauth2/client/OAuth2PlatformClient.java#L237-L265
kmi/iserve
iserve-elda/src/main/java/uk/ac/open/kmi/iserve/elda/EldaRouterRestletSupport.java
EldaRouterRestletSupport.createRouterFor
public static Router createRouterFor(ServletContext con) { """ Create a new Router initialised with the configs appropriate to the contextPath. """ String contextName = EldaRouterRestletSupport.flatContextPath(con.getContextPath()); List<PrefixAndFilename> pfs = prefixAndFilenames(con, context...
java
public static Router createRouterFor(ServletContext con) { String contextName = EldaRouterRestletSupport.flatContextPath(con.getContextPath()); List<PrefixAndFilename> pfs = prefixAndFilenames(con, contextName); // Router result = new DefaultRouter(); String baseFilePath = Servle...
[ "public", "static", "Router", "createRouterFor", "(", "ServletContext", "con", ")", "{", "String", "contextName", "=", "EldaRouterRestletSupport", ".", "flatContextPath", "(", "con", ".", "getContextPath", "(", ")", ")", ";", "List", "<", "PrefixAndFilename", ">",...
Create a new Router initialised with the configs appropriate to the contextPath.
[ "Create", "a", "new", "Router", "initialised", "with", "the", "configs", "appropriate", "to", "the", "contextPath", "." ]
train
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-elda/src/main/java/uk/ac/open/kmi/iserve/elda/EldaRouterRestletSupport.java#L109-L127
spring-projects/spring-loaded
springloaded/src/main/java/org/springsource/loaded/Utils.java
Utils.loadFromStream
public static byte[] loadFromStream(InputStream stream) { """ Load the contents of an input stream. @param stream input stream that contains the bytes to load @return the byte array loaded from the input stream """ try { BufferedInputStream bis = new BufferedInputStream(stream); int size = 2048; ...
java
public static byte[] loadFromStream(InputStream stream) { try { BufferedInputStream bis = new BufferedInputStream(stream); int size = 2048; byte[] theData = new byte[size]; int dataReadSoFar = 0; byte[] buffer = new byte[size / 2]; int read = 0; while ((read = bis.read(buffer)) != -1) { if ((...
[ "public", "static", "byte", "[", "]", "loadFromStream", "(", "InputStream", "stream", ")", "{", "try", "{", "BufferedInputStream", "bis", "=", "new", "BufferedInputStream", "(", "stream", ")", ";", "int", "size", "=", "2048", ";", "byte", "[", "]", "theDat...
Load the contents of an input stream. @param stream input stream that contains the bytes to load @return the byte array loaded from the input stream
[ "Load", "the", "contents", "of", "an", "input", "stream", "." ]
train
https://github.com/spring-projects/spring-loaded/blob/59b32f957a05c6d9f149148158053605e2a6205a/springloaded/src/main/java/org/springsource/loaded/Utils.java#L1399-L1427
sagiegurari/fax4j
src/main/java/org/fax4j/spi/hoiio/HoiioFaxClientSpi.java
HoiioFaxClientSpi.updateHTTPResponseHandlerConfiguration
@Override protected void updateHTTPResponseHandlerConfiguration(Map<String,String> configuration) { """ Hook for extending classes. @param configuration The response handler configuration """ //get property part String propertyPart=this.getPropertyPart(); //modify configurati...
java
@Override protected void updateHTTPResponseHandlerConfiguration(Map<String,String> configuration) { //get property part String propertyPart=this.getPropertyPart(); //modify configuration configuration.put(MessageFormat.format(JSONHTTPResponseHandlerConfigurationConstants.SUBMIT_...
[ "@", "Override", "protected", "void", "updateHTTPResponseHandlerConfiguration", "(", "Map", "<", "String", ",", "String", ">", "configuration", ")", "{", "//get property part", "String", "propertyPart", "=", "this", ".", "getPropertyPart", "(", ")", ";", "//modify c...
Hook for extending classes. @param configuration The response handler configuration
[ "Hook", "for", "extending", "classes", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/hoiio/HoiioFaxClientSpi.java#L202-L215
OpenLiberty/open-liberty
dev/com.ibm.ws.security.audit.file/src/com/ibm/ws/security/audit/logutils/FileLog.java
FileLog.writeRecord
public synchronized void writeRecord(byte[] record, String header) { """ Write a pre-formated record. This is used for when we have signed and/or encrypted audit records. @param record """ long length = record.length + nlen; PrintStream ps = getPrintStream(length, header); if (isWin...
java
public synchronized void writeRecord(byte[] record, String header) { long length = record.length + nlen; PrintStream ps = getPrintStream(length, header); if (isWindows) ps.write(record, 0, (int) length - 2); else ps.write(record, 0, (int) length - 1); ps....
[ "public", "synchronized", "void", "writeRecord", "(", "byte", "[", "]", "record", ",", "String", "header", ")", "{", "long", "length", "=", "record", ".", "length", "+", "nlen", ";", "PrintStream", "ps", "=", "getPrintStream", "(", "length", ",", "header",...
Write a pre-formated record. This is used for when we have signed and/or encrypted audit records. @param record
[ "Write", "a", "pre", "-", "formated", "record", ".", "This", "is", "used", "for", "when", "we", "have", "signed", "and", "/", "or", "encrypted", "audit", "records", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.audit.file/src/com/ibm/ws/security/audit/logutils/FileLog.java#L223-L232
box/box-java-sdk
src/main/java/com/box/sdk/BoxGroup.java
BoxGroup.getAllGroupsByName
public static Iterable<BoxGroup.Info> getAllGroupsByName(final BoxAPIConnection api, String name) { """ Gets an iterable of all the groups in the enterprise that are starting with the given name string. @param api the API connection to be used when retrieving the groups. @param name the name prefix of the grou...
java
public static Iterable<BoxGroup.Info> getAllGroupsByName(final BoxAPIConnection api, String name) { final QueryStringBuilder builder = new QueryStringBuilder(); if (name == null || name.trim().isEmpty()) { throw new BoxAPIException("Searching groups by name requires a non NULL or non empty n...
[ "public", "static", "Iterable", "<", "BoxGroup", ".", "Info", ">", "getAllGroupsByName", "(", "final", "BoxAPIConnection", "api", ",", "String", "name", ")", "{", "final", "QueryStringBuilder", "builder", "=", "new", "QueryStringBuilder", "(", ")", ";", "if", ...
Gets an iterable of all the groups in the enterprise that are starting with the given name string. @param api the API connection to be used when retrieving the groups. @param name the name prefix of the groups. If the groups need to searched by full name that has spaces, then the parameter string should have been wra...
[ "Gets", "an", "iterable", "of", "all", "the", "groups", "in", "the", "enterprise", "that", "are", "starting", "with", "the", "given", "name", "string", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxGroup.java#L150-L164
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java
FilesImpl.listFromTaskWithServiceResponseAsync
public Observable<ServiceResponseWithHeaders<Page<NodeFile>, FileListFromTaskHeaders>> listFromTaskWithServiceResponseAsync(final String jobId, final String taskId, final Boolean recursive, final FileListFromTaskOptions fileListFromTaskOptions) { """ Lists the files in a task's directory on its compute node. @p...
java
public Observable<ServiceResponseWithHeaders<Page<NodeFile>, FileListFromTaskHeaders>> listFromTaskWithServiceResponseAsync(final String jobId, final String taskId, final Boolean recursive, final FileListFromTaskOptions fileListFromTaskOptions) { return listFromTaskSinglePageAsync(jobId, taskId, recursive, file...
[ "public", "Observable", "<", "ServiceResponseWithHeaders", "<", "Page", "<", "NodeFile", ">", ",", "FileListFromTaskHeaders", ">", ">", "listFromTaskWithServiceResponseAsync", "(", "final", "String", "jobId", ",", "final", "String", "taskId", ",", "final", "Boolean", ...
Lists the files in a task's directory on its compute node. @param jobId The ID of the job that contains the task. @param taskId The ID of the task whose files you want to list. @param recursive Whether to list children of the task directory. This parameter can be used in combination with the filter parameter to list s...
[ "Lists", "the", "files", "in", "a", "task", "s", "directory", "on", "its", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java#L1813-L1832
phax/ph-schedule
ph-mini-quartz/src/main/java/com/helger/quartz/CalendarIntervalScheduleBuilder.java
CalendarIntervalScheduleBuilder.withInterval
@Nonnull public CalendarIntervalScheduleBuilder withInterval (final int timeInterval, @Nonnull final EIntervalUnit unit) { """ Specify the time unit and interval for the Trigger to be produced. @param timeInterval the interval at which the trigger should repeat. @param unit the time unit (IntervalUnit) of ...
java
@Nonnull public CalendarIntervalScheduleBuilder withInterval (final int timeInterval, @Nonnull final EIntervalUnit unit) { ValueEnforcer.notNull (unit, "Unit"); _validateInterval (timeInterval); m_nInterval = timeInterval; m_eIntervalUnit = unit; return this; }
[ "@", "Nonnull", "public", "CalendarIntervalScheduleBuilder", "withInterval", "(", "final", "int", "timeInterval", ",", "@", "Nonnull", "final", "EIntervalUnit", "unit", ")", "{", "ValueEnforcer", ".", "notNull", "(", "unit", ",", "\"Unit\"", ")", ";", "_validateIn...
Specify the time unit and interval for the Trigger to be produced. @param timeInterval the interval at which the trigger should repeat. @param unit the time unit (IntervalUnit) of the interval. @return the updated CalendarIntervalScheduleBuilder @see ICalendarIntervalTrigger#getRepeatInterval() @see ICalendarIntervalT...
[ "Specify", "the", "time", "unit", "and", "interval", "for", "the", "Trigger", "to", "be", "produced", "." ]
train
https://github.com/phax/ph-schedule/blob/b000790b46a9f8d23ad44cc20591f753d07c0229/ph-mini-quartz/src/main/java/com/helger/quartz/CalendarIntervalScheduleBuilder.java#L114-L122
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java
Gen.checkDimension
private void checkDimension(DiagnosticPosition pos, Type t) { """ Check if the given type is an array with too many dimensions. """ switch (t.getTag()) { case METHOD: checkDimension(pos, t.getReturnType()); for (List<Type> args = t.getParameterTypes(); args.nonEmpty(); a...
java
private void checkDimension(DiagnosticPosition pos, Type t) { switch (t.getTag()) { case METHOD: checkDimension(pos, t.getReturnType()); for (List<Type> args = t.getParameterTypes(); args.nonEmpty(); args = args.tail) checkDimension(pos, args.head); br...
[ "private", "void", "checkDimension", "(", "DiagnosticPosition", "pos", ",", "Type", "t", ")", "{", "switch", "(", "t", ".", "getTag", "(", ")", ")", "{", "case", "METHOD", ":", "checkDimension", "(", "pos", ",", "t", ".", "getReturnType", "(", ")", ")"...
Check if the given type is an array with too many dimensions.
[ "Check", "if", "the", "given", "type", "is", "an", "array", "with", "too", "many", "dimensions", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java#L263-L279
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.angleUtility
public static <S extends Solution<?>> void angleUtility(List<S> solutionsList, double[][] extremePoints) { """ Scalarization values based on angle utility (see Angle-based Preference Models in Multi-objective Optimization by Braun et al.). @param solutionsList A list of solutions. @param extremePoints used fo...
java
public static <S extends Solution<?>> void angleUtility(List<S> solutionsList, double[][] extremePoints) { for (S solution : solutionsList) { double fraction = 0.0; for (int i = 0; i < extremePoints.length; i++) { double numerator = 0.0; double denominator = 0.0; for (int j...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "angleUtility", "(", "List", "<", "S", ">", "solutionsList", ",", "double", "[", "]", "[", "]", "extremePoints", ")", "{", "for", "(", "S", "solution", ":", "solutionsList...
Scalarization values based on angle utility (see Angle-based Preference Models in Multi-objective Optimization by Braun et al.). @param solutionsList A list of solutions. @param extremePoints used for angle computation.
[ "Scalarization", "values", "based", "on", "angle", "utility", "(", "see", "Angle", "-", "based", "Preference", "Models", "in", "Multi", "-", "objective", "Optimization", "by", "Braun", "et", "al", ".", ")", "." ]
train
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L272-L294
thinkaurelius/titan
titan-core/src/main/java/com/thinkaurelius/titan/core/attribute/Geoshape.java
Geoshape.getPoint
public Point getPoint(int position) { """ Returns the point at the given position. The position must be smaller than {@link #size()}. @param position @return """ if (position<0 || position>=size()) throw new ArrayIndexOutOfBoundsException("Invalid position: " + position); return new Point(c...
java
public Point getPoint(int position) { if (position<0 || position>=size()) throw new ArrayIndexOutOfBoundsException("Invalid position: " + position); return new Point(coordinates[0][position],coordinates[1][position]); }
[ "public", "Point", "getPoint", "(", "int", "position", ")", "{", "if", "(", "position", "<", "0", "||", "position", ">=", "size", "(", ")", ")", "throw", "new", "ArrayIndexOutOfBoundsException", "(", "\"Invalid position: \"", "+", "position", ")", ";", "retu...
Returns the point at the given position. The position must be smaller than {@link #size()}. @param position @return
[ "Returns", "the", "point", "at", "the", "given", "position", ".", "The", "position", "must", "be", "smaller", "than", "{", "@link", "#size", "()", "}", "." ]
train
https://github.com/thinkaurelius/titan/blob/ee226e52415b8bf43b700afac75fa5b9767993a5/titan-core/src/main/java/com/thinkaurelius/titan/core/attribute/Geoshape.java#L181-L184
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/scan/ast/TypeInterestFactory.java
TypeInterestFactory.registerInterest
public static void registerInterest(String sourceKey, String regex, String rewritePattern, List<TypeReferenceLocation> locations) { """ Register a regex pattern to filter interest in certain Java types. @param sourceKey Identifier of who gave the pattern to us (so that we can update it) """ registerI...
java
public static void registerInterest(String sourceKey, String regex, String rewritePattern, List<TypeReferenceLocation> locations) { registerInterest(sourceKey, regex, rewritePattern, locations.toArray(new TypeReferenceLocation[locations.size()])); }
[ "public", "static", "void", "registerInterest", "(", "String", "sourceKey", ",", "String", "regex", ",", "String", "rewritePattern", ",", "List", "<", "TypeReferenceLocation", ">", "locations", ")", "{", "registerInterest", "(", "sourceKey", ",", "regex", ",", "...
Register a regex pattern to filter interest in certain Java types. @param sourceKey Identifier of who gave the pattern to us (so that we can update it)
[ "Register", "a", "regex", "pattern", "to", "filter", "interest", "in", "certain", "Java", "types", "." ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/scan/ast/TypeInterestFactory.java#L88-L91
redkale/redkale
src/org/redkale/asm/ClassReader.java
ClassReader.readAnnotationTarget
private int readAnnotationTarget(final Context context, int u) { """ Parses the header of a type annotation to extract its target_type and target_path (the result is stored in the given context), and returns the start offset of the rest of the type_annotation structure (i.e. the offset to the type_index field, ...
java
private int readAnnotationTarget(final Context context, int u) { int target = readInt(u); switch (target >>> 24) { case 0x00: // CLASS_TYPE_PARAMETER case 0x01: // METHOD_TYPE_PARAMETER case 0x16: // METHOD_FORMAL_PARAMETER target &= 0xFFFF0000; u += 2; ...
[ "private", "int", "readAnnotationTarget", "(", "final", "Context", "context", ",", "int", "u", ")", "{", "int", "target", "=", "readInt", "(", "u", ")", ";", "switch", "(", "target", ">>>", "24", ")", "{", "case", "0x00", ":", "// CLASS_TYPE_PARAMETER", ...
Parses the header of a type annotation to extract its target_type and target_path (the result is stored in the given context), and returns the start offset of the rest of the type_annotation structure (i.e. the offset to the type_index field, which is followed by num_element_value_pairs and then the name,value pairs). ...
[ "Parses", "the", "header", "of", "a", "type", "annotation", "to", "extract", "its", "target_type", "and", "target_path", "(", "the", "result", "is", "stored", "in", "the", "given", "context", ")", "and", "returns", "the", "start", "offset", "of", "the", "r...
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/asm/ClassReader.java#L1864-L1923
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/websphere/logging/hpel/reader/RemoteResultCollector.java
RemoteResultCollector.getLogLists
public RemoteAllResults getLogLists(LogQueryBean logQueryBean, RepositoryPointer after) throws LogRepositoryException { """ retrieves results for all server instances in the repository. @param logQueryBean query indicator @param after starting location of instances to be return. @return Set of all server inst...
java
public RemoteAllResults getLogLists(LogQueryBean logQueryBean, RepositoryPointer after) throws LogRepositoryException { RemoteAllResults result = new RemoteAllResults(logQueryBean); Iterable<ServerInstanceLogRecordList> lists; if (after == null) { lists = logReader.getLogLists(logQueryBean); } else { list...
[ "public", "RemoteAllResults", "getLogLists", "(", "LogQueryBean", "logQueryBean", ",", "RepositoryPointer", "after", ")", "throws", "LogRepositoryException", "{", "RemoteAllResults", "result", "=", "new", "RemoteAllResults", "(", "logQueryBean", ")", ";", "Iterable", "<...
retrieves results for all server instances in the repository. @param logQueryBean query indicator @param after starting location of instances to be return. @return Set of all server instances satisfying the query request. @throws LogRepositoryException indicating that an error occurred while reading list of instances ...
[ "retrieves", "results", "for", "all", "server", "instances", "in", "the", "repository", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/websphere/logging/hpel/reader/RemoteResultCollector.java#L45-L57
citrusframework/citrus
modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ExecuteSQLQueryBuilder.java
ExecuteSQLQueryBuilder.validate
public ExecuteSQLQueryBuilder validate(String column, String ... values) { """ Set expected control result set. Keys represent the column names, values the expected values. @param column @param values """ action.getControlResultSet().put(column, Arrays.asList(values)); return this; }
java
public ExecuteSQLQueryBuilder validate(String column, String ... values) { action.getControlResultSet().put(column, Arrays.asList(values)); return this; }
[ "public", "ExecuteSQLQueryBuilder", "validate", "(", "String", "column", ",", "String", "...", "values", ")", "{", "action", ".", "getControlResultSet", "(", ")", ".", "put", "(", "column", ",", "Arrays", ".", "asList", "(", "values", ")", ")", ";", "retur...
Set expected control result set. Keys represent the column names, values the expected values. @param column @param values
[ "Set", "expected", "control", "result", "set", ".", "Keys", "represent", "the", "column", "names", "values", "the", "expected", "values", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ExecuteSQLQueryBuilder.java#L165-L168
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/layout/LayoutParser.java
LayoutParser.getRequiredAttribute
private String getRequiredAttribute(Element node, String name) { """ Returns the value of the named attribute from a DOM node, throwing an exception if not found. @param node The DOM node. @param name The attribute name. @return The attribute value. """ String value = node.getAttribute(name); ...
java
private String getRequiredAttribute(Element node, String name) { String value = node.getAttribute(name); if (value.isEmpty()) { throw new IllegalArgumentException("Missing " + name + " attribute on node: " + node.getTagName()); } return value; }
[ "private", "String", "getRequiredAttribute", "(", "Element", "node", ",", "String", "name", ")", "{", "String", "value", "=", "node", ".", "getAttribute", "(", "name", ")", ";", "if", "(", "value", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "I...
Returns the value of the named attribute from a DOM node, throwing an exception if not found. @param node The DOM node. @param name The attribute name. @return The attribute value.
[ "Returns", "the", "value", "of", "the", "named", "attribute", "from", "a", "DOM", "node", "throwing", "an", "exception", "if", "not", "found", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/layout/LayoutParser.java#L286-L294
geomajas/geomajas-project-client-gwt2
impl/src/main/java/org/geomajas/gwt2/client/gfx/GeometryPath.java
GeometryPath.addSubPath
public void addSubPath(Coordinate[] coordinates, boolean closed) { """ Add a new sub-path to the path. A path can have multiple sub-paths. Sub-paths may be disconnected lines or rings but, thanks to even-odd rule, holes can be added as well. @param coordinates @param closed """ subPaths.add(new SubPath(...
java
public void addSubPath(Coordinate[] coordinates, boolean closed) { subPaths.add(new SubPath(coordinates, closed)); updateCoordinates(); }
[ "public", "void", "addSubPath", "(", "Coordinate", "[", "]", "coordinates", ",", "boolean", "closed", ")", "{", "subPaths", ".", "add", "(", "new", "SubPath", "(", "coordinates", ",", "closed", ")", ")", ";", "updateCoordinates", "(", ")", ";", "}" ]
Add a new sub-path to the path. A path can have multiple sub-paths. Sub-paths may be disconnected lines or rings but, thanks to even-odd rule, holes can be added as well. @param coordinates @param closed
[ "Add", "a", "new", "sub", "-", "path", "to", "the", "path", ".", "A", "path", "can", "have", "multiple", "sub", "-", "paths", ".", "Sub", "-", "paths", "may", "be", "disconnected", "lines", "or", "rings", "but", "thanks", "to", "even", "-", "odd", ...
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/gfx/GeometryPath.java#L130-L134
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-store/xwiki-commons-crypto-store-filesystem/src/main/java/org/xwiki/crypto/store/filesystem/internal/AbstractX509FileSystemStore.java
AbstractX509FileSystemStore.readObject
protected Object readObject(BufferedReader in, byte[] password) throws IOException, GeneralSecurityException { """ Read an object from a PEM like file. @param in the input reader to read from. @param password a password to decrypt encrypted objects. May be null if the object is not encrypted. @return the obje...
java
protected Object readObject(BufferedReader in, byte[] password) throws IOException, GeneralSecurityException { String line; Object obj = null; while ((line = in.readLine()) != null) { obj = processObject(in, line, password); if (obj != null) { break; ...
[ "protected", "Object", "readObject", "(", "BufferedReader", "in", ",", "byte", "[", "]", "password", ")", "throws", "IOException", ",", "GeneralSecurityException", "{", "String", "line", ";", "Object", "obj", "=", "null", ";", "while", "(", "(", "line", "=",...
Read an object from a PEM like file. @param in the input reader to read from. @param password a password to decrypt encrypted objects. May be null if the object is not encrypted. @return the object read. @throws IOException on I/O error. @throws GeneralSecurityException on decryption error.
[ "Read", "an", "object", "from", "a", "PEM", "like", "file", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-crypto/xwiki-commons-crypto-store/xwiki-commons-crypto-store-filesystem/src/main/java/org/xwiki/crypto/store/filesystem/internal/AbstractX509FileSystemStore.java#L207-L220
Bedework/bw-util
bw-util-jms/src/main/java/org/bedework/util/jms/NotificationsHandlerFactory.java
NotificationsHandlerFactory.getHandler
private static NotificationsHandler getHandler(final String queueName, final Properties pr) throws NotificationException { """ Return a handler for the system event @param queueName our queue @param pr jms properties @return NotificationsHandler @throws Notifi...
java
private static NotificationsHandler getHandler(final String queueName, final Properties pr) throws NotificationException { if (handler != null) { return handler; } synchronized (synchit) { handler = new JmsNotificationsHandlerImpl(queueName, pr);...
[ "private", "static", "NotificationsHandler", "getHandler", "(", "final", "String", "queueName", ",", "final", "Properties", "pr", ")", "throws", "NotificationException", "{", "if", "(", "handler", "!=", "null", ")", "{", "return", "handler", ";", "}", "synchroni...
Return a handler for the system event @param queueName our queue @param pr jms properties @return NotificationsHandler @throws NotificationException
[ "Return", "a", "handler", "for", "the", "system", "event" ]
train
https://github.com/Bedework/bw-util/blob/f51de4af3d7eb88fe63a0e22be8898a16c6cc3ad/bw-util-jms/src/main/java/org/bedework/util/jms/NotificationsHandlerFactory.java#L43-L54
box/box-java-sdk
src/main/java/com/box/sdk/BoxTermsOfService.java
BoxTermsOfService.getAllTermsOfServices
public static List<BoxTermsOfService.Info> getAllTermsOfServices(final BoxAPIConnection api, BoxTermsOfService.TermsOfServiceType termsOfServiceType) { """ Retrieves a l...
java
public static List<BoxTermsOfService.Info> getAllTermsOfServices(final BoxAPIConnection api, BoxTermsOfService.TermsOfServiceType termsOfServiceType) { QueryStringBui...
[ "public", "static", "List", "<", "BoxTermsOfService", ".", "Info", ">", "getAllTermsOfServices", "(", "final", "BoxAPIConnection", "api", ",", "BoxTermsOfService", ".", "TermsOfServiceType", "termsOfServiceType", ")", "{", "QueryStringBuilder", "builder", "=", "new", ...
Retrieves a list of Terms of Service that belong to your Enterprise as an Iterable. @param api api the API connection to be used by the resource. @param termsOfServiceType the type of terms of service to be retrieved. Can be set to "managed" or "external" @return the Iterable o...
[ "Retrieves", "a", "list", "of", "Terms", "of", "Service", "that", "belong", "to", "your", "Enterprise", "as", "an", "Iterable", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTermsOfService.java#L102-L126
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/scp/ScpClient.java
ScpClient.get
public void get(String localDir, String[] remoteFiles, boolean recursive) throws SshException, ChannelOpenException { """ <p> Downloads an array of remote files to the local computer. </p> @param localDir The local path to place the files @param remoteFiles The path of the remote files @param recursive...
java
public void get(String localDir, String[] remoteFiles, boolean recursive) throws SshException, ChannelOpenException { get(localDir, remoteFiles, recursive, null); }
[ "public", "void", "get", "(", "String", "localDir", ",", "String", "[", "]", "remoteFiles", ",", "boolean", "recursive", ")", "throws", "SshException", ",", "ChannelOpenException", "{", "get", "(", "localDir", ",", "remoteFiles", ",", "recursive", ",", "null",...
<p> Downloads an array of remote files to the local computer. </p> @param localDir The local path to place the files @param remoteFiles The path of the remote files @param recursive recursively copy the contents of a directory @throws IOException if an IO error occurs during the operation
[ "<p", ">", "Downloads", "an", "array", "of", "remote", "files", "to", "the", "local", "computer", ".", "<", "/", "p", ">" ]
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/scp/ScpClient.java#L324-L327
redkale/redkale
src/org/redkale/net/http/WebSocketNode.java
WebSocketNode.sendMessage
@Local public final CompletableFuture<Integer> sendMessage(final Convert convert, final Object message0, final boolean last, final Stream<? extends Serializable> userids) { """ 向指定用户发送消息,先发送本地连接,再发送远程连接 <br> 如果当前WebSocketNode是远程模式,此方法只发送远程连接 @param convert Convert @param message0 消息内容 @param last ...
java
@Local public final CompletableFuture<Integer> sendMessage(final Convert convert, final Object message0, final boolean last, final Stream<? extends Serializable> userids) { Object[] array = userids.toArray(); Serializable[] ss = new Serializable[array.length]; for (int i = 0; i < array.l...
[ "@", "Local", "public", "final", "CompletableFuture", "<", "Integer", ">", "sendMessage", "(", "final", "Convert", "convert", ",", "final", "Object", "message0", ",", "final", "boolean", "last", ",", "final", "Stream", "<", "?", "extends", "Serializable", ">",...
向指定用户发送消息,先发送本地连接,再发送远程连接 <br> 如果当前WebSocketNode是远程模式,此方法只发送远程连接 @param convert Convert @param message0 消息内容 @param last 是否最后一条 @param userids Stream @return 为0表示成功, 其他值表示部分发送异常
[ "向指定用户发送消息,先发送本地连接,再发送远程连接", "<br", ">", "如果当前WebSocketNode是远程模式,此方法只发送远程连接" ]
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/net/http/WebSocketNode.java#L390-L398
liyiorg/weixin-popular
src/main/java/weixin/popular/client/LocalHttpClient.java
LocalHttpClient.keyStoreExecuteXmlResult
public static <T> T keyStoreExecuteXmlResult(String mch_id,HttpUriRequest request,Class<T> clazz) { """ MCH keyStore 请求 数据返回自动XML对象解析 @param mch_id mch_id @param request request @param clazz clazz @param <T> T @return result """ return keyStoreExecuteXmlResult(mch_id, request, clazz, null,null); }
java
public static <T> T keyStoreExecuteXmlResult(String mch_id,HttpUriRequest request,Class<T> clazz){ return keyStoreExecuteXmlResult(mch_id, request, clazz, null,null); }
[ "public", "static", "<", "T", ">", "T", "keyStoreExecuteXmlResult", "(", "String", "mch_id", ",", "HttpUriRequest", "request", ",", "Class", "<", "T", ">", "clazz", ")", "{", "return", "keyStoreExecuteXmlResult", "(", "mch_id", ",", "request", ",", "clazz", ...
MCH keyStore 请求 数据返回自动XML对象解析 @param mch_id mch_id @param request request @param clazz clazz @param <T> T @return result
[ "MCH", "keyStore", "请求", "数据返回自动XML对象解析" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/client/LocalHttpClient.java#L192-L194
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Agg.java
Agg.denseRank
public static <T> Collector<T, ?, Optional<Long>> denseRank(T value, Comparator<? super T> comparator) { """ Get a {@link Collector} that calculates the <code>DENSE_RANK()</code> function given a specific ordering. """ return denseRankBy(value, t -> t, comparator); }
java
public static <T> Collector<T, ?, Optional<Long>> denseRank(T value, Comparator<? super T> comparator) { return denseRankBy(value, t -> t, comparator); }
[ "public", "static", "<", "T", ">", "Collector", "<", "T", ",", "?", ",", "Optional", "<", "Long", ">", ">", "denseRank", "(", "T", "value", ",", "Comparator", "<", "?", "super", "T", ">", "comparator", ")", "{", "return", "denseRankBy", "(", "value",...
Get a {@link Collector} that calculates the <code>DENSE_RANK()</code> function given a specific ordering.
[ "Get", "a", "{" ]
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Agg.java#L706-L708
hoegertn/restdoc-java-server
src/main/java/org/restdoc/server/impl/util/SchemaResolver.java
SchemaResolver.getSchemaFromType
public static String getSchemaFromType(final Type type, Map<String, Schema> schemaMap, IRestDocGeneratorExtension ext) { """ same as getSchemaFromClassOrNull but throws {@link RestDocException} if no schema is found @param type the type to scan @param schemaMap the map to add the schema to @param ext the IRes...
java
public static String getSchemaFromType(final Type type, Map<String, Schema> schemaMap, IRestDocGeneratorExtension ext) { String schema = SchemaResolver.getSchemaFromTypeOrNull(type, schemaMap, ext); if (schema != null) { return schema; } final String s = String.format("SchemaType %s is not annotated wit...
[ "public", "static", "String", "getSchemaFromType", "(", "final", "Type", "type", ",", "Map", "<", "String", ",", "Schema", ">", "schemaMap", ",", "IRestDocGeneratorExtension", "ext", ")", "{", "String", "schema", "=", "SchemaResolver", ".", "getSchemaFromTypeOrNul...
same as getSchemaFromClassOrNull but throws {@link RestDocException} if no schema is found @param type the type to scan @param schemaMap the map to add the schema to @param ext the IRestDocGeneratorExtension to invoke on new schema @return the schema URI
[ "same", "as", "getSchemaFromClassOrNull", "but", "throws", "{", "@link", "RestDocException", "}", "if", "no", "schema", "is", "found" ]
train
https://github.com/hoegertn/restdoc-java-server/blob/a9c86c21b59c7580c7997cc8a38e45928919b459/src/main/java/org/restdoc/server/impl/util/SchemaResolver.java#L44-L51
ManfredTremmel/gwt-bean-validators
gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/data/domain/Sort.java
Sort.by
public static Sort by(final Direction direction, final String... properties) { """ Creates a new {@link Sort} for the given {@link Order}s. @param direction must not be {@literal null}. @param properties must not be {@literal null}. @return """ Assert.notNull(direction, "Direction must not be null!")...
java
public static Sort by(final Direction direction, final String... properties) { Assert.notNull(direction, "Direction must not be null!"); Assert.notNull(properties, "Properties must not be null!"); Assert.isTrue(properties.length > 0, "At least one property must be given!"); return Sort.by(Arrays.strea...
[ "public", "static", "Sort", "by", "(", "final", "Direction", "direction", ",", "final", "String", "...", "properties", ")", "{", "Assert", ".", "notNull", "(", "direction", ",", "\"Direction must not be null!\"", ")", ";", "Assert", ".", "notNull", "(", "prope...
Creates a new {@link Sort} for the given {@link Order}s. @param direction must not be {@literal null}. @param properties must not be {@literal null}. @return
[ "Creates", "a", "new", "{", "@link", "Sort", "}", "for", "the", "given", "{", "@link", "Order", "}", "s", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/data/domain/Sort.java#L184-L193
upwork/java-upwork
src/com/Upwork/api/Routers/Messages.java
Messages.getRoomByContract
public JSONObject getRoomByContract(String company, String contractId, HashMap<String, String> params) throws JSONException { """ Get a specific room by contract ID @param company Company ID @param contractId Contract ID @param params Parameters @throws JSONException If error occurred @return {@link J...
java
public JSONObject getRoomByContract(String company, String contractId, HashMap<String, String> params) throws JSONException { return oClient.get("/messages/v3/" + company + "/rooms/contracts/" + contractId, params); }
[ "public", "JSONObject", "getRoomByContract", "(", "String", "company", ",", "String", "contractId", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "oClient", ".", "get", "(", "\"/messages/v3/\"", "+", ...
Get a specific room by contract ID @param company Company ID @param contractId Contract ID @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Get", "a", "specific", "room", "by", "contract", "ID" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Messages.java#L101-L103
jenkinsci/jenkins
core/src/main/java/jenkins/util/SystemProperties.java
SystemProperties.getInteger
public static Integer getInteger(String name, Integer def) { """ Determines the integer value of the system property with the specified name, or a default value. This behaves just like <code>Integer.getInteger(String,Integer)</code>, except that it also consults the <code>ServletContext</code>'s "init" parame...
java
public static Integer getInteger(String name, Integer def) { return getInteger(name, def, Level.CONFIG); }
[ "public", "static", "Integer", "getInteger", "(", "String", "name", ",", "Integer", "def", ")", "{", "return", "getInteger", "(", "name", ",", "def", ",", "Level", ".", "CONFIG", ")", ";", "}" ]
Determines the integer value of the system property with the specified name, or a default value. This behaves just like <code>Integer.getInteger(String,Integer)</code>, except that it also consults the <code>ServletContext</code>'s "init" parameters. If neither exist, return the default value. @param name property ...
[ "Determines", "the", "integer", "value", "of", "the", "system", "property", "with", "the", "specified", "name", "or", "a", "default", "value", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/util/SystemProperties.java#L347-L349
iipc/webarchive-commons
src/main/java/org/archive/hadoop/FilenameInputFormat.java
FilenameInputFormat.getRecordReader
public RecordReader<Text, Text> getRecordReader( InputSplit genericSplit, JobConf job, Reporter reporter) throws IOException { """ Return a RecordReader which returns 1 record: the file path from the InputSp...
java
public RecordReader<Text, Text> getRecordReader( InputSplit genericSplit, JobConf job, Reporter reporter) throws IOException { reporter.setStatus(genericSplit.toString()); FileSplit split =...
[ "public", "RecordReader", "<", "Text", ",", "Text", ">", "getRecordReader", "(", "InputSplit", "genericSplit", ",", "JobConf", "job", ",", "Reporter", "reporter", ")", "throws", "IOException", "{", "reporter", ".", "setStatus", "(", "genericSplit", ".", "toStrin...
Return a RecordReader which returns 1 record: the file path from the InputSplit.
[ "Return", "a", "RecordReader", "which", "returns", "1", "record", ":", "the", "file", "path", "from", "the", "InputSplit", "." ]
train
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/hadoop/FilenameInputFormat.java#L64-L115
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/provisioning/BundleRepositoryRegistry.java
BundleRepositoryRegistry.addBundleRepository
public synchronized static void addBundleRepository(String installDir, String featureType) { """ Add a bundle repository to the map if one for that feature type has not already been added. @param installDir The install location for the repository. This can vary, i.e. product extensions. @param featureType The...
java
public synchronized static void addBundleRepository(String installDir, String featureType) { BundleRepositoryHolder bundleRepositoryHolder = new BundleRepositoryHolder(installDir, cacheServerName, featureType); if (!repositoryHolders.containsKey(featureType)) repositoryHolders.put(featureTy...
[ "public", "synchronized", "static", "void", "addBundleRepository", "(", "String", "installDir", ",", "String", "featureType", ")", "{", "BundleRepositoryHolder", "bundleRepositoryHolder", "=", "new", "BundleRepositoryHolder", "(", "installDir", ",", "cacheServerName", ","...
Add a bundle repository to the map if one for that feature type has not already been added. @param installDir The install location for the repository. This can vary, i.e. product extensions. @param featureType The "name" for this repository. "" for default, "usr" for the user extension, etc.
[ "Add", "a", "bundle", "repository", "to", "the", "map", "if", "one", "for", "that", "feature", "type", "has", "not", "already", "been", "added", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/provisioning/BundleRepositoryRegistry.java#L68-L73
googleads/googleads-java-lib
examples/admanager_axis/src/main/java/admanager/axis/v201808/proposalservice/GetProposalsPendingApproval.java
GetProposalsPendingApproval.runExample
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { """ Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws ...
java
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { ProposalServiceInterface proposalService = adManagerServices.get(session, ProposalServiceInterface.class); // Create a statement to select proposals. StatementBuilder statemen...
[ "public", "static", "void", "runExample", "(", "AdManagerServices", "adManagerServices", ",", "AdManagerSession", "session", ")", "throws", "RemoteException", "{", "ProposalServiceInterface", "proposalService", "=", "adManagerServices", ".", "get", "(", "session", ",", ...
Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors.
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201808/proposalservice/GetProposalsPendingApproval.java#L52-L89
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/Util.java
Util.ceilingPowerOfBdouble
public static double ceilingPowerOfBdouble(final double b, final double n) { """ Computes the ceiling power of B as a double. This is the smallest positive power of B that equal to or greater than the given n and equal to a mathematical integer. The result of this function is consistent with {@link #ceilingPower...
java
public static double ceilingPowerOfBdouble(final double b, final double n) { final double x = (n < 1.0) ? 1.0 : n; return pow(b, ceil(logB(b, x))); }
[ "public", "static", "double", "ceilingPowerOfBdouble", "(", "final", "double", "b", ",", "final", "double", "n", ")", "{", "final", "double", "x", "=", "(", "n", "<", "1.0", ")", "?", "1.0", ":", "n", ";", "return", "pow", "(", "b", ",", "ceil", "(...
Computes the ceiling power of B as a double. This is the smallest positive power of B that equal to or greater than the given n and equal to a mathematical integer. The result of this function is consistent with {@link #ceilingPowerOf2(int)} for values less than one. I.e., if <i>n &lt; 1,</i> the result is 1. @param b...
[ "Computes", "the", "ceiling", "power", "of", "B", "as", "a", "double", ".", "This", "is", "the", "smallest", "positive", "power", "of", "B", "that", "equal", "to", "or", "greater", "than", "the", "given", "n", "and", "equal", "to", "a", "mathematical", ...
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/Util.java#L579-L582
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpResponseMessageImpl.java
HttpResponseMessageImpl.setPseudoHeaders
@Override protected void setPseudoHeaders(HashMap<String, String> pseudoHeaders) throws Exception { """ Set the Version and Status for a HTTP/2.0 response. @param pseudoHeader """ //Only defined pseudo-header for a response is :status. for (Entry<String, String> entry : pseudoHeaders.en...
java
@Override protected void setPseudoHeaders(HashMap<String, String> pseudoHeaders) throws Exception { //Only defined pseudo-header for a response is :status. for (Entry<String, String> entry : pseudoHeaders.entrySet()) { H2HeaderField header = new H2HeaderField(entry.getKey(), entry.getVa...
[ "@", "Override", "protected", "void", "setPseudoHeaders", "(", "HashMap", "<", "String", ",", "String", ">", "pseudoHeaders", ")", "throws", "Exception", "{", "//Only defined pseudo-header for a response is :status.", "for", "(", "Entry", "<", "String", ",", "String",...
Set the Version and Status for a HTTP/2.0 response. @param pseudoHeader
[ "Set", "the", "Version", "and", "Status", "for", "a", "HTTP", "/", "2", ".", "0", "response", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpResponseMessageImpl.java#L317-L328
LearnLib/automatalib
incremental/src/main/java/net/automatalib/incremental/dfa/dag/IncrementalPCDFADAGBuilder.java
IncrementalPCDFADAGBuilder.createSuffix
private State createSuffix(Word<? extends I> suffix, boolean accepting) { """ Creates a suffix state sequence, i.e., a linear sequence of states connected by transitions labeled by the letters of the given suffix word. @param suffix the suffix word @param accepting whether or not the final state should be a...
java
private State createSuffix(Word<? extends I> suffix, boolean accepting) { State last; Acceptance intermediate; if (!accepting) { if (sink == null) { sink = new State(null); } last = sink; intermediate = Acceptance.DONT_KNOW; ...
[ "private", "State", "createSuffix", "(", "Word", "<", "?", "extends", "I", ">", "suffix", ",", "boolean", "accepting", ")", "{", "State", "last", ";", "Acceptance", "intermediate", ";", "if", "(", "!", "accepting", ")", "{", "if", "(", "sink", "==", "n...
Creates a suffix state sequence, i.e., a linear sequence of states connected by transitions labeled by the letters of the given suffix word. @param suffix the suffix word @param accepting whether or not the final state should be accepting @return the first state in the sequence
[ "Creates", "a", "suffix", "state", "sequence", "i", ".", "e", ".", "a", "linear", "sequence", "of", "states", "connected", "by", "transitions", "labeled", "by", "the", "letters", "of", "the", "given", "suffix", "word", "." ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/incremental/src/main/java/net/automatalib/incremental/dfa/dag/IncrementalPCDFADAGBuilder.java#L251-L276
derari/cthul
matchers/src/main/java/org/cthul/matchers/diagnose/nested/NestedMatcher.java
NestedMatcher.nestedDescribe
protected void nestedDescribe(SelfDescribing nested, Description description, String message) { """ Appends description of {@code s} to {@code d}, enclosed in parantheses if necessary. @param description @param nested @param message """ Nested.describeTo(this, nested, description, message); }
java
protected void nestedDescribe(SelfDescribing nested, Description description, String message) { Nested.describeTo(this, nested, description, message); }
[ "protected", "void", "nestedDescribe", "(", "SelfDescribing", "nested", ",", "Description", "description", ",", "String", "message", ")", "{", "Nested", ".", "describeTo", "(", "this", ",", "nested", ",", "description", ",", "message", ")", ";", "}" ]
Appends description of {@code s} to {@code d}, enclosed in parantheses if necessary. @param description @param nested @param message
[ "Appends", "description", "of", "{" ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/matchers/src/main/java/org/cthul/matchers/diagnose/nested/NestedMatcher.java#L37-L39
menacher/java-game-server
jetclient/src/main/java/org/menacheri/jetclient/app/impl/SessionFactory.java
SessionFactory.reconnectSession
public void reconnectSession(final Session session, String reconnectKey) throws InterruptedException, Exception { """ Method used to reconnect existing session which probably got disconnected due to some exception. It will first close existing tcp and udp connections and then try re-connecting using the recon...
java
public void reconnectSession(final Session session, String reconnectKey) throws InterruptedException, Exception { session.getTcpMessageSender().close(); if (null != session.getUdpMessageSender()) session.getUdpMessageSender().close(); InetSocketAddress udpAddress = null; if (null != udpClient) { ud...
[ "public", "void", "reconnectSession", "(", "final", "Session", "session", ",", "String", "reconnectKey", ")", "throws", "InterruptedException", ",", "Exception", "{", "session", ".", "getTcpMessageSender", "(", ")", ".", "close", "(", ")", ";", "if", "(", "nul...
Method used to reconnect existing session which probably got disconnected due to some exception. It will first close existing tcp and udp connections and then try re-connecting using the reconnect key from server. @param session The session which needs to be re-connected. @param reconnectKey This is provided by the se...
[ "Method", "used", "to", "reconnect", "existing", "session", "which", "probably", "got", "disconnected", "due", "to", "some", "exception", ".", "It", "will", "first", "close", "existing", "tcp", "and", "udp", "connections", "and", "then", "try", "re", "-", "c...
train
https://github.com/menacher/java-game-server/blob/668ca49e8bd1dac43add62378cf6c22a93125d48/jetclient/src/main/java/org/menacheri/jetclient/app/impl/SessionFactory.java#L190-L208
wisdom-framework/wisdom
extensions/wisdom-raml/wisdom-source-watcher/src/main/java/org/wisdom/source/ast/model/ControllerRouteModel.java
ControllerRouteModel.areEquals
private static boolean areEquals(Object obj1, Object obj2) { """ Convenient method that return <code>true</code> if both parameter are equals. It supports null value. @param obj1 The first object to check for equality @param obj2 The second object to check for equality @return <code>true</code> if both objec...
java
private static boolean areEquals(Object obj1, Object obj2){ return obj1 != null ? obj1.equals(obj2) : obj2 == null; }
[ "private", "static", "boolean", "areEquals", "(", "Object", "obj1", ",", "Object", "obj2", ")", "{", "return", "obj1", "!=", "null", "?", "obj1", ".", "equals", "(", "obj2", ")", ":", "obj2", "==", "null", ";", "}" ]
Convenient method that return <code>true</code> if both parameter are equals. It supports null value. @param obj1 The first object to check for equality @param obj2 The second object to check for equality @return <code>true</code> if both object are areEquals or null, <code>false</code> otherwise.
[ "Convenient", "method", "that", "return", "<code", ">", "true<", "/", "code", ">", "if", "both", "parameter", "are", "equals", ".", "It", "supports", "null", "value", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-raml/wisdom-source-watcher/src/main/java/org/wisdom/source/ast/model/ControllerRouteModel.java#L278-L280
pressgang-ccms/PressGangCCMSContentSpecProcessor
src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java
ContentSpecParser.parseMultiLineMetaData
private KeyValueNode<String> parseMultiLineMetaData(final ParserData parserData, final String key, final String value, final int lineNumber) throws ParsingException { """ Parses a multiple line metadata element. @param parserData @param key The metadata key. @param value The value on t...
java
private KeyValueNode<String> parseMultiLineMetaData(final ParserData parserData, final String key, final String value, final int lineNumber) throws ParsingException { // Check if the starting brace is found, if not then assume that there is only one line. int startingPos = StringUtilities.in...
[ "private", "KeyValueNode", "<", "String", ">", "parseMultiLineMetaData", "(", "final", "ParserData", "parserData", ",", "final", "String", "key", ",", "final", "String", "value", ",", "final", "int", "lineNumber", ")", "throws", "ParsingException", "{", "// Check ...
Parses a multiple line metadata element. @param parserData @param key The metadata key. @param value The value on the metadata line. @param lineNumber The initial line number. @return The parsed multiple line value for the metadata element. @throws ParsingException
[ "Parses", "a", "multiple", "line", "metadata", "element", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L784-L821
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowsInner.java
WorkflowsInner.getByResourceGroup
public WorkflowInner getByResourceGroup(String resourceGroupName, String workflowName) { """ Gets a workflow. @param resourceGroupName The resource group name. @param workflowName The workflow name. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the...
java
public WorkflowInner getByResourceGroup(String resourceGroupName, String workflowName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, workflowName).toBlocking().single().body(); }
[ "public", "WorkflowInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "workflowName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "workflowName", ")", ".", "toBlocking", "(", ")", ".", "s...
Gets a workflow. @param resourceGroupName The resource group name. @param workflowName The workflow name. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all other wrapped checked exceptions if the req...
[ "Gets", "a", "workflow", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowsInner.java#L607-L609
UrielCh/ovh-java-sdk
ovh-java-sdk-vrack/src/main/java/net/minidev/ovh/api/ApiOvhVrack.java
ApiOvhVrack.serviceName_dedicatedCloudDatacenter_datacenter_GET
public OvhPccDatacenter serviceName_dedicatedCloudDatacenter_datacenter_GET(String serviceName, String datacenter) throws IOException { """ Get this object properties REST: GET /vrack/{serviceName}/dedicatedCloudDatacenter/{datacenter} @param serviceName [required] The internal name of your vrack @param datac...
java
public OvhPccDatacenter serviceName_dedicatedCloudDatacenter_datacenter_GET(String serviceName, String datacenter) throws IOException { String qPath = "/vrack/{serviceName}/dedicatedCloudDatacenter/{datacenter}"; StringBuilder sb = path(qPath, serviceName, datacenter); String resp = exec(qPath, "GET", sb.toString...
[ "public", "OvhPccDatacenter", "serviceName_dedicatedCloudDatacenter_datacenter_GET", "(", "String", "serviceName", ",", "String", "datacenter", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/vrack/{serviceName}/dedicatedCloudDatacenter/{datacenter}\"", ";", "Strin...
Get this object properties REST: GET /vrack/{serviceName}/dedicatedCloudDatacenter/{datacenter} @param serviceName [required] The internal name of your vrack @param datacenter [required] Your dedicatedCloud datacenter name
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-vrack/src/main/java/net/minidev/ovh/api/ApiOvhVrack.java#L154-L159
google/closure-templates
java/src/com/google/template/soy/basicfunctions/BasicFunctionsRuntime.java
BasicFunctionsRuntime.augmentMap
public static SoyDict augmentMap(SoyValue sv1, SoyValue sv2) { """ Combine the two maps -- for the JavaSource variant while the function signature is still ? instead of map. """ SoyDict first = (SoyDict) sv1; SoyDict second = (SoyDict) sv2; Map<String, SoyValueProvider> map = Maps.newHashM...
java
public static SoyDict augmentMap(SoyValue sv1, SoyValue sv2) { SoyDict first = (SoyDict) sv1; SoyDict second = (SoyDict) sv2; Map<String, SoyValueProvider> map = Maps.newHashMapWithExpectedSize(first.getItemCnt() + second.getItemCnt()); map.putAll(first.asJavaStringMap()); map.putAll(second....
[ "public", "static", "SoyDict", "augmentMap", "(", "SoyValue", "sv1", ",", "SoyValue", "sv2", ")", "{", "SoyDict", "first", "=", "(", "SoyDict", ")", "sv1", ";", "SoyDict", "second", "=", "(", "SoyDict", ")", "sv2", ";", "Map", "<", "String", ",", "SoyV...
Combine the two maps -- for the JavaSource variant while the function signature is still ? instead of map.
[ "Combine", "the", "two", "maps", "--", "for", "the", "JavaSource", "variant", "while", "the", "function", "signature", "is", "still", "?", "instead", "of", "map", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/basicfunctions/BasicFunctionsRuntime.java#L48-L56
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DecimalFormat.java
DecimalFormat.parseCurrency
@Override public CurrencyAmount parseCurrency(CharSequence text, ParsePosition pos) { """ Parses text from the given string as a CurrencyAmount. Unlike the parse() method, this method will attempt to parse a generic currency name, searching for a match of this object's locale's currency display names, or for...
java
@Override public CurrencyAmount parseCurrency(CharSequence text, ParsePosition pos) { Currency[] currency = new Currency[1]; return (CurrencyAmount) parse(text.toString(), pos, currency); }
[ "@", "Override", "public", "CurrencyAmount", "parseCurrency", "(", "CharSequence", "text", ",", "ParsePosition", "pos", ")", "{", "Currency", "[", "]", "currency", "=", "new", "Currency", "[", "1", "]", ";", "return", "(", "CurrencyAmount", ")", "parse", "("...
Parses text from the given string as a CurrencyAmount. Unlike the parse() method, this method will attempt to parse a generic currency name, searching for a match of this object's locale's currency display names, or for a 3-letter ISO currency code. This method will fail if this format is not a currency format, that is...
[ "Parses", "text", "from", "the", "given", "string", "as", "a", "CurrencyAmount", ".", "Unlike", "the", "parse", "()", "method", "this", "method", "will", "attempt", "to", "parse", "a", "generic", "currency", "name", "searching", "for", "a", "match", "of", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DecimalFormat.java#L1947-L1951
jenkinsci/java-client-api
jenkins-client/src/main/java/com/offbytwo/jenkins/model/JobWithDetails.java
JobWithDetails.updateDescription
public JobWithDetails updateDescription(String description, boolean crumbFlag) throws IOException { """ Update the <code>description</code> of a Job. @param description The description which should be set. If you like to set an empty description you should use {@link #EMPTY_DESCRIPTION}. @param crumbFlag <co...
java
public JobWithDetails updateDescription(String description, boolean crumbFlag) throws IOException { Objects.requireNonNull(description, "description is not allowed to be null."); //JDK9+ // Map.of(...); Map<String, String> params = new HashMap<>(); params.put("description", descr...
[ "public", "JobWithDetails", "updateDescription", "(", "String", "description", ",", "boolean", "crumbFlag", ")", "throws", "IOException", "{", "Objects", ".", "requireNonNull", "(", "description", ",", "\"description is not allowed to be null.\"", ")", ";", "//JDK9+", "...
Update the <code>description</code> of a Job. @param description The description which should be set. If you like to set an empty description you should use {@link #EMPTY_DESCRIPTION}. @param crumbFlag <code>true</code> or <code>false</code>. @throws IOException in case of errors.
[ "Update", "the", "<code", ">", "description<", "/", "code", ">", "of", "a", "Job", "." ]
train
https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/model/JobWithDetails.java#L487-L495
Graylog2/graylog2-server
graylog2-server/src/main/java/org/graylog2/cluster/NodeServiceImpl.java
NodeServiceImpl.markAsAlive
@Override public void markAsAlive(Node node, boolean isMaster, String restTransportAddress) { """ Mark this node as alive and probably update some settings that may have changed since last server boot. @param isMaster @param restTransportAddress """ node.getFields().put("last_seen", Tools.getUT...
java
@Override public void markAsAlive(Node node, boolean isMaster, String restTransportAddress) { node.getFields().put("last_seen", Tools.getUTCTimestamp()); node.getFields().put("is_master", isMaster); node.getFields().put("transport_address", restTransportAddress); try { sa...
[ "@", "Override", "public", "void", "markAsAlive", "(", "Node", "node", ",", "boolean", "isMaster", ",", "String", "restTransportAddress", ")", "{", "node", ".", "getFields", "(", ")", ".", "put", "(", "\"last_seen\"", ",", "Tools", ".", "getUTCTimestamp", "(...
Mark this node as alive and probably update some settings that may have changed since last server boot. @param isMaster @param restTransportAddress
[ "Mark", "this", "node", "as", "alive", "and", "probably", "update", "some", "settings", "that", "may", "have", "changed", "since", "last", "server", "boot", "." ]
train
https://github.com/Graylog2/graylog2-server/blob/50b565dcead6e0a372236d5c2f8530dc5726fa9b/graylog2-server/src/main/java/org/graylog2/cluster/NodeServiceImpl.java#L129-L139
kubernetes-client/java
kubernetes/src/main/java/io/kubernetes/client/apis/CustomObjectsApi.java
CustomObjectsApi.deleteNamespacedCustomObjectAsync
public com.squareup.okhttp.Call deleteNamespacedCustomObjectAsync(String group, String version, String namespace, String plural, String name, V1DeleteOptions body, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, final ApiCallback<Object> callback) throws ApiException { """ (asynchro...
java
public com.squareup.okhttp.Call deleteNamespacedCustomObjectAsync(String group, String version, String namespace, String plural, String name, V1DeleteOptions body, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, final ApiCallback<Object> callback) throws ApiException { ProgressR...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "deleteNamespacedCustomObjectAsync", "(", "String", "group", ",", "String", "version", ",", "String", "namespace", ",", "String", "plural", ",", "String", "name", ",", "V1DeleteOptions", "body", ",", ...
(asynchronously) Deletes the specified namespace scoped custom object @param group the custom resource&#39;s group (required) @param version the custom resource&#39;s version (required) @param namespace The custom resource&#39;s namespace (required) @param plural the custom resource&#39;s plural name. For TPRs this wou...
[ "(", "asynchronously", ")", "Deletes", "the", "specified", "namespace", "scoped", "custom", "object" ]
train
https://github.com/kubernetes-client/java/blob/7413e98bd904f09d1ad00fb60e8c6ff787f3f560/kubernetes/src/main/java/io/kubernetes/client/apis/CustomObjectsApi.java#L743-L768
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java
EventSubscriptionsInner.getFullUrl
public EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscriptionName) { """ Get full URL of an event subscription. Get the full endpoint URL for an event subscription. @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level re...
java
public EventSubscriptionFullUrlInner getFullUrl(String scope, String eventSubscriptionName) { return getFullUrlWithServiceResponseAsync(scope, eventSubscriptionName).toBlocking().single().body(); }
[ "public", "EventSubscriptionFullUrlInner", "getFullUrl", "(", "String", "scope", ",", "String", "eventSubscriptionName", ")", "{", "return", "getFullUrlWithServiceResponseAsync", "(", "scope", ",", "eventSubscriptionName", ")", ".", "toBlocking", "(", ")", ".", "single"...
Get full URL of an event subscription. Get the full endpoint URL for an event subscription. @param scope The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid topic. For example, use '/subscriptions...
[ "Get", "full", "URL", "of", "an", "event", "subscription", ".", "Get", "the", "full", "endpoint", "URL", "for", "an", "event", "subscription", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_05_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_05_01_preview/implementation/EventSubscriptionsInner.java#L737-L739
rterp/GMapsFX
GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/LatLong.java
LatLong.getDestinationPoint
public LatLong getDestinationPoint(double bearing, double distance) { """ Calculates the LatLong position of the end point of a line the specified distance from this LatLong, along the provided bearing, where North is 0, East is 90 etc. @param bearing The bearing, in degrees, with North as 0, East as 90 etc. ...
java
public LatLong getDestinationPoint(double bearing, double distance) { double brng = Math.toRadians(bearing); double lat1 = latToRadians(); double lon1 = longToRadians(); double lat2 = Math.asin(Math.sin(lat1) * Math.cos(distance / EarthRadiusMeters) + M...
[ "public", "LatLong", "getDestinationPoint", "(", "double", "bearing", ",", "double", "distance", ")", "{", "double", "brng", "=", "Math", ".", "toRadians", "(", "bearing", ")", ";", "double", "lat1", "=", "latToRadians", "(", ")", ";", "double", "lon1", "=...
Calculates the LatLong position of the end point of a line the specified distance from this LatLong, along the provided bearing, where North is 0, East is 90 etc. @param bearing The bearing, in degrees, with North as 0, East as 90 etc. @param distance The distance in metres. @return A new LatLong indicating the end po...
[ "Calculates", "the", "LatLong", "position", "of", "the", "end", "point", "of", "a", "line", "the", "specified", "distance", "from", "this", "LatLong", "along", "the", "provided", "bearing", "where", "North", "is", "0", "East", "is", "90", "etc", "." ]
train
https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/LatLong.java#L100-L119
operasoftware/operaprestodriver
src/com/opera/core/systems/OperaDesktopDriver.java
OperaDesktopDriver.findWidgetByText
public QuickWidget findWidgetByText(QuickWidgetType type, int windowId, String text) { """ Finds widget with the text specified in the window with the given window id. Note, if there are several widgets in this window with the same text, the widget returned can be any one of those @param windowId - id of pa...
java
public QuickWidget findWidgetByText(QuickWidgetType type, int windowId, String text) { return desktopWindowManager.getQuickWidget(type, windowId, QuickWidgetSearchType.TEXT, text); }
[ "public", "QuickWidget", "findWidgetByText", "(", "QuickWidgetType", "type", ",", "int", "windowId", ",", "String", "text", ")", "{", "return", "desktopWindowManager", ".", "getQuickWidget", "(", "type", ",", "windowId", ",", "QuickWidgetSearchType", ".", "TEXT", ...
Finds widget with the text specified in the window with the given window id. Note, if there are several widgets in this window with the same text, the widget returned can be any one of those @param windowId - id of parent window @param text - text of widget @return QuickWidget with the given text in the specified...
[ "Finds", "widget", "with", "the", "text", "specified", "in", "the", "window", "with", "the", "given", "window", "id", "." ]
train
https://github.com/operasoftware/operaprestodriver/blob/1ccceda80f1c1a0489171d17dcaa6e7b18fb4c01/src/com/opera/core/systems/OperaDesktopDriver.java#L353-L355
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/constraint/XOR.java
XOR.satisfies
@Override public boolean satisfies(Match match, int... ind) { """ Checks if constraints satisfy in xor pattern. @param match match to validate @param ind mapped indices @return true if all satisfy """ int x = -1; for (MappedConst mc : con) { if (mc.satisfies(match, ind)) x *= -1; } return x ==...
java
@Override public boolean satisfies(Match match, int... ind) { int x = -1; for (MappedConst mc : con) { if (mc.satisfies(match, ind)) x *= -1; } return x == 1; }
[ "@", "Override", "public", "boolean", "satisfies", "(", "Match", "match", ",", "int", "...", "ind", ")", "{", "int", "x", "=", "-", "1", ";", "for", "(", "MappedConst", "mc", ":", "con", ")", "{", "if", "(", "mc", ".", "satisfies", "(", "match", ...
Checks if constraints satisfy in xor pattern. @param match match to validate @param ind mapped indices @return true if all satisfy
[ "Checks", "if", "constraints", "satisfy", "in", "xor", "pattern", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/XOR.java#L34-L43
nostra13/Android-Universal-Image-Loader
library/src/main/java/com/nostra13/universalimageloader/core/ImageLoader.java
ImageLoader.displayImage
public void displayImage(String uri, ImageView imageView, ImageSize targetImageSize) { """ Adds display image task to execution pool. Image will be set to ImageView when it's turn. <br/> Default {@linkplain DisplayImageOptions display image options} from {@linkplain ImageLoaderConfiguration configuration} will b...
java
public void displayImage(String uri, ImageView imageView, ImageSize targetImageSize) { displayImage(uri, new ImageViewAware(imageView), null, targetImageSize, null, null); }
[ "public", "void", "displayImage", "(", "String", "uri", ",", "ImageView", "imageView", ",", "ImageSize", "targetImageSize", ")", "{", "displayImage", "(", "uri", ",", "new", "ImageViewAware", "(", "imageView", ")", ",", "null", ",", "targetImageSize", ",", "nu...
Adds display image task to execution pool. Image will be set to ImageView when it's turn. <br/> Default {@linkplain DisplayImageOptions display image options} from {@linkplain ImageLoaderConfiguration configuration} will be used.<br /> <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before th...
[ "Adds", "display", "image", "task", "to", "execution", "pool", ".", "Image", "will", "be", "set", "to", "ImageView", "when", "it", "s", "turn", ".", "<br", "/", ">", "Default", "{", "@linkplain", "DisplayImageOptions", "display", "image", "options", "}", "...
train
https://github.com/nostra13/Android-Universal-Image-Loader/blob/fc3c5f6779bb4f702e233653b61bd9d559e345cc/library/src/main/java/com/nostra13/universalimageloader/core/ImageLoader.java#L330-L332
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/remote/TransactionalProtocolOperationHandler.java
TransactionalProtocolOperationHandler.sendResponse
static void sendResponse(final ManagementRequestContext<ExecuteRequestContext> context, final byte responseType, final ModelNode response) throws IOException { """ Send an operation response. @param context the request context @param responseType the response type @param response the operation response @thro...
java
static void sendResponse(final ManagementRequestContext<ExecuteRequestContext> context, final byte responseType, final ModelNode response) throws IOException { // WFLY-3090 Protect the communication channel from getting closed due to administrative // cancellation of the management op by using a separa...
[ "static", "void", "sendResponse", "(", "final", "ManagementRequestContext", "<", "ExecuteRequestContext", ">", "context", ",", "final", "byte", "responseType", ",", "final", "ModelNode", "response", ")", "throws", "IOException", "{", "// WFLY-3090 Protect the communicatio...
Send an operation response. @param context the request context @param responseType the response type @param response the operation response @throws java.io.IOException for any error
[ "Send", "an", "operation", "response", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/remote/TransactionalProtocolOperationHandler.java#L618-L658
Impetus/Kundera
src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESQuery.java
ESQuery.getMetricsAggregation
private MetricsAggregationBuilder getMetricsAggregation(Expression expression, EntityMetadata entityMetadata) { """ Gets the aggregation. @param expression the expression @param entityMetadata the entity metadata @return the aggregation """ AggregateFunction function = (AggregateFunction) expres...
java
private MetricsAggregationBuilder getMetricsAggregation(Expression expression, EntityMetadata entityMetadata) { AggregateFunction function = (AggregateFunction) expression; MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel( entityMetadata...
[ "private", "MetricsAggregationBuilder", "getMetricsAggregation", "(", "Expression", "expression", ",", "EntityMetadata", "entityMetadata", ")", "{", "AggregateFunction", "function", "=", "(", "AggregateFunction", ")", "expression", ";", "MetamodelImpl", "metaModel", "=", ...
Gets the aggregation. @param expression the expression @param entityMetadata the entity metadata @return the aggregation
[ "Gets", "the", "aggregation", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESQuery.java#L482-L510
actframework/actframework
src/main/java/act/ws/WebSocketContext.java
WebSocketContext.sendToUser
public WebSocketContext sendToUser(String message, String username) { """ Send message to all connections of a certain user @param message the message to be sent @param username the username @return this context """ return sendToConnections(message, username, manager.usernameRegistry(), true); ...
java
public WebSocketContext sendToUser(String message, String username) { return sendToConnections(message, username, manager.usernameRegistry(), true); }
[ "public", "WebSocketContext", "sendToUser", "(", "String", "message", ",", "String", "username", ")", "{", "return", "sendToConnections", "(", "message", ",", "username", ",", "manager", ".", "usernameRegistry", "(", ")", ",", "true", ")", ";", "}" ]
Send message to all connections of a certain user @param message the message to be sent @param username the username @return this context
[ "Send", "message", "to", "all", "connections", "of", "a", "certain", "user" ]
train
https://github.com/actframework/actframework/blob/55a8f8b45e71159a79ec6e157c02f71700f8cd54/src/main/java/act/ws/WebSocketContext.java#L269-L271
kuujo/vertigo
core/src/main/java/net/kuujo/vertigo/Vertigo.java
Vertigo.deployCluster
public Vertigo deployCluster(String cluster, int nodes, Handler<AsyncResult<Cluster>> doneHandler) { """ Deploys multiple nodes within a cluster at the given address. @param cluster The cluster event bus address. @param nodes The number of nodes to deploy. @param doneHandler An asynchronous handler to be call...
java
public Vertigo deployCluster(String cluster, int nodes, Handler<AsyncResult<Cluster>> doneHandler) { return deployCluster(cluster, null, nodes, doneHandler); }
[ "public", "Vertigo", "deployCluster", "(", "String", "cluster", ",", "int", "nodes", ",", "Handler", "<", "AsyncResult", "<", "Cluster", ">", ">", "doneHandler", ")", "{", "return", "deployCluster", "(", "cluster", ",", "null", ",", "nodes", ",", "doneHandle...
Deploys multiple nodes within a cluster at the given address. @param cluster The cluster event bus address. @param nodes The number of nodes to deploy. @param doneHandler An asynchronous handler to be called once the cluster has been deployed. The handler will be called with a {@link Cluster} which can be used to mana...
[ "Deploys", "multiple", "nodes", "within", "a", "cluster", "at", "the", "given", "address", "." ]
train
https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/Vertigo.java#L248-L250
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/utils/NodeUtil.java
NodeUtil.isOriginalURI
@Deprecated public static boolean isOriginalURI(Node node, String uri) { """ This method determines whether the supplied URI matches the original URI on the node. @param node The node @param uri The URI @return Whether the supplied URI is the same as the node's original @deprecated Only used in original...
java
@Deprecated public static boolean isOriginalURI(Node node, String uri) { if (node.getUri().equals(uri)) { return true; } if (node.hasProperty(APM_ORIGINAL_URI)) { return node.getProperties(APM_ORIGINAL_URI).iterator().next().getValue().equals(uri); } r...
[ "@", "Deprecated", "public", "static", "boolean", "isOriginalURI", "(", "Node", "node", ",", "String", "uri", ")", "{", "if", "(", "node", ".", "getUri", "(", ")", ".", "equals", "(", "uri", ")", ")", "{", "return", "true", ";", "}", "if", "(", "no...
This method determines whether the supplied URI matches the original URI on the node. @param node The node @param uri The URI @return Whether the supplied URI is the same as the node's original @deprecated Only used in original JavaAgent. Not to be used with OpenTracing.
[ "This", "method", "determines", "whether", "the", "supplied", "URI", "matches", "the", "original", "URI", "on", "the", "node", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/utils/NodeUtil.java#L80-L89
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/VisualizerContext.java
VisualizerContext.addVis
public void addVis(Object parent, VisualizationItem vis) { """ Add (register) a visualization. @param parent Parent object @param vis Visualization """ vistree.add(parent, vis); notifyFactories(vis); visChanged(vis); }
java
public void addVis(Object parent, VisualizationItem vis) { vistree.add(parent, vis); notifyFactories(vis); visChanged(vis); }
[ "public", "void", "addVis", "(", "Object", "parent", ",", "VisualizationItem", "vis", ")", "{", "vistree", ".", "add", "(", "parent", ",", "vis", ")", ";", "notifyFactories", "(", "vis", ")", ";", "visChanged", "(", "vis", ")", ";", "}" ]
Add (register) a visualization. @param parent Parent object @param vis Visualization
[ "Add", "(", "register", ")", "a", "visualization", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/VisualizerContext.java#L379-L383
dmak/jaxb-xew-plugin
src/main/java/com/sun/tools/xjc/addon/xew/config/AbstractConfigurablePlugin.java
AbstractConfigurablePlugin.parseArgument
private int parseArgument(String[] args, int index, ConfigurationOption option) throws BadCommandLineException { """ Parse argument at a given index and apply it to global configuration. Option value may go within the same argument (separated with equals), or as a following argument. @param args list of argum...
java
private int parseArgument(String[] args, int index, ConfigurationOption option) throws BadCommandLineException { int recognized = 0; String arg = args[index]; String argumentName = getArgumentName(option.optionName()); if (arg.startsWith(argumentName)) { recognized++; try { if (arg.length()...
[ "private", "int", "parseArgument", "(", "String", "[", "]", "args", ",", "int", "index", ",", "ConfigurationOption", "option", ")", "throws", "BadCommandLineException", "{", "int", "recognized", "=", "0", ";", "String", "arg", "=", "args", "[", "index", "]",...
Parse argument at a given index and apply it to global configuration. Option value may go within the same argument (separated with equals), or as a following argument. @param args list of arguments @param index current index @param optionName the option to match @return number of arguments processed
[ "Parse", "argument", "at", "a", "given", "index", "and", "apply", "it", "to", "global", "configuration", ".", "Option", "value", "may", "go", "within", "the", "same", "argument", "(", "separated", "with", "equals", ")", "or", "as", "a", "following", "argum...
train
https://github.com/dmak/jaxb-xew-plugin/blob/d564d6bf8e50c46b056cdb4b46d1d4bee4adfbe3/src/main/java/com/sun/tools/xjc/addon/xew/config/AbstractConfigurablePlugin.java#L117-L143
joestelmach/natty
src/main/java/com/joestelmach/natty/WalkerState.java
WalkerState.seekToHoliday
public void seekToHoliday(String holidayString, String direction, String seekAmount) { """ Seeks forward or backwards to a particular holiday based on the current date @param holidayString The holiday to seek to @param direction The direction to seek @param seekAmount The number of years to seek ""...
java
public void seekToHoliday(String holidayString, String direction, String seekAmount) { Holiday holiday = Holiday.valueOf(holidayString); assert(holiday != null); seekToIcsEvent(HOLIDAY_ICS_FILE, holiday.getSummary(), direction, seekAmount); }
[ "public", "void", "seekToHoliday", "(", "String", "holidayString", ",", "String", "direction", ",", "String", "seekAmount", ")", "{", "Holiday", "holiday", "=", "Holiday", ".", "valueOf", "(", "holidayString", ")", ";", "assert", "(", "holiday", "!=", "null", ...
Seeks forward or backwards to a particular holiday based on the current date @param holidayString The holiday to seek to @param direction The direction to seek @param seekAmount The number of years to seek
[ "Seeks", "forward", "or", "backwards", "to", "a", "particular", "holiday", "based", "on", "the", "current", "date" ]
train
https://github.com/joestelmach/natty/blob/74389feb4c9372e51cd51eb0800a0177fec3e5a0/src/main/java/com/joestelmach/natty/WalkerState.java#L389-L394