repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
192
func_name
stringlengths
5
108
whole_func_string
stringlengths
75
3.91k
language
stringclasses
1 value
func_code_string
stringlengths
75
3.91k
func_code_tokens
listlengths
21
629
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
111
306
NoraUi/NoraUi
src/main/java/com/github/noraui/utils/Messages.java
Messages.countWildcardsOccurrences
private static int countWildcardsOccurrences(String templateMessage, String occurrence) { if (templateMessage != null && occurrence != null) { final Pattern pattern = Pattern.compile(occurrence); final Matcher matcher = pattern.matcher(templateMessage); int count = 0; ...
java
private static int countWildcardsOccurrences(String templateMessage, String occurrence) { if (templateMessage != null && occurrence != null) { final Pattern pattern = Pattern.compile(occurrence); final Matcher matcher = pattern.matcher(templateMessage); int count = 0; ...
[ "private", "static", "int", "countWildcardsOccurrences", "(", "String", "templateMessage", ",", "String", "occurrence", ")", "{", "if", "(", "templateMessage", "!=", "null", "&&", "occurrence", "!=", "null", ")", "{", "final", "Pattern", "pattern", "=", "Pattern...
Count the number of occurrences of a given wildcard. @param templateMessage Input string @param occurrence String searched. @return The number of occurrences.
[ "Count", "the", "number", "of", "occurrences", "of", "a", "given", "wildcard", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/utils/Messages.java#L166-L178
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SubQuery.java
SubQuery.compare
@Override public int compare(Object a, Object b) { SubQuery sqa = (SubQuery) a; SubQuery sqb = (SubQuery) b; if (sqa.parentView == null && sqb.parentView == null) { return sqb.level - sqa.level; } else if (sqa.parentView != null && sqb.parentView != null) { ...
java
@Override public int compare(Object a, Object b) { SubQuery sqa = (SubQuery) a; SubQuery sqb = (SubQuery) b; if (sqa.parentView == null && sqb.parentView == null) { return sqb.level - sqa.level; } else if (sqa.parentView != null && sqb.parentView != null) { ...
[ "@", "Override", "public", "int", "compare", "(", "Object", "a", ",", "Object", "b", ")", "{", "SubQuery", "sqa", "=", "(", "SubQuery", ")", "a", ";", "SubQuery", "sqb", "=", "(", "SubQuery", ")", "b", ";", "if", "(", "sqa", ".", "parentView", "=="...
This results in the following sort order: view subqueries, then other subqueries view subqueries: views sorted by creation order (earlier declaration first) other subqueries: subqueries sorted by depth within select query (deep == higher level)
[ "This", "results", "in", "the", "following", "sort", "order", ":" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SubQuery.java#L250-L280
JosePaumard/streams-utils
src/main/java/org/paumard/streams/StreamsUtils.java
StreamsUtils.gate
@Deprecated(since="2.0") public static <E> Stream<E> gate(Stream<E> stream, Predicate<? super E> validator) { Objects.requireNonNull(stream); Objects.requireNonNull(validator); GatingSpliterator<E> spliterator = GatingSpliterator.of(stream.spliterator(), validator); return StreamSup...
java
@Deprecated(since="2.0") public static <E> Stream<E> gate(Stream<E> stream, Predicate<? super E> validator) { Objects.requireNonNull(stream); Objects.requireNonNull(validator); GatingSpliterator<E> spliterator = GatingSpliterator.of(stream.spliterator(), validator); return StreamSup...
[ "@", "Deprecated", "(", "since", "=", "\"2.0\"", ")", "public", "static", "<", "E", ">", "Stream", "<", "E", ">", "gate", "(", "Stream", "<", "E", ">", "stream", ",", "Predicate", "<", "?", "super", "E", ">", "validator", ")", "{", "Objects", ".", ...
<p>Generates a stream that does not generate any element, until the validator becomes true for an element of the provided stream. From this point, the returns stream is identical to the provided stream. </p> <p>If you are using Java 9, then yo should use <code>Stream.dropWhile(Predicate)</code>. </p> <p>A <code>NullPoi...
[ "<p", ">", "Generates", "a", "stream", "that", "does", "not", "generate", "any", "element", "until", "the", "validator", "becomes", "true", "for", "an", "element", "of", "the", "provided", "stream", ".", "From", "this", "point", "the", "returns", "stream", ...
train
https://github.com/JosePaumard/streams-utils/blob/56152574af0aca44c5f679761202a8f90984ab73/src/main/java/org/paumard/streams/StreamsUtils.java#L509-L516
udoprog/ffwd-client-java
src/main/java/com/google/protobuf250/DynamicMessage.java
DynamicMessage.getDefaultInstance
public static DynamicMessage getDefaultInstance(Descriptor type) { return new DynamicMessage(type, FieldSet.<FieldDescriptor>emptySet(), UnknownFieldSet.getDefaultInstance()); }
java
public static DynamicMessage getDefaultInstance(Descriptor type) { return new DynamicMessage(type, FieldSet.<FieldDescriptor>emptySet(), UnknownFieldSet.getDefaultInstance()); }
[ "public", "static", "DynamicMessage", "getDefaultInstance", "(", "Descriptor", "type", ")", "{", "return", "new", "DynamicMessage", "(", "type", ",", "FieldSet", ".", "<", "FieldDescriptor", ">", "emptySet", "(", ")", ",", "UnknownFieldSet", ".", "getDefaultInstan...
Get a {@code DynamicMessage} representing the default instance of the given type.
[ "Get", "a", "{" ]
train
https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/DynamicMessage.java#L67-L70
gallandarakhneorg/afc
maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java
AbstractArakhneMojo.getLString
public static final String getLString(Class<?> source, String label, Object... params) { final ResourceBundle rb = ResourceBundle.getBundle(source.getCanonicalName()); String text = rb.getString(label); text = text.replaceAll("[\\n\\r]", "\n"); //$NON-NLS-1$ //$NON-NLS-2$ text = text.replaceAll("\\t", "\t"); //...
java
public static final String getLString(Class<?> source, String label, Object... params) { final ResourceBundle rb = ResourceBundle.getBundle(source.getCanonicalName()); String text = rb.getString(label); text = text.replaceAll("[\\n\\r]", "\n"); //$NON-NLS-1$ //$NON-NLS-2$ text = text.replaceAll("\\t", "\t"); //...
[ "public", "static", "final", "String", "getLString", "(", "Class", "<", "?", ">", "source", ",", "String", "label", ",", "Object", "...", "params", ")", "{", "final", "ResourceBundle", "rb", "=", "ResourceBundle", ".", "getBundle", "(", "source", ".", "get...
Read a resource property and replace the parametrized macros by the given parameters. @param source is the source of the properties. @param label is the name of the property. @param params are the parameters to replace. @return the read text.
[ "Read", "a", "resource", "property", "and", "replace", "the", "parametrized", "macros", "by", "the", "given", "parameters", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/maven/maventools/src/main/java/org/arakhne/maven/AbstractArakhneMojo.java#L382-L389
OWASP/java-html-sanitizer
src/main/java/org/owasp/html/HtmlStreamRenderer.java
HtmlStreamRenderer.error
private final void error(String message, CharSequence identifier) { if (badHtmlHandler != Handler.DO_NOTHING) { // Avoid string append. badHtmlHandler.handle(message + " : " + identifier); } }
java
private final void error(String message, CharSequence identifier) { if (badHtmlHandler != Handler.DO_NOTHING) { // Avoid string append. badHtmlHandler.handle(message + " : " + identifier); } }
[ "private", "final", "void", "error", "(", "String", "message", ",", "CharSequence", "identifier", ")", "{", "if", "(", "badHtmlHandler", "!=", "Handler", ".", "DO_NOTHING", ")", "{", "// Avoid string append.", "badHtmlHandler", ".", "handle", "(", "message", "+"...
Called when the series of calls make no sense. May be overridden to throw an unchecked throwable, to log, or to take some other action. @param message for human consumption. @param identifier an HTML identifier associated with the message.
[ "Called", "when", "the", "series", "of", "calls", "make", "no", "sense", ".", "May", "be", "overridden", "to", "throw", "an", "unchecked", "throwable", "to", "log", "or", "to", "take", "some", "other", "action", "." ]
train
https://github.com/OWASP/java-html-sanitizer/blob/a30315fe9a41e19c449628e7ef3488b3a7856009/src/main/java/org/owasp/html/HtmlStreamRenderer.java#L115-L119
krummas/DrizzleJDBC
src/main/java/org/drizzle/jdbc/DrizzlePreparedStatement.java
DrizzlePreparedStatement.setCharacterStream
public void setCharacterStream(final int parameterIndex, final Reader reader, final int length) throws SQLException { try { setParameter(parameterIndex, new ReaderParameter(reader, length)); } catch (IOException e) { throw SQLExceptionMapper.getSQLException("Could not read stream...
java
public void setCharacterStream(final int parameterIndex, final Reader reader, final int length) throws SQLException { try { setParameter(parameterIndex, new ReaderParameter(reader, length)); } catch (IOException e) { throw SQLExceptionMapper.getSQLException("Could not read stream...
[ "public", "void", "setCharacterStream", "(", "final", "int", "parameterIndex", ",", "final", "Reader", "reader", ",", "final", "int", "length", ")", "throws", "SQLException", "{", "try", "{", "setParameter", "(", "parameterIndex", ",", "new", "ReaderParameter", ...
Sets the designated parameter to the given <code>Reader</code> object, which is the given number of characters long. When a very large UNICODE value is input to a <code>LONGVARCHAR</code> parameter, it may be more practical to send it via a <code>java.io.Reader</code> object. The data will be read from the stream as ne...
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "<code", ">", "Reader<", "/", "code", ">", "object", "which", "is", "the", "given", "number", "of", "characters", "long", ".", "When", "a", "very", "large", "UNICODE", "value", "is", "input", ...
train
https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/DrizzlePreparedStatement.java#L224-L231
sai-pullabhotla/catatumbo
src/main/java/com/jmethods/catatumbo/mappers/CollectionMapperFactory.java
CollectionMapperFactory.createMapper
private Mapper createMapper(Field field, boolean indexed) { lock.lock(); try { Mapper mapper; Class<?> fieldType = field.getType(); Type genericType = field.getGenericType(); String cacheKey = computeCacheKey(genericType, indexed); mapper = cache.get(cacheKey); if (mapper != ...
java
private Mapper createMapper(Field field, boolean indexed) { lock.lock(); try { Mapper mapper; Class<?> fieldType = field.getType(); Type genericType = field.getGenericType(); String cacheKey = computeCacheKey(genericType, indexed); mapper = cache.get(cacheKey); if (mapper != ...
[ "private", "Mapper", "createMapper", "(", "Field", "field", ",", "boolean", "indexed", ")", "{", "lock", ".", "lock", "(", ")", ";", "try", "{", "Mapper", "mapper", ";", "Class", "<", "?", ">", "fieldType", "=", "field", ".", "getType", "(", ")", ";"...
Creates a new Mapper for the given field. @param field the field @param indexed whether or not the field is to be indexed @return the Mapper
[ "Creates", "a", "new", "Mapper", "for", "the", "given", "field", "." ]
train
https://github.com/sai-pullabhotla/catatumbo/blob/96d4c6dce3a5009624f7112a398406914dd19165/src/main/java/com/jmethods/catatumbo/mappers/CollectionMapperFactory.java#L104-L129
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.newReader
public static BufferedReader newReader(File file, String charset) throws FileNotFoundException, UnsupportedEncodingException { return new BufferedReader(new InputStreamReader(new FileInputStream(file), charset)); }
java
public static BufferedReader newReader(File file, String charset) throws FileNotFoundException, UnsupportedEncodingException { return new BufferedReader(new InputStreamReader(new FileInputStream(file), charset)); }
[ "public", "static", "BufferedReader", "newReader", "(", "File", "file", ",", "String", "charset", ")", "throws", "FileNotFoundException", ",", "UnsupportedEncodingException", "{", "return", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "new", "FileInp...
Create a buffered reader for this file, using the specified charset as the encoding. @param file a File @param charset the charset for this File @return a BufferedReader @throws FileNotFoundException if the File was not found @throws UnsupportedEncodingException if the encoding specified is not supported @si...
[ "Create", "a", "buffered", "reader", "for", "this", "file", "using", "the", "specified", "charset", "as", "the", "encoding", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L1756-L1759
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.deleteHierarchicalEntity
public OperationStatus deleteHierarchicalEntity(UUID appId, String versionId, UUID hEntityId) { return deleteHierarchicalEntityWithServiceResponseAsync(appId, versionId, hEntityId).toBlocking().single().body(); }
java
public OperationStatus deleteHierarchicalEntity(UUID appId, String versionId, UUID hEntityId) { return deleteHierarchicalEntityWithServiceResponseAsync(appId, versionId, hEntityId).toBlocking().single().body(); }
[ "public", "OperationStatus", "deleteHierarchicalEntity", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "hEntityId", ")", "{", "return", "deleteHierarchicalEntityWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "hEntityId", ")", ".", "to...
Deletes a hierarchical entity extractor from the application version. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request i...
[ "Deletes", "a", "hierarchical", "entity", "extractor", "from", "the", "application", "version", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L3846-L3848
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.verifyFactor
public Boolean verifyFactor(long userId, long deviceId, String otpToken, String stateToken) throws OAuthSystemException, OAuthProblemException, URISyntaxException { cleanError(); prepareToken(); URIBuilder url = new URIBuilder(settings.getURL(Constants.VERIFY_FACTOR_URL, userId, deviceId)); url = new UR...
java
public Boolean verifyFactor(long userId, long deviceId, String otpToken, String stateToken) throws OAuthSystemException, OAuthProblemException, URISyntaxException { cleanError(); prepareToken(); URIBuilder url = new URIBuilder(settings.getURL(Constants.VERIFY_FACTOR_URL, userId, deviceId)); url = new UR...
[ "public", "Boolean", "verifyFactor", "(", "long", "userId", ",", "long", "deviceId", ",", "String", "otpToken", ",", "String", "stateToken", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "cleanError", "(", ")", ...
Authenticates a one-time password (OTP) code provided by a multifactor authentication (MFA) device. @param userId The id of the user. @param deviceId The id of the MFA device. @param otpToken OTP code provided by the device or SMS message sent to user. When a device like OneLogin Protect that supports Push has been us...
[ "Authenticates", "a", "one", "-", "time", "password", "(", "OTP", ")", "code", "provided", "by", "a", "multifactor", "authentication", "(", "MFA", ")", "device", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L2838-L2875
geomajas/geomajas-project-geometry
core/src/main/java/org/geomajas/geometry/service/GeometryService.java
GeometryService.toPolygon
public static Geometry toPolygon(Bbox bounds) { double minX = bounds.getX(); double minY = bounds.getY(); double maxX = bounds.getMaxX(); double maxY = bounds.getMaxY(); Geometry polygon = new Geometry(Geometry.POLYGON, 0, -1); Geometry linearRing = new Geometry(Geometry.LINEAR_RING, 0, -1); linearRing....
java
public static Geometry toPolygon(Bbox bounds) { double minX = bounds.getX(); double minY = bounds.getY(); double maxX = bounds.getMaxX(); double maxY = bounds.getMaxY(); Geometry polygon = new Geometry(Geometry.POLYGON, 0, -1); Geometry linearRing = new Geometry(Geometry.LINEAR_RING, 0, -1); linearRing....
[ "public", "static", "Geometry", "toPolygon", "(", "Bbox", "bounds", ")", "{", "double", "minX", "=", "bounds", ".", "getX", "(", ")", ";", "double", "minY", "=", "bounds", ".", "getY", "(", ")", ";", "double", "maxX", "=", "bounds", ".", "getMaxX", "...
Transform the given bounding box into a polygon geometry. @param bounds The bounding box to transform. @return Returns the polygon equivalent of the given bounding box.
[ "Transform", "the", "given", "bounding", "box", "into", "a", "polygon", "geometry", "." ]
train
https://github.com/geomajas/geomajas-project-geometry/blob/09a214fede69c9c01e41630828c4abbb551a557d/core/src/main/java/org/geomajas/geometry/service/GeometryService.java#L140-L153
code4everything/util
src/main/java/com/zhazhapan/util/NetUtils.java
NetUtils.removeCookie
public static boolean removeCookie(String name, Cookie[] cookies, HttpServletResponse response) { if (Checker.isNotEmpty(name) && Checker.isNotEmpty(cookies)) { for (Cookie cookie : cookies) { if (name.equals(cookie.getName())) { return removeCookie(cookie, respon...
java
public static boolean removeCookie(String name, Cookie[] cookies, HttpServletResponse response) { if (Checker.isNotEmpty(name) && Checker.isNotEmpty(cookies)) { for (Cookie cookie : cookies) { if (name.equals(cookie.getName())) { return removeCookie(cookie, respon...
[ "public", "static", "boolean", "removeCookie", "(", "String", "name", ",", "Cookie", "[", "]", "cookies", ",", "HttpServletResponse", "response", ")", "{", "if", "(", "Checker", ".", "isNotEmpty", "(", "name", ")", "&&", "Checker", ".", "isNotEmpty", "(", ...
删除指定Cookie @param name Cookie名 @param cookies {@link Cookie} @param response {@link HttpServletResponse} @return {@link Boolean} @since 1.0.8
[ "删除指定Cookie" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/NetUtils.java#L533-L542
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java
ParsedQuery.getInt
public int getInt(String key, int defaultValue) { String value = get(key); if(value == null) return defaultValue; try { return Integer.parseInt(value); } catch (NumberFormatException e) { throw new IllegalArgumentException(key + " parameter should be a number"); }...
java
public int getInt(String key, int defaultValue) { String value = get(key); if(value == null) return defaultValue; try { return Integer.parseInt(value); } catch (NumberFormatException e) { throw new IllegalArgumentException(key + " parameter should be a number"); }...
[ "public", "int", "getInt", "(", "String", "key", ",", "int", "defaultValue", ")", "{", "String", "value", "=", "get", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "return", "defaultValue", ";", "try", "{", "return", "Integer", ".", "p...
Returns an integer value by the key specified or defaultValue if the key was not provided
[ "Returns", "an", "integer", "value", "by", "the", "key", "specified", "or", "defaultValue", "if", "the", "key", "was", "not", "provided" ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/olap/ParsedQuery.java#L123-L131
Alluxio/alluxio
shell/src/main/java/alluxio/cli/fs/command/DuCommand.java
DuCommand.getFormattedValues
private String getFormattedValues(boolean readable, long size, long totalSize) { // If size is 1, total size is 5, and readable is true, it will // return a string as "1B (20%)" int percent = totalSize == 0 ? 0 : (int) (size * 100 / totalSize); String subSizeMessage = readable ? FormatUtils.getSizeFromB...
java
private String getFormattedValues(boolean readable, long size, long totalSize) { // If size is 1, total size is 5, and readable is true, it will // return a string as "1B (20%)" int percent = totalSize == 0 ? 0 : (int) (size * 100 / totalSize); String subSizeMessage = readable ? FormatUtils.getSizeFromB...
[ "private", "String", "getFormattedValues", "(", "boolean", "readable", ",", "long", "size", ",", "long", "totalSize", ")", "{", "// If size is 1, total size is 5, and readable is true, it will", "// return a string as \"1B (20%)\"", "int", "percent", "=", "totalSize", "==", ...
Gets the size and its percentage information, if readable option is provided, get the size in human readable format. @param readable whether to print info of human readable format @param size the size to get information from @param totalSize the total size to calculate percentage information @return the formatted valu...
[ "Gets", "the", "size", "and", "its", "percentage", "information", "if", "readable", "option", "is", "provided", "get", "the", "size", "in", "human", "readable", "format", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/shell/src/main/java/alluxio/cli/fs/command/DuCommand.java#L156-L163
albfernandez/itext2
src/main/java/com/lowagie/text/rtf/parser/RtfParser.java
RtfParser.convertRtfDocument
public void convertRtfDocument(InputStream readerIn, Document doc) throws IOException { if(readerIn == null || doc == null) return; this.init(TYPE_CONVERT, null, readerIn, doc, null); this.setCurrentDestination(RtfDestinationMgr.DESTINATION_DOCUMENT); this.groupLevel = 0; this.tokenise(); }
java
public void convertRtfDocument(InputStream readerIn, Document doc) throws IOException { if(readerIn == null || doc == null) return; this.init(TYPE_CONVERT, null, readerIn, doc, null); this.setCurrentDestination(RtfDestinationMgr.DESTINATION_DOCUMENT); this.groupLevel = 0; this.tokenise(); }
[ "public", "void", "convertRtfDocument", "(", "InputStream", "readerIn", ",", "Document", "doc", ")", "throws", "IOException", "{", "if", "(", "readerIn", "==", "null", "||", "doc", "==", "null", ")", "return", ";", "this", ".", "init", "(", "TYPE_CONVERT", ...
Converts an RTF document to an iText document. Usage: Create a parser object and call this method with the input stream and the iText Document object @param readerIn The Reader to read the RTF file from. @param doc The iText document that the RTF file is to be added to. @throws IOException On I/O errors. @since 2.1.3
[ "Converts", "an", "RTF", "document", "to", "an", "iText", "document", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/parser/RtfParser.java#L538-L544
Crab2died/Excel4J
src/main/java/com/github/crab2died/ExcelUtils.java
ExcelUtils.simpleSheet2Excel
public void simpleSheet2Excel(List<SimpleSheetWrapper> sheets, String targetPath) throws IOException { try (OutputStream fos = new FileOutputStream(targetPath); Workbook workbook = exportExcelBySimpleHandler(sheets, true)) { workbook.write(fos); } }
java
public void simpleSheet2Excel(List<SimpleSheetWrapper> sheets, String targetPath) throws IOException { try (OutputStream fos = new FileOutputStream(targetPath); Workbook workbook = exportExcelBySimpleHandler(sheets, true)) { workbook.write(fos); } }
[ "public", "void", "simpleSheet2Excel", "(", "List", "<", "SimpleSheetWrapper", ">", "sheets", ",", "String", "targetPath", ")", "throws", "IOException", "{", "try", "(", "OutputStream", "fos", "=", "new", "FileOutputStream", "(", "targetPath", ")", ";", "Workboo...
无模板、无注解、多sheet数据 @param sheets 待导出sheet数据 @param targetPath 生成的Excel输出全路径 @throws IOException 异常
[ "无模板、无注解、多sheet数据" ]
train
https://github.com/Crab2died/Excel4J/blob/2ab0a3b8226a69ff868c3ead6e724f3a774f5f77/src/main/java/com/github/crab2died/ExcelUtils.java#L1386-L1393
alipay/sofa-rpc
extension-impl/remoting-bolt/src/main/java/com/alipay/sofa/rpc/transport/bolt/AloneBoltClientConnectionManager.java
AloneBoltClientConnectionManager.getConnection
public Connection getConnection(RpcClient rpcClient, ClientTransportConfig transportConfig, Url url) { if (rpcClient == null || transportConfig == null || url == null) { return null; } Connection connection; try { connection = rpcClient.getConnection(url, url.getC...
java
public Connection getConnection(RpcClient rpcClient, ClientTransportConfig transportConfig, Url url) { if (rpcClient == null || transportConfig == null || url == null) { return null; } Connection connection; try { connection = rpcClient.getConnection(url, url.getC...
[ "public", "Connection", "getConnection", "(", "RpcClient", "rpcClient", ",", "ClientTransportConfig", "transportConfig", ",", "Url", "url", ")", "{", "if", "(", "rpcClient", "==", "null", "||", "transportConfig", "==", "null", "||", "url", "==", "null", ")", "...
通过配置获取长连接 @param rpcClient bolt客户端 @param transportConfig 传输层配置 @param url 传输层地址 @return 长连接
[ "通过配置获取长连接" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/remoting-bolt/src/main/java/com/alipay/sofa/rpc/transport/bolt/AloneBoltClientConnectionManager.java#L48-L65
blackfizz/EazeGraph
EazeGraphLibrary/src/main/java/org/eazegraph/lib/utils/Utils.java
Utils.vectorToScalarScroll
public static float vectorToScalarScroll(float _Dx, float _Dy, float _X, float _Y) { // get the length of the vector float l = (float) Math.sqrt(_Dx * _Dx + _Dy * _Dy); // decide if the scalar should be negative or positive by finding // the dot product of the vector perpendicular to (_...
java
public static float vectorToScalarScroll(float _Dx, float _Dy, float _X, float _Y) { // get the length of the vector float l = (float) Math.sqrt(_Dx * _Dx + _Dy * _Dy); // decide if the scalar should be negative or positive by finding // the dot product of the vector perpendicular to (_...
[ "public", "static", "float", "vectorToScalarScroll", "(", "float", "_Dx", ",", "float", "_Dy", ",", "float", "_X", ",", "float", "_Y", ")", "{", "// get the length of the vector", "float", "l", "=", "(", "float", ")", "Math", ".", "sqrt", "(", "_Dx", "*", ...
Helper method for translating (_X,_Y) scroll vectors into scalar rotation of a circle. @param _Dx The _X component of the current scroll vector. @param _Dy The _Y component of the current scroll vector. @param _X The _X position of the current touch, relative to the circle center. @param _Y The _Y position of the cu...
[ "Helper", "method", "for", "translating", "(", "_X", "_Y", ")", "scroll", "vectors", "into", "scalar", "rotation", "of", "a", "circle", "." ]
train
https://github.com/blackfizz/EazeGraph/blob/ce5e68ecc70e154f83bbb2fcce1a970db125c1e6/EazeGraphLibrary/src/main/java/org/eazegraph/lib/utils/Utils.java#L74-L87
Wikidata/Wikidata-Toolkit
wdtk-examples/src/main/java/org/wikidata/wdtk/examples/ClassPropertyUsageAnalyzer.java
ClassPropertyUsageAnalyzer.printRelatedProperties
private void printRelatedProperties(PrintStream out, UsageRecord usageRecord) { List<ImmutablePair<PropertyIdValue, Double>> list = new ArrayList<ImmutablePair<PropertyIdValue, Double>>( usageRecord.propertyCoCounts.size()); for (Entry<PropertyIdValue, Integer> coCountEntry : usageRecord.propertyCoCounts ....
java
private void printRelatedProperties(PrintStream out, UsageRecord usageRecord) { List<ImmutablePair<PropertyIdValue, Double>> list = new ArrayList<ImmutablePair<PropertyIdValue, Double>>( usageRecord.propertyCoCounts.size()); for (Entry<PropertyIdValue, Integer> coCountEntry : usageRecord.propertyCoCounts ....
[ "private", "void", "printRelatedProperties", "(", "PrintStream", "out", ",", "UsageRecord", "usageRecord", ")", "{", "List", "<", "ImmutablePair", "<", "PropertyIdValue", ",", "Double", ">", ">", "list", "=", "new", "ArrayList", "<", "ImmutablePair", "<", "Prope...
Prints a list of related properties to the output. The list is encoded as a single CSV value, using "@" as a separator. Miga can decode this. Standard CSV processors do not support lists of entries as values, however. @param out the output to write to @param usageRecord the data to write
[ "Prints", "a", "list", "of", "related", "properties", "to", "the", "output", ".", "The", "list", "is", "encoded", "as", "a", "single", "CSV", "value", "using", "@", "as", "a", "separator", ".", "Miga", "can", "decode", "this", ".", "Standard", "CSV", "...
train
https://github.com/Wikidata/Wikidata-Toolkit/blob/7732851dda47e1febff406fba27bfec023f4786e/wdtk-examples/src/main/java/org/wikidata/wdtk/examples/ClassPropertyUsageAnalyzer.java#L798-L844
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
AnnotationTypeRequiredMemberBuilder.buildMemberComments
public void buildMemberComments(XMLNode node, Content annotationDocTree) { if(! configuration.nocomment) { writer.addComments(currentMember, annotationDocTree); } }
java
public void buildMemberComments(XMLNode node, Content annotationDocTree) { if(! configuration.nocomment) { writer.addComments(currentMember, annotationDocTree); } }
[ "public", "void", "buildMemberComments", "(", "XMLNode", "node", ",", "Content", "annotationDocTree", ")", "{", "if", "(", "!", "configuration", ".", "nocomment", ")", "{", "writer", ".", "addComments", "(", "currentMember", ",", "annotationDocTree", ")", ";", ...
Build the comments for the member. Do nothing if {@link Configuration#nocomment} is set to true. @param node the XML element that specifies which components to document @param annotationDocTree the content tree to which the documentation will be added
[ "Build", "the", "comments", "for", "the", "member", ".", "Do", "nothing", "if", "{", "@link", "Configuration#nocomment", "}", "is", "set", "to", "true", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java#L200-L204
infinispan/infinispan
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/transaction/SyncModeTransactionTable.java
SyncModeTransactionTable.createSynchronizationAdapter
private SynchronizationAdapter createSynchronizationAdapter(Transaction transaction) { SynchronizationAdapter adapter = new SynchronizationAdapter(transaction, RemoteXid.create(uuid)); try { transaction.registerSynchronization(adapter); } catch (RollbackException | SystemException e) { ...
java
private SynchronizationAdapter createSynchronizationAdapter(Transaction transaction) { SynchronizationAdapter adapter = new SynchronizationAdapter(transaction, RemoteXid.create(uuid)); try { transaction.registerSynchronization(adapter); } catch (RollbackException | SystemException e) { ...
[ "private", "SynchronizationAdapter", "createSynchronizationAdapter", "(", "Transaction", "transaction", ")", "{", "SynchronizationAdapter", "adapter", "=", "new", "SynchronizationAdapter", "(", "transaction", ",", "RemoteXid", ".", "create", "(", "uuid", ")", ")", ";", ...
Creates and registers the {@link SynchronizationAdapter} in the {@link Transaction}.
[ "Creates", "and", "registers", "the", "{" ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/transaction/SyncModeTransactionTable.java#L78-L89
landawn/AbacusUtil
src/com/landawn/abacus/util/HBaseExecutor.java
HBaseExecutor.get
<T> T get(final Class<T> targetClass, final String tableName, final Object rowKey) throws UncheckedIOException { return get(targetClass, tableName, AnyGet.of(rowKey)); }
java
<T> T get(final Class<T> targetClass, final String tableName, final Object rowKey) throws UncheckedIOException { return get(targetClass, tableName, AnyGet.of(rowKey)); }
[ "<", "T", ">", "T", "get", "(", "final", "Class", "<", "T", ">", "targetClass", ",", "final", "String", "tableName", ",", "final", "Object", "rowKey", ")", "throws", "UncheckedIOException", "{", "return", "get", "(", "targetClass", ",", "tableName", ",", ...
And it may cause error because the "Object" is ambiguous to any type.
[ "And", "it", "may", "cause", "error", "because", "the", "Object", "is", "ambiguous", "to", "any", "type", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/HBaseExecutor.java#L802-L804
ltearno/hexa.tools
hexa.css-maven-plugin/src/main/java/fr/lteconsulting/hexacssmaven/CssMapper.java
CssMapper.processFile
public static void processFile( String input, String mappingPath, String outputFile, boolean doPrune, Log log ) throws IOException { Set<String> usedClassNames = new HashSet<>(); input = replaceClassNames( input, mappingPath, usedClassNames, log ); log.debug( usedClassNames.size() + " used css classes in the m...
java
public static void processFile( String input, String mappingPath, String outputFile, boolean doPrune, Log log ) throws IOException { Set<String> usedClassNames = new HashSet<>(); input = replaceClassNames( input, mappingPath, usedClassNames, log ); log.debug( usedClassNames.size() + " used css classes in the m...
[ "public", "static", "void", "processFile", "(", "String", "input", ",", "String", "mappingPath", ",", "String", "outputFile", ",", "boolean", "doPrune", ",", "Log", "log", ")", "throws", "IOException", "{", "Set", "<", "String", ">", "usedClassNames", "=", "...
Process an input file @throws IOException In case there is a problem @param input The input file content @param mappingPath The file containing mapping information (lines in the form of newName=oldName) @param outputFile Path to the output file @param doPrune <code>true</code> if pruning unused CSS rules is needed @p...
[ "Process", "an", "input", "file" ]
train
https://github.com/ltearno/hexa.tools/blob/604c804901b1bb13fe10b3823cc4a639f8993363/hexa.css-maven-plugin/src/main/java/fr/lteconsulting/hexacssmaven/CssMapper.java#L43-L58
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
HtmlTree.CAPTION
public static HtmlTree CAPTION(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.CAPTION, nullCheck(body)); return htmltree; }
java
public static HtmlTree CAPTION(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.CAPTION, nullCheck(body)); return htmltree; }
[ "public", "static", "HtmlTree", "CAPTION", "(", "Content", "body", ")", "{", "HtmlTree", "htmltree", "=", "new", "HtmlTree", "(", "HtmlTag", ".", "CAPTION", ",", "nullCheck", "(", "body", ")", ")", ";", "return", "htmltree", ";", "}" ]
Generates a CAPTION tag with some content. @param body content for the tag @return an HtmlTree object for the CAPTION tag
[ "Generates", "a", "CAPTION", "tag", "with", "some", "content", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L288-L291
xebia/Xebium
src/main/java/com/xebia/incubator/xebium/SeleniumDriverFixture.java
SeleniumDriverFixture.startBrowserOnUrlUsingRemoteServerOnHost
public void startBrowserOnUrlUsingRemoteServerOnHost(final String browser, final String browserUrl, final String serverHost) { startBrowserOnUrlUsingRemoteServerOnHostOnPort(browser, browserUrl, serverHost, 4444); }
java
public void startBrowserOnUrlUsingRemoteServerOnHost(final String browser, final String browserUrl, final String serverHost) { startBrowserOnUrlUsingRemoteServerOnHostOnPort(browser, browserUrl, serverHost, 4444); }
[ "public", "void", "startBrowserOnUrlUsingRemoteServerOnHost", "(", "final", "String", "browser", ",", "final", "String", "browserUrl", ",", "final", "String", "serverHost", ")", "{", "startBrowserOnUrlUsingRemoteServerOnHostOnPort", "(", "browser", ",", "browserUrl", ",",...
<p><code> | start browser | <i>firefox</i> | on url | <i>http://localhost</i> | using remote server on host | <i>localhost</i> | </code></p> @param browser @param browserUrl @param serverHost @deprecated This call requires a Selenium 1 server. It is advised to use WebDriver.
[ "<p", ">", "<code", ">", "|", "start", "browser", "|", "<i", ">", "firefox<", "/", "i", ">", "|", "on", "url", "|", "<i", ">", "http", ":", "//", "localhost<", "/", "i", ">", "|", "using", "remote", "server", "on", "host", "|", "<i", ">", "loca...
train
https://github.com/xebia/Xebium/blob/594f6d9e65622acdbd03dba0700b17645981da1f/src/main/java/com/xebia/incubator/xebium/SeleniumDriverFixture.java#L210-L212
grpc/grpc-java
core/src/main/java/io/grpc/internal/AutoConfiguredLoadBalancerFactory.java
AutoConfiguredLoadBalancerFactory.selectLoadBalancerPolicy
@Nullable ConfigOrError selectLoadBalancerPolicy(Map<String, ?> serviceConfig) { try { List<LbConfig> loadBalancerConfigs = null; if (serviceConfig != null) { List<Map<String, ?>> rawLbConfigs = ServiceConfigUtil.getLoadBalancingConfigsFromServiceConfig(serviceConfig); load...
java
@Nullable ConfigOrError selectLoadBalancerPolicy(Map<String, ?> serviceConfig) { try { List<LbConfig> loadBalancerConfigs = null; if (serviceConfig != null) { List<Map<String, ?>> rawLbConfigs = ServiceConfigUtil.getLoadBalancingConfigsFromServiceConfig(serviceConfig); load...
[ "@", "Nullable", "ConfigOrError", "selectLoadBalancerPolicy", "(", "Map", "<", "String", ",", "?", ">", "serviceConfig", ")", "{", "try", "{", "List", "<", "LbConfig", ">", "loadBalancerConfigs", "=", "null", ";", "if", "(", "serviceConfig", "!=", "null", ")...
Unlike a normal {@link LoadBalancer.Factory}, this accepts a full service config rather than the LoadBalancingConfig. @return null if no selection could be made.
[ "Unlike", "a", "normal", "{", "@link", "LoadBalancer", ".", "Factory", "}", "this", "accepts", "a", "full", "service", "config", "rather", "than", "the", "LoadBalancingConfig", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/core/src/main/java/io/grpc/internal/AutoConfiguredLoadBalancerFactory.java#L310-L342
lonnyj/liquibase-spatial
src/main/java/liquibase/ext/spatial/sqlgenerator/OracleSpatialUtils.java
OracleSpatialUtils.loadOracleSrid
public static String loadOracleSrid(final String srid, final Database database) { final String oracleSrid; final JdbcConnection jdbcConnection = (JdbcConnection) database.getConnection(); final Connection connection = jdbcConnection.getUnderlyingConnection(); Statement statement = null; ...
java
public static String loadOracleSrid(final String srid, final Database database) { final String oracleSrid; final JdbcConnection jdbcConnection = (JdbcConnection) database.getConnection(); final Connection connection = jdbcConnection.getUnderlyingConnection(); Statement statement = null; ...
[ "public", "static", "String", "loadOracleSrid", "(", "final", "String", "srid", ",", "final", "Database", "database", ")", "{", "final", "String", "oracleSrid", ";", "final", "JdbcConnection", "jdbcConnection", "=", "(", "JdbcConnection", ")", "database", ".", "...
Queries to the database to convert the given EPSG SRID to the corresponding Oracle SRID. @param srid the EPSG SRID. @param database the database instance. @return the corresponding Oracle SRID.
[ "Queries", "to", "the", "database", "to", "convert", "the", "given", "EPSG", "SRID", "to", "the", "corresponding", "Oracle", "SRID", "." ]
train
https://github.com/lonnyj/liquibase-spatial/blob/36ae41b0d3d08bb00a22c856e51ffeed08891c0e/src/main/java/liquibase/ext/spatial/sqlgenerator/OracleSpatialUtils.java#L104-L125
awslabs/amazon-sqs-java-messaging-lib
src/main/java/com/amazon/sqs/javamessaging/acknowledge/NegativeAcknowledger.java
NegativeAcknowledger.bulkAction
public void bulkAction(ArrayDeque<MessageManager> messageQueue, String queueUrl) throws JMSException { List<String> receiptHandles = new ArrayList<String>(); while (!messageQueue.isEmpty()) { receiptHandles.add(((SQSMessage) (messageQueue.pollFirst().getMessage())).getReceiptHandle()); ...
java
public void bulkAction(ArrayDeque<MessageManager> messageQueue, String queueUrl) throws JMSException { List<String> receiptHandles = new ArrayList<String>(); while (!messageQueue.isEmpty()) { receiptHandles.add(((SQSMessage) (messageQueue.pollFirst().getMessage())).getReceiptHandle()); ...
[ "public", "void", "bulkAction", "(", "ArrayDeque", "<", "MessageManager", ">", "messageQueue", ",", "String", "queueUrl", ")", "throws", "JMSException", "{", "List", "<", "String", ">", "receiptHandles", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ...
Bulk action for negative acknowledge on the list of messages of a specific queue. @param messageQueue Container for the list of message managers. @param queueUrl The queueUrl of the messages, which they received from. @throws JMSException If <code>action</code> throws.
[ "Bulk", "action", "for", "negative", "acknowledge", "on", "the", "list", "of", "messages", "of", "a", "specific", "queue", "." ]
train
https://github.com/awslabs/amazon-sqs-java-messaging-lib/blob/efa716d34d51ef1c5572790626cdb795419cb342/src/main/java/com/amazon/sqs/javamessaging/acknowledge/NegativeAcknowledger.java#L60-L72
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/MapConfigurationPropertySource.java
MapConfigurationPropertySource.put
public void put(Object name, Object value) { this.source.put((name != null) ? name.toString() : null, value); }
java
public void put(Object name, Object value) { this.source.put((name != null) ? name.toString() : null, value); }
[ "public", "void", "put", "(", "Object", "name", ",", "Object", "value", ")", "{", "this", ".", "source", ".", "put", "(", "(", "name", "!=", "null", ")", "?", "name", ".", "toString", "(", ")", ":", "null", ",", "value", ")", ";", "}" ]
Add an individual entry. @param name the name @param value the value
[ "Add", "an", "individual", "entry", "." ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/MapConfigurationPropertySource.java#L77-L79
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/EmulatedFields.java
EmulatedFields.get
public float get(String name, float defaultValue) throws IllegalArgumentException { ObjectSlot slot = findMandatorySlot(name, float.class); return slot.defaulted ? defaultValue : ((Float) slot.fieldValue).floatValue(); }
java
public float get(String name, float defaultValue) throws IllegalArgumentException { ObjectSlot slot = findMandatorySlot(name, float.class); return slot.defaulted ? defaultValue : ((Float) slot.fieldValue).floatValue(); }
[ "public", "float", "get", "(", "String", "name", ",", "float", "defaultValue", ")", "throws", "IllegalArgumentException", "{", "ObjectSlot", "slot", "=", "findMandatorySlot", "(", "name", ",", "float", ".", "class", ")", ";", "return", "slot", ".", "defaulted"...
Finds and returns the float value of a given field named {@code name} in the receiver. If the field has not been assigned any value yet, the default value {@code defaultValue} is returned instead. @param name the name of the field to find. @param defaultValue return value in case the field has not been assigned to yet...
[ "Finds", "and", "returns", "the", "float", "value", "of", "a", "given", "field", "named", "{", "@code", "name", "}", "in", "the", "receiver", ".", "If", "the", "field", "has", "not", "been", "assigned", "any", "value", "yet", "the", "default", "value", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/EmulatedFields.java#L268-L271
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ClassDocImpl.java
ClassDocImpl.serializationMethods
public MethodDoc[] serializationMethods() { if (serializedForm == null) { serializedForm = new SerializedForm(env, tsym, this); } //### Clone this? return serializedForm.methods(); }
java
public MethodDoc[] serializationMethods() { if (serializedForm == null) { serializedForm = new SerializedForm(env, tsym, this); } //### Clone this? return serializedForm.methods(); }
[ "public", "MethodDoc", "[", "]", "serializationMethods", "(", ")", "{", "if", "(", "serializedForm", "==", "null", ")", "{", "serializedForm", "=", "new", "SerializedForm", "(", "env", ",", "tsym", ",", "this", ")", ";", "}", "//### Clone this?", "return", ...
Return the serialization methods for this class. @return an array of <code>MethodDocImpl</code> that represents the serialization methods for this class.
[ "Return", "the", "serialization", "methods", "for", "this", "class", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ClassDocImpl.java#L1258-L1264
twilio/twilio-java
src/main/java/com/twilio/rest/authy/v1/service/EntityReader.java
EntityReader.previousPage
@Override public Page<Entity> previousPage(final Page<Entity> page, final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, page.getPreviousPageUrl( Domains.AUTHY.toString(), client.getRegio...
java
@Override public Page<Entity> previousPage(final Page<Entity> page, final TwilioRestClient client) { Request request = new Request( HttpMethod.GET, page.getPreviousPageUrl( Domains.AUTHY.toString(), client.getRegio...
[ "@", "Override", "public", "Page", "<", "Entity", ">", "previousPage", "(", "final", "Page", "<", "Entity", ">", "page", ",", "final", "TwilioRestClient", "client", ")", "{", "Request", "request", "=", "new", "Request", "(", "HttpMethod", ".", "GET", ",", ...
Retrieve the previous page from the Twilio API. @param page current page @param client TwilioRestClient with which to make the request @return Previous Page
[ "Retrieve", "the", "previous", "page", "from", "the", "Twilio", "API", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/authy/v1/service/EntityReader.java#L115-L126
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/chrono/IsoChronology.java
IsoChronology.dateYearDay
@Override // override with covariant return type public LocalDate dateYearDay(Era era, int yearOfEra, int dayOfYear) { return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); }
java
@Override // override with covariant return type public LocalDate dateYearDay(Era era, int yearOfEra, int dayOfYear) { return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); }
[ "@", "Override", "// override with covariant return type", "public", "LocalDate", "dateYearDay", "(", "Era", "era", ",", "int", "yearOfEra", ",", "int", "dayOfYear", ")", "{", "return", "dateYearDay", "(", "prolepticYear", "(", "era", ",", "yearOfEra", ")", ",", ...
Obtains an ISO local date from the era, year-of-era and day-of-year fields. @param era the ISO era, not null @param yearOfEra the ISO year-of-era @param dayOfYear the ISO day-of-year @return the ISO local date, not null @throws DateTimeException if unable to create the date
[ "Obtains", "an", "ISO", "local", "date", "from", "the", "era", "year", "-", "of", "-", "era", "and", "day", "-", "of", "-", "year", "fields", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/chrono/IsoChronology.java#L217-L220
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/auth/BoxAuthentication.java
BoxAuthentication.onAuthenticationFailure
public void onAuthenticationFailure(BoxAuthenticationInfo infoOriginal, Exception ex) { String msg = "failure:"; if (getAuthStorage() != null) { msg += "auth storage :" + getAuthStorage().toString(); } BoxAuthenticationInfo info = BoxAuthenticationInfo.unmodifiableObject(info...
java
public void onAuthenticationFailure(BoxAuthenticationInfo infoOriginal, Exception ex) { String msg = "failure:"; if (getAuthStorage() != null) { msg += "auth storage :" + getAuthStorage().toString(); } BoxAuthenticationInfo info = BoxAuthenticationInfo.unmodifiableObject(info...
[ "public", "void", "onAuthenticationFailure", "(", "BoxAuthenticationInfo", "infoOriginal", ",", "Exception", "ex", ")", "{", "String", "msg", "=", "\"failure:\"", ";", "if", "(", "getAuthStorage", "(", ")", "!=", "null", ")", "{", "msg", "+=", "\"auth storage :\...
Callback method to be called if authentication process fails. @param infoOriginal the authentication information associated with the failed authentication. @param ex the exception if appliable that caused the logout.
[ "Callback", "method", "to", "be", "called", "if", "authentication", "process", "fails", "." ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/auth/BoxAuthentication.java#L180-L195
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/photos/licenses/LicensesInterface.java
LicensesInterface.setLicense
public void setLicense(String photoId, int licenseId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_SET_LICENSE); parameters.put("photo_id", photoId); parameters.put("license_id", Integer.toString(licenseId));...
java
public void setLicense(String photoId, int licenseId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_SET_LICENSE); parameters.put("photo_id", photoId); parameters.put("license_id", Integer.toString(licenseId));...
[ "public", "void", "setLicense", "(", "String", "photoId", ",", "int", "licenseId", ")", "throws", "FlickrException", "{", "Map", "<", "String", ",", "Object", ">", "parameters", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "pa...
Sets the license for a photo. This method requires authentication with 'write' permission. @param photoId The photo to update the license for. @param licenseId The license to apply, or 0 (zero) to remove the current license. @throws FlickrException
[ "Sets", "the", "license", "for", "a", "photo", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photos/licenses/LicensesInterface.java#L82-L95
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.removeNodeFromPool
public void removeNodeFromPool(String poolId, String computeNodeId) throws BatchErrorException, IOException { removeNodeFromPool(poolId, computeNodeId, null, null, null); }
java
public void removeNodeFromPool(String poolId, String computeNodeId) throws BatchErrorException, IOException { removeNodeFromPool(poolId, computeNodeId, null, null, null); }
[ "public", "void", "removeNodeFromPool", "(", "String", "poolId", ",", "String", "computeNodeId", ")", "throws", "BatchErrorException", ",", "IOException", "{", "removeNodeFromPool", "(", "poolId", ",", "computeNodeId", ",", "null", ",", "null", ",", "null", ")", ...
Removes the specified compute node from the specified pool. @param poolId The ID of the pool. @param computeNodeId The ID of the compute node to remove from the pool. @throws BatchErrorException Exception thrown when an error response is received from the Batch service. @throws IOException Exception thrown when there ...
[ "Removes", "the", "specified", "compute", "node", "from", "the", "specified", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L858-L860
UrielCh/ovh-java-sdk
ovh-java-sdk-licensevirtuozzo/src/main/java/net/minidev/ovh/api/ApiOvhLicensevirtuozzo.java
ApiOvhLicensevirtuozzo.serviceName_canLicenseBeMovedTo_GET
public OvhChangeIpStatus serviceName_canLicenseBeMovedTo_GET(String serviceName, String destinationIp) throws IOException { String qPath = "/license/virtuozzo/{serviceName}/canLicenseBeMovedTo"; StringBuilder sb = path(qPath, serviceName); query(sb, "destinationIp", destinationIp); String resp = exec(qPath, "GE...
java
public OvhChangeIpStatus serviceName_canLicenseBeMovedTo_GET(String serviceName, String destinationIp) throws IOException { String qPath = "/license/virtuozzo/{serviceName}/canLicenseBeMovedTo"; StringBuilder sb = path(qPath, serviceName); query(sb, "destinationIp", destinationIp); String resp = exec(qPath, "GE...
[ "public", "OvhChangeIpStatus", "serviceName_canLicenseBeMovedTo_GET", "(", "String", "serviceName", ",", "String", "destinationIp", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/license/virtuozzo/{serviceName}/canLicenseBeMovedTo\"", ";", "StringBuilder", "sb",...
Will tell if the ip can accept the license REST: GET /license/virtuozzo/{serviceName}/canLicenseBeMovedTo @param destinationIp [required] The Ip on which you want to move this license @param serviceName [required] The name of your Virtuozzo license
[ "Will", "tell", "if", "the", "ip", "can", "accept", "the", "license" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-licensevirtuozzo/src/main/java/net/minidev/ovh/api/ApiOvhLicensevirtuozzo.java#L227-L233
eserating/siren4j
src/main/java/com/google/code/siren4j/converter/ReflectingConverter.java
ReflectingConverter.getSubEntityAnnotation
private Siren4JSubEntity getSubEntityAnnotation(Field currentField, List<ReflectedInfo> fieldInfo) { Siren4JSubEntity result = null; result = currentField.getAnnotation(Siren4JSubEntity.class); if (result == null && fieldInfo != null) { ReflectedInfo info = ReflectionUtils.getFie...
java
private Siren4JSubEntity getSubEntityAnnotation(Field currentField, List<ReflectedInfo> fieldInfo) { Siren4JSubEntity result = null; result = currentField.getAnnotation(Siren4JSubEntity.class); if (result == null && fieldInfo != null) { ReflectedInfo info = ReflectionUtils.getFie...
[ "private", "Siren4JSubEntity", "getSubEntityAnnotation", "(", "Field", "currentField", ",", "List", "<", "ReflectedInfo", ">", "fieldInfo", ")", "{", "Siren4JSubEntity", "result", "=", "null", ";", "result", "=", "currentField", ".", "getAnnotation", "(", "Siren4JSu...
Helper to retrieve a sub entity annotation from either the field itself or the getter. If an annotation exists on both, then the field wins. @param currentField assumed not <code>null</code>. @param fieldInfo assumed not <code>null</code>. @return the annotation if found else <code>null</code>.
[ "Helper", "to", "retrieve", "a", "sub", "entity", "annotation", "from", "either", "the", "field", "itself", "or", "the", "getter", ".", "If", "an", "annotation", "exists", "on", "both", "then", "the", "field", "wins", "." ]
train
https://github.com/eserating/siren4j/blob/f12e3185076ad920352ec4f6eb2a071a3683505f/src/main/java/com/google/code/siren4j/converter/ReflectingConverter.java#L561-L571
tobato/FastDFS_Client
src/main/java/com/github/tobato/fastdfs/domain/proto/mapper/FdfsParamMapper.java
FdfsParamMapper.mapByIndex
private static <T> T mapByIndex(byte[] content, Class<T> genericType, ObjectMetaData objectMap, Charset charset) throws InstantiationException, IllegalAccessException, InvocationTargetException { List<FieldMetaData> mappingFields = objectMap.getFieldList(); T obj = genericType.newInstance()...
java
private static <T> T mapByIndex(byte[] content, Class<T> genericType, ObjectMetaData objectMap, Charset charset) throws InstantiationException, IllegalAccessException, InvocationTargetException { List<FieldMetaData> mappingFields = objectMap.getFieldList(); T obj = genericType.newInstance()...
[ "private", "static", "<", "T", ">", "T", "mapByIndex", "(", "byte", "[", "]", "content", ",", "Class", "<", "T", ">", "genericType", ",", "ObjectMetaData", "objectMap", ",", "Charset", "charset", ")", "throws", "InstantiationException", ",", "IllegalAccessExce...
按列顺序映射 @param content @param genericType @param objectMap @return @throws InstantiationException @throws IllegalAccessException @throws InvocationTargetException
[ "按列顺序映射" ]
train
https://github.com/tobato/FastDFS_Client/blob/8e3bfe712f1739028beed7f3a6b2cc4579a231e4/src/main/java/com/github/tobato/fastdfs/domain/proto/mapper/FdfsParamMapper.java#L90-L103
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/VMath.java
VMath.setCol
public static void setCol(final double[][] m1, final int c, final double[] column) { assert column.length == m1.length : ERR_DIMENSIONS; for(int i = 0; i < m1.length; i++) { m1[i][c] = column[i]; } }
java
public static void setCol(final double[][] m1, final int c, final double[] column) { assert column.length == m1.length : ERR_DIMENSIONS; for(int i = 0; i < m1.length; i++) { m1[i][c] = column[i]; } }
[ "public", "static", "void", "setCol", "(", "final", "double", "[", "]", "[", "]", "m1", ",", "final", "int", "c", ",", "final", "double", "[", "]", "column", ")", "{", "assert", "column", ".", "length", "==", "m1", ".", "length", ":", "ERR_DIMENSIONS...
Sets the <code>c</code>th column of this matrix to the specified column. @param m1 Input matrix @param c the index of the column to be set @param column the value of the column to be set
[ "Sets", "the", "<code", ">", "c<", "/", "code", ">", "th", "column", "of", "this", "matrix", "to", "the", "specified", "column", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/VMath.java#L1106-L1111
anotheria/moskito
moskito-extensions/moskito-monitoring-plugin/src/main/java/net/anotheria/moskito/extensions/monitoring/stats/GenericStats.java
GenericStats.getStatValueAsInteger
public int getStatValueAsInteger(T metric, String interval) { if (metric.isRateMetric()) { return (int)(getStatValueAsDouble(metric, interval)); } return getMonitoredStatValue(metric).getValueAsInt(interval); }
java
public int getStatValueAsInteger(T metric, String interval) { if (metric.isRateMetric()) { return (int)(getStatValueAsDouble(metric, interval)); } return getMonitoredStatValue(metric).getValueAsInt(interval); }
[ "public", "int", "getStatValueAsInteger", "(", "T", "metric", ",", "String", "interval", ")", "{", "if", "(", "metric", ".", "isRateMetric", "(", ")", ")", "{", "return", "(", "int", ")", "(", "getStatValueAsDouble", "(", "metric", ",", "interval", ")", ...
Get value of provided metric for the given interval as int value. @param metric metric which value we wanna get @param interval the name of the Interval or <code>null</code> to get the absolute value @return the current value
[ "Get", "value", "of", "provided", "metric", "for", "the", "given", "interval", "as", "int", "value", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-extensions/moskito-monitoring-plugin/src/main/java/net/anotheria/moskito/extensions/monitoring/stats/GenericStats.java#L178-L183
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/DateField.java
DateField.getSQLFromField
public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { if (this.isNull()) { if ((!this.isNullable()) || (iType == DBConstants.SQL_SELECT_TYPE) || (DBConstants.FALSE.equals(this.getRecord().getTable().get...
java
public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { if (this.isNull()) { if ((!this.isNullable()) || (iType == DBConstants.SQL_SELECT_TYPE) || (DBConstants.FALSE.equals(this.getRecord().getTable().get...
[ "public", "void", "getSQLFromField", "(", "PreparedStatement", "statement", ",", "int", "iType", ",", "int", "iParamColumn", ")", "throws", "SQLException", "{", "if", "(", "this", ".", "isNull", "(", ")", ")", "{", "if", "(", "(", "!", "this", ".", "isNu...
Move the physical binary data to this SQL parameter row. @param statement The SQL prepare statement. @param iType the type of SQL statement. @param iParamColumn The column in the prepared statement to set the data. @exception SQLException From SQL calls.
[ "Move", "the", "physical", "binary", "data", "to", "this", "SQL", "parameter", "row", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/DateField.java#L188-L207
Axway/Grapes
server/src/main/java/org/axway/grapes/server/webapp/resources/OrganizationResource.java
OrganizationResource.getNames
@GET @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON}) @Path(ServerAPI.GET_NAMES) public Response getNames(){ LOG.info("Got a get organization names request."); final ListView view = new ListView("Organization Ids list", "Organizations"); final List<String> names = getOrg...
java
@GET @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON}) @Path(ServerAPI.GET_NAMES) public Response getNames(){ LOG.info("Got a get organization names request."); final ListView view = new ListView("Organization Ids list", "Organizations"); final List<String> names = getOrg...
[ "@", "GET", "@", "Produces", "(", "{", "MediaType", ".", "TEXT_HTML", ",", "MediaType", ".", "APPLICATION_JSON", "}", ")", "@", "Path", "(", "ServerAPI", ".", "GET_NAMES", ")", "public", "Response", "getNames", "(", ")", "{", "LOG", ".", "info", "(", "...
Return the list of available organization name. This method is call via GET <dm_url>/organization/names @return Response A list of organization name in HTML or JSON
[ "Return", "the", "list", "of", "available", "organization", "name", ".", "This", "method", "is", "call", "via", "GET", "<dm_url", ">", "/", "organization", "/", "names" ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/webapp/resources/OrganizationResource.java#L69-L80
j-easy/easy-random
easy-random-core/src/main/java/org/jeasy/random/EasyRandomParameters.java
EasyRandomParameters.timeRange
public EasyRandomParameters timeRange(final LocalTime min, final LocalTime max) { if (min.isAfter(max)) { throw new IllegalArgumentException("Min time should be before max time"); } setTimeRange(new Range<>(min, max)); return this; }
java
public EasyRandomParameters timeRange(final LocalTime min, final LocalTime max) { if (min.isAfter(max)) { throw new IllegalArgumentException("Min time should be before max time"); } setTimeRange(new Range<>(min, max)); return this; }
[ "public", "EasyRandomParameters", "timeRange", "(", "final", "LocalTime", "min", ",", "final", "LocalTime", "max", ")", "{", "if", "(", "min", ".", "isAfter", "(", "max", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Min time should be befor...
Set the time range. @param min time @param max time @return the current {@link EasyRandomParameters} instance for method chaining
[ "Set", "the", "time", "range", "." ]
train
https://github.com/j-easy/easy-random/blob/816b0d6a74c7288af111e70ae1b0b57d7fe3b59d/easy-random-core/src/main/java/org/jeasy/random/EasyRandomParameters.java#L470-L476
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java
HttpHeaders.setDate
@Deprecated public static void setDate(HttpMessage message, Date value) { message.headers().set(HttpHeaderNames.DATE, value); }
java
@Deprecated public static void setDate(HttpMessage message, Date value) { message.headers().set(HttpHeaderNames.DATE, value); }
[ "@", "Deprecated", "public", "static", "void", "setDate", "(", "HttpMessage", "message", ",", "Date", "value", ")", "{", "message", ".", "headers", "(", ")", ".", "set", "(", "HttpHeaderNames", ".", "DATE", ",", "value", ")", ";", "}" ]
@deprecated Use {@link #set(CharSequence, Object)} instead. Sets the {@code "Date"} header.
[ "@deprecated", "Use", "{", "@link", "#set", "(", "CharSequence", "Object", ")", "}", "instead", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/HttpHeaders.java#L1069-L1072
ineunetOS/knife-commons
knife-commons-utils/src/main/java/com/ineunet/knife/util/StringUtils.java
StringUtils.abbreviateMiddle
public static String abbreviateMiddle(String str, String middle, int length) { if (isEmpty(str) || isEmpty(middle)) { return str; } if (length >= str.length() || length < (middle.length()+2)) { return str; } int targetSting = length-middle.length()...
java
public static String abbreviateMiddle(String str, String middle, int length) { if (isEmpty(str) || isEmpty(middle)) { return str; } if (length >= str.length() || length < (middle.length()+2)) { return str; } int targetSting = length-middle.length()...
[ "public", "static", "String", "abbreviateMiddle", "(", "String", "str", ",", "String", "middle", ",", "int", "length", ")", "{", "if", "(", "isEmpty", "(", "str", ")", "||", "isEmpty", "(", "middle", ")", ")", "{", "return", "str", ";", "}", "if", "(...
<p>Abbreviates a String to the length passed, replacing the middle characters with the supplied replacement String.</p> <p>This abbreviation only occurs if the following criteria is met: <ul> <li>Neither the String for abbreviation nor the replacement String are null or empty </li> <li>The length to truncate to is les...
[ "<p", ">", "Abbreviates", "a", "String", "to", "the", "length", "passed", "replacing", "the", "middle", "characters", "with", "the", "supplied", "replacement", "String", ".", "<", "/", "p", ">" ]
train
https://github.com/ineunetOS/knife-commons/blob/eae9e59afa020a00ae8977c10d43ac8ae46ae236/knife-commons-utils/src/main/java/com/ineunet/knife/util/StringUtils.java#L5833-L5852
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/form/CmsForm.java
CmsForm.addField
public void addField(String fieldGroup, I_CmsFormField formField, String initialValue) { if (initialValue != null) { formField.getWidget().setFormValueAsString(initialValue); } addField(fieldGroup, formField); }
java
public void addField(String fieldGroup, I_CmsFormField formField, String initialValue) { if (initialValue != null) { formField.getWidget().setFormValueAsString(initialValue); } addField(fieldGroup, formField); }
[ "public", "void", "addField", "(", "String", "fieldGroup", ",", "I_CmsFormField", "formField", ",", "String", "initialValue", ")", "{", "if", "(", "initialValue", "!=", "null", ")", "{", "formField", ".", "getWidget", "(", ")", ".", "setFormValueAsString", "("...
Adds a form field to the form and sets its initial value.<p> @param fieldGroup the form field group key @param formField the form field which should be added @param initialValue the initial value of the form field, or null if the field shouldn't have an initial value
[ "Adds", "a", "form", "field", "to", "the", "form", "and", "sets", "its", "initial", "value", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/form/CmsForm.java#L158-L164
Azure/azure-sdk-for-java
authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsInner.java
RoleAssignmentsInner.deleteAsync
public Observable<RoleAssignmentInner> deleteAsync(String scope, String roleAssignmentName) { return deleteWithServiceResponseAsync(scope, roleAssignmentName).map(new Func1<ServiceResponse<RoleAssignmentInner>, RoleAssignmentInner>() { @Override public RoleAssignmentInner call(ServiceRes...
java
public Observable<RoleAssignmentInner> deleteAsync(String scope, String roleAssignmentName) { return deleteWithServiceResponseAsync(scope, roleAssignmentName).map(new Func1<ServiceResponse<RoleAssignmentInner>, RoleAssignmentInner>() { @Override public RoleAssignmentInner call(ServiceRes...
[ "public", "Observable", "<", "RoleAssignmentInner", ">", "deleteAsync", "(", "String", "scope", ",", "String", "roleAssignmentName", ")", "{", "return", "deleteWithServiceResponseAsync", "(", "scope", ",", "roleAssignmentName", ")", ".", "map", "(", "new", "Func1", ...
Deletes a role assignment. @param scope The scope of the role assignment to delete. @param roleAssignmentName The name of the role assignment to delete. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the RoleAssignmentInner object
[ "Deletes", "a", "role", "assignment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/authorization/resource-manager/v2015_07_01/src/main/java/com/microsoft/azure/management/authorization/v2015_07_01/implementation/RoleAssignmentsInner.java#L683-L690
Jasig/uPortal
uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceCompositeGroupService.java
ReferenceCompositeGroupService.getGroupMember
@Override public IGroupMember getGroupMember(String key, Class type) throws GroupsException { IGroupMember gm = null; if (type == ICompositeGroupService.GROUP_ENTITY_TYPE) gm = findGroup(key); else gm = getEntity(key, type); return gm; }
java
@Override public IGroupMember getGroupMember(String key, Class type) throws GroupsException { IGroupMember gm = null; if (type == ICompositeGroupService.GROUP_ENTITY_TYPE) gm = findGroup(key); else gm = getEntity(key, type); return gm; }
[ "@", "Override", "public", "IGroupMember", "getGroupMember", "(", "String", "key", ",", "Class", "type", ")", "throws", "GroupsException", "{", "IGroupMember", "gm", "=", "null", ";", "if", "(", "type", "==", "ICompositeGroupService", ".", "GROUP_ENTITY_TYPE", "...
Returns an <code>IGroupMember</code> representing either a group or a portal entity. If the parm <code>type</code> is the group type, the <code>IGroupMember</code> is an <code> IEntityGroup</code> else it is an <code>IEntity</code>.
[ "Returns", "an", "<code", ">", "IGroupMember<", "/", "code", ">", "representing", "either", "a", "group", "or", "a", "portal", "entity", ".", "If", "the", "parm", "<code", ">", "type<", "/", "code", ">", "is", "the", "group", "type", "the", "<code", ">...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceCompositeGroupService.java#L135-L141
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/query/impl/QueryContext.java
QueryContext.matchIndex
public Index matchIndex(String pattern, IndexMatchHint matchHint) { return indexes.matchIndex(pattern, matchHint); }
java
public Index matchIndex(String pattern, IndexMatchHint matchHint) { return indexes.matchIndex(pattern, matchHint); }
[ "public", "Index", "matchIndex", "(", "String", "pattern", ",", "IndexMatchHint", "matchHint", ")", "{", "return", "indexes", ".", "matchIndex", "(", "pattern", ",", "matchHint", ")", ";", "}" ]
Matches an index for the given pattern and match hint. @param pattern the pattern to match an index for. May be either an attribute name or an exact index name. @param matchHint the match hint. @return the matched index or {@code null} if nothing matched. @see QueryContext.IndexMatchHint
[ "Matches", "an", "index", "for", "the", "given", "pattern", "and", "match", "hint", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/impl/QueryContext.java#L78-L80
dihedron/dihedron-commons
src/main/java/org/dihedron/patterns/activities/base/CompoundActivity.java
CompoundActivity.perform
@Override public ActivityData perform(ActivityContext context, ActivityData data) throws ActivityException { TypedVector<ActivityInfo> infos = new TypedVector<ActivityInfo>(); int i = 0; for(Activity activity : activities) { logger.trace("adding activity number {} with id '{}'...", i, activity.getId()); ...
java
@Override public ActivityData perform(ActivityContext context, ActivityData data) throws ActivityException { TypedVector<ActivityInfo> infos = new TypedVector<ActivityInfo>(); int i = 0; for(Activity activity : activities) { logger.trace("adding activity number {} with id '{}'...", i, activity.getId()); ...
[ "@", "Override", "public", "ActivityData", "perform", "(", "ActivityContext", "context", ",", "ActivityData", "data", ")", "throws", "ActivityException", "{", "TypedVector", "<", "ActivityInfo", ">", "infos", "=", "new", "TypedVector", "<", "ActivityInfo", ">", "(...
Runs a set of sub-activities in a sequence (one at a time), with no parallelism. As soon as one of the activities throws an exception the whole processing is aborted and the exception is propagated to its wrapping activities. @see org.dihedron.tasks.Task#execute(org.dihedron.tasks.ExecutionContext)
[ "Runs", "a", "set", "of", "sub", "-", "activities", "in", "a", "sequence", "(", "one", "at", "a", "time", ")", "with", "no", "parallelism", ".", "As", "soon", "as", "one", "of", "the", "activities", "throws", "an", "exception", "the", "whole", "process...
train
https://github.com/dihedron/dihedron-commons/blob/a5194cdaa0d6417ef4aade6ea407a1cad6e8458e/src/main/java/org/dihedron/patterns/activities/base/CompoundActivity.java#L64-L83
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainsInner.java
DomainsInner.regenerateKeyAsync
public Observable<DomainSharedAccessKeysInner> regenerateKeyAsync(String resourceGroupName, String domainName, String keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, domainName, keyName).map(new Func1<ServiceResponse<DomainSharedAccessKeysInner>, DomainSharedAccessKeysInner>() { ...
java
public Observable<DomainSharedAccessKeysInner> regenerateKeyAsync(String resourceGroupName, String domainName, String keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, domainName, keyName).map(new Func1<ServiceResponse<DomainSharedAccessKeysInner>, DomainSharedAccessKeysInner>() { ...
[ "public", "Observable", "<", "DomainSharedAccessKeysInner", ">", "regenerateKeyAsync", "(", "String", "resourceGroupName", ",", "String", "domainName", ",", "String", "keyName", ")", "{", "return", "regenerateKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "d...
Regenerate key for a domain. Regenerate a shared access key for a domain. @param resourceGroupName The name of the resource group within the user's subscription. @param domainName Name of the domain @param keyName Key name to regenerate key1 or key2 @throws IllegalArgumentException thrown if parameters fail the valida...
[ "Regenerate", "key", "for", "a", "domain", ".", "Regenerate", "a", "shared", "access", "key", "for", "a", "domain", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainsInner.java#L1192-L1199
Samsung/GearVRf
GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRRigidBody.java
GVRRigidBody.applyCentralImpulse
public void applyCentralImpulse(final float x, final float y, final float z) { mPhysicsContext.runOnPhysicsThread(new Runnable() { @Override public void run() { Native3DRigidBody.applyCentralImpulse(getNative(), x, y, z); } }); }
java
public void applyCentralImpulse(final float x, final float y, final float z) { mPhysicsContext.runOnPhysicsThread(new Runnable() { @Override public void run() { Native3DRigidBody.applyCentralImpulse(getNative(), x, y, z); } }); }
[ "public", "void", "applyCentralImpulse", "(", "final", "float", "x", ",", "final", "float", "y", ",", "final", "float", "z", ")", "{", "mPhysicsContext", ".", "runOnPhysicsThread", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "...
Apply a central vector vector [X, Y, Z] to this {@linkplain GVRRigidBody rigid body} @param x impulse factor on the 'X' axis. @param y impulse factor on the 'Y' axis. @param z impulse factor on the 'Z' axis.
[ "Apply", "a", "central", "vector", "vector", "[", "X", "Y", "Z", "]", "to", "this", "{", "@linkplain", "GVRRigidBody", "rigid", "body", "}" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRRigidBody.java#L217-L224
apache/flink
flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java
Configuration.getLong
public long getLong(String name, long defaultValue) { String valueString = getTrimmed(name); if (valueString == null) return defaultValue; String hexString = getHexDigits(valueString); if (hexString != null) { return Long.parseLong(hexString, 16); } return Long.parseLong(valueString); }
java
public long getLong(String name, long defaultValue) { String valueString = getTrimmed(name); if (valueString == null) return defaultValue; String hexString = getHexDigits(valueString); if (hexString != null) { return Long.parseLong(hexString, 16); } return Long.parseLong(valueString); }
[ "public", "long", "getLong", "(", "String", "name", ",", "long", "defaultValue", ")", "{", "String", "valueString", "=", "getTrimmed", "(", "name", ")", ";", "if", "(", "valueString", "==", "null", ")", "return", "defaultValue", ";", "String", "hexString", ...
Get the value of the <code>name</code> property as a <code>long</code>. If no such property exists, the provided default value is returned, or if the specified value is not a valid <code>long</code>, then an error is thrown. @param name property name. @param defaultValue default value. @throws NumberFormatException wh...
[ "Get", "the", "value", "of", "the", "<code", ">", "name<", "/", "code", ">", "property", "as", "a", "<code", ">", "long<", "/", "code", ">", ".", "If", "no", "such", "property", "exists", "the", "provided", "default", "value", "is", "returned", "or", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java#L1406-L1415
FXMisc/Flowless
src/main/java/org/fxmisc/flowless/CellPositioner.java
CellPositioner.placeStartAt
public C placeStartAt(int itemIndex, double startOffStart) { C cell = getSizedCell(itemIndex); relocate(cell, 0, startOffStart); cell.getNode().setVisible(true); return cell; }
java
public C placeStartAt(int itemIndex, double startOffStart) { C cell = getSizedCell(itemIndex); relocate(cell, 0, startOffStart); cell.getNode().setVisible(true); return cell; }
[ "public", "C", "placeStartAt", "(", "int", "itemIndex", ",", "double", "startOffStart", ")", "{", "C", "cell", "=", "getSizedCell", "(", "itemIndex", ")", ";", "relocate", "(", "cell", ",", "0", ",", "startOffStart", ")", ";", "cell", ".", "getNode", "("...
Properly resizes the cell's node, and sets its "layoutY" value, so that is the first visible node in the viewport, and further offsets this value by {@code startOffStart}, so that the node's <em>top</em> edge appears (if negative) "above," (if 0) "at," or (if negative) "below" the viewport's "top" edge. See {@link Orie...
[ "Properly", "resizes", "the", "cell", "s", "node", "and", "sets", "its", "layoutY", "value", "so", "that", "is", "the", "first", "visible", "node", "in", "the", "viewport", "and", "further", "offsets", "this", "value", "by", "{", "@code", "startOffStart", ...
train
https://github.com/FXMisc/Flowless/blob/dce2269ebafed8f79203d00085af41f06f3083bc/src/main/java/org/fxmisc/flowless/CellPositioner.java#L126-L131
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/eval/MseMarginalEvaluator.java
MseMarginalEvaluator.evaluate
public double evaluate(VarConfig goldConfig, FgInferencer inf) { Algebra s = RealAlgebra.getInstance(); double sum = s.zero(); for (Var v : goldConfig.getVars()) { if (v.getType() == VarType.PREDICTED) { VarTensor marg = inf.getMarginals(v); int goldS...
java
public double evaluate(VarConfig goldConfig, FgInferencer inf) { Algebra s = RealAlgebra.getInstance(); double sum = s.zero(); for (Var v : goldConfig.getVars()) { if (v.getType() == VarType.PREDICTED) { VarTensor marg = inf.getMarginals(v); int goldS...
[ "public", "double", "evaluate", "(", "VarConfig", "goldConfig", ",", "FgInferencer", "inf", ")", "{", "Algebra", "s", "=", "RealAlgebra", ".", "getInstance", "(", ")", ";", "double", "sum", "=", "s", ".", "zero", "(", ")", ";", "for", "(", "Var", "v", ...
Computes the mean squared error between the true marginals (as represented by the goldConfig) and the predicted marginals (as represented by an inferencer). @param goldConfig The gold configuration of the variables. @param inf The (already run) inferencer storing the predicted marginals. @return The UNORMALIZED mean s...
[ "Computes", "the", "mean", "squared", "error", "between", "the", "true", "marginals", "(", "as", "represented", "by", "the", "goldConfig", ")", "and", "the", "predicted", "marginals", "(", "as", "represented", "by", "an", "inferencer", ")", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/eval/MseMarginalEvaluator.java#L22-L39
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java
ProjectiveStructureByFactorization.setPixels
public void setPixels(int view , List<Point2D_F64> pixelsInView ) { if( pixelsInView.size() != pixels.numCols ) throw new IllegalArgumentException("Pixel count must be constant and match "+pixels.numCols); int row = view*2; for (int i = 0; i < pixelsInView.size(); i++) { Point2D_F64 p = pixelsInView.get(i)...
java
public void setPixels(int view , List<Point2D_F64> pixelsInView ) { if( pixelsInView.size() != pixels.numCols ) throw new IllegalArgumentException("Pixel count must be constant and match "+pixels.numCols); int row = view*2; for (int i = 0; i < pixelsInView.size(); i++) { Point2D_F64 p = pixelsInView.get(i)...
[ "public", "void", "setPixels", "(", "int", "view", ",", "List", "<", "Point2D_F64", ">", "pixelsInView", ")", "{", "if", "(", "pixelsInView", ".", "size", "(", ")", "!=", "pixels", ".", "numCols", ")", "throw", "new", "IllegalArgumentException", "(", "\"Pi...
Sets pixel observations for a paricular view @param view the view @param pixelsInView list of 2D pixel observations
[ "Sets", "pixel", "observations", "for", "a", "paricular", "view" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/ProjectiveStructureByFactorization.java#L109-L120
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_tcp_route_routeId_rule_ruleId_GET
public OvhRouteRule serviceName_tcp_route_routeId_rule_ruleId_GET(String serviceName, Long routeId, Long ruleId) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}"; StringBuilder sb = path(qPath, serviceName, routeId, ruleId); String resp = exec(qPath, "GET", sb...
java
public OvhRouteRule serviceName_tcp_route_routeId_rule_ruleId_GET(String serviceName, Long routeId, Long ruleId) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}"; StringBuilder sb = path(qPath, serviceName, routeId, ruleId); String resp = exec(qPath, "GET", sb...
[ "public", "OvhRouteRule", "serviceName_tcp_route_routeId_rule_ruleId_GET", "(", "String", "serviceName", ",", "Long", "routeId", ",", "Long", "ruleId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId}...
Get this object properties REST: GET /ipLoadbalancing/{serviceName}/tcp/route/{routeId}/rule/{ruleId} @param serviceName [required] The internal name of your IP load balancing @param routeId [required] Id of your route @param ruleId [required] Id of your rule
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L1389-L1394
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/TileSheetsConfig.java
TileSheetsConfig.exportSheets
private static void exportSheets(Xml nodeSheets, Collection<String> sheets) { for (final String sheet : sheets) { final Xml nodeSheet = nodeSheets.createChild(NODE_TILE_SHEET); nodeSheet.setText(sheet); } }
java
private static void exportSheets(Xml nodeSheets, Collection<String> sheets) { for (final String sheet : sheets) { final Xml nodeSheet = nodeSheets.createChild(NODE_TILE_SHEET); nodeSheet.setText(sheet); } }
[ "private", "static", "void", "exportSheets", "(", "Xml", "nodeSheets", ",", "Collection", "<", "String", ">", "sheets", ")", "{", "for", "(", "final", "String", "sheet", ":", "sheets", ")", "{", "final", "Xml", "nodeSheet", "=", "nodeSheets", ".", "createC...
Export the defined sheets. @param nodeSheets Sheets node (must not be <code>null</code>). @param sheets Sheets defined (must not be <code>null</code>).
[ "Export", "the", "defined", "sheets", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/TileSheetsConfig.java#L123-L130
powermock/powermock
powermock-core/src/main/java/org/powermock/core/ClassReplicaCreator.java
ClassReplicaCreator.getReplicaMethodDelegationCode
private String getReplicaMethodDelegationCode(Class<?> clazz, CtMethod ctMethod, String classOrInstanceToDelegateTo) throws NotFoundException { StringBuilder builder = new StringBuilder(); builder.append("{java.lang.reflect.Method originalMethod = "); builder.append(clazz.getName());...
java
private String getReplicaMethodDelegationCode(Class<?> clazz, CtMethod ctMethod, String classOrInstanceToDelegateTo) throws NotFoundException { StringBuilder builder = new StringBuilder(); builder.append("{java.lang.reflect.Method originalMethod = "); builder.append(clazz.getName());...
[ "private", "String", "getReplicaMethodDelegationCode", "(", "Class", "<", "?", ">", "clazz", ",", "CtMethod", "ctMethod", ",", "String", "classOrInstanceToDelegateTo", ")", "throws", "NotFoundException", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(...
/* Invokes a instance method of the original instance. This enables partial mocking of system classes.
[ "/", "*", "Invokes", "a", "instance", "method", "of", "the", "original", "instance", ".", "This", "enables", "partial", "mocking", "of", "system", "classes", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-core/src/main/java/org/powermock/core/ClassReplicaCreator.java#L147-L179
google/closure-compiler
src/com/google/javascript/jscomp/graph/FixedPointGraphTraversal.java
FixedPointGraphTraversal.computeFixedPoint
public void computeFixedPoint(DiGraph<N, E> graph, Set<N> entrySet) { int cycleCount = 0; long nodeCount = graph.getNodeCount(); // Choose a bail-out heuristically in case the computation // doesn't converge. long maxIterations = Math.max(nodeCount * nodeCount * nodeCount, 100); // Use a Linke...
java
public void computeFixedPoint(DiGraph<N, E> graph, Set<N> entrySet) { int cycleCount = 0; long nodeCount = graph.getNodeCount(); // Choose a bail-out heuristically in case the computation // doesn't converge. long maxIterations = Math.max(nodeCount * nodeCount * nodeCount, 100); // Use a Linke...
[ "public", "void", "computeFixedPoint", "(", "DiGraph", "<", "N", ",", "E", ">", "graph", ",", "Set", "<", "N", ">", "entrySet", ")", "{", "int", "cycleCount", "=", "0", ";", "long", "nodeCount", "=", "graph", ".", "getNodeCount", "(", ")", ";", "// C...
Compute a fixed point for the given graph, entering from the given nodes. @param graph The graph to traverse. @param entrySet The nodes to begin traversing from.
[ "Compute", "a", "fixed", "point", "for", "the", "given", "graph", "entering", "from", "the", "given", "nodes", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/graph/FixedPointGraphTraversal.java#L91-L124
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/CollisionRangeConfig.java
CollisionRangeConfig.exports
public static void exports(Xml root, CollisionRange range) { Check.notNull(root); Check.notNull(range); final Xml node = root.createChild(NODE_RANGE); node.writeString(ATT_AXIS, range.getOutput().name()); node.writeInteger(ATT_MIN_X, range.getMinX()); node.wr...
java
public static void exports(Xml root, CollisionRange range) { Check.notNull(root); Check.notNull(range); final Xml node = root.createChild(NODE_RANGE); node.writeString(ATT_AXIS, range.getOutput().name()); node.writeInteger(ATT_MIN_X, range.getMinX()); node.wr...
[ "public", "static", "void", "exports", "(", "Xml", "root", ",", "CollisionRange", "range", ")", "{", "Check", ".", "notNull", "(", "root", ")", ";", "Check", ".", "notNull", "(", "range", ")", ";", "final", "Xml", "node", "=", "root", ".", "createChild...
Export the collision range as a node. @param root The node root (must not be <code>null</code>). @param range The collision range to export (must not be <code>null</code>). @throws LionEngineException If error on writing.
[ "Export", "the", "collision", "range", "as", "a", "node", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/CollisionRangeConfig.java#L86-L97
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java
CustomerAccountUrl.getCustomersPurchaseOrderAccountsUrl
public static MozuUrl getCustomersPurchaseOrderAccountsUrl(String accountType, Integer pageSize, String responseFields, String sortBy, Integer startIndex) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/purchaseOrderAccounts?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&a...
java
public static MozuUrl getCustomersPurchaseOrderAccountsUrl(String accountType, Integer pageSize, String responseFields, String sortBy, Integer startIndex) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/purchaseOrderAccounts?startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&a...
[ "public", "static", "MozuUrl", "getCustomersPurchaseOrderAccountsUrl", "(", "String", "accountType", ",", "Integer", "pageSize", ",", "String", "responseFields", ",", "String", "sortBy", ",", "Integer", "startIndex", ")", "{", "UrlFormatter", "formatter", "=", "new", ...
Get Resource Url for GetCustomersPurchaseOrderAccounts @param accountType @param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items,...
[ "Get", "Resource", "Url", "for", "GetCustomersPurchaseOrderAccounts" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java#L235-L244
igniterealtime/Smack
smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/RTPBridge.java
RTPBridge.relaySession
@SuppressWarnings("deprecation") public static RTPBridge relaySession(XMPPConnection connection, String sessionID, String pass, TransportCandidate proxyCandidate, TransportCandidate localCandidate) throws NotConnectedException, InterruptedException { if (!connection.isConnected()) { return null...
java
@SuppressWarnings("deprecation") public static RTPBridge relaySession(XMPPConnection connection, String sessionID, String pass, TransportCandidate proxyCandidate, TransportCandidate localCandidate) throws NotConnectedException, InterruptedException { if (!connection.isConnected()) { return null...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "static", "RTPBridge", "relaySession", "(", "XMPPConnection", "connection", ",", "String", "sessionID", ",", "String", "pass", ",", "TransportCandidate", "proxyCandidate", ",", "TransportCandidate", "localC...
Check if the server support RTPBridge Service. @param connection @return the RTPBridge @throws NotConnectedException @throws InterruptedException
[ "Check", "if", "the", "server", "support", "RTPBridge", "Service", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/RTPBridge.java#L467-L494
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/io/JBBPBitOutputStream.java
JBBPBitOutputStream.writeLong
public void writeLong(final long value, final JBBPByteOrder byteOrder) throws IOException { if (byteOrder == JBBPByteOrder.BIG_ENDIAN) { this.writeInt((int) (value >>> 32), byteOrder); this.writeInt((int) value, byteOrder); } else { this.writeInt((int) value, byteOrder); this.writeInt((i...
java
public void writeLong(final long value, final JBBPByteOrder byteOrder) throws IOException { if (byteOrder == JBBPByteOrder.BIG_ENDIAN) { this.writeInt((int) (value >>> 32), byteOrder); this.writeInt((int) value, byteOrder); } else { this.writeInt((int) value, byteOrder); this.writeInt((i...
[ "public", "void", "writeLong", "(", "final", "long", "value", ",", "final", "JBBPByteOrder", "byteOrder", ")", "throws", "IOException", "{", "if", "(", "byteOrder", "==", "JBBPByteOrder", ".", "BIG_ENDIAN", ")", "{", "this", ".", "writeInt", "(", "(", "int",...
Write a long value into the output stream. @param value a value to be written into the output stream. @param byteOrder the byte order of the value bytes to be used for writing. @throws IOException it will be thrown for transport errors @see JBBPByteOrder#BIG_ENDIAN @see JBBPByteOrder#LITTLE_ENDIAN
[ "Write", "a", "long", "value", "into", "the", "output", "stream", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/io/JBBPBitOutputStream.java#L151-L159
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
SqlQueryStatement.appendHavingClause
protected void appendHavingClause(StringBuffer having, Criteria crit, StringBuffer stmt) { if (having.length() == 0) { having = null; } if (having != null || crit != null) { stmt.append(" HAVING "); appendClause(having, crit, stm...
java
protected void appendHavingClause(StringBuffer having, Criteria crit, StringBuffer stmt) { if (having.length() == 0) { having = null; } if (having != null || crit != null) { stmt.append(" HAVING "); appendClause(having, crit, stm...
[ "protected", "void", "appendHavingClause", "(", "StringBuffer", "having", ",", "Criteria", "crit", ",", "StringBuffer", "stmt", ")", "{", "if", "(", "having", ".", "length", "(", ")", "==", "0", ")", "{", "having", "=", "null", ";", "}", "if", "(", "ha...
appends a HAVING-clause to the Statement @param having @param crit @param stmt
[ "appends", "a", "HAVING", "-", "clause", "to", "the", "Statement" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java#L561-L573
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/stream/streamidentifier_binding.java
streamidentifier_binding.get
public static streamidentifier_binding get(nitro_service service, String name) throws Exception{ streamidentifier_binding obj = new streamidentifier_binding(); obj.set_name(name); streamidentifier_binding response = (streamidentifier_binding) obj.get_resource(service); return response; }
java
public static streamidentifier_binding get(nitro_service service, String name) throws Exception{ streamidentifier_binding obj = new streamidentifier_binding(); obj.set_name(name); streamidentifier_binding response = (streamidentifier_binding) obj.get_resource(service); return response; }
[ "public", "static", "streamidentifier_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "streamidentifier_binding", "obj", "=", "new", "streamidentifier_binding", "(", ")", ";", "obj", ".", "set_name", "(", "...
Use this API to fetch streamidentifier_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "streamidentifier_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/stream/streamidentifier_binding.java#L103-L108
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/model/globalfac/ProjDepTreeFactor.java
ProjDepTreeFactor.getMsgs
private Tensor getMsgs(VarTensor[] inMsgs, int tf) { Algebra s = inMsgs[0].getAlgebra(); EdgeScores es = new EdgeScores(n, s.zero()); for (VarTensor inMsg : inMsgs) { LinkVar link = (LinkVar) inMsg.getVars().get(0); double val = inMsg.getValue(tf); ...
java
private Tensor getMsgs(VarTensor[] inMsgs, int tf) { Algebra s = inMsgs[0].getAlgebra(); EdgeScores es = new EdgeScores(n, s.zero()); for (VarTensor inMsg : inMsgs) { LinkVar link = (LinkVar) inMsg.getVars().get(0); double val = inMsg.getValue(tf); ...
[ "private", "Tensor", "getMsgs", "(", "VarTensor", "[", "]", "inMsgs", ",", "int", "tf", ")", "{", "Algebra", "s", "=", "inMsgs", "[", "0", "]", ".", "getAlgebra", "(", ")", ";", "EdgeScores", "es", "=", "new", "EdgeScores", "(", "n", ",", "s", ".",...
Gets messages from the Messages[]. @param inMsgs The input messages. @param tf Whether to get TRUE or FALSE messages. @return The messages as a Tensor.
[ "Gets", "messages", "from", "the", "Messages", "[]", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/model/globalfac/ProjDepTreeFactor.java#L283-L292
bbottema/simple-java-mail
modules/simple-java-mail/src/main/java/org/simplejavamail/mailer/internal/mailsender/MailSenderImpl.java
MailSenderImpl.configureSessionWithTimeout
private void configureSessionWithTimeout(final Session session, final int sessionTimeout) { if (transportStrategy != null) { // socket timeouts handling final Properties sessionProperties = session.getProperties(); sessionProperties.put(transportStrategy.propertyNameConnectionTimeout(), String.valueOf(sessio...
java
private void configureSessionWithTimeout(final Session session, final int sessionTimeout) { if (transportStrategy != null) { // socket timeouts handling final Properties sessionProperties = session.getProperties(); sessionProperties.put(transportStrategy.propertyNameConnectionTimeout(), String.valueOf(sessio...
[ "private", "void", "configureSessionWithTimeout", "(", "final", "Session", "session", ",", "final", "int", "sessionTimeout", ")", "{", "if", "(", "transportStrategy", "!=", "null", ")", "{", "// socket timeouts handling", "final", "Properties", "sessionProperties", "=...
Configures the {@link Session} with the same timeout for socket connection timeout, read and write timeout.
[ "Configures", "the", "{" ]
train
https://github.com/bbottema/simple-java-mail/blob/b03635328aeecd525e35eddfef8f5b9a184559d8/modules/simple-java-mail/src/main/java/org/simplejavamail/mailer/internal/mailsender/MailSenderImpl.java#L198-L208
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/ssh/JschUtil.java
JschUtil.openChannel
public static Channel openChannel(Session session, ChannelType channelType) { final Channel channel = createChannel(session, channelType); try { channel.connect(); } catch (JSchException e) { throw new JschRuntimeException(e); } return channel; }
java
public static Channel openChannel(Session session, ChannelType channelType) { final Channel channel = createChannel(session, channelType); try { channel.connect(); } catch (JSchException e) { throw new JschRuntimeException(e); } return channel; }
[ "public", "static", "Channel", "openChannel", "(", "Session", "session", ",", "ChannelType", "channelType", ")", "{", "final", "Channel", "channel", "=", "createChannel", "(", "session", ",", "channelType", ")", ";", "try", "{", "channel", ".", "connect", "(",...
打开Channel连接 @param session Session会话 @param channelType 通道类型,可以是shell或sftp等,见{@link ChannelType} @return {@link Channel} @since 4.5.2
[ "打开Channel连接" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/ssh/JschUtil.java#L218-L226
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.metrics/src/com/ibm/ws/microprofile/metrics/impl/MetricRegistryImpl.java
MetricRegistryImpl.getGauges
@Override public SortedMap<String, Gauge> getGauges(MetricFilter filter) { return getMetrics(Gauge.class, filter); }
java
@Override public SortedMap<String, Gauge> getGauges(MetricFilter filter) { return getMetrics(Gauge.class, filter); }
[ "@", "Override", "public", "SortedMap", "<", "String", ",", "Gauge", ">", "getGauges", "(", "MetricFilter", "filter", ")", "{", "return", "getMetrics", "(", "Gauge", ".", "class", ",", "filter", ")", ";", "}" ]
Returns a map of all the gauges in the registry and their names which match the given filter. @param filter the metric filter to match @return all the gauges in the registry
[ "Returns", "a", "map", "of", "all", "the", "gauges", "in", "the", "registry", "and", "their", "names", "which", "match", "the", "given", "filter", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.metrics/src/com/ibm/ws/microprofile/metrics/impl/MetricRegistryImpl.java#L340-L343
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/util/SegmentIntersection.java
SegmentIntersection.parallelSideEffect
private static boolean parallelSideEffect( final double pXA, final double pYA, final double pXB, final double pYB, final double pXC, final double pYC, final double pXD, final double pYD, final PointL pIntersection ) { if (pXA == pXB) { return parallelSideEffec...
java
private static boolean parallelSideEffect( final double pXA, final double pYA, final double pXB, final double pYB, final double pXC, final double pYC, final double pXD, final double pYD, final PointL pIntersection ) { if (pXA == pXB) { return parallelSideEffec...
[ "private", "static", "boolean", "parallelSideEffect", "(", "final", "double", "pXA", ",", "final", "double", "pYA", ",", "final", "double", "pXB", ",", "final", "double", "pYB", ",", "final", "double", "pXC", ",", "final", "double", "pYC", ",", "final", "d...
When the segments are parallels and overlap, the middle of the overlap is considered as the intersection
[ "When", "the", "segments", "are", "parallels", "and", "overlap", "the", "middle", "of", "the", "overlap", "is", "considered", "as", "the", "intersection" ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/util/SegmentIntersection.java#L47-L72
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/util/ParsedScheduleExpression.java
ParsedScheduleExpression.getNextTimeout
public long getNextTimeout(long lastTimeout) { // Perform basic validation of lastTimeout, which should be a value that // was previously returned from getFirstTimeout. if (lastTimeout < start) { throw new IllegalArgumentException("last timeout " + lastTimeout + " is bef...
java
public long getNextTimeout(long lastTimeout) { // Perform basic validation of lastTimeout, which should be a value that // was previously returned from getFirstTimeout. if (lastTimeout < start) { throw new IllegalArgumentException("last timeout " + lastTimeout + " is bef...
[ "public", "long", "getNextTimeout", "(", "long", "lastTimeout", ")", "{", "// Perform basic validation of lastTimeout, which should be a value that", "// was previously returned from getFirstTimeout.", "if", "(", "lastTimeout", "<", "start", ")", "{", "throw", "new", "IllegalAr...
Determines the next timeout for the schedule expression. @param lastTimeout the last timeout in milliseconds @return the next timeout in milliseconds, or -1 if there are no more future timeouts for the expression @throws IllegalArgumentException if lastTimeout is before the start time of the expression
[ "Determines", "the", "next", "timeout", "for", "the", "schedule", "expression", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ws/ejbcontainer/util/ParsedScheduleExpression.java#L466-L487
BlueBrain/bluima
modules/bluima_lexica/src/main/java/ch/epfl/bbp/uima/obo/OBOOntology.java
OBOOntology.directIsA
public boolean directIsA(String hypoID, String hyperID) { if (!terms.containsKey(hypoID)) return false; OntologyTerm term = terms.get(hypoID); if (term.getIsA().contains(hyperID)) return true; return false; }
java
public boolean directIsA(String hypoID, String hyperID) { if (!terms.containsKey(hypoID)) return false; OntologyTerm term = terms.get(hypoID); if (term.getIsA().contains(hyperID)) return true; return false; }
[ "public", "boolean", "directIsA", "(", "String", "hypoID", ",", "String", "hyperID", ")", "{", "if", "(", "!", "terms", ".", "containsKey", "(", "hypoID", ")", ")", "return", "false", ";", "OntologyTerm", "term", "=", "terms", ".", "get", "(", "hypoID", ...
Tests whether there is a direct is_a (or has_role) relationship between two IDs. @param hypoID The potential hyponym (child term). @param hyperID The potential hypernym (parent term). @return Whether that direct relationship exists.
[ "Tests", "whether", "there", "is", "a", "direct", "is_a", "(", "or", "has_role", ")", "relationship", "between", "two", "IDs", "." ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_lexica/src/main/java/ch/epfl/bbp/uima/obo/OBOOntology.java#L322-L329
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/labeled/textfield/LabeledDateTimeFieldPanel.java
LabeledDateTimeFieldPanel.newDateTimeField
protected DateTimeField newDateTimeField(final String id, final IModel<M> model) { final IModel<Date> textFieldModel = new PropertyModel<>(model.getObject(), getId()); return ComponentFactory.newDateTimeField(id, textFieldModel); }
java
protected DateTimeField newDateTimeField(final String id, final IModel<M> model) { final IModel<Date> textFieldModel = new PropertyModel<>(model.getObject(), getId()); return ComponentFactory.newDateTimeField(id, textFieldModel); }
[ "protected", "DateTimeField", "newDateTimeField", "(", "final", "String", "id", ",", "final", "IModel", "<", "M", ">", "model", ")", "{", "final", "IModel", "<", "Date", ">", "textFieldModel", "=", "new", "PropertyModel", "<>", "(", "model", ".", "getObject"...
Factory method for create the new {@link DateTimeField}. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new {@link DateTimeField}. @param id the id @param model the model @return the new {@link DateTimeField}
[ "Factory", "method", "for", "create", "the", "new", "{", "@link", "DateTimeField", "}", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "can", "be", "overridden", "so", "users", "can", "provide"...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/labeled/textfield/LabeledDateTimeFieldPanel.java#L93-L97
apereo/cas
support/cas-server-support-aws/src/main/java/org/apereo/cas/aws/AmazonEnvironmentAwareClientBuilder.java
AmazonEnvironmentAwareClientBuilder.getSetting
public String getSetting(final String key, final String defaultValue) { val result = environment.getProperty(this.propertyPrefix + '.' + key); return StringUtils.defaultIfBlank(result, defaultValue); }
java
public String getSetting(final String key, final String defaultValue) { val result = environment.getProperty(this.propertyPrefix + '.' + key); return StringUtils.defaultIfBlank(result, defaultValue); }
[ "public", "String", "getSetting", "(", "final", "String", "key", ",", "final", "String", "defaultValue", ")", "{", "val", "result", "=", "environment", ".", "getProperty", "(", "this", ".", "propertyPrefix", "+", "'", "'", "+", "key", ")", ";", "return", ...
Gets setting. @param key the key @param defaultValue the default value @return the setting
[ "Gets", "setting", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-aws/src/main/java/org/apereo/cas/aws/AmazonEnvironmentAwareClientBuilder.java#L43-L46
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/BeanPath.java
BeanPath.createArray
protected <A, E> ArrayPath<A, E> createArray(String property, Class<? super A> type) { return add(new ArrayPath<A, E>(type, forProperty(property))); }
java
protected <A, E> ArrayPath<A, E> createArray(String property, Class<? super A> type) { return add(new ArrayPath<A, E>(type, forProperty(property))); }
[ "protected", "<", "A", ",", "E", ">", "ArrayPath", "<", "A", ",", "E", ">", "createArray", "(", "String", "property", ",", "Class", "<", "?", "super", "A", ">", "type", ")", "{", "return", "add", "(", "new", "ArrayPath", "<", "A", ",", "E", ">", ...
Create a new array path @param <A> @param property property name @param type property type @return property path
[ "Create", "a", "new", "array", "path" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/BeanPath.java#L127-L129
facebookarchive/hadoop-20
src/contrib/raid/src/java/org/apache/hadoop/raid/HarIndex.java
HarIndex.getHarIndex
public static HarIndex getHarIndex(FileSystem fs, Path initializer) throws IOException { if (!initializer.getName().endsWith(HAR)) { initializer = initializer.getParent(); } InputStream in = null; try { Path indexFile = new Path(initializer, INDEX); FileStatus indexStat = fs.getF...
java
public static HarIndex getHarIndex(FileSystem fs, Path initializer) throws IOException { if (!initializer.getName().endsWith(HAR)) { initializer = initializer.getParent(); } InputStream in = null; try { Path indexFile = new Path(initializer, INDEX); FileStatus indexStat = fs.getF...
[ "public", "static", "HarIndex", "getHarIndex", "(", "FileSystem", "fs", ",", "Path", "initializer", ")", "throws", "IOException", "{", "if", "(", "!", "initializer", ".", "getName", "(", ")", ".", "endsWith", "(", "HAR", ")", ")", "{", "initializer", "=", ...
Creates a HarIndex object with the path to either the HAR or a part file in the HAR.
[ "Creates", "a", "HarIndex", "object", "with", "the", "path", "to", "either", "the", "HAR", "or", "a", "part", "file", "in", "the", "HAR", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/HarIndex.java#L77-L95
apache/incubator-gobblin
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigsResource.java
FlowConfigsResource.get
@Override public FlowConfig get(ComplexResourceKey<FlowId, EmptyRecord> key) { String flowGroup = key.getKey().getFlowGroup(); String flowName = key.getKey().getFlowName(); FlowId flowId = new FlowId().setFlowGroup(flowGroup).setFlowName(flowName); return this.flowConfigsResourceHandler.getFlowConfig(...
java
@Override public FlowConfig get(ComplexResourceKey<FlowId, EmptyRecord> key) { String flowGroup = key.getKey().getFlowGroup(); String flowName = key.getKey().getFlowName(); FlowId flowId = new FlowId().setFlowGroup(flowGroup).setFlowName(flowName); return this.flowConfigsResourceHandler.getFlowConfig(...
[ "@", "Override", "public", "FlowConfig", "get", "(", "ComplexResourceKey", "<", "FlowId", ",", "EmptyRecord", ">", "key", ")", "{", "String", "flowGroup", "=", "key", ".", "getKey", "(", ")", ".", "getFlowGroup", "(", ")", ";", "String", "flowName", "=", ...
Retrieve the flow configuration with the given key @param key flow config id key containing group name and flow name @return {@link FlowConfig} with flow configuration
[ "Retrieve", "the", "flow", "configuration", "with", "the", "given", "key" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowConfigsResource.java#L76-L82
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDataTable.java
WDataTable.updateBeanValue
@Override public void updateBeanValue() { TableDataModel model = getDataModel(); if (model instanceof ScrollableTableDataModel) { LOG.warn("UpdateBeanValue only updating the current page for ScrollableTableDataModel"); updateBeanValueCurrentPageOnly(); } else if (model.getRowCount() > 0) { // Temporari...
java
@Override public void updateBeanValue() { TableDataModel model = getDataModel(); if (model instanceof ScrollableTableDataModel) { LOG.warn("UpdateBeanValue only updating the current page for ScrollableTableDataModel"); updateBeanValueCurrentPageOnly(); } else if (model.getRowCount() > 0) { // Temporari...
[ "@", "Override", "public", "void", "updateBeanValue", "(", ")", "{", "TableDataModel", "model", "=", "getDataModel", "(", ")", ";", "if", "(", "model", "instanceof", "ScrollableTableDataModel", ")", "{", "LOG", ".", "warn", "(", "\"UpdateBeanValue only updating th...
Updates the bean using the table data model's {@link TableDataModel#setValueAt(Object, int, int)} method.
[ "Updates", "the", "bean", "using", "the", "table", "data", "model", "s", "{" ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDataTable.java#L342-L356
RestComm/jss7
cap/cap-impl/src/main/java/org/restcomm/protocols/ss7/cap/CAPServiceBaseImpl.java
CAPServiceBaseImpl.createNewTCAPDialog
protected Dialog createNewTCAPDialog(SccpAddress origAddress, SccpAddress destAddress, Long localTrId) throws CAPException { try { return this.capProviderImpl.getTCAPProvider().getNewDialog(origAddress, destAddress, localTrId); } catch (TCAPException e) { throw new CAPException(e...
java
protected Dialog createNewTCAPDialog(SccpAddress origAddress, SccpAddress destAddress, Long localTrId) throws CAPException { try { return this.capProviderImpl.getTCAPProvider().getNewDialog(origAddress, destAddress, localTrId); } catch (TCAPException e) { throw new CAPException(e...
[ "protected", "Dialog", "createNewTCAPDialog", "(", "SccpAddress", "origAddress", ",", "SccpAddress", "destAddress", ",", "Long", "localTrId", ")", "throws", "CAPException", "{", "try", "{", "return", "this", ".", "capProviderImpl", ".", "getTCAPProvider", "(", ")", ...
Creating new outgoing TCAP Dialog. Used when creating a new outgoing CAP Dialog @param origAddress @param destAddress @return @throws CAPException
[ "Creating", "new", "outgoing", "TCAP", "Dialog", ".", "Used", "when", "creating", "a", "new", "outgoing", "CAP", "Dialog" ]
train
https://github.com/RestComm/jss7/blob/402b4b3984e581c581e309cb5f6a858fde6dbc33/cap/cap-impl/src/main/java/org/restcomm/protocols/ss7/cap/CAPServiceBaseImpl.java#L82-L88
facebookarchive/hadoop-20
src/core/org/apache/hadoop/security/UnixUserGroupInformation.java
UnixUserGroupInformation.setUserGroupNames
private void setUserGroupNames(String userName, String[] groupNames) { if (userName==null || userName.length()==0 || groupNames== null || groupNames.length==0) { throw new IllegalArgumentException( "Parameters should not be null or an empty string/array"); } for (int i=0; i<groupName...
java
private void setUserGroupNames(String userName, String[] groupNames) { if (userName==null || userName.length()==0 || groupNames== null || groupNames.length==0) { throw new IllegalArgumentException( "Parameters should not be null or an empty string/array"); } for (int i=0; i<groupName...
[ "private", "void", "setUserGroupNames", "(", "String", "userName", ",", "String", "[", "]", "groupNames", ")", "{", "if", "(", "userName", "==", "null", "||", "userName", ".", "length", "(", ")", "==", "0", "||", "groupNames", "==", "null", "||", "groupN...
/* Set this object's user name and group names @param userName a user's name @param groupNames groups list, the first of which is the default group @exception IllegalArgumentException if any argument is null
[ "/", "*", "Set", "this", "object", "s", "user", "name", "and", "group", "names" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/security/UnixUserGroupInformation.java#L109-L122
dbmdz/iiif-presentation-api
iiif-presentation-frontend-impl-springmvc/src/main/java/de/digitalcollections/iiif/presentation/frontend/impl/springmvc/controller/v2/IIIFPresentationApiController.java
IIIFPresentationApiController.getManifest
@CrossOrigin(allowedHeaders = {"*"}, origins = {"*"}) @RequestMapping(value = {"{identifier}/manifest", "{identifier}"}, method = RequestMethod.GET, produces = "application/json") @ResponseBody public Manifest getManifest(@PathVariable String identifier, HttpServletRequest request) throws NotFoundExcept...
java
@CrossOrigin(allowedHeaders = {"*"}, origins = {"*"}) @RequestMapping(value = {"{identifier}/manifest", "{identifier}"}, method = RequestMethod.GET, produces = "application/json") @ResponseBody public Manifest getManifest(@PathVariable String identifier, HttpServletRequest request) throws NotFoundExcept...
[ "@", "CrossOrigin", "(", "allowedHeaders", "=", "{", "\"*\"", "}", ",", "origins", "=", "{", "\"*\"", "}", ")", "@", "RequestMapping", "(", "value", "=", "{", "\"{identifier}/manifest\"", ",", "\"{identifier}\"", "}", ",", "method", "=", "RequestMethod", "."...
The manifest response contains sufficient information for the client to initialize itself and begin to display something quickly to the user. The manifest resource represents a single object and any intellectual work or works embodied within that object. In particular it includes the descriptive, rights and linking inf...
[ "The", "manifest", "response", "contains", "sufficient", "information", "for", "the", "client", "to", "initialize", "itself", "and", "begin", "to", "display", "something", "quickly", "to", "the", "user", ".", "The", "manifest", "resource", "represents", "a", "si...
train
https://github.com/dbmdz/iiif-presentation-api/blob/8b551d3717eed2620bc9e50b4c23f945b73b9cea/iiif-presentation-frontend-impl-springmvc/src/main/java/de/digitalcollections/iiif/presentation/frontend/impl/springmvc/controller/v2/IIIFPresentationApiController.java#L55-L75
apollographql/apollo-android
apollo-runtime/src/main/java/com/apollographql/apollo/internal/ApolloCallTracker.java
ApolloCallTracker.activeMutationCalls
@NotNull Set<ApolloMutationCall> activeMutationCalls(@NotNull OperationName operationName) { return activeCalls(activeMutationCalls, operationName); }
java
@NotNull Set<ApolloMutationCall> activeMutationCalls(@NotNull OperationName operationName) { return activeCalls(activeMutationCalls, operationName); }
[ "@", "NotNull", "Set", "<", "ApolloMutationCall", ">", "activeMutationCalls", "(", "@", "NotNull", "OperationName", "operationName", ")", "{", "return", "activeCalls", "(", "activeMutationCalls", ",", "operationName", ")", ";", "}" ]
Returns currently active {@link ApolloMutationCall} calls by operation name. @param operationName query operation name @return set of active mutation calls
[ "Returns", "currently", "active", "{", "@link", "ApolloMutationCall", "}", "calls", "by", "operation", "name", "." ]
train
https://github.com/apollographql/apollo-android/blob/a78869a76e17f77e42c7a88f0099914fe7ffa5b6/apollo-runtime/src/main/java/com/apollographql/apollo/internal/ApolloCallTracker.java#L187-L189
michael-rapp/AndroidBottomSheet
library/src/main/java/de/mrapp/android/bottomsheet/view/DraggableView.java
DraggableView.createAnimationListener
private AnimationListener createAnimationListener(final boolean show, final boolean cancel) { return new AnimationListener() { @Override public void onAnimationStart(final Animation animation) { } @Override public void onAnimationEnd(final Animation...
java
private AnimationListener createAnimationListener(final boolean show, final boolean cancel) { return new AnimationListener() { @Override public void onAnimationStart(final Animation animation) { } @Override public void onAnimationEnd(final Animation...
[ "private", "AnimationListener", "createAnimationListener", "(", "final", "boolean", "show", ",", "final", "boolean", "cancel", ")", "{", "return", "new", "AnimationListener", "(", ")", "{", "@", "Override", "public", "void", "onAnimationStart", "(", "final", "Anim...
Creates and returns a listener, which allows to handle the end of an animation, which has been used to show or hide the view. @param show True, if the view should be shown at the end of the animation, false otherwise @param cancel True, if the view should be canceled, false otherwise @return The listener, which has be...
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "handle", "the", "end", "of", "an", "animation", "which", "has", "been", "used", "to", "show", "or", "hide", "the", "view", "." ]
train
https://github.com/michael-rapp/AndroidBottomSheet/blob/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/library/src/main/java/de/mrapp/android/bottomsheet/view/DraggableView.java#L331-L357
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasConstraintUtils.java
KerasConstraintUtils.mapConstraint
public static LayerConstraint mapConstraint(String kerasConstraint, KerasLayerConfiguration conf, Map<String, Object> constraintConfig) throws UnsupportedKerasConfigurationException { LayerConstraint constraint; if (kerasConstraint.equals(conf....
java
public static LayerConstraint mapConstraint(String kerasConstraint, KerasLayerConfiguration conf, Map<String, Object> constraintConfig) throws UnsupportedKerasConfigurationException { LayerConstraint constraint; if (kerasConstraint.equals(conf....
[ "public", "static", "LayerConstraint", "mapConstraint", "(", "String", "kerasConstraint", ",", "KerasLayerConfiguration", "conf", ",", "Map", "<", "String", ",", "Object", ">", "constraintConfig", ")", "throws", "UnsupportedKerasConfigurationException", "{", "LayerConstra...
Map Keras to DL4J constraint. @param kerasConstraint String containing Keras constraint name @param conf Keras layer configuration @return DL4J LayerConstraint @see LayerConstraint
[ "Map", "Keras", "to", "DL4J", "constraint", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasConstraintUtils.java#L48-L79
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/GeoPackageOverlayFactory.java
GeoPackageOverlayFactory.getLinkedFeatureOverlay
public static BoundedOverlay getLinkedFeatureOverlay(FeatureOverlay featureOverlay, GeoPackage geoPackage) { BoundedOverlay overlay; // Get the linked tile daos FeatureTileTableLinker linker = new FeatureTileTableLinker(geoPackage); List<TileDao> tileDaos = linker.getTileDaosForFeature...
java
public static BoundedOverlay getLinkedFeatureOverlay(FeatureOverlay featureOverlay, GeoPackage geoPackage) { BoundedOverlay overlay; // Get the linked tile daos FeatureTileTableLinker linker = new FeatureTileTableLinker(geoPackage); List<TileDao> tileDaos = linker.getTileDaosForFeature...
[ "public", "static", "BoundedOverlay", "getLinkedFeatureOverlay", "(", "FeatureOverlay", "featureOverlay", ",", "GeoPackage", "geoPackage", ")", "{", "BoundedOverlay", "overlay", ";", "// Get the linked tile daos", "FeatureTileTableLinker", "linker", "=", "new", "FeatureTileTa...
Create a composite overlay linking the feature overly with @param featureOverlay feature overlay @param geoPackage GeoPackage @return linked bounded overlay
[ "Create", "a", "composite", "overlay", "linking", "the", "feature", "overly", "with" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/GeoPackageOverlayFactory.java#L165-L181
alkacon/opencms-core
src/org/opencms/db/generic/CmsSqlManager.java
CmsSqlManager.getPreparedStatement
public PreparedStatement getPreparedStatement(Connection con, CmsUUID projectId, String queryKey) throws SQLException { String rawSql = readQuery(projectId, queryKey); return getPreparedStatementForSql(con, rawSql); }
java
public PreparedStatement getPreparedStatement(Connection con, CmsUUID projectId, String queryKey) throws SQLException { String rawSql = readQuery(projectId, queryKey); return getPreparedStatementForSql(con, rawSql); }
[ "public", "PreparedStatement", "getPreparedStatement", "(", "Connection", "con", ",", "CmsUUID", "projectId", ",", "String", "queryKey", ")", "throws", "SQLException", "{", "String", "rawSql", "=", "readQuery", "(", "projectId", ",", "queryKey", ")", ";", "return"...
Returns a PreparedStatement for a JDBC connection specified by the key of a SQL query and the project-ID.<p> @param con the JDBC connection @param projectId the ID of the specified CmsProject @param queryKey the key of the SQL query @return PreparedStatement a new PreparedStatement containing the pre-compiled SQL sta...
[ "Returns", "a", "PreparedStatement", "for", "a", "JDBC", "connection", "specified", "by", "the", "key", "of", "a", "SQL", "query", "and", "the", "project", "-", "ID", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsSqlManager.java#L257-L262
GCRC/nunaliit
nunaliit2-couch-command/src/main/java/ca/carleton/gcrc/couch/command/impl/PathComputer.java
PathComputer.computeBinDir
static public File computeBinDir(File installDir) { if( null != installDir ) { // Command-line package File binDir = new File(installDir, "bin"); if( binDir.exists() && binDir.isDirectory() ) { return binDir; } // Development environment File nunaliit2Dir = computeNunaliitDir(installDir); ...
java
static public File computeBinDir(File installDir) { if( null != installDir ) { // Command-line package File binDir = new File(installDir, "bin"); if( binDir.exists() && binDir.isDirectory() ) { return binDir; } // Development environment File nunaliit2Dir = computeNunaliitDir(installDir); ...
[ "static", "public", "File", "computeBinDir", "(", "File", "installDir", ")", "{", "if", "(", "null", "!=", "installDir", ")", "{", "// Command-line package", "File", "binDir", "=", "new", "File", "(", "installDir", ",", "\"bin\"", ")", ";", "if", "(", "bin...
Finds the "bin" directory from the installation location and returns it. If the command-line tool is packaged and deployed, then the "bin" directory is found at the root of the installation. If the command-line tool is run from the development environment, then the "bin" directory is found in the SDK sub-project. @para...
[ "Finds", "the", "bin", "directory", "from", "the", "installation", "location", "and", "returns", "it", ".", "If", "the", "command", "-", "line", "tool", "is", "packaged", "and", "deployed", "then", "the", "bin", "directory", "is", "found", "at", "the", "ro...
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-couch-command/src/main/java/ca/carleton/gcrc/couch/command/impl/PathComputer.java#L174-L191
ralscha/wampspring
src/main/java/ch/rasc/wampspring/EventMessenger.java
EventMessenger.sendToDirect
public void sendToDirect(String topicURI, Object event, String webSocketSessionId) { Assert.notNull(webSocketSessionId, "WebSocket session id must not be null"); sendToDirect(topicURI, event, Collections.singleton(webSocketSessionId)); }
java
public void sendToDirect(String topicURI, Object event, String webSocketSessionId) { Assert.notNull(webSocketSessionId, "WebSocket session id must not be null"); sendToDirect(topicURI, event, Collections.singleton(webSocketSessionId)); }
[ "public", "void", "sendToDirect", "(", "String", "topicURI", ",", "Object", "event", ",", "String", "webSocketSessionId", ")", "{", "Assert", ".", "notNull", "(", "webSocketSessionId", ",", "\"WebSocket session id must not be null\"", ")", ";", "sendToDirect", "(", ...
Send an EventMessage directly to the client specified with the webSocketSessionId parameter. <p> In contrast to {@link #sendTo(String, Object, String)} this method does not check if the receiver is subscribed to the destination. The {@link SimpleBrokerMessageHandler} is not involved in sending this message. @param top...
[ "Send", "an", "EventMessage", "directly", "to", "the", "client", "specified", "with", "the", "webSocketSessionId", "parameter", ".", "<p", ">", "In", "contrast", "to", "{", "@link", "#sendTo", "(", "String", "Object", "String", ")", "}", "this", "method", "d...
train
https://github.com/ralscha/wampspring/blob/7571bb6773b848c580b29890587eb35397bfe5b5/src/main/java/ch/rasc/wampspring/EventMessenger.java#L172-L176
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ListFormatter.java
ListFormatter.getInstance
@Deprecated public static ListFormatter getInstance(ULocale locale, Style style) { return cache.get(locale, style.getName()); }
java
@Deprecated public static ListFormatter getInstance(ULocale locale, Style style) { return cache.get(locale, style.getName()); }
[ "@", "Deprecated", "public", "static", "ListFormatter", "getInstance", "(", "ULocale", "locale", ",", "Style", "style", ")", "{", "return", "cache", ".", "get", "(", "locale", ",", "style", ".", "getName", "(", ")", ")", ";", "}" ]
Create a list formatter that is appropriate for a locale and style. @param locale the locale in question. @param style the style @return ListFormatter @deprecated This API is ICU internal only. @hide draft / provisional / internal are hidden on Android
[ "Create", "a", "list", "formatter", "that", "is", "appropriate", "for", "a", "locale", "and", "style", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ListFormatter.java#L164-L167
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/AssetsInner.java
AssetsInner.listStreamingLocatorsAsync
public Observable<ListStreamingLocatorsResponseInner> listStreamingLocatorsAsync(String resourceGroupName, String accountName, String assetName) { return listStreamingLocatorsWithServiceResponseAsync(resourceGroupName, accountName, assetName).map(new Func1<ServiceResponse<ListStreamingLocatorsResponseInner>, Li...
java
public Observable<ListStreamingLocatorsResponseInner> listStreamingLocatorsAsync(String resourceGroupName, String accountName, String assetName) { return listStreamingLocatorsWithServiceResponseAsync(resourceGroupName, accountName, assetName).map(new Func1<ServiceResponse<ListStreamingLocatorsResponseInner>, Li...
[ "public", "Observable", "<", "ListStreamingLocatorsResponseInner", ">", "listStreamingLocatorsAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "assetName", ")", "{", "return", "listStreamingLocatorsWithServiceResponseAsync", "(", "resou...
List Streaming Locators. Lists Streaming Locators which are associated with this asset. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param assetName The Asset name. @throws IllegalArgumentException thrown if parameters fail ...
[ "List", "Streaming", "Locators", ".", "Lists", "Streaming", "Locators", "which", "are", "associated", "with", "this", "asset", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/AssetsInner.java#L1021-L1028
mgormley/prim
src/main/java_generated/edu/jhu/prim/vector/IntFloatDenseVector.java
IntFloatDenseVector.add
public void add(IntFloatVector other) { if (other instanceof IntFloatUnsortedVector) { IntFloatUnsortedVector vec = (IntFloatUnsortedVector) other; for (int i=0; i<vec.top; i++) { this.add(vec.idx[i], vec.vals[i]); } } else { // TODO: Add ...
java
public void add(IntFloatVector other) { if (other instanceof IntFloatUnsortedVector) { IntFloatUnsortedVector vec = (IntFloatUnsortedVector) other; for (int i=0; i<vec.top; i++) { this.add(vec.idx[i], vec.vals[i]); } } else { // TODO: Add ...
[ "public", "void", "add", "(", "IntFloatVector", "other", ")", "{", "if", "(", "other", "instanceof", "IntFloatUnsortedVector", ")", "{", "IntFloatUnsortedVector", "vec", "=", "(", "IntFloatUnsortedVector", ")", "other", ";", "for", "(", "int", "i", "=", "0", ...
Updates this vector to be the entrywise sum of this vector with the other.
[ "Updates", "this", "vector", "to", "be", "the", "entrywise", "sum", "of", "this", "vector", "with", "the", "other", "." ]
train
https://github.com/mgormley/prim/blob/5dce5e1ae94a9ae558a6262fc246e1a24f56686c/src/main/java_generated/edu/jhu/prim/vector/IntFloatDenseVector.java#L143-L153
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getCharacterBackStory
public void getCharacterBackStory(String API, String name, Callback<CharacterBackStory> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name)); gw2API.getCharacterBackStory(name, API).enqueue(callback); }
java
public void getCharacterBackStory(String API, String name, Callback<CharacterBackStory> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, API), new ParamChecker(ParamType.CHAR, name)); gw2API.getCharacterBackStory(name, API).enqueue(callback); }
[ "public", "void", "getCharacterBackStory", "(", "String", "API", ",", "String", "name", ",", "Callback", "<", "CharacterBackStory", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "...
For more info on character back story API go <a href="https://wiki.guildwars2.com/wiki/API:2/characters#Backstory">here</a><br/> @param API API key @param name name of character @param callback callback that is going to be used for {@link Call#enqueue(Callback)} @throws GuildWars2Exception invalid API key | ...
[ "For", "more", "info", "on", "character", "back", "story", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "characters#Backstory", ">", "here<", "/", "a", ">", "<br", ...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L705-L708
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/ThriftClient.java
ThriftClient.indexNode
@Override protected void indexNode(Node node, EntityMetadata entityMetadata) { super.indexNode(node, entityMetadata); // Write to inverted index table if applicable invertedIndexHandler.write(node, entityMetadata, getPersistenceUnit(), getConsistencyLevel(), dataHandler); }
java
@Override protected void indexNode(Node node, EntityMetadata entityMetadata) { super.indexNode(node, entityMetadata); // Write to inverted index table if applicable invertedIndexHandler.write(node, entityMetadata, getPersistenceUnit(), getConsistencyLevel(), dataHandler); }
[ "@", "Override", "protected", "void", "indexNode", "(", "Node", "node", ",", "EntityMetadata", "entityMetadata", ")", "{", "super", ".", "indexNode", "(", "node", ",", "entityMetadata", ")", ";", "// Write to inverted index table if applicable", "invertedIndexHandler", ...
Indexes a {@link Node} to database. @param node the node @param entityMetadata the entity metadata
[ "Indexes", "a", "{", "@link", "Node", "}", "to", "database", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/ThriftClient.java#L329-L336
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSetDTM.java
NodeSetDTM.setItem
public void setItem(int node, int index) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!"); super.setElementAt(node, index); }
java
public void setItem(int node, int index) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!"); super.setElementAt(node, index); }
[ "public", "void", "setItem", "(", "int", "node", ",", "int", "index", ")", "{", "if", "(", "!", "m_mutable", ")", "throw", "new", "RuntimeException", "(", "XSLMessages", ".", "createXPATHMessage", "(", "XPATHErrorResources", ".", "ER_NODESETDTM_NOT_MUTABLE", ","...
Same as setElementAt. @param node The node to be set. @param index The index of the node to be replaced. @throws RuntimeException thrown if this NodeSetDTM is not of a mutable type.
[ "Same", "as", "setElementAt", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSetDTM.java#L1025-L1032
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.clickOn
protected void clickOn(PageElement toClick, Object... args) throws TechnicalException, FailureException { displayMessageAtTheBeginningOfMethod("clickOn: %s in %s", toClick.toString(), toClick.getPage().getApplication()); try { Context.waitUntil(ExpectedConditions.elementToBeClickable(Util...
java
protected void clickOn(PageElement toClick, Object... args) throws TechnicalException, FailureException { displayMessageAtTheBeginningOfMethod("clickOn: %s in %s", toClick.toString(), toClick.getPage().getApplication()); try { Context.waitUntil(ExpectedConditions.elementToBeClickable(Util...
[ "protected", "void", "clickOn", "(", "PageElement", "toClick", ",", "Object", "...", "args", ")", "throws", "TechnicalException", ",", "FailureException", "{", "displayMessageAtTheBeginningOfMethod", "(", "\"clickOn: %s in %s\"", ",", "toClick", ".", "toString", "(", ...
Click on html element. @param toClick html element @param args list of arguments to format the found selector with @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Exception with {@value com.github.noraui.utils.Messages#FAIL_MESSAGE_UNABLE_TO_OPEN_ON_CLI...
[ "Click", "on", "html", "element", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L113-L121
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/StringUtils.java
StringUtils.parseLocaleString
public static Locale parseLocaleString(String localeString) { String[] parts = tokenize(localeString, "_ ", false); String language = (parts.length > 0 ? parts[0] : EMPTY); String country = (parts.length > 1 ? parts[1] : EMPTY); validateLocalePart(language); validateLocalePart(co...
java
public static Locale parseLocaleString(String localeString) { String[] parts = tokenize(localeString, "_ ", false); String language = (parts.length > 0 ? parts[0] : EMPTY); String country = (parts.length > 1 ? parts[1] : EMPTY); validateLocalePart(language); validateLocalePart(co...
[ "public", "static", "Locale", "parseLocaleString", "(", "String", "localeString", ")", "{", "String", "[", "]", "parts", "=", "tokenize", "(", "localeString", ",", "\"_ \"", ",", "false", ")", ";", "String", "language", "=", "(", "parts", ".", "length", ">...
Parse the given {@code localeString} value into a {@link Locale}. <p>This is the inverse operation of {@link Locale#toString Locale's toString}. @param localeString the locale {@code String}, following {@code Locale's} {@code toString()} format ("en", "en_UK", etc); also accepts spaces as separators, as an alternative...
[ "Parse", "the", "given", "{", "@code", "localeString", "}", "value", "into", "a", "{", "@link", "Locale", "}", ".", "<p", ">", "This", "is", "the", "inverse", "operation", "of", "{", "@link", "Locale#toString", "Locale", "s", "toString", "}", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/StringUtils.java#L747-L765
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetector.java
BinaryEllipseDetector.setLensDistortion
public void setLensDistortion(PixelTransform<Point2D_F32> distToUndist , PixelTransform<Point2D_F32> undistToDist ) { this.ellipseDetector.setLensDistortion(distToUndist); if( this.ellipseRefiner != null ) this.ellipseRefiner.setTransform(undistToDist); this.intensityCheck.setTransform(undistToDist); }
java
public void setLensDistortion(PixelTransform<Point2D_F32> distToUndist , PixelTransform<Point2D_F32> undistToDist ) { this.ellipseDetector.setLensDistortion(distToUndist); if( this.ellipseRefiner != null ) this.ellipseRefiner.setTransform(undistToDist); this.intensityCheck.setTransform(undistToDist); }
[ "public", "void", "setLensDistortion", "(", "PixelTransform", "<", "Point2D_F32", ">", "distToUndist", ",", "PixelTransform", "<", "Point2D_F32", ">", "undistToDist", ")", "{", "this", ".", "ellipseDetector", ".", "setLensDistortion", "(", "distToUndist", ")", ";", ...
<p>Specifies transforms which can be used to change coordinates from distorted to undistorted. The undistorted image is never explicitly created.</p> <p> WARNING: The undistorted image must have the same bounds as the distorted input image. This is because several of the bounds checks use the image shape. This are s...
[ "<p", ">", "Specifies", "transforms", "which", "can", "be", "used", "to", "change", "coordinates", "from", "distorted", "to", "undistorted", ".", "The", "undistorted", "image", "is", "never", "explicitly", "created", ".", "<", "/", "p", ">" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/ellipse/BinaryEllipseDetector.java#L87-L92